About Connection Sets

When you connect an operator to the scene graph (the set of data nodes in the Softimage scene), that operator requires a special set of input and output ports. For example, the only valid input port to connect to the Loft operator is on a NURBS curve (not a point, not a mesh, etc.). A ConnectionSet uses a specialized string syntax to delimit groups you are specifying as input.

A connection set is identified with a string expression containing a list of groups separated with a semi-colon (;). Inside each group is a list of objects or components separated with a comma (,). A set is specified either with group or port objects.

A group-level connection set is a high-level connection (implicit) specification whereas a port-level set (explicit) provides the actual objects that are connected on the operator's ports. In other words, group-level connection sets can accept objects and automatically resolve the underlying port connections, whereas port-level connection specify the exact node connection point for each port. For example, the Lattice operator takes a connection set containing the following groups and ports:




0 (the object to be deformed)

the object's primitive


the object's global kinematics


the object's global kinematics


(optional) a list of subcomponents on the object (such as a point cluster)


(optional) a weightmap on the object


the object's primitive


1 (the lattice deformer)

the lattice's implicit primitive


the lattice's global kinematics


The syntax for group-level and port-level connection sets differs slightly in that you indicate that you are explicitly specifying port-level connections in the connection set with square brackets ([ and ]) inside the double-quotation marks.


The ApplyOp command supports only group-level connection sets. To specify a port-level connection sets, use the ApplyOperator command.

For example, to explicitly specify the port connections you would use this connection set string:

"[sphere.polymsh, sphere.kine.global, sphere.kine.global, , , sphere.polymsh; lattice.lattice, lattice.kine.global]"

... and to leave the specific connections up to Softimage to resolve you would use this connection set string:


VBScript Example: Group-level connection sets

Many of the envelope commands, such as SIApplyFlexEnv, use group-level connection sets to pass the envelope object in the main group of the connection set and the bones and effectors in the secondary group:

' Build a simple Envelope with no picking required.
CreatePrim "Sphere", "MeshSurface"
Create2DSkeleton -0.019, 3.703, 0.000, -0.795, 0.000, 0.000, 0.000, 0.000, 1.000, 1
AppendBone , 0.000, -3.509, 0.000
SelectObj "sphere", , True
SIApplyFlexEnv "sphere;bone,bone1,eff", False, False

The connection set is divided into main and secondary groups using the semi-colon (;), and the members of each group are delimited using the comma (,), so in the case of sphere;bone,bone1,eff, the first group ('sphere') represents the envelope, and the second group ('bone,bone1,eff') represents the items to be enveloped.

VBScript Example: Port-level connection sets

The Lattice (deform) operator is an operator for which you can specify a port-level connection set instead of a group-level connection set, provided you use the ApplyOperator command. Here is an example of how to use this to connect a lattice to a primitive and then to a cluster:

GetPrimLattice(null, null, null, null, null);
CreatePrim("Sphere", "MeshSurface", null, null);
Scale(null, 1, 0.222437137330754, 1, siRelative, siLocal, siObj, siXYZ, null, null, null, null, null, null, null, 0);
Translate(null, 0, -1.17562305635889, 0, siRelative, siLocal, siObj, siXYZ, null, null, null, null, null, null, null, null, null, 0);

SetValue("Context.constructionmode", siConstructionModeModelling);

// This is the standard Group Level way of calling ApplyOp
// It applies the lattice on the sphere point cluster

// This does exactly the same thing, but you can specify each and every port you want to connect

// Set the ContructionHistory mode to Animation
SetValue("Context.constructionmode", siConstructionModeAnimation);

// It applies the lattice on the whole sphere, standard portgroup level

// This does exactly the same thing, but you can specify each and every port you want to connect

For a complete list of all operators and the details of their connection sets, see Operator Presets.

ConnectionSets and the Dictionary Object

The SDK provides a complete set of information about the connection set for each operator. You can query the Dictionary object directly in the Script Editor to get the complete set of information on each operator, or a list of all operators matching their family name (siFamily):

Application.LogMessage Dictionary.Info( "FlexibleEnvelope" )

' Output:
'INFO : FlexibleEnvelope
'Families = Operators, DeformOperators
'Number Of Groups = 2
	'Bounds = 1..1
	'Filter = components for deforms
	'Pick Prompt = Deformation Value
	'Flags =<undefined>
	'Bounds = 1..N
	'Filter = <undefined>
	'Pick Prompt = Skeleton Object
'Pick Node
'Pick Branch