[Release 1.0] ] MPyNode - A universal Python node for Autodesk Maya


Node Designer and the MPyNode plugin are officially open source!

Node Designer simplifies the technical overhead required to create custom nodes, allowing users of all skill levels to easily develop and share nodes built with Maya’s Python API.

The project is open source, free to use commercially, and open to all contributions by Maya’s community.

For more information, visit our website at: www.mpynode.com


This looks slick - I saw you did api overriding so that data can be pickled properly - what does this mean for the standard lib are we able to use maya.cmds, maya.mel and maya.api.OpenMaya with this too?


Just for clarity of purpose: we provide some api overrides (ex: mpylib.api.MVector) so they can follow the pickle protocol. We did this because that is how we store data on the node between maya sessions. On scene save any data flagged for storage (see the Storage tab) gets pickled and dumped to a Maya string attribute. On scene load, the data is read back in.

So to answer your question: Yes you can use all standard libraries. For example, from maya.api.OpenMayaAnim you could import MAnimControl to query the current frame number. If you wish to store the data between Maya sessions, the data just needs to follow the pickle protocol.

You can also use maya.cmds and maya.mel but do so carefully. Don’t do anything that would dirty another node’s plug and trigger a cascaded scene evaluation that could potentially get Maya to crash. You probably also should only use these any other time than on node initialization because it might slow down the evaluation quite a bit. For example this would be perfectly fine to do:

import maya.cmds as mc

if not hasattr(self,'scene_name'):
    self.scene_name = mc.file(q=True,sn=True)

One more thing, the “mPyNode” scene objects that get created are basically DG nodes. In the future, we could make an MPyDeformerNode for custom deformers. An MPyCameraNode for custom cameras. MPyKinematicNode for custom IKs… etc etc… Or maybe someone motivated will look at the source, make their own, and integrate back in the project for all to profit. :wink:


It looks very cool!
I need to find some time to try it out but I feel would make even faster prototyping nodes in python before going into c++


This looks fantastic - thank you for sharing. I look forward to downloading it and having a play!