Amazon VERSION 2.0V1 Guide de l'utilisateur Page 201

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 264
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 200
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())
Vue de la page 200
1 2 ... 196 197 198 199 200 201 202 203 204 205 206 ... 263 264

Commentaires sur ces manuels

Pas de commentaire