This reference page is linked to from the following overview topics: Softimage 2014, Checking Return Values for Type.
#include <xsi_fcurve.h>
The FCurve (function curve) class provides access to a set of functions for getting and setting Softimage fcurve attributes, as well as creating, retrieving, modifying and deleting fcurve keys.
FCurves can be created and connected to parameters using the Parameter::AddFCurve function. FCurves are supported by the following parameter types: siBool, siDouble, siFloat, siInt4, siInt2, siByte, siByte, siUInt4, siUInt2 and siUByte (see siVariantType for definitions of these types).
using namespace XSI; Application app; Model root = app.GetActiveSceneRoot(); X3DObject myCube; root.AddGeometry( L"Cube", L"MeshSurface", L"", myCube ); // create and connect an fcurve to the position x Parameter posx( myCube.GetParameter(L"posx") ); FCurve fcrv; posx.AddFCurve( siUnknownFCurve, fcrv ); // show the new fcurve type siFCurveType fcrvType = fcrv.GetFCurveType(); CString strFcrvType; switch ( fcrvType ) { case siUnknownFCurve: strFcrvType = L"siUnknownFCurve"; break; case siBooleanFCurve: strFcrvType = L"siBooleanFCurve"; break; case siIntegerFCurve: strFcrvType = L"siIntegerFCurve"; break; case siStandardFCurve: strFcrvType = L"siStandardFCurve"; break; case siRawDataFCurve: strFcrvType = L"siRawDataFCurve"; break; default: strFcrvType = L"Invalid FCurve type"; } app.LogMessage( L"FCurve type : " + strFcrvType );
Public Member Functions |
|
FCurve () | |
~FCurve () | |
FCurve (const CRef &in_ref) | |
FCurve (const FCurve &in_obj) | |
bool | IsA (siClassID in_ClassID) const |
siClassID | GetClassID () const |
FCurve & | operator= (const FCurve &in_obj) |
FCurve & | operator= (const CRef &in_ref) |
CValue::DataType | GetValueType () const |
siFCurveType | GetFCurveType (void) const |
CStatus | PutFCurveType (siFCurveType in_type) |
bool | GetLocked (void) const |
CStatus | PutLocked (bool in_value) |
bool | GetDependsOnFrameRate (void) const |
CStatus | PutDependsOnFrameRate (bool in_value) |
CValue | GetNoKeyValue (void) const |
CStatus | PutNoKeyValue (const CValue &in_value) |
siFCurveExtrapolation | GetExtrapolation (void) const |
CStatus | PutExtrapolation (siFCurveExtrapolation in_type) |
siFCurveInterpolation | GetInterpolation (void) const |
CStatus | PutInterpolation (siFCurveInterpolation in_type) |
CValue | GetLowClamp (void) const |
CStatus | PutLowClamp (const CValue &in_value) |
CValue | GetHighClamp (void) const |
CStatus | PutHighClamp (const CValue &in_value) |
CValue | Eval (const CTime &in_frame) const |
CValue | Eval (const double &in_frame) const |
CFCurveKeyRefArray | GetKeys (void) const |
CFCurveKeyRefArray | GetKeysBetween (const CTime &in_startframe=CTime(DBL_MAX, CTime::CUSTOM), const CTime &in_endframe=CTime(DBL_MAX, CTime::CUSTOM)) const |
bool | GetSelected (void) const |
CFCurveKeyRefArray | GetSelectedKeys () const |
CStatus | SetKeys (const CTimeArray &in_timearray, const CValueArray &in_valuearray, bool in_keepexistingkeys=false) |
CStatus | SetKeys (const CTimeArray &in_timearray, const CDoubleArray &in_valuearray, const CLongArray &in_keyinterpolationarray, const CTimeArray &in_lefttanxarray=CTimeArray(), const CDoubleArray &in_lefttanyarray=CDoubleArray(), const CTimeArray &in_righttanxarray=CTimeArray(), const CDoubleArray &in_righttanyarray=CDoubleArray(), bool in_keepexistingkeys=false) |
CStatus | SetKeyTangents (const CDoubleArray &in_array) |
bool | GetSI3DStyle (void) const |
CStatus | PutSI3DStyle (bool in_value) |
LONG | AddKey (const CTime &in_frame, const CValue &in_value, siFCurveKeyInterpolation in_interp=siDefaultKeyInterpolation, double in_ltx=DBL_MAX, double in_lty=DBL_MAX, double in_rtx=DBL_MAX, double in_rty=DBL_MAX, double in_tol=DBL_MAX, bool in_okl=false) |
CStatus | Resample (const CTime &in_startframe=CTime(DBL_MAX, CTime::CUSTOM), const CTime &in_endframe=CTime(DBL_MAX, CTime::CUSTOM), double in_step=1, bool in_keepexistingkeys=false, bool in_overridekeylock=false) |
CStatus | Smooth (const CTime &in_start=CTime(DBL_MAX, CTime::CUSTOM), const CTime &in_end=CTime(DBL_MAX, CTime::CUSTOM), double in_dFilterSize=5, double in_dSamplingStep=1, siFCurveSmoothFilterType in_filterType=siFCurveAverageFilterType, double in_dGaussianVariance=1) |
CStatus | Fit (const CTime &in_start=CTime(DBL_MAX, CTime::CUSTOM), const CTime &in_end=CTime(DBL_MAX, CTime::CUSTOM), double in_dFittingTolerance=0.1) |
CStatus | Set (const FCurve &in_fcurve) |
CStatus | RemoveKey (const CTime &in_frame, double in_tolerance=DBL_MAX, bool in_overridekeylock=false) |
CStatus | RemoveKeyAtIndex (LONG in_index, bool in_overridekeylock=false) |
CStatus | RemoveKeysAtIndex (LONG in_index, LONG in_count, bool in_overridekeylock=false) |
LONG | RemoveKeys (const CTime &in_startframe=CTime(DBL_MAX, CTime::CUSTOM), const CTime &in_endframe=CTime(DBL_MAX, CTime::CUSTOM), bool in_overridekeylock=false) |
bool | KeyExists (const CTime &in_frame, double in_tolerance=DBL_MAX) const |
FCurveKey | GetKey (const CTime &in_frame, double in_tolerance=DBL_MAX) const |
LONG | GetNumKeys (const CTime &in_startframe=CTime(DBL_MAX, CTime::CUSTOM), const CTime &in_endframe=CTime(DBL_MAX, CTime::CUSTOM)) const |
FCurveKey | GetKeyAtIndex (LONG in_index) const |
LONG | GetKeyIndex (const CTime &in_frame, double in_tolerance=DBL_MAX) const |
CTime | GetKeyTime (LONG in_index) const |
CValue | GetKeyValue (LONG in_index) const |
CStatus | SetKey (LONG in_index, const CTime &in_frame, const CValue &in_value, bool in_overridekeylock=false) |
bool | IsEditing (void) const |
CStatus | BeginEdit (void) |
CStatus | EndEdit (void) |
CStatus | UndoEdit (void) |
bool | GetMute (void) const |
CStatus | PutMute (bool in_value) |
CStatus | Offset (const CTime &in_frameOffset, const CValue &in_valueOffset) |
CStatus | OffsetKeys (const CFCurveKeyRefArray &in_Keys, const CTime &in_frameOffset, const CValue &in_valueOffset) |
CStatus | Scale (double in_frameFactor, double in_valueFactor, const CTime &in_frameAnchor, const CValue &in_valueAnchor) |
CStatus | ScaleKeys (const CFCurveKeyRefArray &in_Keys, double in_frameFactor, double in_valueFactor, const CTime &in_frameAnchor, const CValue &in_valueAnchor, bool in_ripple=false) |
CStatus | ExtendCycle (LONG in_CyclesBefore, LONG in_CyclesAfter) |
CStatus | SnapToNearestFrame (void) |
CStatus | MakeRotationsContinuous (void) |
CTime | GetMinKeyFrame (void) const |
CTime | GetMidKeyFrame (void) const |
CTime | GetMaxKeyFrame (void) const |
CValue | GetMinKeyValue (void) const |
CValue | GetMidKeyValue (void) const |
CValue | GetMaxKeyValue (void) const |
bool | InsertKeyAtFrame (const CTime &in_frame) |
FCurve | ( | ) |
Default constructor.
~FCurve | ( | ) |
Default destructor.
bool IsA | ( | siClassID | in_ClassID | ) | const [virtual] |
Returns true if a given class type is compatible with this API class.
in_ClassID | class type. |
Reimplemented from AnimationSource.
siClassID GetClassID | ( | ) | const [virtual] |
Creates an object from another object. The newly created object is set to empty if the input object is not compatible.
in_obj | constant class object. |
Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.
in_ref | constant class object. |
Reimplemented from AnimationSource.
CValue::DataType GetValueType | ( | ) | const |
Returns the value type of the function curve.
siFCurveType GetFCurveType | ( | void | ) | const |
Returns the function curve's FCurve type (standard, boolean, raw, etc.).
CStatus PutFCurveType | ( | siFCurveType | in_type | ) |
Sets the function curve's curve type.
in_type | Function curve type. |
bool GetLocked | ( | void | ) | const |
Returns true if the function curve is locked.
CStatus PutLocked | ( | bool | in_value | ) |
Sets the locked state of the function curve.
in_value | new locked state |
bool GetDependsOnFrameRate | ( | void | ) | const |
Returns the fcurve's dependency on the frame rate (time). If the fcurve is set as time-dependent it will adjust when the scene's frame rate changes. Typically you don't want this to be set to true when the fcurve is a profile curve that does not use time as a factor.
Animation fcurves are typically time-dependent; that is, they generally represent change in a parameter's value over time (for example, a change in an object's X position from frame 10 to frame 90).
Profile fcurves usually do not use frame values on either axis. Profile fcurves are used in deformations to allow a user to fine-tune an effect (for example, the Bulge operator uses percentage of amplitude on the Y-axis over distance from the deformation center on the X-axis).
CStatus PutDependsOnFrameRate | ( | bool | in_value | ) |
Sets the fcurve's dependency on the frame rate (time). If the fcurve is set as time-dependent it will adjust when the scene's frame rate changes. Typically you don't want this to be set to true when the fcurve is a profile curve that does not use time as a factor.
Animation fcurves are typically time-dependent; that is, they generally represent change in a parameter's value over time (for example, a change in an object's X position from frame 10 to frame 90).
Profile fcurves usually do not use frame values on either axis. Profile fcurves are used in deformations to allow a user to fine-tune an effect (for example, the Bulge operator uses percentage of amplitude on the Y-axis over distance from the deformation center on the X-axis).
in_value | New time dependency type |
CValue GetNoKeyValue | ( | void | ) | const |
Returns the value of the function curve when there are no keys.
Sets the value of the function curve when there are no keys.
in_value | function curve value |
siFCurveExtrapolation GetExtrapolation | ( | void | ) | const |
Returns the extrapolation type of the function curve.
CStatus PutExtrapolation | ( | siFCurveExtrapolation | in_type | ) |
Sets the extrapolation type of the function curve.
in_type | The fcurve's extrapolation type (one of the siFCurveExtrapolation values). |
siFCurveInterpolation GetInterpolation | ( | void | ) | const |
Returns the interpolation type of a standard function curve.
CStatus PutInterpolation | ( | siFCurveInterpolation | in_type | ) |
Sets the interpolation type of a standard function curve.
in_type | The fcurve's interpolation type (one of the siFCurveInterpolation values). |
CValue GetLowClamp | ( | void | ) | const |
Returns the lower-clamping value of the function curve.
Sets the lower-clamping value of the function curve.
in_value | The fcurve's lower-clamping value. |
CValue GetHighClamp | ( | void | ) | const |
Returns the higher-clamping value of the function curve.
Sets the higher-clamping value of the function curve.
in_value | The fcurve's higher-clamping value. |
Evaluates the function curve at a given frame. If the curve is discontinuous, the right limit is returned.
in_frame | The frame at which to evaluate the function curve. |
CValue Eval | ( | const double & | in_frame | ) | const |
Evaluates the function curve at a given frame. If the curve is discontinuous, the right limit is returned.
in_frame | The frame at which to evaluate the function curve |
CFCurveKeyRefArray GetKeys | ( | void | ) | const |
CFCurveKeyRefArray GetKeysBetween | ( | const CTime & | in_startframe = CTime(DBL_MAX, CTime::CUSTOM) , |
const CTime & | in_endframe = CTime(DBL_MAX, CTime::CUSTOM) |
||
) | const |
Returns an array of FCurveKey objects on the function curve between the start frame and end frame.
in_startframe | The start frame of the range of keys. Defaults to the first key on the curve. |
in_endframe | The end frame of the range of keys. Defaults to the last key on the curve. |
bool GetSelected | ( | void | ) | const |
Returns the selected state of the function curve.
CFCurveKeyRefArray GetSelectedKeys | ( | ) | const |
CStatus SetKeys | ( | const CTimeArray & | in_timearray, |
const CValueArray & | in_valuearray, | ||
bool | in_keepexistingkeys =
false |
||
) |
Sets the keys of the function curve, previous keys are discarded
if the argument in_keepexistingkeys
= false.
in_timearray | An array of times |
in_valuearray | An array of values |
in_keepexistingkeys | (optional--defaults to false) |
CStatus SetKeys | ( | const CTimeArray & | in_timearray, |
const CDoubleArray & | in_valuearray, | ||
const CLongArray & | in_keyinterpolationarray, | ||
const CTimeArray & | in_lefttanxarray = CTimeArray() , |
||
const CDoubleArray & | in_lefttanyarray = CDoubleArray() , |
||
const CTimeArray & | in_righttanxarray = CTimeArray() , |
||
const CDoubleArray & | in_righttanyarray = CDoubleArray() , |
||
bool | in_keepexistingkeys =
false |
||
) |
Sets the keys of the function curve, previous keys are discarded
if the argument in_keepexistingkeys
= false. This
function can only be used with standard fcurves, since only
standard fcurves support key interpolation and key tangents.
The tangents are optional; however, if specified, the auto
tangent constraint will be turned off to allow the tangents to be
set without modification. This may lead to an invalid curve
depending on the tangent values. If you want the tangents to be
automatically calculated pass an empty array for each of the
tangent values or specify both the x,y values to be
DBL_MAX
.
in_timearray | An array of times |
in_valuearray | An array of values |
in_keyinterpolationarray | An array of key interpolations |
in_lefttanxarray | An array of left tan x, time value relative to key time (optional) |
in_lefttanyarray | An array of left tan y, a value relative to key value (optional) |
in_righttanxarray | An array of right tan x, a value relative to key value (optional) |
in_righttanyarray | An array of right tan y (optional) |
in_keepexistingkeys | (optional--defaults to false) |
CStatus SetKeyTangents | ( | const CDoubleArray & | in_array | ) |
Sets the values of the tangency values on both sides of the key value.
in_array | An array of tangency values (LeftTanX, LeftTanY, RightTanX, RightTanY). The LeftTanX and RightTanX must be specified in frame units. |
bool GetSI3DStyle | ( | void | ) | const |
Returns true if the fcurve is using the SI3D style of tangent constraints.
CStatus PutSI3DStyle | ( | bool | in_value | ) |
Sets the style of tangent constraints to use. True to use the SI3D style of tangent constraints.
in_value | True to use SI3D tangent constraints; false for Softimage tangent constraints. |
LONG AddKey | ( | const CTime & | in_frame, |
const CValue & | in_value, | ||
siFCurveKeyInterpolation | in_interp =
siDefaultKeyInterpolation , |
||
double | in_ltx = DBL_MAX , |
||
double | in_lty = DBL_MAX , |
||
double | in_rtx = DBL_MAX , |
||
double | in_rty = DBL_MAX , |
||
double | in_tol = DBL_MAX , |
||
bool | in_okl =
false |
||
) |
Adds a new key at the specified range with the specified value.
The tolerance argument can be used to merge all keys within a
certain range. The range is defined as Frame
-
Tolerance
and Frame
+
Tolerance
. The merged key will inherit the constraints
of the nearest key within this range.
in_frame | New key frame |
in_value | New key value |
in_interp | Key interpolation |
in_ltx | Left tangent x |
in_lty | Left tangent y |
in_rtx | Right tangent x |
in_rty | Right tangent y |
in_tol | By default a tolerance of 0.5 frame is specified. |
in_okl | True to override the key locks |
CStatus Resample | ( | const CTime & | in_startframe = CTime(DBL_MAX, CTime::CUSTOM) , |
const CTime & | in_endframe = CTime(DBL_MAX, CTime::CUSTOM) , |
||
double | in_step = 1 , |
||
bool | in_keepexistingkeys =
false , |
||
bool | in_overridekeylock =
false |
||
) |
Resamples the fcurve, adding keys from startframe to endframe at the interval defined by the step argument. A valid range is defined as:
startframe < endframe and step < 0.25 * ( endframe - startframe )
By default the frame range specified by the playcontrol's
In
and Out
parameters will be used. A key
is created at the start frame and end frame. The number of samples
created between these keys is:
( endframe - startframe ) / step
Depending on the frame rate there may be a rounding error with the last key resulting in an extra key being created at the end.
in_startframe | The start frame of the range to resample |
in_endframe | The end frame of the range to resample |
in_step | Step |
in_keepexistingkeys | True to keep existing keys in resample range |
in_overridekeylock | True to override the key locks |
CStatus Smooth | ( | const CTime & | in_start = CTime(DBL_MAX, CTime::CUSTOM) , |
const CTime & | in_end = CTime(DBL_MAX, CTime::CUSTOM) , |
||
double | in_dFilterSize =
5 , |
||
double | in_dSamplingStep =
1 , |
||
siFCurveSmoothFilterType | in_filterType =
siFCurveAverageFilterType , |
||
double | in_dGaussianVariance =
1 |
||
) |
Smooths the
FCurve in a given time span using a filter by removing sharp
spikes and jags from the
FCurve by averaging between keys. The
FCurve is smoothed first and re-sampled at a sampling step of
in_dSamplingStep
.
in_start | The start time of the range to smooth. Must be less than the
end time (in_end value). Defaults to the first key
frame on the fcurve or, if there are no keys, the PlayControl.In
frame value. |
in_end | The end time of the range to smooth. Defaults to the last key frame or, if there are no keys, the PlayControl.Out frame value. |
in_dFilterSize | Defines the number of keys that are averaged to calculate a new
key. A high filter size will yield a much straighter curve.
Defaults to 5 and must be greater than
1 . |
in_dSamplingStep | The sampling step applied to the
FCurve after smoothing. Must be less than
in_dFilterSize . Defaults to 1 . |
in_filterType | Specifies the type of filter we want to use for smoothing (see siFCurveSmoothFilterType). Defaults to siFCurveAverageFilterType. |
in_dGaussianVariance | Variance of the Gaussian filter. Controls the degree of
smoothing. A higher variance smooths the function curve more.
Defaults to 1 and must be greater than
0 . |
CStatus Fit | ( | const CTime & | in_start = CTime(DBL_MAX, CTime::CUSTOM) , |
const CTime & | in_end = CTime(DBL_MAX, CTime::CUSTOM) , |
||
double | in_dFittingTolerance =
0.1 |
||
) |
Fits the FCurve within a time span by removing redundant keys while preserving the original shape of a function curve.
in_start | The start time of the range to fit. Must be less than the end
time (in_end value). Defaults to the first key frame
on the fcurve or, if there are no keys, the PlayControl.In
frame value. |
in_end | The end time of the range to fit. Defaults to the last key frame or, if there are no keys, the PlayControl.Out frame value. |
in_dFittingTolerance | Adjusts the closeness of the fit (that is, Maximum distance
between the
FCurve and the resulting fitted
FCurve). Smaller values will respect the original shape of the
curve more by using more keys, while larger values will use less
keys and result in a fit that deviates from the original curve.
Defaults to 0.1 and must be greater than
0 . |
Copies the specified FCurve (source) to this FCurve (target).
in_fcurve | The source FCurve to copy. |
using namespace XSI; Application app; Model root = app.GetActiveSceneRoot(); X3DObject myCube; root.AddGeometry( L"Cube", L"MeshSurface", L"", myCube ); // Create and connect an fcurve to position X Parameter posx( myCube.GetParameter(L"posx") ); FCurve posxFc; posx.AddFCurve( siStandardFCurve, posxFc ); // Add some keys posxFc.Resample(); posxFc.PutLowClamp( 25.0 ); posxFc.PutHighClamp( 75.0 ); // Create and connect an fcurve to rotation X Parameter rotx( myCube.GetParameter(L"rotx") ); FCurve rotxFc; rotx.AddFCurve( siStandardFCurve, rotxFc ); // Set rotxFc with the posx fcurve rotxFc.Set( posxFc ); // Expected output: //'INFO : rotxFc nb keys : 100 //'INFO : rotxFc low clamp: 25 //'INFO : rotxFc high clamp: 75 app.LogMessage( L"rotxFc nb keys : " + CString(rotxFc.GetKeys().GetCount()) ); app.LogMessage( L"rotxFc low clamp: " + CString(rotxFc.GetLowClamp()) ); app.LogMessage( L"rotxFc high clamp: " + CString(rotxFc.GetHighClamp()) );
CStatus RemoveKey | ( | const CTime & | in_frame, |
double | in_tolerance =
DBL_MAX , |
||
bool | in_overridekeylock =
false |
||
) |
Removes the nearest key to the specified frame within the specified tolerance range.
in_frame | The frame to look for the key |
in_tolerance | By default a tolerance of 0.5 frame is
specified. |
in_overridekeylock | True to override the key locks |
CStatus RemoveKeyAtIndex | ( | LONG | in_index, |
bool | in_overridekeylock =
false |
||
) |
Removes the key at the specified key index.
in_index | The key index |
in_overridekeylock | True to override the key locks |
CStatus RemoveKeysAtIndex | ( | LONG | in_index, |
LONG | in_count, | ||
bool | in_overridekeylock =
false |
||
) |
Removes a specified number of keys starting at the specified key
index. By default startframe
is the first key and
endframe
is the last key.
in_index | The start key index |
in_count | Number of keys to remove. The value specified must be greater
than or equal to 1 . |
in_overridekeylock | True to override the key locks |
LONG RemoveKeys | ( | const CTime & | in_startframe = CTime(DBL_MAX, CTime::CUSTOM) , |
const CTime & | in_endframe = CTime(DBL_MAX, CTime::CUSTOM) , |
||
bool | in_overridekeylock =
false |
||
) |
Removes all keys within the specified range. By default
startframe
is the first key and endframe
is the last key.
in_startframe | The start frame of the range to search |
in_endframe | The end frame of the range to search |
in_overridekeylock | True to override the key locks |
bool KeyExists | ( | const CTime & | in_frame, |
double | in_tolerance =
DBL_MAX |
||
) | const |
Returns whether a key can be found at the specified frame within the tolerance range.
in_frame | The frame to look for a key |
in_tolerance | By default a tolerance of 0.5 frame is
specified. |
Returns the nearest key to the specified frame within the tolerance range.
in_frame | The frame to look for a key |
in_tolerance | By default a tolerance of 0.5 frame is
specified. |
LONG GetNumKeys | ( | const CTime & | in_startframe = CTime(DBL_MAX, CTime::CUSTOM) , |
const CTime & | in_endframe = CTime(DBL_MAX, CTime::CUSTOM) |
||
) | const |
Returns the number of keys within the specified range. By
default startframe
is the first key and
endframe
is the last key.
in_startframe | The start frame of the range to search |
in_endframe | The end frame of the range to search |
FCurveKey GetKeyAtIndex | ( | LONG | in_index | ) | const |
Returns the key at the specified index.
in_index | The index of the key to get. |
LONG GetKeyIndex | ( | const CTime & | in_frame, |
double | in_tolerance =
DBL_MAX |
||
) | const |
Returns the index of the nearest key to the specified frame within the tolerance range.
in_frame | The frame to look for a key |
in_tolerance | By default a tolerance of 0.5 frame is specified. |
-1
if the key does not exist.CTime GetKeyTime | ( | LONG | in_index | ) | const |
Returns the frame of the key at the specified index.
in_index | The index of the key to get. |
CValue GetKeyValue | ( | LONG | in_index | ) | const |
Returns the value of the key at a specified index.
in_index | The index of the key to get. |
CStatus SetKey | ( | LONG | in_index, |
const CTime & | in_frame, | ||
const CValue & | in_value, | ||
bool | in_overridekeylock =
false |
||
) |
Sets the time (in frames) and value of the key at the specified index.
in_index | The index of key to set |
in_frame | New key frame |
in_value | New key value |
in_overridekeylock | True to override the key lock |
bool IsEditing | ( | void | ) | const |
Returns true if a bulk edit of the fcurve is in progress.
CStatus BeginEdit | ( | void | ) |
Starts recording bulk edits made to the fcurve. A call to FCurve::BeginEdit must be paired with a call to FCurve::EndEdit, which will commit your changes to the undo/redo stack.
Editing changes can be undone by calling FCurve::UndoEdit and you can check if the fcurve is being bulk edited by using FCurve::IsEditing. If you try to begin another bulk edit a warning is issued, and the current editing session is committed to the undo/redo stack.
CStatus EndEdit | ( | void | ) |
Stops recording bulk edits made to the fcurve and commits changes to the undo/redo stack. A call to FCurve::EndEdit must follow a call to FCurve::BeginEdit.
CStatus UndoEdit | ( | void | ) |
Undoes the bulk edits made to the fcurve and closes the current bulk edit.
bool GetMute | ( | void | ) | const |
Returns the fcurve's mute state. If the fcurve is muted it will not update its corresponding parameter when the time changes.
CStatus PutMute | ( | bool | in_value | ) |
Sets the fcurve's mute state. If the fcurve is muted it will not update its corresponding parameter when the time changes.
in_value | New mute state |
Offsets the fcurve in time and/or value by a relative amount.
in_frameOffset | Time offset |
in_valueOffset | Value offset |
CStatus OffsetKeys | ( | const CFCurveKeyRefArray & | in_Keys, |
const CTime & | in_frameOffset, | ||
const CValue & | in_valueOffset | ||
) |
Offsets fcurve keys in time and/or value by a relative amount.
in_Keys | Keys to offset |
in_frameOffset | Time offset |
in_valueOffset | Value offset |
CStatus Scale | ( | double | in_frameFactor, |
double | in_valueFactor, | ||
const CTime & | in_frameAnchor, | ||
const CValue & | in_valueAnchor | ||
) |
Scales the fcurve in time and/or value relative to the given anchor point.
in_frameFactor | Frame scale factor |
in_valueFactor | Value scale factor |
in_frameAnchor | Frame scale anchor |
in_valueAnchor | Value scale anchor |
CStatus ScaleKeys | ( | const CFCurveKeyRefArray & | in_Keys, |
double | in_frameFactor, | ||
double | in_valueFactor, | ||
const CTime & | in_frameAnchor, | ||
const CValue & | in_valueAnchor, | ||
bool | in_ripple =
false |
||
) |
Scales fcurve keys in time and/or value relative to the given anchor point.
in_Keys | Keys to scale |
in_frameFactor | Frame scale factor |
in_valueFactor | Value scale factor |
in_frameAnchor | Frame scale anchor |
in_valueAnchor | Value scale anchor |
in_ripple | True to keep keys before/after the ones being scaled the same distance from the modified keys |
CStatus ExtendCycle | ( | LONG | in_CyclesBefore, |
LONG | in_CyclesAfter | ||
) |
Extends fcurve to include cycles before/after.
in_CyclesBefore | Number of cycles to include before existing fcurve |
in_CyclesAfter | Number of cycles to include after existing fcurve |
CStatus SnapToNearestFrame | ( | void | ) |
Snaps fcurve keys to their nearest frame times.
CStatus MakeRotationsContinuous | ( | void | ) |
Removes discontinuities of more than 180 from the fcurve.
CTime GetMinKeyFrame | ( | void | ) | const |
Returns the smallest key time in the fcurve.
CTime GetMidKeyFrame | ( | void | ) | const |
Returns the average of the first and last key times in the fcurve.
CTime GetMaxKeyFrame | ( | void | ) | const |
Returns the largest key time in the fcurve.
CValue GetMinKeyValue | ( | void | ) | const |
Returns the smallest key value in the fcurve.
CValue GetMidKeyValue | ( | void | ) | const |
Returns the average of the largest and smallest key values in the fcurve.
CValue GetMaxKeyValue | ( | void | ) | const |
Returns the largest key value in the fcurve.
bool InsertKeyAtFrame | ( | const CTime & | in_frame | ) |
Inserts a key at the time specified by the frame argument. Unlike FCurve::AddKey, this member function maintains the shape of the fcurve.
in_frame | The frame at which to insert the new key. |