Python Reference Guide
 
Loading...
Searching...
No Matches
FBPlayerControl Class Reference

Player control. More...

#include <pyfbsdk_generated.h>

Inheritance diagram for FBPlayerControl:

Public Member Functions

 FBPlayerControl ()
 Constructor.
 
int AddGlobalTimeMark (FBTime pTime, str pName=None)
 Add a global time mark.
 
 DeleteAllGlobalTimeMarks ()
 Delete all global time marks.
 
bool DeleteGlobalTimeMark (int pIndex)
 Delete a global time mark.
 
 EvaluationPause ()
 Pause device evaluation thread.
 
 EvaluationResume ()
 Resume device evaluation thread.
 
FBTime GetEditCurrentTime ()
 Get Edit Current Time.
 
FBTime GetEditStart ()
 Get Edit Start.
 
FBTime GetEditStop ()
 Get Edit Stop.
 
FBTime GetEditZoomStart ()
 Get Edit Zoom Start.
 
FBTime GetEditZoomStop ()
 Get Edit Zoom Stop.
 
FBTimeMarkAction GetGlobalTimeMarkAction (int pIndex)
 Returns the action associated with a global time mark.
 
FBColor GetGlobalTimeMarkColor (int pIndex)
 Returns the color associated with a global time mark.
 
int GetGlobalTimeMarkCount ()
 Returns the number of global time marks.
 
bool GetGlobalTimeMarkLock (int pIndex)
 Returns the lock status associated with a global time mark.
 
str GetGlobalTimeMarkName (int pIndex)
 Returns the name associated with a global time mark.
 
FBTime GetGlobalTimeMarkTime (int pIndex)
 Returns the time associated with a global time mark.
 
int GetNextGlobalTimeMarkIndex ()
 Returns the next global time mark index, based on the current local time.
 
float GetPlaySpeed ()
 Get Play Speed .
 
FBTransportPlaySpeed GetPlaySpeedMode ()
 Get Play Speed Mode.
 
int GetPreviousGlobalTimeMarkIndex ()
 Returns the previous global time mark index, based on the current local time.
 
FBTimeReferential GetTimeReferential ()
 Get Time Referential.
 
FBTimeMode GetTransportFps ()
 Get the UI frame rate use for display configure in the system.
 
float GetTransportFpsValue (FBTimeMode pTimeMode=kFBTimeModeDefault)
 Get the UI frame rate value.
 
FBTransportMode GetTransportMode ()
 Get Transport Mode.
 
bool Goto (FBTime pTime)
 Goto a time specified by pTime.
 
bool Goto (FBTime p0, FBTimeReferential p1)
 Goto a time specified by pTime.
 
bool GotoEnd ()
 GotoEnd button (FastForward).
 
bool GotoEnd (FBTimeReferential p0)
 GotoEnd button (FastForward).
 
 GotoNextKey ()
 Go to the next key.
 
 GotoPreviousKey ()
 Go to the previous key.
 
bool GotoStart ()
 GotoStart button (Rewind).
 
bool GotoStart (FBTimeReferential p0)
 GotoStart button (Rewind).
 
bool IsLocked ()
 Return the current locking state of the transport.
 
 Key ()
 Key default data.
 
 LockTransport (bool pLock)
 Lock the transport control.
 
bool Play (bool pUseMarkers=False)
 Play button.
 
bool PlayReverse (bool pUseMarkers=False)
 Play Reverse button.
 
bool Record (bool pOverrideTake=False, bool pCopyData=True)
 Begin recording.
 
bool SetAllGlobalTimeMarkLock (bool pLock)
 Sets the new lock status for all existing global time marks.
 
 SetEditStart (FBTime pTime)
 Set Edit Start.
 
 SetEditStop (FBTime pTime)
 Set Edit Stop.
 
 SetEditZoomStart (FBTime pTime)
 Set Edit Zoom Start.
 
 SetEditZoomStop (FBTime pTime)
 Set Edit Zoom Stop.
 
bool SetGlobalTimeMarkAction (int pIndex, FBTimeMarkAction pAction)
 Sets a new action for an existing global time mark.
 
bool SetGlobalTimeMarkColor (int pIndex, FBColor pColor)
 Sets a new color for an existing global time mark.
 
bool SetGlobalTimeMarkLock (int pIndex, bool pLock)
 Sets a new lock status for an existing global time mark.
 
bool SetGlobalTimeMarkName (int pIndex, str pName)
 Sets a new name for an existing global time mark.
 
int SetGlobalTimeMarkTime (int pIndex, FBTime pTime)
 Sets a new time for an existing global time mark.
 
 SetPlaySpeed (float pSpeed)
 Set Play Speed.
 
 SetPlaySpeedMode (FBTransportPlaySpeed pPlaySpeedMode)
 Set Play Speed Mode.
 
 SetTimeReferential (FBTimeReferential pTimeReferential)
 Set Time Referential.
 
 SetTransportFps (FBTimeMode pTimeMode, float pCustom=0.0)
 Set the system frame rate use for display.
 
bool StepBackward ()
 Step one frame backward.
 
bool StepBackward (FBTimeReferential p0)
 Step one frame backward.
 
bool StepForward ()
 Step one frame ahead.
 
bool StepForward (FBTimeReferential p0)
 Step one frame ahead.
 
bool Stop ()
 Stop button.
 
- Public Member Functions inherited from FBComponent
 FBComponent ()
 Constructor.
 
str ClassName ()
 Get the class name.
 
 DisableObjectFlags (FBObjectFlag pFlags)
 Disable a specific Object Flags.
 
 EnableObjectFlags (FBObjectFlag pFlags)
 Enable a specific Object Flags.
 
bool FBCreate ()
 Open Reality Creation function.
 
 FBDelete ()
 Open Reality deletion function.
 
 FBDestroy ()
 Open Reality destruction function.
 
FBObjectFlag GetObjectFlags ()
 Get all Object Flags (concatenated).
 
bool GetObjectStatus (FBObjectStatus pStatus)
 Check to see if an object status is enabled.
 
FBFileReference GetOwnerFileReference (p0)
 Get the owner FileReference object.
 
 HardSelect ()
 HardSelect.
 
bool HasObjectFlags (FBObjectFlag pFlags)
 Check whether a specific object flag is enabled.
 
bool Is (int pTypeId)
 Returns true if object is of type TypeId.
 
bool ProcessNamespaceHierarchy (FBNamespaceAction pNamespaceAction, str pNamespaceName, str pReplaceTo=None, bool pAddRight=True)
 ProcessNamespaceHierarchy.
 
bool ProcessObjectNamespace (FBNamespaceAction pNamespaceAction, str pNamespaceName, str pReplaceTo=None, bool pAddRight=True)
 ProcessObjectNamespace.
 
int PropertyAdd (FBProperty pProperty)
 Add a property to the component's property manager.
 
bool PropertyAddReferenceProperty (FBProperty pReferenceProperty)
 Add a reference property to the component's property manager.
 
FBProperty PropertyCreate (str pName, FBType pType, str pDataType, bool pAnimatable, bool pIsUser=False, FBProperty pReferenceSource=None)
 Create user or dynamic property.
 
 PropertyGetModifiedList (FBArrayTemplate< FB > pPropList, FBPlugModificationFlag pModificationFlags)
 Get list of properties which have been modified since last loading.
 
 PropertyRemove (FBProperty pProperty)
 Remove a Property from the component's Property manager.
 
 SetObjectFlags (FBObjectFlag pFlags)
 SetObjectFlags.
 
 SetObjectStatus (FBObjectStatus pStatus, bool pValue)
 Enable/Disable a specific Object Status.
 

Public Attributes

bool IsPlaying
 Read Only Property: Is the transport control playing?

 
bool IsPlotting
 Read Only Property: Is there a plotting in progress?

 
bool IsRecording
 Read Only Property: Is there a recording in progress?

 
FBTransportLoopMode LoopMode
 Read Write Property: Loop mode.

 
FBTime LoopStart
 Read Write Property: Loop begin time.

 
FBTime LoopStop
 Read Write Property: Loop end time.

 
FBTime NextMarker
 Read Only Property: Next marked time.

 
FBEvent OnChange
 Event Property: Fired when something in the player control has changed. (see FBEventPlayerControlChange)

 
FBTime PlotSamplingPeriod
 Read Write Property: Sampling period for the model plotting.

 
FBTime PreviousMarker
 Read Only Property: Previous marked time.

 
FBTime RecordingSamplingPeriod
 Read Write Property: Sampling period for the model recording.

 
FBTransportSnapMode SnapMode
 Read Write Property: Set the transport control snap mode.

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

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

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

 
- Public Attributes inherited from FBComponent
FBListComponent Components
 List: List of components.

 
str LongName
 Read Write Property: Name and namespace for object.

 
str Name
 Read Write Property: Unique name of object. See sample: RemoveSuffixFromNameOfSceneElements.py.
 
FBListComponent Parents
 List: Parents.

 
FBManager PropertyList
 Read Only Property: Manages all of the properties for the component.

 
bool Selected
 Read Write Property: Selected property.

 
int TypeInfo
 Contains the Type information of the object.

 
- Public Attributes inherited from FBPlug
str ClassGroupName
 ClassGroupName of the object.

 
int TypeInfo
 TypeInfo.

 

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()
FBPlayerControl()
Constructor.
bool Play(bool pUseMarkers=False)
Play button.
bool GotoStart()
GotoStart button (Rewind).

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. To change the current reference time (e.g.: Local time, System time), use FBReferenceTime.

See samples: ShotTrackSetupTool.py, RenderLayers.py, CameraSwitcher.py, BloopSlate.py, RecordLight.py, Timeline.py, CreateProfilingEventsLog.py, MirrorPoseOverTime.py, MultiLayerKeying.py, StartDevice.py, StopDevice.py, TimeCodeKeying.py.

Constructor & Destructor Documentation

◆ FBPlayerControl()

Constructor.

Member Function Documentation

◆ AddGlobalTimeMark()

int AddGlobalTimeMark ( FBTime  pTime,
str  pName = None 
)

Add a global time mark.

It doesn't allow creating a time mark at the same time of another time mark. Note: Internally, the global time marks are stored in time order. Adding a time mark before other existing time marks will modify the index of these other time marks.

Parameters
pTimeTime where to add the time mark.
pNameName of the time mark to add.
Returns
The index of the time mark added if the operation is successful, -1 otherwise.

◆ DeleteAllGlobalTimeMarks()

DeleteAllGlobalTimeMarks ( )

Delete all global time marks.

◆ DeleteGlobalTimeMark()

bool DeleteGlobalTimeMark ( int  pIndex)

Delete a global time mark.

Note: Internally, the global time marks are stored in time order. Deleting a time mark will modify the index of time marks laying after the deleted time mark.

Parameters
pIndexIndex of the time mark to delete.
Returns
True if the operation is successful, false otherwise.

◆ EvaluationPause()

EvaluationPause ( )

Pause device evaluation thread.

◆ EvaluationResume()

EvaluationResume ( )

Resume device evaluation thread.

◆ GetEditCurrentTime()

FBTime GetEditCurrentTime ( )

Get Edit Current Time.

Returns
The current time, in the edit time referential.

◆ GetEditStart()

FBTime GetEditStart ( )

Get Edit Start.

Returns
Start value for the edit time range.

◆ GetEditStop()

FBTime GetEditStop ( )

Get Edit Stop.

Returns
Stop value for the edit time range.

◆ GetEditZoomStart()

FBTime GetEditZoomStart ( )

Get Edit Zoom Start.

Returns
Start value for the edit zoom window.

◆ GetEditZoomStop()

FBTime GetEditZoomStop ( )

Get Edit Zoom Stop.

Returns
Stop value for the edit zoom window.

◆ GetGlobalTimeMarkAction()

FBTimeMarkAction GetGlobalTimeMarkAction ( int  pIndex)

Returns the action associated with a global time mark.

Parameters
pIndexIndex of the time mark.
Returns
The action associated with the time mark.

◆ GetGlobalTimeMarkColor()

FBColor GetGlobalTimeMarkColor ( int  pIndex)

Returns the color associated with a global time mark.

Parameters
pIndexIndex of the time mark.
Returns
The color associated with the time mark.

◆ GetGlobalTimeMarkCount()

int GetGlobalTimeMarkCount ( )

Returns the number of global time marks.

Returns
The number of global time marks.

◆ GetGlobalTimeMarkLock()

bool GetGlobalTimeMarkLock ( int  pIndex)

Returns the lock status associated with a global time mark.

Parameters
pIndexIndex of the time mark.
Returns
The lock status associated with the time mark.

◆ GetGlobalTimeMarkName()

str GetGlobalTimeMarkName ( int  pIndex)

Returns the name associated with a global time mark.

Parameters
pIndexIndex of the time mark.
Returns
The name associated with the time mark.

◆ GetGlobalTimeMarkTime()

FBTime GetGlobalTimeMarkTime ( int  pIndex)

Returns the time associated with a global time mark.

Parameters
pIndexIndex of the time mark.
Returns
The time associated with the time mark.

◆ GetNextGlobalTimeMarkIndex()

int GetNextGlobalTimeMarkIndex ( )

Returns the next global time mark index, based on the current local time.

Returns
The next global time mark index, -1 if any next time mark is available.

◆ GetPlaySpeed()

float GetPlaySpeed ( )

Get Play Speed .

Returns
transport current playback speed.

◆ GetPlaySpeedMode()

FBTransportPlaySpeed GetPlaySpeedMode ( )

Get Play Speed Mode.

Returns
transport current playback speed mode, including kFBSpeed_Custom mode.

◆ GetPreviousGlobalTimeMarkIndex()

int GetPreviousGlobalTimeMarkIndex ( )

Returns the previous global time mark index, based on the current local time.

Returns
The previous global time mark index, -1 if any previous time mark is available.

◆ GetTimeReferential()

FBTimeReferential GetTimeReferential ( )

Get Time Referential.

Returns
Current time referential.

◆ GetTransportFps()

FBTimeMode GetTransportFps ( )

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

Returns
current FrameRate selected for the system.

◆ GetTransportFpsValue()

float 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.

◆ GetTransportMode()

FBTransportMode GetTransportMode ( )

Get Transport Mode.

Returns
Current mode of the transport controls.

◆ Goto() [1/2]

bool Goto ( FBTime  p0,
FBTimeReferential  p1 
)

Goto a time specified by pTime.

Parameters
p0Time to jump to.
p1Time referential to use. kFBTimeReferentialAction or kFBTimeReferentialEdit
Returns
true if successful.

◆ Goto() [2/2]

bool Goto ( FBTime  pTime)

Goto a time specified by pTime.

Parameters
pTimeTime to jump to.
Returns
true if successful.

◆ GotoEnd() [1/2]

bool GotoEnd ( )

GotoEnd button (FastForward).

Returns
true if successful.

◆ GotoEnd() [2/2]

bool GotoEnd ( FBTimeReferential  p0)

GotoEnd button (FastForward).

Parameters
p0Time referential to use. kFBTimeReferentialAction or kFBTimeReferentialEdit
Returns
true if successful.

◆ GotoNextKey()

GotoNextKey ( )

Go to the next key.

◆ GotoPreviousKey()

GotoPreviousKey ( )

Go to the previous key.

◆ GotoStart() [1/2]

bool GotoStart ( )

GotoStart button (Rewind).

Returns
true if successful.

◆ GotoStart() [2/2]

bool GotoStart ( FBTimeReferential  p0)

GotoStart button (Rewind).

Parameters
p0Time referential to use. kFBTimeReferentialAction or kFBTimeReferentialEdit
Returns
true if successful.

◆ IsLocked()

bool IsLocked ( )

Return the current locking state of the transport.

◆ Key()

Key ( )

Key default data.

Key all selected data.

◆ LockTransport()

LockTransport ( bool  pLock)

Lock the transport control.

Parameters
pLockboolean value that indicates the new locked state of the transport.

◆ Play()

bool Play ( bool  pUseMarkers = False)

Play button.

Parameters
pUseMarkersPlay until next marker if true, ignore markers otherwise.
Returns
true if successful.

◆ PlayReverse()

bool PlayReverse ( bool  pUseMarkers = False)

Play Reverse button.

Parameters
pUseMarkersPlay until next marker if true, ignore markers otherwise.
Returns
true if successful.

◆ Record()

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.

◆ SetAllGlobalTimeMarkLock()

bool SetAllGlobalTimeMarkLock ( bool  pLock)

Sets the new lock status for all existing global time marks.

Parameters
pLockThe new lock status for all the time marks.
Returns
True if the operation is successful, false otherwise.

◆ SetEditStart()

SetEditStart ( FBTime  pTime)

Set Edit Start.

Parameters
pTimeThe new start value for the edit time range.

◆ SetEditStop()

SetEditStop ( FBTime  pTime)

Set Edit Stop.

Parameters
pTimeThe new stop value for the edit time range.

◆ SetEditZoomStart()

SetEditZoomStart ( FBTime  pTime)

Set Edit Zoom Start.

Parameters
pTimeThe new start value for the edit zoom window.

◆ SetEditZoomStop()

SetEditZoomStop ( FBTime  pTime)

Set Edit Zoom Stop.

Parameters
pTimeThe new stop value for the edit zoom window.

◆ SetGlobalTimeMarkAction()

bool SetGlobalTimeMarkAction ( int  pIndex,
FBTimeMarkAction  pAction 
)

Sets a new action for an existing global time mark.

Parameters
pIndexIndex of the time mark.
pActionThe new action for the time mark.
Returns
True if the operation is successful, false otherwise.

◆ SetGlobalTimeMarkColor()

bool SetGlobalTimeMarkColor ( int  pIndex,
FBColor  pColor 
)

Sets a new color for an existing global time mark.

Parameters
pIndexIndex of the time mark.
pColorThe new color for the time mark.
Returns
True if the operation is successful, false otherwise.

◆ SetGlobalTimeMarkLock()

bool SetGlobalTimeMarkLock ( int  pIndex,
bool  pLock 
)

Sets a new lock status for an existing global time mark.

Parameters
pIndexIndex of the time mark.
pLockThe new lock status for the time mark.
Returns
True if the operation is successful, false otherwise.

◆ SetGlobalTimeMarkName()

bool SetGlobalTimeMarkName ( int  pIndex,
str  pName 
)

Sets a new name for an existing global time mark.

Parameters
pIndexIndex of the time mark.
pNameThe new name for the time mark.
Returns
True if the operation is successful, false otherwise.

◆ SetGlobalTimeMarkTime()

int SetGlobalTimeMarkTime ( int  pIndex,
FBTime  pTime 
)

Sets a new time for an existing global time mark.

Note: Internally, the global time marks are stored in time order. Modifying the time of a time mark may modify the index of all time marks.

Parameters
pIndexIndex of the time mark.
pTimeThe new time for the time mark.
Returns
The new index of the modified time mark.

◆ SetPlaySpeed()

SetPlaySpeed ( float  pSpeed)

Set Play Speed.

Parameters
pSpeedset customized speed. It will automatically convert to one of pre-defined play speed mode if it is equal to the pre-defined speed.

◆ SetPlaySpeedMode()

SetPlaySpeedMode ( FBTransportPlaySpeed  pPlaySpeedMode)

Set Play Speed Mode.

Parameters
pPlaySpeedModea pre-defined play speed mode. Don't make sense to input kFBSpeed_Custom. To set the custom speed, use SetPlaySpeed() function directly.

◆ SetTimeReferential()

SetTimeReferential ( FBTimeReferential  pTimeReferential)

Set Time Referential.

Parameters
pTimeReferentialThe new time referential. Only kFBTimeReferentialAction and kFBTimeReferentialEdit are supported

◆ SetTransportFps()

SetTransportFps ( FBTimeMode  pTimeMode,
float  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.

◆ StepBackward() [1/2]

bool StepBackward ( )

Step one frame backward.

Returns
true if successful.

◆ StepBackward() [2/2]

bool StepBackward ( FBTimeReferential  p0)

Step one frame backward.

Parameters
p0Time referential to use. kFBTimeReferentialAction or kFBTimeReferentialEdit
Returns
true if successful.

◆ StepForward() [1/2]

bool StepForward ( )

Step one frame ahead.

Returns
true if successful.

◆ StepForward() [2/2]

bool StepForward ( FBTimeReferential  p0)

Step one frame ahead.

Parameters
p0Time referential to use. kFBTimeReferentialAction or kFBTimeReferentialEdit
Returns
true if successful.

◆ Stop()

bool Stop ( )

Stop button.

Returns
true if successful.

Member Data Documentation

◆ IsPlaying

bool IsPlaying

Read Only Property: Is the transport control playing?

◆ IsPlotting

bool IsPlotting

Read Only Property: Is there a plotting in progress?

◆ IsRecording

bool IsRecording

Read Only Property: Is there a recording in progress?

◆ LoopMode

Read Write Property: Loop mode.

◆ LoopStart

FBTime LoopStart

Read Write Property: Loop begin time.

◆ LoopStop

FBTime LoopStop

Read Write Property: Loop end time.

◆ NextMarker

FBTime NextMarker

Read Only Property: Next marked time.

◆ OnChange

FBEvent OnChange

Event Property: Fired when something in the player control has changed. (see FBEventPlayerControlChange)

◆ PlotSamplingPeriod

FBTime PlotSamplingPeriod

Read Write Property: Sampling period for the model plotting.

◆ PreviousMarker

FBTime PreviousMarker

Read Only Property: Previous marked time.

◆ RecordingSamplingPeriod

FBTime RecordingSamplingPeriod

Read Write Property: Sampling period for the model recording.

◆ SnapMode

Read Write Property: Set the transport control snap mode.

◆ TransportTimeFormat

FBTransportTimeFormat TransportTimeFormat

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

◆ ZoomWindowStart

FBTime ZoomWindowStart

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

◆ ZoomWindowStop

FBTime ZoomWindowStop

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