Would you not lose access to geomIter? For evaluating over the membership.

I created a plug-in to displace the mesh based off a 2D texture and a membership. Suppose not looping through vertices that will stay at their default locations is worth the extra computations.


-brian

-------- Original Message --------
Subject: [Maya-Python Club:1337] Re: MFnMesh outputGeom from deformer?
From: "Chad Vernon" <[EMAIL PROTECTED]>
Date: Fri, November 21, 2008 12:31 am
To: [email protected]

You actually shouldn't get the mesh object this way as it will cause an extra evaluation of the upstream dependency graph nodes.  If you need the mesh object, you should override the compute method instead.  If you look in the documentation for MPxDeformerNode, it gives an example of how to do it.

On Thu, Nov 20, 2008 at 8:04 PM, mePt <[EMAIL PROTECTED]> wrote:

perfect!   this did the trick!

thanx brian!

i was trying too hard to get something with using
OpenMayaMPx.cvar.MPxDeformerNode_outputGeom i think!  ;)




On Nov 20, 7:10 pm, <[EMAIL PROTECTED]> wrote:
> 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




--
www.chadvernon.com


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

Reply via email to