[BUG] USD Export with inverted layer hierarchy

sample.3dm (50.0 KB)
sample.usdz (1.9 KB)

Here is a simple cube. If exported to USD, the exported structure has the deepest layers first. I am not sure if this ever worked properly.

Hi @juaum ,

I’m trying to reproduce this issue to file a bug report for the developers. Can you tell me where you open/import the usd file to see the inverted layers? I see this in Blender with your file…


Thanks

def Xform "Rhino"
{
    def Xform "Geometry"
    {
        def Xform "Layer_01B"
        {
            def Xform "Layer_01"
            {
                def Mesh "mesh0"
                {
                    float3[] extent = [(-1, 0, -1), (0, 1, 0)]
                    int[] faceVertexCounts = [4, 4, 4, 4, 3, 3, 3, 3]
                    int[] faceVertexIndices = [0, 2, 3, 1, 4, 6, 7, 5, 8, 10, 11, 9, 12, 14, 15, 13, 17, 16, 19, 19, 18, 17, 21, 23, 20, 23, 21, 22]
                    normal3f[] normals = [(-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 1, 0)]
                    point3f[] points = [(-1, 0, -1), (-1, 1, -1), (-1, 0, 0), (-1, 1, 0), (-1, 0, 0), (-1, 1, 0), (0, 0, 0), (0, 1, 0), (0, 0, 0), (0, 1, 0), (0, 0, -1), (0, 1, -1), (0, 0, -1), (0, 1, -1), (-1, 0, -1), (-1, 1, -1), (-1, 0, -1), (-1, 0, 0), (0, 0, 0), (0, 0, -1), (-1, 1, -1), (-1, 1, 0), (0, 1, 0), (0, 1, -1)]
                    texCoord2f[] primvars:st1 = [(0, 0), (0, 0.6666662), (0.25, 0), (0.25, 0.6666662), (0.25, 0), (0.25, 0.6666662), (0.5, 0), (0.5, 0.6666662), (0.5, 0), (0.5, 0.6666662), (0.75, 0), (0.75, 0.6666662), (0.75, 0), (0.75, 0.6666662), (1, 0), (1, 0.6666662), (0, 1), (0.25, 1), (0.25, 0.66666687), (0, 0.66666687), (0.75, 0.66666687), (1, 0.66666687), (1, 1), (0.75, 1)] (
                        interpolation = "vertex"
                    )
                }
            }
        }
    }

I am using the normal export, the import in Blender seems to also not work, since once you look to the Rhino screenshot the cube is in Layer_01B which is a child of Layer_01. In the USD file I uploaded (and above this text) you can see thatt Layer_01 is a child of Layer_01B.

(I should have named them foo and bar)

Also, just tested in Bledner and when importing it, you need to uncheck Visible Primitives Only otherwise it does not import Layer_01, no idea why that one is skipped but the others stay intact.

Thanks @juaum , I filed this as https://mcneel.myjetbrains.com/youtrack/issue/RH-98682 for the developers.

Thank you @BrianJ ,

A USDZ file is zipped, you have to unzip it to be able to open the USDA inside, sorry for the confusion. Here is the file inside the other. sample.usda (1.7 KB)

Also, went back to Blender, and found the culprit setting, this was merging the last layer (which shoudn’t be in the first place) to the object, somewhat hiding the reported problem. I can create a less troublemsome sample file if you wish. (This should only happen when there is precisely only one file in the layer…) :

@Alain Just saw the fix in the tracker, thanks! Eager for the fix to come out!