An MArrayDataBuilder is used to construct data for attributes/plugs that have an array of data. An array builder is used with an MArrayDataHandle for managing data.
The class constructor receives an attribute object and the number of elements to allocate space for.
The MObject must be a multi attribute (i.e. a plug that is a composite of multiple element plugs). This is different, for example, from a single attribute of type kVectorArrayData, which would be passed through a single plug as a single lump of data. Common examples of a multi-plug are the worldMatrix attribute that is on all DAG nodes, or the position attribute on the particleShape node.
This class will also take as input the datablock that the builder belongs to. You must specify this datablock if you want your builder to support per-plug caching.
As elements are added to the array, the builder will allocate memory in chunks. This method tells the builder how many elements to allocate each time it grows the array.
Parameters
[in]
size
the number of elements to allocate when growing the array