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 
116 };
117 FB_DEFINE_ENUM( FBSDK_DLL, TransportLoopMode );
118 
130 };
131 FB_DEFINE_ENUM( FBSDK_DLL, PlayerControlChangeType );
132 
134 // FBEventPlayerControlChange
137 
139 {
140  public:
145 
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 
213  K_DEPRECATED_2016 void SetPlaySpeed (FBTransportPlaySpeed pPlaySpeed );
214 
218  bool Stop();
219 
223  bool GotoStart();
224 
228  bool GotoEnd();
229 
234  bool Goto( FBTime pTime );
235 
239  bool StepForward();
240 
244  bool StepBackward();
245 
251  bool Record( bool pOverrideTake=false,bool pCopyData=true );
252 
257  void LockTransport( bool pLock );
258 
262  bool IsLocked();
263 
267  FBTransportMode GetTransportMode();
268 
273  void SetTransportFps ( FBTimeMode pTimeMode, double pCustom=0.0);
274 
278  FBTimeMode GetTransportFps ();
279 
284  double GetTransportFpsValue ( FBTimeMode pTimeMode = kFBTimeModeDefault );
285 
289  void Key();
290 
293  void GotoNextKey();
294 
297  void GotoPreviousKey();
298 
301  void EvaluationPause();
302 
305  void EvaluationResume();
306 
307  /* K_DEPRECATED_2019 */ FBPropertyBool LoopActive;
311 
314 
317 
321 
323 
325 
328 
330 
334  static FBPlayerControl& TheOne();
335 
341  bool Goto( FBTime, FBTimeReferential );
342 
347  bool GotoStart( FBTimeReferential );
348 
353  bool GotoEnd( FBTimeReferential );
354 
359  bool StepForward( FBTimeReferential );
360 
365  bool StepBackward( FBTimeReferential );
366 
370  FBTimeReferential GetTimeReferential();
371 
375  void SetTimeReferential(FBTimeReferential pTimeReferential);
376 
380  FBTime GetEditCurrentTime();
381 
385  FBTime GetEditStart();
386 
390  void SetEditStart(FBTime pTime);
391 
395  FBTime GetEditStop();
396 
400  void SetEditStop(FBTime pTime);
401 
405  FBTime GetEditZoomStart();
406 
410  void SetEditZoomStart(FBTime pTime);
411 
415  FBTime GetEditZoomStop();
416 
420  void SetEditZoomStop(FBTime pTime);
421 
428  int AddGlobalTimeMark( FBTime pTime, const char* pName = NULL );
429 
435  bool DeleteGlobalTimeMark( int pIndex );
436 
439  void DeleteAllGlobalTimeMarks();
440 
444  int GetGlobalTimeMarkCount();
445 
450  FBTime GetGlobalTimeMarkTime( int pIndex );
451 
458  int SetGlobalTimeMarkTime( int pIndex, FBTime pTime );
459 
464  const char* GetGlobalTimeMarkName( int pIndex );
465 
471  bool SetGlobalTimeMarkName( int pIndex, const char* pName );
472 
477  FBTimeMarkAction GetGlobalTimeMarkAction( int pIndex );
478 
484  bool SetGlobalTimeMarkAction( int pIndex, FBTimeMarkAction pAction );
485 
490  FBColor GetGlobalTimeMarkColor( int pIndex );
491 
497  bool SetGlobalTimeMarkColor( int pIndex, FBColor pColor );
498 
502  int GetNextGlobalTimeMarkIndex();
503 
507  int GetPreviousGlobalTimeMarkIndex();
508 };
509 
511 // FBReferenceTime
514 
523 public:
527  FBReferenceTime(HIObject pObject=NULL);
528 
533  int Add( const char *pName );
534 
538  void Remove( int pID );
539 
545  void SetTime( int pID, FBTime pReferenceTime, FBTime pSystem );
551  FBTime GetTime( int pID, FBTime pSystem );
552 
557  const char *operator[](int pID);
558 
562  void GetUniqueIDList( FBArrayTemplate<int>* pIDArray );
563 
568  const char * GetReferenceTimeName( int pID );
569 
570  /*K_DEPRECATED_2019*/ FBPropertyInt Count;
571  /*K_DEPRECATED_2019*/ FBPropertyInt ItemIndex;
572 
574 };
575 
576 #ifdef FBSDKUseNamespace
577 } // namespace FBSDKNamespace
578 #endif
579 
580 #endif
PropertyEvent: Base event class.
Definition: fbproperties.h:507
FBPropertyBool IsPlotting
Read Only Property: Is there a plotting in progress?
FBPropertyInt CurrentTimeReferenceID
Read Write Property: Current reference time ID
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
FBPropertyTime PreviousMarker
Read Only Property: Previous marked time.
FBPropertyTime RecordingSamplingPeriod
Read Write Property: Sampling period for the model recording.
Time data structure.
Definition: fbtime.h:86
Declaration for the FBCommand class.
Default Time Mode.
Definition: fbtime.h:64
FBPlayerControlChangeType
Types of player control change events.
FBPropertyInt Count
Read Only Property: Number of reference times.
#define NULL
Definition: kaydara.h:179
Template class to contain an array of items.
Definition: fbarray.h:77
class FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
Color vector.
Definition: fbtypes.h:447
Combines both Snap and Play on frames modes.
Base Event class.
Definition: fbcomponent.h:955
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:148
Playback not looping.
class FBPropertyBaseEnum< enum FBTransportSnapMode > FBPropertyTransportSnapMode
FBTimeReferential
FBCommandState.
Definition: fbcommand.h:116
FBPropertyBool LoopActive
Read Write Property: Is looping active? Deprecated, use the LoopMode property instead.
FBPropertyTime LoopStop
Read Write Property: Loop end time.
FBTimeMode
Different time modes available.
Definition: fbtime.h:63
Timecode time display mode.
FBPropertyTime ZoomWindowStop
Read Write Property: Stopping time of the transport control zoom window.
FBPropertyTime LoopStart
Read Write Property: Loop begin time.
#define K_DEPRECATED_2016
Definition: kaydara.h:417
Definition: Python-ast.h:18
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
FBPropertyTime NextMarker
Read Only Property: Next marked time.
FBPropertyTime PlotSamplingPeriod
Read Write Property: Sampling period for the model plotting.
FBPropertyTransportSnapMode SnapMode
Read Write Property: Set the transport control snap mode.
FBTransportSnapMode
Available snap methods for the transport control.
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
Frame time display mode.
Playback looping the current take.
FBTransportTimeFormat
Available transport control time display.
Basic class definitions.
KEventBase * HKEventBase
Definition: fbcomponent.h:75
FBPropertyInt ItemIndex
Read Write Property: Current reference time index.
class FBPropertyBaseEnum< enum FBTransportTimeFormat > FBPropertyTransportTimeFormat
MotionBuilder SDK base class.
Definition: fbcomponent.h:664
Snaps to an exact frame when modifying the current time.
Playback from the current take through all takes in order then stops.
FBPropertyBool IsPlaying
Read Only Property: Is the transport control playing?
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
class FBPropertyBase< FBTime, kFBPT_Time > FBPropertyTime
Property: FBTime
When playing, plays to exact frames.
FBPropertyPlayerControlChangeType Type
Read Only Property: Type of event.
FBTransportPlaySpeed
Available transport control play speed.
class FBPropertyBaseEnum< enum FBTransportLoopMode > FBPropertyTransportLoopMode
FBTransportLoopMode
Available loop modes for the transport control.
FBTimeMarkAction
Time (Global & Take) Mark assigned action.
Definition: fbdata.h:1628
FBPropertyEvent OnChange
Event Property: Fired when something in the player control has changed.
FBTransportMode
Transport modes.
FBPropertyBool IsRecording
Read Only Property: Is there a recording in progress?
FBPropertyTransportLoopMode LoopMode
Read Write Property: Loop mode.
Reference time class.
class FBPropertyBaseEnum< enum FBPlayerControlChangeType > FBPropertyPlayerControlChangeType
FBPropertyTransportTimeFormat TransportTimeFormat
Read Write Property: Current Time Mode of the transport controls.
FBPropertyTime ZoomWindowStart
Read Write Property: Starting time of the transport control zoom window.
class FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool