JSONLoader binds duplicate of all geometry to first bone

It looks like when using the JSONLoader in r74, the first named bone in an exported Maya scene gets a duplicate of all the geometry.

Here’s a JSFiddle that shows my current code and the issue.

In this example I have 2 boxes. Each box is bound to a single bone, and each of those bones has keyframes that animate the position and rotation. There is another bone that has no geometry bound to it, and has keyframes that make no change to its position or rotation.

The stationary bone is called “joint1” in Maya. The bones that actually have geometry bound to them are called “joint2” and “joint3”. If I were to rename the stationary bone “joint4” the result would be a duplicate of both boxes attached to the currently animating “joint2”.

Author: Fantashit

2 thoughts on “JSONLoader binds duplicate of all geometry to first bone

  1. This is still an issue, but I’ve found an ok workaround.

    Since the duplicated geometry always gets assigned the default lambert shader that is always included when using the Maya Exporter. As long as all the objects that are intended to be kept have a material other than the default in Maya, you can insert

    mesh.material.materials[0].visible = false;

    into the loader code which will make any material with the default lambert invisible.

    Here’s a fiddle

Comments are closed.