feat(web): complete portable Blender feature gaps
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

This commit is contained in:
mes123456
2026-09-06 19:33:50 +08:00
parent ed347098b4
commit 66d3f4e0f4
48 changed files with 58048 additions and 61 deletions

View File

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