Feat: Add brush face climbable property and command support
This commit is contained in:
@@ -6874,7 +6874,21 @@ export function validateSceneDocument(
|
||||
}
|
||||
|
||||
for (const faceId of getBrushFaceIds(brush)) {
|
||||
const materialId = brush.faces[faceId].materialId;
|
||||
const face = brush.faces[faceId];
|
||||
|
||||
if (face === undefined) {
|
||||
diagnostics.push(
|
||||
createDiagnostic(
|
||||
"error",
|
||||
"missing-brush-face",
|
||||
`Whitebox face ${faceId} must exist in brush face data.`,
|
||||
`${path}.faces.${faceId}`
|
||||
)
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
const materialId = face.materialId;
|
||||
|
||||
if (materialId !== null && document.materials[materialId] === undefined) {
|
||||
diagnostics.push(
|
||||
@@ -6886,6 +6900,17 @@ export function validateSceneDocument(
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (!isBoolean(face.climbable)) {
|
||||
diagnostics.push(
|
||||
createDiagnostic(
|
||||
"error",
|
||||
"invalid-brush-face-climbable",
|
||||
"Whitebox face climbable must remain a boolean.",
|
||||
`${path}.faces.${faceId}.climbable`
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const volume = brush.volume as Record<string, unknown>;
|
||||
|
||||
Reference in New Issue
Block a user