User guide

190
The getPotentialChildren() Function
FnAttribute::StringAttribute getPotentialChildren(
const std::string& inputLocationPath = std::string(),
int inputIndex = kFnKatGeolibDefaultInput) const;
In Scene Graph Creation the function deleteSelf() was introduced, noting that the consequence of such a call is
more subtle than it may have first appeared. When an upstream Op is evaluated and creates children, if downstream
Ops have the ability to delete them, the upstream Op can only go so far as to state that the children it creates may
potentially exist after a downstream Op has been evaluated at those child locations. This is because the Op has no
knowledge of what a downstream Op may do when evaluated at such a location. To that extent,
getPotentialChildren() returns a list of all the children of a given location on the input of an Op.
The prefetch() Function
void prefetch(const std::string& inputLocationPath = std::string(),
int inputIndex = kFnKatGeolibDefaultInput) const;
Given the concurrent nature of Geolib3, it's entirely possible that an attribute or location being requested on the
input may not yet have been computed, in which case your Op is rescheduled and re-evaluated at a later point. The
prefetch function can be called from within your Op’s cook() function to instruct the Runtime that you require a
given location soon. Essentially, you can think of it as an explicit statement to the Runtime of your dependency on
another location.
TIP: You can use prefetch() to maintain good code practice by using it as early as possible in the code for
your Op's cook function. For instance, if your Op depends on data from locations other than the current
output location, from any of the inputs, this would be an ideal time to use prefetch().
24 OP API | THE OP API EXPLAINED