Its primary purpose is to unify attribs that are loaded in from bam files. Attrib nodes are identified by name and type; when a bam file that contains references to some attrib nodes is loaded, those nodes are first looked up here in the AttribNodeRegistry. If there is a match (by name and node type), the identified node is used instead of the node referenced within the bam file itself.
add_node(NodePath const &attrib_node)¶
Adds the indicated
NodePathto the registry. The name and type of the node are noted at the time of this call; if the name changes later, it will not update the registry index.
NodePathmust reference some kind of an attribute node, such as a
PlaneNode. When bam files that reference an attribute node of the same type and the same name are loaded, they will quietly be redirected to reference this
If there is already a node matching the indicated name and type, it will be replaced.
Removes all nodes from the registry.
find_node(TypeHandle type, std::string const &name) const¶
Returns the index number of the indicated
NodePathin the registry (assuming its name hasn’t changed since it was recorded in the registry), or -1 if the
NodePathcannot be found (for instance, because its name has changed).
Returns the index number of the node with the indicated type and name in the registry, or -1 if there is no such node in the registry.
get_node_name(int n) const¶
Returns the name of the nth node, as recorded in the registry. This will be the node name as it was at the time the node was recorded; if the node has changed names since then, this will still return the original name.
get_node_type(int n) const¶
Returns the type of the nth node, as recorded in the registry.
Returns the total number of nodes in the registry.
lookup_node(NodePath const &orig_node) const¶
output(std::ostream &out) const¶
Returns true if the
NodePathis found and removed, false if it is not found (for instance, because the name has changed).
Removes the nth node from the registry.
write(std::ostream &out) const¶