Summary

In this chapter, we used the power and flexibility of Python and the Maya Python API to develop a node factory that allows us to create Maya dependency graph plugins in a declarative and Pythonic style. We started this process by going through the frustrating experience of building a plugin node using C++-based Maya API patterns. We then saw how Python metaprogramming allows us to simplify the boilerplate and duplication required by imperative frameworks. Finally, we put this knowledge to use by building the node factory and seeing how it simplified the original plugin code. We also saw how easy it is to add more features to the node factory.

I hope that this chapter, as well as all preceding chapters, demonstrated how using and thinking ...

Get Practical Maya Programming with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.