What is encapsulation?
 
 
 

Containers promote encapsulated design. Encapsulation refers to the act of hiding information that is either sensitive or subject to change.

You may want to keep the node structure of an object hidden from people who might tamper with it or you may want to keep the node structure flexible in case a future requirement changes. To do this, you can define the object as an asset. You can then publish a subset of internal node attributes to the container to create a container interface (for more information see Publish or unpublish attributes).

Containers act as a black box between what its contents do and how they do it. A container’s interface acts as a contract promising that, no matter how the container is arranged internally, it will offer a concrete set of inputs and outputs. Using the interface, artists know the exact capabilities of a container without knowing the details of the container’s internal structure. This allows them to do their work regardless of how the container is set up.

Encapsulation maintains a scene’s integrity. The internal structure of each container may change but, as long as its interface isn’t violated, the objects in the scene that rely on it remain unaffected.

Maya provides a number of locking and hiding mechanisms to enforce the benefits of encapsulated design.

Related topics