Node Properties =============== .. currentmodule:: NodegraphAPI Functions --------- Flags ~~~~~ .. autofunction:: IsNodeEdited .. autofunction:: SetNodeEdited .. autofunction:: IsNodeViewed .. autofunction:: SetNodeViewed .. autofunction:: IsNodeSelected .. autofunction:: SetNodeSelected .. autofunction:: SetAllSelectedNodes .. autofunction:: IsNodeHidden .. autofunction:: SetNodeHidden .. autofunction:: IsNodeFloating .. autofunction:: SetNodeFloating .. autofunction:: IsNodeThumbnailEnabled .. autofunction:: SetNodeThumbnailEnabled .. autofunction:: IsNodeLockedByParents Shapes ~~~~~~ .. autofunction:: GetNodeShapeAttr .. autofunction:: GetNodeShapeAttrs .. autofunction:: SetNodeShapeAttr .. autofunction:: SetNodeShapeNodeAttrs .. autofunction:: DeleteNodeShapeAttr Comments ~~~~~~~~ .. autofunction:: GetNodeComment .. autofunction:: SetNodeComment Position ~~~~~~~~ The function :func:`SetNodePosition` sets the position of a node in the :kat:ui:`Node Graph` UI. For example, to create then position a :kat:node:`PrimitiveCreate` node:: # Get the root node rootNode = NodegraphAPI.GetRootNode() # Create a new node at root level primNode = NodegraphAPI.CreateNode('PrimitiveCreate', rootNode) # Define X & Y values position = (0, 100) # Set node position NodegraphAPI.SetNodePosition(primNode, position) .. autofunction:: GetNodePosition .. autofunction:: SetNodePosition Miscellaneous ~~~~~~~~~~~~~ .. autofunction:: GetMenuPath .. autofunction:: CheckNodeType Instance Methods ---------------- .. currentmodule:: Nodes3DAPI Flags ~~~~~ .. automethod:: Node3D.isAutoRenameAllowed .. automethod:: Node3D.setAutoRenameAllowed .. automethod:: Node3D.isBypassed .. automethod:: Node3D.setBypassed .. automethod:: Node3D.isLocked .. automethod:: Node3D.setLocked .. automethod:: Node3D.isMarkedForDeletion .. automethod:: Node3D.delete .. automethod:: Node3D.isResetPossible .. automethod:: Node3D.customReset Name ~~~~ Each node has a name, which is unique within the bounds of a Katana recipe. Name-spacing does not exist for node names, which means that a call to:: node = NodegraphAPI.GetNode('PrimitiveCreate') node.setName("Teapot") print(node.getName()) It may not behave as expected if the chosen name is already in use by another node in the scene. In that case :func:`~Node3D.setName` finds a similar - but unique - name, uses that, and returns the new unique node name. It's possible to store a string user attribute on a node that utilities can search for in order to reference a node in a smaller context. This is a simple pattern that can provide a more localized pseudo node name. See :doc:`Parameters/index` for more on adding parameters. .. warning:: Node names cannot contain spaces. Any spaces or invalid characters that are used in the node name are converted into underscores. For example, the node name "Material Plastic" becomes "Material_Plastic". .. automethod:: Node3D.getName .. automethod:: Node3D.setName Type ~~~~ .. automethod:: Node3D.getBaseType .. automethod:: Node3D.getType .. automethod:: Node3D.setType Parameters ~~~~~~~~~~ See :doc:`Parameters/index`. Parents ~~~~~~~ .. automethod:: Node3D.setParent .. automethod:: Node3D.getParent Attributes ~~~~~~~~~~ .. caution:: Node attributes should not be confused with scene graph attributes .. automethod:: Node3D.getAttributes .. automethod:: Node3D.setAttributes