MPxManipContainer.addMPxManipulatorNode python version

Hi, it might seem a silly question, but what does that function expect in the python version of the API? in c++ it needs a pointer, but in python whatever I try I get an error.

either this:

or this:

I tired with a None objcect, with an instance of the MPxManipulatorNode, with the class itself as in the screenshot and much more.

and In the docs they forgot to doc the last argument:

I am sure it will be more stupid than it looks, but still, I am confused and I spent a good amount of time on this… thanks guys!

I’ve been struggling with this problem for a while. I was using the API 1.0 (maya.OpenMaya) since I thought that these classes where not implemented on the API 2.0 yet (maya.api.OpenMaya), but I recently discovered that they are already implented on Maya 2020 (though Visual Code autocompleter doesn’t seem to know they exist).

I switched to the 2.0 and now the call to addMPxManipulatorNode no longer needs an out parameter and instead it now returns a MPxManipulatorNode, so I just do:

self.customManip = self.addMPxManipulatorNode(“customManipNode”, “customManip”).

Hope this helps you. The only problem I have now is I don’t know how to retrieve the manipulator indexes from the MPxManipulatorNode class.