Motion trail setting

This commit is contained in:
JannisX11 2020-10-10 15:17:43 +02:00
parent 537795730d
commit dd3bfd1873
6 changed files with 21 additions and 2 deletions

View File

@ -1153,7 +1153,7 @@ const Animator = {
Canvas.updateAllBones()
scene.add(Wintersky.space);
scene.add(Animator.motion_trail);
if (settings.motion_trails.value) scene.add(Animator.motion_trail);
Animator.motion_trail.no_export = true;
$('body').addClass('animation_mode')

View File

@ -420,7 +420,9 @@ function updateKeyframeSelection() {
BarItems.slider_keyframe_time.update()
BarItems.keyframe_interpolation.set(Timeline.selected[0].interpolation)
}
if (Group.selected) Animator.showMotionTrail();
if (settings.motion_trails.value && Group.selected) {
Animator.showMotionTrail();
}
BARS.updateConditions()
Blockbench.dispatchEvent('update_keyframe_selection');
}

View File

@ -619,6 +619,7 @@ const MenuBar = {
]},
'_',
'toggle_shading',
'toggle_motion_trails',
'toggle_wireframe',
'preview_checkerboard',
'painting_grid',

View File

@ -87,6 +87,11 @@ const Settings = {
//Interface
new Setting('origin_size', {category: 'interface', value: 10, type: 'number'});
new Setting('control_size', {category: 'interface', value: 10, type: 'number'});
new Setting('motion_trails', {category: 'interface', value: true, onChange() {
if (Animator.open) {
scene[this.value ? 'add' : 'remove'](Animator.motion_trail);
}
}});
new Setting('seethrough_outline', {category: 'interface', value: false});
new Setting('outliner_colors', {category: 'interface', value: false});
new Setting('preview_checkerboard', {category: 'interface', value: false, onChange() {

View File

@ -1823,6 +1823,15 @@ BARS.defineActions(function() {
this.toggleLinkedSetting()
}
})
new Action('toggle_motion_trails', {
name: tl('settings.motion_trails'),
description: tl('settings.motion_trails.desc'),
category: 'view',
linked_setting: 'motion_trails',
click: function () {
this.toggleLinkedSetting()
}
})
new Action('screenshot_model', {
icon: 'fa-cubes',

View File

@ -454,6 +454,8 @@
"settings.origin_size.desc": "Size of the pivot point marker",
"settings.control_size": "Axis Control Size",
"settings.control_size.desc": "Size of the 3 axis control tool",
"settings.motion_trails": "Motion Trails",
"settings.motion_trails.desc": "Show motion trails in the animation editor",
"settings.display_skin": "Display Skin",
"settings.display_skin.desc": "Skin used for the display reference player model",
"settings.seethrough_outline": "X-Ray Outlines",