WorkingNodePath¶
from acron.core import WorkingNodePath
- class WorkingNodePath¶
Bases:
This is a class designed to support low-overhead traversals of the complete scene graph, with a memory of the complete path through the graph at any given point.
You could just use a regular
NodePathto do this, but since theNodePathrequires storing NodePathComponents on each node as it is constructed, and then removing them when it destructs, there is considerable overhead in that approach.The WorkingNodePath eliminates this overhead (but does not guarantee consistency if the scene graph changes while the path is held).
At any given point, you may ask the WorkingNodePath for its actual
NodePath, and it will construct and return a newNodePathrepresenting the complete generated chain.Inheritance diagram
digraph inheritancef7e172fa96 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "WorkingNodePath" [URL="acron.core.WorkingNodePath.html#acron.core.WorkingNodePath",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "WorkingNodePath" [arrowsize=0.75,style=""]; }- property node_path NodePath¶
Constructs and returns an actual
NodePaththat represents the same path we have just traversed.
- property valid bool¶
Returns true if the
WorkingNodePathobject appears to be a validNodePathreference, false otherwise.