Need to mass edit unwrap modifiers.

Hi.

I have no background in scripting besides copy past and creating Frankenstein like "scripts" that sometimes work.
I have a massive tower modeled with several unwrap modifiers on channel 1 and need to change these to channel 2. The problem I'm having is that all the scripts I found to do this add some type of modifier and break instances. I was hoping that Modifier Zorb could do this but it doesn't.
Researching a bit and was able to do this:
$.modifiers[#unwrap_uvw].unwrap.setMapChannel 2
Although this only works for one selected object.
Is there a way to use this command to all selected objects with an unwrap modifier applied?

Thanks in advance for any help.

David

Comments

Comment viewing options

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

Hi Miauu, Thank you ever so

Hi Miauu, Thank you ever so much for your help, this saves hours of work.
Keep up the great work with Miauu's scripts!!!

miauu's picture

.

Select the objects and execute this:

(	
	selObjsArr = selection as array
	for o in selObjsArr where o.modifiers.count != 0 do
	(
		if (classof o.modifiers[1]) == Unwrap_UVW do
		(
			o.modifiers[#unwrap_uvw].unwrap.setMapChannel 2
		)
	)
)

Comment viewing options

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