AL_USDMaya icon indicating copy to clipboard operation
AL_USDMaya copied to clipboard

Instanced prims breaking selection

Open JasonGilholme opened this issue 7 years ago • 3 comments

Hi,

I'm getting some incorrect results when using the plug with the following arrangement of usd files. I've modelled this structure on information from Sebastian on the usd-interest google group so it should be sound.

I've included the contents of some usd files that I'm using to test with. When I load the shot_layout.usda file, it will always select RockA_01 no matter which one I select. If I set instanceable to false in the component.usda file it works as expected.

Thanks Jason

// shot_layout.usda -- instancing 2 rocks in a shot layout

#usda 1.0
(
    defaultPrim = "world"
)
def Xform "World" {
    def Xform "RockA_01" (
        add references = @./component.usda@
    )
    {
        double3 xformOp:translate = (5, 5, 5)
        uniform token[] xformOpOrder = ["xformOp:translate"]
    }

    def Xform "RockA_02" (
        add references = @./component.usda@
    )
    {
        double3 xformOp:translate = (-5, -5, -5)
        uniform token[] xformOpOrder = ["xformOp:translate"]
    }
}
// component.usda  --  The interface file for the rock component
#usda 1.0
(
    defaultPrim = "RockA"
)

def Xform "RockA" (
    assetInfo = {
        asset identifier = ""
        string name = ""
    }

    kind = "component"
    instanceable = true

    payload = @./payload.usda@

    variants = {
        string LevelOfDetail = "proxy"
    }
    add variantSets = ["LevelOfDetail"]
)
{
    variantSet "LevelOfDetail" = {
        "high" {}
        "medium" {}
        "low" {}
        "proxy" {}
        "bbox" {}
    }
}
// payload.usda -- mesh data that makes up the rock
#usda 1.0
(
    defaultPrim = "RockA"
)

over "RockA" (
    variants = {
        string LevelOfDetail = "proxy"
    }
    add variantSets = ["LevelOfDetail"]
)
{
    variantSet "LevelOfDetail" = {

        "high" {
            def Xform "geom"
            {
                def Sphere "Mesh01" () {}
                def Sphere "Mesh02" () {}
            }
        }

        "medium" {
            def Xform "geom"
            {
                def Sphere "Mesh01" () {}
                def Sphere"Mesh02" () {}
            }
        }

        "low" {
            def Xform "geom"
            {
                def Sphere "Mesh01" () {}
                def Sphere "Mesh02" () {}
            }
        }

        "proxy" {
            def Xform "geom"
            {
                def Sphere "Mesh01" () {}
                def Sphere "Mesh02" () {}
            }
        }

        "bbox" {
            def Xform "geom"
            {
                def Sphere "Mesh01" () {}
                def Sphere "Mesh02" () {}
            }
        }
    }
}

JasonGilholme avatar Sep 12 '17 23:09 JasonGilholme

Hi Jason, this is a known issue which I thought we had documented somewhere - but maybe not. We will definitely look into this in the next few days, and try and work out what's involved in fixing. Will update as soon as we can. Thanks!

murphyeoin avatar Sep 18 '17 08:09 murphyeoin

Thanks Eoin. It's looking great so far.

Apologies if you've already documented this and I've missed it.

JasonGilholme avatar Sep 19 '17 04:09 JasonGilholme

Hi Jason, I've found the cause of the bug, and have a fix in internal review. It should be on the public branch in a day or two.

robthebloke avatar Sep 19 '17 05:09 robthebloke