CustomProperty.AddFCurveParameter

Introduced

v4.0

Description

Adds an FCurve Parameter to the CustomProperty. An FCurve of this type is often called a "Profile Curve" because, unlike most FCurves, this curve does not animate any parameter, but instead is available for use in any fashion the plug-in developer or user wishes. Unlike parameters that have simple types like an Integer or a String, this Parameter is an instance of an FCurve. It uses units of Frames for its x axis, but because it does not directly animate any object this axis can actually be interpreted in any fashion. An example use of an FCurve parameter can be found on the Bulge Operator.

The FCurve object is retrived via the Parameter.Value property. This should not be confused with the method for retrieving an FCurve that is animating a "basic" parameter, via the Parameter.Source property.

In order to view the FCurve on the Property Page for the custom property use PPGLayout.AddFCurve.

C# Syntax

Parameter CustomProperty.AddFCurveParameter( String in_ScriptName );

Scripting Syntax

oReturn = CustomProperty.AddFCurveParameter( ScriptName );

Return Value

The newly created Parameter object.

Parameters

Parameter Type Description
ScriptName string Script name of the new parameter

Examples

VBScript Example

'Example showing how to add a FCurve parameter to a custom
'parameter and to use the Object Model to establish an 
'initial curve
dim oCustomProperty, oFCurveParameter, oFCurve, oLayout
set oCustomProperty = ActiveSceneRoot.AddProperty( "CustomProperty", false, "NewPSet" )
set oFCurveParameter = oCustomProperty.AddFCurveParameter("TestFCurve")
'The Value of the Parameter is an FCurve object
set oFCurve = oFCurveParameter.Value
oFCurve.BeginEdit
oFCurve.RemoveKeys
oFCurve.AddKey -10, -5
oFCurve.AddKey 0, 100
oFCurve.AddKey 10, -5
oFCurve.AddKey 20, -200
oFCurve.AddKey 30, 100
oFCurve.AddKey 40, 100
oFCurve.EndEdit
set oLayout = oCustomProperty.PPGLayout
oLayout.AddFCurve "TestFCurve", 150 
InspectObj oCustomProperty