InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IAnimationAttributeData Class Referenceabstract

#include <IAnimationAttributeData.h>

Inheritance diagram for IAnimationAttributeData:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IANIMATIONATTRIBUTEDATA }
 

Public Member Functions

virtual bool HasAnimation () const =0
 
virtual bool AddAnimation (UID presetUID, bool populateData=true)=0
 
virtual bool RemoveAnimation ()=0
 
virtual IAnimationDataCloneAnimation () const =0
 
virtual const IAnimationDataQueryAnimation () const =0
 
virtual bool AnimationHasCustomChanges () const =0
 
virtual bool SetPresetUID (UID presetUID, bool populateData=true)=0
 
virtual UID GetPresetUID () const =0
 
virtual bool SetNumPlays (uint32 numPlays)=0
 
virtual uint32 GetNumPlays () const =0
 
virtual bool GetPlaysLoop () const =0
 
virtual bool SetPlaysLoop (bool setToLoop)=0
 
virtual bool SetDuration (const PMReal &durationInSecond)=0
 
virtual PMReal GetDuration () const =0
 
virtual bool SetFrameRate (int32 frameRate)=0
 
virtual int32 GetFrameRate () const =0
 
virtual AnimationOptions GetAnimateOption () const =0
 
virtual bool SetAnimateOption (const AnimationOptions &animateOption)=0
 
virtual bool GetHideInitially () const =0
 
virtual bool SetHideInitially (bool setHideInitially)=0
 
virtual bool GetHideAfter () const =0
 
virtual bool SetHideAfter (bool setHideAfter)=0
 
virtual AnimationEaseType GetSimpleEaseType () const =0
 
virtual bool SetSimpleEaseType (const AnimationEaseType &easeType)=0
 
virtual bool SetTransformOffsetPoint (const PMPoint &offsetPoint)=0
 
virtual PMPoint GetTransformOffsetPoint () const =0
 
virtual bool HasRovingPath () const =0
 
virtual bool Get2DKeyFramePath (AnimationPathDataList &pathFrames) const =0
 
virtual bool Get2DPathPoints (PMPathPointList &path, bool &pathIsRoving) const =0
 
virtual bool Set2DKeyFramePath (const AnimationPathDataList &path)=0
 
virtual bool Set2DPathPoints (const PMPathPointList &path, bool pathIsRoving)=0
 
virtual uint32 GetOpacityKeyFrameCount () const =0
 
virtual bool GetOpacityKeyFrame (uint32 whichKeyframe, uint32 &keyframe, PMReal &value) const =0
 
virtual bool GetOpacityKeyFrame (uint32 keyframe, PMReal &value) const =0
 
virtual bool SetOpacityKeyFrame (uint32 keyframe, const PMReal &value)=0
 
virtual bool RemoveOpacityKeyFrame (uint32 keyframe)=0
 
virtual uint32 GetRotationKeyFrameCount () const =0
 
virtual bool GetRotationKeyFrame (uint32 whichKeyframe, uint32 &keyframe, PMReal &value) const =0
 
virtual bool GetRotationKeyFrame (uint32 keyframe, PMReal &value) const =0
 
virtual bool SetRotationKeyFrame (uint32 keyframe, const PMReal &value)=0
 
virtual bool RemoveRotationKeyFrame (uint32 keyframe)=0
 
virtual uint32 GetScaleXKeyFrameCount () const =0
 
virtual bool GetScaleXKeyFrame (uint32 whichKeyframe, uint32 &keyframe, PMReal &value) const =0
 
virtual bool GetScaleXKeyFrame (uint32 keyframe, PMReal &value) const =0
 
virtual bool SetScaleXKeyFrame (uint32 keyframe, const PMReal &value)=0
 
virtual bool RemoveScaleXKeyFrame (uint32 keyframe)=0
 
virtual uint32 GetScaleYKeyFrameCount () const =0
 
virtual bool GetScaleYKeyFrame (uint32 whichKeyframe, uint32 &keyframe, PMReal &value) const =0
 
virtual bool GetScaleYKeyFrame (uint32 keyframe, PMReal &value) const =0
 
virtual bool SetScaleYKeyFrame (uint32 keyframe, const PMReal &value)=0
 
virtual bool RemoveScaleYKeyFrame (uint32 keyframe)=0
 
virtual void CopyAnimation (const IAnimationData *iOther)=0
 
virtual void Copy (const IAnimationAttributeData *iOtherAtr)=0
 
virtual bool Equals (const IAnimationAttributeData *iOtherAtr) const =0
 
virtual void SetCustomData (const bool16 customData)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

This is the data interface for page item animation attribute data.

See Also
also IAnimationData.h

Member Function Documentation

virtual bool IAnimationAttributeData::AddAnimation (UID presetUID,
bool populateData = true 
)
pure virtual

Add an animation with this motion preset. presetUID can be kInvalidUID.

Parameters
presetUIDis the motion preset for the animation.
populateDatais set to true if properties from the preset are extracted and set to this animation. If this flag is set to true and if there are previously set animation data, they will be replaced with the data from the preset.
Returns
true if successful.
virtual bool IAnimationAttributeData::AnimationHasCustomChanges () const
pure virtual

Returns true if animation has custom changes.

Returns
true if animation has changes.
virtual IAnimationData* IAnimationAttributeData::CloneAnimation () const
pure virtual

IAnimationData interface is not persistent data interface. It is to facilitate getting animation data for temporary use and setting up animation data for applying updates. In particular, it is used mainly in to represent a temporary scripting animation data object.Returns a copy of the animation data

Note
The IAnimationData returns is a temporary representation of this animation data. It does not provide direct access to the actual data. To access animation data directly, use the individual get/set methods.
Returns
the clone of the animation data.
virtual void IAnimationAttributeData::Copy (const IAnimationAttributeDataiOtherAtr)
pure virtual

Copy from the specified animation attribute data.

Parameters
iOtherAtris new data to copy from.
virtual void IAnimationAttributeData::CopyAnimation (const IAnimationDataiOther)
pure virtual

Copy from the specified animation data.

Parameters
iOtheris new data to copy from.
virtual bool IAnimationAttributeData::Equals (const IAnimationAttributeDataiOtherAtr) const
pure virtual

Compare this with the specified animation attribute data.

Parameters
iOtherAtris the other data to compare with.
Returns
true if completely equals.
virtual bool IAnimationAttributeData::Get2DKeyFramePath (AnimationPathDataList & pathFrames) const
pure virtual

Gets the 2D motion path for the animation. The path is a list of keyframe and path point pairs. The path points represents the motion path.

Parameters
pathFramesis the keyframe path to get.
virtual bool IAnimationAttributeData::Get2DPathPoints (PMPathPointListpath,
bool & pathIsRoving 
) const
pure virtual

Gets the 2D motion path point for the animation. The path returns is a list of path points representing the motion path.

Parameters
pathis the path to get.
pathIsRovingis true if roving path; otherwise path points have keyframe association.
virtual AnimationOptions IAnimationAttributeData::GetAnimateOption () const
pure virtual

Animation option allows the control to how the animation is played. There are three options. The default is kAnimatefrom where the animation is played normally. kAnimateTo is to play the animation in reverse back to the position where the object is as designed. kAnimateOffset is to play the animation starting with an offset that is the width and height of the entire motion path such that at the of the animation, the object would be at the position it is designed for.

See Also
AnimationTypes.h
Returns
the animate option.
virtual PMReal IAnimationAttributeData::GetDuration () const
pure virtual

Gets the duration in second for the animation.

Returns
the duration.
virtual int32 IAnimationAttributeData::GetFrameRate () const
pure virtual

Gets the frame rate for the animation.

Returns
the frame rate.
virtual bool IAnimationAttributeData::GetHideAfter () const
pure virtual
Returns
true if object is hidden after animated.
virtual bool IAnimationAttributeData::GetHideInitially () const
pure virtual
Returns
true if object is hidden until animated.
virtual uint32 IAnimationAttributeData::GetNumPlays () const
pure virtual

Returns the number of times this animation should play when triggered.

Returns
the number plays.
virtual bool IAnimationAttributeData::GetOpacityKeyFrame (uint32 whichKeyframe,
uint32 & keyframe,
PMRealvalue 
) const
pure virtual

Gets the opacity at specified key frame for the animation.

Parameters
whichKeyframeis the nth keyframe to get.
keyframeis the keyframe at whichKeyframe.
valueis the value at keyframe.
virtual bool IAnimationAttributeData::GetOpacityKeyFrame (uint32 keyframe,
PMRealvalue 
) const
pure virtual

Gets the opacity at specified key frame for the animation.

Parameters
whichKeyframeis the nth keyframe to get.
keyframeis the keyframe at whichKeyframe.
valueis the value at keyframe.
virtual uint32 IAnimationAttributeData::GetOpacityKeyFrameCount () const
pure virtual

Gets the opacity keyframe count for the animation. The keyframe count is the number of opacity keyframes that contain custom values.

Returns
the opacity keyframe count.
virtual bool IAnimationAttributeData::GetPlaysLoop () const
pure virtual
Returns
true if animation is set to loop. If animation is set to loop, then number of plays is ignored.
virtual UID IAnimationAttributeData::GetPresetUID () const
pure virtual

Returns the preset UID associated with the animation.

Returns
the preset UID.
virtual bool IAnimationAttributeData::GetRotationKeyFrame (uint32 whichKeyframe,
uint32 & keyframe,
PMRealvalue 
) const
pure virtual

Gets the rotation at specified key frame for the animation.

Parameters
whichKeyframeis the nth keyframe to get.
keyframeis the keyframe at whichKeyframe.
valueis the value at keyframe.
virtual bool IAnimationAttributeData::GetRotationKeyFrame (uint32 keyframe,
PMRealvalue 
) const
pure virtual

Gets the rotation at specified key frame for the animation.

Parameters
keyframeis the keyframe to get.
valueis the value at keyframe.
virtual uint32 IAnimationAttributeData::GetRotationKeyFrameCount () const
pure virtual

Gets the rotation keyframe count for the animation. The keyframe count is the number of rotation keyframes that contain custom values.

Returns
the total number of rotation keyframes.
virtual bool IAnimationAttributeData::GetScaleXKeyFrame (uint32 whichKeyframe,
uint32 & keyframe,
PMRealvalue 
) const
pure virtual

Gets the scale x keyframe count for the animation. The keyframe count is the number of scale x keyframes that contain custom values.

Parameters
whichKeyframeis the nth keyframe to get.
keyframeis the keyframe at whichKeyframe.
valueis the value at keyframe.
virtual bool IAnimationAttributeData::GetScaleXKeyFrame (uint32 keyframe,
PMRealvalue 
) const
pure virtual

Gets the scale x at specified key frame for the animation.

Parameters
keyframeis the keyframe to get.
valueis the value at keyframe.
virtual uint32 IAnimationAttributeData::GetScaleXKeyFrameCount () const
pure virtual

Gets the total number of key frames for the animation.

Returns
the total number of rotation keyframes.
virtual bool IAnimationAttributeData::GetScaleYKeyFrame (uint32 whichKeyframe,
uint32 & keyframe,
PMRealvalue 
) const
pure virtual

Gets the scale y keyframe count for the animation. The keyframe count is the number of scale y keyframes that contain custom values.

Parameters
whichKeyframeis the nth keyframe to get.
keyframeis the keyframe at whichKeyframe.
valueis the value at keyframe.
virtual bool IAnimationAttributeData::GetScaleYKeyFrame (uint32 keyframe,
PMRealvalue 
) const
pure virtual

Gets the scale y at specified key frame for the animation.

Parameters
keyframeis the keyframe to get.
valueis the value at keyframe.
virtual uint32 IAnimationAttributeData::GetScaleYKeyFrameCount () const
pure virtual

Gets the total number of key frames for the animation.

Returns
the total number of rotation keyframes.
virtual AnimationEaseType IAnimationAttributeData::GetSimpleEaseType () const
pure virtual

Easing is a technique that Flash uses to calculate the property values between property keyframes. When no easing is specified, the change to the property value is the same in each frame. With easing, the rate of change to the values is adjusted. The simple ease is mapped to a predefined Flash ease type. It is a quadratic curve. The rate of change follows the predefined quadratic function.

See Also
AnimationTypes.h
Returns
the simple ease type.
virtual PMPoint IAnimationAttributeData::GetTransformOffsetPoint () const
pure virtual

Gets the transform point for the animation.

Returns
transform offset point.
virtual bool IAnimationAttributeData::HasAnimation () const
pure virtual

Return true if we have animation data.

Returns
true if we have animation data.
virtual bool IAnimationAttributeData::HasRovingPath () const
pure virtual

Returns true if animation motion path is roving path.

Returns
true if path is roving path.
virtual const IAnimationData* IAnimationAttributeData::QueryAnimation () const
pure virtual

Returns the animation data.

Note
The IAnimationData returns is a temporary representation of this animation data. It does not provide direct access to the actual data. This data interface is readonly. To access animation data directly, use the individual get/set methods.
Returns
the animation data.
virtual bool IAnimationAttributeData::RemoveAnimation ()
pure virtual

Remove the animation.

Returns
true if successful.
virtual bool IAnimationAttributeData::RemoveOpacityKeyFrame (uint32 keyframe)
pure virtual

Removes the specified opacity key frame for whichAnimation.

Parameters
keyframeis the keyframe to remove.
virtual bool IAnimationAttributeData::RemoveRotationKeyFrame (uint32 keyframe)
pure virtual

Removes the specified rotation key frame for the animation.

Parameters
keyframeis the keyframe to remove.
virtual bool IAnimationAttributeData::RemoveScaleXKeyFrame (uint32 keyframe)
pure virtual

Removes the specified scale x key frame for the animation.

Parameters
keyframeis the keyframe to remove.
virtual bool IAnimationAttributeData::RemoveScaleYKeyFrame (uint32 keyframe)
pure virtual

Removes the specified scale y key frame for whichAnimation.

Parameters
whichAnimationis the animation to get.
keyframeis the keyframe to remove.
virtual bool IAnimationAttributeData::Set2DKeyFramePath (const AnimationPathDataList & path)
pure virtual

Sets the 2D motion path for the animation. The path specified a list of keyframe and path point pairs.

Parameters
pathFramesis the keyframe path to set.
virtual bool IAnimationAttributeData::Set2DPathPoints (const PMPathPointListpath,
bool pathIsRoving 
)
pure virtual

Sets the 2D motion path point for the animation. path is a list of path points representing the new motion path. If path is not a roving path, then this path replaces the existing path at the already specified keyframes. It assumes that the number of path points is the same as the keyframe count.

Parameters
pathis the path to set.
pathIsRovingis true if path is roving path.
virtual bool IAnimationAttributeData::SetAnimateOption (const AnimationOptions & animateOption)
pure virtual

Sets the animate option.

Parameters
animateOptionis the animate option to set.
virtual void IAnimationAttributeData::SetCustomData (const bool16 customData)
pure virtual

For internal use only.

virtual bool IAnimationAttributeData::SetDuration (const PMRealdurationInSecond)
pure virtual

An animation by definition occurs over an duration, typically measured in seconds. The frame rate, the speed the animation is played at, is measured in number of frames per second. The timeline covers an entire animation can be divided into frames. The total number of frames (or key frames) for the duration of animation is eqaul to (frame rate) * (duration in second).

Therefore changing the duration for the animation will change the total number of frames over time. Likewise, changing the frame rate will not change the duration but changes the total number of frames.

A keyframe marks a specific point in the animation timeline. A frame rate too slow will make the animation appears stop and go. A frame rate too fast blurs the animation details. The default frame rate is 24 fps.

Properties at a specified keyframe can be changed by methods described below. Property keyframe count is the number of property keyframes that contains changes for a specified keyframe. These property changes defines the details for an animation.

For this release, these properties can be modified: motion path, opacity, rotation, scale x and y.Sets the duration in second for the animation.

Parameters
durationInSecondis duration to set.
virtual bool IAnimationAttributeData::SetFrameRate (int32 frameRate)
pure virtual

Sets the frame rate for the animation. The frame rate is the number of frames per second for this animation. Total number of keyfames is equal to (frame rate) * (durationInSecond). Therefore, chaning frame rate does not affect the duration but affects only total number of frames.

Parameters
frameRateis the number of frames per second to set.
virtual bool IAnimationAttributeData::SetHideAfter (bool setHideAfter)
pure virtual

Sets object run-time visibility to hide after animated.

Parameters
setHideAfteris true if object is hidden after animated.
Returns
true if successful.
virtual bool IAnimationAttributeData::SetHideInitially (bool setHideInitially)
pure virtual

Sets object run-time visibility to be hidden until animated.

Parameters
setHiddenis true if object is hidden till animated.
Returns
true if successful.
virtual bool IAnimationAttributeData::SetNumPlays (uint32 numPlays)
pure virtual

Sets the number of times this animation should play when triggered.

Returns
the number plays to set.
virtual bool IAnimationAttributeData::SetOpacityKeyFrame (uint32 keyframe,
const PMRealvalue 
)
pure virtual

Sets the opacity at the specified key frame for the animation.

Parameters
keyframeis the keyframe to set.
valueis the value at keyframe to set.
virtual bool IAnimationAttributeData::SetPlaysLoop (bool setToLoop)
pure virtual

Sets animation to loop.

Parameters
setToLoopis true if to set animation to loop. If animation is set to loop, then number of plays is ignored.
virtual bool IAnimationAttributeData::SetPresetUID (UID presetUID,
bool populateData = true 
)
pure virtual

Set the preset UID for the animation.

Parameters
presetUIDis the motion preset UID to set.
populateDatais set to true if properties from the preset are extracted and set to this animation. If this flag is set to true and if there are previously set animation data, they will be replaced with the data from the preset.
virtual bool IAnimationAttributeData::SetRotationKeyFrame (uint32 keyframe,
const PMRealvalue 
)
pure virtual

Sets the rotation at the specified key frame for the animation.

Parameters
keyframeis the keyframe to set.
valueis the value at keyframe to set.
virtual bool IAnimationAttributeData::SetScaleXKeyFrame (uint32 keyframe,
const PMRealvalue 
)
pure virtual

Sets the scale x at the specified key frame for the animation.

Parameters
whichAnimationis the animation to get.
keyframeis the keyframe to set.
valueis the value at keyframe to set.
virtual bool IAnimationAttributeData::SetScaleYKeyFrame (uint32 keyframe,
const PMRealvalue 
)
pure virtual

Sets the scale y at the specified key frame for whichAnimation.

Parameters
whichAnimationis the animation to get.
keyframeis the keyframe to set.
valueis the value at keyframe to set.
virtual bool IAnimationAttributeData::SetSimpleEaseType (const AnimationEaseType & easeType)
pure virtual

Sets the simple ease type.

Parameters
easeTypeis ease type to set.
virtual bool IAnimationAttributeData::SetTransformOffsetPoint (const PMPointoffsetPoint)
pure virtual

Set the transform point for whichAnimation. The transform point specified the offset percentage (0.0 to 1.0) relative to the target object the animation path motion starts.

Parameters
offsetPointis the offset percent point to set.