[Maya-Python] Re: Compound array attribute with mesh data child issue

2019-04-07 Thread David Lantos
Sorry the identation went wrong, fixed here: > > > @staticmethod > def initialize(): > tAttr = OpenMaya.MFnTypedAttribute() > cAttr = OpenMaya.MFnCompoundAttribute() > > VertexSnap.aDriverMesh = tAttr.create('driverMesh', 'driverMesh', > OpenMaya.MFnData.kMesh) > > VertexSnap.aDriverIndic

[Maya-Python] Re: Compound array attribute with mesh data child issue

2019-04-11 Thread David Lantos
I got a solution from other forum. Since it's mesh data in the memory you can use only MDataHandle instead of MFnMesh. hDrivers = data.inputArrayValue(MyDeformer.aDrivers) for driverIdx in range(hDrivers.elementCount()): status = hDrivers.jumpToElement(driverIdx) if status: buil