maya API deformer

49 views
Skip to first unread message

laurent Pic

unread,
Feb 24, 2014, 6:47:44 AM2/24/14
to python_in...@googlegroups.com
Hi,
First of all, this is my first deformer, so please excuse the dumb question if dumb it is.

I'm completely stuck with a slot initialisation.
I would like a slot that accepts an undefined ( dynamic ) number of vector as input ( I would think of a MFnVectorArrayData() ? ) so I'm going like:

VctArrAttr = OpenMaya.MFnVectorArrayData()
MyNode.Test = VctArrAttr.create("Test", "Test", OpenMaya.MFnData.kVectorArray )
MyNode.addAttribute( MyNode.TestGizmos )
MyNode.attributeAffects( MyNode.TestGizmos, OpenMayaMPx.cvar.MPxDeformerNode_outputGeom )

I kinda understand that there is a lot missing there for it to work properly, but I'm stuck with the little information I get from the standard API reference.

Thanks for your help !
Also if there is richer documentation available somewhere, I'd be glad to know about it :)

o/


laurent Pic

unread,
Feb 25, 2014, 11:51:38 AM2/25/14
to python_in...@googlegroups.com
As I suspected, I was completely wrong since the beginning !
It seems that the right way to go is the following:

MyNode.inputGizmo = numAttr.create( "inputGizmo", "inGizmo", OpenMaya.MFnNumericData.k3Double )
numAttr.setArray(1)


pretty simple in fact :)
o/

laurent Pic

unread,
Feb 25, 2014, 11:52:45 AM2/25/14
to python_in...@googlegroups.com
with of course :

numAttr = OpenMaya.MFnNumericAttribute()
Reply all
Reply to author
Forward
0 new messages