ICENode.GetPortFromName2

Introduced

v11.0 (2013)

Description

Returns the ICENodePort object that matches a specific port name. This method is similar to ICENode.GetPortFromName but specific to the python language.

C# Syntax

Object ICENode.GetPortFromName2( String portname );

Scripting Syntax

oReturn = ICENode.GetPortFromName2( PortName );

Return Value

ICENodePort

Parameters

Parameter Type Description
PortName String Port name to match.

Examples

Python Example

# Demonstrate how to get a port by name in Python
from siutils import *
si = si()
si.NewScene("",False)
si.CreatePrim("Sphere", "MeshSurface", "", "")
si.ApplyOp("ICETree", "sphere", "siNode", "siPersistentOperation", "", 0)
si.AddICENode("ICENodes\\ColorNode.Preset", "sphere.polymsh.ICETree")
node = si.GetValue('sphere.polymsh.ICETree.ColorNode')
port = node.GetPortFromName2('Value')
log( port.GetValueAtFrame(0) )