BabylonJS/Babylon.js · error

BabylonScenePathToObjectConverter: property "${propertyName}

Error message

BabylonScenePathToObjectConverter: property "${propertyName}" is not registered on ${collectionName} (path "${path}").

What it means

The property segment after the id must match a registered leaf accessor in the collection's __array__ descriptor table (values that are plain booleans are flags, not accessors, and are also rejected). If the requested property was never registered on that collection, the library throws so callers don't get an undefined accessor that would fail later in a more confusing way.

Source

Thrown at packages/dev/loaders/src/glTF/2.0/Extensions/babylonScenePathToObjectConverter.ts:189

        // The accessor's `get` and `getTarget` both return the instance.
        if (parts.length === 2) {
            return {
                object: instance,
                info: this._buildIdentityAccessor(instance),
            };
        }

        // Walk the leaf descriptors for the requested property path. We keep this
        // very simple right now: only one segment after the id is supported, which
        // covers every property the initial leaves expose. Nested paths can be
        // added later by extending the walker.
        if (parts.length > 3) {
            throw new Error(`BabylonScenePathToObjectConverter: nested property paths are not yet supported (path "${path}").`);
        }
        const propertyName = parts[2];
        const leaf = (collection.__array__ as Record<string, IObjectAccessor<any, any, any> | boolean | undefined>)[propertyName];
        if (!leaf || typeof leaf === "boolean") {
            throw new Error(`BabylonScenePathToObjectConverter: property "${propertyName}" is not registered on ${collectionName} (path "${path}").`);
        }

        return {
            object: instance,
            info: leaf as AnyAccessor,
        };
    }

    private _getCollectionArray(collectionName: string): readonly any[] {
        switch (collectionName) {
            case "transformNodes":
                return this._scene.transformNodes;
            case "meshes":
                return this._scene.meshes;
            case "materials":
                return this._scene.materials;
            default:
                return [];

View on GitHub (pinned to 0592b347b8)

Solutions

  1. Use a property that is registered on that collection — inspect the collection's __array__ leaf descriptors for the exact supported names.
  2. Fix typos/casing in the property segment.
  3. If the property must be supported, register an accessor leaf for it on the collection (or upgrade to a runtime version that registers it).

Example fix

// before
converter.convert(`${prefix}transformNodes/42/rotationQuaternion`); // not registered
// after
converter.convert(`${prefix}transformNodes/42/rotation`);
Defensive patterns

Strategy: validation

Validate before calling

const leaf = collection.__array__[propertyName];
if (!leaf || typeof leaf === "boolean") {
  throw new Error(`Property not registered on ${collectionName}: ${propertyName}`);
}
converter.convert(path);

Type guard

function isRegisteredLeaf(collection: { __array__: Record<string, unknown> }, name: string): boolean {
  const leaf = collection.__array__[name];
  return leaf !== undefined && leaf !== null && typeof leaf !== "boolean";
}

Try / catch

try {
  const info = converter.convert(path);
} catch (e) {
  // unregistered property: check collection.__array__ keys and correct the path
}

Prevention

When it happens

Trigger: convert() called with a property name the collection doesn't expose, e.g. ".../transformNodes/42/rotationQuaternion" when only "position"/"rotation"/"scaling" etc. are registered, or hitting a boolean descriptor entry like "isVisible" in __array__.

Common situations: Typos or wrong casing in property names; assuming every Babylon property is animatable/registered when only a curated leaf set is; using a property valid on one collection (meshes) on another (transformNodes); newer properties not present in the runtime version that registered the leaves.

Related errors


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