How to reference an operator's built-in fcurve

Discussions concerning programming of SOFTIMAGE©
Post Reply
jacobo
Posts: 41
Joined: 11 Jun 2009, 00:06

How to reference an operator's built-in fcurve

Post by jacobo » 17 May 2013, 10:47

Hi;

I have a simple twist op applied to a piece of geometry in my scene, the profile f-curve of which I'd like to reference to and control by another f-curve in a separate ppg. How do I go about accomplishing that?

Thanx in advance for all the help.

Cheers;

AJ

jacobo
Posts: 41
Joined: 11 Jun 2009, 00:06

Re: How to reference an operator's built-in fcurve

Post by jacobo » 20 May 2013, 07:32

Oh oh... C'mon, no one?... Is it impossible to do? i couldn't find anything in the Sdk docs on this, so at least a pointer would do great.

User avatar
origin
Posts: 619
Joined: 09 Jun 2009, 11:59
Location: warsaw

Re: How to reference an operator's built-in fcurve

Post by origin » 20 May 2013, 14:13

I don't fully understand what you want, but this is how I get move proportional fcurve

Code: Select all

CStatus getPropFcurve(FCurve &out_fc) //get move proportional fcurve
	{

		CSIObjectRefArray objArray = Application().FindObjects( siOperatorID );
		Operator movprop;
        for ( LONG i=0; i<objArray.GetCount(); i++ )
        {
			Operator op(objArray[i]);
			if (op.GetName() == "MoveProportional")
			{
				movprop = op;
				break;
			}          
        }
		if(movprop.GetName() != "MoveProportional")
			return CStatus::Fail;
		CParameterRefArray par = movprop.GetParameters();
		out_fc = par.GetValue(L"profile");
		return CStatus::OK;
	}

jacobo
Posts: 41
Joined: 11 Jun 2009, 00:06

Re: How to reference an operator's built-in fcurve

Post by jacobo » 20 May 2013, 16:28

Thanx so much for the reply origin. What I want to be able to do is simply control the twist profile fcurve of the twistop via a proxy fcurve in a custom ppg, exactly like you would writing an expression on a param to have it controlled by another. Unfortunately for me, your example is in C++, and I don't know anything in that department :( I've searched the SDK docs, but just couldn't find anything related to this. I'm really stuck... :(

User avatar
origin
Posts: 619
Joined: 09 Jun 2009, 11:59
Location: warsaw

Re: How to reference an operator's built-in fcurve

Post by origin » 20 May 2013, 23:07

Code: Select all

// Select twistop and run script
var prop = ActiveSceneRoot.AddProperty( "CustomProperty",false, "MyCustomParam") ;
var proxypar = Selection(0).Parameters("profile");
var par = prop.AddProxyParameter( proxypar, "proxy_crv", "proxycurve");
prop.PPGLayout.AddFCurve( "proxy_crv" );
InspectObj( prop ) ;

Post Reply

Who is online

Users browsing this forum: No registered users and 41 guests