0.18.1: editor-hide cascades to groups + rename for layers & clip tracks
Track groups get the same editor-hide affordance as layer and clip tracks: new eye button on the group header, setGroupEditorHidden action (clears selection pointing inside the group), and a cascade through the Konva stackItems + render.ts so every child track in a hidden group vanishes in the editor. Track renaming via right-click context menu now covers layers and clip tracks too — setLayerName / setClipTrackName actions, new i18n strings, and end-to-end UI tests driving the menu → promptDialog → rename flow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
6784b76607
commit
5af0cdb3d4
9 files changed
+382
-2
No files matched your search
@@ -1829,6 +1829,35 @@ export const useSceneStore = defineStore('scene', {
|
||||
}
|
||||
}
|
||||
},
|
||||
setGroupEditorHidden(groupId: string, hidden: boolean) {
|
||||
const group = this.scene.groups?.find((g) => g.id === groupId)
|
||||
if (!group) return
|
||||
if (hidden) group.editorHidden = true
|
||||
else delete group.editorHidden
|
||||
// Editor-hide cascades to every child track; drop any selection
|
||||
// that now points inside the group so the transformer, keyboard
|
||||
// shortcuts and Properties panel stop offering edits that won't
|
||||
// render.
|
||||
if (!hidden) return
|
||||
const childIds = new Set(group.childIds)
|
||||
if (this.selectedLayerId && childIds.has(this.selectedLayerId)) {
|
||||
this.selectedLayerId = null
|
||||
this.selectedLayerIds = []
|
||||
} else if (this.selectedLayerIds.length) {
|
||||
this.selectedLayerIds = this.selectedLayerIds.filter(
|
||||
(id) => !childIds.has(id),
|
||||
)
|
||||
if (!this.selectedLayerIds.length) this.selectedLayerId = null
|
||||
}
|
||||
if (this.selectedClipInstanceId) {
|
||||
const sel = this.scene.clipInstances?.find(
|
||||
(ci) => ci.id === this.selectedClipInstanceId,
|
||||
)
|
||||
if (sel && childIds.has(sel.clipTrackId)) {
|
||||
this.selectedClipInstanceId = null
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// -------- Markers --------------------------------------------------
|
||||
|
||||
@@ -1892,6 +1921,16 @@ export const useSceneStore = defineStore('scene', {
|
||||
const track = this.scene.scriptTracks?.find((t) => t.id === id)
|
||||
if (track) track.name = name.trim() || undefined
|
||||
},
|
||||
setLayerName(id: string, name: string) {
|
||||
const layer = this.activeLayers.find((l) => l.id === id)
|
||||
if (!layer) return
|
||||
const n = name.trim()
|
||||
if (n) layer.name = n
|
||||
},
|
||||
setClipTrackName(id: string, name: string) {
|
||||
const track = this.scene.clipTracks?.find((t) => t.id === id)
|
||||
if (track) track.name = name.trim() || undefined
|
||||
},
|
||||
addScriptFrame(
|
||||
trackId: string,
|
||||
time: number,
|
||||
|
||||
Reference in new issue
Block a user