# IAnimatableObject interface

Namespace: [Grasshopper2.Animation](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.animation.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public interface IAnimatableObject
```

Implemented by document objects which can be driven by an animation. An animatable object can snapshot its own state, describe the two extremes it is able to reach, and move itself to the state belonging to a frame.

**Derived types:** [ColourSwatchObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parameters.special.colourswatchobject.md), [FunctionEditorObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parameters.special.functioneditorobject.md), [NumberPickerObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parameters.special.numberpickerobject.md), [NumberSliderObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parameters.special.numbersliderobject.md), [ProtractorObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parameters.special.protractorobject.md)

## Properties

- [CanAnimate](https://developer.rhino3d.com/api/gh2/type/grasshopper2.animation.ianimatableobject/cananimate.md): Gets whether this object can currently be animated. An object which returns false is skipped, even if an animation binding targets it.

## Methods

- [Animate](https://developer.rhino3d.com/api/gh2/type/grasshopper2.animation.ianimatableobject/animate.md): Move this object to the state belonging to a frame. `currentFrame` runs from zero to `totalFrames` minus one: frame zero is `start` and the final frame is `end`. When the start and end states are identical, or when the totalFrames equals zero, the animation server is putting this object back into an original (not-animated) state. Implementers must change the state of the object to match the interpolated animation states, but they should *not* record undo events or trigger new solutions.
- [GetCurrentState](https://developer.rhino3d.com/api/gh2/type/grasshopper2.animation.ianimatableobject/getcurrentstate.md): Snapshot the current state of this object, along with the two extremes it can reach.
- [SuggestedFrameCount](https://developer.rhino3d.com/api/gh2/type/grasshopper2.animation.ianimatableobject/suggestedframecount.md): Gets the number of frames which would suit an animation between two states, or zero if this object has no opinion. An object with a finite number of states answers with how many of them lie between the two, so the animation visits each exactly once. An object of unlimited accuracy — an angle or a number line, say — answers with whatever sampling is natural over that range instead, since it is the one which knows what a sensible step through its own values looks like. Nothing else is in a position to guess. It depends on the states because the range does: a slider covering a tenth of its domain has a tenth of the values to visit. Both states are always supplied. A binding with no limits of its own passes the extremes this object reported from [IAnimatableObject.GetCurrentState(IObjectState, IObjectState)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.animation.ianimatableobject/getcurrentstate.md), so there is never a missing state to defend against — only, as ever, the possibility of one belonging to some other object.
