Operator.InputPorts
 
 
 

Operator.InputPorts operator

Description

Returns a collection of InputPort objects as an InputPortCollection.

C# Syntax

// get accessor
InputPortCollection rtn = Operator.InputPorts;

Examples

JScript Example

/*
        This example demonstrates how to access the input port(s) by traversing the object's 
        operator stack. The operator in this case is the generator operator used to generate
        the cone primitive.
*/
NewScene ( null, false );
var cone = ActiveProject.ActiveScene.Root.AddGeometry( "Cone", "NurbsSurface" );
var e = new Enumerator( cone.ActivePrimitive.ConstructionHistory );
for ( ; !e.atEnd(); e.moveNext() ) {
        var op = e.item();
        Application.LogMessage( "Found " + op.InputPorts.Count + " input port(s)." );
        for ( var i=0; i<op.InputPorts.Count; i++ ) {
                var port = op.InputPorts(i);
                Application.LogMessage( op.Name + ":" + port.Name + ":" + port.Target2 );
        }
}
// Expected result:
//INFO : Found 1 input port(s).
//INFO : Geometry:Port_0:cone.cone