Configuring the Scene View Inspector

Gaffer 0.58 introduced a new Inspector in the Scene View. It allows you to quickly view – and in many cases – edit the selected location’s shader parameters.

We attempted to select a sensible set of parameters to display by default, but in keeping with Gaffer tradition, you can configure what is shown to suit your needs.

Adding/removing parameters

The Inspector has a simple configuration API that can be called from a startup script or similar. It allows individual shader parameters to be added and removed.

warning

The implementation of the inspector is subject to change over the coming releases as we extend it’s functionality. As such, the inspector per se isn’t part of the public API yet.

The current configuration API is a minimal mechanism that hopes to make it production usable in the interim. It may change in future releases.
from GafferSceneUI import _SceneViewInspector as SVI

SVI.registerShaderParameter( <shaderAttr>, <parameter> )
SVI.deregisterShaderParameter( <shaderAttr>, <parameter> )

for example:

SVI.registerShaderParameter( "ai:light", "exposure" )

The Inspector will show a widget when the scene selection has a local attribute of the matching name, with the specified parameter.

Inherited attributes are not currently considered by the inspector.

For reference, the standard Gaffer registrations are made here.

Further Reading

Leave a Reply