feat(editor): support viewport range selection

This commit is contained in:
ayuan9957 2026-06-17 16:34:03 +08:00
parent 5a08961309
commit 1d6e664d9f

View File

@ -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);