I dealt with the very same issue recently creating a custom deformer.

This is what I used to get the mesh into a MFnMesh:

def deform(self,dataBlock,geomIter,matrix,multiIndex):
        inputH  = OpenMaya.MArrayDataHandle( dataBlock.inputArrayValue(self.input) )
        inputH.jumpToElement(multiIndex)
        inputGeomH = OpenMaya.MDataHandle( inputH.inputValue().child(self.inputGeom) )
        inputObject = OpenMaya.MObject(inputGeomH.data() )
        meshFn = OpenMaya.MFnMesh( inputObject )

Hope that helps,
-Brian
www.meljunky.com




-------- Original Message --------
Subject: [Maya-Python Club:1334] MFnMesh outputGeom from deformer?
From: mePt <[EMAIL PROTECTED]>
Date: Thu, November 20, 2008 9:36 pm
To: python_inside_maya <[email protected]>


hey all,

so i'm still VERY much a noob with python (so even the smallest
pointers help! ;p but i've decided to make my new deformer a python
plugin (as i'm tired of compiling for different OSs and different Maya
versions) and am having some "issues" getting the data i need so help
is appreciated up front.

i'm looking to take my deformer node, and then find the output mesh
and create a MFnMesh for it so i can manipulate some details of the
surface, and i'm having a heck of a time trying to get that data....

any tips or pointers?! thanx in advance,


--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---

Reply via email to