## ICECompoundNode

Object Hierarchy | Related C++ Class: ICECompoundNode

### Inheritance

###

SIObject

ProjectItem

ICENode

ICENodeContainer

ICECompoundNode

### Introduced

v7.0

### Description

The ICECompoundNode object represents a node sub-graph containing other ICENode objects such as ICECompoundNode and ICEDataProviderNode. An ICECompoundNode is like a basic ICENode with input and output ports. Note: ICETree objects cannot be part of a ICECompoundNode sub-graph.

### Methods

AddCustomOp | AddICEAttribute | AddScriptedOp | AddScriptedOpFromFile
AnimatedParameters2 | BelongsTo | EvaluateAt | GetGroupInstanceCount
GetICEAttributeFromName | GetPortCount | GetPortFromIndex | GetPortFromIndex2
GetPortFromName | GetPortFromName2 | IsA | IsAnimated2
IsClassOf | IsEqualTo | IsKindOf | IsLocked
IsSelected | LockOwners | RemoveICEAttribute | SetAsSelected
SetCapabilityFlag | SetLock | TaggedParameters | UnSetLock

### Properties

Application | BranchFlag | Capabilities | Categories
CompoundNodes | DataModifierNodes | DataProviderNodes | EvaluationID
ExposedPorts | Families | FullName | Help
HierarchicalEvaluationID | ICEAttributes | InputPorts | IsConnected
LockLevel | LockMasters | LockType | Major
Minor | Model | Name | NestedObjects
Nodes | ObjectID | Origin | OriginPath
OutputPorts | Owners | PPGLayout | Parameters
Parent | Parent3DObject | PortGroupCount | RootNodeContainer
Selected | Type |  |

### Examples

#### Python Example

    # Sample code to log the inner nodes for all the compound nodes of a graph

    import win32com.client

    from win32com.client import constants

    xsi = Application

    # Recursive function for traversing a node graph

    def TraverseNodeGraph( in_node, level ):

    	indent = level * '.'

    	# Log the visited compound node name

    	if in_node.IsClassOf( constants.siICECompoundNodeID ):

    		xsi.LogMessage( indent + in_node.Name )

    	nodeCount = 0

    	nodes = ()

    	if in_node.IsClassOf( constants.siICENodeContainerID ):

    		# The input node is a ICENodeContainer, let's get its inner compound nodes

    		nodes = in_node.CompoundNodes

    		nodeCount = nodes.Count

    	# Recursively traverse the graph

    	for i in range(nodeCount):

    		TraverseNodeGraph( nodes[i], level+2 )

    # Create a sample twist deformer graph first

    xsi.CreatePrim( "Cube", "MeshSurface" )

    xsi.SetValue( "cube.polymsh.geom.subdivu", 15 )

    xsi.SetValue( "cube.polymsh.geom.subdivv", 14 )

    xsi.ApplyOp( "ICETree", "cube", None, None, None, 0 )

    xsi.AddICENode( "GetDataNode", "cube.polymsh.ICETree" )

    xsi.SetValue( "cube.polymsh.ICETree.SceneReferenceNode.Reference", "cube.polymsh.PointPosition" )

    xsi.AddICENode( "RotateVectorNode", "cube.polymsh.ICETree" )

    xsi.AddICENode( "3DVectorToScalarNode", "cube.polymsh.ICETree" )

    xsi.AddICENode( "SetData", "cube.polymsh.ICETree" )

    xsi.SetValue( "cube.polymsh.ICETree.SetData.PredefinedAttributeName", "PointPosition" )

    xsi.AddAttributeToSetDataICENode( "cube.polymsh.ICETree.SetData", "PointPosition", constants.siComponentDataTypeVector3, constants.siComponentDataContextComponent0D, constants.siComponentDataStructureSingle )

    xsi.ConnectICENodes( "cube.polymsh.ICETree.port1", "cube.polymsh.ICETree.SetData.set" )

    xsi.ConnectICENodes( "cube.polymsh.ICETree.RotateVectorNode.vector", "cube.polymsh.ICETree.SceneReferenceNode.value" )

    xsi.ConnectICENodes( "cube.polymsh.ICETree.SetData.pointposition", "cube.polymsh.ICETree.RotateVectorNode.result" )

    xsi.ConnectICENodes( "cube.polymsh.ICETree.3DVectorToScalarNode.vector", "cube.polymsh.ICETree.SceneReferenceNode.value" )

    xsi.AddICENode( "MultiplyNode", "cube.polymsh.ICETree" )

    xsi.ConnectICENodes( "cube.polymsh.ICETree.MultiplyNode.value1", "cube.polymsh.ICETree.3DVectorToScalarNode.y" )

    xsi.AddICENode( "ScalarToRotationNode", "cube.polymsh.ICETree" )

    xsi.ConnectICENodes( "cube.polymsh.ICETree.ScalarToRotationNode.angle", "cube.polymsh.ICETree.MultiplyNode.result" )

    xsi.ConnectICENodes( "cube.polymsh.ICETree.RotateVectorNode.rotation", "cube.polymsh.ICETree.ScalarToRotationNode.rotation" )

    xsi.SetValue( "cube.polymsh.ICETree.ScalarToRotationNode.y", 1 )

    xsi.SetValue( "cube.polymsh.ICETree.ScalarToRotationNode.x", 0 )

    xsi.SetValue( "cube.polymsh.ICETree.MultiplyNode.value2", 20 )

    xsi.CreateICECompoundNode("cube.polymsh.ICETree.3DVectorToScalarNode,cube.polymsh.ICETree.MultiplyNode,cube.polymsh.ICETree.ScalarToRotationNode", "Compound1")

    xsi.CreateICECompoundNode("cube.polymsh.ICETree.Compound1.ScalarToRotationNode,cube.polymsh.ICETree.Compound1.MultiplyNode", "Compound2")

    xsi.CreateICECompoundNode("cube.polymsh.ICETree.Compound1", "CompoundTop")

    # Get the ICETree off the cube primitive and start iterating the graph

    cube = xsi.Selection(0)

    cubeICETree = cube.ActivePrimitive.ICETrees[0]

    level = 0

    TraverseNodeGraph( cubeICETree, level )

### See Also

CreateICECompoundNode