I try to learn Maya (3d Software) API with Python, but I encounter some problems..
class Foo (node):
def __init__ (self, arg):
if isinstance (arg, str):
fGlobal = OpenMaya.MGlobal()
fGlobal.selectByName (arg , OpenMaya.MGlobal.kReplaceList)
selected = OpenMaya.MSelectionList()
fGlobal.getActiveSelectionList(selected);
obj = OpenMaya.MObject()
selected.getDependNode(0,obj)
else :
obj = arg
Everytime i use this class, Maya returns me a warning message.
swig/python detected a memory leak of type ‘MGlobal *’, no destructor
found.
Does someone know what does it mean ?
I’ve found the solution, it seems that the MGobal class is static.