FBScene Class Reference


Detailed Description

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.

    myScene = FBSystem().Scene

See also the C++ code sample in toolscene.

Examples
Tasks/DeleteUnusedMedia.py, Tasks/MirrorPoseOverTime.py, Tasks/SelectModelsWithNameContainingSubstring.py, Tasks/SetAllCamerasBackgroundColorFromFirstSelectedCamera.py, Tasks/StartDevice.py, BasicOperations/DeletingGroups.py, BasicOperations/FBComponent.py, BasicOperations/InsertCurrentTake.py
Inheritance diagram for FBScene:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int  NamespaceGetChildrenList (FBStringList pNamespaceList, str pNamespace=None, bool pRecursive=True)
  Get list of children namespaces in the given namespace.
HFBNamespace  NamespaceGet (str pNamespace)
  Get Namespace object.
bool  NamespaceExist (str pNamespace)
  Query if namespace exists.
bool  NamespaceEmpty (str pNamespace)
  Query if namespace is empty.
  NamespaceGetContentList (tuple pContentList, str pNamespace, FBPlugModificationFlag pModificationFlags=kFBPlugAllContent, bool pRecursive=True, int pTypeInfo=FBPlug::TypeInfo, bool pExactTypeMatch=False)
  Get List of the namespace content.
  NamespaceSelectContent (str pNamespace, bool pSelect, FBPlugModificationFlag pModificationFlags=kFBPlugAllContent, bool pRecursive=True, int pTypeInfo=FBPlug::TypeInfo, bool pExactTypeMatch=False)
  Select the namespace content.
bool  NamespaceRename (str pNameSpace, str pNewNamespace, bool pRecursive=True, int pTypeInfo=FBPlug::TypeInfo, bool pExactTypeMatch=False)
  Rename the namespace.
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  NamespaceImport (str pNamespace, str pFilePath)
  Import file into Namespace.
bool  NamespaceImportToMultiple (FBStringList pDstNamespaceList, str pFilePath)
  Import file into multiple Namespaces.
bool  NamespaceExport (str pNamespace, str pFilePath, bool pASCIIFormat=False)
  Export scene content within namespace to file.
  __init__ (object pObject)
  Constructor.
  FBDelete ()
  Virtual FBDelete function.
  Clear ()
  Clears the elements part of the scene.
bool  Evaluate ()
  Evaluate the scene.
bool  CandidateEvaluationAndResolve ()
  Resolving the Candidate.
bool  EvaluateDeformations ()
  Evaluate the deformations of the scene.

Public Attributes

FBPropertyListTake  Takes
  List: Takes for scene.
FBPropertyModel  RootModel
  Read Only Property: Scene Root model for that scene.
FBPropertyListCamera  Cameras
  List: Cameras in scene.
FBPropertyListMaterial  Materials
  List: Materials for scene.
FBPropertyListTexture  Textures
  List: Textures for scene.
FBPropertyListShader  Shaders
  List: Shaders for scene.
FBPropertyListDeformer  Deformers
  List: Deformers for scene.
FBPropertyListDevice  Devices
  List: Devices for scene.
FBPropertyListConstraint  Constraints
  List: Constraints in scene.
FBPropertyListLight  Lights
  List: Lights in scene.
FBPropertyListAudioClip  AudioClips
  List: Audio clips in scene.
FBPropertyListVideoClip  VideoClips
  List: Video clips in scene.
FBPropertyListMotionClip  MotionClips
  List: Motion clips in scene.
FBPropertyListFolder  Folders
  List: Folders in scene.
FBPropertyListNote  Notes
  List: Notes in scene.
FBPropertyListPose  Poses
  List: Poses in scene.
FBPropertyListObjectPose  ObjectPoses
  List: ObjectPoses in scene.
FBPropertyListActor  Actors
  List: Actors in scene.
FBPropertyListActorFace  ActorFaces
  List: ActorFaces in scene.
FBPropertyListMarkerSet  MarkerSets
  List: Marker sets in scene.
FBPropertyListControlSet  ControlSets
  List: Control set rigs in scene.
FBPropertyListCharacter  Characters
  List: Characters in scene.
FBPropertyListCharacterFace  CharacterFaces
  List: Character faces in scene.
FBPropertyListCharacterPose  CharacterPoses
  List: Character poses in scene.
FBPropertyListCharacterExtension  CharacterExtensions
  List: Character extensions available in the scene.
FBPropertyListUserObject  UserObjects
  List: User objects.
FBPropertyProjectSettings  ProjectSettings
  Read Only Property: Local project settings.
FBPropertyRenderer  Renderer
  Read Only Property: Local renderer.
FBPropertyListComponent  Components
  List: Generic List of components.
FBPropertyListGroup  Groups
  List: Groups available in the scene.
FBPropertyListSet  Sets
  List: Sets available in the scene.
FBPropertyListNamespace  Namespaces
  List: Namespace available in the scene.
FBPropertyListHandle  Handles
  List: Handles present in the scene.
FBPropertyListHUD  HUDs
  Read Only Property: Heads Up Displays in the scene.
FBPropertyListConstraintSolver  ConstraintSolvers
  List: Constraint Solvers present in the scene.
FBPropertyListPhysicalProperties  PhysicalProperties
  List: PhysicalProperties present in the scene.
FBPropertyString  FilePath
  Read Write Property: File path of the scene.
FBPropertyEvent  OnChange
  Event: Something in the scene has happened.
FBPropertyEvent  OnTakeChange
  Event: Something related to a take has happened.

Member Function Documentation

int NamespaceGetChildrenList ( FBStringList  pNamespaceList,
str  pNamespace = None,
bool  pRecursive = True 
)

Get list of children namespaces in the given namespace.

Parameters:
pNamespaceList the list of namespace to return.
pNamespace specify the parent namespace, NULL mean for the whole scene.
pRecursive True only work on the direct children level namespace, otherwise will work on the whole children namespace hierarchy recursively.
Returns:
the list of children namespaces.
HFBNamespace NamespaceGet ( str  pNamespace )

Get Namespace object.

Parameters:
pNamespace the namespace to query
Returns:
Namespace with exact name matching
bool NamespaceExist ( str  pNamespace )

Query if namespace exists.

Parameters:
pNamespace the namespace to query
Returns:
True if the namespace exist, otherwise return False.
bool NamespaceEmpty ( str  pNamespace )

Query if namespace is empty.

Parameters:
pNamespace the namespace to query
Returns:
True if the namespace (don't include nested children namespace) is empty
NamespaceGetContentList ( tuple  pContentList,
str  pNamespace,
FBPlugModificationFlag  pModificationFlags = kFBPlugAllContent,
bool  pRecursive = True,
int  pTypeInfo = FBPlug::TypeInfo,
bool  pExactTypeMatch = False 
)

Get List of the namespace content.

Parameters:
pContentList the list of content to return.
pNamespace the namespace to work on
pModificationFlags bitwise combination of kFBConnectionSrcObjectModified, kFBConnectionDstObjectModified, kFBConnectionSrcPropertyModified, kFBConnectionDstPropertyModified flags. kFBPlugAllContent means all the content.
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).
NamespaceSelectContent ( str  pNamespace,
bool  pSelect,
FBPlugModificationFlag  pModificationFlags = kFBPlugAllContent,
bool  pRecursive = True,
int  pTypeInfo = FBPlug::TypeInfo,
bool  pExactTypeMatch = False 
)

Select the namespace content.

Parameters:
pNamespace the namespace to work on
pSelect True (or False) indicate to select (or unselect)
pModificationFlags bitwise combination of kFBConnectionSrcObjectModified, kFBConnectionDstObjectModified, kFBConnectionSrcPropertyModified, kFBConnectionDstPropertyModified flags. kFBPlugAllContent means all the content.
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).
bool NamespaceRename ( str  pNameSpace,
str  pNewNamespace,
bool  pRecursive = True,
int  pTypeInfo = FBPlug::TypeInfo,
bool  pExactTypeMatch = False 
)

Rename the namespace.

Parameters:
pNamespace the namespace to work on
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).
Returns:
True if operation successfully, False is this namespace (or pTypeInfo type of objects) doesn't exist, or locked
bool NamespaceDelete ( str  pNamespace )

Delete the namespace & all its content.

Parameters:
pNamespace the namespace to work on
Returns:
True if operation successfully, False is this namespace doesn't exist, or is locked
bool NamespaceDeleteContent ( str  pNamespace,
FBPlugModificationFlag  pModificationFlags = kFBPlugAllContent,
bool  pRecursive = True,
int  pTypeInfo = FBPlug::TypeInfo,
bool  pExactTypeMatch = False 
)

Delete the namespace content.

Parameters:
pNamespace the namespace to work on
pModificationFlags bitwise combination of kFBConnectionSrcObjectModified, kFBConnectionDstObjectModified, kFBConnectionSrcPropertyModified, kFBConnectionDstPropertyModified flags. kFBPlugAllContent means all the content.
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).
Returns:
True if operation successfully, False is this namespace (or pTypeInfo type of objects) doesn't exist, or is locked
bool NamespaceImport ( str  pNamespace,
str  pFilePath 
)

Import file into Namespace.

Parameters:
pNamespace the namespace to import to, must be in editable scope.
pFilePath the referenced file path to import.
Returns:
True if successfully.
bool NamespaceImportToMultiple ( FBStringList  pDstNamespaceList,
str  pFilePath 
)

Import file into multiple Namespaces.

Parameters:
pDstNamespaceList the Dst namespaces list to import, must not exist or be self contained.
pFilePath the referenced file path to import.
Returns:
True if successfully.
bool NamespaceExport ( str  pNamespace,
str  pFilePath,
bool  pASCIIFormat = False 
)

Export scene content within namespace to file.

Parameters:
pNamespace the namespace to use, must exist
pFilePath the referenced file path to export.
pASCIIFormat save the file in ASCII format.
Returns:
True if successfully.
__init__ ( object  pObject )
FBDelete ( )

Virtual FBDelete function.

Examples
Tasks/DeleteHierarchy.py

Reimplemented from FBComponent.

Clear ( )

Clears the elements part of the scene.

Not those that belong to all the scenes.

bool Evaluate ( )

Evaluate the scene.

Returns:
true if successful.
bool CandidateEvaluationAndResolve ( )

Resolving the Candidate.

Returns:
true if successful.
bool EvaluateDeformations ( )

Evaluate the deformations of the scene.

Returns:
true if successful.

Member Data Documentation

FBPropertyModel RootModel

Read Only Property: Scene Root model for that scene.

List: Character extensions available in the scene.

FBPropertyProjectSettings ProjectSettings

Read Only Property: Local project settings.

FBPropertyRenderer Renderer

Read Only Property: Local renderer.

List: Generic List of components.

Reimplemented from FBComponent.

List: Groups available in the scene.

List: Sets available in the scene.

FBPropertyListNamespace Namespaces

List: Namespace available in the scene.

List: Handles present in the scene.

FBPropertyListHUD HUDs

Read Only Property: Heads Up Displays in the scene.

List: Constraint Solvers present in the scene.

Read Write Property: File path of the scene.

FBPropertyEvent OnChange

Event: Something in the scene has happened.

(FBEventSceneChange)

FBPropertyEvent OnTakeChange

Event: Something related to a take has happened.

(FBEventTakeChange)


FBScene FBScene FBScene FBScene FBScene FBScene FBScene FBScene FBScene FBScene
FBScene FBScene FBScene FBScene FBScene FBScene FBScene FBScene FBScene FBScene