Access to the MotionBuilder scene. More...
#include <pyfbsdk_generated.h>
Public Member Functions | |
FBScene () | |
Constructor. | |
bool | CandidateEvaluationAndResolve () |
Resolving the Candidate. | |
int | CleanEmptyGroups () |
Remove all empty groups present in the scene. | |
int | CleanEmptyRelationConstraints () |
Remove all empty relation constraints present in the scene. | |
int | CleanEmptySets () |
Remove all empty sets present in the scene. | |
int | CleanInactiveConstraints () |
Remove all inactive constraints present in the scene. | |
int | CleanRelationConstraintsUnusedBoxes () |
Remove all unused boxes in relations constraints present in the scene. | |
int | CleanUnusedAudioClips () |
Remove all unused audio clips present in the scene. | |
int | CleanUnusedMaterials () |
Remove all unused materials present in the scene. | |
int | CleanUnusedShaders () |
Remove all unused shaders present in the scene. | |
int | CleanUnusedTextures () |
Remove all unused textures present in the scene. | |
int | CleanUnusedVideoClips () |
Remove all unused video clips present in the scene. | |
bool | Evaluate () |
Evaluate the scene. | |
bool | EvaluateDeformations () |
Evaluate the deformations of the scene. | |
FBDelete () | |
Virtual FBDelete function. | |
GetScriptsPaths (FBStringList pPathList) | |
Get paths of all the python scripts object in the scene. | |
bool | NamespaceCleanup () |
Remove all empty namespaces. | |
bool | NamespaceDelete (str pNamespace) |
Delete the namespace & all its content. | |
bool | NamespaceDeleteContent (str pNamespace, FBPlugModificationFlag pModificationFlags=kFBPlugAllContent, bool pRecursive=True, int pTypeInfo=FBPlug::TypeInfo, bool pExactTypeMatch=False) |
Delete the namespace content. | |
bool | NamespaceEmpty (str pNamespace) |
Query if namespace is empty. | |
bool | NamespaceExist (str pNamespace) |
Query if namespace exists. | |
bool | NamespaceExport (str pNamespace, str pFilePath, bool pASCIIFormat=False) |
Export scene content within namespace to file. | |
FBNamespace | NamespaceGet (str pNamespace) |
Get Namespace object. | |
int | NamespaceGetChildrenList (FBStringList pNamespaceList, str pNamespace=None, bool pRecursive=True) |
Get list of children namespaces in the given namespace. | |
NamespaceGetContentList (FBComponentList pContentList, str pNamespace, FBPlugModificationFlag pModificationFlags=kFBPlugAllContent, bool pRecursive=True, int pTypeInfo=FBPlug::TypeInfo, bool pExactTypeMatch=False) | |
Get List of the namespace content. | |
FBFileReference | NamespaceGetOwnerFileReference (str pNamespace) |
Get Owner FileReference object if the namespace is originated from File Reference. | |
bool | NamespaceImport (str pNamespace, str pFilePath, bool pAsFileReference=False) |
Import file into Namespace (or as file reference) | |
bool | NamespaceImportToMultiple (FBStringList pDstNamespaceList, str pFilePath, bool pAsFileReference=False) |
Import file into multiple Namespaces (or as file references) | |
bool | NamespaceRename (str pNameSpace, str pNewNamespace, bool pRecursive=True, int pTypeInfo=FBPlug::TypeInfo, bool pExactTypeMatch=False) |
Rename the namespace. | |
NamespaceSelectContent (str pNamespace, bool pSelect, FBPlugModificationFlag pModificationFlags=kFBPlugAllContent, bool pRecursive=True, int pTypeInfo=FBPlug::TypeInfo, bool pExactTypeMatch=False) | |
Select (or de-select) the namespace content. | |
![]() | |
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 | |
FBListActorFace | ActorFaces |
List: ActorFaces in scene. | |
FBListActor | Actors |
List: Actors in scene. | |
FBListAudioClip | AudioClips |
List: Audio clips in scene. | |
FBListCamera | Cameras |
List: Cameras in scene. | |
FBListCharacterExtension | CharacterExtensions |
List: Character extensions available in the scene. | |
FBListCharacterFace | CharacterFaces |
List: Character faces in scene. | |
FBListCharacterMarkerSet | CharacterMarkerSets |
List: Character marker sets in scene. | |
FBListCharacterPose | CharacterPoses |
List: Character poses in scene. | |
FBListCharacter | Characters |
List: Characters in scene. | |
FBListComponent | Components |
List: Generic List of components. | |
FBListConstraintSolver | ConstraintSolvers |
List: Constraint Solvers present in the scene. | |
FBListConstraint | Constraints |
List: Constraints in scene. | |
FBListControlSet | ControlSets |
List: Control set rigs in scene. | |
FBListDeformer | Deformers |
List: Deformers for scene. | |
FBListDevice | Devices |
List: Devices for scene. | |
FBListFileReference | FileReferences |
List: FileReference available in the scene. | |
FBListFolder | Folders |
List: Folders in scene. | |
FBListGroup | Groups |
List: Groups available in the scene. | |
FBListHUD | HUDs |
Read Only Property: Heads Up Displays in the scene. | |
FBListHandle | Handles |
List: Handles present in the scene. | |
FBListKeyingGroup | KeyingGroups |
Read Write Property: Keying Groups in the scene. | |
FBListLight | Lights |
List: Lights in scene. | |
FBListMarkerSet | MarkerSets |
List: Marker sets in scene. | |
FBListMaterial | Materials |
List: Materials for scene. | |
FBListModelOptical | ModelOpticals |
Read Write Property: Optical Data in the scene. | |
FBListModelSkeleton | ModelSkeletons |
Read Write Property: Bones (Skeletons) in the scene. | |
FBListMotionClip | MotionClips |
List: Motion clips in scene. | |
FBListNamespace | Namespaces |
List: Namespace (include FileReference) available in the scene | |
FBListNote | Notes |
List: Notes in scene. | |
FBListObjectPose | ObjectPoses |
List: ObjectPoses in scene. | |
FBEvent | OnChange |
Event: Something in the scene has happened.(FBEventSceneChange) | |
FBEvent | OnTakeChange |
Event: Something related to a take has happened.(FBEventTakeChange) | |
FBListPhysicalProperties | PhysicalProperties |
List: PhysicalProperties present in the scene. | |
FBListPose | Poses |
List: Poses in scene. | |
FBRenderer | Renderer |
Read Only Property: Local renderer. | |
FBModel | RootModel |
Read Only Property: Scene Root model for that scene | |
FBListSet | Sets |
List: Sets available in the scene. | |
FBListShader | Shaders |
List: Shaders for scene. | |
FBListTake | Takes |
List: Takes for scene. | |
FBListTexture | Textures |
List: Textures for scene. | |
FBListUserObject | UserObjects |
List: User objects | |
FBListVideoClip | VideoClips |
List: Video clips in scene. | |
![]() | |
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. | |
Access to the MotionBuilder scene.
In MotionBuilder, the scene is the environment where your models exist. The scene contains models which you can import, select, transform, copy, tweak, and animate.The FBScene object is obtained from the scene attribute of FBSystem.The FBScene class contains many attributes that you can use to access objects, e.g cameras, characters, lights, and takes, essentially everything you see in the Navigator in the UI. A project can only contain one scene, and if you try to create an instance of a scene you will get an error, so you must access the scene by getting a handle through FBSystem.
See also the C++ code sample in toolscene.
See samples: InsertCurrentTake.py, DeleteUnusedMedia.py, MirrorPoseOverTime.py, SelectModelsWithNameContainingSubstring.py, SetAllCamerasBackgroundColorFromFirstSelectedCamera.py, StartDevice.py.
FBScene | ( | ) |
Constructor.
Client code cannot instantiate objects of this class. The FBSystem class provides access to the current scene object.
bool CandidateEvaluationAndResolve | ( | ) |
Resolving the Candidate.
int CleanEmptyGroups | ( | ) |
Remove all empty groups present in the scene.
int CleanEmptyRelationConstraints | ( | ) |
Remove all empty relation constraints present in the scene.
int CleanEmptySets | ( | ) |
Remove all empty sets present in the scene.
int CleanInactiveConstraints | ( | ) |
Remove all inactive constraints present in the scene.
int CleanRelationConstraintsUnusedBoxes | ( | ) |
Remove all unused boxes in relations constraints present in the scene.
int CleanUnusedAudioClips | ( | ) |
Remove all unused audio clips present in the scene.
int CleanUnusedMaterials | ( | ) |
Remove all unused materials present in the scene.
int CleanUnusedShaders | ( | ) |
Remove all unused shaders present in the scene.
int CleanUnusedTextures | ( | ) |
Remove all unused textures present in the scene.
int CleanUnusedVideoClips | ( | ) |
Remove all unused video clips present in the scene.
bool Evaluate | ( | ) |
Evaluate the scene.
bool EvaluateDeformations | ( | ) |
Evaluate the deformations of the scene.
FBDelete | ( | ) |
Virtual FBDelete function.
GetScriptsPaths | ( | FBStringList | pPathList | ) |
Get paths of all the python scripts object in the scene.
pPathList | Out parameter, to collect the path of python scripts. |
bool NamespaceCleanup | ( | ) |
Remove all empty namespaces.
During some namespace operations, empty namespace may left over, while this is not harmful but could be annoying. Save the scene and load it back those empty namespaces will disappear. And this function also allow user to remove all empty namespaces from the scene easily via SDK.
Delete the namespace & all its content.
pNamespace | the namespace to work on |
bool NamespaceDeleteContent | ( | str | pNamespace, |
FBPlugModificationFlag | pModificationFlags = kFBPlugAllContent , |
||
bool | pRecursive = True , |
||
int | pTypeInfo = FBPlug::TypeInfo , |
||
bool | pExactTypeMatch = False |
||
) |
Delete the namespace content.
pNamespace | the namespace to work on |
pModificationFlags | bitwise combination of kFBConnectionSrcObjectModified, kFBConnectionDstObjectModified, kFBConnectionSrcPropertyModified, kFBConnectionDstPropertyModified flags. kFBPlugAllContent means all the content. Modification flags beside kFBPlugAllContent will only work on FileReference Namespace. |
pRecursive | True only work on the direct children level namespace, otherwise will work on the children namespace hierarchy recursively. |
pTypeInfo | the typeInfo of the type of interested object, default for all the objects. |
pExactTypeMatch | if True, the derived typeInfo won't be considered (For example, FBCamera won't be considered when passing FBModel::TypeInfo). |
Query if namespace is empty.
pNamespace | the namespace to query, NULL for whole scene. |
Query if namespace exists.
pNamespace | the namespace to query |
Export scene content within namespace to file.
pNamespace | the namespace to use, must exist |
pFilePath | the referenced file path to export. |
pASCIIFormat | save the file in ASCII format. |
FBNamespace NamespaceGet | ( | str | pNamespace | ) |
Get Namespace object.
pNamespace | the namespace to query |
int NamespaceGetChildrenList | ( | FBStringList | pNamespaceList, |
str | pNamespace = None , |
||
bool | pRecursive = True |
||
) |
Get list of children namespaces in the given namespace.
pNamespaceList | the list of namespace to return. |
pNamespace | specify the parent namespace, NULL for the whole scene. |
pRecursive | True only work on the direct children level namespace, otherwise will work on the whole children namespace hierarchy recursively. |
NamespaceGetContentList | ( | FBComponentList | pContentList, |
str | pNamespace, | ||
FBPlugModificationFlag | pModificationFlags = kFBPlugAllContent , |
||
bool | pRecursive = True , |
||
int | pTypeInfo = FBPlug::TypeInfo , |
||
bool | pExactTypeMatch = False |
||
) |
Get List of the namespace content.
pContentList | the list of content to return. |
pNamespace | the namespace to work on, NULL for whole scene. |
pModificationFlags | bitwise combination of kFBConnectionSrcObjectModified, kFBConnectionDstObjectModified, kFBConnectionSrcPropertyModified, kFBConnectionDstPropertyModified flags. kFBPlugAllContent means all the content. Modification flags beside kFBPlugAllContent will only work on FileReference Namespace. |
pRecursive | True only work on the direct children level namespace, otherwise will work on the whole children namespace hierarchy recursively. |
pTypeInfo | the typeInfo of the type of interested object, 0 for all the objects. |
pExactTypeMatch | if True, the derived typeInfo won't be considered (For example, FBCamera won't be considered when passing FBModel::TypeInfo). |
FBFileReference NamespaceGetOwnerFileReference | ( | str | pNamespace | ) |
Get Owner FileReference object if the namespace is originated from File Reference.
pNamespace | the namespace to work on, could be nested namespace inside the FileReference's namespace. |
Import file into Namespace (or as file reference)
pNamespace | the namespace to import to, must be in editable scope. |
pFilePath | the referenced file path to import. |
pAsFileReference | import the file as file reference. The default value is false. |
bool NamespaceImportToMultiple | ( | FBStringList | pDstNamespaceList, |
str | pFilePath, | ||
bool | pAsFileReference = False |
||
) |
Import file into multiple Namespaces (or as file references)
pDstNamespaceList | the Dst namespaces list to import, must not exist or be self contained. |
pFilePath | the referenced file path to import. |
pAsFileReference | import the file as file reference. The default value is false. |
bool NamespaceRename | ( | str | pNameSpace, |
str | pNewNamespace, | ||
bool | pRecursive = True , |
||
int | pTypeInfo = FBPlug::TypeInfo , |
||
bool | pExactTypeMatch = False |
||
) |
Rename the namespace.
pNameSpace | the namespace to work on, NULL for whole scene. |
pNewNamespace | the new namespace |
pRecursive | True only work on the direct children level namespace, otherwise will work on the children namespace hierarchy recursively. |
pTypeInfo | the typeInfo of the type of interested object, default for all the objects. |
pExactTypeMatch | if True, the derived typeInfo won't be considered (For example, FBCamera won't be considered when passing FBModel::TypeInfo). |
NamespaceSelectContent | ( | str | pNamespace, |
bool | pSelect, | ||
FBPlugModificationFlag | pModificationFlags = kFBPlugAllContent , |
||
bool | pRecursive = True , |
||
int | pTypeInfo = FBPlug::TypeInfo , |
||
bool | pExactTypeMatch = False |
||
) |
Select (or de-select) the namespace content.
pNamespace | the namespace to work on, NULL for whole scene. |
pSelect | True (or False) indicate to select (or de-select) |
pModificationFlags | bitwise combination of kFBConnectionSrcObjectModified, kFBConnectionDstObjectModified, kFBConnectionSrcPropertyModified, kFBConnectionDstPropertyModified flags. kFBPlugAllContent means all the content. Modification flags beside kFBPlugAllContent will only work on FileReference Namespace. |
pRecursive | True only work on the direct children level namespace, otherwise will work on the children namespace hierarchy recursively. |
pTypeInfo | the typeInfo of the type of interested object, default for all the objects. |
pExactTypeMatch | if True, the derived typeInfo won't be considered (For example, FBCamera won't be considered when passing FBModel::TypeInfo). |
FBListActorFace ActorFaces |
List: ActorFaces in scene.
FBListActor Actors |
List: Actors in scene.
FBListAudioClip AudioClips |
List: Audio clips in scene.
FBListCamera Cameras |
List: Cameras in scene.
FBListCharacterExtension CharacterExtensions |
List: Character extensions available in the scene.
FBListCharacterFace CharacterFaces |
List: Character faces in scene.
FBListCharacterMarkerSet CharacterMarkerSets |
List: Character marker sets in scene.
FBListCharacterPose CharacterPoses |
List: Character poses in scene.
FBListCharacter Characters |
List: Characters in scene.
FBListComponent Components |
List: Generic List of components.
FBListConstraint Constraints |
List: Constraints in scene.
FBListConstraintSolver ConstraintSolvers |
List: Constraint Solvers present in the scene.
FBListControlSet ControlSets |
List: Control set rigs in scene.
FBListDeformer Deformers |
List: Deformers for scene.
FBListDevice Devices |
List: Devices for scene.
FBListFileReference FileReferences |
List: FileReference available in the scene.
FBListFolder Folders |
List: Folders in scene.
FBListGroup Groups |
List: Groups available in the scene.
FBListHandle Handles |
List: Handles present in the scene.
FBListHUD HUDs |
Read Only Property: Heads Up Displays in the scene.
FBListKeyingGroup KeyingGroups |
Read Write Property: Keying Groups in the scene.
FBListLight Lights |
List: Lights in scene.
FBListMarkerSet MarkerSets |
List: Marker sets in scene.
FBListMaterial Materials |
List: Materials for scene.
FBListModelOptical ModelOpticals |
Read Write Property: Optical Data in the scene.
FBListModelSkeleton ModelSkeletons |
Read Write Property: Bones (Skeletons) in the scene.
FBListMotionClip MotionClips |
List: Motion clips in scene.
FBListNamespace Namespaces |
List: Namespace (include FileReference) available in the scene
FBListNote Notes |
List: Notes in scene.
FBListObjectPose ObjectPoses |
List: ObjectPoses in scene.
FBEvent OnChange |
Event: Something in the scene has happened.(FBEventSceneChange)
FBEvent OnTakeChange |
Event: Something related to a take has happened.(FBEventTakeChange)
FBListPhysicalProperties PhysicalProperties |
List: PhysicalProperties present in the scene.
FBListPose Poses |
List: Poses in scene.
FBRenderer Renderer |
Read Only Property: Local renderer.
FBModel RootModel |
Read Only Property: Scene Root model for that scene
FBListSet Sets |
List: Sets available in the scene.
FBListShader Shaders |
List: Shaders for scene.
FBListTake Takes |
List: Takes for scene.
FBListTexture Textures |
List: Textures for scene.
FBListUserObject UserObjects |
List: User objects
FBListVideoClip VideoClips |
List: Video clips in scene.