Select shapes via outliner

This commit is contained in:
Skyler Lehmkuhl 2025-01-05 21:34:41 -05:00
parent c9d9dfc3ba
commit 529638de37
1 changed files with 19 additions and 1 deletions

View File

@ -4518,7 +4518,7 @@ function stage() {
} }
if (!selected) { if (!selected) {
context.oldselection = context.selection; context.oldselection = context.selection;
context.oldshapeselection = context.selection; context.oldshapeselection = context.shapeselection;
context.selection = []; context.selection = [];
context.shapeselection = []; context.shapeselection = [];
if ( if (
@ -5792,6 +5792,24 @@ function outliner(object = undefined) {
outliner.collapsed[object.idx] = !outliner.collapsed[object.idx]; outliner.collapsed[object.idx] = !outliner.collapsed[object.idx];
} else { } else {
outliner.active = object; outliner.active = object;
context.objectStack = []
let parent = object;
while (true) {
if (parent.parent) {
parent = parent.parent
context.objectStack.unshift(parent)
} else {
break
}
}
if (context.objectStack.length==0) {
context.objectStack.push(root)
}
context.oldselection = context.selection
context.oldshapeselection = context.shapeselection
context.selection = [object]
context.shapeselection = []
actions.select.create()
} }
updateOutliner(); // Re-render the outliner updateOutliner(); // Re-render the outliner
return; return;