API Guide > Shapes > 
Tweaks and internal attributes
 
 
 

Shapes that have input history, for instance, another node feeding in input geometry, need some way of storing any offsets (or tweaks) applied to vertex positions. Each time the input geometry changes, the shape has to recompute. By storing any tweaks in a separate attribute, the tweaks can be added to the input vertex positions forming the output geometry.

If there is no input history, you do not have to store the tweaks in a separate attribute. Instead, vertex movements can be applied directly to the output surface.

Marking attributes as internal, using MFnAttribute::setInternal, allows you to override the behavior of setAttr and getAttr so you can deal with tweaks in a different manner depending on whether there is input history.

Note

Using internal attributes is entirely up to you. This is a design issue and using internal attributes is not necessarily the only way to handle tweaks.

Input history implies that some other node is supplying your shape with input data. Creator nodes are dependency nodes which are responsible for creating specific types of shape data. Typically, a shape will have one or more creator nodes. For instance, a polygonal shape may have creator nodes for generating sphere data and cube data. See apiMeshCreator in the apiMeshShape sample plug-in for an example of a creator node.