May 16 2014

Resetting Skinwrap Modifiers via maxscript

If you’re reading this right now, you’re probably trying to figure out why the F*&%$@ the built in method for resetting a skin-wrap in max, meshDeformOps.reset(), is doing absolutely nothing for you…
Turns out this method is broken in max.
Here’s a little hack that will allow press the reset button it’s self on any skinwrap via maxscript allowing you to by pass this roadblock.



fn resetSkinWrap md = 
	deselect $*
	select (refs.dependentNodes md)[1]
	max modify mode
	modpanel.setcurrentobject md

	maxHWND = windows.getMaxHWND() 
	for c in  (windows.getChildrenHWND maxHWND) do
		if c[4] == "CustButton" and c[5] == "Reset" then
			UIAccessor.PressButton c[1]
			return  True
for m in (getClassInstances skin_wrap) do resetSkinWrap m

Leave a Reply