tyFlow Forum
Automate Inherit from Reference - Printable Version

+- tyFlow Forum (https://forum.tyflow.com)
+-- Forum: tyFlow Discussion (https://forum.tyflow.com/forum-1.html)
+--- Forum: General Discussion (https://forum.tyflow.com/forum-2.html)
+--- Thread: Automate Inherit from Reference (/thread-2389.html)



Automate Inherit from Reference - Rooooij3d - 05-11-2021

Hi all, 

I have a huge amount of reference nodes in my shape operator and I would like to set all their materials to "Inherit from reference". Manually this would take a fairly long time especially since I probably have to redo it several times ( testfase you know how it goes :] ). 

I tried to get a maxscript going to help me with this but I have some trouble figuring out how to select / loop through the nodes. 

Is there a good way to do this ? 

R


RE: Automate Inherit from Reference - d4rk3lf - 05-11-2021

Try this...
Make a group with every object you are using.
Then open group.
Then in the shape operator, click and pick box border of the opened group.
And of course, check inherit material.

It should work with Vray, and watch out not to assign any mat to Tyflow.
Add mesh operator - render instances.


RE: Automate Inherit from Reference - Rooooij3d - 05-12-2021

No luck unfortunately, particles are not receiving a material. 

I am running a slightly older version of the beta so that might be why this isn't working for me. 
I have also not looked into the .mat library workflow, might do that later. 

R


RE: Automate Inherit from Reference - tyFlow - 05-12-2021

You can iterate Shape operator properties from MXS (read or change) by looping through the exposed "_tab" variables. For instance materials, it's "materialMode_tab" (to enable inheritance) and "material_tab" (for the materials themselves).


RE: Automate Inherit from Reference - Rooooij3d - 05-17-2021

Thanks! got it to work now. 

I will just leave it here for other people that have to set a huge mount of particles to " inherit from reference " select the tyflow object and run this script : 
(very basic script so it assumes the event and shape names are default) 



for i in selection do ( 

x = i.Event_001.shape.materialMode_tab.count

for counter= 1 to x do ( 
i.Event_001.shape.materialMode_tab[counter] = 3  


)