User guide
26 Creating a GenericAssign-
based Node Type
GenericAssign is a whole class of node types, which are defined by XML files that are usually kept in GenericAssign
folders within one of the KATANA_RESOURCES directories. GenericAssign node types can be used to set parameters
that are to be passed along to other nodes, such as the RenderSettings node.
The XML file that defines that node type is kept at
bin/python/UI4/Resources/GenericAssign/RenderSettings.xml within a Katana installation directory.
You can create your own GenericAssign-based node types and then add them to Katana.
Working with GenericAssign-based Nodes
In order for incoming values to GenericAssign to display correctly, the node type has the expectation that default
attribute definitions are present, which are automatically defined when using a registered GenericAssign .args file.
However, it is possible to amend this following the code example below.
This is registered in a similar way to ShadowBranch:
class PragmaticAssign(GenericAssign.GenericAssign):
def getUniversalAttr(self, scopeDict=None, hintDict=None,
rootProducer=None):
staticScope = {}
staticHints = {}
staticAttr = self.getStaticUniversalAttr(staticScope, staticHints)
incomingScope = {}
incomingAttr = GenericAssign.GenericAssign.getUniversalAttr(
self, scopeDict=incomingScope, rootProducer=rootProducer)
if incomingAttr:
staticAttr = GeoAPI.MergeGroups([staticAttr, incomingAttr])
staticScope.update(incomingScope)
if isinstance(scopeDict, dict):
scopeDict.update(staticScope)
if isinstance(hintDict, dict):
hintDict.update(staticHints)
return staticAttr
node = NodegraphAPI.CreateNode("PragmaticAssign", NodegraphAPI.GetRootNode())