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:
JannisX11 2022-06-18 12:56:46 +02:00
parent e44c28859f
commit ad9e5561a5
3 changed files with 10 additions and 6 deletions

View File

@ -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)
}
}

View File

@ -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>

View File

@ -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;