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

Provides access to the underlying system, and the MotionBuilder scene. More...

#include <pyfbsdk_generated.h>

Inheritance diagram for FBSystem:

Public Member Functions

 FBSystem ()
 Constructor.
 
str CurrentDirectory ()
 Get current work directory.
 
FBStringList GetCommandLineArgs ()
 Returns the command line arguments for SDK.
 
FBStringList GetLoadedPluginItemGroups (str pPluginItemName)
 Returns a string list containing the groups list in which the specified plug-in item's name belongs to.
 
FBStringList GetLoadedPluginItemInfo (str pPluginItemName)
 Returns a string list containing the information of the specified plug-in item's name.
 
FBStringList GetLoadedPluginItemsName ()
 Returns a string list containing the names of all the loaded plug-in.
 
FBStringList GetPluginPath ()
 Returns the plugin paths.
 
FBStringList GetPythonStartupPath ()
 Returns the python startup path.
 
str MakeFullPath (str pRelativeFilePath)
 Return the full path.
 
- 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

str ApplicationPath
 Read Only Property: Location where the application is installed.

 
bool AreMessageBoxesSuspended
 Read Only Property: While true, the system is suspending the messages boxes that would normally be displayed.

 
FBAssetMng AssetManager
 Read Only Property: Current asset manager.

 
FBListAudioIn AudioInputs
 List: Available audio inputs.

 
FBListAudioOut AudioOutputs
 List: Available audio outputs.

 
str BuildId
 Read Only Property: Unique build Id string.

 
str BuildVersion
 Read Only Property: Unique build version string. The format of the build version information is: Major.Minor.Revision.BuildNumber. All sub-parts of the build version string are containing only numeric characters.

 
str ComputerName
 Read Only Property: Computer name. See sample: ShowMachineNameAndCameraNamePlusResolution.py.
 
str ConfigPath
 
FBConstructionHistory ConstructionHistory
 Read Only Property: Construction History.

 
FBTake CurrentTake
 Read Write Property: Current take. See samples: GoToNextTake.py,
 
< a href="_tasks_0c_go_to_previous_take_8py-example.html"> GoToPreviousTake py</a > FBVector2d DesktopSize
 Read Only Property: The width and height of the desktop.

 
float FrameRate
 Read Only Property: The frame rate of the viewer.

 
bool FullScreenViewer
 Read Write Property: Indicates that the viewer is in full screen mode.

 
FBTime LocalTime
 Read Only Property: Local time in take.

 
FBListManipulator Manipulators
 List: of manipulators.

 
FBEventConnectionDataNotify OnConnectionDataNotify
 Event: A data event occurred between objects in the system.

 
FBEventConnectionKeyingNotify OnConnectionKeyingNotify
 Event: A keying event occurred when objects are being keyed.

 
FBEventConnectionNotify OnConnectionNotify
 Event: A connection event occurred between objects in the system. See sample: FBSystemEvents.py.
 
FBEventConnectionStateNotify OnConnectionStateNotify
 Event: A state change event occurred between objects in the system.

 
FBEventUIIdle OnUIIdle
 Event: User-interface idle event. Useful callback for less frequent GUI refresh and etc. lightweight tasks (occur once per several frames).

 
FBEventVideoFrameRendering OnVideoFrameRendering
 Event: A video frame rendering event occurred when the scene is being off-line rendered into video files.

 
str PathImages
 Read Only Property: Path to images.

 
str PathMeshs
 Read Only Property: Path to meshes

 
float ProcessMemory
 Read Only Property: The size (MB) of process's working set memory.

 
float ProcessMemoryPeak
 Read Only Property: The size (MB) of process's peak memory.

 
int PythonVersion
 Read Only Property: The Python interpreter version being used. The value is either 27 or 37.

 
FBRenderer Renderer
 Read Only Property: Default renderer.

 
FBModel RootModel
 Read Only Property: Root model.

 
FBScene Scene
 Read Only Property: Scene.

 
FBModel SceneRootModel
 Read Only Property: Scene root model.

 
bool SuspendMessageBoxes
 Read Write Property: While true, all the message boxes, that would normally be displayed, are suspended.

 
FBTime SystemTime
 Read Only Property: System time.

 
str UserConfigPath
 
float Version
 Read Only Property: Application version.

 
FBListVideoIn VideoInputs
 List: Available video inputs.

 
FBListVideoOut VideoOutputs
 List: Available video outputs.

 
- 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

Provides access to the underlying system, and the MotionBuilder scene.


Use this class to access system properties such as the computer name, the system time, and the MotionBuilder application version.It is also used to get access to the scene (FBScene) and the current take (FBTake), as in the following Python snippet:

myScene = FBSystem().Scene
for take in myScene.Takes:
print take.Name
FBSystem()
Constructor.

The Python sample FBSystemEvents.py shows how to register a callback to FBSystem.

See samples: FBSystemEvents.py, CameraSwitcher.py, BatchExportCharacterAnimationTool.py, ExportAnimationLibrary.py.

Constructor & Destructor Documentation

◆ FBSystem()

FBSystem ( )

Constructor.

Member Function Documentation

◆ CurrentDirectory()

str CurrentDirectory ( )

Get current work directory.

Returns
current work directory.

◆ GetCommandLineArgs()

FBStringList GetCommandLineArgs ( )

Returns the command line arguments for SDK.

This function returns portion of the command line arguments within a pair of delimiters (sdk-begin & sdk-end). Example:Note that "-console", "-G500,500", "-suspendMessages" and "C:/temp/sample.fbx" are for MotionBuilder itself hence are consumed accordingly. Only those arguments between sdk-begin and sdk-end are accessible with this function. In this example, they will be "--department mocap --usage on-stage"This SDK command line argument is useful for plugin deployment and management in large production facility, where different department or different workflow may require a different set of plugins or functionality/behavior dynamically.Python users also have access to this through official built-in module sys.argv which could be parsed easily via argparse module.

Returns
the command line arguments

◆ GetLoadedPluginItemGroups()

FBStringList GetLoadedPluginItemGroups ( str  pPluginItemName)

Returns a string list containing the groups list in which the specified plug-in item's name belongs to.

Returns
the groups list in which the specified plug-in item's name belongs to.

◆ GetLoadedPluginItemInfo()

FBStringList GetLoadedPluginItemInfo ( str  pPluginItemName)

Returns a string list containing the information of the specified plug-in item's name.

A specific plug-in item information can be retrieved from the returned string list with a EPluginItemInfo enum value.

Returns
the information of the specified plug-in item's name.

◆ GetLoadedPluginItemsName()

FBStringList GetLoadedPluginItemsName ( )

Returns a string list containing the names of all the loaded plug-in.

Returns
the names of all the loaded plug-in.

◆ GetPluginPath()

FBStringList GetPluginPath ( )

Returns the plugin paths.

By default, MotionBuilder searches C++ plug-ins and load them at start-up. Users could provide additional plugin paths by setting environment variable "MOTIONBUILDER_PLUGIN_PATH" before running MotionBuilder or by adding new paths in the SDK section of the Preferences.Note: It is also possible to load C++ plug-ins at startup using the Module functionality. See the documentation around the Modules and the FBModuleManager SDK class.

Returns
the plugin paths

◆ GetPythonStartupPath()

FBStringList GetPythonStartupPath ( )

Returns the python startup path.

User could put python script in the startup folders, and MotionBuilder will search scripts from those folders and run them at startup. By default, there are two startup folders: /config/PythonStartup and /bin/config/PythonStartup. Users could append additional paths by setting environment variable "MOTIONBUILDER_PYTHON_STARTUP" before launching application.Note: It is also possible to run python scripts at startup using the Module functionality. See the documentation around the Modules and the FBModuleManager SDK class.

Returns
the python startup path

◆ MakeFullPath()

str MakeFullPath ( str  pRelativeFilePath)

Return the full path.

Parameters
pRelativeFilePathThe relative file path
Returns
Full file path based on combining the current directory

Member Data Documentation

◆ ApplicationPath

str ApplicationPath

Read Only Property: Location where the application is installed.

◆ AreMessageBoxesSuspended

bool AreMessageBoxesSuspended

Read Only Property: While true, the system is suspending the messages boxes that would normally be displayed.

◆ AssetManager

FBAssetMng AssetManager

Read Only Property: Current asset manager.

◆ AudioInputs

FBListAudioIn AudioInputs

List: Available audio inputs.

◆ AudioOutputs

FBListAudioOut AudioOutputs

List: Available audio outputs.

◆ BuildId

str BuildId

Read Only Property: Unique build Id string.

◆ BuildVersion

str BuildVersion

Read Only Property: Unique build version string. The format of the build version information is: Major.Minor.Revision.BuildNumber. All sub-parts of the build version string are containing only numeric characters.

◆ ComputerName

str ComputerName

◆ ConfigPath

str ConfigPath

◆ ConstructionHistory

FBConstructionHistory ConstructionHistory

Read Only Property: Construction History.

◆ CurrentTake

FBTake CurrentTake

Read Write Property: Current take. See samples: GoToNextTake.py,

◆ DesktopSize

<a href="_tasks_0c_go_to_previous_take_8py-example.html"> GoToPreviousTake py</a> FBVector2d DesktopSize

Read Only Property: The width and height of the desktop.

◆ FrameRate

float FrameRate

Read Only Property: The frame rate of the viewer.

◆ FullScreenViewer

bool FullScreenViewer

Read Write Property: Indicates that the viewer is in full screen mode.

◆ LocalTime

FBTime LocalTime

Read Only Property: Local time in take.

◆ Manipulators

FBListManipulator Manipulators

List: of manipulators.

◆ OnConnectionDataNotify

FBEventConnectionDataNotify OnConnectionDataNotify

Event: A data event occurred between objects in the system.

◆ OnConnectionKeyingNotify

FBEventConnectionKeyingNotify OnConnectionKeyingNotify

Event: A keying event occurred when objects are being keyed.

◆ OnConnectionNotify

FBEventConnectionNotify OnConnectionNotify

Event: A connection event occurred between objects in the system. See sample: FBSystemEvents.py.

◆ OnConnectionStateNotify

FBEventConnectionStateNotify OnConnectionStateNotify

Event: A state change event occurred between objects in the system.

◆ OnUIIdle

FBEventUIIdle OnUIIdle

Event: User-interface idle event. Useful callback for less frequent GUI refresh and etc. lightweight tasks (occur once per several frames).

◆ OnVideoFrameRendering

FBEventVideoFrameRendering OnVideoFrameRendering

Event: A video frame rendering event occurred when the scene is being off-line rendered into video files.

◆ PathImages

str PathImages

Read Only Property: Path to images.

◆ PathMeshs

str PathMeshs

Read Only Property: Path to meshes

◆ ProcessMemory

float ProcessMemory

Read Only Property: The size (MB) of process's working set memory.

◆ ProcessMemoryPeak

float ProcessMemoryPeak

Read Only Property: The size (MB) of process's peak memory.

◆ PythonVersion

int PythonVersion

Read Only Property: The Python interpreter version being used. The value is either 27 or 37.

◆ Renderer

FBRenderer Renderer

Read Only Property: Default renderer.

◆ RootModel

FBModel RootModel

Read Only Property: Root model.

◆ Scene

FBScene Scene

Read Only Property: Scene.

◆ SceneRootModel

FBModel SceneRootModel

Read Only Property: Scene root model.

◆ SuspendMessageBoxes

bool SuspendMessageBoxes

Read Write Property: While true, all the message boxes, that would normally be displayed, are suspended.

◆ SystemTime

FBTime SystemTime

Read Only Property: System time.

◆ UserConfigPath

str UserConfigPath

◆ Version

float Version

Read Only Property: Application version.

◆ VideoInputs

FBListVideoIn VideoInputs

List: Available video inputs.

◆ VideoOutputs

FBListVideoOut VideoOutputs

List: Available video outputs.