Skip model instance without animations

This commit is contained in:
2026-04-14 01:39:08 +02:00
parent a18c536659
commit 184147f8d5

View File

@@ -934,6 +934,20 @@ function buildRuntimeControlSurface(
}
for (const modelInstance of modelInstances) {
const authoredModelInstance = document.modelInstances[modelInstance.instanceId];
const asset =
authoredModelInstance === undefined
? undefined
: document.assets[authoredModelInstance.assetId];
if (
asset === undefined ||
asset.kind !== "model" ||
asset.metadata.animationNames.length === 0
) {
continue;
}
targets.push(
createControlTargetDescriptor(
createModelInstanceControlTargetRef(modelInstance.instanceId),