is there a way to override part of attributes?

   1076   5   0
User Avatar
Member
303 posts
Joined: May 2007
Offline
Hi,when use sublayer or merge node to merge to usd file together.the two usd can be composited,and the second usd's attributes will override the first one.
is there a way to chose any attributes or any objects to override but not everything?
I whish my explanation is clear.for example there are a.usd and b.usd,both have /geo1 and /geo2 objects,they have different transform and materials from a.usd and b.usd.
when I merge b.usd over a.usd,is it possiable to keep /geo1's transform from a.usd, and use /geo2's material from b.usd?
https://vimeo.com/user3971456/videos [vimeo.com]
User Avatar
Member
262 posts
Joined: Nov. 2013
Offline
No that's not possible. The composition engine has a set of generalized rules, which doesn't involve inspecting the names of particular attributes (which would probably be quite complicated and therefore likely quite time consuming).
User Avatar
Member
122 posts
Joined: June 2019
Offline
I think in this case you can block properties on Edit Properties LOP. You just need to do that before you bring a sublayer. Check the minimal example in the attachement.

Edit: well, it's not quite working, it just resets property to default value on resolution. Interesting, intuitively I thought it just skip it

Edited by elovikov - May 9, 2023 13:55:42

Attachments:
prop-block.hiplc (86.8 KB)
props.png (48.2 KB)

User Avatar
Member
303 posts
Joined: May 2007
Offline
ok,thankyou
https://vimeo.com/user3971456/videos [vimeo.com]
User Avatar
Staff
4400 posts
Joined: July 2005
Online
@elovikov even an opinion to "block" an attribute is an opinion that gets composed with the normal strength ordering rules. To accomplish what is being asked here, you'd actually have to make sure that a.usd and b.usd only contain opinions about those attributes for which they are each responsible.
User Avatar
Member
122 posts
Joined: June 2019
Offline
Thanks! I see now. I also noticed that I can remove properties in editable layer on Python LOP via UsdPrim.RemoveProperty. Just wondering if it's achievable on any "destructive" nodes like Stage Manager without python?
  • Quick Links