Skip model instance without animations
This commit is contained in:
@@ -934,6 +934,20 @@ function buildRuntimeControlSurface(
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const modelInstance of modelInstances) {
|
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(
|
targets.push(
|
||||||
createControlTargetDescriptor(
|
createControlTargetDescriptor(
|
||||||
createModelInstanceControlTargetRef(modelInstance.instanceId),
|
createModelInstanceControlTargetRef(modelInstance.instanceId),
|
||||||
|
|||||||
Reference in New Issue
Block a user