diff --git a/js/animations/animation.js b/js/animations/animation.js index d5d03913..dd9af4a3 100644 --- a/js/animations/animation.js +++ b/js/animations/animation.js @@ -1317,8 +1317,7 @@ const Animator = { if (BoneAnimator.prototype.channels[channel].transform) Animator._last_values[channel] = [0, 0, 0]; } }, - join() { - + join() { if (isApp && (Format.id == 'bedrock' || Format.id == 'bedrock_old') && !Project.BedrockEntityManager.initialized_animations) { Project.BedrockEntityManager.initAnimations(); } @@ -1326,7 +1325,6 @@ const Animator = { Animator.open = true; Canvas.updateAllBones() - Outliner.vue.options.hidden_types.push('cube'); scene.add(WinterskyScene.space); WinterskyScene.global_options.tick_rate = settings.particle_tick_rate.value; if (settings.motion_trails.value) scene.add(Animator.motion_trail); @@ -1357,7 +1355,6 @@ const Animator = { leave() { Timeline.pause() Animator.open = false; - Outliner.vue.options.hidden_types.remove('cube'); scene.remove(WinterskyScene.space); scene.remove(Animator.motion_trail); diff --git a/js/modes.js b/js/modes.js index d70fa1bc..1837675d 100644 --- a/js/modes.js +++ b/js/modes.js @@ -11,6 +11,7 @@ class Mode extends KeybindItem { this.default_tool = data.default_tool; this.selectElements = data.selectElements !== false + this.hidden_node_types = data.hidden_node_types instanceof Array ? data.hidden_node_types.slice() : []; this.center_windows = data.center_windows||[]; this.hide_toolbars = data.hide_toolbars @@ -66,6 +67,8 @@ class Mode extends KeybindItem { $('#main_toolbar .toolbar_wrapper').css('visibility', this.hide_toolbars ? 'hidden' : 'visible'); $('#status_bar').css('display', this.hide_status_bar ? 'none' : 'flex'); + Outliner.vue.options.hidden_types.replace(this.hidden_node_types); + if (typeof this.onSelect === 'function') { this.onSelect() } @@ -169,6 +172,7 @@ BARS.defineActions(function() { default_tool: 'move_tool', category: 'navigate', center_windows: ['preview', 'timeline'], + hidden_node_types: ['cube', 'mesh', 'texture_mesh'], condition: () => Format.animation_mode, onSelect: () => { Animator.join()