|
Hi Andy,
The last time a create a scop "on the fly" I used several groups. At my first try I only used one group and it doesn't work. I tried with one group by object and it works ( thanks Alan ).
Here is a sample code from a self installed plugin script :
//***** Build the Custom Operator "on-the-fly" ****** var op = XSIFactory.CreateScriptedOp("SplashOp", SplashOp_Update.toString(),"JScript");
// define connections //Goup 1 var group = op.addportgroup( "MainGroup", 1, 2 );
//**Out Port op.addoutputport( oSpeedParam, "outSpeed", group.index ); ... //**In Port op.addinputport
( oSplashEmit.posy, "inPosY", group.index ); ... //Group 2 var group2 = op.addportgroup( "inputgroup" ); op.addinputport( oGround.activeprimitive, "inGround", group2.index );
-- Guillaume Laforge freelance TD | cg Artist
On 7/31/06, Andy Nicholas <andy(at)andynicholas.com
> wrote:Hi guys,
I'm having a major problem trying to connect a specific custom property to
a scripted operator. My ports look like this:
<obj>.kine.global (IN) <obj>.MyProperty (IN) <obj>.kine.global (OUT)
When I first create the operator, it's not a problem to specify the exact
connections because I use the ApplyOperator command like this:
ApplyOperator("KineOperator", "[sphere.kine.global,sphere.MyProperty,sphere.kine.global]");
This allows me to specify the custom property "MyProperty" to be used. If
I don't do that, I have the problem where it will just connect to the first CustomProperty that exists underneath the object, rather than the one I want it to connect to.
My issue, is that I want to be able to connect multiple objects to this
operator. So I want to be able to do this:
operator.ConnectToGroup(0, box_obj);
to connect other objects to the same operator after I've created it.
The problem with this, is that I'm not able to specify the exact
connection set. As a result, the first custom property underneath the object gets connected instead of the one I want.
Does anyone know of a way round this problem?
BTW, my property is a self installed custom property. Is it possible to
create a custom property with an SPDL? If I could, then I'd be able to specify the custom property's GUID in the port definition and all would be fine.
Thanks
Andy
--- Unsubscribe? Mail
Majordomo(at)Softimage.COM with the following text in body: unsubscribe xsi
|