検索 - User list
Full Version: Specializes composition arc question ?
Root » Solaris and Karma » Specializes composition arc question ?
jerry7
Hi,

I test the Specializes composition arc. I reference the box inline code to stage.
I expect the size will keep 1.0, but the result is 4.0 ( same as inherits arc ).
Where did I make a wrong?

Thanks for any tips!

box inline:
#usda 1.0
class Cube "_class_box" {
double size = 1.0
}

def Xform "box"
{
def "box_special" ( specializes = </_class_box>)
{

}
}

stage inline:
#usda 1.0

class "_class_box" {
double size = 4.0
color3f[] primvars:displayColor = [(1, 0, 0)]
}
mtucker
I think you are misunderstanding the composition happening here. The /_class_box prim is the only thing you are overriding here, and you are doing so with a sublayer arc. So /_class_box has a size of 4. /box specializes from this prim, so it gets the value 4. If you put the “size=1” opinion inside /box or inside a file referenced by /box, then the 4.0 value would not override the 1.0 value. The only scenario in which inherit and specialize behave differently here is if the size=1.0 is coming in through a reference at /box, in which case the inherit will be stronger than the opinion in the reference, whereas a specialize will be weaker than the opinion inside the reference.

I may have messed that up somewhat, because this stuff can get complicated, but I think I'm describing things accurately there.
jerry7
Thanks a lot!

I will study these concepts more.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB