Instanceables Prototype Not What I Expected?

So I’m importing a file that looks a bit like this:

#usda 1.0
(
    defaultPrim = "model"
)
def Xform "model" (
   prepend apiSchemas = ["SomeCustomAPI"]
   instanceables = true
   prepend references = [
      @something_meshes.usda@,
      @something_materials.usda@
   ]
)
{
   # Couple of attributes here

   def Xform "root" (prepend apiSchemas = ["SomeOtherCustomAPI", "PhysicsMassAPI"])
   {
      over "some_meshy_mesh"
      {
         double3 xformOp:translate = (1, 0, 0)
         uniform token[] xformOpOrder = ["xformOp:translate"]
      }
      def Cube "a_nice_cube"
      {
      }
   }
}
)

This is then referenced in a scene.usda file. The meshes and materials are effectively duplicate tree’s/layers with the mesh data and materials respectively.

Unfortunately if I do a stage->Export and look at the prototype. None of the attributes show up in the prototype. Additionally Cube does not show up. However, the prims from meshes and materials show up. This seemed unintuitive to me and looking for some explanation or if I did something wrong here.

I did find that if I simply wrap the “model” in a parent prim that is instanceable instead of “model” instanceable. That will work. But in other bits of code we do searches for instanceables with “SomeCustomAPI”. So it would have been useful to have them together.

Hi @Andaharoo , you might find the Scenegraph instancing doc, in particular, this section and the following ones, useful.

The reason we chose this representation is that the prototype is not a “thing of its own” in the scene, and we wanted to ensure that any code processing the scene understands that the properties and metadata of the “root prim” of each instance must be taken from each instance. There are “the way composition and instancing works” reasons for this also (e.g. it is actually not well-defined, in general, what the “root prim properties” should be, for any prototype derived from native instancing).