ScriptSpot

Forum topic · General Scripting

Accessing unwrap UVW modifier methods

By zarko · 2013-05-17

Description

Hello,
I've got a problem calling some unwrap UVW's methods.
First I'm assigning a unwrap UVW modifier to a selection, then I select just a few objects that are part of that selection. Then I select all the UV shells of those few objects (I can do this, because the unwrap modifier is instanced on all the objects in the selection). And then I need to access the pivot methods and the and move methods of the unwrap modifier, but only on the selected UV shells (of the few selected objects).

What I actually need is to select only the UV shells that belong to a certain objects inside a selection, and then move them in the UV space.

I think that the images in the attachment will make my request clearer.


max select all
max modify mode
unwrap = unwrap_uvw()
modpanel.addmodtoselection (unwrap)

TwoObjs = #($Cylinder001,$Sphere001)
select TwoObjs
subobjectlevel = 3
max select all

pointA = TwoObjs.unwrap_uvw.getSelCenter() 
TwoObjs.unwrap_uvw.moveSelected [3,2,0]
Attachments
Comments (2)

Thanks

zarko · 2013-05-18

Thank you again for your help Kostadin :)

( max select all max modify

miauu · 2013-05-17


(
	max select all
	max modify mode
	uv = unwrap_uvw()
	modpanel.addmodtoselection (uv)
	 
	TwoObjs = #($Cylinder001,$Sphere001)
	select TwoObjs
	subobjectlevel = 3
	max select all
	 
	pointA = uv.getSelCenter() 
	uv.moveSelected [3,2,0]
)