fbsdk/fbplayercontrol.h Source File

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 
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 
122 };
123 FB_DEFINE_ENUM( FBSDK_DLL, PlayerControlChangeType );
124 
126 // FBEventPlayerControlChange
129 
131 {
132  public:
137 
139 };
140 
141 
143 // FBPlayerControl
146 
163 public:
164 
168  FBPlayerControl(HIObject pObject=NULL);
169 
174  bool Play(bool pUseMarkers = false);
175 
180  bool PlayReverse(bool pUseMarkers = false);
181 
185  void SetPlaySpeedMode (FBTransportPlaySpeed pPlaySpeedMode);
186 
190  void SetPlaySpeed(double pSpeed);
191 
195  FBTransportPlaySpeed GetPlaySpeedMode();
196 
200  double GetPlaySpeed();
201 
205  K_DEPRECATED_2016 void SetPlaySpeed (FBTransportPlaySpeed pPlaySpeed );
206 
210  bool Stop();
211 
215  bool GotoStart();
216 
220  bool GotoEnd();
221 
226  bool Goto( FBTime pTime );
227 
231  bool StepForward();
232 
236  bool StepBackward();
237 
243  bool Record( bool pOverrideTake=false,bool pCopyData=true );
244 
249  void LockTransport( bool pLock );
250 
254  bool IsLocked();
255 
259  FBTransportMode GetTransportMode();
260 
265  void SetTransportFps ( FBTimeMode pTimeMode, double pCustom=0.0);
266 
270  FBTimeMode GetTransportFps ();
271 
276  double GetTransportFpsValue ( FBTimeMode pTimeMode = kFBTimeModeDefault );
277 
281  void Key();
282 
285  void GotoNextKey();
286 
289  void GotoPreviousKey();
290 
293  void EvaluationPause();
294 
297  void EvaluationResume();
298 
302 
305 
308 
312 
314 
316 
319 
321 
325  static FBPlayerControl& TheOne();
326 
332  bool Goto( FBTime, FBTimeReferential );
333 
338  bool GotoStart( FBTimeReferential );
339 
344  bool GotoEnd( FBTimeReferential );
345 
350  bool StepForward( FBTimeReferential );
351 
356  bool StepBackward( FBTimeReferential );
357 
361  FBTimeReferential GetTimeReferential();
362 
366  void SetTimeReferential(FBTimeReferential pTimeReferential);
367 
371  FBTime GetEditCurrentTime();
372 
376  FBTime GetEditStart();
377 
381  void SetEditStart(FBTime pTime);
382 
386  FBTime GetEditStop();
387 
391  void SetEditStop(FBTime pTime);
392 
396  FBTime GetEditZoomStart();
397 
401  void SetEditZoomStart(FBTime pTime);
402 
406  FBTime GetEditZoomStop();
407 
411  void SetEditZoomStop(FBTime pTime);
412 
419  int AddGlobalTimeMark( FBTime pTime, const char* pName = NULL );
420 
426  bool DeleteGlobalTimeMark( int pIndex );
427 
430  void DeleteAllGlobalTimeMarks();
431 
435  int GetGlobalTimeMarkCount();
436 
441  FBTime GetGlobalTimeMarkTime( int pIndex );
442 
449  int SetGlobalTimeMarkTime( int pIndex, FBTime pTime );
450 
455  const char* GetGlobalTimeMarkName( int pIndex );
456 
462  bool SetGlobalTimeMarkName( int pIndex, const char* pName );
463 
468  FBTimeMarkAction GetGlobalTimeMarkAction( int pIndex );
469 
475  bool SetGlobalTimeMarkAction( int pIndex, FBTimeMarkAction pAction );
476 
481  FBColor GetGlobalTimeMarkColor( int pIndex );
482 
488  bool SetGlobalTimeMarkColor( int pIndex, FBColor pColor );
489 
493  int GetNextGlobalTimeMarkIndex();
494 
498  int GetPreviousGlobalTimeMarkIndex();
499 };
500 
502 // FBReferenceTime
505 
509 public:
513  FBReferenceTime(HIObject pObject=NULL);
514 
519  int Add( const char *pName );
520 
524  void Remove( int pIndex );
525 
531  void SetTime( int pIndex, FBTime pReferenceTime, FBTime pSystem );
537  FBTime GetTime( int pIndex, FBTime pSystem );
538 
543  const char *operator[](int pIndex);
544 
547 };
548 
549 #ifdef FBSDKUseNamespace
550 } // namespace FBSDKNamespace
551 #endif
552 
553 #endif
FBPropertyInt ItemIndex
Read Write Property: Current reference time index.
FBPropertyTime ZoomWindowStop
Read Write Property: Stopping time of the transport control zoom window.
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
FBTransportTimeFormat
Available transport control time display.
FBTimeMode
Different time modes available.
Definition: fbtime.h:63
Frame time display mode.
Reference time class.
Declaration for the FBCommand class.
FBPropertyTime PreviousMarker
Read Only Property: Previous marked time.
FBTransportSnapMode
Available snap methods for the transport control.
Snaps to an exact frame when modifying the current time.
class FBPropertyBase< FBTime, kFBPT_Time > FBPropertyTime
Property: FBTime
FBPropertyEvent OnChange
Event Property: Fired when something in the player control has changed.
FBPropertyTime LoopStart
Read Write Property: Loop begin time.
#define NULL
Definition: kaydara.h:169
FBPropertyPlayerControlChangeType Type
Read Only Property: Type of event.
When playing, plays to exact frames.
FBPropertyTransportSnapMode SnapMode
Read Write Property: Set the transport control snap mode.
class FBPropertyBaseEnum< enum FBTransportTimeFormat > FBPropertyTransportTimeFormat
FBPropertyTime PlotSamplingPeriod
Read Write Property: Sampling period for the model plotting.
Color vector.
Definition: fbtypes.h:447
FBPropertyInt Count
Read Only Property: Number of reference times.
FBTransportMode
Transport modes.
Base Event class.
Definition: fbcomponent.h:959
FBPropertyTime ZoomWindowStart
Read Write Property: Starting time of the transport control zoom window.
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:148
MotionBuilder SDK base class.
Definition: fbcomponent.h:668
FBPropertyBool IsPlaying
Read Only Property: Is the transport control playing?
class FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
FBPropertyTransportTimeFormat TransportTimeFormat
Read Write Property: Current Time Mode of the transport controls.
FBTransportPlaySpeed
Available transport control play speed.
FBTimeMarkAction
Time (Global & Take) Mark assigned action.
Definition: fbdata.h:883
#define K_DEPRECATED_2016
Definition: kaydara.h:414
Definition: Python-ast.h:18
class FBPropertyBaseEnum< enum FBPlayerControlChangeType > FBPropertyPlayerControlChangeType
FBPropertyTime RecordingSamplingPeriod
Read Write Property: Sampling period for the model recording.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
Basic class definitions.
Time data structure.
Definition: fbtime.h:86
PropertyEvent: Base event class.
Definition: fbproperties.h:507
KEventBase * HKEventBase
Definition: fbcomponent.h:75
Default Time Mode.
Definition: fbtime.h:64
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Combines both Snap and Play on frames modes.
FBPropertyBool IsRecording
Read Only Property: Is there a recording in progress?
FBPlayerControlChangeType
Types of player control change events.
class FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
FBPropertyTime NextMarker
Read Only Property: Next marked time.
FBPropertyBool LoopActive
Read Write Property: Is looping active?
Timecode time display mode.
FBPropertyTime LoopStop
Read Write Property: Loop end time.
FBPropertyBool IsPlotting
Read Only Property: Is there a plotting in progress?
class FBPropertyBaseEnum< enum FBTransportSnapMode > FBPropertyTransportSnapMode
FBTimeReferential
FBCommandState.
Definition: fbcommand.h:115