# IRiAnimTrack Interface Reference

Inherits IDispatch.

List of all members.

## Public Member Functions
HRESULT | TrackRemove ([in] BSTR bszNodeName,[in] BSTR bszTrackName)
HRESULT | TrackRename ([in] BSTR bszNodeName,[in] BSTR bszTrackName,[in] BSTR bszNewTrackName)
HRESULT | DisableTrack ([in] BSTR bszNodeName,[in] BSTR bszTrackName,[in] VARIANT vDisableStatus)
HRESULT | EditTrack ([in] BSTR bszNodeName,[in] BSTR bszTrackName,[in] VARIANT vEditableStatus)
HRESULT | SetBlendMode ([in] BSTR bszNodeName,[in] BSTR bszTrackName,[in] VARIANT vBlendMode)
HRESULT | SetPassThroughMode ([in] BSTR bszNodeName,[in] BSTR bszTrackName,[in] VARIANT vPassThrough)
HRESULT | MergeTracks ([in] BSTR bszNodeName)
## Properties
BSTR * | TrackCreate ([in] BSTR bszNodeName)`[get]`
BSTR * | CreateEditableTrack ([in] BSTR bszNodeName)`[get]`
VARIANT * | Weight ([in] BSTR bszNodeName,[in] BSTR bszTrackName)`[get]`
VARIANT | Weight ([in] BSTR bszNodeName,[in] BSTR bszTrackName)`[set]`

## Detailed Description

The IRiAnimTrack interface provides functionality for manipulating tracks in animation editor.
Root-level name in the scripting engine's name space: RsAnimTrack

## Member Function Documentation

HRESULT IRiAnimTrack::TrackRemove | ( | [in] BSTR | bszNodeName,
|  | [in] BSTR | bszTrackName |
| ) |  |  |

Remove track from object.

Parameters:

  `[in]` | bszNodeName | Object identification.
  `[in]` | bszTrackName | Specifies the track which should be removed from object.

        RsAnimTrack.TrackRemove(target, 'Track00');

HRESULT IRiAnimTrack::TrackRename | ( | [in] BSTR | bszNodeName,
|  | [in] BSTR | bszTrackName,
|  | [in] BSTR | bszNewTrackName |
| ) |  |  |

Rename track.

Parameters:

  `[in]` | bszNodeName | Object identification.
  `[in]` | bszTrackName | Specifies the track which should be renamed.
  `[in]` | bszNewTrackName | New track name.

        RsAnimTrack.TrackRename(target, 'Track01','MyNewTrack00');

HRESULT IRiAnimTrack::DisableTrack | ( | [in] BSTR | bszNodeName,
|  | [in] BSTR | bszTrackName,
|  | [in] VARIANT | vDisableStatus |
| ) |  |  |

Disable or enable track. Clips in disabled tracks are ignored when evaluating animation.

Parameters:

  `[in]` | bszNodeName | Object identification.
  `[in]` | bszTrackName | Specifies the track which should be disabled.
  `[in]` | vDisableStatus | true (disabled), false ( enabled).

        RsAnimTrack.DisableTrack(target,'MyNewTrack00',true);

HRESULT IRiAnimTrack::EditTrack | ( | [in] BSTR | bszNodeName,
|  | [in] BSTR | bszTrackName,
|  | [in] VARIANT | vEditableStatus |
| ) |  |  |

Set or clear editable state for track.

Parameters:

  `[in]` | bszNodeName | Object identification.
  `[in]` | bszTrackName | Specifies the track which state should be changed.
  `[in]` | vEditableStatus | true ( editable), false (non-editable).

        RsAnimTrack.EditTrack(target,'MyNewTrack00',false);

HRESULT IRiAnimTrack::SetBlendMode | ( | [in] BSTR | bszNodeName,
|  | [in] BSTR | bszTrackName,
|  | [in] VARIANT | vBlendMode |
| ) |  |  |

Set additive blend mode for track.

Parameters:

  `[in]` | bszNodeName | Object identification.
  `[in]` | bszTrackName | Specifies the track which blend mode should be changed.
  `[in]` | vBlendMode | 0 - override blend type , 1 - additive blend type.

        RsAnimTrack.SetBlendMode(target,'MyNewTrack00',1);

HRESULT IRiAnimTrack::SetPassThroughMode | ( | [in] BSTR | bszNodeName,
|  | [in] BSTR | bszTrackName,
|  | [in] VARIANT | vPassThrough |
| ) |  |  |

Set/clear PassThrough flag for track.

Parameters:

  `[in]` | bszNodeName | Object identification.
  `[in]` | bszTrackName | Specifies the track.
  `[in]` | vPassThrough | true ( PassThrough), false (no-PassThrough).

        RsAnimTrack.SetPassThroughMode(target,'MyNewTrack00',true);

HRESULT IRiAnimTrack::MergeTracks | ( | [in] BSTR | bszNodeName | ) |

Merge tracks for specified object.
New track is created with the merge of all tracks and this new track is added to the Anim Editor.
Existing tracks used for the merge are not removed.

Parameters:

  `[in]` | bszNodeName | Object identification.

        RsAnimTrack.MergeTracks(target);

## Property Documentation

BSTR* IRiAnimTrack::TrackCreate([in] BSTR bszNodeName)`[get]`

Create new track for specified object.

Parameters:

  `[in]` | bszNodeName | Object identification.
  | [out,retval] | pVal Returns name of newly created track.

        var owner = System.ThisOwner();
        var target = owner + '/Cylinder, 2';
        var NewTrack = RsAnimTrack.TrackCreate(target);
        System.Alert(NewTrack);

BSTR* IRiAnimTrack::CreateEditableTrack([in] BSTR bszNodeName)`[get]`

Create new editable track for specified object.
New track is created and flags for Edit, Additive Blend Mode and PassThrough Mode are set to true.

Parameters:

  `[in]` | bszNodeName | Object identification.
  | [out,retval] | pVal Returns name of newly created track.

        var newEditTrack = RsAnimTrack.CreateEditableTrack(target);
        System.Alert(newEditTrack);

VARIANT* IRiAnimTrack::Weight([in] BSTR bszNodeName, [in] BSTR bszTrackName)`[get]`

Get weight parameter of track.

Parameters:

  `[in]` | bszNodeName | Object identification.
  `[in]` | bszTrackName | Track identification.
  | [out,retval] | pfWeight Returned weight value.

        var trackWeight = RsAnimTrack.Weight(target,'MyNewTrack00');
        System.Alert(trackWeight);

VARIANT IRiAnimTrack::Weight([in] BSTR bszNodeName, [in] BSTR bszTrackName)`[set]`

Set new weight parameter for track.

Parameters:

  `[in]` | bszNodeName | Object identification.
  `[in]` | bszTrackName | Track name.
  `[in]` | fWeight | New weightparaemter.

        RsAnimTrack.Weight(target,'Track00') = 0.50;