User guide

56
The create() function is not declared in the ScenegraphGenerator class in the API, but is used in the DEFINE_SGG_
PLUGIN(class) macro, which makes the plug-in known to Katana. Refer to Registering an SGG Plug-in for more
information.
static FnKat::GroupAttribute getArgumentTemplate()
Returns a group attribute that defines the parameters of the SGG plug-in, which appears as part of the
ScenegraphGeneratorSetup node's parameter interface, just below the generatorType dropdown parameter.
The group attribute returned may contain other group attributes to provide an arbitrarily nested structure of
parameters, including parameter hints, as in the following example:
FnKat::GroupAttribute
CubeMaker::getArgumentTemplate()
{
FnKat::GroupBuilder rotateCubesHints;
rotateCubesHints.set(
"widget",
FnKat::StringAttribute("checkBox"));
FnKat::GroupBuilder gb;
gb.set("numberOfCubes",
FnKat::IntAttribute(20));
gb.set("rotateCubes", FnKat::IntAttribute(0));
gb.set("rotateCubes__hints",
rotateCubesHints.build());
return gb.build();
}
NOTE: In order for SGG plug-ins to be found by Katana, their shared object files have to live at a path that
is contained in the $KATANA_RESOURCES environment variable.
static void flush()
static void flush() clears allocated memory and reloads data from file (if any). static void flush() is called when
flushing Katana's caches, for example, by clicking the Flush Caches button in the Menu Bar, which works on all
nodes in the current Katana project and forces assets, such as look files, to be dropped from memory and reloaded
when needed.
Like the static create() function, the flush() function is not actually declared in the ScenegraphGenerator class in
the API, but is used in the REGISTER_PLUGIN() macro when registering the custom plug-in. See Registering an SGG
Plug-in for more on this topic.
8 SCENE GRAPH GENERATOR PLUG-INS | SGG PLUG-IN API CLASSES