Page 1 of 1

Script request

Posted: Sun Nov 22, 2015 3:10 am
by Hayden Tenno
I need a scrip that makes all normals opposite from each other the same.

Re: Script request

Posted: Mon Nov 30, 2015 3:55 am
by Seyren
You can do this manually in 3DS Max by selecting the normal modifier on the whole model.

If you want to do this via script, an easy way i can think about right now is just doing this thing via script.

You should before consider seeing how are you placing the vertices of the model to fix the normals, since you are probably putting them wrong if you are asking for this. You should check if the triangles you are calling are being saved Clockwise or counter clock wise.

Image

This means that they will be seen from a side or another depending on how you placed them in the array.

But if you can't, just look at the MS API.

An example would be:

For adding it to the selected nodes.

Code: Select all

myNormal = Normal()
modpanel.addmodtoselection myNormal
Or just directly to a specific node:

Code: Select all

addModifier <node> <modifier> [before:index] 

There are various ways to do this. Then you might want to collapse the stack to apply it to the geometry, you can do this using
the collapseStack <node> line.