Model

Inheritance diagram

Inheritance diagram of ORSModel.ors.Model

Classes

Model

class ORSModel.ors.Model

Main gateway into the ORS Core library.

static addAListOfObjectsToSelection(aListOfObjects, contextInstance)

Adds a list of objects to selection for a given context.

Parameters:
  • aListOfObjects (ORSModel.ors.Managed) [count=[0, None]] – list of objects to add (list)

  • contextInstance (plugin instance) – context instance

Note

Only representable object can be un selected

addCallbackToClassEvent(aClassName: str, anEventName: str, sCallbackName: str, callbackInfo: bytes, permanent: bool) bool
Parameters:
  • aClassName (str) –

  • anEventName (str) –

  • sCallbackName (str) –

  • callbackInfo (bytes) –

  • permanent (bool) –

Returns:

output (bool) – true if operation was successful, false otherwise (the callback already existed)

addCallbackToGlobalEvent(anEventName: str, sCallbackName: str, callbackInfo: bytes, permanent: bool) bool
Parameters:
  • anEventName (str) –

  • sCallbackName (str) –

  • callbackInfo (bytes) –

  • permanent (bool) –

Returns:

output (bool) – true if operation was successful, false otherwise (the callback already existed)

canExecuteGPGPUCommand(inputGUID: str, GPGPUCommand: str) int

verifiy if the execution for a GPGPU shader file on the object is possible

Parameters:
  • inputGUID (str) –

  • GPGPUCommand (str) –

Returns:

output (int) – true succeeded, false otherwise

deleteAllObjects(pFinalExit: bool)

Deletes every core object.

Parameters:

pFinalExit (bool) –

executeGPGPUCommand(inputGUID: str, outputGUID: str, GPGPUCommand: str, numericArgument: dict) bool

execute an GPGPU shader file on the object in arguement.

Parameters:
  • inputGUID (str) –

  • outputGUID (str) –

  • GPGPUCommand (str) –

  • numericArgument (dict) –

Returns:

output (bool) – true succeeded, false otherwise

getActiveWorkerThreadsCount() int

Returns the number of active worker threads.

Returns:

output (int) – a count of active worker threads (a uint32_t)

static getAllSelectedObjectsOfClass(pProgId, contextInstance)

Returns a flattened list of all representable selected object of the given class and context.

Parameters:
  • pProgId (str) – the ProgId of the class to test against

  • contextInstance (plugin instance) – context instance

Returns:

output (ORSModel.ors.Managed) [count=[0, None]] – a list of all selected objects

getAvailableCPUCount() int
Returns:

output (int) –

getBuildNumber() str

Returns the Core library internal build number.

Returns:

output (str) – a build number text (a string)

getClassEventCallbackEnabled(aClassName: str, sEventName: str, sCallbackName: str) bool
Parameters:
  • aClassName (str) –

  • sEventName (str) –

  • sCallbackName (str) –

Returns:

output (bool) –

getCredentialsFilePath() str
Returns:

output (str) –

getCurrentActivationFor(product: int) str
Parameters:

product (int) –

Returns:

output (str) –

classmethod getCurrentAvailableGPUMemoryNVIDIADisplay()

Returns available GPU memory (in kb) on current NVIDIA display.

Note

This function should not be called in a run in back ground function. Also application should be running so that the OpenGL context is started.

getCurrentLicenseInformationFor(product: int) str
Parameters:

product (int) –

Returns:

output (str) –

getDLLFilename() str

Returns the Core library file name.

Returns:

output (str) – a fully qualified file path (a string)

getDLLVersion() str

Returns the Core library internal version.

Returns:

output (str) – a version text (a string)

getDebugMode() bool

Checks if the Core library is in debug mode.

Returns:

output (bool) – true if in debug mode, false otherwise

getEpsilon() float
Returns:

output (float) –

getFontNames() str

Gets the available font names.

Note

Return a concatenated string of all known font names, separated by a pipe character (|).

Returns:

output (str) – All the known font names (a string, see note below)

getGlobalEventCallbackEnabled(sEventName: str, sCallbackName: str) bool
Parameters:
  • sEventName (str) –

  • sCallbackName (str) –

Returns:

output (bool) –

getIsDeployment() bool

verifiy if the current dll is compiled for deployment or not

Returns:

output (bool) – true if deployment, false otherwise

getIsRunningInReleaseMode() bool

Checks if the Core library is running in release mode.

Returns:

output (bool) – true if in release mode, false otherwise

getLicenseExpiry() int
Returns:

output (int) –

getMajorVersion() str

Returns the Core library internal major version.

Returns:

output (str) – a version text (a string)

getMaximumViewportHeight() int
Returns:

output (int) –

getMaximumViewportWidth() int
Returns:

output (int) –

getModelObjectsCount() int

Returns the count of currently live objects.

Returns:

output (int) –

getPresetFileExtension() str

Gets the extension of preset files.

Returns:

output (str) –

getStartupResultCode() int
Returns:

output (int) –

classmethod getTotalGPUMemoryNVIDIADisplay()

Returns the total GPU memory (in kb) on current NVIDIA display.

Note

This function should not be called in a run in back ground function. Also application should be running so that the OpenGL context is started.

hasBaseFeature(iMode: int) bool
Parameters:

iMode (int) –

Returns:

output (bool) –

hasFeature(iFeature: int, iMode: int) bool
Parameters:
  • iFeature (int) –

  • iMode (int) –

Returns:

output (bool) –

hasGPU() bool

Returns if a GPU is enabled.

Returns:

output (bool) –

initializeUIDeleteFramework()

Starts the UI delete framework. The UI is then responsible for periodically invokingprocessUIDelete() from the UI thread.

isAMD() bool

Checks if an AMD dedicated GPU is present.

Returns:

output (bool) – true if an AMD GPU was detected, false otherwise

isAWS() bool
Returns:

output (bool) –

isNVidia() bool

Checks if an Nvidia dedicated GPU is present.

Returns:

output (bool) – true if an Nvidia GPU was detected, false otherwise

isNotNone() bool
Returns:

output (bool) –

loadSessionFromFile(aFilename: str) List[str]

Loads a session file.

Parameters:

aFilename (str) – a fully qualified file path (a string)

Returns:

output (List[str]) – a list of errors, or an empty list if operation was successful

processUIDelete()

Gives the UI delete sub-system some processing time. Must be invoked from the UI thread.

removeCallbackFromClassEvent(aClassName: str, sEventName: str, sCallbackName: str) bool

Removes a callback subscription to a class event.

Parameters:
  • aClassName (str) – the class name (a string)

  • sEventName (str) – the event name (a string)

  • sCallbackName (str) – the callback name (a string)

Returns:

output (bool) – true if operation was successful, false otherwise (the callback was not found)

removeCallbackFromGlobalEvent(sEventName: str, sCallbackName: str) bool

Removes a callback subscription to a global event.

Parameters:
  • sEventName (str) – the event name (a string)

  • sCallbackName (str) – the callback name (a string)

Returns:

output (bool) – true if removal was successful, false otherwise (the callback did not exist)

saveSessionToFile(pSessionName: str, aFilename: str, progress: ORSModel.ors.Progress, iCompressionEngine: int = 1) int

Saves the current session to a file.

Parameters:
  • pSessionName (str) – a session name (a string)

  • aFilename (str) – a fully qualified file path (a string)

  • progress (ORSModel.ors.Progress) – a progress object or none (a Progress)

  • iCompressionEngine (int) – the input compression engine (0: None, 1: ZSTD)

Returns:

output (int) – 0 if operation was successful, otherwise an error code

static selectExclusivelyAListOfObjects(aListOfObjects, contextInstance)

Selects only the given objects for the context.

Parameters:
  • aListOfObjects (ORSModel.ors.Managed) [count=[0, None]] – list of objects to be selected exclusively (list)

  • contextInstance (plugin instance) – context instance

Note

Only representable object can be un selected

setAvailableCPUCount(pNbCPUs: int)

Note

Setting this value to 0 means to use all CPUs.

Parameters:

pNbCPUs (int) –

setClassEventCallbackEnabled(aClassName: str, sEventName: str, sCallbackName: str, bValue: bool) bool

Enables/disables a callback subscription to a class event.

Parameters:
  • aClassName (str) – the event name (a string)

  • sEventName (str) – the callback name (a string)

  • sCallbackName (str) – true to enable the callback, false to disable it

  • bValue (bool) –

Returns:

output (bool) – true if operation was successful, false otherwise (the callback was not found)

setDebugMode(pState: bool)

Sets the COM’s debug mode on or off.

Parameters:

pState (bool) –

setEpsilon(anEpsilon: float)
Parameters:

anEpsilon (float) –

setGlobalEventCallbackEnabled(sEventName: str, sCallbackName: str, bValue: bool) bool

Enables/disables a callback subscription to a global event.

Parameters:
  • sEventName (str) – the event name (a string)

  • sCallbackName (str) – the callback name (a string)

  • bValue (bool) – true to enable the callback, false to disable it

Returns:

output (bool) – true if operation was successful, false otherwise (the callback was not found)

setPrecision(iPrecision: int)

Sets the precision of computations when displayed.

Parameters:

iPrecision (int) –

setupForNoGPU()

Indicates that rendering is impossible because no GPU is present.

startWorkersFor(pWorkData: bytes)
Parameters:

pWorkData (bytes) –

stopWorkersWithID(id: int)
Parameters:

id (int) –

triggerGlobalEvent(anEventName: str, sData: str) bool

Triggers a global event.

Parameters:
  • anEventName (str) – the event name (a string)

  • sData (str) – an event specific string

Returns:

output (bool) – true if event was triggered, false otherwise

static unselectAListOfObjects(aListOfObjects, contextInstance)

Removes a list of objects to selection for a given context.

Parameters:
  • aListOfObjects (ORSModel.ors.Managed) [count=[0, None]] – list of objects to remove (list)

  • contextInstance (plugin instance) – context instance

static unselectAllObjects(contextInstance)

Removes all selected object of selection for the given context.

Parameters:

contextInstance (plugin instance) – context instance

yieldUIWorker()

Gives the UI worker control to process any pending tasks that it holds.