"Unfold strip from loop" maxscript function?

"Unfold strip from loop" maxscript function?

andocombo
Explorer Explorer
1,997 Views
4 Replies
Message 1 of 5

"Unfold strip from loop" maxscript function?

andocombo
Explorer
Explorer

Hi all, new to posting on this forum...  Is there a function that does the same as pressing the "unfold strip from loop" button on the unwrap_uvw modifier panel?  I have looked at the help file for a bit and can't seem to find the answer.

 

unfoldstripfromloop_wip_001.gif

 

When using the listener it doesn't seem to show anything.  Thanks for any help you might be able to give.  
(Currently working with 3dsMax 2015)

0 Likes
Accepted solutions (1)
1,998 Views
4 Replies
Replies (4)
Message 2 of 5

denisT.MaxDoctor
Advisor
Advisor

there is no mxs method that does do what you want.

 

but "Unfold strip from loop" is just a sequence of unwrap_uvw existing methods. you can make it ...

 

there is another solution - "press" this button using winapi methods. windows struct and uiaccessor are probably enough to do it.

 

 

Message 3 of 5

andocombo
Explorer
Explorer

I was starting to think there may not currently be a function that does the same as pressing this button, after not seeing it in the maxscript help file.

I agree it may very well be possible to recreate the functionality I would like using other functions, I was thinking about trying to do similar with spline mapping to try and get a similar result.  If you or others have any ideas about that I'd be interested to hear about it.

I am not familiar with winapi methods, are you thinking I could make a sort of macro outside of max to do this?

0 Likes
Message 4 of 5

denisT.MaxDoctor
Advisor
Advisor
Accepted solution

if Unwrap UVW modifier is opened in Modifier Panel:

 

-- find button HWND and press
(
	h = windows.getchildhwnd #max "Wrap" -- "Wrap" rolloup
	h = uiaccessor.getnextwindow h[1] -- rollout dialog 
	h = uiaccessor.getfirstchildwindow h -- toolbar 
	h = uiaccessor.getfirstchildwindow h -- first: static (dummy button)
	h = uiaccessor.getnextwindow h -- second: "Spline Mapping" button
	h = uiaccessor.getnextwindow h -- third: static (dummy button)
	h = uiaccessor.getnextwindow h -- fourth: "Unfold Strip from Loop" button
	uiaccessor.pressbutton h -- press button by HWND
)
Message 5 of 5

andocombo
Explorer
Explorer

Wow, okay thank you for the assistance.  That's really neat, it works.

0 Likes