Customize file loading and saving. More...
#include <pyfbsdk_generated.h>
Public Member Functions | |
FBFbxOptions (bool pLoad, str pFilePathToLoad=None) | |
Constructor. | |
FBStringList | GetMultiLoadNamespaceList () |
Returns the list of namespaces that will be used when merging multiple scenes (see FBApplication::FileMerge). | |
int | GetTakeCount () |
Return the count of takes in the scene to saved or the file to loaded. | |
str | GetTakeDescription (int pTakeIndex) |
Take Description. | |
str | GetTakeDestinationName (int pTakeIndex) |
Take Destination Name upon save or load. | |
FBTimeSpan | GetTakeKeyRange (int pTakeIndex) |
Get take key range. | |
str | GetTakeName (int pTakeIndex) |
Take Original Name. | |
bool | GetTakeSelect (int pTakeIndex) |
Return if true if the take will be saved or Loaded. | |
SaveToString (str pString, FBOptionsContext context) | |
Serialize all options to a string Serialize all options to a string specifying a context. | |
SetAll (FBElementAction pElementAction, bool pAnimation) | |
Set All Options. | |
SetFromString (str pString, FBOptionsContext context) | |
Set all options from string Set all parameters from a formatted string (previously serialized with SaveToString) | |
SetMultiLoadNamespaceList (FBStringList pMultiLoadNamespaceList) | |
Sets the list of namespaces that will be used when merging multiple scenes (see FBApplication::FileMerge). | |
SetObjectsToSave (FBArrayTemplate< FBComponent > pObjectsToSave) | |
Sets the list of objects that will be saved. | |
SetTakeDescription (int pTakeIndex, str pDescription) | |
Take Description. | |
SetTakeDestinationName (int pTakeIndex, str pDestinationName) | |
Take Destination Name upon save or load. | |
SetTakeKeyRange (int pTakeIndex, FBTimeSpan pKeyTimeSpan) | |
Set take key range. | |
SetTakeName (int pTakeIndex, str pName) | |
Take Original Name. | |
SetTakeSelect (int pTakeIndex, bool pSelect) | |
Return if true if the take will be saved or Loaded. | |
![]() | |
FBComponent () | |
Constructor. | |
str | ClassName () |
Get the class name. | |
DisableObjectFlags (FBObjectFlag pFlags) | |
Disable a specific Object Flags. | |
EnableObjectFlags (FBObjectFlag pFlags) | |
Enable a specific Object Flags. | |
bool | FBCreate () |
Open Reality Creation function. | |
FBDelete () | |
Open Reality deletion function. | |
FBDestroy () | |
Open Reality destruction function. | |
FBObjectFlag | GetObjectFlags () |
Get all Object Flags (concatenated). | |
bool | GetObjectStatus (FBObjectStatus pStatus) |
Check to see if an object status is enabled. | |
FBFileReference | GetOwnerFileReference (p0) |
Get the owner FileReference object. | |
HardSelect () | |
HardSelect. | |
bool | HasObjectFlags (FBObjectFlag pFlags) |
Check whether a specific object flag is enabled. | |
bool | Is (int pTypeId) |
Returns true if object is of type TypeId. | |
bool | ProcessNamespaceHierarchy (FBNamespaceAction pNamespaceAction, str pNamespaceName, str pReplaceTo=None, bool pAddRight=True) |
ProcessNamespaceHierarchy. | |
bool | ProcessObjectNamespace (FBNamespaceAction pNamespaceAction, str pNamespaceName, str pReplaceTo=None, bool pAddRight=True) |
ProcessObjectNamespace. | |
int | PropertyAdd (FBProperty pProperty) |
Add a property to the component's property manager. | |
bool | PropertyAddReferenceProperty (FBProperty pReferenceProperty) |
Add a reference property to the component's property manager. | |
FBProperty | PropertyCreate (str pName, FBType pType, str pDataType, bool pAnimatable, bool pIsUser=False, FBProperty pReferenceSource=None) |
Create user or dynamic property. | |
PropertyGetModifiedList (FBArrayTemplate< FB > pPropList, FBPlugModificationFlag pModificationFlags) | |
Get list of properties which have been modified since last loading. | |
PropertyRemove (FBProperty pProperty) | |
Remove a Property from the component's Property manager. | |
SetObjectFlags (FBObjectFlag pFlags) | |
SetObjectFlags. | |
SetObjectStatus (FBObjectStatus pStatus, bool pValue) | |
Enable/Disable a specific Object Status. | |
Public Attributes | |
FBElementAction | ActorFaces |
Read Write Property: Handling of the Actor Faces elements. | |
bool | ActorFacesAnimation |
Read Write Property: Handling of the Actor Faces animation. | |
FBElementAction | Actors |
Read Write Property: Handling of the Actors elements. | |
FBElementAction | Audio |
Read Write Property: Handling of the Audio elements. | |
bool | BaseCameras |
Read Write Property: Consider base camera settings. | |
FBElementAction | Bones |
Read Write Property: Handling of the Bones elements. | |
bool | BonesAnimation |
Read Write Property: Handling of the Bones animation. | |
int | CacheSize |
Read Write Property: The Cached buffer size used to accelerate IO system. | |
bool | CameraSwitcherSettings |
Read Write Property: Consider camera switcher settings. | |
FBElementAction | Cameras |
Read Write Property: Handling of the Cameras elements. | |
bool | CamerasAnimation |
Read Write Property: Handling of the Cameras animation. | |
FBElementAction | CharacterExtensions |
Read Write Property: Handling of the Character Extensions. | |
FBElementAction | CharacterFaces |
Read Write Property: Handling of the Character Faces elements. | |
bool | CharacterFacesAnimation |
Read Write Property: Handling of the Character Faces animation. | |
FBElementAction | Characters |
Read Write Property: Handling of the Characters elements. | |
bool | CharactersAnimation |
Read Write Property: Handling of the Characters animation. | |
bool | ClearSelectionBeforeSave |
Read Write Property: Set to true if the current selected objects shouldn't saved when call FBApplication::SaveCharacterRigAndAnimation. | |
bool | ConsiderMuteSolo |
Read Write property: Consider the mute/solo settings to identify identical layer when merging. | |
FBElementAction | Constraints |
Read Write Property: Handling of the Constraints elements. | |
bool | ConstraintsAnimation |
Read Write Property: Handling of the Constraints animation. | |
bool | CopyCharacterExtensions |
Read Write Property: pCopyMissingExtensions Set to true if the character extensions on the rig in the file should be copied to the target rig. | |
bool | CurrentCameraSettings |
Read Write Property: Consider current camera settings. | |
FBElementAction | Devices |
Read Write Property: Handling of the Devices elements. | |
bool | DevicesAnimation |
Read Write Property: Handling of the Devices animation. | |
bool | EmbedMedia |
Read Write Property: Embed all media in the FBX file itself. When saving in ASCII mode it is not possible to embed media. | |
FBFileFormatAndVersion | FileFormatAndVersion |
Read Write Property: File format and version chosen to save the scene. | |
bool | FileReference |
Read Write property: Load/Save scene as FileReference. | |
bool | FileReferenceEdit |
Read Write Property: Load/Save the edits made to referenced objects or not. | |
FBElementAction | FileReferences |
Read Write Property: Handling of the FileReferences elements. | |
bool | GlobalLightingSettings |
Read Write Property: Consider global Lighting settings. | |
FBElementAction | Groups |
Read Write Property: Handling of the Groups elements. | |
bool | IgnoreConflicts |
Read Write Property: Set to true to ignore conflicts between objects in character extensions and objects in the scene. Conflicting objects will be merged in the extension | |
bool | KeepTransformHierarchy |
Read Write Property: Indicate whether we keep transform hierarchy when SaveSelectedModelsOnly is true. Default value is false to ensure consistent behavior with SaveSelected operation via file menu. | |
FBElementAction | KeyingGroups |
Read Write Property: Handling of the Keying Groups elements. | |
FBElementAction | Lights |
Read Write Property: Handling of the Lights elements. | |
bool | LightsAnimation |
Read Write Property: Handling of the Lights animation. | |
FBElementAction | Materials |
Read Write Property: Handling of the Materials elements. | |
bool | MaterialsAnimation |
Read Write Property: Handling of the Materials animation. | |
FBElementAction | Models |
Read Write Property: Handling of the Models elements. | |
bool | ModelsAnimation |
Read Write Property: Handling of the Models animation. | |
str | NamespaceList |
Read Write Property: A list of namespaces separated by '~'. On Load, duplicate the loaded objects into each namespace in the list. If the SetMultiLoadNamespaceList method is also called, this property is ignored. | |
FBElementAction | Notes |
Read Write Property: Handling of the Notes elements. | |
bool | NotesAnimation |
Read Write Property: Handling of the Notes animation. | |
FBElementAction | OpticalData |
Read Write Property: Handling of the Optical Data elements. | |
FBElementAction | PhysicalProperties |
Read Write Property: Handling of the Physical Properties elements. | |
bool | PhysicalPropertiesAnimation |
Read Write Property: Handling of the Physical Properties animation. | |
FBElementAction | Poses |
Read Write Property: Handling of the Poses elements. | |
bool | ProcessAnimationOnExtension |
Read Write Property: Set to true if animation on character extensions should also be transferred. | |
bool | RemoveConstraintReference |
Read Write Property: Set to true if we should remove constraint reference. | |
bool | RemoveEmptyLayer |
Read Write property: Remove empty animation layers that are in additive mode, without child or parent. | |
bool | ReplaceControlSet |
Read Write Property: Set to true if the character extensions (and their children) should be saved when call FBApplication::SaveCharacterRigAndAnimation. | |
bool | ResetDOF |
Read Write Property: Set to true if we should change the limits on the target rig. | |
bool | ResetHierarchy |
Read Write Property: Set to true if we should reset the character hierarchy. | |
bool | RetargetOnBaseLayer |
Read Write Property: If the transfer method is retarget, set this parameter to control where the retarget correction will be made (on base layer or on another layer). | |
bool | SaveCharacter |
Read Write Property: Set to true if the character should be saved when call FBApplication::SaveCharacterRigAndAnimation. | |
bool | SaveCharacterExtensions |
Read Write Property: Set to true if the character extensions (and their children) should be saved when call FBApplication::SaveCharacterRigAndAnimation. | |
bool | SaveControlSet |
Read Write Property: Set to true if the rig (and its children) should be saved when call FBApplication::SaveCharacterRigAndAnimation. | |
bool | SaveSelectedModelsOnly |
Read Write Property: Indicate that only the selected models will be saved. | |
FBElementAction | Scripts |
Read Write Property: Handling of the Scripts elements. | |
bool | SetPropertyStaticIfPossible |
Read Write Property: Set to false if want to keep properties' animated flag even when they are not really animated(no keyframe data) while retrieving/storing. See sample: SetPropertyStaticIfPossibleOption.py. | |
FBElementAction | Sets |
Read Write Property: Handling of the Sets elements. | |
FBElementAction | Shaders |
Read Write Property: Handling of the Shaders elements. | |
bool | ShadersAnimation |
Read Write Property: Handling of the Shaders animation. | |
bool | ShowFileDialog |
Read Write Property: Set to true if want to pop up dialog for FileName, Format, Embed, Compression, UseTakeName, OneTakePerFile. | |
bool | ShowOptionsDialog |
Read Write Property: Set to true if want to pop up options dialog for detail settings. | |
FBElementAction | Solvers |
Read Write Property: Handling of the Solvers elements. | |
bool | SolversAnimation |
Read Write Property: Handling of the Solvers animation. | |
FBElementAction | Story |
Read Write Property: Handling of the Story elements. | |
bool | StoryAnimation |
Read Write Property: Handling of the Story animation (animatable properties on story objects). | |
FBTakeSpanOnLoad | TakeSpan |
Read Write Property: Indicate how the take start and end point should be set. By default it is read from the file. | |
FBElementAction | Textures |
Read Write Property: Handling of the Textures elements. | |
bool | TexturesAnimation |
Read Write Property: Handling of the Textures animation. | |
FBCharacterLoadAnimationMethod | TransferMethod |
Read Write Property: How should the animation should be transfered on the target rig. | |
bool | TransportSettings |
Read Write Property: Consider transport control settings. | |
bool | UpdateRecentFiles |
Read Write Property: Set to true to update recent file list. | |
bool | UseASCIIFormat |
Read Write Property: Indicate if the resulting FBX file will be in binary or ASCII mode. | |
FBElementAction | Video |
Read Write Property: Handling of the Video elements. | |
![]() | |
FBListComponent | Components |
List: List of components. | |
str | LongName |
Read Write Property: Name and namespace for object. | |
str | Name |
Read Write Property: Unique name of object. See sample: RemoveSuffixFromNameOfSceneElements.py. | |
FBListComponent | Parents |
List: Parents. | |
FBManager | PropertyList |
Read Only Property: Manages all of the properties for the component. | |
bool | Selected |
Read Write Property: Selected property. | |
int | TypeInfo |
Contains the Type information of the object. | |
![]() | |
str | ClassGroupName |
ClassGroupName of the object. | |
int | TypeInfo |
TypeInfo. | |
Customize file loading and saving.
See samples: FBFbxOptions.py, ImportWithNamespace.py, BatchExportCharacterAnimationTool.py.
FBFbxOptions | ( | bool | pLoad, |
str | pFilePathToLoad = None |
||
) |
Constructor.
Create a FBFbxOption to be used in FBApplication Save/Load with default settings.
pLoad | If true, will init option for a default Load (Append all elements and animation). If false will initialized options for a default Save (Save all elements and animation). |
pFilePathToLoad | If pLoad is true, the client code should pass the file path to load to collect the take info; ignore when pLoad is false. |
FBStringList GetMultiLoadNamespaceList | ( | ) |
Returns the list of namespaces that will be used when merging multiple scenes (see FBApplication::FileMerge).
This list is affecting only the merge operation. When merging multiple scenes, if this list of namespaces is set, the FBFbxOptions::NamespaceList property value is ignored.
int GetTakeCount | ( | ) |
Return the count of takes in the scene to saved or the file to loaded.
Take Description.
pTakeIndex | index of take to get. |
Take Destination Name upon save or load.
pTakeIndex | index of take to get. |
FBTimeSpan GetTakeKeyRange | ( | int | pTakeIndex | ) |
Get take key range.
pTakeIndex | index of take to get. |
Return if true if the take will be saved or Loaded.
pTakeIndex | index of take to get. |
SaveToString | ( | str | pString, |
FBOptionsContext | context | ||
) |
Serialize all options to a string Serialize all options to a string specifying a context.
pString | The string containing all settings, target of serializing |
context | The context to be used when serializing |
SetAll | ( | FBElementAction | pElementAction, |
bool | pAnimation | ||
) |
Set All Options.
Initialize all loading/saving properties to ElementAction and animation specified.
pElementAction | Default value for all FBPropertyElementAction properties. |
pAnimation | Default value for all Animation properties. |
SetFromString | ( | str | pString, |
FBOptionsContext | context | ||
) |
Set all options from string Set all parameters from a formatted string (previously serialized with SaveToString)
pString | The string containing all settings. See SaveToFile |
context | The context to be used when de-serializing |
SetMultiLoadNamespaceList | ( | FBStringList | pMultiLoadNamespaceList | ) |
Sets the list of namespaces that will be used when merging multiple scenes (see FBApplication::FileMerge).
The number of namespaces contained in this list must match the number of files merged, otherwise the merge operation will abort. The first namespace in the list will be applied on the first merged scene, the second namespace in the list will be applied on the second merged scene, and so one and so forth. This list is affecting only the merge operation. When merging multiple scenes, if this list of namespaces is set, the FBFbxOptions::NamespaceList property value is ignored.
pMultiLoadNamespaceList | The multi load namespace list to set. |
SetObjectsToSave | ( | FBArrayTemplate< FBComponent > | pObjectsToSave | ) |
Sets the list of objects that will be saved.
This needs to be set before calling FBApplication::FileSave. The list is affecting only one save operation. Once the save is completed, the list is cleared.
pObjectsToSave | The objects to save. |
Take Description.
pTakeIndex | index of take to set. |
pDescription | take description to set |
Take Destination Name upon save or load.
pTakeIndex | index of take to set. |
pDestinationName | take description to set |
SetTakeKeyRange | ( | int | pTakeIndex, |
FBTimeSpan | pKeyTimeSpan | ||
) |
Set take key range.
pTakeIndex | index of take to set. |
pKeyTimeSpan | Timespan indicating the time range to keep the keys. Keys that are outside the time range for this take will be removed, by default the time range is FBTime::MinusInfinity -> FBTime::Infinity |
Take Original Name.
pTakeIndex | index of take to set. |
pName | take name to set |
Return if true if the take will be saved or Loaded.
pTakeIndex | index of take to set |
pSelect | set true if should be saved or loaded. |
FBElementAction ActorFaces |
Read Write Property: Handling of the Actor Faces elements.
bool ActorFacesAnimation |
Read Write Property: Handling of the Actor Faces animation.
FBElementAction Actors |
Read Write Property: Handling of the Actors elements.
FBElementAction Audio |
Read Write Property: Handling of the Audio elements.
bool BaseCameras |
Read Write Property: Consider base camera settings.
FBElementAction Bones |
Read Write Property: Handling of the Bones elements.
bool BonesAnimation |
Read Write Property: Handling of the Bones animation.
int CacheSize |
Read Write Property: The Cached buffer size used to accelerate IO system.
FBElementAction Cameras |
Read Write Property: Handling of the Cameras elements.
bool CamerasAnimation |
Read Write Property: Handling of the Cameras animation.
bool CameraSwitcherSettings |
Read Write Property: Consider camera switcher settings.
FBElementAction CharacterExtensions |
Read Write Property: Handling of the Character Extensions.
FBElementAction CharacterFaces |
Read Write Property: Handling of the Character Faces elements.
bool CharacterFacesAnimation |
Read Write Property: Handling of the Character Faces animation.
FBElementAction Characters |
Read Write Property: Handling of the Characters elements.
bool CharactersAnimation |
Read Write Property: Handling of the Characters animation.
bool ClearSelectionBeforeSave |
Read Write Property: Set to true if the current selected objects shouldn't saved when call FBApplication::SaveCharacterRigAndAnimation.
bool ConsiderMuteSolo |
Read Write property: Consider the mute/solo settings to identify identical layer when merging.
FBElementAction Constraints |
Read Write Property: Handling of the Constraints elements.
bool ConstraintsAnimation |
Read Write Property: Handling of the Constraints animation.
bool CopyCharacterExtensions |
Read Write Property: pCopyMissingExtensions Set to true if the character extensions on the rig in the file should be copied to the target rig.
bool CurrentCameraSettings |
Read Write Property: Consider current camera settings.
FBElementAction Devices |
Read Write Property: Handling of the Devices elements.
bool DevicesAnimation |
Read Write Property: Handling of the Devices animation.
bool EmbedMedia |
Read Write Property: Embed all media in the FBX file itself. When saving in ASCII mode it is not possible to embed media.
FBFileFormatAndVersion FileFormatAndVersion |
Read Write Property: File format and version chosen to save the scene.
bool FileReference |
Read Write property: Load/Save scene as FileReference.
bool FileReferenceEdit |
Read Write Property: Load/Save the edits made to referenced objects or not.
FBElementAction FileReferences |
Read Write Property: Handling of the FileReferences elements.
bool GlobalLightingSettings |
Read Write Property: Consider global Lighting settings.
FBElementAction Groups |
Read Write Property: Handling of the Groups elements.
bool IgnoreConflicts |
Read Write Property: Set to true to ignore conflicts between objects in character extensions and objects in the scene. Conflicting objects will be merged in the extension
bool KeepTransformHierarchy |
Read Write Property: Indicate whether we keep transform hierarchy when SaveSelectedModelsOnly is true. Default value is false to ensure consistent behavior with SaveSelected operation via file menu.
FBElementAction KeyingGroups |
Read Write Property: Handling of the Keying Groups elements.
FBElementAction Lights |
Read Write Property: Handling of the Lights elements.
bool LightsAnimation |
Read Write Property: Handling of the Lights animation.
FBElementAction Materials |
Read Write Property: Handling of the Materials elements.
bool MaterialsAnimation |
Read Write Property: Handling of the Materials animation.
FBElementAction Models |
Read Write Property: Handling of the Models elements.
bool ModelsAnimation |
Read Write Property: Handling of the Models animation.
str NamespaceList |
Read Write Property: A list of namespaces separated by '~'. On Load, duplicate the loaded objects into each namespace in the list. If the SetMultiLoadNamespaceList method is also called, this property is ignored.
FBElementAction Notes |
Read Write Property: Handling of the Notes elements.
bool NotesAnimation |
Read Write Property: Handling of the Notes animation.
FBElementAction OpticalData |
Read Write Property: Handling of the Optical Data elements.
FBElementAction PhysicalProperties |
Read Write Property: Handling of the Physical Properties elements.
bool PhysicalPropertiesAnimation |
Read Write Property: Handling of the Physical Properties animation.
FBElementAction Poses |
Read Write Property: Handling of the Poses elements.
bool ProcessAnimationOnExtension |
Read Write Property: Set to true if animation on character extensions should also be transferred.
bool RemoveConstraintReference |
Read Write Property: Set to true if we should remove constraint reference.
bool RemoveEmptyLayer |
Read Write property: Remove empty animation layers that are in additive mode, without child or parent.
bool ReplaceControlSet |
Read Write Property: Set to true if the character extensions (and their children) should be saved when call FBApplication::SaveCharacterRigAndAnimation.
bool ResetDOF |
Read Write Property: Set to true if we should change the limits on the target rig.
bool ResetHierarchy |
Read Write Property: Set to true if we should reset the character hierarchy.
bool RetargetOnBaseLayer |
Read Write Property: If the transfer method is retarget, set this parameter to control where the retarget correction will be made (on base layer or on another layer).
bool SaveCharacter |
Read Write Property: Set to true if the character should be saved when call FBApplication::SaveCharacterRigAndAnimation.
bool SaveCharacterExtensions |
Read Write Property: Set to true if the character extensions (and their children) should be saved when call FBApplication::SaveCharacterRigAndAnimation.
bool SaveControlSet |
Read Write Property: Set to true if the rig (and its children) should be saved when call FBApplication::SaveCharacterRigAndAnimation.
bool SaveSelectedModelsOnly |
Read Write Property: Indicate that only the selected models will be saved.
FBElementAction Scripts |
Read Write Property: Handling of the Scripts elements.
bool SetPropertyStaticIfPossible |
Read Write Property: Set to false if want to keep properties' animated flag even when they are not really animated(no keyframe data) while retrieving/storing. See sample: SetPropertyStaticIfPossibleOption.py.
FBElementAction Sets |
Read Write Property: Handling of the Sets elements.
FBElementAction Shaders |
Read Write Property: Handling of the Shaders elements.
bool ShadersAnimation |
Read Write Property: Handling of the Shaders animation.
bool ShowFileDialog |
Read Write Property: Set to true if want to pop up dialog for FileName, Format, Embed, Compression, UseTakeName, OneTakePerFile.
bool ShowOptionsDialog |
Read Write Property: Set to true if want to pop up options dialog for detail settings.
FBElementAction Solvers |
Read Write Property: Handling of the Solvers elements.
bool SolversAnimation |
Read Write Property: Handling of the Solvers animation.
FBElementAction Story |
Read Write Property: Handling of the Story elements.
bool StoryAnimation |
Read Write Property: Handling of the Story animation (animatable properties on story objects).
FBTakeSpanOnLoad TakeSpan |
Read Write Property: Indicate how the take start and end point should be set. By default it is read from the file.
FBElementAction Textures |
Read Write Property: Handling of the Textures elements.
bool TexturesAnimation |
Read Write Property: Handling of the Textures animation.
FBCharacterLoadAnimationMethod TransferMethod |
Read Write Property: How should the animation should be transfered on the target rig.
bool TransportSettings |
Read Write Property: Consider transport control settings.
bool UpdateRecentFiles |
Read Write Property: Set to true to update recent file list.
bool UseASCIIFormat |
Read Write Property: Indicate if the resulting FBX file will be in binary or ASCII mode.
FBElementAction Video |
Read Write Property: Handling of the Video elements.