Register Operator... How to deal with Ports.

Date : Wed, 14 May 2008 15:36:19 +0200
To : xsi(at)Softimage.COM
From : "Jeremie Passerin" <gerem.xsi(at)gmail.com>
Subject : Register Operator... How to deal with Ports.
Hi List,

Maybe a stupid question,

I'm working on an operator that took several Inputs... I know how to connect group and so connect my inputs. But I've never been able to put more than one port on a group. Should be possible, shouldn't it ?

Here is what I do :

// Code ======================================
// Create the operator
var oOp = XSIFactory.CreateObject( "MyNewOp" );

// Groups and Ports
oOp.AddPortGroup( "OutGroup" ,1,1);
oOp.AddOutputPortByClassID( siKinematicStateID, "OutGlobal" );

oOp.AddPortGroup( "InGrGlobal" ,1,1 );
oOp.AddInputPortByClassID( siKinematicStateID, "InGlobal" );
oOp.AddInputPortByClassID( siUnknownClassID, "InPrimitive" );

// Connect
oOp.ConnectToGroup( 0, oObj.Kinematics.Global );
oOp.ConnectToGroup( 1, oObj2.Kinematics.Global );
// End Code ==================================

It works fine, except Obj2.Kinematics.Global is connected to Group 1 Port 0 and 1.
And then  ???? How do I connect an object to Group 1 Port 1  ? Is it simply possible to do so ?

My solution right now is to create as many Group as Port... but that way why is the use of Ports ?


thanx

Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.