AttribNodeRegistry
from panda3d.core import AttribNodeRegistry
- class AttribNodeRegistry
Bases:
DTOOL_SUPER_BASE
This global object records NodePaths that are referenced by scene graph attribs, such as ClipPlaneAttribs and LightAttribs.
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.
Inheritance diagram
- __init__(*args, **kwargs)
- addNode()
C++ Interface: add_node(const AttribNodeRegistry self, const NodePath attrib_node)
- /**
Adds the indicated NodePath to 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.
The NodePath must reference some kind of an attribute node, such as a
LightNode or 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 NodePath.
If there is already a node matching the indicated name and type, it will be
replaced.
*/
- add_node()
C++ Interface: add_node(const AttribNodeRegistry self, const NodePath attrib_node)
- /**
Adds the indicated NodePath to 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.
The NodePath must reference some kind of an attribute node, such as a
LightNode or 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 NodePath.
If there is already a node matching the indicated name and type, it will be
replaced.
*/
- clear()
C++ Interface: clear(const AttribNodeRegistry self)
- /**
Removes all nodes from the registry.
*/
- findNode()
C++ Interface: find_node(AttribNodeRegistry self, const NodePath attrib_node) find_node(AttribNodeRegistry self, TypeHandle type, str name)
- /**
Returns the index number of the indicated NodePath in the registry
(assuming its name hasn’t changed since it was recorded in the registry),
or -1 if the NodePath cannot 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.
*/
- find_node()
C++ Interface: find_node(AttribNodeRegistry self, const NodePath attrib_node) find_node(AttribNodeRegistry self, TypeHandle type, str name)
- /**
Returns the index number of the indicated NodePath in the registry
(assuming its name hasn’t changed since it was recorded in the registry),
or -1 if the NodePath cannot 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.
*/
- getNode()
C++ Interface: get_node(AttribNodeRegistry self, int n)
- /**
Returns the nth NodePath recorded in the registry.
*/
- getNodeName()
C++ Interface: get_node_name(AttribNodeRegistry self, int n)
- /**
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.
*/
- getNodeType()
C++ Interface: get_node_type(AttribNodeRegistry self, int n)
- /**
Returns the type of the nth node, as recorded in the registry.
*/
- getNodes()
- getNumNodes()
C++ Interface: get_num_nodes(AttribNodeRegistry self)
- /**
Returns the total number of nodes in the registry.
*/
- get_node()
C++ Interface: get_node(AttribNodeRegistry self, int n)
- /**
Returns the nth NodePath recorded in the registry.
*/
- get_node_name()
C++ Interface: get_node_name(AttribNodeRegistry self, int n)
- /**
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()
C++ Interface: get_node_type(AttribNodeRegistry self, int n)
- /**
Returns the type of the nth node, as recorded in the registry.
*/
- get_nodes()
- get_num_nodes()
C++ Interface: get_num_nodes(AttribNodeRegistry self)
- /**
Returns the total number of nodes in the registry.
*/
- lookupNode()
C++ Interface: lookup_node(AttribNodeRegistry self, const NodePath orig_node)
- /**
Looks up the indicated NodePath in the registry. If there is a node
already in the registry with the matching name and type, returns that
NodePath instead; otherwise, returns the original NodePath.
*/
- lookup_node()
C++ Interface: lookup_node(AttribNodeRegistry self, const NodePath orig_node)
- /**
Looks up the indicated NodePath in the registry. If there is a node
already in the registry with the matching name and type, returns that
NodePath instead; otherwise, returns the original NodePath.
*/
- removeNode()
C++ Interface: remove_node(const AttribNodeRegistry self, const NodePath attrib_node) remove_node(const AttribNodeRegistry self, int n)
- /**
Removes the indicated NodePath from the registry. The name of the node
must not have changed since the matching call to add_node(), or it will not
be successfully removed.
Returns true if the NodePath is found and removed, false if it is not found
(for instance, because the name has changed).
*/
- /**
Removes the nth node from the registry.
*/
- remove_node()
C++ Interface: remove_node(const AttribNodeRegistry self, const NodePath attrib_node) remove_node(const AttribNodeRegistry self, int n)
- /**
Removes the indicated NodePath from the registry. The name of the node
must not have changed since the matching call to add_node(), or it will not
be successfully removed.
Returns true if the NodePath is found and removed, false if it is not found
(for instance, because the name has changed).
*/
- /**
Removes the nth node from the registry.
*/