mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-21 01:13:37 +08:00
Fix #1450 Cannot unselect all if any element is locked
Fix #1452 Keyframe context menu does not work in graph editor Fix uniform scale keyframes not importing as uniform
This commit is contained in:
parent
e44c28859f
commit
ad9e5561a5
@ -37,14 +37,17 @@ class Keyframe {
|
||||
this.selected = 0;
|
||||
this.data_points = []
|
||||
|
||||
if (typeof data === 'object') {
|
||||
Merge.string(this, data, 'channel')
|
||||
this.transform = !!(BoneAnimator.prototype.channels[this.channel] || EffectAnimator.prototype.channels[this.channel]).transform;
|
||||
this.data_points.push(new KeyframeDataPoint(this));
|
||||
}
|
||||
|
||||
for (var key in Keyframe.properties) {
|
||||
Keyframe.properties[key].reset(this);
|
||||
}
|
||||
|
||||
if (typeof data === 'object') {
|
||||
Merge.string(this, data, 'channel')
|
||||
this.transform = !!(BoneAnimator.prototype.channels[this.channel] || EffectAnimator.prototype.channels[this.channel]).transform;
|
||||
this.data_points.push(new KeyframeDataPoint(this));
|
||||
this.extend(data)
|
||||
}
|
||||
}
|
||||
|
@ -1082,7 +1082,7 @@ Interface.definePanels(() => {
|
||||
v-on:dblclick="keyframe.callPlayhead()"
|
||||
:title="trimFloatNumber(keyframe.time) + ' ⨉ ' + keyframe.display_value"
|
||||
@mousedown="dragKeyframes(keyframe, $event)" @touchstart="dragKeyframes(keyframe, $event)"
|
||||
@contextmenu.prevent="keyframe.showContextMenu($event)"
|
||||
@contextmenu.prevent.stop="keyframe.showContextMenu($event)"
|
||||
>
|
||||
<i class="material-icons keyframe_icon_smaller" v-if="keyframe.interpolation == 'catmullrom'">lens</i>
|
||||
<i class="material-icons keyframe_icon_step" v-else-if="keyframe.interpolation == 'step'">eject</i>
|
||||
|
@ -219,11 +219,12 @@ function selectAll() {
|
||||
updateSelection();
|
||||
|
||||
} else if (Modes.edit || Modes.paint) {
|
||||
if (Outliner.selected.length < Outliner.elements.length) {
|
||||
let selectable_elements = Outliner.elements.filter(element => !element.locked);
|
||||
if (Outliner.selected.length < selectable_elements.length) {
|
||||
if (Outliner.root.length == 1 && !Outliner.root[0].locked) {
|
||||
Outliner.root[0].select();
|
||||
} else {
|
||||
Outliner.elements.forEach(obj => {
|
||||
selectable_elements.forEach(obj => {
|
||||
obj.selectLow()
|
||||
})
|
||||
TickUpdates.selection = true;
|
||||
|
Loading…
Reference in New Issue
Block a user