struct IMovieSystem { enum ESequenceStopBehavior { eSSB_LeaveTime = 0, eSSB_GotoEndTime = 1, eSSB_GotoStartTime = 2 }; };
IMovieSystem.h
Main entrance point to engine movie capability. Enumerate available movies, update all movies, create animation nodes and tracks.
enum ESequenceStopBehavior { eSSB_LeaveTime = 0, eSSB_GotoEndTime = 1, eSSB_GotoStartTime = 2 };
IMovieSystem.h
Members |
Description |
eSSB_LeaveTime = 0 |
When sequence is stopped it remains in last played time. |
eSSB_GotoEndTime = 1 |
Default behavior in game, sequence is animated at end time before stop. |
eSSB_GotoStartTime = 2 |
Default behavior in editor, sequence is animated at start time before stop. |
virtual ~IMovieSystem();
virtual bool AbortSequence(IAnimSequence * pSequence, bool bLeaveTime = false) = 0;
Ignored if sequence is not playing. Calls IMovieListener with MOVIE_EVENT_ABORTED event (MOVIE_EVENT_DONE is NOT called) Returns true if sequence has been aborted. false otherwise @param sequence Pointer to Valid sequence to stop. @param bLeaveTime If false, uses default stop behavior, otherwise leaves the sequence at time
virtual bool AddMovieListener(IAnimSequence* pSequence, IMovieListener* pListener) = 0;
Adds a listener to a sequence @param pSequence Pointer to sequence @param pListener Pointer to an IMovieListener @return true on successful add, false otherwise
virtual void AddSequence(IAnimSequence * pSequence) = 0;
virtual void ControlCapture() = 0;
Actually turn on/off the capturing. This is needed for the timing issue of turning on/off the capturing.
virtual ILightAnimWrapper* CreateLightAnimWrapper(const char* name) const = 0;
virtual IAnimSequence* CreateSequence(const char * sequence, bool bLoad = false, uint32 id = 0) = 0;
virtual IAnimTrack* CreateTrack(EAnimCurveType type) = 0;
Parameters |
Description |
EAnimCurveType type |
Type of track, one of EAnimTrackType enums. |
Creates a new animation track with specified type.
virtual void EnableBatchRenderMode(bool bOn) = 0;
virtual void EnableCameraShake(bool bEnabled) = 0;
virtual void EnablePhysicsEvents(bool enable) = 0;
virtual void EndCapture() = 0;
Signal the capturing end.
virtual IAnimSequence* FindSequence(const char * sequence) const = 0;
virtual IAnimSequence* FindSequenceById(uint32 id) const = 0;
virtual IMovieCallback* GetCallback() = 0;
virtual const SCameraParams& GetCameraParams() const = 0;
virtual int GetEntityNodeParamCount() const = 0;
Accessor for entity node params for displaying in sandbox
virtual IAnimNode::ESupportedParamFlags GetEntityNodeParamFlags(int index) const = 0;
virtual const char * GetEntityNodeParamName(int index) const = 0;
virtual CAnimParamType GetEntityNodeParamType(int index) const = 0;
virtual void GetMemoryUsage(ICrySizer * pSizer) const = 0;
virtual int GetNumPlayingSequences() const = 0;
virtual int GetNumSequences() const = 0;
virtual const char * GetOverrideCamName() const = 0;
Get the name of camera used for sequences instead of cameras specified in the director node.
virtual IAnimSequence* GetPlayingSequence(int i) const = 0;
virtual float GetPlayingSpeed(IAnimSequence * pSeq) = 0;
virtual float GetPlayingTime(IAnimSequence * pSeq) = 0;
Gets the float time value for a sequence that is already playing
virtual IAnimSequence* GetSequence(int i) const = 0;
virtual IMovieSystem::ESequenceStopBehavior GetSequenceStopBehavior() = 0;
Get behavior pattern for stopping sequences.
virtual bool GetStartEndTime(IAnimSequence * pSeq, float & fStartTime, float & fEndTime) = 0;
Set the start and end time of an already playing cutscene.
virtual ISystem* GetSystem() = 0;
virtual IMovieUser* GetUser() = 0;
! Get the user.
virtual void GoToFrame(const char * seqName, float targetFrame) = 0;
Make the specified sequence go to a given frame time. @param seqName A sequence name. @param targetFrame A target frame to go to in time.
virtual uint32 GrabNextSequenceId() = 0;
virtual bool IsCameraShakeEnabled() const = 0;
virtual bool IsCutScenePlaying() const = 0;
virtual bool IsInBatchRenderMode() const = 0;
virtual bool IsPhysicsEventsEnabled() const = 0;
These are used to disable 'Ragdollize' events in the editor when the 'AI/Physics' is off.
virtual bool IsPlaying(IAnimSequence * seq) const = 0;
Checks if specified sequence is playing.
virtual bool IsRecording() const = 0;
virtual bool Load(const char * pszFile, const char * pszMission) = 0;
! Loads all nodes and sequences from a specific file (should be called when the level is loaded).
virtual IAnimSequence* LoadSequence(XmlNodeRef & xmlNode, bool bLoadEmpty = true) = 0;
virtual int OnCameraRenamed(const char * before, const char * after) = 0;
If the name of a camera changes, the keys that refer it in the camera track of the director node should be properly updated also. This updates the name of the corresponding camera node also, if any.
@param before The old name of the camera. @param after The new name of the camera. @return Number of modified camera keys.
virtual int OnSequenceRenamed(const char * before, const char * after) = 0;
If the name of a sequence changes, the keys that refer it in the sequence track of the director node should be properly updated also.
@param before The old name of the sequence. @param after The new name of the sequence. @return Number of modified sequence keys.
virtual void Pause() = 0;
Pause any playing sequences.
virtual void PauseCutScenes() = 0;
Pause cut scenes in editor.
virtual void PlayOnLoadSequences() = 0;
Sequences with PLAY_ONRESET flag will start playing after this call.
virtual void PlaySequence(IAnimSequence * pSequence, IAnimSequence * pParentSeq, bool bResetFX, bool bTrackedSequence, float startTime = -FLT_MAX, float endTime = -FLT_MAX) = 0;
Start playing sequence. Call ignored if sequence is already playing. @param sequence Pointer to Valid sequence to play.
virtual void PlaySequence(const char * pSequenceName, IAnimSequence * pParentSeq, bool bResetFX, bool bTrackedSequence, float startTime = -FLT_MAX, float endTime = -FLT_MAX) = 0;
Sequence playback. /////////////////////////////////////////////////////////////////////// Start playing sequence. Call ignored if sequence is already playing. @param sequence Name of sequence to play.
virtual void PostUpdate(const float dt) = 0;
Updates movie system every frame after the entity system to animate all playing sequences.
virtual void PreUpdate(const float dt) = 0;
Updates movie system every frame before the entity system to animate all playing sequences.
virtual void Release() = 0;
! Release movie system.
virtual void RemoveAllSequences() = 0;
Remove all sequences from movie system.
virtual bool RemoveMovieListener(IAnimSequence* pSequence, IMovieListener* pListener) = 0;
Removes a listener from a sequence @param pSequence Pointer to sequence @param pListener Pointer to an IMovieListener @return true on successful removal, false otherwise
virtual void RemoveSequence(IAnimSequence * pSequence) = 0;
virtual void Render() = 0;
Render function call of some special node.
virtual void Reset(bool bPlayOnReset, bool bSeekToStart) = 0;
usually called after loading of level,
virtual void Resume() = 0;
Resume playing sequences.
virtual void ResumeCutScenes() = 0;
Resume cut scenes in editor.
virtual void SendGlobalEvent(const char * pszEvent) = 0;
virtual void Serialize(XmlNodeRef & xmlNode, bool bLoading, bool bRemoveOldNodes = false, bool bLoadEmpty = true) = 0;
Serialize to XML.
virtual void SerializeParamType(CAnimParamType & animParamType, XmlNodeRef & xmlNode, bool bLoading, const uint version) = 0;
Should only be called from CAnimParamType
virtual void SetCallback(IMovieCallback * pCallback) = 0;
Callback when animation-data changes
virtual void SetCameraParams(const SCameraParams & Params) = 0;
virtual bool SetPlayingSpeed(IAnimSequence * pSeq, float fSpeed) = 0;
virtual bool SetPlayingTime(IAnimSequence * pSeq, float fTime) = 0;
Sets the time progression of an already playing cutscene. If IAnimSequence:NO_SEEK flag is set on pSeq, this call is ignored.
virtual void SetRecording(bool recording) = 0;
Set movie system into recording mode, While in recording mode any changes made to node will be added as keys to tracks.
virtual void SetSequenceStopBehavior(ESequenceStopBehavior behavior) = 0;
Set behavior pattern for stopping sequences.
virtual bool SetStartEndTime(IAnimSequence * pSeq, const float fStartTime, const float fEndTime) = 0;
virtual void SetUser(IMovieUser * pUser) = 0;
! Set the user.
virtual void StartCapture(const ICaptureKey& key) = 0;
Signal the capturing start.
virtual void StillUpdate() = 0;
Update movie system while not playing animation.
virtual void StopAllCutScenes() = 0;
Stops all playing cut-scene sequences. This will not stop all sequences, but only those with CUT_SCENE flag set.
virtual void StopAllSequences() = 0;
Stops all currently playing sequences.
virtual bool StopSequence(IAnimSequence * pSequence) = 0;
Stop's currently playing sequence. Ignored if sequence is not playing. Returns true if sequence has been stopped. false otherwise @param sequence Pointer to Valid sequence to stop.
virtual bool StopSequence(const char * pSequenceName) = 0;
Stops currently playing sequence. Ignored if sequence is not playing. Returns true if sequence has been stopped. false otherwise @param sequence Name of playing sequence to stop.