mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-21 01:13:37 +08:00
Fix meshes being visible in animation mode
This commit is contained in:
parent
75f084dffe
commit
35d56d7057
@ -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);
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user