
hohehohe2's OpenMaya tutorial
kotamuraa@yahoo.co.jp
sup2 : MGlobal
Maya API has a convenient class called MGlobal. This class has
global methods
that is not appropriate to be in other classes. The methods are all
declared
"static", so you don't have to make an instance of MGlobal class.
The following methods are some of them.
Especially executeCommand() is very useful.
- Set the global selection list, get a copy of it, add to it, delete
from it
MGlobal::getActiveSelectionList()
MGlobal::getActiveSelectionList()
MGlobal::select()
MGlobal::unselect()
and so on
- Change the current time
MGlobal::viewFrame()
Somehow a method to get the current time value
is not prepared.
- Read a MEL source file
MGlobal::sourceFile
Same as "source" MEL command.
- Execute a MEL command
MGlobal::executeCommand()
- Add or Remove a DAG node to/from the scene.
MGlobal::addToModel()
MGlobal::removeFromModel()
and so on.
- Delete a DG node
MGlboal::deleteNode()
- Display a string to the Script Editor
MGlboal::displayInfo()
and so on.
There are other methods. Look at the manual.
Prev Contents Next
Maya is a registered
trademark of Autodesk
Copyright ©
2003, Koichi Tamura. All Rights Reserved.