User guide

195
locationDataChangeEvents = client.getAndResetChangedLocations()
if not locationDataChangeEvents:
return
# Iterate over each location we've been informed about and interrogate it
for event in locationDataChangeEvents:
location = event.getLocationPath()
locationData = event.getLocationData()
locationAttrs = locationData.getAttrs()
if not isinstance(locationAttrs, FnAttribute.GroupAttribute):
continue
# Only look at locations of type 'light'
typeAttr = locationAttrs.getChildByName('type')
if (not isinstance(typeAttr, FnAttribute.StringAttribute)
or typeAttr.getValue('', False) != 'light'):
continue
# Only want to look at xform or material updates
for attrName in ('xform.matrix', 'material',):
attr = locationAttrs.getChildByName(attrName)
# Do something with attr
Advanced Topics
Caching
There are a number of caching systems maintained by various Geolib3 sub-systems. This section covers Runtime-
based caches and Client LocationData caching.
Runtime-based Caching
The Geolib3 Runtime maintains a cache of previously computed (Op, location) pairs. It maintains another cache for
"scattered queries", made during the cooking process. The lifetime of entries in these caches is explicitly managed
through the Client API; see FnGeolibRuntime.h : client.evict(primaryPathToKeep).
24 OP API | ADVANCED TOPICS