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

FBConstructionOperation is used to represent an operation in the construction history. More...

#include <pyfbsdk_generated.h>

Inheritance diagram for FBConstructionOperation:

Public Member Functions

 FBConstructionOperation ()
 Constructor.
 
 FBConstructionOperation (FBConstructionOperation pOperation)
 
int GetCommandId ()
 
bool GetExecuteAsLocalOperation ()
 
str GetLanguage ()
 
int GetLanguageVersion ()
 
str GetOrigin ()
 
str GetScript ()
 
 SetCommandId (int commandId)
 SetCommandId Set the operation's Id so that operation transactions can be resolved properly (eg: command 1 should go before command 2).
 
 SetExecuteAsLocalOperation (bool bIsLocal)
 SetExecuteAsLocalOperation Whether to execute this operation as local or remote.
 
 SetLanguage (str language)
 SetLanguage Set the script language for this operation.
 
 SetLanguageVersion (int version)
 SetLanguageVersion Set the script language interpreter's version that this operation should be interpreted with.
 
 SetOrigin (str origin)
 SetOrigin Set operation's original creator.
 
 SetScript (str script)
 SetScript Set the script content for this operation.
 

Detailed Description

FBConstructionOperation is used to represent an operation in the construction history.


The operation can be any valid script. Currently, only python scripts are supported.An instance of this class defaults to the correct value in order to add a new construction history. If the workgroup plugin is loaded, the operation will be replicated on all machine within a session.

Constructor & Destructor Documentation

◆ FBConstructionOperation() [1/2]

Constructor.

◆ FBConstructionOperation() [2/2]

Member Function Documentation

◆ GetCommandId()

int GetCommandId ( )

◆ GetExecuteAsLocalOperation()

bool GetExecuteAsLocalOperation ( )

◆ GetLanguage()

str GetLanguage ( )

◆ GetLanguageVersion()

int GetLanguageVersion ( )

◆ GetOrigin()

str GetOrigin ( )

◆ GetScript()

str GetScript ( )

◆ SetCommandId()

SetCommandId ( int  commandId)

SetCommandId Set the operation's Id so that operation transactions can be resolved properly (eg: command 1 should go before command 2).

Set this to -1 for new operations.

Parameters
commandIdCommand Id. Defaults to -1.

◆ SetExecuteAsLocalOperation()

SetExecuteAsLocalOperation ( bool  bIsLocal)

SetExecuteAsLocalOperation Whether to execute this operation as local or remote.

If this is set to false (remote) and an operation is sent to the construction history, it will also execute locally on this motionbuilder.

Parameters
bIsLocalDefaults to true (local).

◆ SetLanguage()

SetLanguage ( str  language)

SetLanguage Set the script language for this operation.

Currently only "python" is supported.

Parameters
languageLangugage string. Default to construction history's code generator's language (Currently "python").

◆ SetLanguageVersion()

SetLanguageVersion ( int  version)

SetLanguageVersion Set the script language interpreter's version that this operation should be interpreted with.

Parameters
versionVersion number. Defaults to construction history's code generator's version (Currently 1).

◆ SetOrigin()

SetOrigin ( str  origin)

SetOrigin Set operation's original creator.

For instance "localhost" or . Should mostly be "localhost" for new operations.

Parameters
originOperation's Origin. Defaults to "localhost".

◆ SetScript()

SetScript ( str  script)

SetScript Set the script content for this operation.

Parameters
scriptScript content as a string. Defaults to empty.