User guide
137
downstream node's parameters. We do this by using the universal attributes as these provide us with all the data we
need to be able to fully display them in the Katana UI.
This means the parameters on our downstream node dynamically update based on our upstream node, this creates
the concept of dynamic parameters: parameters dependent on incoming scene graph attributes.
When creating nodes in script mode, Katana does not, by default, create the dynamic parameters on the node, only
those set locally. Therefore, to ensure you can access these scene graph dependent parameter values, you must call
the function checkDynamicParameters() on the Node.
When you call checkDynamicParameters(), the universal attributes are generated for you so there is no need to
call it explicitly, after doing so you are able to access them as normal. Run ViewSetAndDefaultParams.py to see an
example of this.
You must remember to call checkDynamicParameters() on your node before attempting to read them or you will
experience the issues highlighted in ViewSetAndDefaultParamsError.py.
NOTE: You may find that in UI mode you sometimes do not experience this error because user
interactions such as inspecting the parameters automatically call the checkDynamicParameters()
function for you.
Summary
Universal attributes are used by the Katana to allow it to display parameter values and attributes in the UI, and
through the NodegraphAPI. The universal attribute object provides a complete description of scene graph attribute
values and UI hints that should be applied to them, this includes default values not set explicitly in Katana. These
default values are provided by Default Attribute Producers.
Dynamic Parameters are parameters dependent on scene graph attributes. Dynamic Parameters are generated
automatically by the Katana UI as you reveal dependent parameter values, it does this by calling
checkDynamicParameters(). However, when you are using the NodegraphAPI in script mode you have to manually
call checkDynamicParameters() to ensure you can access these values.
19 UNIVERSAL ATTRIBUTES | SUMMARY