IMovieSystem

#include

Public Types

enum ESequenceStopBehavior { eSSB_LeaveTime = 0, eSSB_GotoEndTime = 1, eSSB_GotoStartTime = 2 }

Public Member Functions

virtual void Release ()=0
Release movie system.
virtual void SetUser (IMovieUser *pUser)=0
Set the user.
virtual IMovieUser * GetUser ()=0
Get the user.
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 * CreateSequence (const char *sequence, bool bLoad=false, uint32 id=0)=0
virtual IAnimSequence * LoadSequence (XmlNodeRef &xmlNode, bool bLoadEmpty=true)=0
virtual void AddSequence (IAnimSequence *pSequence)=0
virtual void RemoveSequence (IAnimSequence *pSequence)=0
virtual IAnimSequence * FindSequence (const char *sequence) const =0
virtual IAnimSequence * FindSequenceById (uint32 id) const =0
virtual IAnimSequence * FindSequenceByGUID (CryGUID guid) const =0
virtual IAnimSequence * GetSequence (int i) const =0
virtual int GetNumSequences () const =0
virtual IAnimSequence * GetPlayingSequence (int i) const =0
virtual int GetNumPlayingSequences () const =0
virtual bool IsCutScenePlaying () const =0
virtual uint32 GrabNextSequenceId ()=0
virtual bool AddMovieListener (IAnimSequence *pSequence, IMovieListener *pListener)=0
virtual bool RemoveMovieListener (IAnimSequence *pSequence, IMovieListener *pListener)=0
virtual ISystem * GetSystem ()=0
virtual void RemoveAllSequences ()=0
Remove all sequences from movie system.
virtual void PlaySequence (const char *pSequenceName, IAnimSequence *pParentSeq, bool bResetFX, bool bTrackedSequence, SAnimTime startTime=SAnimTime::Min(), SAnimTime endTime=SAnimTime::Min())=0
virtual void PlaySequence (IAnimSequence *pSequence, IAnimSequence *pParentSeq, bool bResetFX, bool bTrackedSequence, SAnimTime startTime=SAnimTime::Min(), SAnimTime endTime=SAnimTime::Min())=0
virtual bool StopSequence (const char *pSequenceName)=0
virtual bool StopSequence (IAnimSequence *pSequence)=0
virtual bool AbortSequence (IAnimSequence *pSequence, bool bLeaveTime=false)=0
virtual void StopAllSequences ()=0
Stops all currently playing sequences.
virtual void StopAllCutScenes ()=0
virtual bool IsPlaying (IAnimSequence *seq) const =0
Checks if specified sequence is playing.
virtual void Reset (bool bPlayOnReset, bool bSeekToStart)=0
virtual void PlayOnLoadSequences ()=0
Sequences with PLAY_ONRESET flag will start playing after this call.
virtual void StillUpdate ()=0
Update movie system while not playing animation.
virtual void PreUpdate (const float dt)=0
Updates movie system every frame before the entity system to animate all playing sequences.
virtual void PostUpdate (const float dt)=0
Updates movie system every frame after the entity system to animate all playing sequences.
virtual void Render ()=0
Render function call of some special node.
virtual void StartCapture (IAnimSequence *seq, const SCaptureKey &key)=0
Signal the capturing start.
virtual void EndCapture ()=0
Signal the capturing end.
virtual void ControlCapture ()=0
virtual void EnableCameraShake (bool bEnabled)=0
virtual bool IsCameraShakeEnabled () const =0
virtual void Pause ()=0
Pause any playing sequences.
virtual void Resume ()=0
Resume playing sequences.
virtual void SetCallback (IMovieCallback *pCallback)=0
Pause cut scenes in editor. More...
virtual IMovieCallback * GetCallback ()=0
virtual void Serialize (XmlNodeRef &xmlNode, bool bLoading, bool bRemoveOldNodes=false, bool bLoadEmpty=true)=0
Serialize to XML.
virtual const SCameraParams & GetCameraParams () const =0
virtual void SetCameraParams (const SCameraParams &Params)=0
virtual void SendGlobalEvent (const char *pszEvent)=0
virtual SAnimTime GetPlayingTime (IAnimSequence *pSeq)=0
Gets the float time value for a sequence that is already playing.
virtual float GetPlayingSpeed (IAnimSequence *pSeq)=0
virtual bool SetPlayingTime (IAnimSequence *pSeq, SAnimTime fTime)=0
virtual bool SetPlayingSpeed (IAnimSequence *pSeq, float fSpeed)=0
virtual void SetSequenceStopBehavior (ESequenceStopBehavior behavior)=0
Set behavior pattern for stopping sequences.
virtual bool GetStartEndTime (IAnimSequence *pSeq, SAnimTime &fStartTime, SAnimTime &fEndTime)=0
Set the start and end time of an already playing cutscene.
virtual bool SetStartEndTime (IAnimSequence *pSeq, const SAnimTime fStartTime, const SAnimTime fEndTime)=0
virtual void GoToFrame (const char *seqName, float targetFrame)=0
virtual const char * GetOverrideCamName () const =0
Get the name of camera used for sequences instead of cameras specified in the director node.
virtual IMovieSystem::ESequenceStopBehavior GetSequenceStopBehavior ()=0
Get behavior pattern for stopping sequences.
virtual bool IsPhysicsEventsEnabled () const =0
These are used to disable 'Ragdollize' events in the editor when the 'AI/Physics' is off.
virtual void EnablePhysicsEvents (bool enable)=0
virtual void EnableBatchRenderMode (bool bOn)=0
virtual bool IsInBatchRenderMode () const =0
virtual ILightAnimWrapper * CreateLightAnimWrapper (const char *szName) const =0
virtual void SerializeParamType (CAnimParamType &animParamType, XmlNodeRef &xmlNode, bool bLoading, const uint version)=0
Should only be called from CAnimParamType.
virtual const char * GetParamTypeName (const CAnimParamType &animParamType)=0

Detailed Description

Movie System (TrackView) interface. Main entrance point to engine movie capability. Enumerate available movies, update all movies, create animation nodes and tracks.

Member Enumeration Documentation

◆ ESequenceStopBehavior

Enumerator
eSSB_LeaveTime

When sequence is stopped it remains in last played time.

eSSB_GotoEndTime

Default behavior in game, sequence is animated at end time before stop.

eSSB_GotoStartTime

Default behavior in editor, sequence is animated at start time before stop.

Member Function Documentation

◆ AbortSequence()

virtual bool IMovieSystem::AbortSequence ( IAnimSequence * pSequence,
bool bLeaveTime = false
)
pure virtual

Aborts a currently playing sequence. Ignored if sequence is not playing. Calls IMovieListener with MOVIE_EVENT_ABORTED event (MOVIE_EVENT_DONE is NOT called)

Parameters
sequencePointer to Valid sequence to stop.
bLeaveTimeIf false, uses default stop behavior, otherwise leaves the sequence at time
Returns
true if sequence has been aborted. false otherwise

◆ AddMovieListener()

virtual bool IMovieSystem::AddMovieListener ( IAnimSequence * pSequence,
IMovieListener * pListener
)
pure virtual

Adds a listener to a sequence.

Parameters
pSequencePointer to sequence.
pListenerPointer to an IMovieListener.
Returns
true on successful add, false otherwise.

◆ ControlCapture()

virtual void IMovieSystem::ControlCapture ( )
pure virtual

Actually turn on/off the capturing. This is needed for the timing issue of turning on/off the capturing.

◆ EnableCameraShake()

virtual void IMovieSystem::EnableCameraShake ( bool bEnabled)
pure virtual

Set movie system to recording mode. While in recording mode any changes made to node will be added as keys to tracks.

◆ GoToFrame()

virtual void IMovieSystem::GoToFrame ( const char * seqName,
float targetFrame
)
pure virtual

Make the specified sequence go to a given frame time.

Parameters
seqNameA sequence name.
targetFrameA target frame to go to in time.

◆ PlaySequence() [1/2]

virtual void IMovieSystem::PlaySequence ( const char * pSequenceName,
IAnimSequence * pParentSeq,
bool bResetFX,
bool bTrackedSequence,
SAnimTime startTime = SAnimTime::Min(),
SAnimTime endTime = SAnimTime::Min()
)
pure virtual

Start playing sequence. Ignored if sequence is already playing.

Parameters
sequenceName of sequence to play.

◆ PlaySequence() [2/2]

virtual void IMovieSystem::PlaySequence ( IAnimSequence * pSequence,
IAnimSequence * pParentSeq,
bool bResetFX,
bool bTrackedSequence,
SAnimTime startTime = SAnimTime::Min(),
SAnimTime endTime = SAnimTime::Min()
)
pure virtual

Start playing sequence. Ignored if sequence is already playing.

Parameters
sequencePointer to Valid sequence to play.

◆ RemoveMovieListener()

virtual bool IMovieSystem::RemoveMovieListener ( IAnimSequence * pSequence,
IMovieListener * pListener
)
pure virtual

Removes a listener from a sequence.

Parameters
pSequencePointer to sequence.
pListenerPointer to an IMovieListener.
Returns
true on successful removal, false otherwise.

◆ Reset()

virtual void IMovieSystem::Reset ( bool bPlayOnReset,
bool bSeekToStart
)
pure virtual

Resets playback state of movie system. Usually called after loading of level,

◆ SetCallback()

virtual void IMovieSystem::SetCallback ( IMovieCallback * pCallback)
pure virtual

Pause cut scenes in editor.

Resume cut scenes in editor. Callback when animation-data changes.

◆ SetPlayingTime()

virtual bool IMovieSystem::SetPlayingTime ( IAnimSequence * pSeq,
SAnimTime fTime
)
pure virtual

Sets the time progression of an already playing cutscene. If IAnimSequence:NO_SEEK flag is set on pSeq, this call is ignored.

◆ StopAllCutScenes()

virtual void IMovieSystem::StopAllCutScenes ( )
pure virtual

Stops all playing cut-scene sequences. This will not stop all sequences, but only those with CUT_SCENE flag set.

◆ StopSequence() [1/2]

virtual bool IMovieSystem::StopSequence ( const char * pSequenceName)
pure virtual

Stops currently playing sequence. Ignored if sequence is not playing.

Parameters
sequenceName of playing sequence to stop.
Returns
true if sequence has been stopped. false otherwise.

◆ StopSequence() [2/2]

virtual bool IMovieSystem::StopSequence ( IAnimSequence * pSequence)
pure virtual

Stop's currently playing sequence. Ignored if sequence is not playing.

Parameters
sequencePointer to Valid sequence to stop.
Returns
true if sequence has been stopped. false otherwise.