Notifications
Clear all

[Closed] Add UVW for 500 objects

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 <<
 
2 Replies
 3ak

addModToSelection probably fit uvwmap gizmo to all selection.
try this:

(
m = uvwmap() 
m.maptype = 4
for obj in $selection do addmodifier obj (copy m)
)	
1 Reply
(@holzi)
Joined: 11 months ago

Posts: 0

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!