Checkout the CenterOp_Dynamic example in the SDK.
newOp.AddPortGroup( "Output" ) ;
newOp.AddOutputPortByClassID(siKinematicStateId, OUTPUT_PORTGROUP);
// We only have a single input port, but we will allow up to 10,000 objects to connect to it.
// Each connected object will appear as a separate instance of the "inputs" port group
newOp.AddPortGroup( "Inputs", 0, 10000 ) ;
newOp.AddInputPortByClassID(siKinematicStateId, INPUT_PORTGROUP);
-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM]On Behalf Of Robert Moodie
Sent: October 12, 2006 1:11 PM
To: XSI(at)Softimage.COM
Subject: Re: getting PortGroup instances from a Self-installed Custom Operator
----- Original Message -----
From: "Mathieu Leclaire" <mleclair(at)hybride.com>
> OK, I'm trying to figure out how to get multiple objects connected to a
> self-installed custom operator. I'm sure I'm missing something obvious here
> but can someone please explain to me how to set up my operator so I can
> analyze multiple objects connected to a PortGroup?
Operator.ConnectToGroup (Group, Object) ?
>
> I get that from the OperatorContext I can call GetInputValue and pass which
> port, group and instance I want but how can I find out how many instances
> are actually connected to the PortGroup?
Operator.GetNumInstancesInGroup ?
> And I saw that from the CustomOperator Class you can call AddPortGroup to
> create a port group with the min and max number of objects allowed to be
> connected but how do you set your max to unlimited? Since I doubt we'll be
> using more then 3 or 4 instances, I could give it a large number but I'm
> sure there must be an argument to specify unlimited.
Andrew Skowrownski told me there is a way to do this but I don't have the info any more.
Is it possible that unlimited objects in a port group can only be done with SPDL:
Have a look at the Vertex colour mixer in the SDK examples:
Origin = Pick;
PickMessage = "Pick Vertex Color";
Min = 2;
Max = Infinite;
Halfy?
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi