Omit operator port connections (Was: What is one feature you 'd love to see i 2004-08-17 - By Guy Rabiller
Back Hey Felix,
it depends if you use scripted or compiled operators.
If it is for scripted operators, then as they support run-time creation, you can use the CustomOperator method "AddPortGroup". You have the Min and Max arguments, if you set Min=0, then this PortGroup is optional. The use the "ConnectToGroup" method. ( check the CustomOperator object in the scripting doc for more details ).
For compiled operators, first you have to add to your spdl, in a Group section the Min and Max tokens:
Group "Group_2" { Origin = Pick; PickMessage = "Pick CustomPSet";
Input "InPSet" { Major = {9E04FCEE-10 (See http://CEE-10.ora-code.com)F3-11D0-943A-00AA006D3165}; Minor = {76332575-D242-11D0-B69C-00AA003B3EA6}; Interface = {00000000-0000-0000-C000-000000000046}; }
Min = 0; Max = Infinite; }
Here the PortGroup is optional and accept an infinite number of connections.
Then from C++, to connect items to PortGroups, you also have to use the "ConnectToGroup" method. Unfortunately, this method is not exposed to the CPP SDK, so you will have to use the ComAPIHandler: // oOp is a CustomOperator // lGroup the PortGroup index // oRef the CRef to the item being connected CValue outArg; CValueArray args(0); args.Add( lGroup ); args.Add( oRef ); CComAPIHandler comOp( oOp.GetRef() ); comOp.Invoke( L"ConnectToGroup",CComAPIHandler::Method, outArg, args );
Hope this helps. -- guy rabiller | 3d technical director @ LaMaison
-- -- Original Message -- -- From: "Felix Gebhardt" <gebhardt@(protected)> To: <XSI@(protected)> Sent: Tuesday, August 17, 2004 12:22 PM Subject: Omit operator port connections (Was: What is one feature you'd love to see in the next version of XSI ?)
> Sorry to bring up this topic again but as I understand it the option to omit > port connections does work now. Just I can't find it anywhere in the docs. > How is it done? Anybody came by it somewhere? > > F. > > Guy Rabiller wrote: > > Another reason why this kind of graph could be usefull: Custom > > development. With the ability now to create custom operators with > > optional ( and multiple instances ) PortGroup connections, ... > > --- > Unsubscribe? Mail Majordomo@(protected) with the following text in body: > unsubscribe xsi > >
--- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|