feat(web): add view layer pass authoring
This commit is contained in:
BIN
web/app/src/vendor/blender/web_engine.wasm
vendored
BIN
web/app/src/vendor/blender/web_engine.wasm
vendored
Binary file not shown.
@@ -805,6 +805,16 @@ function assertFutureCapability(payload: Extract<WebEngineRequest["command"], {
|
||||
if (properties.thickness !== undefined && !boundedNumber(properties.thickness, 0, 1000)) throw report("RENDER_PROPERTY_INVALID", "Scene line thickness is outside the bounded range");
|
||||
return;
|
||||
}
|
||||
case "setSceneViewLayerPassSettings": {
|
||||
const scene = currentSnapshot?.scenes.find((candidate) => candidate.id === payload.dataId);
|
||||
if (!scene || typeof payload.layerName !== "string" || payload.layerName.length === 0) throw report("RENDER_PROPERTY_INVALID", "Scene view layer pass target is invalid");
|
||||
const properties = payload.properties;
|
||||
if (!validPropertyKeys(properties, ["passMask", "cryptomatteMask", "cryptomatteLevels", "alphaThreshold"])) throw report("RENDER_PROPERTY_INVALID", "Scene view layer pass properties are invalid");
|
||||
for (const field of ["passMask", "cryptomatteMask"] as const) if (properties[field] !== undefined && (!Number.isSafeInteger(properties[field]) || properties[field] < 0 || properties[field] > 0xffffffff)) throw report("RENDER_PROPERTY_INVALID", `Scene ${field} is outside the bounded mask range`);
|
||||
if (properties.cryptomatteLevels !== undefined && (!Number.isSafeInteger(properties.cryptomatteLevels) || properties.cryptomatteLevels < 1 || properties.cryptomatteLevels > 16)) throw report("RENDER_PROPERTY_INVALID", "Scene cryptomatteLevels is outside the bounded range");
|
||||
if (properties.alphaThreshold !== undefined && !boundedNumber(properties.alphaThreshold, 0, 1)) throw report("RENDER_PROPERTY_INVALID", "Scene alphaThreshold must be between zero and one");
|
||||
return;
|
||||
}
|
||||
case "setGeometryNodeGraph": {
|
||||
const snapshot = currentSnapshot;
|
||||
const availableResourceIds = new Set([
|
||||
|
||||
Reference in New Issue
Block a user