Call "Align Vertical/Horizontal In Place" in MaxScript

Call "Align Vertical/Horizontal In Place" in MaxScript

t_scottSASUE
Observer Observer
116 Views
1 Reply
Message 1 of 2

Call "Align Vertical/Horizontal In Place" in MaxScript

t_scottSASUE
Observer
Observer

Wondering if it is possible to call the equivalent functionality to the UVW Editor's "Align Vertical/Horizontal In Place" buttons in a MaxScript. I can see "Align Vertical/Horizontal to Pivot"  functions are `unwrap.align true/false`, but not for the equivalent of the "In Place" versions. 

 

Cheers

0 Likes
117 Views
1 Reply
Reply (1)
Message 2 of 2

denisT.MaxDoctor
Advisor
Advisor

As I understand it, "align in place" is the same as "align to pivot in the center of selection". 
So, we have:
 

(
	m = $.modifiers[unwrap_uvw]
	p = m.getpivotoffset()
	m.setpivotoffset [0,0,0]
	windows.processPostedMessages() -- or some better way to force an update
	m.alignByPivotHorizontal()
	m.setpivotoffset p
)
0 Likes