WeakNodePath
from panda3d.core import WeakNodePath
- class WeakNodePath
Bases:
DTOOL_SUPER_BASE
This class is a wrapper around a NodePath that, unlike the actual NodePath class, doesn’t hold a reference count to the node. Thus the node may be detached from the scene graph and destructed at any time.
You can call is_valid() or was_deleted() at any time to determine whether the node is still around; if it is, get_node_path() will return the associated NodePath.
Inheritance diagram
- __init__(*args, **kwargs)
- assign()
C++ Interface: assign(const WeakNodePath self, const NodePath node_path) assign(const WeakNodePath self, const WeakNodePath copy)
- clear()
C++ Interface: clear(const WeakNodePath self)
- /**
Sets this NodePath to the empty NodePath. It will no longer point to any
node.
*/
- compareTo()
C++ Interface: compare_to(WeakNodePath self, const NodePath other) compare_to(WeakNodePath self, const WeakNodePath other)
- /**
Returns a number less than zero if this NodePath sorts before the other
one, greater than zero if it sorts after, or zero if they are equivalent.
Two NodePaths are considered equivalent if they consist of exactly the same
list of nodes in the same order. Otherwise, they are different; different
NodePaths will be ranked in a consistent but undefined ordering; the
ordering is useful only for placing the NodePaths in a sorted container
like an STL set.
*/
- /**
Returns a number less than zero if this WeakNodePath sorts before the other
one, greater than zero if it sorts after, or zero if they are equivalent.
Two WeakNodePaths are considered equivalent if they consist of exactly the
same list of nodes in the same order. Otherwise, they are different;
different WeakNodePaths will be ranked in a consistent but undefined
ordering; the ordering is useful only for placing the WeakNodePaths in a
sorted container like an STL set.
*/
- compare_to()
C++ Interface: compare_to(WeakNodePath self, const NodePath other) compare_to(WeakNodePath self, const WeakNodePath other)
- /**
Returns a number less than zero if this NodePath sorts before the other
one, greater than zero if it sorts after, or zero if they are equivalent.
Two NodePaths are considered equivalent if they consist of exactly the same
list of nodes in the same order. Otherwise, they are different; different
NodePaths will be ranked in a consistent but undefined ordering; the
ordering is useful only for placing the NodePaths in a sorted container
like an STL set.
*/
- /**
Returns a number less than zero if this WeakNodePath sorts before the other
one, greater than zero if it sorts after, or zero if they are equivalent.
Two WeakNodePaths are considered equivalent if they consist of exactly the
same list of nodes in the same order. Otherwise, they are different;
different WeakNodePaths will be ranked in a consistent but undefined
ordering; the ordering is useful only for placing the WeakNodePaths in a
sorted container like an STL set.
*/
- getKey()
C++ Interface: get_key(WeakNodePath self)
- /**
Returns the same values as NodePath::get_key().
*/
- getNodePath()
C++ Interface: get_node_path(WeakNodePath self)
- /**
Returns the NodePath held within this object, or an empty NodePath with the
error flag set if the object was deleted.
*/
- get_key()
C++ Interface: get_key(WeakNodePath self)
- /**
Returns the same values as NodePath::get_key().
*/
- get_node_path()
C++ Interface: get_node_path(WeakNodePath self)
- /**
Returns the NodePath held within this object, or an empty NodePath with the
error flag set if the object was deleted.
*/
- isEmpty()
C++ Interface: is_empty(WeakNodePath self)
- /**
Returns true if the NodePath contains no nodes, or if it has been deleted.
*/
- is_empty()
C++ Interface: is_empty(WeakNodePath self)
- /**
Returns true if the NodePath contains no nodes, or if it has been deleted.
*/
- node()
C++ Interface: node(WeakNodePath self)
- /**
Returns the PandaNode held within this object, or nullptr if the object was
deleted.
*/