View Full Version : Max Hair Fur Help

11 November 2010, 10:52 PM
Hello Everyone!...Well I've been looking in the max script help files for an answer to this problem im running into. What I'm wanting to do is change a property in multiple selected objects at once. I'm a begginer to scripting but I've been trying to learn as I go. I wanna change the hair and fur modifier properties to my selected objects.

For example I can get this to work on individual objects.
$.modifiers[#Hair_and_Fur].MaterialSpecular = 30

But adding more than that to a selection gives this error
-- Unknown property: "modifiers" in $selection

The max help files give an example to use this for certain situations to filter out the properties.
for i in selection where hasProperty i "radius" do i.radius = 10

But Im having trouble finding any examples to go from for the Hair and Fur Modifier. Any help is appreciated.


11 November 2010, 05:41 PM
for i in selection where i.modifiers[#Hair_and_Fur]!=undefined do
i.modifiers[#Hair_and_Fur].MaterialSpecular = 30
-- you can replace selection with an array of nodes



11 November 2010, 05:45 PM
Thank you lutteral!...This is exactly what I needed....:)


3rd Dimentia
11 November 2010, 04:50 AM
Also, no need to re-invent the wheel:
Will let you modify many different things 'en masse' in max including modifiers,materials,controllers and will let you assign random values across objects' settings. It's the SHIZZ!

11 November 2010, 06:24 AM
Cool 3rd Dimentia. Thanks for the link!.I'll be sure to use that one too..Yeah I was pretty sure there was something out there already. It just helps me to learn max script better by trying to create them from scratch.

CGTalk Moderation
11 November 2010, 06:24 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.