fix(web): refresh the Outliner after visibility changes
The native visibility flag update left the Outliner tree empty and hid the eye toggle. Refresh the active Outliner after setObjectVisibility. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -5770,6 +5770,18 @@ export function App({localOnly=false,course}:{localOnly?:boolean;course?:Availab
|
||||
setGeometryBuffers(result.geometryBuffers);
|
||||
setNonMeshGeometryBuffers(result.nonMeshGeometryBuffers ?? []);
|
||||
setFrame(result.snapshot.frame.current);
|
||||
if (command.type === 'setObjectVisibility') {
|
||||
// The native visibility flag changes without touching the Outliner tree;
|
||||
// refresh the active Outliner so rows and the eye state stay current.
|
||||
const flow = nextSnapshot.editorWorkflow;
|
||||
const workspace = flow?.workspaces.find(item => item.id === flow.context.workspaceId);
|
||||
const outlinerArea = workspace?.areas.find(area => area.editor === 'OUTLINER' &&
|
||||
area.regions.some(region => region.kind === 'MAIN' && region.visible));
|
||||
if (flow && workspace?.writable && workspace.screenId && outlinerArea) {
|
||||
void applyEditCommand({ type: 'editEditorContext', baseRevision: nextSnapshot.revision,
|
||||
edit: { action: 'OUTLINER_REFRESH', workspaceId: workspace.id, screenId: workspace.screenId, areaId: outlinerArea.id } });
|
||||
}
|
||||
}
|
||||
if (command.type === "setObjectTransform" && webPreferences.animation.useAutoKeying) {
|
||||
const objectId = command.objectId;
|
||||
const keyFrame = result.snapshot.frame.current;
|
||||
|
||||
Reference in New Issue
Block a user