Open Reality Reference Guide
fbfbxoptions.h
1#ifndef __FBFBXOPTIONS_H__
2#define __FBFBXOPTIONS_H__
3/**************************************************************************
4 Copyright (c) 1994 - 2009 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
47#include <kaydaradef.h>
48#ifndef FBSDK_DLL
52 #define FBSDK_DLL K_DLLIMPORT
53#endif
54
55#include <fbsdk/fbcomponent.h>
56
57#ifdef FBSDKUseNamespace
58 namespace FBSDKNamespace {
59#endif
60
61
63
66enum FBElementAction {
67 kFBElementActionSave ,
68 kFBElementActionAppend ,
69 kFBElementActionMerge ,
70 kFBElementActionDiscard,
71};
72FB_DEFINE_ENUM( FBSDK_DLL, ElementAction ); // FBPropertyElementAction
73
76enum FBTakeSpanOnLoad {
77 kFBLeaveAsIs ,
78 kFBImportFromFile,
79 kFBFrameAnimation,
80};
81FB_DEFINE_ENUM( FBSDK_DLL, TakeSpanOnLoad ); // FBPropertyTakeSpanOnLoad
82
85enum FBCharacterLoadAnimationMethod {
86 kFBCharacterLoadConnect ,
87 kFBCharacterLoadCopy ,
88 kFBCharacterLoadRetarget ,
89 kFBCharacterLoadPlotIfSampled ,
90 kFBCharacterLoadPlot
91};
92FB_DEFINE_ENUM(FBSDK_DLL, CharacterLoadAnimationMethod);
93
95enum FBModelSelection {
96 kFBNone,
97 kFBCreateModels,
98 kFBSelectedModels,
99 kFBSelectedModelAndChildren,
100 kFBPrefixGroupContainingModel,
101 kFBInHierarchy,
102 kFBAllModels,
103};
104FB_DEFINE_ENUM(FBSDK_DLL, ModelSelection); // FBPropertyModelSelection
105
106enum FBFileFormatAndVersion
107{
108 kFBFBX2010,
109 kFBFBX2011,
110 kFBFBX2012,
111 kFBFBX2013,
112 kFBFBX2014_2015,
113 kFBFBX2016,
114 kFBFBX2018,
115 kFBFBX2019,
116 kFBFBX2020,
117 kFBDefaultFormatAndVersion = kFBFBX2020
118};
119FB_DEFINE_ENUM(FBSDK_DLL, FileFormatAndVersion);
120
122
124enum FBOptionsContext {
125 kFBOptionsContextSave ,
126 kFBOptionsContextSaveSelection ,
127 kFBOptionsContextLoad ,
128 kFBOptionsContextMultiLoad ,
129 kFBOptionsContextMerge,
130};
131
133
137public:
145 FBFbxOptions( bool pLoad, const char * pFilePathToLoad = NULL, HIObject pObject = NULL);
146
152 void SetAll( FBElementAction pElementAction, bool pAnimation );
153
159 void SaveToString(FBString& pString, FBOptionsContext context );
160
166 void SetFromString( const char* pString, FBOptionsContext context );
167
173
178 FBPropertyTakeSpanOnLoad TakeSpan;
180
181
187 FBPropertyFileFormatAndVersion FileFormatAndVersion;
197
198
208
216
223
227 FBPropertyElementAction Actors;
228 FBPropertyElementAction ActorFaces;
229 FBPropertyElementAction Audio;
230 FBPropertyElementAction Bones;
231 FBPropertyElementAction Cameras;
232 FBPropertyElementAction Characters;
233 FBPropertyElementAction CharacterFaces;
234 FBPropertyElementAction CharacterExtensions;
235 FBPropertyElementAction Constraints;
236 FBPropertyElementAction Devices;
237 FBPropertyElementAction FileReferences;
238 FBPropertyElementAction Groups;
239 FBPropertyElementAction KeyingGroups;
240 FBPropertyElementAction Lights;
241 FBPropertyElementAction Materials;
242 FBPropertyElementAction Models;
243 FBPropertyElementAction Notes;
244 FBPropertyElementAction OpticalData;
245 FBPropertyElementAction PhysicalProperties;
246 FBPropertyElementAction Poses;
247 FBPropertyElementAction Scripts;
248 FBPropertyElementAction Sets;
249 FBPropertyElementAction Shaders;
250 FBPropertyElementAction Solvers;
251 FBPropertyElementAction Story;
252 FBPropertyElementAction Textures;
253 FBPropertyElementAction Video;
255
256
278
287
288
289
293 FBPropertyCharacterLoadAnimationMethod TransferMethod;
303
311
316
320 int GetTakeCount() const;
321
325 bool GetTakeSelect(int pTakeIndex) const;
326
331 void SetTakeSelect(int pTakeIndex, bool pSelect);
332
336 const char* GetTakeName(int pTakeIndex) const;
337
342 void SetTakeName(int pTakeIndex, const char* pName);
343
347 const char* GetTakeDescription(int pTakeIndex) const;
348
353 void SetTakeDescription(int pTakeIndex, const char* pDescription);
354
358 const char* GetTakeDestinationName(int pTakeIndex) const;
359
364 void SetTakeDestinationName(int pTakeIndex, const char* pDestinationName);
366
374
380 void SetTakeKeyRange(int pTakeIndex, FBTimeSpan pKeyTimeSpan);
382
387 void SetNamespaceList(const FBStringList& pNamespaceList);
388
393
394
401
428 void SetMultiLoadNamespaceList( const FBStringList& pMultiLoadNamespaceList );
429
436};
437
438#ifdef FBSDKUseNamespace
439 }
440#endif
441
442#endif
Template class to contain an array of items.
Definition: fbarray.h:78
MotionBuilder SDK base class.
Definition: fbcomponent.h:651
Customize file loading and saving.
Definition: fbfbxoptions.h:135
FBPropertyElementAction Models
Read Write Property: Handling of the Models elements.
Definition: fbfbxoptions.h:242
FBPropertyBool CharacterFacesAnimation
Read Write Property: Handling of the Character Faces animation.
Definition: fbfbxoptions.h:265
FBPropertyBool BaseCameras
Read Write Property: Consider base camera settings.
Definition: fbfbxoptions.h:202
FBPropertyElementAction Shaders
Read Write Property: Handling of the Shaders elements.
Definition: fbfbxoptions.h:249
FBPropertyElementAction Lights
Read Write Property: Handling of the Lights elements.
Definition: fbfbxoptions.h:240
FBPropertyElementAction Notes
Read Write Property: Handling of the Notes elements.
Definition: fbfbxoptions.h:243
void SetObjectsToSave(FBArrayTemplate< FBComponent * > *pObjectsToSave)
Sets the list of objects that will be saved.
FBPropertyBool ReplaceControlSet
Read Write Property: Set to true if the character extensions (and their children) should be saved whe...
Definition: fbfbxoptions.h:295
FBPropertyBool SaveCharacterExtensions
Read Write Property: Set to true if the character extensions (and their children) should be saved whe...
Definition: fbfbxoptions.h:284
FBPropertyInt CompressMinSize
Read Write Property: Indicate if the minimum item size for compressing arrays.
Definition: fbfbxoptions.h:194
FBPropertyElementAction Constraints
Read Write Property: Handling of the Constraints elements.
Definition: fbfbxoptions.h:235
FBTimeSpan GetTakeKeyRange(int pTakeIndex)
Get take key range.
FBPropertyBool PhysicalPropertiesAnimation
Read Write Property: Handling of the Physical Properties animation.
Definition: fbfbxoptions.h:272
FBPropertyInt CompressLevel
Read Write Property: The allowed level range for Compression is [0-9] where 0 equals no compression a...
Definition: fbfbxoptions.h:195
FBPropertyElementAction Poses
Read Write Property: Handling of the Poses elements.
Definition: fbfbxoptions.h:246
void SaveToString(FBString &pString, FBOptionsContext context)
Serialize all options to a string Serialize all options to a string specifying a context.
FBPropertyElementAction KeyingGroups
Read Write Property: Handling of the Keying Groups elements.
Definition: fbfbxoptions.h:239
FBPropertyElementAction Scripts
Read Write Property: Handling of the Scripts elements.
Definition: fbfbxoptions.h:247
const char * GetTakeName(int pTakeIndex) const
Take Original Name.
FBPropertyElementAction Textures
Read Write Property: Handling of the Textures elements.
Definition: fbfbxoptions.h:252
FBPropertyBool ConsiderMuteSolo
Read Write property: Consider the mute/solo settings to identify identical layer when merging.
Definition: fbfbxoptions.h:221
FBPropertyBool CompressArray
Read Write Property: Indicate if the perform compression on the arrays values.
Definition: fbfbxoptions.h:193
FBPropertyBool RemoveConstraintReference
Read Write Property: Set to true if we should remove constraint reference.
Definition: fbfbxoptions.h:298
FBPropertyElementAction ActorFaces
Read Write Property: Handling of the Actor Faces elements.
Definition: fbfbxoptions.h:228
void SetTakeDestinationName(int pTakeIndex, const char *pDestinationName)
Take Destination Name upon save or load.
FBPropertyBool LightsAnimation
Read Write Property: Handling of the Lights animation.
Definition: fbfbxoptions.h:268
FBPropertyBool ProcessAnimationOnExtension
Read Write Property: Set to true if animation on character extensions should also be transferred.
Definition: fbfbxoptions.h:294
FBPropertyCharacterLoadAnimationMethod TransferMethod
Read Write Property: How should the animation should be transfered on the target rig.
Definition: fbfbxoptions.h:293
FBPropertyElementAction Solvers
Read Write Property: Handling of the Solvers elements.
Definition: fbfbxoptions.h:250
FBPropertyElementAction Devices
Read Write Property: Handling of the Devices elements.
Definition: fbfbxoptions.h:236
FBPropertyBool ModelsAnimation
Read Write Property: Handling of the Models animation.
Definition: fbfbxoptions.h:270
FBPropertyBool StoryAnimation
Read Write Property: Handling of the Story animation (animatable properties on story objects).
Definition: fbfbxoptions.h:275
FBPropertyBool UpdateRecentFiles
Read Write Property: Set to true to update recent file list.
Definition: fbfbxoptions.h:172
FBPropertyBool ConstraintsAnimation
Read Write Property: Handling of the Constraints animation.
Definition: fbfbxoptions.h:266
FBPropertyBool ResetDOF
Read Write Property: Set to true if we should change the limits on the target rig.
Definition: fbfbxoptions.h:296
FBPropertyElementAction Bones
Read Write Property: Handling of the Bones elements.
Definition: fbfbxoptions.h:230
void SetNamespaceList(const FBStringList &pNamespaceList)
SetNamespaceList upon save or load On Load, if the SetMultiLoadNamespaceList method is also called,...
void SetFromString(const char *pString, FBOptionsContext context)
Set all options from string Set all parameters from a formatted string (previously serialized with Sa...
void SetAll(FBElementAction pElementAction, bool pAnimation)
Set All Options.
FBPropertyBool IgnoreConflicts
Read Write Property: Set to true to ignore conflicts between objects in character extensions and obje...
Definition: fbfbxoptions.h:301
const char * GetTakeDescription(int pTakeIndex) const
Take Description.
FBPropertyBool TransportSettings
Read Write Property: Consider transport control settings.
Definition: fbfbxoptions.h:206
FBPropertyElementAction Story
Read Write Property: Handling of the Story elements.
Definition: fbfbxoptions.h:251
FBPropertyBool TexturesAnimation
Read Write Property: Handling of the Textures animation.
Definition: fbfbxoptions.h:276
FBPropertyBool ActorFacesAnimation
Read Write Property: Handling of the Actor Faces animation.
Definition: fbfbxoptions.h:261
FBStringList GetNamespaceList()
GetNamespaceList upon save or load.
void SetTakeDescription(int pTakeIndex, const char *pDescription)
Take Description.
FBPropertyElementAction Actors
Read Write Property: Handling of the Actors elements.
Definition: fbfbxoptions.h:227
FBPropertyBool UseASCIIFormat
Read Write Property: Indicate if the resulting FBX file will be in binary or ASCII mode.
Definition: fbfbxoptions.h:191
FBPropertyBool SaveCharacter
Read Write Property: Set to true if the character should be saved when call FBApplication::SaveCharac...
Definition: fbfbxoptions.h:282
FBPropertyBool SaveControlSet
Read Write Property: Set to true if the rig (and its children) should be saved when call FBApplicatio...
Definition: fbfbxoptions.h:283
FBPropertyElementAction PhysicalProperties
Read Write Property: Handling of the Physical Properties elements.
Definition: fbfbxoptions.h:245
FBPropertyBool ResetHierarchy
Read Write Property: Set to true if we should reset the character hierarchy.
Definition: fbfbxoptions.h:297
bool GetTakeSelect(int pTakeIndex) const
Return if true if the take will be saved or Loaded.
FBStringList GetMultiLoadNamespaceList()
Returns the list of namespaces that will be used when merging multiple scenes (see FBApplication::Fil...
FBPropertyBool GlobalLightingSettings
Read Write Property: Consider global Lighting settings.
Definition: fbfbxoptions.h:205
FBPropertyElementAction OpticalData
Read Write Property: Handling of the Optical Data elements.
Definition: fbfbxoptions.h:244
FBPropertyBool ShowFileDialog
Read Write Property: Set to true if want to pop up dialog for FileName, Format, Embed,...
Definition: fbfbxoptions.h:307
FBPropertyElementAction Materials
Read Write Property: Handling of the Materials elements.
Definition: fbfbxoptions.h:241
FBPropertyBool SaveSelectedModelsOnly
Read Write Property: Indicate that only the selected models will be saved.
Definition: fbfbxoptions.h:189
FBPropertyBool BonesAnimation
Read Write Property: Handling of the Bones animation.
Definition: fbfbxoptions.h:262
FBPropertyBool CurrentCameraSettings
Read Write Property: Consider current camera settings.
Definition: fbfbxoptions.h:204
const char * GetTakeDestinationName(int pTakeIndex) const
Take Destination Name upon save or load.
FBPropertyBool RetargetOnBaseLayer
Read Write Property: If the transfer method is retarget, set this parameter to control where the reta...
Definition: fbfbxoptions.h:300
void SetTakeSelect(int pTakeIndex, bool pSelect)
Return if true if the take will be saved or Loaded.
FBPropertyElementAction Audio
Read Write Property: Handling of the Audio elements.
Definition: fbfbxoptions.h:229
FBPropertyBool ShowOptionsDialog
Read Write Property: Set to true if want to pop up options dialog for detail settings.
Definition: fbfbxoptions.h:308
FBPropertyBool NotesAnimation
Read Write Property: Handling of the Notes animation.
Definition: fbfbxoptions.h:271
FBPropertyBool CharactersAnimation
Read Write Property: Handling of the Characters animation.
Definition: fbfbxoptions.h:264
FBPropertyInt CacheSize
Read Write Property: The Cached buffer size used to accelerate IO system.
Definition: fbfbxoptions.h:192
FBPropertyBool FileReference
Read Write property: Load/Save scene as FileReference.
Definition: fbfbxoptions.h:212
FBPropertyBool EmbedMedia
Read Write Property: Embed all media in the FBX file itself. When saving in ASCII mode it is not poss...
Definition: fbfbxoptions.h:188
FBPropertyElementAction Cameras
Read Write Property: Handling of the Cameras elements.
Definition: fbfbxoptions.h:231
FBPropertyString NamespaceList
Read Write Property: A list of namespaces separated by '~'. On Load, duplicate the loaded objects int...
Definition: fbfbxoptions.h:214
FBPropertyBool MaterialsAnimation
Read Write Property: Handling of the Materials animation.
Definition: fbfbxoptions.h:269
FBPropertyTakeSpanOnLoad TakeSpan
Read Write Property: Indicate how the take start and end point should be set. By default it is read f...
Definition: fbfbxoptions.h:178
FBPropertyBool SolversAnimation
Read Write Property: Handling of the Solvers animation.
Definition: fbfbxoptions.h:274
FBPropertyBool RemoveEmptyLayer
Read Write property: Remove empty animation layers that are in additive mode, without child or parent...
Definition: fbfbxoptions.h:220
FBPropertyBool ClearSelectionBeforeSave
Read Write Property: Set to true if the current selected objects shouldn't saved when call FBApplicat...
Definition: fbfbxoptions.h:285
FBPropertyBool CopyCharacterExtensions
Read Write Property: pCopyMissingExtensions Set to true if the character extensions on the rig in the...
Definition: fbfbxoptions.h:299
FBPropertyElementAction CharacterExtensions
Read Write Property: Handling of the Character Extensions.
Definition: fbfbxoptions.h:234
void SetTakeName(int pTakeIndex, const char *pName)
Take Original Name.
FBPropertyBool CameraSwitcherSettings
Read Write Property: Consider camera switcher settings.
Definition: fbfbxoptions.h:203
FBPropertyBool SetPropertyStaticIfPossible
Read Write Property: Set to false if want to keep properties' animated flag even when they are not re...
Definition: fbfbxoptions.h:309
FBPropertyElementAction FileReferences
Read Write Property: Handling of the FileReferences elements.
Definition: fbfbxoptions.h:237
FBPropertyElementAction Characters
Read Write Property: Handling of the Characters elements.
Definition: fbfbxoptions.h:232
FBPropertyElementAction Sets
Read Write Property: Handling of the Sets elements.
Definition: fbfbxoptions.h:248
FBPropertyBool CamerasAnimation
Read Write Property: Handling of the Cameras animation.
Definition: fbfbxoptions.h:263
int GetTakeCount() const
Return the count of takes in the scene to saved or the file to loaded.
FBPropertyElementAction CharacterFaces
Read Write Property: Handling of the Character Faces elements.
Definition: fbfbxoptions.h:233
FBPropertyBool DevicesAnimation
Read Write Property: Handling of the Devices animation.
Definition: fbfbxoptions.h:267
FBPropertyBool KeepTransformHierarchy
Read Write Property: Indicate whether we keep transform hierarchy when SaveSelectedModelsOnly is true...
Definition: fbfbxoptions.h:190
void SetMultiLoadNamespaceList(const FBStringList &pMultiLoadNamespaceList)
Sets the list of namespaces that will be used when merging multiple scenes (see FBApplication::FileMe...
FBPropertyElementAction Video
Read Write Property: Handling of the Video elements.
Definition: fbfbxoptions.h:253
FBPropertyElementAction Groups
Read Write Property: Handling of the Groups elements.
Definition: fbfbxoptions.h:238
FBPropertyBool ShadersAnimation
Read Write Property: Handling of the Shaders animation.
Definition: fbfbxoptions.h:273
FBPropertyFileFormatAndVersion FileFormatAndVersion
Read Write Property: File format and version chosen to save the scene.
Definition: fbfbxoptions.h:187
FBPropertyBool FileReferenceEdit
Read Write Property: Load/Save the edits made to referenced objects or not.
Definition: fbfbxoptions.h:213
void SetTakeKeyRange(int pTakeIndex, FBTimeSpan pKeyTimeSpan)
Set take key range.
FBFbxOptions(bool pLoad, const char *pFilePathToLoad=NULL, HIObject pObject=NULL)
Constructor.
Property class: const char * (String).
Basic string class.
Definition: fbstring.h:67
String list.
Definition: fbstring.h:208
TimeSpan class.
Definition: fbtime.h:410
Basic class definitions.
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:131
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
class K_DLLIMPORT FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
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.
Definition: fbproperties.h:150
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68