PDA

View Full Version : Add UVW for 500 objects


Holzi
03-13-2012, 04:07 PM
Hi Guys,

I need a little help with a rather simple macro:
I have >500 elements and need to add an individual uvw map modifier for each of them. after adding, I need to change it to Box mapping. Normally that should give me a fitted UVW-box for each of the boxes. I tried using the macro recorder, however I get an error.

here the script:

macroScript Macro10
category:"DragAndDrop"
toolTip:""
(
modPanel.addModToSelection (Uvwmap ()) ui:on
$.modifiers[#UVW_Mapping].maptype = 4
)


and the error message:

>> MAXScript MacroScript Error Exception: -- Unknown property: "modifiers" in $selection <<

3ak
03-13-2012, 04:27 PM
addModToSelection probably fit uvwmap gizmo to all selection.
try this:
(
m = uvwmap()
m.maptype = 4
for obj in $selection do addmodifier obj (copy m)
)

Holzi
03-14-2012, 08:39 AM
addModToSelection probably fit uvwmap gizmo to all selection.
try this:
(
m = uvwmap()
m.maptype = 4
for obj in $selection do addmodifier obj (copy m)
)

That works, but it gives me a uvw-box with 1m x 1m x 1m instead of a 'fitted' one. Is there some sort of for obj, in $ do 'click "fit" ?


Got it! Bodos script did it!

CGTalk Moderation
03-14-2012, 08:39 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.