Notifications
Clear all

[Closed] Applying Skin Wrap modifier through script doesn't work

Hey there, I’m currently walking my first steps in the world of maxScript…

Well the script I’m writing is supposed to automate a few tasks that I need to do on about 70 max files individually, so I’m trying to get in as many of the tasks as I can.

More specifically, my script does the following:
-merges all objects from file “X.max”
-selects an object which pre-existed in the scene and turns off it’s Skin modifier
-selects one of the merged objects, and aligns it’s rotation and position to the first object
-applies the Skin wrap modifier to the selected objects, and adds the first object as the deformer.
-turns the first object’s skin modifier back on.

It works perfectly, untill I disableSceneRedrawfont=‘Courier New’[/font], or, when I try activating the script with a UI button. When I do one of the two, the Skin wrapped objects doesn’t follow the first object, although the modifier and all it’s settings are in place.
My guess is that for some reason when the script turns off the Skin modifier in the first object, it doesn’t snap back to it’s initial position, therefor the new Skinwrapped object isn’t aligned perfectly to the first one (they have exactly the same topology) So the skin wrap doesn’t glue them together…

Does anyone know this issue? how can I fix this problem?