Public Member Functions | Static Public Member Functions | Public Attributes

FBPlayerControl Class Reference

This reference page is linked to from the following overview topics: MotionBuilder 2014, Utility Classes, Animation, Takes.


Search for all occurrences

Detailed Description

Player control.

Interface to use the transport controls (play, stop, etc.) The following Python snippet shows its basic playback operation

    lPlayer = FBPlayerControl()
    lPlayer.GotoStart()
    lPlayer.Play()

Keys can also be set and used with Key(), GotoNextKey(), and GotoPreviousKey().
All actions are performed by default on the current take. The is the MotionBuilder default take, unless you have multiple takes in your scene. To switch between takes, use FBTake.

Definition at line 915 of file fbsystem.h.

#include <fbsystem.h>

Inheritance diagram for FBPlayerControl:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 FBPlayerControl (HIObject pObject=NULL)
 Constructor.
bool Play (bool pUseMarkers=false)
 Play button.
bool PlayReverse (bool pUseMarkers=false)
 Play Reverse button.
void SetPlaySpeed (FBTransportPlaySpeed pPlaySpeed)
 Set Play Speed .
FBTransportPlaySpeed GetPlaySpeed ()
 Get Play Speed .
bool Stop ()
 Stop button.
bool GotoStart ()
 GotoStart button (Rewind).
bool GotoEnd ()
 GotoEnd button (FastForward).
bool Goto (FBTime pTime)
 Goto a time specified by pTime.
bool StepForward ()
 Step one frame ahead.
bool StepBackward ()
 Step one frame backward.
bool Record (bool pOverrideTake=false, bool pCopyData=true)
 Begin recording.
void LockTransport (bool pLock)
 Lock the transport control.
bool IsLocked ()
 Return the current locking state of the transport.
FBTransportMode GetTransportMode ()
 Get Transport Mode.
void SetTransportFps (FBTimeMode pTimeMode, double pCustom=0.0)
 Set the system frame rate use for display.
FBTimeMode GetTransportFps ()
 Get the UI frame rate use for display configure in the system.
double GetTransportFpsValue (FBTimeMode pTimeMode=kFBTimeModeDefault)
 Get the UI frame rate value.
void Key ()
 Key default data.
void GotoNextKey ()
 Go to the next key.
void GotoPreviousKey ()
 Go to the previous key.
void EvaluationPause ()
 Pause device evaluation thread.
void EvaluationResume ()
 Resume device evaluation thread.

Static Public Member Functions

static FBPlayerControlTheOne ()
 Get the global object for this class.

Public Attributes

FBPropertyBool LoopActive
 Read Write Property: Is looping active?
FBPropertyTime LoopStart
 Read Write Property: Loop begin time.
FBPropertyTime LoopStop
 Read Write Property: Loop end time.
FBPropertyTime ZoomWindowStart
 Read Write Property: Starting time of the transport control zoom window.
FBPropertyTime ZoomWindowStop
 Read Write Property: Stopping time of the transport control zoom window.
FBPropertyTime NextMarker
 Read Only Property: Next marked time.
FBPropertyTime PreviousMarker
 Read Only Property: Previous marked time.
FBPropertyBool IsRecording
 Read Only Property: Is there a recording in progress?
FBPropertyBool IsPlaying
 Read Only Property: Is the transport control playing?
FBPropertyBool IsPlotting
 Read Only Property: Is there a plotting in progress?
FBPropertyTransportSnapMode SnapMode
 Read Write Property: Set the transport control snap mode.
FBPropertyTransportTimeFormat TransportTimeFormat
 Read Write Property: Current Time Mode of the transport controls.
FBPropertyTime RecordingSamplingPeriod
 Read Write Property: Sampling period for the model recording.
FBPropertyTime PlotSamplingPeriod
 Read Write Property: Sampling period for the model plotting.

Constructor & Destructor Documentation

FBPlayerControl ( HIObject  pObject = NULL)

Constructor.

Parameters:
pObjectInternal parent object(default=NULL).

Member Function Documentation

bool Play ( bool  pUseMarkers = false)

Play button.

Parameters:
pUseMarkersPlay until next marker if true, ignore markers otherwise.
Returns:
true if successful.
bool PlayReverse ( bool  pUseMarkers = false)

Play Reverse button.

Parameters:
pUseMarkersPlay until next marker if true, ignore markers otherwise.
Returns:
true if successful.
void SetPlaySpeed ( FBTransportPlaySpeed  pPlaySpeed)

Set Play Speed .

Parameters:
pPlaySpeedindicate the play speed when a play command occur.
FBTransportPlaySpeed GetPlaySpeed ( )

Get Play Speed .

Returns:
transport current playback speed.
bool Stop ( )

Stop button.

Returns:
true if successful.
bool GotoStart ( )

GotoStart button (Rewind).

Returns:
true if successful.
bool GotoEnd ( )

GotoEnd button (FastForward).

Returns:
true if successful.
bool Goto ( FBTime  pTime)

Goto a time specified by pTime.

Parameters:
pTimeTime to jump to.
Returns:
true if successful.
bool StepForward ( )

Step one frame ahead.

Returns:
true if successful.
bool StepBackward ( )

Step one frame backward.

Returns:
true if successful.
bool Record ( bool  pOverrideTake = false,
bool  pCopyData = true 
)

Begin recording.

Parameters:
pOverrideTakeWrite over current take?(default=false)
pCopyDataUnused. Necessary for compatibility(default=true).
Returns:
true if successful.
void LockTransport ( bool  pLock)

Lock the transport control.

Parameters:
pLockboolean value that indicates the new locked state of the transport.
bool IsLocked ( )

Return the current locking state of the transport.

FBTransportMode GetTransportMode ( )

Get Transport Mode.

Returns:
Current mode of the transport controls.
void SetTransportFps ( FBTimeMode  pTimeMode,
double  pCustom = 0.0 
)

Set the system frame rate use for display.

Parameters:
pTimeModeIndicate the frame rate value to use base on the FBTimeMode values enum.(kFBTimeModeDefault will be stored in fps)
pCustomShould the time mode be kFBTimeModeCustom, this is used to specify the custom framerate.
FBTimeMode GetTransportFps ( )

Get the UI frame rate use for display configure in the system.

Returns:
current FrameRate selected for the system.
double GetTransportFpsValue ( FBTimeMode  pTimeMode = kFBTimeModeDefault)

Get the UI frame rate value.

Parameters:
pTimeModethe time mode whose frame rate will be returned
Returns:
Frame rate of the input time mode or system time mode when pTimeMode is not provided.
void Key ( )

Key default data.

Key all selected data.

void GotoNextKey ( )

Go to the next key.

void GotoPreviousKey ( )

Go to the previous key.

void EvaluationPause ( )

Pause device evaluation thread.

void EvaluationResume ( )

Resume device evaluation thread.

static FBPlayerControl& TheOne ( ) [static]

Get the global object for this class.

Returns:
the global object.

Member Data Documentation

Read Write Property: Is looping active?

Definition at line 1038 of file fbsystem.h.

Read Write Property: Loop begin time.

Definition at line 1039 of file fbsystem.h.

Read Write Property: Loop end time.

Definition at line 1040 of file fbsystem.h.

Read Write Property: Starting time of the transport control zoom window.

Definition at line 1042 of file fbsystem.h.

Read Write Property: Stopping time of the transport control zoom window.

Definition at line 1043 of file fbsystem.h.

Read Only Property: Next marked time.

Definition at line 1045 of file fbsystem.h.

Read Only Property: Previous marked time.

Definition at line 1046 of file fbsystem.h.

Read Only Property: Is there a recording in progress?

Definition at line 1048 of file fbsystem.h.

Read Only Property: Is the transport control playing?

Definition at line 1049 of file fbsystem.h.

Read Only Property: Is there a plotting in progress?

Definition at line 1050 of file fbsystem.h.

FBPropertyTransportSnapMode SnapMode

Read Write Property: Set the transport control snap mode.

Definition at line 1052 of file fbsystem.h.

FBPropertyTransportTimeFormat TransportTimeFormat

Read Write Property: Current Time Mode of the transport controls.

Definition at line 1054 of file fbsystem.h.

Read Write Property: Sampling period for the model recording.

Definition at line 1056 of file fbsystem.h.

Read Write Property: Sampling period for the model plotting.

Definition at line 1057 of file fbsystem.h.


The documentation for this class was generated from the following file:

FBPlayerControl FBPlayerControl FBPlayerControl FBPlayerControl FBPlayerControl FBPlayerControl FBPlayerControl FBPlayerControl FBPlayerControl FBPlayerControl
FBPlayerControl FBPlayerControl FBPlayerControl FBPlayerControl FBPlayerControl FBPlayerControl FBPlayerControl FBPlayerControl FBPlayerControl FBPlayerControl