fbsdk/fbapplication.h Source File

fbapplication.h
Go to the documentation of this file.
1 #ifndef __FBPAPPLICATION_H__
2 #define __FBPAPPLICATION_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 
54 #ifdef FBSDKUseNamespace
55 namespace FBSDKNamespace {;
56 #endif
57 
59 // FBBatchOptions
61 FB_FORWARD( FBBatchOptions );
62 
65 {
69 };
70 FB_DEFINE_ENUM( FBSDK_DLL, BatchProcessType );
71 
74 {
81 };
82 FB_DEFINE_ENUM( FBSDK_DLL, BatchFileFormat );
83 
86 {
89 };
90 FB_DEFINE_ENUM( FBSDK_DLL, BatchOnTakeExist );
91 
94 {
97 };
98 FB_DEFINE_ENUM( FBSDK_DLL, BatchOnContainsBatchTakes );
99 
102 {
118 };
119 
122 {
123 public:
124 
127  FBBatchOptions();
128 
131 
133 
137 
138 #if !defined(K_NO_CHARACTER)
140 #endif
141 
146  bool mWriteRate;
153 
156 };
157 
158 
160 // FBPlotOptions
163 
166 {
170 };
171 FB_DEFINE_ENUM( FBSDK_DLL, RotationFilter );
172 
175 {
181 };
182 FB_DEFINE_ENUM( FBSDK_DLL, RotationFilter );
183 
186 {
187 public:
188 
191  FBPlotOptions();
192 
203 };
204 
205 #if !defined(K_NO_AUDIO)
206 // FBAudioRenderOptions
210 
215 {
216 public:
217 
221 
227 };
228 #endif
229 
231 #if !defined(K_NO_CHARACTER)
233 #endif
234 #if !defined(K_NO_ACTOR)
236 #endif
237 #if !defined(K_NO_CHARACTER)
239 #endif
240 #if !defined(K_NO_ACTOR)
242 #endif
243 
251 };
252 
253 #if !defined(K_NO_ONECLICK)
256 {
261 };
262 #endif
263 
264 FB_FORWARD(FBMotionFileOptions);
265 
274 {
276 public:
280  FBApplication(HIObject pObject=NULL);
281 
290 
295  bool Minimize(bool pBlocking=true);
296 
300  bool Maximize();
301 
303  void UpdateAllWidgets();
304 
309  void FlushEventQueue();
310 
316  bool FileNew(bool pAskUser = false, bool pClearSceneName = true);
317 
326  bool FileOpen( const char* pFilename, bool pShowUIMsg = false, FBFbxOptions* pOptions = NULL );
327 
334  bool FileOpen( void* pBuffer, kULong pBufferLength );
335 
344  bool GetMaxFrameCount(void* pBuffer, kULong pBufferLength, kLong* pFrameCount, int pTimeScale);
345 
356  bool FileMerge( const char* pFilename, bool pShowUIMsg = false, FBFbxOptions* pOptions = NULL );
357 
368  bool FileMerge( FBStringList& pPathlist, bool pShowUIMsg = false, FBFbxOptions* pOptions = NULL );
369 
382  bool FileAppend( const char* pFilename, bool pShowUIMsg = false, FBFbxOptions* pOptions = NULL );
383 
390  bool FileSave( const char* pFilename = NULL, FBFbxOptions* pOptions = NULL );
391 
396  void FileExit( bool pSave = false );
397 
413  bool FileImport( FBString pFilename, bool pMatchModels = false, bool pCreateUnmatchedModels = true );
414 
423  bool FileImportWithOptions( FBMotionFileOptions* pOptions );
424 
436  bool FileExport( FBString pFilename );
437 
444  FBBatchStatus FileBatch( FBBatchOptions* pBatchOptions, FBPlotOptions* pPlotOptions = NULL );
445 
454  bool FileImportBatch( const char* pName, FBBatchOptions* pBatchOptions, FBModel* pReference );
455 
465  bool FileExportBatch( const char* pName, FBTake* pTake, FBBatchOptions* pBatchOptions, FBModelList &pExportModels );
466 
467 #if !defined(K_NO_CHARACTER)
468 
475  bool SaveCharacterRigAndAnimation( const char* pFileName, FBCharacter* pCharacter, FBFbxOptions* pFbxOptions);
476 
484  bool LoadAnimationOnCharacter( const char* pFileName, FBCharacter* pCharacter, FBFbxOptions* pFbxOptions, FBPlotOptions* pPlotOptions);
485 #endif
486 
491  bool IsValidBatchFile( const char* pFilename );
492 
493 #if !defined(K_NO_ONECLICK)
494 
498  bool OneClickSendAsNewScene( FBOneClickApplication pApplication );
499 
503  bool OneClickUpdateCurrentScene();
504 
508  bool OneClickAddToCurrentScene();
509 
512  void OneClickSelectPreviouslySentObject();
513 
517  FBOneClickApplication OneClickIsConnectedTo();
518 #endif
519 
527  bool FileRender( FBVideoGrabOptions* pRenderOptions = NULL );
528 
529 #if !defined(K_NO_AUDIO)
530 
535  bool AudioRender( FBAudioRenderOptions* pAudioRenderOptions = NULL);
536 #endif
537 
543  bool ExecuteScript(FBString pFilename);
544 
549  K_DEPRECATED_2016 void SwitchViewerCamera( FBCamera &pCamera );
550 
551 public:
553 #if !defined(K_NO_ACTOR)
555 #endif
556 #if !defined(K_NO_CHARACTER)
558 #endif
559 
562  static FBApplication& TheOne();
563 
566  const char* GetSceneTitle();
567 
571  void SetSceneTitle(const char* pTitle);
572 
575  const char* GetSceneSubject();
576 
580  void SetSceneSubject(const char* pSubject);
581 
584  const char* GetSceneAuthor();
585 
589  void SetSceneAuthor(const char* pAuthor);
590 
593  const char* GetSceneKeywords();
594 
598  void SetSceneKeywords(const char* pKeywords);
599 
602  const char* GetSceneRevisionNumber();
603 
607  void SetSceneRevisionNumber(const char* pRevNumber);
608 
611  const char* GetSceneComment();
612 
616  void SetSceneComment(const char* pComment);
617 };
618 
656 
660 
664 
672 
676 
680 
686 
690 
694 
699 #ifdef FBSDKUseNamespace
700 } // namespace FBSDKNamespace
701 #endif
702 
703 #endif
FBPropertyEvent OnFileNewCompleted
Event: A File New has been completed.
FBBatchOnContainsBatchTakes
Different actions to perform when a scene already contains batch takes while in a batch process...
Definition: fbapplication.h:93
FBAudioBitDepthMode BitDepthMode
Property: Bit depth for one sample of audio.
class FBArrayTemplate< FBModel * > FBModelList
typedef class FBSDK_DLL FBArrayTemplate FBModelList;
Definition: fbcharacter.h:597
FBBatchOnTakeExist
Different actions to perform when a take already exist while in a batch process.
Definition: fbapplication.h:85
Model class.
Definition: fbmodel.h:273
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
FBBatchFileFormat mInputFileFormat
File format of the input files.
File format for FBX (animation only).
Definition: fbapplication.h:80
FBRotationFilter mRotationFilterToApply
The rotation filter to apply.
bool FBMergeTransactionIsOn()
Call to tell if system is during Merge transaction.
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
Definition: fbproperties.h:139
bool mStartAnimationAtZero
Set the time of all loaded files to 0.
Option parameters for the batch process.
FBOneClickApplication
Possible application for One-Click interop with MotionBuilder.
bool mOverwriteScaling
Set the scaling to a default setting of 1.0.
FBAudioChannelMode ChannelMode
Property: Audio render channel number, 1 for Mono(left channel right channel render mixed to one chan...
Basic string class.
Definition: fbstring.h:66
Creates custom cameras and manages system cameras.
Definition: fbcamera.h:206
#define NULL
Definition: kaydara.h:169
FBTimeSpan TimeSpan
Property: Start and stop selection time to render.
Customize file loading and saving.
Definition: fbfbxoptions.h:120
bool mFrameAnimation
Set timeline start and end time to corespond with the start and end of animation. ...
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbapplication.h:48
FBCharacter * mCharacter
The character to receive the animation.
FBString mInputDirectory
The directory containning the input files.
bool mPlotToCharacter
To plot the animation on the character.
class FBPropertyBaseComponent< FBActor * > FBPropertyActor
FBBatchProcessType mProcessType
What process should be done? Load, Save or Both.
FBPlotTangentMode mPlotTangentMode
The tangent mode for plotted curve.
Property class: const char * (String).
Audio Render Options structure.
#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
FBBatchOnTakeExist mOnTakeExistAction
Action to perform when a take already exist while in a batch process.
FBPropertyEvent OnFileOpenCompleted
Event: A File Open has been completed.
FBBatchStatus
Different return values of the Batch process.
FBPropertyString FBXFileName
Read Write Property: Current scene filename.
bool mUseBatchSuffix
Add a batch suffix to the name of the files.
FBPropertyEvent OnFileMerge
Event: A File Merge has been requested, nothing has been loaded yet.
FBBatchFileFormat mOutputFileFormat
File format of the output files.
FBString OutputFileName
Property: Audio Render destination file.
void FBPreventUIUpdateBegin()
Call to prevent UI updates when creating/deleting/renaming objects.
#define K_DEPRECATED_2016
Definition: kaydara.h:414
Option parameters for plotting.
bool FBMergeTransactionFileRefEditIsOn()
Call to tell if system is during File Reference Edit Merge transaction.
A take is a container for animation in a scene.
Definition: fbdata.h:935
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
File format for Motion Analysis TRC.
Definition: fbapplication.h:75
FBPlotTangentMode
The tangent mode for plotted curve.
FBAudioChannelMode
Enum FBAudioChannelMode.
Definition: fbaudiofmt.h:63
FBAudioRateMode RateMode
Property: Rate mode for number of samples per second.
FBPropertyEvent OnFileSaveCompleted
Event: A File Save has been completed.
bool mPlotOnFrame
Should we plot on frame?
FBString mOutputDirectory
The directory containning the output files.
bool mUseSingleTake
Use only one take to convert all files.
A character is the link between a motion source and a character model.
Definition: fbcharacter.h:1229
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
FBTime mPlotPeriod
The plot period (1/fps).
Basic class definitions.
bool FBPreventUIUpdateIsOn()
Call to tell if UI updates are blocked.
Time data structure.
Definition: fbtime.h:86
PropertyEvent: Base event class.
Definition: fbproperties.h:507
void FBMergeTransactionFileRefEditEnd()
Call to end merge transaction with File Reference edit.
Customize motion file loading.
bool mWriteRate
Write frame rate in Acclaim AMC files.
FBPropertyActor CurrentActor
Read Write Property: Indicate the current actor, as used by the character tool.
FBPropertyEvent OnFileNew
Event: A File New has been requested, nothing has been destroyed yet.
bool mWriteTranslation
Write translation animation data included with Acclaim AMC files.
File format for Motion Analysis HTR.
Definition: fbapplication.h:79
FBBatchFileFormat
Different file formats for the batch.
Definition: fbapplication.h:73
FBActor is used to link motion data to a character.
Definition: fbcharacter.h:988
FBAudioRateMode
Enum FBAudioRateMode.
Definition: fbaudiofmt.h:77
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:62
FBBatchProcessType
Different process type for the batch.
Definition: fbapplication.h:64
String list.
Definition: fbstring.h:201
File format for Vicon C3D.
Definition: fbapplication.h:76
FBBatchOnContainsBatchTakes mOnContainsBatchTakesAction
Action to perform when a scene already contains batch takes while in a batch process.
FBPropertyEvent OnFileSave
Event: A File Save has been requested, nothing has been saved yet.
bool mConstantKeyReducerKeepOneKey
Should the constant key reducer keep at least one key?
bool mPlotTranslationOnRootOnly
Should we plot the translation on root only?
void FBMergeTransactionFileRefEditBegin()
Call to begin the transaction for merging multiple files and applying File Reference edit at the same...
Save the takes in different files.
Definition: fbapplication.h:67
bool mPlotLockedProperties
Should we plot locked properties?
TimeSpan class.
Definition: fbtime.h:381
bool mPreciseTimeDiscontinuities
Should we use precise time discontinuities?
bool mKeepCharacterConstraint
To keep the character constaint when saving.
void FBPreventUIUpdateEnd()
Call to end blocking the UI updates.
class FBPropertyBaseComponent< FBCharacter * > FBPropertyCharacter
FBPropertyEvent OnFileExit
Event: A File Exit as been requested, nothing has been destroyed yet.
File format for Acclaim AMC.
Definition: fbapplication.h:77
bool mPlotAllTakes
Should we plot all takes?
FBViewerMode
Different viewer modes for the 3D viewer.
FBApplication is used mainly to manage files.
Load the files and plot the character with every take.
Definition: fbapplication.h:66
FBPropertyCharacter CurrentCharacter
Read Write Property: Indicate the current character, as used by the character tool.
bool mPlotToControlSet
To plot the animation on the control set.
File format for Biovision BVH.
Definition: fbapplication.h:78
FBRotationFilter
Rotation filters.
void FBMergeTransactionBegin()
Call to begin the transaction for merging multiple files.
Video Grabbing Options structure.
bool mUseConstantKeyReducer
Should we use a constant key reducer with the filter?
bool mKeepDummyBones
To keep dummy bones.
void FBMergeTransactionEnd()
Call to end the merge transaction.
FBPropertyEvent OnFileOpen
Event: A File Open has been requested, nothing has been loaded yet.
FBString mSkeletonFile
The Skeleton file (for Acclaim AMC files).
FBAudioBitDepthMode
Enum FBAudioBitDepthMode.
Definition: fbaudiofmt.h:70