BabylonJS/Babylon.js · error · Error

${context}/target/path: Could not find interpolation propert

Error message

${context}/target/path: Could not find interpolation properties for target path (${channel.target.path})

What it means

After the target-path switch resolves interpolation property mappings, a null result indicates that although the path itself was valid, no matching node/morph mapping could be built (e.g. the target node lacks the animated property, such as WEIGHTS on a node without morph targets). This is a defensive "stay safe" check before using the properties.

Source

Thrown at packages/dev/loaders/src/glTF/2.0/glTFLoader.pure.ts:1893

                case AnimationChannelTargetPath.ROTATION: {
                    properties = GetMappingForKey("/nodes/{}/rotation")?.interpolation!;
                    break;
                }
                case AnimationChannelTargetPath.SCALE: {
                    properties = GetMappingForKey("/nodes/{}/scale")?.interpolation!;
                    break;
                }
                case AnimationChannelTargetPath.WEIGHTS: {
                    properties = GetMappingForKey("/nodes/{}/weights")?.interpolation!;
                    break;
                }
                default: {
                    throw new Error(`${context}/target/path: Invalid value (${channel.target.path})`);
                }
            }
            // stay safe
            if (!properties) {
                throw new Error(`${context}/target/path: Could not find interpolation properties for target path (${channel.target.path})`);
            }

            const targetInfo: IObjectInfo<IInterpolationPropertyInfo[]> = {
                object: targetNode,
                info: properties,
            };

            return this._loadAnimationChannelFromTargetInfoAsync(context, animationContext, animation, channel, targetInfo, onLoad);
        });
    }

    /**
     * @hidden
     * Loads a glTF animation channel.
     * @param context The context when loading the asset
     * @param animationContext The context of the animation when loading the asset
     * @param animation The glTF animation property
     * @param channel The glTF animation channel property

View on GitHub (pinned to 0592b347b8)

Solutions

  1. Ensure the target node's mesh defines morph targets if the path is "weights".
  2. Strip animation channels that target nodes missing the corresponding property.
  3. Re-export the asset so animation channels match the node/mesh structure.
  4. Validate the asset with glTF-Validator to detect dangling animation targets.

Example fix

// before: weights channel targeting a mesh without morph targets
// after: either add morph targets to the mesh or remove the channel
"channels": [] // removed weights channel for node without morph targets
Defensive patterns

Strategy: validation

Validate before calling

for (const ch of gltf.animations?.flatMap(a => a.channels) ?? []) {
  if (ch.target.path === "weights") {
    const node = gltf.nodes?.[ch.target.node!];
    const mesh = gltf.meshes?.[node?.mesh!];
    if (!mesh?.primitives.some(p => p.targets)) {
      throw new Error(`weights channel targets node ${ch.target.node} without morph targets`);
    }
  }
}

Type guard

function hasMorphTargets(gltf: any, nodeIndex: number): boolean {
  const meshIndex = gltf.nodes?.[nodeIndex]?.mesh;
  return !!gltf.meshes?.[meshIndex]?.primitives?.some((p: any) => Array.isArray(p.targets));
}

Try / catch

try { await loadAsset(); } catch (e) {
  if (/Could not find interpolation properties/.test((e as Error).message)) {
    // retry loading with animations stripped or fix morph targets
  }
}

Prevention

When it happens

Trigger: An animation channel targets path "weights" on a mesh/node that has no morph targets, or a node lookup produced no mapping entry for a nominally valid path.

Common situations: Retargeting animations between meshes with/without morph targets, exporters that emit WEIGHTS channels unconditionally, or nodes pruned during optimization while their animation channels remain.

Related errors


AI-assisted analysis of BabylonJS/Babylon.js@0592b347b8 (2026-08-30). Data as JSON: /api/errors/74f7813b1b0d4f36. Report an issue: GitHub.