Internal References and Inactive Prims

We recently noticed that internal references can target child prims of an inactive prim. After some thinking/poking, the it sort of makes sense, even if it’s counter-intuitive. As a result, we were discussing whether it would be safe to allow users to deactivate the “Prototypes” child of instancer setups, and thus lighten scenes a bit. But if this is unintended behavior that will likely be fixed, then we’d shy away from building tools around it.

Is this approach of deactivating the parent “Prototypes” prim advisable? Or is this dangerous behavior, or even a bug, that should be avoided?

Thanks!

def Xform "MyObjects" (
    kind = "group"
)
{
    def Scope "Prototypes" (
        active = false
        kind = "group"
    )
    {
        token visibility = "invisible"

        def Xform "Ball" (
            kind = "component"
        )
        {
            def Sphere "sphere_1"
            {
            }
        }
    }

    def "Instance0" (
        instanceable = true
        prepend references = </MyObjects/Prototypes/Ball>
    )
    {
    }

    def "Instance1" (
        instanceable = true
        prepend references = </MyObjects/Prototypes/Ball>
    )
    {
    }

    def "Instance2" (
        instanceable = true
        prepend references = </MyObjects/Prototypes/Ball>
    )
    {
    }
}

Yep, that will always be valid and safe. The caveats are:

  1. It’s safe for internal references, but not relationships, so if MyObjects were a PointInstancer, it would not work
  2. I think that often when people populate their prototypes onto the main stage, it is so that they can provide users “easy” access to editing the prototypes even in a DCC that doesn’t have strong support for class-editing or other more advanced USD features. You take that away by deactivating all the protos.
2 Likes

@chris.rydalch Want to capture the different scenarios brought up here as new issues for Asset WG?

Thanks for the follow-up spiff. Good to know it will work, within certain limitations of course.

Want to capture the different scenarios brought up here as new issues for Asset WG?

@mati-nvidia I’m happy to bring it up at the next meeting I can attend; but I’m not sure that it’s necessarily an issue for the WG to tackle. For certain scenarios, this made some scenes a bit easier for studios/renderers to tackle, but we didn’t want to continue recommending something that was actually dangerous/unsafe.

1 Like