Operator.IsConnected operator

導入

v4.0

詳細

オペレータが 1 つ以上のOutputPortに接続されているかどうかを示すBoolean値(接続されている場合は true、接続されていない場合は false)を戻します。

C#構文

// get accessor

Boolean rtn = Operator.IsConnected;

JScript の例

/*

	This example demonstrates how to test to see whether an operator 

	is connected to a scene object or not.

*/

NewScene( null, false );

var obj = CreatePrim( "Cube", "MeshSurface" );

// Create an unconnected operator

var op = XSIFactory.CreateObjectFromPreset( "Bend", "Operators" );

// Test if operator is connected (should return false)

Application.LogMessage( op.Name + " is connected = " + op.IsConnected );

// Now connect the operator to a cube and test it again (should return true)

op.Connect( obj );

Application.LogMessage( op.Name + " is connected = " + op.IsConnected );

// Expected result:

//INFO : Bend Op is connected = false

//INFO : Bend Op is connected = true