feat(web): complete portable Blender feature gaps
This commit is contained in:
@@ -20,6 +20,21 @@ export const animationRenderCommands = Object.freeze({
|
||||
setKeyframe(animationId: string, path: string, frame: number, options: Omit<AnimationCommand<"setKeyframe">, "type" | "animationId" | "path" | "frame"> = {}): AnimationCommand<"setKeyframe"> {
|
||||
return { type: "setKeyframe", animationId, path, frame, ...options };
|
||||
},
|
||||
setFCurveKeyframes(animationId: string, path: string, points: AnimationCommand<"setFCurveKeyframes">["points"]): AnimationCommand<"setFCurveKeyframes"> {
|
||||
return { type: "setFCurveKeyframes", animationId, path, points: points.map((point) => ({ ...point, handleLeft: point.handleLeft ? [...point.handleLeft] as [number, number] : undefined, handleRight: point.handleRight ? [...point.handleRight] as [number, number] : undefined })) };
|
||||
},
|
||||
setDriverExpression(animationId: string, path: string, expression: string): AnimationCommand<"setDriverExpression"> {
|
||||
return { type: "setDriverExpression", animationId, path, expression };
|
||||
},
|
||||
setActionGroups(animationId: string, groups: AnimationCommand<"setActionGroups">["groups"]): AnimationCommand<"setActionGroups"> {
|
||||
return { type: "setActionGroups", animationId, groups: groups.map((group) => ({ name: group.name, paths: [...group.paths] })) };
|
||||
},
|
||||
setKeyingSet(sceneId: string, name: string, paths: AnimationCommand<"setKeyingSet">["paths"], active = true): AnimationCommand<"setKeyingSet"> {
|
||||
return { type: "setKeyingSet", sceneId, name, paths: paths.map((path) => ({ ...path })), active };
|
||||
},
|
||||
bakeAnimation(objectId: string, frameStart: number, frameEnd: number, step = 1): AnimationCommand<"bakeAnimation"> {
|
||||
return { type: "bakeAnimation", objectId, frameStart, frameEnd, step };
|
||||
},
|
||||
setTimelineMarkers(dataId: string, markers: AnimationCommand<"setTimelineMarkers">["markers"]): AnimationCommand<"setTimelineMarkers"> {
|
||||
return { type: "setTimelineMarkers", dataId, markers: markers.map((marker) => ({ ...marker })) };
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user