How can you apply the mod individually?

You can select multiple objects and apply a material to them. How ever apply a UVWmap modifier to the same selected objects the mod is applied to the group as a whole not independently.

This applies a cylindrical UVWmap to one object.

macros.run "Modifiers" "UVWmap"
$.modifiers[#UVW_Mapping].maptype = 1

How could you apply the mod to a select group individually?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
othoap's picture

Yes But

Tassel - thanks. BTW I loved "Back to the start" Every one go check out tassels website and the short "Back to the start"

Running your script puts uvwmaps on all the selected objects but dose not "Fit" them to the object. I removed the maptype l,h,w but it then put a uvwmap on all selected objects at the size of the whole group.

I looked in maxscript docs for a "Fit" function with no luck.

Wouldn't the dimensions of each selected node need to be found then applied to each of there l,w,h.
$Box01.modifiers[#UVW_Mapping].length = 39.0483
$Box01.modifiers[#UVW_Mapping].width = 83.6749
$Box01.modifiers[#UVW_Mapping].height = 94.8316

I think this is part of the puzzle http://www.scriptspot.com/bobo/mxs9/uvwgizmofit/index.html

tassel's picture

Are you out afther something

Are you out afther something like this?

try (destroyDialog roUVW) catch()
 
-------------------------------------------------------------------------------------------------------------------------------
-- Selects Objects With Missing UV's.
-------------------------------------------------------------------------------------------------------------------------------
rollout roUVW  "LazyUV's" 
(	
	group "Lazy UV's"
	(
		button btn_objuv "Select Object with Missing UV's" height:22 align:#center
 
		checkbox cbAsInstance "Make Instance" checked:true height:22 align:#left across:2
		button btnUVW "Add UVW"  height:22 align:#right 
	)
 
	on btn_objuv pressed do
	(
		clearSelection()
		for a in geometry do
		(
			TotalUVNumVerts = 0
			for b in 1 to (meshop.getNumMaps a.mesh) do
			(
				UVFound  = try(meshop.getNumMapVerts a.mesh b)
				catch(results = 0)
				TotalUVNumVerts += UVFound
			)
			if (TotalUVNumVerts == 0) then selectmore a
		)
	)--end on
 
-------------------------------------------------------------------------------------------------------------------------------
-- add uvw's to selectet objects
-------------------------------------------------------------------------------------------------------------------------------
 
on btnUVW pressed do
	(
		if cbAsInstance.checked then
		(
			local uvwMapModifier = uvwMap maptype:4 length:4000 width:4000 height:4000 
			select (for obj in selection where superClassOf obj == geometryClass collect obj) 
			modPanel.addModToSelection uvwMapModifier ui:on
		)
		else
			for obj in selection where superClassOf obj == geometryClass do
				addModifier obj (uvwMap maptype:4 length:4000 width:4000 height:4000)
	)--end on
)--end of rollout
 
createDialog roUVW  200 85

/ Raymond

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.