diff --git a/css/panels.css b/css/panels.css index 00b7a5a..c4eb5f8 100644 --- a/css/panels.css +++ b/css/panels.css @@ -462,7 +462,6 @@ position: relative; vertical-align: middle; padding: 8px; - padding-left: 16px; box-sizing: border-box; } .animation:hover { @@ -471,6 +470,9 @@ .animation.selected { background: var(--color-selected); } + ul.indented .animation { + padding-left: 16px; + } .animation > i { margin-right: 4px; } @@ -855,13 +857,16 @@ .animator_channel_bar .channel_head .text_button .channel_mute { font-size: 11pt; } + .animator_channel_bar .channel_head .text_button .fa-eye-slash { + color: var(--color-subtle_text); + } .channel_head span { flex-grow: 1; flex-shrink: 1; overflow: hidden; } .animator_channel_bar .channel_head span { - opacity: 0.75 + color: var(--color-subtle_text); } .keyframe_section { flex-grow: 1; diff --git a/js/animations/animation.js b/js/animations/animation.js index 9b08714..d529513 100644 --- a/js/animations/animation.js +++ b/js/animations/animation.js @@ -481,7 +481,7 @@ class Animation { type: 'file', extensions: ['json'], filetype: 'JSON Animation', - condition: isApp + condition: Animation.properties.path.condition }, loop: { label: 'menu.animation.loop', @@ -564,6 +564,7 @@ class Animation { name: 'menu.animation.save', id: 'save', icon: 'save', + condition: () => Format.animation_files, click(animation) { animation.save(); } @@ -572,7 +573,7 @@ class Animation { name: 'menu.animation.open_location', id: 'open_location', icon: 'folder', - condition(animation) {return isApp && animation.path && fs.existsSync(animation.path)}, + condition(animation) {return isApp && Format.animation_files && animation.path && fs.existsSync(animation.path)}, click(animation) { shell.showItemInFolder(animation.path); } @@ -601,10 +602,11 @@ class Animation { Undo.finishEdit('remove animation', {animations: []}) }} ]) - new Property(Animation, 'boolean', 'saved', {default: true}) - new Property(Animation, 'string', 'path') + new Property(Animation, 'boolean', 'saved', {default: true, condition: () => Format.animation_files}) + new Property(Animation, 'string', 'path', {condition: () => isApp && Format.animation_files}) Blockbench.on('finish_edit', event => { + if (!Format.animation_files) return; if (event.aspects.animations && event.aspects.animations.length) { event.aspects.animations.forEach(animation => { animation.saved = false; @@ -1704,7 +1706,7 @@ BARS.defineActions(function() { new Action('load_animation_file', { icon: 'fa-file-video', category: 'animation', - condition: {modes: ['animate']}, + condition: {modes: ['animate'], method: () => Format.animation_files}, click: function () { var path = ModelMeta.export_path if (isApp) { @@ -1762,6 +1764,7 @@ BARS.defineActions(function() { new Action('save_all_animations', { icon: 'save', category: 'animation', + condition: () => Format.animation_files, click: function () { let paths = []; Animation.all.forEach(animation => { @@ -1837,8 +1840,9 @@ Interface.definePanels(function() { component: { name: 'panel-animations', data() { return { - animations: Animator.animations, - files_folded: {} + animations: Animation.all, + files_folded: {}, + animation_files_enabled: true }}, methods: { toggle(key) { @@ -1861,6 +1865,15 @@ Interface.definePanels(function() { }, computed: { files() { + if (!this.animation_files_enabled) { + return { + '': { + animations: this.animations, + name: '', + hide_head: true + } + } + } let files = {}; this.animations.forEach(animation => { let key = animation.path || ''; @@ -1880,17 +1893,17 @@ Interface.definePanels(function() {