O'Reilly logo

Practical Maya Programming with Python by Robert Galanakis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Designing the node factory

For the rest of this chapter, we will be creating a node factory library which will help create dependency graph plugins. It will provide the following benefits:

  • Less code and duplication. Creating nodes through the node factory requires 75-90% less code than an equivalent node created with the raw Maya Python API. The node declarations should also involve little to no duplication, as they only need to describe data and behavior unique to the node. The repetitiveness of working with the Maya Python API is hidden.
  • Intuitive and consistent. Using the node factory should be conceptually close to designing a Maya node and not require learning many new concepts. For example, we uphold the concepts of name, type ID, inputs, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required