User guide

188
/geo
/taco
/light
So we use a StaticSceneCreate Op to create this additional hierarchy at the starting location /root/world:
/geo
/taco
However, if we don’t call stopChildTraversal() when the StaticSceneCreate Op is at /root/world then this Op is run
at both /root/world and /root/world/light, resulting in:
/root
/world
/geo
/taco
/light
/geo
/taco
To summarize, stopChildTraversal() stops your Op from being automatically evaluated at any of the child locations
that exist on its input. The most common use of stopChildTraversal() is for efficiency. If we can determine, for
example, by looking at a CEL expression, that this Op has no effect at any locations deeper in the hierarchy than the
current one, it's good practice to call stopChildTraversal() so that we don’t even call this Op on any child locations.
Reading Scene Graph Input
There are a range of functions that read the input scene graph produced by upstream Ops. All these functions allow
only read functionality; the input scene is immutable.
The getNumInputs() function
int getNumInputs() const;
An Op can have the output from multiple other Ops as its input. Obvious use cases for this are instances where you
wish to merge multiple scene graphs produced by different OpTrees into a single scene graph, comparing attribute
values in two scene graph states, or copying one scene graph into another one. The getNumInputs() function
allows you to determine how many Ops you have as inputs, which is a precursor to interrogating different branches
of the OpTree for scene graph data.
24 OP API | THE OP API EXPLAINED