Provides access to the underlying system, and the MotionBuilder scene. More...
#include <fbsystem.h>
Public Types | |
enum | EPluginItemInfo { ePluginItemDescription , ePluginItemFileName , ePluginItemIconName } |
Array index of each plug-in item information (see the GetLoadedPluginItemInfo() member function). More... | |
Public Member Functions | |
FBSystem () | |
Constructor. More... | |
const FBStringList & | GetCommandLineArgs () const |
Returns the command line arguments for SDK. More... | |
const FBStringList & | GetPythonStartupPath () const |
Returns the python startup path. More... | |
const FBStringList & | GetPluginPath () const |
Returns the plugin paths. More... | |
const FBStringList & | GetLoadedPluginItemsName () const |
Returns a string list containing the names of all the loaded plug-in. More... | |
const FBStringList & | GetLoadedPluginItemInfo (const char *pPluginItemName) const |
Returns a string list containing the information of the specified plug-in item's name. More... | |
const FBStringList & | GetLoadedPluginItemGroups (const char *pPluginItemName) const |
Returns a string list containing the groups list in which the specified plug-in item's name belongs to. More... | |
![]() | |
FBComponent (HIObject pObject) | |
Constructor. More... | |
virtual | ~FBComponent () |
Destructor. More... | |
virtual bool | FBCreate () |
Open Reality Creation function. More... | |
virtual void | FBDestroy () |
Open Reality destruction function. More... | |
virtual void | FBDelete () override |
Open Reality deletion function. More... | |
virtual bool | SetHIObject (HIObject pObject, bool pSDKComponent) override |
Assign component to an internal pointer. More... | |
virtual int | PropertyAdd (FBProperty *pProperty) |
Add a property to the component's property manager. More... | |
bool | PropertyAddReferenceProperty (FBProperty *pReferenceProperty) |
Add a reference property to the component's property manager. More... | |
void | PropertyRemove (FBProperty *pProperty) |
Remove a Property from the component's Property manager. More... | |
void | PropertyGetModifiedList (FBArrayTemplate< FBProperty * > &pPropList, FBPlugModificationFlag pModificationFlags) |
Get list of properties which have been modified since last loading. More... | |
FBProperty * | PropertyCreate (const char *pName, FBPropertyType pType, const char *pDataType, bool pAnimatable, bool pIsUser=false, FBProperty *pReferenceSource=NULL) |
Create user or dynamic property. More... | |
FBObjectFlag | GetObjectFlags () |
Get all Object Flags (concatenated). More... | |
void | SetObjectFlags (FBObjectFlag pFlags) |
SetObjectFlags. More... | |
bool | HasObjectFlags (FBObjectFlag pFlags) |
Check whether a specific object flag is enabled. More... | |
void | EnableObjectFlags (FBObjectFlag pFlags) |
Enable a specific Object Flags. More... | |
void | DisableObjectFlags (FBObjectFlag pFlags) |
Disable a specific Object Flags. More... | |
void | SetObjectStatus (FBObjectStatus pStatus, bool pValue) |
Enable/Disable a specific Object Status. More... | |
bool | GetObjectStatus (FBObjectStatus pStatus) |
Check to see if an object status is enabled. More... | |
bool | ProcessNamespaceHierarchy (FBNamespaceAction pNamespaceAction, const char *pNamespaceName, const char *pReplaceTo=NULL, bool pAddRight=true) |
ProcessNamespaceHierarchy. More... | |
bool | ProcessObjectNamespace (FBNamespaceAction pNamespaceAction, const char *pNamespaceName, const char *pReplaceTo=NULL, bool pAddRight=true) |
ProcessObjectNamespace. More... | |
virtual const char * | ClassName () override |
Get the class name. More... | |
virtual bool | UseCustomPropertyViewSet () const |
Use the custom property viewSet or not. More... | |
const char * | GetFullName (void) |
Get the full name. More... | |
void | SetOwnerNamespace (FBNamespace *pOwnerNSObj) |
Set the owner Namespace object. More... | |
FBNamespace * | GetOwnerNamespace (void) |
Get the owner Namespace object. More... | |
FBFileReference * | GetOwnerFileReference (void) |
Get the owner FileReference object. More... | |
void | HardSelect () |
HardSelect. More... | |
virtual bool | Is (int pTypeId) override |
Returns true if object is of type TypeId. More... | |
virtual int | GetTypeId () override |
GetTypeId( int pTypeId ) More... | |
![]() | |
FBScriptWrapper * | GetWrapper () |
Return the wrapper interface of this FBObject. More... | |
void | AddWrapper (FBScriptWrapper *) |
void | RemoveWrapper (FBScriptWrapper *) |
Static Public Member Functions | |
static bool | LibraryLoad (const char *pPath) |
Load a library (DLL) into memory. More... | |
static void * | LibraryGetProcAddress (const char *pPath, const char *pFunctionName) |
Get the the address of a function in a specified library. More... | |
static bool | LibraryFree (const char *pPath) |
Free a library (DLL) from memory. More... | |
static FBString | CurrentDirectory () |
Get current work directory. More... | |
static FBString | MakeFullPath (const char *pRelativeFilePath) |
Return the full path. More... | |
static FBSystem & | TheOne () |
Get the global FBSystem object. More... | |
![]() | |
static int | GetInternalClassId () |
static void | FBComponentSetName (FBComponent *pObject, const char *pName) |
static const char * | FBComponentGetName (FBComponent *pObject) |
static void | FBComponentSetLongName (FBComponent *pObject, const char *pName) |
static const char * | FBComponentGetLongName (FBComponent *pObject) |
Public Attributes | |
FBPropertyString | ConfigPath |
FBPropertyString | UserConfigPath |
FBPropertyString | ApplicationPath |
Read Only Property: Location where the application is installed. More... | |
FBPropertyString | TempPath |
Read Only Property: Temporary path returned by the OS. More... | |
FBPropertyEventUIIdle | OnUIIdle |
Event: User-interface idle event. Useful callback for less frequent GUI refresh and etc. lightweight tasks (occur once per several frames). More... | |
FBPropertyEventVideoFrameRendering | OnVideoFrameRendering |
Event: A video frame rendering event occurred when the scene is being off-line rendered into video files. More... | |
FBPropertyEventConnectionNotify | OnConnectionNotify |
Event: A connection event occurred between objects in the system. More... | |
FBPropertyEventConnectionDataNotify | OnConnectionDataNotify |
Event: A data event occurred between objects in the system. More... | |
FBPropertyEventConnectionStateNotify | OnConnectionStateNotify |
Event: A state change event occurred between objects in the system. More... | |
FBPropertyEventConnectionKeyingNotify | OnConnectionKeyingNotify |
Event: A keying event occurred when objects are being keyed. More... | |
FBPropertyString | ComputerName |
Read Only Property: Computer name. More... | |
FBPropertyDouble | Version |
Read Only Property: Application version. More... | |
FBPropertyString | BuildId |
Read Only Property: Unique build Id string. More... | |
FBPropertyString | 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. More... | |
FBPropertyInt | PythonVersion |
Read Only Property: The Python interpreter version being used. The value is either 27 or 37. More... | |
FBPropertyBool | SuspendMessageBoxes |
Read Write Property: While true, all the message boxes, that would normally be displayed, are suspended. More... | |
FBPropertyBool | AreMessageBoxesSuspended |
Read Only Property: While true, the system is suspending the messages boxes that would normally be displayed. More... | |
FBPropertyTime | SystemTime |
Read Only Property: System time. More... | |
FBPropertyTime | LocalTime |
Read Only Property: Local time in take. More... | |
FBPropertyTake | CurrentTake |
Read Write Property: Current take. More... | |
FBPropertyScene | Scene |
Read Only Property: Scene. More... | |
FBPropertyConstructionHistory | ConstructionHistory |
Read Only Property: Construction History. More... | |
FBPropertyModel | SceneRootModel |
Read Only Property: Scene root model. More... | |
FBPropertyModel | RootModel |
Read Only Property: Root model. More... | |
FBPropertyString | PathImages |
Read Only Property: Path to images. More... | |
FBPropertyString | PathMeshs |
Read Only Property: Path to meshes More... | |
FBPropertyListAudioIn | AudioInputs |
List: Available audio inputs. More... | |
FBPropertyListAudioOut | AudioOutputs |
List: Available audio outputs. More... | |
FBPropertyListVideoIn | VideoInputs |
List: Available video inputs. More... | |
FBPropertyListVideoOut | VideoOutputs |
List: Available video outputs. More... | |
FBPropertyListCommPort | CommPorts |
List: Comm Ports available. More... | |
FBPropertyRenderer | Renderer |
Read Only Property: Default renderer. More... | |
FBPropertyDouble | FrameRate |
Read Only Property: The frame rate of the viewer. More... | |
FBPropertyDouble | ProcessMemory |
Read Only Property: The size (MB) of process's working set memory. More... | |
FBPropertyDouble | ProcessMemoryPeak |
Read Only Property: The size (MB) of process's peak memory. More... | |
FBPropertyVector2d | DesktopSize |
Read Only Property: The width and height of the desktop. More... | |
FBPropertyBool | FullScreenViewer |
Read Write Property: Indicates that the viewer is in full screen mode. More... | |
FBPropertyAssetMng | AssetManager |
Read Only Property: Current asset manager. More... | |
FBPropertyListManipulator | Manipulators |
List: of manipulators. More... | |
![]() | |
FBPropertyManager | PropertyList |
Read Only Property: Manages all of the properties for the component. More... | |
FBPropertyListComponent | Components |
List: List of components. More... | |
FBPropertyListComponent | Parents |
List: Parents. More... | |
FBPropertyBool | Selected |
Read Write Property: Selected property. More... | |
FBPropertyString | Name |
Read Write Property: Unique name of object. More... | |
FBPropertyString | LongName |
Read Write Property: Name and namespace for object. More... | |
FBPropertyFolder | Folder |
Read Write Property: The folder that contain this component. More... | |
Additional Inherited Members | |
![]() | |
static int | TypeInfo |
Contains the Type information of the object. More... | |
![]() | |
bool | IsSDKComponent () |
Return whether or not item is an SDK component. More... | |
bool | ConnectSrc (FBPlug *pSrc, FBConnectionType pConnectionType=kFBConnectionTypeNone) |
Add a source connection. More... | |
bool | ConnectDst (FBPlug *pDst, FBConnectionType pConnectionType=kFBConnectionTypeNone) |
Add a destination connection. More... | |
bool | ConnectSrcAt (int pDst_SrcIndex, FBPlug *pSrc, FBConnectionType pConnectionType=kFBConnectionTypeNone) |
Add a source connection. More... | |
bool | ConnectDstAt (int pSrc_DstIndex, FBPlug *pDst, FBConnectionType pConnectionType=kFBConnectionTypeNone) |
Add a destination connection. More... | |
bool | DisconnectDst (FBPlug *pDst) |
Remove a destination connection. More... | |
bool | DisconnectSrc (FBPlug *pSrc) |
Remove a source connection. More... | |
void | DisconnectAllSrc () |
Remove all source connections. More... | |
void | DisconnectAllDst () |
Remove all destination connections. More... | |
bool | DisconnectDstAt (int pIndex) |
Remove a destination connection at a specified index. More... | |
bool | DisconnectSrcAt (int pIndex) |
Remove a source connection at a specified index. More... | |
bool | ReplaceDstAt (int pIndex, FBPlug *pDst) |
Replace a destination connection at a specified index. More... | |
bool | ReplaceSrcAt (int pIndex, FBPlug *pSrc) |
Replace a source connection at a specified index. More... | |
bool | SwapSrc (int pIndexA, int pIndexB) |
Swap source connection at index A with source connection at index B. More... | |
bool | MoveSrcAt (int pIndex, int pAtIndex) |
Move source connection at pIndex to pAtIndex. More... | |
bool | MoveSrcAt (FBPlug *pSrc, FBPlug *pAtSrc) |
Move source connection pSrc to the position of pAtSrc. More... | |
int | GetSrcCount () |
Get source connection count. More... | |
FBPlug * | GetSrc (int pIndex) |
Get a source connection's plug at specified index. More... | |
FBConnectionType | GetSrcType (int pIndex) |
Get a source connection's type at specified index. More... | |
int | GetDstCount () |
Get destination connection count. More... | |
FBPlug * | GetDst (int pIndex) |
Get a destination connection's plug at specified index. More... | |
FBConnectionType | GetDstType (int pIndex) |
Get a destination connection's type at specified index. More... | |
bool | BeginChange () |
Begins a change on multiple plugs. More... | |
void | EndChange () |
Ends a change on multiple plugs. More... | |
void | SetSelfModified (FBPlugModificationFlag pFlag, bool pBool) |
Set the plug's self modification flag. More... | |
bool | GetSelfModified (FBPlugModificationFlag pFlag) |
Tell if the plug's self has changed. More... | |
void | SetContentModified (FBPlugModificationFlag pFlag, bool pBool) |
Set the plug's owned property/object's modification flag. More... | |
bool | GetContentModified (FBPlugModificationFlag pFlag) |
Tell if the plug's content has changed. More... | |
int | GetPlugConnectionModifiedList (FBPlugList &pPlugList, FBPlugModificationFlag pConnectionModificatonFlag, bool pAddRemove) |
Get plug's modified src/dst property/object connection added/removed List. More... | |
bool | RevertModification (FBPlugModificationFlag pFlag=kFBAllModifiedMask) |
Revert the plug's modification to original status. More... | |
void | SetStatusFlag (FBPlugStatusFlag pStatus, bool pValue) |
Set the plug's status flag. More... | |
bool | GetStatusFlag (FBPlugStatusFlag pStatus) const |
Tell if the plug's status has changed. More... | |
FBPlug * | GetOwner () |
Get the owner of this plug. More... | |
FBPlug * | GetOwned (int pIndex) |
Get the owned plug at specified index. More... | |
int | GetOwnedCount () |
Get the owned plug count. More... | |
virtual bool | PlugDataNotify (FBConnectionAction pAction, FBPlug *pThis, void *pData=NULL, void *pDataOld=NULL, int pDataSize=0) |
PlugDataNotify when overloaded is equivalent of FBSystem.OnConnectionDataNotify but in the context of the derived object only. More... | |
virtual bool | PlugStateNotify (FBConnectionAction pAction, FBPlug *pThis, void *pData=NULL, void *pDataOld=NULL, int pDataSize=0) |
PlugStateNotify when overloaded is equivalent of FBSystem.OnConnectionStateNotify but in the context of the derived object only. More... | |
virtual bool | PlugNotify (FBConnectionAction pAction, FBPlug *pThis, int pIndex, FBPlug *pPlug=NULL, FBConnectionType pConnectionType=kFBConnectionTypeNone, FBPlug *pNewPlug=NULL) |
PlugNotify when overloaded is equivalent of FBSystem.OnConnectionNotify but in the context of the derived object only. More... | |
![]() | |
static int | GetInternalClassId () |
Internal class Id. More... | |
![]() | |
bool | mAllocated |
Contain the Allocation State of the Component. More... | |
HIObject | mObject |
Handle on the Plug. More... | |
bool | mSDKComponent |
bool Plug is an SDK component. More... | |
![]() | |
static const char * | ClassGroupName |
ClassGroupName of the object. More... | |
static int | TypeInfo |
TypeInfo. More... | |
static int | mGlobalTypeInfo |
Represente the Type Index. More... | |
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:
The Python sample FBSystemEvents.py shows how to register a callback to FBSystem.
Definition at line 157 of file fbsystem.h.
enum EPluginItemInfo |
Array index of each plug-in item information (see the GetLoadedPluginItemInfo() member function).
Enumerator | |
---|---|
ePluginItemDescription | Plug-in item's description. |
ePluginItemFileName | Plug-in item's filename. |
ePluginItemIconName | Plug-in item's icon name. |
Definition at line 309 of file fbsystem.h.
FBSystem | ( | ) |
Constructor.
|
static |
Get current work directory.
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", "-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.
const FBStringList& GetLoadedPluginItemGroups | ( | const char * | pPluginItemName | ) | const |
Returns a string list containing the groups list in which the specified plug-in item's name belongs to.
const FBStringList& GetLoadedPluginItemInfo | ( | const char * | pPluginItemName | ) | const |
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.
const FBStringList& GetLoadedPluginItemsName | ( | ) | const |
Returns a string list containing the names of all the loaded plug-in.
const FBStringList& GetPluginPath | ( | ) | const |
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.
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.
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.
|
static |
Free a library (DLL) from memory.
pPath | Library path. |
|
static |
Get the the address of a function in a specified library.
pPath | Library path. |
pFunctionName | Function name. |
|
static |
Load a library (DLL) into memory.
pPath | Library path. |
|
static |
Return the full path.
pRelativeFilePath | The relative file path |
FBPropertyString ApplicationPath |
Read Only Property: Location where the application is installed.
Definition at line 166 of file fbsystem.h.
FBPropertyBool AreMessageBoxesSuspended |
Read Only Property: While true, the system is suspending the messages boxes that would normally be displayed.
It will return true if either the -suspendMessages argument is set when launching MotionBuilder or if the SuspendMessageBoxes property, used as a temporary solution, is currently set to true.
Definition at line 189 of file fbsystem.h.
FBPropertyAssetMng AssetManager |
Read Only Property: Current asset manager.
Definition at line 226 of file fbsystem.h.
FBPropertyListAudioIn AudioInputs |
List: Available audio inputs.
Definition at line 207 of file fbsystem.h.
FBPropertyListAudioOut AudioOutputs |
List: Available audio outputs.
Definition at line 208 of file fbsystem.h.
FBPropertyString BuildId |
Read Only Property: Unique build Id string.
Definition at line 179 of file fbsystem.h.
FBPropertyString 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.
Definition at line 180 of file fbsystem.h.
FBPropertyListCommPort CommPorts |
List: Comm Ports available.
Definition at line 216 of file fbsystem.h.
FBPropertyString ComputerName |
Read Only Property: Computer name.
Definition at line 177 of file fbsystem.h.
FBPropertyConstructionHistory ConstructionHistory |
Read Only Property: Construction History.
Definition at line 199 of file fbsystem.h.
FBPropertyTake CurrentTake |
Read Write Property: Current take.
Definition at line 195 of file fbsystem.h.
FBPropertyVector2d DesktopSize |
Read Only Property: The width and height of the desktop.
Definition at line 222 of file fbsystem.h.
FBPropertyDouble FrameRate |
Read Only Property: The frame rate of the viewer.
Definition at line 219 of file fbsystem.h.
FBPropertyBool FullScreenViewer |
Read Write Property: Indicates that the viewer is in full screen mode.
Definition at line 223 of file fbsystem.h.
FBPropertyTime LocalTime |
Read Only Property: Local time in take.
Definition at line 194 of file fbsystem.h.
FBPropertyListManipulator Manipulators |
List: of manipulators.
Definition at line 230 of file fbsystem.h.
FBPropertyEventConnectionDataNotify OnConnectionDataNotify |
Event: A data event occurred between objects in the system.
Definition at line 173 of file fbsystem.h.
FBPropertyEventConnectionKeyingNotify OnConnectionKeyingNotify |
Event: A keying event occurred when objects are being keyed.
Definition at line 175 of file fbsystem.h.
FBPropertyEventConnectionNotify OnConnectionNotify |
Event: A connection event occurred between objects in the system.
Definition at line 172 of file fbsystem.h.
FBPropertyEventConnectionStateNotify OnConnectionStateNotify |
Event: A state change event occurred between objects in the system.
Definition at line 174 of file fbsystem.h.
FBPropertyEventUIIdle OnUIIdle |
Event: User-interface idle event. Useful callback for less frequent GUI refresh and etc. lightweight tasks (occur once per several frames).
Definition at line 169 of file fbsystem.h.
FBPropertyEventVideoFrameRendering OnVideoFrameRendering |
Event: A video frame rendering event occurred when the scene is being off-line rendered into video files.
Definition at line 170 of file fbsystem.h.
FBPropertyString PathImages |
Read Only Property: Path to images.
Definition at line 203 of file fbsystem.h.
FBPropertyString PathMeshs |
Read Only Property: Path to meshes
Definition at line 204 of file fbsystem.h.
FBPropertyDouble ProcessMemory |
Read Only Property: The size (MB) of process's working set memory.
Definition at line 220 of file fbsystem.h.
FBPropertyDouble ProcessMemoryPeak |
Read Only Property: The size (MB) of process's peak memory.
Definition at line 221 of file fbsystem.h.
FBPropertyInt PythonVersion |
Read Only Property: The Python interpreter version being used. The value is either 27 or 37.
Definition at line 181 of file fbsystem.h.
FBPropertyRenderer Renderer |
Read Only Property: Default renderer.
Definition at line 217 of file fbsystem.h.
FBPropertyModel RootModel |
Read Only Property: Root model.
Definition at line 202 of file fbsystem.h.
FBPropertyScene Scene |
Read Only Property: Scene.
Definition at line 197 of file fbsystem.h.
FBPropertyModel SceneRootModel |
Read Only Property: Scene root model.
Definition at line 201 of file fbsystem.h.
FBPropertyBool SuspendMessageBoxes |
Read Write Property: While true, all the message boxes, that would normally be displayed, are suspended.
This property should be used as a temporary solution for unwanted message boxes, while running a script for example. For system wide usage, the -suspendMessages argument, set when launching MotionBuilder, should be used instead. To test if the system is suspending the message boxes either temporarily or permanently, the AreMessageBoxesSuspended property should be used instead.
Definition at line 184 of file fbsystem.h.
FBPropertyTime SystemTime |
Read Only Property: System time.
Definition at line 193 of file fbsystem.h.
FBPropertyString TempPath |
Read Only Property: Temporary path returned by the OS.
Definition at line 167 of file fbsystem.h.
FBPropertyDouble Version |
Read Only Property: Application version.
Definition at line 178 of file fbsystem.h.
FBPropertyListVideoIn VideoInputs |
List: Available video inputs.
Definition at line 212 of file fbsystem.h.
FBPropertyListVideoOut VideoOutputs |
List: Available video outputs.
Definition at line 213 of file fbsystem.h.