# IRiAnimClip Interface Reference

Inherits IDispatch.

List of all members.

## Public Member Functions
HRESULT | ClipRemove ([in] BSTR bszNodeName,[in] BSTR bszClipName)
HRESULT | ClipRename ([in] BSTR bszNodeName,[in] BSTR bszClipName,[in] BSTR bszNewClipName)
HRESULT | DisableClip ([in] BSTR bszNodeName,[in] BSTR bszClipName,[in] VARIANT vDisableStatus)
HRESULT | SetProceduralClip ([in] BSTR bszNodeName,[in] BSTR bszClipName,[in] VARIANT vProceduralStatus)
HRESULT | RazorClips ([in] BSTR bszNodeName,[in] RtTime tTime)
HRESULT | ClipReverse ([in] BSTR bszNodeName,[in] BSTR bszClipName)
HRESULT | GenerateKeyframes ([in] BSTR bszNodeName)
HRESULT | SetKeyFrame ([in] BSTR bszNodeName,[in] BSTR bszAnimClip,[in] BSTR bszAnimAttrName,[in]RtTime timeT)
## Properties
BSTR * | ClipCreate ([in] BSTR bszNodeName,[in] BSTR bszTrackId)`[get]`

## Detailed Description

The IRiAnimClip interface provides functionality for manipulating clips in animation.
Root-level name in the scripting engine's name space: RsAnimClip

## Member Function Documentation

HRESULT IRiAnimClip::ClipRemove | ( | [in] BSTR | bszNodeName,
|  | [in] BSTR | bszClipName |
| ) |  |  |

Remove clip from object.

Parameters:

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

        var owner = System.ThisOwner();
        var target = owner + '/Cylinder, 2';
        RsAnimClip.ClipRemove(target,'AnimClip');

HRESULT IRiAnimClip::ClipRename | ( | [in] BSTR | bszNodeName,
|  | [in] BSTR | bszClipName,
|  | [in] BSTR | bszNewClipName |
| ) |  |  |

Rename clip.

Parameters:

  `[in]` | bszNodeName | Object identification
  `[in]` | bszClipName | Specifies the clip which should be renamed
  `[in]` | bszNewClipName | New name

        var owner = System.ThisOwner();
        var target = owner + '/Cylinder, 2';
        RsAnimClip.ClipRename(target,'AnimClip','MyAnimClip1');

HRESULT IRiAnimClip::DisableClip | ( | [in] BSTR | bszNodeName,
|  | [in] BSTR | bszClipName,
|  | [in] VARIANT | vDisableStatus |
| ) |  |  |

Disable or enable clip. Disabled clips are ignored when evaluating animation.

Parameters:

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

        var owner = System.ThisOwner();
        var target = owner + '/Cylinder, 2';
        RsAnimClip.DisableClip(target,'AnimClip',true);

HRESULT IRiAnimClip::SetProceduralClip | ( | [in] BSTR | bszNodeName,
|  | [in] BSTR | bszClipName,
|  | [in] VARIANT | vProceduralStatus |
| ) |  |  |

Set or clear procedural state for clip.

Parameters:

  `[in]` | bszNodeName | Object identification.
  `[in]` | bszClipName | Specifies the clip which state should be changed.
  `[in]` | vProceduralStatus | true ( procedural), false ( keyframe).

        var owner = System.ThisOwner();
        var target = owner + '/Cylinder, 2';
        RsAnimClip.SetProceduralClip(target,'AnimClip',true);

HRESULT IRiAnimClip::RazorClips | ( | [in] BSTR | bszNodeName,
|  | [in] RtTime | tTime |
| ) |  |  |

Razor clips. Slices current selected clip(s) at frame number specified.

Parameters:

  `[in]` | bszNodeName | Object identification.
  `[in]` | tTime | Specifies the time(frame number) where clips razor.

        var owner = System.ThisOwner();
        var target = owner + '/Cylinder, 2';
        RsAnimClip.RazorClips(target, 120);

HRESULT IRiAnimClip::ClipReverse | ( | [in] BSTR | bszNodeName,
|  | [in] BSTR | bszClipName |
| ) |  |  |

Reverse clip.

Parameters:

  `[in]` | bszNodeName | Object identification.
  `[in]` | bszClipName | Specifies the clip.

        RsAnimClip.ClipReverse(target,'AnimClip');

HRESULT IRiAnimClip::GenerateKeyframes | ( | [in] BSTR | bszNodeName | ) |

Generate keyframes for object using physical simulation. Keyframes are recorded in the procedural clips.

Parameters:

  `[in]` | bszNodeName | Object identification.

        RsAnimClip.GenerateKeyframes(target);

HRESULT IRiAnimClip::SetKeyFrame | ( | [in] BSTR | bszNodeName,
|  | [in] BSTR | bszAnimClip,
|  | [in] BSTR | bszAnimAttrName,
|  | [in] RtTime | timeT |
| ) |  |  |

Set keyframe to specified clip.

New keyframe values are evaluated from the current state of object and the animation context at given time.
Keyframes are storied in selected clip of editable track.
Default animation structures are created in case that object has not been animated.

Parameters:

  `[in]` | bszNodeName | Animated encapsulator node.
  `[in]` | bszAnimClip | Clip where new keyframe is set.
  `[in]` | bszAttr | Name of attribe relative to animated encapsulator space.
  `[in]` | time | Frame value in which keyframe(s) are set.

        var owner = System.ThisOwner();
        var target = owner + '/Cylinder, 2';
        RsAnimClip.SetKeyFrame(target,'AnimClip','Matrix',120);

## Property Documentation

BSTR* IRiAnimClip::ClipCreate([in] BSTR bszNodeName, [in] BSTR bszTrackId)`[get]`

Create new clip and add it to object's track.

Parameters:

  `[in]` | bszNodeName | Object identification.
  `[in]` | bszTrackId | Specifies the track where new clip is added.
  | [out,retval] | pVal Returns name of newly created clip.

        var owner = System.ThisOwner();
        var target = owner + '/Cube';
        var textV = RsAnimClip.ClipCreate(target,'Track01');
        System.Alert(textV);