thanks for the pointer ! i need to feed this into the value where i ve
referenced "pcube1". so for this i need just the transform node of
each mesh to be returned in each individual mesh. i presume this will
work. i m probably being really stupid but is this the correct code to
return the transform node? your help is very VERY appreciated.
import maya.cmds as cm
import maya.OpenMaya as om
iter = om.MItDag(om.MItDag.kDepthFirst, om.MFn.kMesh)
while not iter.isDone():
def iterationObject(name):
path = om.MDagPath()
bob=iter.getPath(path)
node = om.MObject()
path.transform()
print iter.partialPathName()
return path
#retrieves the name of the mesh node
def nameToNode(name ):
selectionList = om.MSelectionList()
selectionList.add( name )
node = om.MObject()
selectionList.getDependNode( 0, node )
return node
#retireves the right DAG node for selected objects
def nameToDag( name ):
selectionList = om.MSelectionList()
selectionList.add( name )
node = om.MDagPath()
selectionList.getDagPath( 0, node )
return node
dag = nameToDag(path)
--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---