fbsystem.h

Go to the documentation of this file.
00001 #ifndef __FBSYSTEM_H__
00002 #define __FBSYSTEM_H__
00003 /**************************************************************************
00004 Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
00005 All Rights Reserved.
00006 
00007 The coded instructions, statements, computer programs, and/or related 
00008 material (collectively the "Data") in these files contain unpublished 
00009 information proprietary to Autodesk, Inc. and/or its licensors, which is 
00010 protected by Canada and United States of America federal copyright law 
00011 and by international treaties.
00012 
00013 The Data may not be disclosed or distributed to third parties, in whole 
00014 or in part, without the prior written consent of Autodesk, Inc. 
00015 ("Autodesk").
00016 
00017 THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
00018 ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO 
00019 WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR 
00020 ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES 
00021 OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR 
00022 PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT 
00023 WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR 
00024 FREE.
00025 
00026 IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS 
00027 OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR 
00028 EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE 
00029 DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS 
00030 OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR 
00031 DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF 
00032 LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT 
00033 LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE 
00034 DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS 
00035 BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
00036 
00037 **************************************************************************/
00038 
00045 #include <kaydaradef.h>
00046 #ifndef FBSDK_DLL 
00047 
00050 #define FBSDK_DLL K_DLLIMPORT
00051 #endif
00052 
00053 // Essential includes
00054 #include <fbsdk/fbcomponent.h>
00055 #include <fbsdk/fbdata.h>   // FBPropertyListTake
00056 
00057 #include <fbsdk/fbio.h>     // FBPropertyListCommPort
00058 #include <fbsdk/fbshader.h>
00059 #include <fbsdk/fbmodel.h>
00060 #include <fbsdk/fbevaluateinfo.h>
00061 
00062 // For 'lean version' we don't need the plugin headers.
00063 #if !defined(K_NO_AUDIO)
00064 #include <fbsdk/fbaudio.h>
00065 #endif
00066 
00067 #if !defined(K_NO_VIDEO)
00068 #include <fbsdk/fbvideo.h>
00069 #endif
00070 
00071 #if !defined(K_NO_DECK)
00072 #include <fbsdk/fbdeck.h>           // FBPropertyListDeck
00073 #endif
00074 
00075 #if !defined(K_NO_ASSETMNG)
00076 #include <fbsdk/fbassetmng.h>   // FBPropertyAssetMng
00077 #endif
00078 
00079 #if !defined(K_NO_MANIPULATOR)
00080 #include <fbsdk/fbmanipulator.h>    // FBPropertyListManipulator
00081 #endif
00082 
00083 #ifdef FBSDKUseNamespace
00084 namespace FBSDKNamespace {
00085 #endif
00086 
00087 #if !defined(K_NO_CHARACTER)
00088     FB_FORWARD( FBCharacter );
00089 #endif
00090 
00091     struct FBVideoGrabOptions;
00092 
00093     FB_DEFINE_COMPONENT( FBSDK_DLL, Take );
00094     FB_DEFINE_COMPONENT( FBSDK_DLL, Renderer );
00095 
00097     // Utility function
00099     // For internal use only.
00100 
00106     FBSDK_DLL HIObject      FBGetFBObject( HIObject pObject, bool pAutoCreate=false );
00107 
00113     template<class T> inline T* FBCast(HIObject pObject, bool pAutoCreate = false)
00114     {
00115         HIObject lObject = FBGetFBObject(pObject, pAutoCreate);
00116         // Should also validate type but not available for now
00117         return (T*)lObject;
00118     }
00119 
00125     template<class T> inline T* FBCast(FBObject* pObject, bool pAutoCreate = false)
00126     {
00127         HIObject lObject = pObject ? FBGetFBObject(pObject->GetHIObject(), pAutoCreate) : NULL;
00128         // Should also validate type but not available for now
00129         return (T*)lObject;
00130     }
00131 
00133     class FBSDK_DLL FBEventVideoFrameRendering: public FBEvent 
00134     {
00135     public:
00139         FBEventVideoFrameRendering( HKEventBase pEvent );
00140 
00142         typedef enum{
00143             eBeginRendering = 1,  
00144             eRendering,           
00145             eEndRendering         
00146         }EState;
00147 
00151         kInt64 GetFrameNumber();
00152 
00156         kInt64 GetFrameCount();
00157 
00161         FBEventVideoFrameRendering::EState GetState();
00162 
00163     private:
00164         kInt64  mFrameNumber;    
00165         kInt64  mFrameCount;     
00166         EState  mState;          
00167     };
00168 
00170     // FBSystem
00172     __FB_FORWARD( FBSystem );
00173 
00190     class FBSDK_DLL FBSystem : public FBComponent {
00191         __FBClassDeclare( FBSystem,FBComponent );
00192     public:
00195         FBSystem();
00196 
00197         FBPropertyString                        ConfigPath;                 // < <b>Read Only Property:</b> Location where the config folder is.
00198         FBPropertyString                        UserConfigPath;             // < <b>Read Only Property:</b> Location where the user config folder is.
00199         FBPropertyString                        ApplicationPath;            
00200         FBPropertyString                        TempPath;                   
00201         
00202         FBPropertyEventUIIdle                   OnUIIdle;                   
00203         FBPropertyEventVideoFrameRendering      OnVideoFrameRendering;      
00204         
00205         FBPropertyEventConnectionNotify         OnConnectionNotify;         
00206         FBPropertyEventConnectionDataNotify     OnConnectionDataNotify;     
00207         FBPropertyEventConnectionStateNotify    OnConnectionStateNotify;    
00208         FBPropertyEventConnectionKeyingNotify   OnConnectionKeyingNotify;   
00209 
00210         FBPropertyString                        ComputerName;               
00211         FBPropertyDouble                        Version;                    
00212         FBPropertyString                        BuildId;                    
00213 
00214 
00215         FBPropertyTime                          SystemTime;                 
00216         FBPropertyTime                          LocalTime;                  
00217         FBPropertyTake                          CurrentTake;                
00218 
00219         FBPropertyScene                         Scene;                      
00220         FBPropertyModel                         SceneRootModel;             
00221         FBPropertyModel                         RootModel;                  
00222         FBPropertyString                        PathImages;                 
00223         FBPropertyString                        PathMeshs;                  
00224 
00225 #if !defined(K_NO_AUDIO)
00226         FBPropertyListAudioIn                   AudioInputs;                
00227         FBPropertyListAudioOut                  AudioOutputs;               
00228 #endif
00229 
00230 #if !defined(K_NO_VIDEO)
00231         FBPropertyListVideoIn                   VideoInputs;                
00232         FBPropertyListVideoOut                  VideoOutputs;               
00233 #endif                                                                  
00234 
00235         FBPropertyListCommPort                  CommPorts;                  
00236         FBPropertyRenderer                      Renderer;                   
00237 
00238         FBPropertyDouble                        FrameRate;                  
00239         FBPropertyDouble                        ProcessMemory;              
00240         FBPropertyDouble                        ProcessMemoryPeak;          
00241         FBPropertyVector2d                      DesktopSize;                
00242         FBPropertyBool                          FullScreenViewer;           
00243 
00244 #if !defined(K_NO_ASSETMNG)
00245         FBPropertyAssetMng                      AssetManager;               
00246 #endif
00247 
00248 #if !defined(K_NO_MANIPULATOR)
00249         FBPropertyListManipulator               Manipulators;   
00250 #endif
00251 
00256         static bool  LibraryLoad(const char *pPath);
00262         static void* LibraryGetProcAddress(const char *pPath, const char *pFunctionName);
00267         static bool  LibraryFree(const char *pPath);
00268 
00272         static FBString CurrentDirectory();
00273 
00278         static FBString MakeFullPath(const char* pRelativeFilePath);
00279 
00283         static FBSystem& TheOne();
00284 
00301         const FBStringList &GetCommandLineArgs() const;
00302 
00311         const FBStringList& GetPythonStartupPath() const;
00312 
00318         const FBStringList& GetPluginPath() const;
00319     };
00320 
00321 #ifndef K_NO_TRIGGER
00322 
00323     // FBTriggerManager
00325     __FB_FORWARD( FBTriggerManager );
00329     class FBSDK_DLL FBTriggerManager :public FBComponent 
00330     {
00331         __FBClassDeclare( FBTriggerManager, FBComponent );
00332     public:
00335         FBTriggerManager();
00336 
00340         int GetGroupCount();
00341 
00346         char* GetGroupName( int pIndex );
00347 
00352         bool GetGroupActive( int pIndex );
00353 
00358         void SetGroupActive( int pIndex, bool pState );
00359 
00360         FBPropertyBool      Active;     
00361     };
00362 #endif
00363 
00365     // FBBatchOptions
00367     FB_FORWARD( FBBatchOptions );
00368 
00370     enum FBBatchProcessType
00371     {
00372         kFBBatchProcessTypeLoad,    
00373         kFBBatchProcessTypeSave,    
00374         kFBBatchProcessTypeConvert  
00375     };
00376     FB_DEFINE_ENUM( FBSDK_DLL, BatchProcessType );
00377 
00379     enum FBBatchFileFormat
00380     {
00381         kFBBatchFileFormatTRC,      
00382         kFBBatchFileFormatC3D,      
00383         kFBBatchFileFormatAMC,      
00384         kFBBatchFileFormatBVH,      
00385         kFBBatchFileFormatHTR,      
00386         kFBBatchFileFormatFBX       
00387     };
00388     FB_DEFINE_ENUM( FBSDK_DLL, BatchFileFormat );
00389 
00391     enum FBBatchOnTakeExist
00392     {
00393         kFBBatchOnTakeExistOverwrite,   
00394         kFBBatchOnTakeExistSkip         
00395     };
00396     FB_DEFINE_ENUM( FBSDK_DLL, BatchOnTakeExist );
00397 
00399     enum FBBatchOnContainsBatchTakes
00400     {
00401         kFBBatchOnContainsBatchTakesSaveBatchTakesOnly, 
00402         kFBBatchOnContainsBatchTakesSaveAllTakes        
00403     };
00404     FB_DEFINE_ENUM( FBSDK_DLL, BatchOnContainsBatchTakes );
00405 
00407     enum FBBatchStatus
00408     {
00409         kFBBatchStatusSuccess,
00410         kFBBatchStatusError,
00411         kFBBatchStatusCharacterNotSpecified,
00412         kFBBatchStatusCharacterNotCharacterized,
00413         kFBBatchStatusCharacterHasNoReference,
00414         kFBBatchStatusInputActorNotSpecified,
00415         kFBBatchStatusActorInputMarkersetNotSpecified,
00416         kFBBatchStatusActorInputMarkersetHasNoReferenceModel,
00417         kFBBatchStatusActorInputMarkersetNotCorrectlyAssociated,
00418         kFBBatchStatusInputCharacterNotCharacterized,
00419         kFBBatchStatusInputCharacterHasNoReference,
00420         kFBBatchStatusInputDirectoryNotValid,
00421         kFBBatchStatusAsfSkeletonFileNotSpecified,
00422         kFBBatchStatusCantOpenAsfSkeletonFile,
00423         kFBBatchStatusOutputDirectoryNotValid
00424     };
00425 
00427     class FBSDK_DLL FBBatchOptions
00428     {
00429     public:
00430 
00433         FBBatchOptions();
00434 
00435         FBBatchFileFormat       mInputFileFormat;           
00436         FBBatchFileFormat       mOutputFileFormat;          
00437 
00438         FBBatchProcessType      mProcessType;               
00439 
00440         FBString                mInputDirectory;            
00441         FBString                mOutputDirectory;           
00442         FBString                mSkeletonFile;              
00443 
00444 #if !defined(K_NO_CHARACTER)
00445         FBCharacter*            mCharacter;                 
00446 #endif
00447 
00448         bool                    mStartAnimationAtZero;      
00449         bool                    mFrameAnimation;            
00450         bool                    mOverwriteScaling;          
00451         bool                    mKeepDummyBones;            
00452         bool                    mWriteRate;                 
00453         bool                    mWriteTranslation;          
00454         bool                    mPlotToCharacter;           
00455         bool                    mPlotToControlSet;          
00456         bool                    mUseSingleTake;             
00457         bool                    mUseBatchSuffix;            
00458         bool                    mKeepCharacterConstraint;   
00459 
00460         FBBatchOnTakeExist          mOnTakeExistAction;             
00461         FBBatchOnContainsBatchTakes mOnContainsBatchTakesAction;    
00462     };
00463 
00464 
00466     // FBPlotOptions
00468     FB_FORWARD( FBPlotOptions );
00469 
00471     enum FBRotationFilter
00472     {
00473         kFBRotationFilterNone,
00474         kFBRotationFilterGimbleKiller,
00475         kFBRotationFilterUnroll
00476     };
00477     FB_DEFINE_ENUM( FBSDK_DLL, RotationFilter );
00478 
00480     class FBSDK_DLL FBPlotOptions
00481     {
00482     public:
00483 
00486         FBPlotOptions();
00487 
00488         bool                mPlotAllTakes;                  
00489         bool                mPlotOnFrame;                   
00490         FBTime              mPlotPeriod;                    
00491         FBRotationFilter    mRotationFilterToApply;         
00492         bool                mUseConstantKeyReducer;         
00493         bool                mConstantKeyReducerKeepOneKey;  
00494         bool                mPlotTranslationOnRootOnly;     
00495         bool                mPreciseTimeDiscontinuities;    
00496         bool                mPlotLockedProperties;          
00497     };
00498 
00499 #if !defined(K_NO_AUDIO)
00500 
00501     // FBAudioRenderOptions
00503     FB_FORWARD( FBAudioRenderOptions );
00504 
00508     class FBSDK_DLL FBAudioRenderOptions
00509     {
00510     public:
00511 
00514         FBAudioRenderOptions();
00515 
00516         FBTimeSpan              TimeSpan;       
00517         FBAudioChannelMode      ChannelMode;    
00518         FBAudioBitDepthMode     BitDepthMode;   
00519         FBAudioRateMode         RateMode;       
00520         FBString                OutputFileName; 
00521     };
00522 #endif
00523 
00525     // FBApplication
00527     __FB_FORWARD( FBApplication );
00528 #if !defined(K_NO_CHARACTER)
00529     __FB_FORWARD( FBCharacter );
00530 #endif
00531 #if !defined(K_NO_ACTOR)
00532     __FB_FORWARD( FBActor );
00533 #endif
00534 #if !defined(K_NO_CHARACTER)
00535     FB_DEFINE_COMPONENT( FBSDK_DLL, Character );
00536 #endif
00537 #if !defined(K_NO_ACTOR)
00538     FB_DEFINE_COMPONENT( FBSDK_DLL, Actor );
00539 #endif
00540 
00542     enum FBViewerMode { 
00543         kFBViewerModeOneWindow,     
00544         kFBViewerModeTwoWindow,     
00545         kFBViewerModeThreeWindow,   
00546         kFBViewerModeFourWindow,    
00547         kFBViewerModeSchematic      
00548     };
00549 
00550 #if !defined(K_NO_ONECLICK)
00551 
00552     enum FBOneClickApplication
00553     {
00554         kFBOneClickNone, 
00555         kFBOneClickMaya, 
00556         kFBOneClick3dsMax, 
00557     };
00558 #endif
00559 
00567     class FBSDK_DLL FBApplication : public FBComponent 
00568     {
00569         __FBClassDeclare( FBApplication,FBComponent );
00570     public:
00574         FBApplication(HIObject pObject=NULL);
00575 
00576         FBPropertyEvent OnFileNewCompleted;     
00577         FBPropertyEvent OnFileNew;              
00578         FBPropertyEvent OnFileOpenCompleted;    
00579         FBPropertyEvent OnFileOpen;             
00580         FBPropertyEvent OnFileMerge;            
00581         FBPropertyEvent OnFileSaveCompleted;    
00582         FBPropertyEvent OnFileSave;             
00583         FBPropertyEvent OnFileExit;             
00584 
00589         bool Minimize(bool pBlocking=true);
00590 
00594         bool Maximize();
00595 
00597         void UpdateAllWidgets();
00598 
00603         void FlushEventQueue();
00604 
00610         bool FileNew(bool  pAskUser = false, bool pClearSceneName = true);
00611 
00620         bool FileOpen( const char* pFilename, bool pShowUIMsg = false, FBFbxOptions* pOptions = NULL );
00621 
00628         bool FileOpen( void* pBuffer, kULong pBufferLength );       
00629 
00638         bool GetMaxFrameCount(void* pBuffer, kULong pBufferLength, kLong* pFrameCount, int pTimeScale); 
00639 
00648         bool FileMerge( const char* pFilename, bool pShowUIMsg = false, FBFbxOptions* pOptions = NULL );
00649 
00658         bool FileMerge( FBStringList& pPathlist, bool pShowUIMsg = false, FBFbxOptions* pOptions = NULL );
00659 
00670         bool FileAppend( const char* pFilename, bool pShowUIMsg = false, FBFbxOptions* pOptions = NULL );
00671 
00678         bool FileSave( const char* pFilename = NULL, FBFbxOptions* pOptions = NULL );
00679 
00684         void FileExit( bool pSave = false );
00685 
00701         bool FileImport( FBString pFilename, bool pMatchModels = false, bool pCreateUnmatchedModels = true );
00702 
00714         bool FileExport( FBString pFilename );
00715 
00722         FBBatchStatus FileBatch( FBBatchOptions* pBatchOptions, FBPlotOptions* pPlotOptions = NULL );
00723 
00732         bool FileImportBatch( const char* pName, FBBatchOptions* pBatchOptions, FBModel* pReference );
00733 
00743         bool FileExportBatch( const char* pName, FBTake* pTake, FBBatchOptions* pBatchOptions, FBModelList &pExportModels );
00744 
00745 #if !defined(K_NO_CHARACTER)
00746 
00753         bool SaveCharacterRigAndAnimation( const char* pFileName, FBCharacter* pCharacter, FBFbxOptions* pFbxOptions);
00754 
00762         bool LoadAnimationOnCharacter( const char* pFileName, FBCharacter* pCharacter,  FBFbxOptions* pFbxOptions, FBPlotOptions* pPlotOptions);
00763 #endif
00764 
00769         bool IsValidBatchFile( const char* pFilename );
00770 
00771 #if !defined(K_NO_ONECLICK)
00772 
00776         bool OneClickSendAsNewScene( FBOneClickApplication pApplication );
00777 
00781         bool OneClickUpdateCurrentScene();
00782 
00786         bool OneClickAddToCurrentScene();
00787 
00790         void OneClickSelectPreviouslySentObject();
00791 
00795         FBOneClickApplication OneClickIsConnectedTo();
00796 #endif
00797 
00805         bool FileRender( FBVideoGrabOptions* pRenderOptions = NULL );
00806 
00807 #if !defined(K_NO_AUDIO)
00808 
00813         bool AudioRender( FBAudioRenderOptions* pAudioRenderOptions  = NULL);
00814 #endif
00815 
00821         bool ExecuteScript(FBString pFilename);
00822 
00826         void SwitchViewerCamera( FBCamera &pCamera );
00827 
00828     public:
00829         FBPropertyString        FBXFileName;            
00830 #if !defined(K_NO_ACTOR)
00831         FBPropertyActor         CurrentActor;           
00832 #endif
00833 #if !defined(K_NO_CHARACTER)
00834         FBPropertyCharacter     CurrentCharacter;       
00835 #endif
00836 
00839         static FBApplication& TheOne();
00840     };
00841 
00842 
00844     // FBPlayerControl
00846 
00847     __FB_FORWARD( FBPlayerControl );
00848 
00850     enum FBTransportMode {  
00851         kFBTransportPlay,               kFBTransportPlayPrepare,        kFBTransportPlayReady,
00852         kFBTransportStop,               kFBTransportStopPost,           kFBTransportStopReady,
00853         kFBTransportShuttle,            kFBTransportShuttlePrepare,     kFBTransportShuttleReady,
00854         kFBTransportPlayReverse,        kFBTransportPlayReversePrepare, kFBTransportPlayReverseReady,
00855         kFBTransportJog,                kFBTransportJogPrepare,         kFBTransportJogReady,
00856         kFBTransportGoto,               kFBTransportGotoPrepare,        kFBTransportGotoReady,
00857         kFBTransportStepForward,        kFBTransportStepForwardPrepare, kFBTransportStepForwardReady,
00858         kFBTransportStepBackward,       kFBTransportStepBackwardPrepare,kFBTransportStepBackwardReady
00859     };
00860     FB_DEFINE_ENUM( FBSDK_DLL, TransportMode );
00861 
00863     enum FBTransportTimeFormat
00864     {
00865         kFBTimeFormatTimecode, 
00866         kFBTimeFormatFrame, 
00867     };
00868 
00869     FB_DEFINE_ENUM(FBSDK_DLL, TransportTimeFormat);
00870 
00871 
00873     enum FBTransportPlaySpeed
00874     {
00875         kFBSpeed_1_10x, 
00876         kFBSpeed_1_5x,  
00877         kFBSpeed_1_4x,  
00878         kFBSpeed_1_3x,  
00879         kFBSpeed_1_2x,  
00880         kFBSpeed_1x,    
00881         kFBSpeed_ALL_FR, 
00882         kFBSpeed_2x,    
00883         kFBSpeed_3x,    
00884         kFBSpeed_4x,    
00885         kFBSpeed_5x,    
00886         kFBSpeed_10x    
00887     };
00888     FB_DEFINE_ENUM( FBSDK_DLL, TransportPlaySpeed);
00889 
00891     enum FBTransportSnapMode
00892     {
00893         kFBTransportSnapModeNoSnap,              
00894         kFBTransportSnapModeSnapOnFrames,        
00895         kFBTransportSnapModePlayOnFrames,        
00896         kFBTransportSnapModeSnapAndPlayOnFrames, 
00897     };
00898     FB_DEFINE_ENUM( FBSDK_DLL, TransportSnapMode );
00899 
00900 
00915     class FBSDK_DLL FBPlayerControl : public FBComponent {
00916         __FBClassDeclare( FBPlayerControl,FBComponent );
00917     public:
00918 
00922         FBPlayerControl(HIObject pObject=NULL);
00923 
00928         bool Play(bool pUseMarkers = false);
00929 
00934         bool PlayReverse(bool pUseMarkers = false);
00935 
00939         void SetPlaySpeed (FBTransportPlaySpeed pPlaySpeed );
00940 
00944         FBTransportPlaySpeed GetPlaySpeed();
00945 
00949         bool Stop();
00950 
00954         bool GotoStart();
00955 
00959         bool GotoEnd();
00960 
00965         bool Goto( FBTime pTime );
00966 
00970         bool StepForward();
00971 
00975         bool StepBackward();
00976 
00982         bool Record( bool pOverrideTake=false,bool pCopyData=true );
00983 
00988         void LockTransport( bool pLock );
00989 
00993         bool IsLocked(); 
00994 
00998         FBTransportMode GetTransportMode();
00999 
01004         void       SetTransportFps ( FBTimeMode pTimeMode, double pCustom=0.0);
01005 
01009         FBTimeMode GetTransportFps ();
01010 
01015         double     GetTransportFpsValue ( FBTimeMode pTimeMode = kFBTimeModeDefault );
01016 
01020         void Key();
01021 
01024         void GotoNextKey();
01025 
01028         void GotoPreviousKey();
01029 
01032         void EvaluationPause();
01033 
01036         void EvaluationResume();
01037 
01038         FBPropertyBool  LoopActive;     
01039         FBPropertyTime  LoopStart;      
01040         FBPropertyTime  LoopStop;       
01041 
01042         FBPropertyTime  ZoomWindowStart;    
01043         FBPropertyTime  ZoomWindowStop;     
01044 
01045         FBPropertyTime  NextMarker;     
01046         FBPropertyTime  PreviousMarker; 
01047 
01048         FBPropertyBool  IsRecording;    
01049         FBPropertyBool  IsPlaying;      
01050         FBPropertyBool  IsPlotting;     
01051 
01052         FBPropertyTransportSnapMode SnapMode;   
01053 
01054         FBPropertyTransportTimeFormat TransportTimeFormat; 
01055 
01056         FBPropertyTime  RecordingSamplingPeriod;    
01057         FBPropertyTime  PlotSamplingPeriod;         
01058 
01062         static FBPlayerControl& TheOne();
01063     };
01064 
01066     // FBEvaluateManager
01068 
01070     enum FBParallelScheduleType
01071     {
01072         kFBParallelScheduleSerial,      
01073         kFBParallelScheduleSimple,      
01074         kFBParallelScheduleAdvanced,    
01075     };
01076 
01077     FB_DEFINE_ENUM(FBSDK_DLL, ParallelScheduleType);
01078 
01082     enum FBGlobalEvalCallbackTiming
01083     {
01084         kFBGlobalEvalCallbackBeforeDAG,     
01085         kFBGlobalEvalCallbackAfterDAG,      
01086         kFBGlobalEvalCallbackAfterDeform,   
01087         kFBGlobalEvalCallbackSyn,           
01088         kFBGlobalEvalCallbackBeforeRender,  
01089         kFBGlobalEvalCallbackAfterRender    
01090     };
01091 
01092     typedef void (*kFBEvaluationGlobalFunctionCallback)(FBEvaluateInfo* pEvaluteInfo);
01093 
01095     class FBSDK_DLL FBEventEvalGlobalCallback: public FBEvent 
01096     {
01097     public:
01101         FBEventEvalGlobalCallback( HKEventBase pEvent );    
01102 
01104         FBGlobalEvalCallbackTiming GetTiming() const;
01105     };
01106 
01108     class FBSDK_DLL FBPropertyEventCallbackEvalPipeline : public FBPropertyEvent
01109     {
01110     public:
01111         virtual void Add    ( HICallback pOwner, kICallbackHandler pHandler );
01112         virtual void Remove ( HICallback pOwner, kICallbackHandler pHandler );
01113     };
01114 
01116     class FBSDK_DLL FBPropertyEventCallbackRenderPipeline : public FBPropertyEvent
01117     {
01118     public:
01119         virtual void Add    ( HICallback pOwner, kICallbackHandler pHandler );
01120         virtual void Remove ( HICallback pOwner, kICallbackHandler pHandler );
01121     };
01122 
01124     class FBSDK_DLL FBPropertyEventCallbackSynPoint : public FBPropertyEvent
01125     {
01126     public:
01127         virtual void Add    ( HICallback pOwner, kICallbackHandler pHandler );
01128         virtual void Remove ( HICallback pOwner, kICallbackHandler pHandler );
01129     };
01130 
01135     __FB_FORWARD( FBEvaluateManager );
01136     class FBSDK_DLL FBEvaluateManager : public FBComponent 
01137     {
01138         __FBClassDeclare( FBEvaluateManager,FBComponent );
01139 
01144         FBEvaluateManager(HIObject pObject=NULL);
01145 
01146     public:
01147         FBPropertyBool                  ParallelPipeline;            
01148         FBPropertyBool                  ParallelDeformation;         
01149         FBPropertyBool                  UseGPUDeformation;           
01150         FBPropertyBool                  FrameSkipOptimization;       
01151         FBPropertyParallelScheduleType  ParallelScheduleType;        
01152         FBPropertyBool                  ParallelEvaluation;          
01153 
01154         FBPropertyInt                   NodeCount;                   
01155         FBPropertyInt                   DeviceCount;                 
01156 
01158         void InvalidateDAG();
01159 
01163         bool IsInteractiveMode() const;
01164 
01175 
01181         void RegisterEvaluationGlobalFunction  (kFBEvaluationGlobalFunctionCallback pCallback, FBGlobalEvalCallbackTiming pTiming);
01182 
01187         void UnregisterEvaluationGlobalFunction(kFBEvaluationGlobalFunctionCallback pCallback, FBGlobalEvalCallbackTiming pTiming);
01188 
01193         FBPropertyEventCallbackEvalPipeline     OnEvaluationPipelineEvent;   
01194         FBPropertyEventCallbackRenderPipeline   OnRenderingPipelineEvent;    
01195         FBPropertyEventCallbackSynPoint         OnSynchronizationEvent;      
01196 
01198 
01202         static FBEvaluateManager& TheOne();
01203     };
01204 
01206     // FBKeyControl
01208     __FB_FORWARD( FBKeyControl );
01209 
01213     class FBSDK_DLL FBKeyControl : public FBComponent
01214     {
01215         __FBClassDeclare(FBKeyControl, FBComponent);
01216 
01217     public:
01221         FBKeyControl(HIObject pObject=NULL);
01222 
01223         FBPropertyBool  AutoKey;    
01224     };
01225 
01227     // FBPointCacheManager
01229     __FB_FORWARD( FBPointCacheManager );
01230 
01234     class FBSDK_DLL FBPointCacheManager : public FBComponent
01235     {
01236         __FBClassDeclare(FBPointCacheManager, FBComponent);
01237 
01242         FBPointCacheManager(HIObject pObject=NULL);
01243 
01244     public:
01245         FBPropertyListObject   Models;                  
01246 
01247         FBPropertyBool         ApplyGlobalTransform;    
01248         FBPropertyAction       SetTransformReference;   
01249 
01250         FBPropertyBool         ApplyCacheOnNewModel;    
01251         FBPropertyModel        NewModelRoot;            
01252 
01253         FBPropertyBool         AllowCacheResampling;    
01254         FBPropertyBool         AlwaysAskForPath;        
01255         FBPropertyString       DefaultPath;             
01256         FBPropertyBool         CacheNormal;             
01257         FBPropertyBool         CacheAABBox;             
01258         FBPropertyBool         CreateMultiChannelCache; 
01259         FBPropertyBool         CreateFilePerFrameCache; 
01260         FBPropertyInt          SaveEveryFrame;          
01261 
01265         static FBPointCacheManager& TheOne();
01266     };
01267 
01269     // FBFileMonitoringManager
01271     __FB_FORWARD( FBFileMonitoringManager );
01275     enum FBFileMonitoringType   {
01276         kFBFileMonitoring_InvalidIndex, 
01277         kFBFileMonitoring_MAINSCENE,    
01278         kFBFileMonitoring_ANIMATIONCLIP,
01279         kFBFileMonitoring_FILEREFERENCE,
01280     };
01281 
01282     FB_DEFINE_ENUM( FBSDK_DLL, FileMonitoringType );
01283 
01284     __FB_FORWARD( FBEventFileChange );
01285 
01289     class FBSDK_DLL FBEventFileChange: public FBEvent 
01290     {
01291     public:
01292 
01296         FBEventFileChange( HKEventBase pEvent );        
01297 
01298         FBPropertyFileMonitoringType    Type;        
01299         FBPropertyString                Path;        
01300     };
01301 
01305     class FBSDK_DLL FBFileMonitoringManager : public FBComponent
01306     {
01307         __FBClassDeclare(FBFileMonitoringManager, FBComponent);
01308 
01313         FBFileMonitoringManager(HIObject pObject=NULL);
01314 
01315     public:
01320         void AddFileToMonitor(FBString pFilePath, FBFileMonitoringType pFileMonitoringType );
01321 
01325         void RemoveFileFromMonitor(FBString pFilePath);
01326 
01330         void PauseFileMonitoring(bool pPause = true);
01331 
01334         void CleanFileMonitoring();
01335 
01336     public:
01337         FBPropertyEvent    OnFileChangeMainScene;           
01338         FBPropertyEvent    OnFileChangeAnimationClip;       
01339         FBPropertyEvent    OnFileChangeFileReference;       
01340 
01343         static FBFileMonitoringManager& TheOne();
01344     };
01345 
01347     // FBCriticalSection
01349     FB_FORWARD( FBCriticalSection );
01350 
01355     class FBSDK_DLL FBCriticalSection
01356     {
01357         void *mPtr;     
01358     public:
01360         FBCriticalSection();
01361 
01363         ~FBCriticalSection();
01364 
01368         bool Init();
01369 
01371         void Enter();
01372 
01374         void Leave();
01375     };
01376 
01378     // FBFastLock
01380     FB_FORWARD( FBFastLock );
01381 
01388     class FBSDK_DLL FBFastLock 
01389     {
01390         void *mPtr;     
01391     public:
01393         FBFastLock();
01394 
01396         ~FBFastLock();
01397 
01399         void Lock();
01400 
01402         void Unlock();
01403     };
01404 
01406     // FBReferenceTime
01408     __FB_FORWARD( FBReferenceTime );
01409 
01411     class FBSDK_DLL FBReferenceTime : public FBComponent {
01412         __FBClassDeclare( FBReferenceTime,FBComponent );
01413     public:
01417         FBReferenceTime(HIObject pObject=NULL);
01418 
01423         int    Add( const char *pName );
01424 
01428         void   Remove( int pIndex );
01429 
01435         void   SetTime( int pIndex, FBTime pReferenceTime, FBTime pSystem );
01441         FBTime GetTime( int pIndex, FBTime pSystem );
01442 
01447         const char *operator[](int pIndex);
01448 
01449         FBPropertyInt               Count;          
01450         FBPropertyInt               ItemIndex;      
01451     };
01452 
01454     // Global utility functions
01456 
01457 
01464     FBSDK_DLL FBModelList* FBCreateModelList();
01465 
01469     FBSDK_DLL void FBDestroyModelList( FBModelList* pModelList );
01470 
01477     FBSDK_DLL FBPlugList* FBCreatePlugList();
01478 
01482     FBSDK_DLL void FBDestroyPlugList( FBPlugList* pPlugList );
01483 
01490     FBSDK_DLL FBComponentList* FBCreateComponentList();
01491 
01495     FBSDK_DLL void FBDestroyComponentList( FBComponentList* pObjectList );
01496 
01497 
01502     FBSDK_DLL void FBSleep( kULong MilliSeconds );
01503 
01508     FBSDK_DLL void FBSchedulingDependencyOutput( bool pEnable );
01509 
01518     FBSDK_DLL FBModel* FBFindModelByLabelName( const char* pModelLabelName );
01519 
01527     FBSDK_DLL FBModel* FBFindModelByUniqueColorId( const FBColor& pColor, int* pSubItemIndex = NULL );
01528 
01533     FBSDK_DLL FBModel* FBLoadFbxPrimitivesModel( const char* pModelName );
01534 
01542     FBSDK_DLL void FBFindModelsOfType( FBModelList& pList, int pTypeInfo, FBModel* pParent=NULL );
01543 
01553     FBSDK_DLL void FBGetSelectedModels( FBModelList& pList, FBModel* pParent=NULL, bool pSelected=true, bool pSortBySelectOrder = false );
01554 
01562     FBSDK_DLL void FBFindObjectsByName( const char* pNamePattern, FBComponentList& pList, bool pIncludeNamespace = true, bool pModelsOnly = false );
01563 
01572     FBSDK_DLL FBComponent* FBFindObjectByFullName( const char* pObjectFullName );
01573 
01587     FBSDK_DLL int FBDeleteObjectsByName( const char* pNamePattern, const char* pNameSpace = NULL, const char* pGroupName = NULL);
01588 
01592     FBSDK_DLL void FBBeginChangeAllModels();
01593 
01596     FBSDK_DLL void FBEndChangeAllModels();
01597 
01627     FBSDK_DLL void FBMergeTransactionBegin();
01628 
01631     FBSDK_DLL void FBMergeTransactionEnd();
01632 
01635     FBSDK_DLL bool FBMergeTransactionIsOn();
01636 
01641     FBSDK_DLL void FBMergeTransactionFileRefEditBegin();
01642 
01645     FBSDK_DLL void FBMergeTransactionFileRefEditEnd();
01646 
01649     FBSDK_DLL bool FBMergeTransactionFileRefEditIsOn();
01650 
01671     enum FBTraceLevel
01672     {
01673         kFBNO_TRACE           = 0,    //<! Tracing disabled
01674         kFBCRITICAL_TRACE     = 1,    //<! Critical traces
01675         kFBNORMAL_TRACE       = 10,   //<! Descriptive traces
01676         kFBALL_TRACE          = 20    //<! Default value, all traces. 
01677     };
01678 
01684     FBSDK_DLL   void FBTraceSetLevel( unsigned int pNewLevel );
01685 
01690     FBSDK_DLL   unsigned int FBTraceGetLevel(); 
01691 
01698     FBSDK_DLL void FBTrace( const char* pFormatString, ... );
01699 
01707     FBSDK_DLL void FBTraceWithLevel( unsigned int pLevel, const char* pFormatString, ... );
01708 
01710     typedef void (*FBTraceStubFct)(unsigned int pLevel, const char *pStr);
01711 
01716     FBSDK_DLL   bool FBRegisterTraceStubFct(FBTraceStubFct pFct);
01717 
01722     FBSDK_DLL   bool FBUnRegisterTraceStubFct(FBTraceStubFct pFct);
01723 
01741     FBSDK_DLL void FBObjectLifeLogEnable(bool pEnable);
01742     
01747     FBSDK_DLL unsigned int  FBObjectGetGlobalUniqueId();
01748 
01753     FBSDK_DLL void FBObjectPrintLivings(unsigned int pStartUniqueId);
01754 
01757     FBSDK_DLL unsigned int  FBObjectGetLivingCount();
01758 
01769     FBSDK_DLL void FBMakeFullPath( FBString &pFullPath, const char *pRootPath, const char *pFilePath );
01770 
01773     class FBSDK_DLL FBVisitDirectoryCallback
01774     {
01775     public:
01776         virtual ~FBVisitDirectoryCallback();
01777         virtual void FileVisited(const char*  pSrc) const;
01778         virtual void DirectoryVisited(const char*  pSrc) const;
01779         bool DoIt( const char* pSrcPath, bool pRecursive ) const;
01780     };
01781 
01782 #if !defined(K_NO_UI)
01783 
01788     FBSDK_DLL bool FBPopNormalTool( const char* pToolName, bool pSetFocus = true );
01789 
01790 #endif
01791 
01792 #ifdef FBSDKUseNamespace
01793 }
01794 #endif
01795 #endif
01796