[Maya 2016] Python Deformer Plugin

I noticed that a deformer plugin I wrote using the Python API 1.0 isn’t working in Maya 2016.

I get this error:
line 58: Unknown C global variable //

that line of code is in my deform method:


def deform(self, dataBlock, geoIter, matrix, multiIndex):
    inputAttr = mpx.cvar.MPxDeformerNode_input

the plugin can be registered/deregistered properly, it just throws the error when I try to apply the deformer to a mesh.
I skimmed through the docs for 2016, but didn’t notice any changes to the relevant sections.
any ideas?

turns out to be a bug in maya 2016. autodesk says it’ll be fixed in an upcoming service pack.

ohh well. moving back to cpp

Hi Sven! :D:
Liking the move from Rig to Maya? haha!
-Sean

it works in service pack 2.

i also found this, which you can use

kApiVersion = cmds.about(apiVersion=True)
if kApiVersion < 201600:
kInput = OpenMayaMPx.cvar.MPxDeformerNode_input
kInputGeom = OpenMayaMPx.cvar.MPxDeformerNode_inputGeom
kOutputGeom = OpenMayaMPx.cvar.MPxDeformerNode_outputGeom
kEnvelope = OpenMayaMPx.cvar.MPxDeformerNode_envelope
else:
kInput = OpenMayaMPx.cvar.MPxGeometryFilter_input
kInputGeom = OpenMayaMPx.cvar.MPxGeometryFilter_inputGeom
kOutputGeom = OpenMayaMPx.cvar.MPxGeometryFilter_outputGeom
kEnvelope = OpenMayaMPx.cvar.MPxGeometryFilter_envelope

Got the same line 23: Unknown C global variable ‘MPxDeformerNode_input’ in maya 2019. Do you know a way to fix it?