Hey guys,
I'm working in a custom node that takes an input (MFnTypedAtribute) set to
receive an array of mesh data (OpenMaya.MFnData.kMesh).
In my node's *compute* method, I'm trying to access this mesh's boundingbox
like this:
inMeshDataHandle = dataBlock.inputArrayValue ( myNode.inputMesh )
if inMeshDataHandle.elementCount():
for i in range(inMeshArrayDH.elementCount()):
inMeshDataHandle.jumpToElement( i )
oInMesh = inMeshDataHandle.inputValue().asMesh()
dagNodeFn = OpenMaya.MFnDagNode( oInMesh )
bb = dagNodeFn.boundingBox()
...
Later on, when I print out the bb values, I always get (0, 0, 0)
:(
I'm assuming my MFnDagNode pointing to a MObject (kMesh data) doesn't know
how to get the transform data.
So I tried to get the *dagPath* of the mesh's transform by querying the
plugs on the myNode.inputMesh - the code was extensive and in the end I got
the same results (0, 0, 0).
Any ideas on where I'm misunderstanding something here? Is my approach
wrong?
Thanks in advance!
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe