feat(web): continue scene pipeline authoring wave
This commit is contained in:
@@ -645,6 +645,26 @@ function assertFutureCapability(payload: Extract<WebEngineRequest["command"], {
|
||||
if (properties.scaleLength !== undefined && !boundedNumber(properties.scaleLength, 0, 1_000_000)) throw report("RENDER_PROPERTY_INVALID", "Scene scaleLength is outside the bounded range");
|
||||
return;
|
||||
}
|
||||
case "setSceneTimelineSettings": {
|
||||
const scene = currentSnapshot?.scenes.find((candidate) => candidate.id === payload.dataId);
|
||||
const properties = payload.properties;
|
||||
if (!scene || !validPropertyKeys(properties, ["fps", "fpsBase", "frameStep", "usePreviewRange", "previewStart", "previewEnd"])) throw report("RENDER_PROPERTY_INVALID", "Scene timeline target or properties are invalid");
|
||||
for (const [field, minimum, maximum] of [["fps", 1, 1000], ["frameStep", 1, 1000], ["previewStart", -1000000, 1000000], ["previewEnd", -1000000, 1000000]] as const) {
|
||||
const value = properties[field];
|
||||
if (value !== undefined && (!Number.isSafeInteger(value) || value < minimum || value > maximum)) throw report("RENDER_PROPERTY_INVALID", `Scene ${field} is outside the bounded timeline range`);
|
||||
}
|
||||
if (properties.fpsBase !== undefined && !boundedNumber(properties.fpsBase, 0.001, 100)) throw report("RENDER_PROPERTY_INVALID", "Scene fpsBase is outside the bounded range");
|
||||
if (properties.previewStart !== undefined && properties.previewEnd !== undefined && properties.previewEnd < properties.previewStart) throw report("RENDER_PROPERTY_INVALID", "Scene previewEnd must not precede previewStart");
|
||||
if (properties.usePreviewRange !== undefined && typeof properties.usePreviewRange !== "boolean") throw report("RENDER_PROPERTY_INVALID", "Scene usePreviewRange must be boolean");
|
||||
return;
|
||||
}
|
||||
case "setScenePipelineSettings": {
|
||||
const scene = currentSnapshot?.scenes.find((candidate) => candidate.id === payload.dataId);
|
||||
const properties = payload.properties;
|
||||
if (!scene || !validPropertyKeys(properties, ["useCompositor", "useSequencer", "noOverwrite", "saveOutput", "alphaPremultiplied"])) throw report("RENDER_PROPERTY_INVALID", "Scene pipeline target or properties are invalid");
|
||||
for (const field of ["useCompositor", "useSequencer", "noOverwrite", "saveOutput", "alphaPremultiplied"] as const) if (properties[field] !== undefined && typeof properties[field] !== "boolean") throw report("RENDER_PROPERTY_INVALID", `Scene ${field} must be boolean`);
|
||||
return;
|
||||
}
|
||||
case "setGeometryNodeGraph": {
|
||||
const snapshot = currentSnapshot;
|
||||
const availableResourceIds = new Set([
|
||||
|
||||
Reference in New Issue
Block a user