Amazon VERSION 2.0V1 Guía de usuario Pagina 171

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 264
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 170
171
String Array
An array of string objects. Requires name and size arguments.
Top Level User Parameters
As covered in Getting the Parameters of a Node the node parameters that you see at the top level in a node’s
Parameters tab are all children of the node’s root parameter. User Parameters on a node are also added as children
of the root parameter. For example, to create a new PrimitiveCreate node, and add a User Parameter of type
number, enter the following:
# Get the root node
root = NodegraphAPI.GetRootNode()
# Add a PrimitiveCreate node at root level
node = NodegraphAPI.CreateNode( 'PrimitiveCreate', root )
# Get the PrimitiveCreate node's root parameter
rootParam = node.getParameters()
# Add a User Parameter of type number
numberParam = rootParam.createChildNumber( "Foo", 123.0 )
Nested User Parameters
Complex hierachies of User Parameters are possible, by nesting User Parameters under Group User Parameters. For
example, create a new PrimitiveCreate node, and add a User Parameter of type number, nested under a User
Parameter of type Group:
# Get the root node
root = NodegraphAPI.GetRootNode()
# Add a PrimitiveCreate node at root level
node = NodegraphAPI.CreateNode( 'PrimitiveCreate', root )
# Get the PrimitiveCreate node's root parameter
rootParam = node.getParameters()
# Add a User Parameter of type Group under the root parameter
groupParam = rootParam.createChildGroup( "yourGroup" )
# Add a User Parameter of type Number under the group
numberParam = groupParam.createChildNumber( "yourNumber",\
123.00 )
Parameter Hints
Parameter hints are arbitrary metadata, most commonly used to tell the user interface what a User Parameter
contains. For example, add a User Parameter of type string to represent a file path to an asset, and use a hint to tell
Katana to use the asset browser widget for that User Parameter:
23 NODEGRAPH API | USER PARAMETERS
Vista de pagina 170
1 2 ... 166 167 168 169 170 171 172 173 174 175 176 ... 263 264

Comentarios a estos manuales

Sin comentarios