feat(editor): support viewport range selection
This commit is contained in:
parent
5a08961309
commit
1d6e664d9f
@ -7163,6 +7163,12 @@ public:
|
||||
}
|
||||
|
||||
void ApplyViewportSelection(MetaCoreEditorContext& editorContext, MetaCoreId pickedObjectId) override {
|
||||
const ImGuiIO& io = ImGui::GetIO();
|
||||
if (pickedObjectId != 0 && io.KeyShift) {
|
||||
editorContext.SelectRangeByOrderedIds(editorContext.GetScene().BuildHierarchyPreorder(), pickedObjectId, io.KeyCtrl);
|
||||
return;
|
||||
}
|
||||
|
||||
if (editorContext.GetInput().IsKeyDown(MetaCoreInputKey::Control)) {
|
||||
if (pickedObjectId != 0) {
|
||||
editorContext.ToggleSelection(pickedObjectId);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user