Working with Nodes¶
This section documents the various classes and functions that are available for working with nodes in Katana via Python scripting.
Introduction to Nodes¶
Nodes are the units used in the Katana interface to build the recipe for a
Katana project. Nodes feature parameters that can be used to control their
behavior. Nodes can be created and connected in Katana’s Node Graph
tab in the UI, and can also be modified via Python scripting using
NodegraphAPI
.
Katana ships with many built-in types of nodes, but custom node types can also be created via Python scripting.
There are two major groups of node types shipped with Katana:
3D nodes that produce scene graph that can be inspected in Katana’s Scene Graph tab.
3D nodes and their parameters effectively represent and control corresponding Ops that form Op graphs that are processed by Katana’s geometry library (Geolib) to generate the scene data that can be viewed and inspected in Katana’s Scene Graph and Attributes tabs.
2D nodes that produce images that can be viewed in Katana’s Monitor tab. [1]
Introduction to NodegraphAPI¶
Python package for working with nodes of a Katana project.
Node
types are registered through this package. Created nodes have
a hierarchy of Parameter
s. All nodes exist inside of a GroupNode
and there is always a root node found with GetRootNode
.
This module manages several of the application global states. Things like the current frame, and time increments are stored with the node graph.
Node Base Classes¶
- class NodegraphAPI.Node¶
Bases:
pybind11_object
Base class for all types of nodes in Katana.
Katana nodes are created and retrieved through the node graph. A node stores parameters and both input and output ports. A
GroupNode
subclass defines nodes that can contain other nodes as children.
- class NodegraphAPI.GroupNode¶
Bases:
Node
Base class for all types of nodes that contain other nodes as children.
Katana nodes are created and retrieved through the node graph. A node stores parameters and both input and output ports. This
GroupNode
subclass defines nodes that can contain other nodes as children.
Contents of Section¶
- Creating and Retrieving Nodes
- Node Properties
- Parameters
- Introduction to Parameters
- Parameter Base Class
- Contents of Section
- Getting and Setting Parameters
- Expressioned Parameters
- Curve Parameters
- Group Parameters
Parameter.createChildGroup()
Parameter.createChildNumber()
Parameter.createChildNumberArray()
Parameter.createChildString()
Parameter.createChildStringArray()
Parameter.createChildXmlIO()
Parameter.deleteChild()
Parameter.getChild()
Parameter.getChildByIndex()
Parameter.getChildren()
Parameter.getNumChildren()
Parameter.reorderChild()
Parameter.reorderChildren()
- Array Parameters
- Dynamic Parameters
- Enableable Parameters
- Parameter Node Defaults
- Parameter Hints
- Non-persistent Parameters
- Serializing Parameters
- Connecting Nodes
- Serializing Nodes
- Groups and LiveGroups
GetViewPortPosition()
SetViewPortPosition()
- Send and Return Ports
- LiveGroups
GetNodeModTime()
SetNodeModTime()
LiveGroupNode
UpdateAllLiveGroupSources()
LoadAllLiveGroups()
LockAllLiveGroups()
MakeAllLiveGroupsEditable()
MakeAllParentLiveGroupsEditable()
CanBeDifferentFromSource()
SetLiveGroupLoadingEnabled()
IsLiveGroupLoadingEnabled()
SetLiveGroupCachingEnabled()
IsLiveGroupCachingEnabled()
ConvertGroupToLiveGroup()
CalculateLiveGroupDepth()
AssetPublishing
AssetPublishing.__init__()
AssetPublishing.errorMessageDialogsEnabled()
AssetPublishing.getAssetType()
AssetPublishing.getErrorMessage()
AssetPublishing.getExtraOptions()
AssetPublishing.getFilenameOrAssetIdToPublish()
AssetPublishing.getNodeName()
AssetPublishing.getPublishedFilenameOrAssetID()
AssetPublishing.getState()
AssetPublishing.isErrorLoggingEnabled()
AssetPublishing.isOverwriteAssetEnabled()
AssetPublishing.isSuccessLoggingEnabled()
AssetPublishing.kAssetPublishingCancelled
AssetPublishing.kAssetPublishingFailed
AssetPublishing.kAssetPublishingStarted
AssetPublishing.kAssetPublishingSucceeded
AssetPublishing.setAssetType()
AssetPublishing.setErrorLoggingEnabled()
AssetPublishing.setErrorMessage()
AssetPublishing.setErrorMessageDialogsEnabled()
AssetPublishing.setExtraOptions()
AssetPublishing.setFilenameOrAssetIdToPublish()
AssetPublishing.setNodeName()
AssetPublishing.setOverwriteAssetEnabled()
AssetPublishing.setPublishedFilenameOrAssetID()
AssetPublishing.setState()
AssetPublishing.setSuccessLoggingEnabled()
- Contexts
- NetworkMaterialEdit
- NetworkMaterialEdit API
NetworkMaterialEditNode
NetworkMaterialEditNode.__init__()
NetworkMaterialEditNode.depopulate()
NetworkMaterialEditNode.flushEdits()
NetworkMaterialEditNode.getContentsLayoutAttributes()
NetworkMaterialEditNode.getLastUpstreamMaterialHash()
NetworkMaterialEditNode.getMaterialAttr()
NetworkMaterialEditNode.getNetworkMaterialEditRequiresUpdate()
NetworkMaterialEditNode.getNetworkMaterials()
NetworkMaterialEditNode.getNodeFromSourceNodeName()
NetworkMaterialEditNode.getNodeStates()
NetworkMaterialEditNode.getScenegraphLocation()
NetworkMaterialEditNode.getSourceNodeNameFromNode()
NetworkMaterialEditNode.handleNetworkMaterialNodeCreate()
NetworkMaterialEditNode.invalidateLayout()
NetworkMaterialEditNode.isAutoUpdateDisabled()
NetworkMaterialEditNode.isChildNodePersistent()
NetworkMaterialEditNode.isPopulated()
NetworkMaterialEditNode.isUserParameterEditingAllowed()
NetworkMaterialEditNode.polish()
NetworkMaterialEditNode.repopulate()
NetworkMaterialEditNode.setDisableAutoUpdate()
NetworkMaterialEditNode.setSceneGraphLocation()
- NetworkMaterialEdit API
- Example Scripts
Footnotes