Python Reference Guide
 
Loading...
Searching...
No Matches
FBMotionFileImportOptions Class Reference

Customize motion file loading. More...

#include <pyfbsdk_generated.h>

Inheritance diagram for FBMotionFileImportOptions:

Public Member Functions

 FBMotionFileImportOptions (FBStringList pStringList)
 Constructor.
 
int GetTakeCount ()
 Return the take count in the file to be loaded.
 
str GetTakeName (int pTakeIndex)
 Get the take name.
 
int GetTakeSamples (int pTakeIndex)
 Return the number of samples.
 
float GetTakeSamplingRate (int pTakeIndex)
 Return the actual sampling rate as a double, useful when you have a custom sampling rate.
 
FBTimeMode GetTakeSamplingRateMode (int pTakeIndex)
 Return the sampling rate mode.
 
bool GetTakeSelect (int pTakeIndex)
 Return true if the take will be loaded.
 
FBTime GetTakeStart (int pTakeIndex)
 Return the Take Start time.
 
FBTime GetTakeStop (int pTakeIndex)
 Return the Take Stop time.
 
 SetTakeName (int pTakeIndex, str pName)
 Set the take name.
 
 SetTakeSamples (int pTakeIndex, int pSamplesCount)
 Set the number of samples for a particular take.
 
 SetTakeSamplingRate (int pTakeIndex, FBTimeMode pTimeMode, float pCustomSamplingRate=30.0)
 Set the sampling rate for a particular take.
 
 SetTakeSelect (int pTakeIndex, bool pSelect)
 Indicate if the take will be loaded.
 
 SetTakeStart (int pTakeIndex, FBTime pStartTime)
 Set the Take Start time.
 
 SetTakeStop (int pTakeIndex, FBTime pStopTime)
 Set the Take Stop time.
 
- Public Member Functions inherited from FBComponent
 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

bool BaseRotationOnPreRotation
 Read Write Property: If set to true, the base rotation will be imported as Pre Rotation. Used for htr, asf/amc files.

 
bool BaseTranslationOnRotationOffset
 Read Write Property: If set to true, the base translation will be imported as Rotation Pivot offset. Used for htr, asf/amc

 
bool CreateInsteadOfMerge
 Read Write Property: If set to true, the motion will imported/models will be created in the scene, if set to false, the motion will be merged.

 
bool CreateOpticalSegments
 Read Write Property: If set to true, optical segments will be created. Used for trc, c3d files.

 
bool CreateReferenceNode
 Settings based on file type.

 
bool CreateUnmatchedModels
 Read Write Property: If set to true, nodes will be created to match the hierarchical structure of the imported file.

 
bool CreateUnusedOpticalSegments
 Read Write Property: If set to true, unused optical segments will be created. Used for trc, c3d files.

 
bool IgnoreModelType
 Read Write Property: If set to true, model type will not be considered when finding a matching model in the scene.

 
bool ImportDOF
 Read Write Property: If set to true, the DOF value will be imported from the file.

 
bool ImportScaling
 Read Write Property: If set to true, scaling values will be imported.

 
bool KeepActorPrefix
 Read Write Property: If set to true, the Actor prefix will be kept when naming each optical marker. Used with c3d files.

 
bool KeepDummyNode
 Read Write Property: If set to true, dummy bones from the file are not removed. Used for asf/amc files.

 
FBModelSelection ModelSelection
 Common settings when merging, unused with the CreateInsteadOfMerge property is set to true.

 
bool SetLimits
 Read Write Property: If set to true, use motion limits. Used for asf/amc files.

 
bool SetOccludedToLastValidPosition
 Read Write Property: If set to true, occluded segments will be set to their last valid position. Used for trc, c3d files.

 
FBTakeSpanOnLoad TakeStartEnd
 Read Write Property: Indicates how the start/end value of the take will be modified.

 
FBUpAxis UpAxisUsedInFile
 Read Write Property: Indicated the up axis used in the motion file. Only effective when loading c3d files.

 
- Public Attributes inherited from FBComponent
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.

 
- Public Attributes inherited from FBPlug
str ClassGroupName
 ClassGroupName of the object.

 
int TypeInfo
 TypeInfo.

 

Detailed Description

Customize motion file loading.


Constructor & Destructor Documentation

◆ FBMotionFileImportOptions()

Constructor.

Create an FBMotionFileImportOptions object to be used when importing a motion file. Pass file paths to get the appropriate information about those files, modify the options and then call the file import process. Not all options are usable at the same time, some of them are for specific motion type. You can see the valid configuration by looking at the motion file dialog (accessible from File/Motion File Import...).

Parameters
pStringListThe client needs to pass a list of files path to load to collect the motion file information.

Member Function Documentation

◆ GetTakeCount()

int GetTakeCount ( )

Return the take count in the file to be loaded.

Returns
Take count
Warning
You need to use an appropriate constructor with the file path to be able to get the take information.

◆ GetTakeName()

str GetTakeName ( int  pTakeIndex)

Get the take name.

Parameters
pTakeIndexIndex of take to get the name.
Returns
Take name

◆ GetTakeSamples()

int GetTakeSamples ( int  pTakeIndex)

Return the number of samples.

Parameters
pTakeIndexIndex of take to get the samples count.
Returns
Number of samples

◆ GetTakeSamplingRate()

float GetTakeSamplingRate ( int  pTakeIndex)

Return the actual sampling rate as a double, useful when you have a custom sampling rate.

Parameters
pTakeIndexIndex of take to get the sampling rate
Returns
Sample rate

◆ GetTakeSamplingRateMode()

FBTimeMode GetTakeSamplingRateMode ( int  pTakeIndex)

Return the sampling rate mode.

Parameters
pTakeIndexIndex of take to get the sampling rate mode
Returns
Sample rate mode
Remarks
Use GetTakeSamplingRate if you have a custom sampling rate to get the actual rate.

◆ GetTakeSelect()

bool GetTakeSelect ( int  pTakeIndex)

Return true if the take will be loaded.

Parameters
pTakeIndexIndex of take.
Returns
True is the take will be loaded

◆ GetTakeStart()

FBTime GetTakeStart ( int  pTakeIndex)

Return the Take Start time.

Parameters
pTakeIndexIndex of take to get the start time.
Returns
Start time of the take

◆ GetTakeStop()

FBTime GetTakeStop ( int  pTakeIndex)

Return the Take Stop time.

Parameters
pTakeIndexIndex of take to get the stop time.
Returns
Stop time of the take

◆ SetTakeName()

SetTakeName ( int  pTakeIndex,
str  pName 
)

Set the take name.

Parameters
pTakeIndexIndex of take to set.
pNameTake name to set

◆ SetTakeSamples()

SetTakeSamples ( int  pTakeIndex,
int  pSamplesCount 
)

Set the number of samples for a particular take.

Parameters
pTakeIndexIndex of take to set.
pSamplesCountNumber of samples
Remarks
Must be set to a value bigger than 0 and smaller than the number of samples in the file. The stop time of the motion will be changed based on the new samples count.

◆ SetTakeSamplingRate()

SetTakeSamplingRate ( int  pTakeIndex,
FBTimeMode  pTimeMode,
float  pCustomSamplingRate = 30.0 
)

Set the sampling rate for a particular take.

Parameters
pTakeIndexIndex of take to set.
pTimeModeTime mode to set.
pCustomSamplingRateCustom sampling rate if pTimeMode is set to kFBTimeModeCustom, unused otherwise (default is 30.0)
Remarks
Changing the sampling rate will change the stop time of the motion.

◆ SetTakeSelect()

SetTakeSelect ( int  pTakeIndex,
bool  pSelect 
)

Indicate if the take will be loaded.

Parameters
pTakeIndexIndex of take to set.
pSelectSet to true if the take should be loaded.

◆ SetTakeStart()

SetTakeStart ( int  pTakeIndex,
FBTime  pStartTime 
)

Set the Take Start time.

Parameters
pTakeIndexIndex of take to set.
pStartTimeTime of the first frame of the take
Remarks
Changing the start time of the take will also change the stop time, since the duration is constant. Please change the samples count to change the length of the motion.

◆ SetTakeStop()

SetTakeStop ( int  pTakeIndex,
FBTime  pStopTime 
)

Set the Take Stop time.

Parameters
pTakeIndexIndex of take to set.
pStopTimeTime of the last frame of the take
Remarks
Changing the stop time of the take will also change the start time, since the duration is constant. Please change the samples count to change the length of the motion.

Member Data Documentation

◆ BaseRotationOnPreRotation

bool BaseRotationOnPreRotation

Read Write Property: If set to true, the base rotation will be imported as Pre Rotation. Used for htr, asf/amc files.

◆ BaseTranslationOnRotationOffset

bool BaseTranslationOnRotationOffset

Read Write Property: If set to true, the base translation will be imported as Rotation Pivot offset. Used for htr, asf/amc

◆ CreateInsteadOfMerge

bool CreateInsteadOfMerge

Read Write Property: If set to true, the motion will imported/models will be created in the scene, if set to false, the motion will be merged.

◆ CreateOpticalSegments

bool CreateOpticalSegments

Read Write Property: If set to true, optical segments will be created. Used for trc, c3d files.

◆ CreateReferenceNode

bool CreateReferenceNode

Settings based on file type.

◆ CreateUnmatchedModels

bool CreateUnmatchedModels

Read Write Property: If set to true, nodes will be created to match the hierarchical structure of the imported file.

◆ CreateUnusedOpticalSegments

bool CreateUnusedOpticalSegments

Read Write Property: If set to true, unused optical segments will be created. Used for trc, c3d files.

◆ IgnoreModelType

bool IgnoreModelType

Read Write Property: If set to true, model type will not be considered when finding a matching model in the scene.

◆ ImportDOF

bool ImportDOF

Read Write Property: If set to true, the DOF value will be imported from the file.

◆ ImportScaling

bool ImportScaling

Read Write Property: If set to true, scaling values will be imported.

◆ KeepActorPrefix

bool KeepActorPrefix

Read Write Property: If set to true, the Actor prefix will be kept when naming each optical marker. Used with c3d files.

◆ KeepDummyNode

bool KeepDummyNode

Read Write Property: If set to true, dummy bones from the file are not removed. Used for asf/amc files.

◆ ModelSelection

FBModelSelection ModelSelection

Common settings when merging, unused with the CreateInsteadOfMerge property is set to true.

◆ SetLimits

bool SetLimits

Read Write Property: If set to true, use motion limits. Used for asf/amc files.

◆ SetOccludedToLastValidPosition

bool SetOccludedToLastValidPosition

Read Write Property: If set to true, occluded segments will be set to their last valid position. Used for trc, c3d files.

◆ TakeStartEnd

FBTakeSpanOnLoad TakeStartEnd

Read Write Property: Indicates how the start/end value of the take will be modified.

◆ UpAxisUsedInFile

FBUpAxis UpAxisUsedInFile

Read Write Property: Indicated the up axis used in the motion file. Only effective when loading c3d files.