Automate Inherit from Reference
#1
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
  Reply
#2
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.
  Reply
#3
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
  Reply
#4
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).
  Reply
#5
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  


)
  Reply


Forum Jump: