Object Hierarchy | Related C++ Class: PortGroup
Inheritance
SIObject
PortGroup
Introduced
4.0
Description
A portgroup is a group of Port objects on an Operator. The port group is a logical grouping of multiple port connections that are normally scoped by a X3DObject. A single portgroup can contain both InputPorts and OutputPorts.
Note: The PortGroup object should not be confused with the Group object.
You can determine the number of port groups defined by an operator using the Operator.GetNumPortGroups method and determine the number of ports in a PortGroup using the Operator.GetNumPortsInGroup method.
For built-in Operators the port groups contain all ports that will be connected to parts of the selected or picked object. For example, when the Twist operator is applied to a selected object, the operator has ports that read from the object's local KinematicState and Geometry and write to the result object's geometry.
However, for typical Self-Installed Custom Operators, all outputs and inputs can be in a single PortGroup because the individual targets for each port are specifically provided at the time of calls to CustomOperator.AddInputPort or AddCustomOp. In fact, the concept of PortGroup can be completely ignored for most custom operators. However any dynamic input inside an advanced operators should be in its own PortGroup to permit usage of Operator.ConnectToGroup.
Multiple objects can connect to the same port group, for example, the loft operator may read from many curves to generate the resulting mesh. Each of these input curves are connected to the same port group and each connection is called a port group instance. You can determine the number of objects connected to a port group by using Operator.GetNumInstancesInGroup or PortGroup.InstanceCount.
Use SIObject.Parent to get the Operator for this PortGroup and SIObject.Name to get the name of this port group.
From the port you can determine which port group a port belongs to using the Port.GroupName or Port.GroupIndex properties. You can determine which port group instance a port belongs to using the Port.GroupInstance property.
Methods
Properties
|
|
|
See Also
Examples
• See PortGroup.1.js
Autodesk Softimage 2011