Component Material "Copy Exclusive"?

   1062   1   2
User Avatar
Member
39 posts
Joined: 2月 2017
Offline
In my own asset prep HDA I reference in a large library of materials, loop through geometry making assignments, and then flatten only those assigned materials into a new mtl layer for the asset being processed.

I'm trying to replicate that behavior with the component builder but I'm stuck -- if I reference in a large library of materials and assign only one of them, then set the "Second Input Behavior" parm on the Component Material to "Copy Exclusive" I would expect only the assigned material to be included in the final HDA.

Unfortunately every option in that dropdown seems to result in the same thing -- all materials are copied to the final asset definition. I've rigged up the simplest possible example and still get that behavior:



Based on notes inside the Component Material HDA it looks like there is a hack to make this work only on export, but even the exported files still contain all materials, not just those assigned:


There is a Restructure Scene Graph node called "remove_unused_materials" in the HDA that resolves to the correct materials-to-be-removed but doesn't actually do anything to the resulting scene graph. Is this a bug with the Restructure Scene Graph node? Or is there more going on?


I have found the Restructure Scene Graph node to be generally pretty unreliable so it wouldn't surprise me if that's the culprit, but I'd be even less surprised to learn this is user error. Does anyone have experience getting this feature to work?

Attachments:
pcoip_client_X2CGzu01rO.png (94.6 KB)
pcoip_client_SmQKStzRSE.png (74.3 KB)
pcoip_client_TTZbWJPlry.png (134.2 KB)
pcoip_client_gJ4J4gyYSe.png (191.2 KB)

User Avatar
スタッフ
4169 posts
Joined: 9月 2007
Offline
Yes there seems to be a bug here; could you log it, so it doesn't get forgotten/lost?

https://www.sidefx.com/bugs/submit/
[www.sidefx.com]

Thanks!
I'm o.d.d.
  • Quick Links