Open Reality Reference Guide
fbplayercontrol.h
Go to the documentation of this file.
1 #ifndef __FBPLAYERCONTROL_H__
2 #define __FBPLAYERCONTROL_H__
3 /**************************************************************************
4 Copyright (c) 1994 - 2013 Autodesk, Inc. and/or its licensors.
5 All Rights Reserved.
6 
7 The coded instructions, statements, computer programs, and/or related
8 material (collectively the "Data") in these files contain unpublished
9 information proprietary to Autodesk, Inc. and/or its licensors, which is
10 protected by Canada and United States of America federal copyright law
11 and by international treaties.
12 
13 The Data may not be disclosed or distributed to third parties, in whole
14 or in part, without the prior written consent of Autodesk, Inc.
15 ("Autodesk").
16 
17 THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
18 ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
19 WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR
20 ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES
21 OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
22 PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT
23 WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR
24 FREE.
25 
26 IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
27 OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR
28 EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE
29 DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS
30 OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR
31 DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF
32 LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT
33 LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE
34 DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS
35 BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
36 
37 **************************************************************************/
38 
43 #include <kaydaradef.h>
44 #ifndef FBSDK_DLL
45 
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
56 namespace 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 };
70 FB_DEFINE_ENUM( FBSDK_DLL, TransportMode );
71 
74 {
77 };
78 
79 FB_DEFINE_ENUM(FBSDK_DLL, TransportTimeFormat);
80 
81 
84 {
98 };
99 FB_DEFINE_ENUM( FBSDK_DLL, TransportPlaySpeed);
100 
103 {
108 };
109 FB_DEFINE_ENUM( FBSDK_DLL, TransportSnapMode );
110 
116 };
117 FB_DEFINE_ENUM( FBSDK_DLL, TransportLoopMode );
118 
130 };
131 FB_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 
171 public:
172 
176  FBPlayerControl(HIObject pObject=NULL);
177 
182  bool Play(bool pUseMarkers = false);
183 
188  bool PlayReverse(bool pUseMarkers = false);
189 
193  void SetPlaySpeedMode (FBTransportPlaySpeed pPlaySpeedMode);
194 
198  void SetPlaySpeed(double pSpeed);
199 
203  FBTransportPlaySpeed GetPlaySpeedMode();
204 
208  double GetPlaySpeed();
209 
214  K_DEPRECATED_2016 void SetPlaySpeed (FBTransportPlaySpeed pPlaySpeed );
215 
219  bool Stop();
220 
224  bool GotoStart();
225 
229  bool GotoEnd();
230 
235  bool Goto( FBTime pTime );
236 
240  bool StepForward();
241 
245  bool StepBackward();
246 
252  bool Record( bool pOverrideTake=false,bool pCopyData=true );
253 
258  void LockTransport( bool pLock );
259 
263  bool IsLocked();
264 
268  FBTransportMode GetTransportMode();
269 
274  void SetTransportFps ( FBTimeMode pTimeMode, double pCustom=0.0);
275 
279  FBTimeMode GetTransportFps ();
280 
285  double GetTransportFpsValue ( FBTimeMode pTimeMode = kFBTimeModeDefault );
286 
290  void Key();
291 
294  void GotoNextKey();
295 
298  void GotoPreviousKey();
299 
302  void EvaluationPause();
303 
306  void EvaluationResume();
307 
308  /* K_DEPRECATED_2019 */ FBPropertyBool LoopActive;
309  FBPropertyTransportLoopMode LoopMode;
312 
315 
318 
322 
323  FBPropertyTransportSnapMode SnapMode;
324 
325  FBPropertyTransportTimeFormat TransportTimeFormat;
326 
329 
331 
335  static FBPlayerControl& TheOne();
336 
342  bool Goto( FBTime, FBTimeReferential );
343 
348  bool GotoStart( FBTimeReferential );
349 
354  bool GotoEnd( FBTimeReferential );
355 
360  bool StepForward( FBTimeReferential );
361 
366  bool StepBackward( FBTimeReferential );
367 
371  FBTimeReferential GetTimeReferential();
372 
376  void SetTimeReferential(FBTimeReferential pTimeReferential);
377 
381  FBTime GetEditCurrentTime();
382 
386  FBTime GetEditStart();
387 
391  void SetEditStart(FBTime pTime);
392 
396  FBTime GetEditStop();
397 
401  void SetEditStop(FBTime pTime);
402 
406  FBTime GetEditZoomStart();
407 
411  void SetEditZoomStart(FBTime pTime);
412 
416  FBTime GetEditZoomStop();
417 
421  void SetEditZoomStop(FBTime pTime);
422 
429  int AddGlobalTimeMark( FBTime pTime, const char* pName = NULL );
430 
436  bool DeleteGlobalTimeMark( int pIndex );
437 
440  void DeleteAllGlobalTimeMarks();
441 
445  int GetGlobalTimeMarkCount();
446 
451  FBTime GetGlobalTimeMarkTime( int pIndex );
452 
459  int SetGlobalTimeMarkTime( int pIndex, FBTime pTime );
460 
465  const char* GetGlobalTimeMarkName( int pIndex );
466 
472  bool SetGlobalTimeMarkName( int pIndex, const char* pName );
473 
478  FBTimeMarkAction GetGlobalTimeMarkAction( int pIndex );
479 
485  bool SetGlobalTimeMarkAction( int pIndex, FBTimeMarkAction pAction );
486 
491  FBColor GetGlobalTimeMarkColor( int pIndex );
492 
498  bool SetGlobalTimeMarkColor( int pIndex, FBColor pColor );
499 
503  int GetNextGlobalTimeMarkIndex();
504 
508  int GetPreviousGlobalTimeMarkIndex();
509 };
510 
512 // FBReferenceTime
515 
524 public:
528  FBReferenceTime(HIObject pObject=NULL);
529 
534  int Add( const char *pName );
535 
539  void Remove( int pID );
540 
546  void SetTime( int pID, FBTime pReferenceTime, FBTime pSystem );
552  FBTime GetTime( int pID, FBTime pSystem );
553 
558  const char *operator[](int pID);
559 
563  void GetUniqueIDList( FBArrayTemplate<int>* pIDArray );
564 
569  const char * GetReferenceTimeName( int pID );
570 
571  /*K_DEPRECATED_2019*/ FBPropertyInt Count;
572  /*K_DEPRECATED_2019*/ FBPropertyInt ItemIndex;
573 
575 };
576 
577 #ifdef FBSDKUseNamespace
578 } // namespace FBSDKNamespace
579 #endif
580 
581 #endif
No snapping is applied.
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
FBTransportMode
Transport modes.
Declaration for the FBCommand class.
Template class to contain an array of items.
Definition: fbarray.h:77
FBPlayerControlChangeType
Types of player control change events.
FBTimeMarkAction
Time (Global & Take) Mark assigned action.
Definition: fbdata.h:1628
FBTransportTimeFormat
Available transport control time display.
Time data structure.
Definition: fbtime.h:87
FBPropertyBool LoopActive
Read Write Property: Is looping active?
FBPropertyBool IsPlotting
Read Only Property: Is there a plotting in progress?
FBTransportSnapMode
Available snap methods for the transport control.
Reference time class.
When playing, plays to exact frames.
All frames.
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:148
FBPropertyInt Count
Read Only Property: Number of reference times.
FBTimeReferential
FBCommandState.
Definition: fbcommand.h:116
FBPropertyEvent OnChange
Event Property: Fired when something in the player control has changed. (see FBEventPlayerControlChan...
Playback not looping.
Player control.
FBPropertyInt CurrentTimeReferenceID
Read Write Property: Current reference time ID
FBPropertyBool IsPlaying
Read Only Property: Is the transport control playing?
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
FBTransportLoopMode
Available loop modes for the transport control.
PropertyEvent: Base event class.
Definition: fbproperties.h:507
Default Time Mode.
Definition: fbtime.h:64
Playback from the current take through all takes in order then stops.
FBTransportPlaySpeed
Available transport control play speed.
Frame time display mode.
Color vector.
Definition: fbtypes.h:447
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
FBPropertyTransportTimeFormat TransportTimeFormat
Read Write Property: Current Time Mode of the transport controls.
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
FBPropertyTransportSnapMode SnapMode
Read Write Property: Set the transport control snap mode.
FBPropertyTime PreviousMarker
Read Only Property: Previous marked time.
Basic class definitions.
FBPropertyTransportLoopMode LoopMode
Read Write Property: Loop mode.
FBPropertyTime PlotSamplingPeriod
Read Write Property: Sampling period for the model plotting.
FBPropertyTime RecordingSamplingPeriod
Read Write Property: Sampling period for the model recording.
FBPropertyTime LoopStart
Read Write Property: Loop begin time.
FBPropertyPlayerControlChangeType Type
Read Only Property: Type of event.
Base Event class.
Definition: fbcomponent.h:953
Playback looping the current take.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Combines both Snap and Play on frames modes.
FBTimeMode
Different time modes available.
Definition: fbtime.h:63
FBPropertyInt ItemIndex
Read Write Property: Current reference time index.
class K_DLLIMPORT FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
Custom speed.
class K_DLLIMPORT FBPropertyBase< FBTime, kFBPT_Time > FBPropertyTime
Property: FBTime
FBPropertyTime ZoomWindowStart
Read Write Property: Starting time of the transport control zoom window.
FBPropertyBool IsRecording
Read Only Property: Is there a recording in progress?
FBPropertyTime NextMarker
Read Only Property: Next marked time.
FBPropertyTime LoopStop
Read Write Property: Loop end time.
MotionBuilder SDK base class.
Definition: fbcomponent.h:664
Timecode time display mode.
Snaps to an exact frame when modifying the current time.
FBPropertyTime ZoomWindowStop
Read Write Property: Stopping time of the transport control zoom window.