Maxscript


Foreforeword: As i started using 3ds Max & Maxscript (i used Maya/MEL before) i wrote down all beginner questions i asked myself. See this thread for my answers and their solutions. It maybe helps you, when you are a beginner.

Foreword: This Maxscript section is more an article because the scripts i wrote, may useless for you. But i want to show, what i'm able to script. I think it can be important for a company, to have artists which can create small scripts to improve their or better: the companys workflow.

Image: The upper script checks the whole scene for notetracks and notes. If an empty notetrack is found: it will delete it. If entries are found: it will list them. Also you can create and edit them. For me, it improved the speed to find/edit/delete notetracks a lot.
The lower script lists all objects of the scene, NOT having a scaling of x:100% y:100% z:100%. It was important for me because scaled objects/bones can occur problems in game engines.

IImage: This is my biggest script i did. For our game we had to create 3 scriptfiles for every object to control textures, model and other options. This script helps you to do this. For standard objects you need only enter a name and click “Fill” and the rest is done by the script. It improved the speed to test an object in the game engine a lot and the other artists also use it.

IIImage: This is the script i use every day: it just grabs and lists all scripts in a defined directory. Via double click you can start the specified script.

MEL


Rotate/Scale selected Objects randomly Download (use “Save target as”!)

The script rotates and scales selected objects by random values. Simply put the values in the textfields and press the “ENTER”-key of your NUMLOCK block until you are satisfied!

x,y,z = the axis; r = rotate (the rotate result is a random value between 0 and the entered angel) smin = min. scale value; smax = max. scale value (the scale result is a random value between smin and smax)

Mass UV transfer Download (use “Save target as”!)

With this script you are able to transfer the uv set of the last selected to all other selected objects. Thats very useful if you have a huge amount of equal (for example) stones or something and like to change the uv set for all of them. Simply select all objects containing the old and last but not least the object with the new uv set. Especially useful if you set a hotkey.

Change culling Download (use “Save target as”!)

The scripts changes the state of “double sided” of all objects i the scene to 1 (first execution of the script) or 0 (second execution of the script). You can check very fast if the objects normals are correct. Especially usefull if you set a hotkey.

scripting.txt · Last modified: 2009/02/04 23:50 by simon
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0