/*
This example illustrates how to generate a mesh by using the loft operator and
a number of input curves. The code also illustrates how to traverse the operator's
port group, port group instances and ports and logs the name of the port, its type
and the full path name of the object connected to the port.
*/
NewScene( null, false );
CreatePrim( "Grid", "NurbsSurface" );
// Bend grid
ApplyOp( "Bend", grid );
// Get grid from selection
var grid = selection(0);
// Get bend operator from the grid's construction history
var e = new Enumerator( grid.ActivePrimitive.ConstructionHistory );
var op;
for ( ; ! e.atEnd(); e.moveNext() )
if ( e.item().type == "bendop" )
{
op = e.item();
break;
}
// Print the number of port groups defined by the bend operator
Application.LogMessage( op.Name + ": num port groups = " + op.GetNumPortGroups() );
// Expected result:
// INFO : "Bend Op: num port groups = 1" |