|Maxscript: changing modifier values for selected objects.|
I've ran into a bit of an issue here..
I'll explain by example.. (and probably what I'm doing wrong)
For one object:
addmodifier $ (Unwrap_UVW())
This will apply a Unwrap UVW modifier on the selected object and set the Map Channel to 1.
(it defaults the map channel to 3)
So when I want to apply this to multiple objects:
for c in (selection as array) do (
addmodifier c (Unwrap_UVW())
This will apply the modifier to each object, however, it will not change the map channel.
Apply the last example code to one object and everything will work. Two or more and it will not change the map channel.
So my question is.. how to I get the code to read and apply 'every' line of code to each object?
read 1525 times
10/31/2012 2:50:42 AM (last edit: 10/31/2012 2:50:42 AM)
Im no scripter but I was just thinking this might help before one of the gurus get here.
download a script called soulburnscripts > use the modifiers utility panel > open the max listener and use the script to apply your modifier to your multiple objects and channel data. You can then read the script. Hope that helps in the mean time.
edit: looks like I can remove a channel but not add one?...
read 1520 times
10/31/2012 3:15:43 AM (last edit: 10/31/2012 3:18:39 AM)
I swear you're missing an open bracket there.
read 1511 times
10/31/2012 4:40:26 AM (last edit: 10/31/2012 4:40:26 AM)
What version of max are you using?
In max 2012, it works fine for me. Also map channel defaults to 1, not 3.
Tried in old max 9. Works fine there as well.
read 1506 times
10/31/2012 8:37:48 AM (last edit: 10/31/2012 8:46:18 AM)
I'm using Max 2010 SP1 x64.
So the good news is the code is correct... right?
It just happens to work correctly on other versions...
Thank you for checking. I was wracking my brain trying to figure out why it wasn't working.
I tried putting it into a function, going through selection[c] forwards and backwards, looking into mapped functions..
read 1485 times
10/31/2012 5:30:05 PM (last edit: 10/31/2012 5:30:05 PM)
Maybe it'll work if you change it to "for c in selection do ( ... )"?
read 1470 times
10/31/2012 6:40:17 PM (last edit: 10/31/2012 6:40:17 PM)