???
Then how do I get XSI to recognize the parameters are animated by a
Scripted Operator if the operator doesn't connect to the parameters
directly? That's the main problem.
Matt
> -----Original Message-----
> From: owner-xsi(at)Softimage.COM
> [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Stephen Blair
> Sent: Friday, May 30, 2008 12:31 PM
> To: XSI(at)Softimage.COM
> Subject: RE: Scripted Operator problems
>
> Hi Matt
>
> For siParameterID port groups, ConnectToGroup won't connect
> to parameters, it will connect the object that contains the
> parameter (eg if you try to connect to posx, you get
> connected to kine.local or kine.global).
>
>
>
>
> -----Original Message-----
> From: owner-xsi(at)Softimage.COM
> [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Matt Lind
> Sent: Fri 30 May 2008 3:04 PM
> To: XSI(at)Softimage.COM
> Subject: Scripted Operator problems
>
> Anybody have success creating a scripted operator with
> multiple output ports by Class ID that connect to parameters?
>
> I wrote a scripted operator which functions exactly as it
> should from a user's point of view. The problem is my script
> to apply the operator specifies it should connect to 2
> parameters: the 'projtrsu' and 'projtrsv' of a texture
> projection def property. But for some reason XSI is not
> connecting the operator to the specified parameters directly,
> instead it's connecting the operator to the texture
> projection def property which owns the parameters. Our game
> exporter automatically detects animated parameters on scene
> elements and dumps values for the entire frame range, but
> since my scripted operator is not connecting to the
> parameters directly, our exporter doesn't detect they're
> animated, and therefore does not export them. Querying both
> the parameters and property via Parameter.IsAnimated(),
> Property.NodeAnimatedParameters,
> Property.AnimatedParameters(), and so on all return
> false/null/not animated/whatever. Very irritating to say the least.
>
> Can anybody shed some light on the situation? I need to
> connect the operator directly to the specified parameters.
>
> //-----------------------------------------
> // Create an empty operator to start
> var oCustomOperator = XSIFactory.CreateObject( "NC_EyeOperator" );
>
> // Output PortGroups
> oOutputPortGroupU = oCustomOperator.AddPortGroup( "OutputU",
> 1, 2 ); oCustomOperator.AddOutputPortByClassID(
> siParameterID, "TranslationU", oOutputPortGroupU.Index );
>
> oOutputPortGroupV = oCustomOperator.AddPortGroup( "OutputV",
> 1, 2 ); oCustomOperator.AddOutputPortByClassID(
> siParameterID, "TranslationV", oOutputPortGroupV.Index );
>
> // Input PortGroups
> var oInputSourceReferencePortGroup =
> oCustomOperator.AddPortGroup( "InputSourceReference", 1, 2 );
> oCustomOperator.AddInputPortByClassID(
> siKinematicsID, "SourceReferenceGlobal",
> oInputSourceReferencePortGroup.Index );
>
> var oInputTargetReferencePortGroup =
> oCustomOperator.AddPortGroup( "InputTargetReference", 1, 2 );
> oCustomOperator.AddInputPortByClassID(
> siKinematicsID, "TargetReferenceGlobal",
> oInputTargetReferencePortGroup.Index );
>
> // Establish connections
> var oParameterU = oTextureSpaceDef.Parameters( "projtrsu" );
> var oParameterV = oTextureSpaceDef.Parameters( "projtrsv" );
> oCustomOperator.ConnectToGroup( oOutputPortGroupU.Index,
> oParameterU ); oCustomOperator.ConnectToGroup(
> oOutputPortGroupV.Index, oParameterV );
> oCustomOperator.ConnectToGroup( oInputSourceReferencePortGroup.Index,
> oSourceReference.Kinematics.Global );
> oCustomOperator.ConnectToGroup( oInputTargetReferencePortGroup.Index,
> oTargetReference.Kinematics.Global );
>
> //--------------------------------------------------------
>
>
>
> thanks,
>
> Matt
>
>
>
>
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
> body:
> unsubscribe xsi
>
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following
> text in body:
> unsubscribe xsi
>
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi