Operator.PortGroups operator

導入

v4.0

詳細

PortGroup オブジェクトのコレクションを(PortGroupCollection として)戻します。

C#構文

// get accessor

PortGroupCollection rtn = Operator.PortGroups;

JScript の例

/*

	This example illustrates how to browse the port groups of an operator.

	You can find out useful information such as what is the minimum number

	of objects that must be provided in order to connect to this group.

*/

var cone = Application.ActiveSceneRoot.AddGeometry("Cone", "NurbsSurface")

var op = ApplyOp( "Twist", cone )(0);

var ePortGroups = new Enumerator( op.PortGroups );

for ( ; !ePortGroups.atEnd(); ePortGroups.moveNext() )

{

	var portgroup = ePortGroups.item();

	Application.LogMessage( "minimum number of objects required by group: " + portgroup.min );

	Application.LogMessage( "maximum number of objects allowed in group: " + portgroup.max );

	Application.LogMessage( "filter to be used on object trying to connect: " + portgroup.filter );

	Application.LogMessage( "pickprompt displayed in status bar during pick session: " + portgroup.pickprompt );

	Application.LogMessage( "group flags: " + portgroup.flags );

}

// Expected result:

//INFO : minimum number of objects required by group: 1

//INFO : maximum number of objects allowed in group: 1

//INFO : filter to be used on object trying to connect: DeformableComponent

//INFO : pickprompt displayed in status bar during pick session: Deformation Value

//INFO : group flags: 513

//INFO : minimum number of objects required by group: 0

//INFO : maximum number of objects allowed in group: 1

//INFO : filter to be used on object trying to connect: 

//INFO : pickprompt displayed in status bar during pick session: 

//INFO : group flags: 128