Main Index : Reference :
[VariableTag] AllocVariableTag([int] type, [int] count);
class VariableTag : BaseTag
{
public:
VariableTag();
[int] GetDataCount();
[array] GetData();
[bool] SetData([array] a);
}
CINEMA 4D distinguishes between BaseTags which carry a fixed data set in the container and VariableTags which carry a dynamic number of elements. The data is stored as an array. The array is always one-dimensional, so multiple data fields per element are stored as:
| Field: | a0 | b0 | c0 | a1 | b1 | c1 | a2 | ... |
| Index: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | ... |
So to access the b field of the 6th element (b6) one would use array[6*3+1], where 3 is the number of fields per element.
[BaseTag] AllocTag([int] type, [int] count);
Allocates a VariableTag with initial size count of the specified type:
| Type | Description | Content |
|---|---|---|
|
|
Stick texture tag. | Point data for the stored state |
|
|
Particle data tag. | Particle data (position + direction + wing + lifetime + bits) |
|
|
Bake particle data tag. | (see above) |
|
|
UVW data tag. | UVW data (UVW at point a + b + c + d) |
|
|
Polygon data tag. | Polygon data (point index a + b + c + d) |
|
|
Segment data tag. | Segment data for splines |
|
|
Normals tag. | Contains 12 WORDs per polygon, enumerated like the following:ax,ay,az,bx,by,bz,cx,cy,cz,dx,dy,dz. The value is the Real value of the normal vector component multiplied by 32000.0.
|
|
|
Hermite tangents tag. | Hermite tangents (left + right) |
|
|
Vertexmap data tag. | One float per point of the vertex map |
|
|
Point tag. | One vector per point |
[int] GetDataCount();
Returns the number of elements. This is often not the same as the size of the tag's array!
[array] GetData();
Returns the tag's array.
[bool] SetData([array] a);
Sets the array to a. Returns TRUE if successful.