bak
This commit is contained in:
1 parent
6b6157d786
commit
3ef5fb5a2d
19 files changed
+1244
-94
No files matched your search
@@ -409,6 +409,25 @@ export const useSceneStore = defineStore('scene', {
|
||||
else clipTrack.color = color
|
||||
}
|
||||
},
|
||||
shiftKeyframesPosition(
|
||||
refs: Array<{ layerId: string; kind: 'main' | 'position' | 'rotation'; keyframeId: string }>,
|
||||
dx: number,
|
||||
dy: number,
|
||||
) {
|
||||
for (const ref of refs) {
|
||||
if (ref.kind === 'rotation') continue
|
||||
const layer = this.activeLayers.find((l) => l.id === ref.layerId)
|
||||
if (!layer) continue
|
||||
const arr =
|
||||
ref.kind === 'position' ? layer.positionKeyframes : layer.keyframes
|
||||
const kf = arr?.find((k) => k.id === ref.keyframeId)
|
||||
if (!kf) continue
|
||||
const sampled = sampleLayer(layer, kf.time)
|
||||
const curX = kf.props.x ?? sampled.x
|
||||
const curY = kf.props.y ?? sampled.y
|
||||
kf.props = { ...kf.props, x: curX + dx, y: curY + dy }
|
||||
}
|
||||
},
|
||||
setTrackLocked(trackId: string, locked: boolean) {
|
||||
const layer = this.activeLayers.find((l) => l.id === trackId)
|
||||
if (layer) {
|
||||
|
||||
Reference in new issue
Block a user