Public Member Functions | Static Public Member Functions | Public Attributes

FBSystem Class Reference

This reference page is linked to from the following overview topics: MotionBuilder 2014, MotionBuilder 2013, Your First Python Program, Object Model, FBSystem - The System Class, FBScene - The Scene Class, Overview of the Architecture.


Search for all occurrences

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

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

Definition at line 190 of file fbsystem.h.

#include <fbsystem.h>

Inheritance diagram for FBSystem:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 FBSystem ()
 Constructor.
const FBStringListGetCommandLineArgs () const
 Returns the command line arguments for SDK.
const FBStringListGetPythonStartupPath () const
 Returns the python startup path.
const FBStringListGetPluginPath () const
 Returns the plugin path.

Static Public Member Functions

static bool LibraryLoad (const char *pPath)
 Load a library (DLL) into memory.
static void * LibraryGetProcAddress (const char *pPath, const char *pFunctionName)
 Get the the address of a function in a specified library.
static bool LibraryFree (const char *pPath)
 Free a library (DLL) from memory.
static FBString CurrentDirectory ()
 Get current work directory.
static FBString MakeFullPath (const char *pRelativeFilePath)
 Return the full path.
static FBSystemTheOne ()
 Get the global FBSystem object.

Public Attributes

FBPropertyString ConfigPath
FBPropertyString UserConfigPath
FBPropertyString ApplicationPath
 Read Only Property: Location where the application is installed.
FBPropertyString TempPath
 Read Only Property: Temporary path returned by the OS.
FBPropertyEventUIIdle OnUIIdle
 Event: User-interface idle event.
FBPropertyEventVideoFrameRendering OnVideoFrameRendering
 Event: A video frame rendering event occurred when the scene is being off-line rendered into video files.
FBPropertyEventConnectionNotify OnConnectionNotify
 Event: A connection event occurred between objects in the system.
FBPropertyEventConnectionDataNotify OnConnectionDataNotify
 Event: A data event occurred between objects in the system.
FBPropertyEventConnectionStateNotify OnConnectionStateNotify
 Event: A state change event occurred between objects in the system.
FBPropertyEventConnectionKeyingNotify OnConnectionKeyingNotify
 Event: A keying event occurred when objects are being keyed.
FBPropertyString ComputerName
 Read Only Property: Computer name.
FBPropertyDouble Version
 Read Only Property: Application version.
FBPropertyString BuildId
 Read Only Property: Unique build Id String.
FBPropertyTime SystemTime
 Read Only Property: System time.
FBPropertyTime LocalTime
 Read Only Property: Local time in take.
FBPropertyTake CurrentTake
 Read Write Property: Current take.
FBPropertyScene Scene
 Read Only Property: Scene.
FBPropertyModel SceneRootModel
 Read Only Property: Scene root model.
FBPropertyModel RootModel
 Read Only Property: Root model.
FBPropertyString PathImages
 Read Only Property: Path to images.
FBPropertyString PathMeshs
 Read Only Property: Path to meshes
FBPropertyListAudioIn AudioInputs
 List: Available audio inputs.
FBPropertyListAudioOut AudioOutputs
 List: Available audio outputs.
FBPropertyListVideoIn VideoInputs
 List: Available video inputs.
FBPropertyListVideoOut VideoOutputs
 List: Available video outputs.
FBPropertyListCommPort CommPorts
 List: Comm Ports available.
FBPropertyRenderer Renderer
 Read Only Property: Default renderer.
FBPropertyDouble FrameRate
 Read Only Property: The frame rate of the viewer.
FBPropertyDouble ProcessMemory
 Read Only Property: The size (MB) of process's working set memory.
FBPropertyDouble ProcessMemoryPeak
 Read Only Property: The size (MB) of process's peak memory.
FBPropertyVector2d DesktopSize
 Read Only Property: The width and height of the desktop.
FBPropertyBool FullScreenViewer
 Read Write Property: Indicates that the viewer is in full screen mode.
FBPropertyAssetMng AssetManager
 Read Only Property: Current asset manager.
FBPropertyListManipulator Manipulators
 List: of manipulators.

Constructor & Destructor Documentation

FBSystem ( )

Constructor.


Member Function Documentation

static bool LibraryLoad ( const char *  pPath) [static]

Load a library (DLL) into memory.

Parameters:
pPathLibrary path.
Returns:
true if successful.
static void* LibraryGetProcAddress ( const char *  pPath,
const char *  pFunctionName 
) [static]

Get the the address of a function in a specified library.

Parameters:
pPathLibrary path.
pFunctionNameFunction name.
Returns:
true if successful.
static bool LibraryFree ( const char *  pPath) [static]

Free a library (DLL) from memory.

Parameters:
pPathLibrary path.
Returns:
true if successful.
static FBString CurrentDirectory ( ) [static]

Get current work directory.

Returns:
current work directory.
static FBString MakeFullPath ( const char *  pRelativeFilePath) [static]

Return the full path.

Parameters:
pRelativeFilePathThe relative file path
Returns:
Full file path based on combining the current directory
static FBSystem& TheOne ( ) [static]

Get the global FBSystem object.

Returns:
the global object.
const FBStringList& GetCommandLineArgs ( ) const

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:

>>> motionbuilder -console -g500,500 -suspendMessages --sdk-begin --department mocap --usage on-stage --sdk-end C:/temp/sample.fbx

Note that "-console", "-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
const FBStringList& GetPythonStartupPath ( ) const

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.

Returns:
the python startup path
const FBStringList& GetPluginPath ( ) const

Returns the plugin path.

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.

Returns:
the plugin path

Member Data Documentation

Definition at line 197 of file fbsystem.h.

Definition at line 198 of file fbsystem.h.

Read Only Property: Location where the application is installed.

Definition at line 199 of file fbsystem.h.

Read Only Property: Temporary path returned by the OS.

Definition at line 200 of file fbsystem.h.

Event: User-interface idle event.

Useful callback for less frequent GUI refresh and etc. lightweight tasks (occur once per several frames).

Definition at line 202 of file fbsystem.h.

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

Definition at line 203 of file fbsystem.h.

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

Definition at line 205 of file fbsystem.h.

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

Definition at line 206 of file fbsystem.h.

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

Definition at line 207 of file fbsystem.h.

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

Definition at line 208 of file fbsystem.h.

Read Only Property: Computer name.

Definition at line 210 of file fbsystem.h.

Read Only Property: Application version.

Definition at line 211 of file fbsystem.h.

Read Only Property: Unique build Id String.

Definition at line 212 of file fbsystem.h.

Read Only Property: System time.

Definition at line 215 of file fbsystem.h.

Read Only Property: Local time in take.

Definition at line 216 of file fbsystem.h.

FBPropertyTake CurrentTake

Read Write Property: Current take.

Definition at line 217 of file fbsystem.h.

FBPropertyScene Scene

Read Only Property: Scene.

Definition at line 219 of file fbsystem.h.

FBPropertyModel SceneRootModel

Read Only Property: Scene root model.

Definition at line 220 of file fbsystem.h.

FBPropertyModel RootModel

Read Only Property: Root model.

Definition at line 221 of file fbsystem.h.

Read Only Property: Path to images.

Definition at line 222 of file fbsystem.h.

Read Only Property: Path to meshes

Definition at line 223 of file fbsystem.h.

List: Available audio inputs.

Definition at line 226 of file fbsystem.h.

List: Available audio outputs.

Definition at line 227 of file fbsystem.h.

List: Available video inputs.

Definition at line 231 of file fbsystem.h.

List: Available video outputs.

Definition at line 232 of file fbsystem.h.

List: Comm Ports available.

Definition at line 235 of file fbsystem.h.

FBPropertyRenderer Renderer

Read Only Property: Default renderer.

Definition at line 236 of file fbsystem.h.

Read Only Property: The frame rate of the viewer.

Definition at line 238 of file fbsystem.h.

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

Definition at line 239 of file fbsystem.h.

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

Definition at line 240 of file fbsystem.h.

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

Definition at line 241 of file fbsystem.h.

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

Definition at line 242 of file fbsystem.h.

FBPropertyAssetMng AssetManager

Read Only Property: Current asset manager.

Definition at line 245 of file fbsystem.h.

List: of manipulators.

Definition at line 249 of file fbsystem.h.


The documentation for this class was generated from the following file:

FBSystem FBSystem FBSystem FBSystem FBSystem FBSystem FBSystem FBSystem FBSystem FBSystem
FBSystem FBSystem FBSystem FBSystem FBSystem FBSystem FBSystem FBSystem FBSystem FBSystem