User guide
149
{
++i;
if (i < tokens.size())
{
radius = atof(tokens[i]);
}
}
}
//free the copied parameter string
free(inputParamStr);
}
};
NOTE: Parameters are passed from .args file to procedural as either serialized key-value pairs, or typed
arguments. If the Args file does not specify an output style, it defaults to serialized key-value pairs. The
example shown in Example Args File uses typed arguments.
For procedurals, the type and default value of a parameter have to be declared. This is in contrast to the
use of .args files in shaders, where the type can be interrogated directly from the shader.
UI Hints for Plug-ins Using Argument Templates
Instead of using .args files, Scene Graph Generators (SGG) and Attribute Modifier Plug-ins (AMP) must declare UI
hints directly in their source code as part of the Argument Template. The Argument Template is used to declare what
arguments need to be passed to the plug-in.
The syntax used for these is the same as you would use in an .args file, just that you're handing the values as
attributes instead of declaring them inside an XML file.
Usage in Python Nodes
In Python, additional UI hints such as widget or help text are specified by defining them in a dictionary. The
dictionary is passed to Katana in the NodegraphAPI addParameterHints( ) function.
For example, set extra hints on an Alembic_In node:
_ExtraHints = {
"Alembic_In.name" : {
"widget" :"newScenegraphLocation",
},
20 ARGS FILES IN SHADERS | UI HINTS FOR PLUG-INS USING ARGUMENT TEMPLATES