AddInputPortByClassID (CustomOperator)
Introduced
5.1
Description
Adds an InputPort to the custom operator. This method makes it possible to define a connection to a custom operator by specifying the type of object it needs to connect to, rather than providing an existing object.
This is for use in advanced operators, where the port may be optional and dynamically connected after the operator is instantiated. Each port defined in this way must be in its own PortGroup so that the connection can be established through Operator.ConnectToGroup.
For example, if an operator supports an optional connection to a ClusterProperty, the CustomOperator.AddInputPort method forces the existence of a ClusterProperty at the time of the operator definition, even if the operator is not meant to connect to a ClusterProperty until some later time. This method avoids the need for any ClusterProperty to actually exist in the scene.
Scripting Syntax
CustomOperator.AddInputPortByClassID( TargetClassID, [PortName], [PortGroup], [Flags] )
C# Syntax
InputPort CustomOperator.AddInputPortByClassID( siClassID in_TargetClassID, String in_PortName, Int32 in_portgroup, Int32 in_flags );
Parameters
|
Parameter |
Type |
Description |
|
TargetClassID |
Type of object that can connect to this object, for example siKinematicStateID, siClusterPropertyID, siParameterID or siPrimitiveID. |
|
|
PortName |
Name of the port Default Value: The default name is "In" + the Parameter.ScriptName of the object being connected, for example "Inposx".
|
|
|
PortGroup |
Index of the port group. Default Value: -1 |
|
|
Flags |
Mask of port group flags described by siPortFlags. Default Value: 0 |
Return Value
The newly created InputPort
See Also
SOFTIMAGE|XSI v6.01