Open Reality Reference Guide
fbplayercontrol.h
Go to the documentation of this file.
1#ifndef __FBPLAYERCONTROL_H__
2#define __FBPLAYERCONTROL_H__
3/**************************************************************************
4Copyright (c) 1994 - 2013 Autodesk, Inc. and/or its licensors.
5All Rights Reserved.
6
7The coded instructions, statements, computer programs, and/or related
8material (collectively the "Data") in these files contain unpublished
9information proprietary to Autodesk, Inc. and/or its licensors, which is
10protected by Canada and United States of America federal copyright law
11and by international treaties.
12
13The Data may not be disclosed or distributed to third parties, in whole
14or in part, without the prior written consent of Autodesk, Inc.
15("Autodesk").
16
17THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
18ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
19WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR
20ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES
21OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
22PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT
23WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR
24FREE.
25
26IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
27OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR
28EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE
29DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS
30OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR
31DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF
32LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT
33LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE
34DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS
35BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
36
37**************************************************************************/
38
43#include <kaydaradef.h>
44#ifndef FBSDK_DLL
48#define FBSDK_DLL K_DLLIMPORT
49#endif
50
51// Essential includes
52#include <fbsdk/fbcomponent.h>
53#include <fbsdk/fbcommand.h>
54
55#ifdef FBSDKUseNamespace
56namespace FBSDKNamespace {;
57#endif
58
61 kFBTransportPlay, kFBTransportPlayPrepare, kFBTransportPlayReady,
62 kFBTransportStop, kFBTransportStopPost, kFBTransportStopReady,
63 kFBTransportShuttle, kFBTransportShuttlePrepare, kFBTransportShuttleReady,
64 kFBTransportPlayReverse, kFBTransportPlayReversePrepare, kFBTransportPlayReverseReady,
65 kFBTransportJog, kFBTransportJogPrepare, kFBTransportJogReady,
66 kFBTransportGoto, kFBTransportGotoPrepare, kFBTransportGotoReady,
67 kFBTransportStepForward, kFBTransportStepForwardPrepare, kFBTransportStepForwardReady,
68 kFBTransportStepBackward, kFBTransportStepBackwardPrepare,kFBTransportStepBackwardReady
69};
70FB_DEFINE_ENUM( FBSDK_DLL, TransportMode );
71
74{
77};
78
79FB_DEFINE_ENUM(FBSDK_DLL, TransportTimeFormat);
80
81
84{
98};
99FB_DEFINE_ENUM( FBSDK_DLL, TransportPlaySpeed);
100
103{
108};
109FB_DEFINE_ENUM( FBSDK_DLL, TransportSnapMode );
110
116};
117FB_DEFINE_ENUM( FBSDK_DLL, TransportLoopMode );
118
130};
131FB_DEFINE_ENUM( FBSDK_DLL, PlayerControlChangeType );
132
134// FBEventPlayerControlChange
137
139{
140 public:
144 FBEventPlayerControlChange( HKEventBase pEvent );
145
146 FBPropertyPlayerControlChangeType Type;
147};
148
149
151// FBPlayerControl
154
171public:
172
176 FBPlayerControl(HIObject pObject=NULL);
177
182 bool Play(bool pUseMarkers = false);
183
188 bool PlayReverse(bool pUseMarkers = false);
189
194
198 void SetPlaySpeed(double pSpeed);
199
204
208 double GetPlaySpeed();
209
213 bool Stop();
214
218 bool GotoStart();
219
223 bool GotoEnd();
224
229 bool Goto( FBTime pTime );
230
235
240
246 bool Record( bool pOverrideTake=false,bool pCopyData=true );
247
252 void LockTransport( bool pLock );
253
257 bool IsLocked();
258
263
268 void SetTransportFps ( FBTimeMode pTimeMode, double pCustom=0.0);
269
274
280
284 void Key();
285
289
293
297
301
302 FBPropertyTransportLoopMode LoopMode;
305
308
311
315
316 FBPropertyTransportSnapMode SnapMode;
317
318 FBPropertyTransportTimeFormat TransportTimeFormat;
319
322
324
329
336
342
348
354
360
365
369 void SetTimeReferential(FBTimeReferential pTimeReferential);
370
375
380
384 void SetEditStart(FBTime pTime);
385
390
394 void SetEditStop(FBTime pTime);
395
400
405
410
415
422 int AddGlobalTimeMark( FBTime pTime, const char* pName = NULL );
423
429 bool DeleteGlobalTimeMark( int pIndex );
430
434
439
445
452 int SetGlobalTimeMarkTime( int pIndex, FBTime pTime );
453
458 const char* GetGlobalTimeMarkName( int pIndex );
459
465 bool SetGlobalTimeMarkName( int pIndex, const char* pName );
466
472
478 bool SetGlobalTimeMarkAction( int pIndex, FBTimeMarkAction pAction );
479
485
491 bool SetGlobalTimeMarkColor( int pIndex, FBColor pColor );
492
497
502};
503
505// FBReferenceTime
508
517public:
521 FBReferenceTime(HIObject pObject=NULL);
522
527 int Add( const char *pName );
528
532 void Remove( int pID );
533
539 void SetTime( int pID, FBTime pReferenceTime, FBTime pSystem );
545 FBTime GetTime( int pID, FBTime pSystem );
546
551 const char *operator[](int pID);
552
557
562 const char * GetReferenceTimeName( int pID );
563
566};
567
568#ifdef FBSDKUseNamespace
569} // namespace FBSDKNamespace
570#endif
571
572#endif
Template class to contain an array of items.
Definition: fbarray.h:78
Color vector.
Definition: fbtypes.h:448
MotionBuilder SDK base class.
Definition: fbcomponent.h:651
Base Event class.
Definition: fbcomponent.h:940
FBPropertyPlayerControlChangeType Type
Read Only Property: Type of event.
FBEventPlayerControlChange(HKEventBase pEvent)
Constructor.
Player control.
int GetNextGlobalTimeMarkIndex()
Returns the next global time mark index, based on the current local time.
FBPropertyTime NextMarker
Read Only Property: Next marked time.
bool StepForward()
Step one frame ahead.
bool Goto(FBTime pTime)
Goto a time specified by pTime.
int GetGlobalTimeMarkCount()
Returns the number of global time marks.
FBPropertyTime PlotSamplingPeriod
Read Write Property: Sampling period for the model plotting.
bool StepBackward(FBTimeReferential)
Step one frame backward.
bool StepBackward()
Step one frame backward.
int GetPreviousGlobalTimeMarkIndex()
Returns the previous global time mark index, based on the current local time.
FBTransportMode GetTransportMode()
Get Transport Mode.
bool Goto(FBTime, FBTimeReferential)
Goto a time specified by pTime.
void SetEditZoomStop(FBTime pTime)
Set Edit Zoom Stop.
void EvaluationResume()
Resume device evaluation thread.
static FBPlayerControl & TheOne()
Get the global object for this class.
FBPropertyBool IsRecording
Read Only Property: Is there a recording in progress?
int SetGlobalTimeMarkTime(int pIndex, FBTime pTime)
Sets a new time for an existing global time mark.
FBPropertyTransportTimeFormat TransportTimeFormat
Read Write Property: Current Time Mode of the transport controls.
void GotoPreviousKey()
Go to the previous key.
void SetPlaySpeedMode(FBTransportPlaySpeed pPlaySpeedMode)
Set Play Speed Mode.
FBColor GetGlobalTimeMarkColor(int pIndex)
Returns the color associated with a global time mark.
FBTimeReferential GetTimeReferential()
Get Time Referential.
FBPropertyTransportLoopMode LoopMode
Read Write Property: Loop mode.
bool Play(bool pUseMarkers=false)
Play button.
void LockTransport(bool pLock)
Lock the transport control.
FBPropertyTime RecordingSamplingPeriod
Read Write Property: Sampling period for the model recording.
bool GotoStart(FBTimeReferential)
GotoStart button (Rewind).
FBTime GetEditStart()
Get Edit Start.
void SetPlaySpeed(double pSpeed)
Set Play Speed.
void Key()
Key default data.
FBTime GetEditStop()
Get Edit Stop.
bool SetGlobalTimeMarkColor(int pIndex, FBColor pColor)
Sets a new color for an existing global time mark.
FBPropertyBool IsPlotting
Read Only Property: Is there a plotting in progress?
bool Stop()
Stop button.
bool GotoStart()
GotoStart button (Rewind).
bool GotoEnd(FBTimeReferential)
GotoEnd button (FastForward).
void SetEditZoomStart(FBTime pTime)
Set Edit Zoom Start.
FBTime GetEditZoomStart()
Get Edit Zoom Start.
FBPropertyBool IsPlaying
Read Only Property: Is the transport control playing?
FBPropertyTime ZoomWindowStart
Read Write Property: Starting time of the transport control zoom window.
void EvaluationPause()
Pause device evaluation thread.
void DeleteAllGlobalTimeMarks()
Delete all global time marks.
FBTime GetGlobalTimeMarkTime(int pIndex)
Returns the time associated with a global time mark.
FBPropertyTime ZoomWindowStop
Read Write Property: Stopping time of the transport control zoom window.
bool SetGlobalTimeMarkName(int pIndex, const char *pName)
Sets a new name for an existing global time mark.
bool IsLocked()
Return the current locking state of the transport.
FBPropertyTime LoopStop
Read Write Property: Loop end time.
FBPropertyTransportSnapMode SnapMode
Read Write Property: Set the transport control snap mode.
bool StepForward(FBTimeReferential)
Step one frame ahead.
void SetTransportFps(FBTimeMode pTimeMode, double pCustom=0.0)
Set the system frame rate use for display.
FBPlayerControl(HIObject pObject=NULL)
Constructor.
FBTimeMode GetTransportFps()
Get the UI frame rate use for display configure in the system.
bool Record(bool pOverrideTake=false, bool pCopyData=true)
Begin recording.
FBTransportPlaySpeed GetPlaySpeedMode()
Get Play Speed Mode.
FBTime GetEditZoomStop()
Get Edit Zoom Stop.
double GetPlaySpeed()
Get Play Speed .
void SetEditStart(FBTime pTime)
Set Edit Start.
const char * GetGlobalTimeMarkName(int pIndex)
Returns the name associated with a global time mark.
bool SetGlobalTimeMarkAction(int pIndex, FBTimeMarkAction pAction)
Sets a new action for an existing global time mark.
void SetTimeReferential(FBTimeReferential pTimeReferential)
Set Time Referential.
bool DeleteGlobalTimeMark(int pIndex)
Delete a global time mark.
FBTimeMarkAction GetGlobalTimeMarkAction(int pIndex)
Returns the action associated with a global time mark.
bool PlayReverse(bool pUseMarkers=false)
Play Reverse button.
void GotoNextKey()
Go to the next key.
FBTime GetEditCurrentTime()
Get Edit Current Time.
bool GotoEnd()
GotoEnd button (FastForward).
FBPropertyTime PreviousMarker
Read Only Property: Previous marked time.
FBPropertyEvent OnChange
Event Property: Fired when something in the player control has changed. (see FBEventPlayerControlChan...
void SetEditStop(FBTime pTime)
Set Edit Stop.
int AddGlobalTimeMark(FBTime pTime, const char *pName=NULL)
Add a global time mark.
FBPropertyTime LoopStart
Read Write Property: Loop begin time.
double GetTransportFpsValue(FBTimeMode pTimeMode=kFBTimeModeDefault)
Get the UI frame rate value.
PropertyEvent: Base event class.
Definition: fbproperties.h:515
Reference time class.
void Remove(int pID)
Remove a reference time from the list.
int Add(const char *pName)
Add a reference time to list.
FBReferenceTime(HIObject pObject=NULL)
Constructor.
FBTime GetTime(int pID, FBTime pSystem)
Get a reference time.
void SetTime(int pID, FBTime pReferenceTime, FBTime pSystem)
Set a reference time.
const char * operator[](int pID)
Overloaded [] operator.
const char * GetReferenceTimeName(int pID)
Get the name of a time reference.
FBPropertyBool UseRelativeLocalTime
Read Write Property: True to show the relative local time, false otherwise. This will only be effecti...
void GetUniqueIDList(FBArrayTemplate< int > *pIDArray)
Get list of currently available IDs.
FBPropertyInt CurrentTimeReferenceID
Read Write Property: Current reference time ID
Time data structure.
Definition: fbtime.h:88
Declaration for the FBCommand class.
FBTimeReferential
FBCommandState.
Definition: fbcommand.h:116
Basic class definitions.
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:131
FBTimeMarkAction
Time (Global & Take) Mark assigned action.
Definition: fbdata.h:1664
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
FBTransportPlaySpeed
Available transport control play speed.
@ kFBSpeed_3x
3x
@ kFBSpeed_1_4x
0.25x
@ kFBSpeed_5x
5x
@ kFBSpeed_1_5x
0.20x
@ kFBSpeed_2x
2x
@ kFBSpeed_1_3x
0.33x
@ kFBSpeed_10x
10x
@ kFBSpeed_4x
4x
@ kFBSpeed_ALL_FR
All frames.
@ kFBSpeed_Custom
Custom speed.
@ kFBSpeed_1_10x
0.10x
@ kFBSpeed_1x
1x
@ kFBSpeed_1_2x
0.50x
FBTransportTimeFormat
Available transport control time display.
@ kFBTimeFormatTimecode
Timecode time display mode.
@ kFBTimeFormatFrame
Frame time display mode.
FBTransportSnapMode
Available snap methods for the transport control.
@ kFBTransportSnapModeNoSnap
No snapping is applied.
@ kFBTransportSnapModePlayOnFrames
When playing, plays to exact frames.
@ kFBTransportSnapModeSnapOnFrames
Snaps to an exact frame when modifying the current time.
@ kFBTransportSnapModeSnapAndPlayOnFrames
Combines both Snap and Play on frames modes.
FBPlayerControlChangeType
Types of player control change events.
@ kFBPlayerControlNone
None.
@ kFBPlayerControlPlayReverse
Play reverse.
@ kFBPlayerControlRecordModeOff
Record mode off.
@ kFBPlayerControlStop
Stop.
@ kFBPlayerControlStepForward
Step forward.
@ kFBPlayerControlGoto
Goto.
@ kFBPlayerControlRecordModeOn
Record mode on.
@ kFBPlayerControlStepBackward
Step backward.
@ kFBPlayerControlPlay
Play.
FBTransportMode
Transport modes.
@ kFBTransportPlayReversePrepare
!< Play reverse.
@ kFBTransportStepBackwardPrepare
!< Step backward.
@ kFBTransportStopPost
!< Stop mode
@ kFBTransportJogPrepare
!< Jog.
@ kFBTransportStepForwardPrepare
!< Step forward
@ kFBTransportPlayPrepare
!< Play mode
@ kFBTransportShuttlePrepare
!< Shuttle mode
@ kFBTransportGotoPrepare
!< Goto.
FBTransportLoopMode
Available loop modes for the transport control.
@ kFBTransportLoopCurrentTake
Playback looping the current take.
@ kFBTransportNoLoop
Playback not looping.
@ kFBTransportLoopThroughAllTakes
Playback from the current take through all takes in order then stops.
class K_DLLIMPORT FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
class K_DLLIMPORT FBPropertyBase< FBTime, kFBPT_Time > FBPropertyTime
Property: FBTime
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:150
FBTimeMode
Different time modes available.
Definition: fbtime.h:63
@ kFBTimeModeDefault
Default Time Mode.
Definition: fbtime.h:64
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68