ScriptSpot

Forum topic · Scripts Wanted

Need to mass edit unwrap modifiers.

By David_Lacerda · 2019-10-16

Description

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 (2)

David_Lacerda · 2019-10-28

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 · 2019-10-24

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
		)
	)
)