Tags can be added to BaseObject elements to add additional data or functionality (expression). The base class for all tags is BaseTag. Some tags store data of variable length depending on the host object. These extended tags are based on VariableTag and BaseTag.
BaseTag objects are an instance of Tbase
, VariableTag objects are an instance of Tvariable
.
The currently selected tags can be obtained from the BaseDocument:
See also BaseDocument Selections.
The tags that are attached to an object are obtained from that object:
See BaseObject Tags.
A BaseTag may also be returned from a tag itself:
BaseTag objects are created with the usual tools:
The tag IDs of many build-in tag types are defined in Tag Types and SelectionTag Types.
VariableTag objects are created with the usual tools, too:
The tag IDs of many build-in variable tag types are defined in VariableTag Types.
BaseTag and VariableTag elements can also be handled by the BaseObject that hosts these tags:
See BaseObject Tags.
An UVW tag can be created with this dedicated function:
A tag is hosted and owned by a BaseObject.
Tags are organized in a list.
VariableTag is just a means to store a varying amount of data. So it's "variable" in the sense of "capable of being changed", not in the sense of a variable (i.E. a place to store data) which again of course comes from being variable... Take for example a Polygon Object. It needs to store a number of Vectors describing point positions. And it needs to store information about polygons (basically an array of point indexes). While this information could of cause be stored in members of the Polygon Object implementation, one would need to take care of reading/writing/copying this data. Instead one can simply make use of VariableTags (PointTag and PolygonTag in this case), they'll take care of the contained data in these cases. In regards to caching and scene execution pipeline, VariableTags don't do much, as they are only data containers in most cases. So in the above example it's rather the Polygon Object doing something with the data stored in its VariableTags. VariableTags can not be created with the SDK, one can only make use of the existing ones.
Variable tags store an array of elements. Typically dedicated classes exist to access the settings.
The data stored in a VariableTag can be accessed directly from the BaseObject:
See also BaseObject Tags.
The data can also be accessed with the VariableTag itself.
Tag plugins can be registered with several flags. These flags can be accessed with GeListNode::GetInfo().
These utility functions can return the name of the tag type or return the tag type based on that name.