Args Files for GenericAssign

As a variant of Args Files, GenericAssign XML files specify attribute conventions and typically define node types capable of editing such attributes. GenericAssign Args Files are loaded from GenericAssign folders within KATANA_RESOURCES directories.

The example below registers a logFile attribute convention on /root/world, and a LogFile node type capable of editing that attribute:

<args format="1.0" scope="/root/world" fixedCEL="/root/world">
  <string name="logFile" widget="assetIdOutput"/>

The contents above can be saved to a file named /your/plugins/GenericAssign/LogFile.xml, and Katana launched with KATANA_RESOURCES set to /your/plugins. With the file loaded, Katana’s behaviour changes as follows:

  • When /root/world is selected in the Scene Graph tab, the Attributes tab displays logFile as a default attribute. This is used purely for informational purposes in the Attributes tab, and does not affect the scene data.
  • A LogFile node type becomes available in the Node Graph tab’s node creation menus. LogFile nodes have one input and one output, and feature a single logFile parameter.
  • When multiple LogFile nodes are chained together, a downstream node displays the upstream value of the logFile attribute in its logFile parameter; this is shown alongside a state badge. This mechanism works however the upstream attribute came to be set.

Top-level <args> Attributes

The following XML attributes can be specified on the top-level <args> element, and are specific to GenericAssign Args Files:

If given, a GenericAssign node’s CEL parameter is not shown when editing the node’s parameters in a Parameters tab. Instead, the node targets locations specified by the given value of fixedCEL.
As above, but the CEL expression is given as a parameter expression.
If given, the Attributes tab shows default attributes at locations specified by the given value of scope, which should be a CEL expression.
By default, for each GenericAssign XML file, a node type is registered, which can be used to display and edit scene graph attributes as declared in the XML document. This registration of a GenericAssign node type can be omitted by specifying the createGenericAssignNodeType XML attribute with a value of false. Note that in that case, default attributes as defined in the GenericAssign XML file are still shown in the Attributes tab for locations targeted by scope.
A comma-separated list of node flavors to give the node type, such as _hide to hide the node from the Node Graph tab’s node creation menus.

Forcing Parameters to be Arrays

The forceArray attribute can be used to turn number and string parameters into number array and string array parameters, even if they contain only one value, as shown in the following example:

<args format='1.0' scope='/root' fixedCEL='/root'>
  <float name='myNumber' default='0.123'/>
  <string name='myString'/>
  <float name='myNumberArray' default='0.123' forceArray='True'/>
  <string name='myStringArray' forceArray='True'/>