Access material binding attribute in SopModify LOP

   1432   2   0
User Avatar
Member
171 posts
Joined: 1月 2019
オフライン
Hi,

I'm using a SOP modify to update some UVs and I've got materials assigned to multiple different geo prims, in the sop modify I want to process them based on their assigned material names.

I just can't seem to transfer/promote that attribute/primvar so I can access it inside the SOP modify.

Is there anyway to achieve this?

David.
User Avatar
Member
171 posts
Joined: 1月 2019
オフライン
After a bit more research, I think using usd_attrib in a prim wrangle gets me close, it works for other prim vars but not for material bindings. I feel like I've not got the syntax quite right.

string materials[] = usd_attrib(s@usdpath, s@usdprimpath, "material:binding");
s[]@mat=materials;
User Avatar
スタッフ
4560 posts
Joined: 7月 2005
オフライン
You might want to consider using usd_boundmaterialpath instead. Getting the "material:binding" value directly from each prim is only one way that USD allows for binding of materials.
  • Quick Links