Script

Un article de OpenMASKWiki.

Jump to: navigation, search

Sommaire

Colorize

Colorize [1] is a Perl script inspired by colorgcc, which adds color to OpenMASK, Ogre and other libraries' error messages.


Image:colorize.png

To use it, just add it to your $PATH

MAX script

A big thanks to Yann Renard for these scripts...

prepareOgreExport.ms

This script [2] prefixes all materials used in a MAX scene by the corresponding MAX file name followed by the '-' character (e.g a 'blue' material used in a myscene.max file will be renamed to 'myscene-blue'). It also removes spaces and accents, and may be modified so as to convert names to uppercase and shorten them to a maximum of 8 characters (useful when exporting to the 3ds file format).

Optionally, this script can rename textures in a similar way.

hierarchy.ms

Image:hierarchy.png

This script [3] allows you to save, break and restore the hierarchy of your model, as can be seen in the above figure.

It comes in handy when one wants to perform a ResetTransform on a model that contains several scale nodes, which Max might not be able to handle correctly, ultimately resulting in a wrong export of the geometry to the Ogre format.

Using this plugin, you can save your model hierarchy, apply a ResetTransform and then restore the hierarchy.

DCS.ms

This script [4] is only relevant for OpenMASK users.

The animation system of visual objects in OpenMASK requires a 'link' to be inserted into the object hierarchy in order to be able to manipulate it. This link, or DCS_node, must not have any Transform information stored at its level, so this script copies the Pivot information in an upper node and the Transform information in a lower node.

To use this script, you must select the node (preferably prefixed with DCS_) you want your OpenMASK Animator to 'link' to (e.g. DCS_boxbleu in the following figure).

Image:DCS.png

After launching the Max script you should get something similar to the following :

Image:DCS1.png

Navigation