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.aDriverIndices = tAttr.create('driverIndices', > 'driverIndices', OpenMaya.MFnData.kIntArray) > > VertexSnap.aDrivers = cAttr.create('drivers', 'drivers') > cAttr.setArray(True) > cAttr.addChild(VertexSnap.aDriverMesh) > cAttr.addChild(VertexSnap.aDriverIndices) > VertexSnap.addAttribute(VertexSnap.aDrivers) > > outputGeom = OpenMayaMPx.cvar.MPxGeometryFilter_outputGeom > VertexSnap.attributeAffects(VertexSnap.aDriverMesh, outputGeom) > VertexSnap.attributeAffects(VertexSnap.aDriverIndices, outputGeom) > > > def deform(self, data, geoIter, localToWorldMatrix, geoIndex): > > hDrivers = data.inputArrayValue(VertexSnap.aDrivers) > numDrivers = hDrivers.elementCount() > for driverIdx in range(numDrivers): > hDrivers.jumpToElement(driverIdx) > hDriver = hDrivers.inputValue() > oDriverMesh = hDriver.child(VertexSnap.aDriverMesh).asMesh() > > if oDriverMesh.isNull(): > # No driver mesh > return > > fnDriverMesh = OpenMaya.MFnMesh(oDriverMesh) > print fnDriverMesh.name() > # I got this: # RuntimeError: (kFailure): Object does not exist // >
-- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/8234f829-05a8-46b3-bb1e-e4ff83acbe61%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.