Hello-- we wanted to get some clarification on the following behavior. There are two layers in this example.
component.usda
#usda 1.0
class "class_a" {}
def "child" (inherits = </class_a>) {}
assembly.usda
#usda 1.0
class "class_a" {}
class "class_b" {}
def "append" (
append inherits = </class_b>
references = @./component.usda@</child>) {}
def "explicit_remove" (
inherits = </class_b>
references = @./component.usda@</child>) {}
def "explicit_order" (
inherits = [</class_a>, </class_b>]
references = @./component.usda@</child>) {}
If I open the assembly.usda in python as stage s
, I get the following results.
>>> s.GetPrimAtPath('/append').GetPrimStack()
[Sdf.Find('assembly.usda', '/append'), Sdf.Find('assembly.usda', '/class_b'), Sdf.Find('assembly.usda', '/class_a'), Sdf.Find('component.usda', '/child'), Sdf.Find('component.usda', '/class_a')]
Even though we use append
, the opinions in /class_b
are stronger than those in class_a
on the assembly.usda
layer.
>>> s.GetPrimAtPath('/explicit_remove').GetPrimStack()
[Sdf.Find('assembly.usda', '/explicit_remove'), Sdf.Find('assembly.usda', '/class_b'), Sdf.Find('assembly.usda', '/class_a'), Sdf.Find('component.usda', '/child'), Sdf.Find('component.usda', '/class_a')]
Even though we explicitly set the inherits
opinion to /class_b
, /class_a
still contributes opinions from assembly.usda
.
>>> s.GetPrimAtPath('/explicit_order').GetPrimStack()
[Sdf.Find('assembly.usda', '/explicit_order'), Sdf.Find('assembly.usda', '/class_a'), Sdf.Find('assembly.usda', '/class_b'), Sdf.Find('component.usda', '/child'), Sdf.Find('component.usda', '/class_a')]
However, if we include class_a
and class_b
explicitly, the order changes.
We’re trying to reason about this-- is class_a
just taking on the strength order of its referencing arc in the prim stack (which is always weaker than inherits) unless explicitly specified?