To get the version of the installed OgreMax plugin:
$version = OgreMaxGetVersion()The scene and object settings that are normally accessible through the Scene Settings and Object Settings dialogs can also be accessed through MEL script.
To get the scene settings:
$sceneSettings = OgreMaxGetSceneSettings()To access the object settings for an object named "Box01" (whether it's a transform node or an object underneath a transform):
$objectSettings = OgreMaxGetObjectSettings("Box01")When adding animation settings for an object, the name of the object is passed as the first parameter, and the name of the animation is passed as the second optional parameter.
To add a mesh animation:
$animSettings = OgreMaxAddMeshAnimation("Box01", "Idle")To add a node animation:
$animSettings = OgreMaxAddNodeAnimation("Box01", "Box01Move")After retrieving any of the settings objects, you can inspect their attributes:
listAttr $sceneSettingslistAttr $objectSettingslistAttr $animSettingsIn the following lines of code fileName is assumed to contain the path to the file where the scene will be exported. It must have the '.scene' or '.mesh' extension.
OgreMaxExportScene(fileName)OgreMaxExportSelectedObjects(fileName)