1 #ifndef __FBPAPPLICATION_H__
2 #define __FBPAPPLICATION_H__
43 #include <kaydaradef.h>
48 #define FBSDK_DLL K_DLLIMPORT
54 #ifdef FBSDKUseNamespace
55 namespace FBSDKNamespace {;
103 kFBBatchStatusSuccess,
105 kFBBatchStatusCharacterNotSpecified,
106 kFBBatchStatusCharacterNotCharacterized,
107 kFBBatchStatusCharacterHasNoReference,
108 kFBBatchStatusInputActorNotSpecified,
109 kFBBatchStatusActorInputMarkersetNotSpecified,
110 kFBBatchStatusActorInputMarkersetHasNoReferenceModel,
111 kFBBatchStatusActorInputMarkersetNotCorrectlyAssociated,
112 kFBBatchStatusInputCharacterNotCharacterized,
113 kFBBatchStatusInputCharacterHasNoReference,
114 kFBBatchStatusInputDirectoryNotValid,
115 kFBBatchStatusAsfSkeletonFileNotSpecified,
116 kFBBatchStatusCantOpenAsfSkeletonFile,
117 kFBBatchStatusOutputDirectoryNotValid
138 #if !defined(K_NO_CHARACTER)
167 kFBRotationFilterNone,
168 kFBRotationFilterGimbleKiller,
169 kFBRotationFilterUnroll
176 kFBPlotTangentModeSmooth,
177 kFBPlotTangentModeSmoothClamp,
178 kFBPlotTangentModeSpline,
179 kFBPlotTangentModeSplineClamp,
180 kFBPlotTangentModeAuto
207 #if !defined(K_NO_AUDIO)
233 #if !defined(K_NO_CHARACTER)
236 #if !defined(K_NO_ACTOR)
239 #if !defined(K_NO_CHARACTER)
242 #if !defined(K_NO_ACTOR)
255 #if !defined(K_NO_ONECLICK)
303 virtual void Add ( HICallback pOwner, kICallbackHandler pHandler );
304 virtual void Remove ( HICallback pOwner, kICallbackHandler pHandler );
368 bool FileNew(
bool pAskUser =
false,
bool pClearSceneName =
true);
386 bool FileOpen(
void* pBuffer, kULong pBufferLength );
396 bool GetMaxFrameCount(
void* pBuffer, kULong pBufferLength, kLong* pFrameCount,
int pTimeScale);
449 void FileExit(
bool pSave =
false,
int pExitCode = 0);
466 bool FileImport(
FBString pFilename,
bool pMatchModels =
false,
bool pCreateUnmatchedModels =
true );
520 #if !defined(K_NO_CHARACTER)
546 #if !defined(K_NO_ONECLICK)
582 #if !defined(K_NO_AUDIO)
600 #if !defined(K_NO_ACTOR)
603 #if !defined(K_NO_CHARACTER)
766 #ifdef FBSDKUseNamespace
FBActor is used to link motion data to a character.
FBApplication is used mainly to manage files.
bool FileExport(FBString pFilename)
Export a motion file.
bool FileMerge(const char *pFilename, bool pShowUIMsg=false, FBFbxOptions *pOptions=NULL)
Merge one or multiple files with the current scene.
FBPropertyEvent OnFileOpenCompleted
Event: A File Open has been completed.
bool GetMaxFrameCount(void *pBuffer, kULong pBufferLength, kLong *pFrameCount, int pTimeScale)
Get max frame count from a scene file in memory.
bool OneClickUpdateCurrentScene()
Send the scene to update the current scene in the specified application.
FBPropertyString FBXFileName
Read Write Property: Current scene filename.
bool FileMerge(FBStringList &pPathlist, bool pShowUIMsg=false, FBFbxOptions *pOptions=NULL)
Merge multiple files with the current scene.
static FBApplication & TheOne()
Get the global object for this class.
bool OneClickSendAsNewScene(FBOneClickApplication pApplication)
Send the current scene as a new scene in the specified application.
const char * GetSceneTitle()
Return the scene title from the scene properties.
FBPropertyEvent OnFileSaveCompleted
Event: A File Save has been completed.
void SetSceneTitle(const char *pTitle)
Set the scene title.
bool FileOpen(const char *pFilename, bool pShowUIMsg=false, FBFbxOptions *pOptions=NULL)
Open a file, replacing the current scene.
FBPropertyEvent OnFileMerge
Event: A File Merge has been requested, nothing has been loaded yet.
FBPropertyEventOverrideFileOpen OnOverrideFileOpen
Event: Called when a file is about to be opened/merged. The user can override the process with his ow...
FBPropertyEvent OnFileSave
Event: A File Save has been requested, nothing has been saved yet.
const char * GetSceneAuthor()
Return the scene author from the scene properties.
FBPropertyApplicationState ApplicationState
Read Only Property: State the MotionBuilder application has been started in.
void SetSceneKeywords(const char *pKeywords)
Set the scene keywords.
bool OneClickAddToCurrentScene()
Send the scene and add it to the current scene in the specified application.
bool FileImportWithOptions(FBMotionFileOptions *pOptions)
Import a motion file with the ability to specify options.
FBPropertyCharacter CurrentCharacter
Read Write Property: Indicate the current character, as used by the character tool....
bool IsSceneModified()
Is the scene modified since last save / new scene creation?
bool SaveCharacterRigAndAnimation(const char *pFileName, FBCharacter *pCharacter, FBFbxOptions *pFbxOptions)
Save the rig and its animation in a file.
void UpdateAllWidgets()
Request to refresh display of all UI widgets.
void SetSceneComment(const char *pComment)
Set the scene comment.
bool Minimize(bool pBlocking=true)
Minimize window.
void FileExit(bool pSave=false, int pExitCode=0)
Quit application.
bool Maximize()
Maximize window (minimized).
bool FileRender(FBVideoGrabOptions *pRenderOptions=NULL)
Render current scene to media file.
const char * GetSceneKeywords()
Return the scene keywords from the scene properties.
bool AudioRender(FBAudioRenderOptions *pAudioRenderOptions=NULL)
Render audio of current scene to media file, currently WAV file only.
FBApplication(HIObject pObject=NULL)
Constructor.
FBPropertyEvent OnFileNew
Event: A File New has been requested, nothing has been destroyed yet.
FBOneClickApplication OneClickIsConnectedTo()
Return the other application that MotionBuilder is connected to.
FBBatchStatus FileBatch(FBBatchOptions *pBatchOptions, FBPlotOptions *pPlotOptions=NULL)
Start a batch.
const char * GetSceneRevisionNumber()
Return the scene revision number from the scene properties.
bool FileExportBatch(const char *pName, FBTake *pTake, FBBatchOptions *pBatchOptions, FBModelList &pExportModels)
Export a motion file using batch options.
bool FileImportBatch(const char *pName, FBBatchOptions *pBatchOptions, FBModel *pReference)
Import a motion file using batch options.
void OneClickSelectPreviouslySentObject()
Select, in MotionBuilder, the object that were sent.
bool FileSave(const char *pFilename=NULL, FBFbxOptions *pOptions=NULL)
Save the file under another name.
FBPropertyEvent OnFileOpen
Event: A File Open has been requested, nothing has been loaded yet.
bool FileOpen(void *pBuffer, kULong pBufferLength)
Open a file from memory.
const char * GetSceneSubject()
Return the scene subject from the scene properties.
bool FileAppend(const char *pFilename, bool pShowUIMsg=false, FBFbxOptions *pOptions=NULL)
Append one or multiple files to the current scene.
void SetSceneRevisionNumber(const char *pRevNumber)
Set the scene revision number.
FBPropertyActor CurrentActor
Read Write Property: Indicate the current actor, as used by the character tool. Can be NULL....
bool ExecuteScript(FBString pFilename)
Execute a python script file.
bool FileImport(FBString pFilename, bool pMatchModels=false, bool pCreateUnmatchedModels=true)
Import a motion file.
FBPropertyEvent OnFileNewCompleted
Event: A File New has been completed.
void FlushEventQueue()
Flush event queue.
void SetSceneSubject(const char *pSubject)
Set the scene subject.
bool IsValidBatchFile(const char *pFilename)
Verify motion file readability.
FBPropertyEvent OnFileExit
Event: A File Exit as been requested, nothing has been destroyed yet.
bool LoadAnimationOnCharacter(const char *pFileName, FBCharacter *pCharacter, FBFbxOptions *pFbxOptions, FBPlotOptions *pPlotOptions)
Load a rig and its animation from a file.
const char * GetSceneComment()
Return the scene comment from the scene properties.
void SetSceneAuthor(const char *pAuthor)
Set the scene author.
bool FileNew(bool pAskUser=false, bool pClearSceneName=true)
Command File->New in the menus.
Audio Render Options structure.
FBString OutputFileName
Property: Audio Render destination file.
FBTimeSpan TimeSpan
Property: Start and stop selection time to render.
FBAudioRateMode RateMode
Property: Rate mode for number of samples per second. 44100 hz default,8000, 11025,...
FBAudioRenderOptions()
Constructor.
FBAudioChannelMode ChannelMode
Property: Audio render channel number, 1 for Mono(left channel right channel render mixed to one chan...
FBAudioBitDepthMode BitDepthMode
Property: Bit depth for one sample of audio. 8, 16 and 24 bits available for audio render,...
Option parameters for the batch process.
bool mWriteRate
Write frame rate in Acclaim AMC files.
bool mKeepCharacterConstraint
To keep the character constaint when saving.
bool mPlotToCharacter
To plot the animation on the character.
bool mWriteTranslation
Write translation animation data included with Acclaim AMC files.
bool mFrameAnimation
Set timeline start and end time to corespond with the start and end of animation.
FBString mOutputDirectory
The directory containning the output files.
FBString mInputDirectory
The directory containning the input files.
FBCharacter * mCharacter
The character to receive the animation.
bool mOverwriteScaling
Set the scaling to a default setting of 1.0.
bool mStartAnimationAtZero
Set the time of all loaded files to 0.
bool mUseSingleTake
Use only one take to convert all files.
FBBatchProcessType mProcessType
What process should be done? Load, Save or Both.
FBString mSkeletonFile
The Skeleton file (for Acclaim AMC files).
FBBatchOnTakeExist mOnTakeExistAction
Action to perform when a take already exist while in a batch process.
FBBatchFileFormat mOutputFileFormat
File format of the output files.
FBBatchFileFormat mInputFileFormat
File format of the input files.
bool mKeepDummyBones
To keep dummy bones.
FBBatchOnContainsBatchTakes mOnContainsBatchTakesAction
Action to perform when a scene already contains batch takes while in a batch process.
bool mUseBatchSuffix
Add a batch suffix to the name of the files.
FBBatchOptions()
Constructor.
bool mPlotToControlSet
To plot the animation on the control set.
A character is the link between a motion source and a character model.
MotionBuilder SDK base class.
Event that is called before a file open/merge.
FBPropertyBool WillOverride
Read Write Property: Set to true for handling the file load, false by default. If the return value is...
FBPropertyString FilePath
Read Only Property: Path to the file that will be opened/merged.
FBEventOverrideFileOpen(HKEventBase pEvent)
Constructor.
Customize file loading and saving.
Customize motion file loading.
Option parameters for plotting.
FBRotationFilter mRotationFilterToApply
The rotation filter to apply.
bool mEvaluateDeformation
Should we evaluate deformation while plotting? This is useful when there is a dependency with the def...
bool mPlotAllTakes
Should we plot all takes?
bool mPlotTranslationOnRootOnly
Should we plot the translation on root only?
bool mPreciseTimeDiscontinuities
Should we use precise time discontinuities?
bool mPlotAuxEffectors
Should we plot aux effectors?
bool mPlotLockedProperties
Should we plot locked properties?
bool mConstantKeyReducerKeepOneKey
Should the constant key reducer keep at least one key?
FBPlotTangentMode mPlotTangentMode
The tangent mode for plotted curve.
bool mPlotOnFrame
Should we plot on frame?
FBTime mPlotPeriod
The plot period (1/fps).
FBPlotOptions()
Constructor.
bool mUseConstantKeyReducer
Should we use a constant key reducer with the filter?
PropertyEvent: Base event class.
PropertyEvent: Event when a file is about to be opened/merged.
virtual void Add(HICallback pOwner, kICallbackHandler pHandler)
Add/Remove a callback.
Property class: const char * (String).
A take is a container for animation in a scene.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
FBBatchStatus
Different return values of the Batch process.
FBBatchOnContainsBatchTakes
Different actions to perform when a scene already contains batch takes while in a batch process.
@ kFBBatchOnContainsBatchTakesSaveAllTakes
Save all the takes.
@ kFBBatchOnContainsBatchTakesSaveBatchTakesOnly
Save only the batch takes.
FBRotationFilter
Rotation filters.
FBViewerMode
Different viewer modes for the 3D viewer.
@ kFBViewerModeThreeWindow
View three panes.
@ kFBViewerModeOneWindow
View one pane.
@ kFBViewerModeFourWindow
View four panes.
@ kFBViewerModeTwoWindow
View two panes.
@ kFBViewerModeSchematic
Schematic view.
FBApplicationState
Application state the MotionBuilder application has been started in.
@ kFBBatch
Running in a batch mode, without the UI, i.e.: when starting MotionBuilder from the command line with...
@ kFBInteractive
Running in an interactive mode with the UI. Default mode.
@ kFBMobuPy
Running via the mobupy executable.
FBBatchOnTakeExist
Different actions to perform when a take already exist while in a batch process.
@ kFBBatchOnTakeExistOverwrite
Overwrite the take.
@ kFBBatchOnTakeExistSkip
Skip the take.
FBBatchProcessType
Different process type for the batch.
@ kFBBatchProcessTypeLoad
Load the files and plot the character with every take.
@ kFBBatchProcessTypeSave
Save the takes in different files.
@ kFBBatchProcessTypeConvert
Does the load and save.
FBPlotTangentMode
The tangent mode for plotted curve.
FBOneClickApplication
Possible application for One-Click interop with MotionBuilder.
@ kFBOneClickSoftimage
Softimage.
@ kFBOneClick3dsMax
3ds Max.
@ kFBOneClickNone
No application.
FBBatchFileFormat
Different file formats for the batch.
@ kFBBatchFileFormatAMC
File format for Acclaim AMC.
@ kFBBatchFileFormatHTR
File format for Motion Analysis HTR.
@ kFBBatchFileFormatTRC
File format for Motion Analysis TRC.
@ kFBBatchFileFormatBVH
File format for Biovision BVH.
@ kFBBatchFileFormatFBX
File format for FBX (animation only).
@ kFBBatchFileFormatC3D
File format for Vicon C3D.
FBAudioBitDepthMode
Enum FBAudioBitDepthMode.
FBAudioChannelMode
Enum FBAudioChannelMode.
FBAudioRateMode
Enum FBAudioRateMode.
class K_DLLIMPORT FBArrayTemplate< FBModel * > FBModelList
typedef class FBSDK_DLL FBArrayTemplate<FBModel*> FBModelList;
#define __FBClassDeclare(Name, Parent)
For internal use only.
FB_DEFINE_COMPONENT(K_DLLIMPORT, AnimationNode)
Animation node class.
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
K_DLLIMPORT void FBMergeTransactionBegin()
Call to begin the transaction for merging multiple files.
K_DLLIMPORT bool FBMergeTransactionIsOn()
Call to tell if system is during Merge transaction.
K_DLLIMPORT void FBMergeTransactionFileRefEditBegin()
Call to begin the transaction for merging multiple files and applying File Reference edit at the same...
FBConstantKeyReducerThresholdType
Different threshold types for the Constant Key Reducer filter.
K_DLLIMPORT double FBGetConstantKeyReducerThresholdValue(FBConstantKeyReducerThresholdType pThresholdType)
Return a specific threshold value used by the Constant Key Reducer filter.
K_DLLIMPORT void FBMergeTransactionEnd()
Call to end the merge transaction.
K_DLLIMPORT bool FBMergeTransactionFileRefEditIsOn()
Call to tell if system is during File Reference Edit Merge transaction.
K_DLLIMPORT void FBMergeTransactionFileRefEditEnd()
Call to end merge transaction with File Reference edit.
K_DLLIMPORT void FBPreventUIUpdateEnd()
Call to end blocking the UI updates.
K_DLLIMPORT void FBPreventUIUpdateBegin()
Call to prevent UI updates when creating/deleting/renaming objects.
K_DLLIMPORT void FBSetConstantKeyReducerThresholdValue(FBConstantKeyReducerThresholdType pThresholdType, double pValue)
Set a specific threshold value used by the Constant Key Reducer filter.
K_DLLIMPORT bool FBPreventUIUpdateIsOn()
Call to tell if UI updates are blocked.
@ kFBTranslationThreshold
Translation threshold.
@ kFBRotationThreshold
Rotation threshold.
@ kFBDefaultThreshold
All other curves threshold.
@ kFBScalingThreshold
Scaling threshold.
Video Grabbing Options structure.