Forum Groups
  All forums
    Help & Feedback
      Questions
      Work in progress
      Finished Art
      Non-Max related
    Community
      Offtopic
      News
    Hardware
    Photography


Featured Threads
  inspiration alert!!!
(37 replies)
  Indespensible MaxScripts, Plugins and 3rd Party Tools
(37 replies)
  The allmighty FREE Resources Thread !
(17 replies)
  spam alert!!!
(4886 replies)
  Maxforums member photo gallery index
(114 replies)
  Maxforums Member Tutorials
(89 replies)
  three cheers to maxforums...
(240 replies)
  101 Things you didnt know in Max...
(198 replies)
  A Face tutorial from MDB101 :D
(95 replies)
  Maxforums.org Members Gallery
(516 replies)
  SON OF POST YOURSELF
(637 replies)
  Dub's Maxscript Tutorial Index
(119 replies)

Maxunderground news unavailable

Maxscript: changing modifier values for selected objects.
show user profile  Herbie
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())
$.unwrap_uvw.unwrap.setMapChannel 1

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())
c.unwrap_uvw.unwrap.setMapChannel 1
)

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)
show user profile  donvella
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)
show user profile  herfst1
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)
show user profile  Garp
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)
show user profile  Herbie
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..

Crazy stuff.
read 1485 times
10/31/2012 5:30:05 PM (last edit: 10/31/2012 5:30:05 PM)
show user profile  Mr.Burns
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)
#Maxforums IRC
Open chat window


Support Maxforums.org