ArrayString¶
Inheritance diagram¶

Classes¶
ArrayString¶
-
class
ORSModel.ors.
ArrayString
¶ Bases:
ORSModel.ors.Array
brief_description: None author: Normand Mongeau. version: 1.0 Array for values of type string.
-
at
(self, index: int) → str¶ Retrieves a single value from the array.
Parameters: index (int) – the index of the item to retrieve (an uint64_t, zero based) Returns: output (str) – the value (a wstring)
-
atPut
(self, index: int, pValue: str) → None¶ Puts a single value into the array.
Note
Any previous value at the given position is lost.
Parameters: - index (int) – the index of the item to modify (an uint64_t, zero based)
- pValue (str) – the value to put (a wstring)
-
copyInto
(self, anArray: ORSModel.ors.ArrayString, iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None¶ Copies portions of the source array in another array.
Note
The destination array will grow to accommodate the copied data, if required.
Parameters: - anArray (ORSModel.ors.ArrayString) – the destination array (an ArrayString)
- iInsertionIndex (int) – the insertion index into the destination array (a uint64_t, zero based)
- iStartIndex (int) – the start index of the source (a uint64_t, zero based)
- iEndIndex (int) – the end index of the source (a uint64_t, zero based)
-
findFirst
(self, pValue: str) → int¶ Searches the array for a given value, starting at index 0.
Parameters: pValue (str) – the value to search for (a wstring) Returns: output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
-
findLast
(self, pValue: str) → int¶ Searches the array for a given value, starting at indexgetSize() - 1 (the end of the array).
Parameters: pValue (str) – the value to search for (a wstring) Returns: output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
-
getClassNameStatic
() → str¶ getClassNameStatic
Returns: output (str) –
-
getOccurrencesOf
(self, pValue: str) → int¶ Parameters: pValue (str) – Returns: output (int) –
-
includes
(self, pValue: str) → bool¶ Return if the array includes a given value.
Parameters: pValue (str) – the value to look for Returns: output (bool) – true or false
-
insertAt
(self, index: int, pValue: str) → None¶ Inserts a single item into the array.
Note
All items after the insertion index are shifted down. The last element of the array is thus lost.
Parameters: - index (int) – the index of the item to insert (an uint64_t, zero based)
- pValue (str) – the value to insert (a wstring)
-
none
() → ArrayString¶ Returns a none object, equivalent to a non-existent object (or null).
Returns: output (ArrayString) –
-
privateGetDataPacketAtIndex
(self, iIndex: int) → None¶ Parameters: iIndex (int) –
-
remove
(self, pvalue: str) → bool¶ Removes a value from the array.
Parameters: pvalue (str) – the value to remove (a string) Returns: output (bool) – true if value was removed, false otherwise
-
Array¶
-
class
ORSModel.ors.
Array
Bases:
ORSModel.ors.SequenceableCollection
brief_description: None author: Normand Mongeau. version: 1.0 Array abstraction class. Arrays can shrink and grow while preserving their contents. Resizing an array is not internally done, i.e. it’s up to the user of an array
to manage the array size. Accessing an index that’s not in the array will result in an error.-
copyFromMemory
(self, pSource: int, iByteCount: int, iInsertionIndex: int) → None Copies a memory buffer in the array.
Note
The array will grow to accommodate the copied data, if required.
Parameters: - pSource (bytes) – the source (a unsigned char*)
- iByteCount (int) – the size of the source, in bytes (a uint64_t)
- iInsertionIndex (int) – the insertion index into the array (a uint64_t, zero based)
-
copyFromNumpyArray
(np_array)
-
copyIntoMemory
(self, pOutput: int, iStartIndex: int, iNbElementsToCopy: int) → None Copies the array to a memory buffer.
Note
The memory buffer needs to be big enough to accommodate the input.
Parameters: - pOutput (bytes) – the target memory buffer (a unsigned char*)
- iStartIndex (int) – the starting index of the source array (a uint64_t, zero based)
- iNbElementsToCopy (int) – the number of array elements to copy (a uint64_t)
-
classmethod
createArrayFromNumpyArray
(np_array, packet_size=64) → ORSModel.ors.Array
-
getClassNameStatic
() → str getClassNameStatic
Returns: output (str) –
-
getNDArray
()
-
getNumpyArrayCopy
()
-
getOffsetBitAnd
(self) → int Returns: output (int) –
-
getOffsetBitShift
(self) → int Returns: output (int) –
-
getPacketCount
(self) → int Gets the number of packets currently in the array.
Note
Arrays are composed of packets, this method return the number of packets.
Returns: output (int) – the packet count (an uint32_t)
-
getPacketSize
(self) → int Gets the packet size used by the array.
Note
Arrays are composed of packets, this method return the packet size used. The packet size represents the number of items in the packet, not the byte size.
Returns: output (int) – the packet size (an uint32_t)
-
none
() → Array Returns a none object, equivalent to a non-existent object (or null).
Returns: output (Array) –
-
removeAt
(self, index: int) → None Removes the element at a given index.
Parameters: index (int) – the index (a uint64_t)
-
setInitialSize
(self, iPacketSize: int, initialSize: int) → None Sets the initial size of the array.
Note
This should be the first method invoked after instantiating the array. If the array has been used (items added/deleted) then this method can be costly if the array has many elements, as changing the internal storage implies that the data can co-exist momentarily.
Note
Arrays are composed of packets, this method controls the packet size used. Default values are 64 and 64.
Parameters: - iPacketSize (int) – the packet size (a uint32_t)
- initialSize (int) – the initial array size (a uint64_t)
-
SequenceableCollection¶
-
class
ORSModel.ors.
SequenceableCollection
Bases:
ORSModel.ors.Collection
brief_description: Abstraction class for sequenceable collections. author: Normand Mongeau. version: 1.0 Abstraction class for sequenceable collections. Sequenceable collections are collections that have an innate ordering.
-
asArray
(self) → Array Returns: output (ORSModel.ors.Array) –
-
asOrderedCollection
(self) → OrderedCollection Returns: output (ORSModel.ors.OrderedCollection) –
-
atAsDouble
(self, index: int) → float Parameters: index (int) – Returns: output (float) –
-
atPutAsDouble
(self, index: int, pValue: float) → None Parameters: - index (int) –
- pValue (float) –
-
dtype
-
getAsNDArray
()
-
getClassNameStatic
() → str getClassNameStatic
Returns: output (str) –
-
getMaxValueAsDouble
(self) → float Returns: output (float) –
-
getMaxValueAsDoubleInRange
(self, startIndex: int, endIndex: int) → float Parameters: - startIndex (int) –
- endIndex (int) –
Returns: output (float) –
-
getMeanValueAsDouble
(self) → float Returns: output (float) –
-
getMeanValueAsDoubleInRange
(self, startIndex: int, endIndex: int) → float Parameters: - startIndex (int) –
- endIndex (int) –
Returns: output (float) –
-
getMinValueAsDouble
(self) → float Returns: output (float) –
-
getMinValueAsDoubleInRange
(self, startIndex: int, endIndex: int) → float Parameters: - startIndex (int) –
- endIndex (int) –
Returns: output (float) –
-
getStandardDeviationAsDouble
(self) → float Returns: output (float) –
-
getStandardDeviationAsDoubleInRange
(self, startIndex: int, endIndex: int) → float Parameters: - startIndex (int) –
- endIndex (int) –
Returns: output (float) –
-
none
() → SequenceableCollection Returns a none object, equivalent to a non-existent object (or null).
Returns: output (SequenceableCollection) –
-
removeAt
(self, index: int) → None Parameters: index (int) –
-
removeDuplicate
(self) → bool Remove duplicate entries.
Returns: output (bool) – true if duplicate where found
-
removeFirst
(self) → None
-
removeLast
(self) → None
-
reverse
(self) → None
-
setSize
(self, iNewSize: int) → None Sets the size of theSequenceableCollection.
Note
The size can be used to lengthen or shorten it. Data contents are preserved.
Note
Avoid calling this method frequently as it is costly, shuffling and allocating memory.
Parameters: iNewSize (int) –
-
shape
-
sortAscending
(self, bSlave: ORSModel.ors.SequenceableCollection, cSlave: ORSModel.ors.SequenceableCollection, dSlave: ORSModel.ors.SequenceableCollection, eSlave: ORSModel.ors.SequenceableCollection) → None Parameters: - bSlave (ORSModel.ors.SequenceableCollection) –
- cSlave (ORSModel.ors.SequenceableCollection) –
- dSlave (ORSModel.ors.SequenceableCollection) –
- eSlave (ORSModel.ors.SequenceableCollection) –
-
sortDescending
(self, bSlave: ORSModel.ors.SequenceableCollection, cSlave: ORSModel.ors.SequenceableCollection, dSlave: ORSModel.ors.SequenceableCollection, eSlave: ORSModel.ors.SequenceableCollection) → None Parameters: - bSlave (ORSModel.ors.SequenceableCollection) –
- cSlave (ORSModel.ors.SequenceableCollection) –
- dSlave (ORSModel.ors.SequenceableCollection) –
- eSlave (ORSModel.ors.SequenceableCollection) –
-
sortRangeAscending
(self, index1: int, index2: int) → None Parameters: - index1 (int) –
- index2 (int) –
-
sortRangeDescending
(self, index1: int, index2: int) → None Parameters: - index1 (int) –
- index2 (int) –
-
swap
(self, index: int, index2: int) → None Parameters: - index (int) –
- index2 (int) –
-
transformCoordinate
(self, aTransform: ORSModel.ors.Matrix4x4) → None Apply the 3D coordinate transformation to the elements of the collection.
Parameters: aTransform (ORSModel.ors.Matrix4x4) –
-
transformVector
(self, aTransform: ORSModel.ors.Matrix4x4) → None Apply the 3D coordinate transformation to the elements of the collection.
Parameters: aTransform (ORSModel.ors.Matrix4x4) –
-
Collection¶
-
class
ORSModel.ors.
Collection
Bases:
ORSModel.ors.Managed
brief_description: Abstraction class for collections. author: Normand Mongeau. version: 1.0 Abstraction class for collections. The main difference between collections and arrays is that with collections, you do not need to worry about the capacity, you can just add elements; while for arrays you need to manage the size yourself.
-
applyLinearTransformation
(self, slope: float, offset: float) → None Parameters: - slope (float) –
- offset (float) –
-
getClassNameStatic
() → str getClassNameStatic
Returns: output (str) –
-
getSize
(self) → int Returns: output (int) –
-
none
() → Collection Returns a none object, equivalent to a non-existent object (or null).
Returns: output (Collection) –
-
Managed¶
-
class
ORSModel.ors.
Managed
Bases:
ORSModel.ors.ORSBaseClass
brief_description: An abstract class that implements all the default behavior of managed objects. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005
-
addCallbackToEvent
(self, anEventName: str, sCallbackName: str, callbackData: int) → bool Adds a callback subscription to an event.
Note
The callback name for a given event needs to be unique for that event, i.e. no two callbacks for a given event can have the same name.
Parameters: - anEventName (str) – name of the event to subscribe to (a string)
- sCallbackName (str) – callback name (a string)
- callbackData (int) – a pointer to a ORS_EVENT_CALLBACK_INFO structure
Returns: output (bool) – true if subscription succeeded, false otherwise
-
addToDeleteSet
(self, anIObject: ORSModel.ors.Managed) → None Add an object to the delete set.
Note
All objects have a delete set, which designates those objects that should also be deleted when the receiver gets deleted.
Parameters: anIObject (ORSModel.ors.Managed) – an object (a Managed)
-
addToSelection
(contextInstance) Adds the instance to the selection of a context
Parameters: contextInstance (plugin instance) – context instance Note
Only representable object can be selected
-
applyPreferences
() Helper for setting the attribute of the object following the preferences
-
atomicLoad
(sFilename: str, bPreserveIdentity: bool) → Managed Creates an object from a file where an object was save.
Parameters: - sFilename (str) – path of the file to load
- bPreserveIdentity (bool) – if true, preserves the identity of the object, false otherwise
Returns: output (Managed) – a managed object, or none() if the load fails
-
atomicLoadFrom
(self, anXML: str) → None Loads an object from an XML string.
Parameters: anXML (str) – Managed.atomicLoadFrom(self, buffer: int, nBytes: int) -> None
Loads an object from a buffer. Used for python pickling.
Parameters: - buffer (bytes) – the buffer
- nBytes (int) – the number of bytes in the buffer (a 64 bit unsigned int)
-
atomicLoadSpecificNode
(self, aFilename: str, aXPathOfTheNodeToLoad: str) → bool Loads an object from a file containing several objects.
Parameters: - aFilename (str) –
- aXPathOfTheNodeToLoad (str) –
Returns: output (bool) –
-
atomicSave
(self, aFilename: str, isTemporary: bool) → int Saves the object to a file.
Parameters: - aFilename (str) – path of the file to save
- isTemporary (bool) – if true, try to keep file in memory
Returns: output (int) – 0 if successful, otherwise an error code
-
copy
(self) → Managed Returns a copy of the managed.
Note
Only the immediate attributes of the managed are copied. The graph surrounding the new managed is the same one as the source managed.
Note
You can type the return value of this method to any subclass of Managed, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be NULL.
Returns: output (ORSModel.ors.Managed) – a new managed (a Managed)
-
deleteObject
(self) → None Explicitly deletes the core object wrapped by this Interface object.
-
deleteObjectAndAllItsChildren
(self) → None Explicitly deletes the core object wrapped by this Interface object, along with all its children.
-
getAllGroupsContaining
(self, anIObject: ORSModel.ors.Managed) → List Gets all the groups that contain the given object.
Parameters: anIObject (ORSModel.ors.Managed) – Returns: output (ORSModel.ors.List) –
-
classmethod
getAllInstances
()
-
getAllInstancesOf
(pProgId: str) → List Gathers all existing objects of the specified class.
Parameters: pProgId (str) – Returns: output (ORSModel.ors.List) –
-
classmethod
getAllObjectsOfClass
(cls_name)
-
getAllObjectsOfClassAndPrivateTitle
(pProgId: str, pPrivateTitle: str) → List Gathers all existing objects of the specified class, that have a matching private title.
Parameters: - pProgId (str) – name of the class (a string)
- pPrivateTitle (str) – private title to search for (a string)
Returns: output (ORSModel.ors.List) – all the objects that match the search criteria (a List)
-
getAllObjectsOfClassAndUserData
(pProgId: str, userDataKey: str, userDataValue: str) → List Gathers all existing objects of the specified class, that have a matching user data.
Parameters: - pProgId (str) – name of the class (a string)
- userDataKey (str) – key of the user data (a string)
- userDataValue (str) – value to look for (a string)
Returns: output (ORSModel.ors.List) – all the objects that match the search criteria (a List)
-
getAllRepresentableObjects
(self) → List Gets all the representable objects of the world.
Returns: output (ORSModel.ors.List) – a list containing all the representable objects
-
classmethod
getAllSubclasses
(outputCollection=None)
-
getAtomicTextRepresentation
(self, bSelfContained: bool) → str Retrieves the object’s atomic text representation.
Parameters: bSelfContained (bool) – Returns: output (str) –
-
getBinaryUserInfo
(self, pTag: str) → None Retrieves a user defined binary value. Typed as void* for sip, but it’s in reality an unsigned char*.
Note
If the key doesn’t exist, nullptr is returned
Parameters: pTag (str) – key of the data (a string)
-
getBinaryUserInfoAsBytes
(name)
-
getBinaryUserInfoSize
(self, pTag: str) → int Retrieves the size of a user defined binary value.
Note
If the key doesn’t exist, 0 is returned
Parameters: pTag (str) – key of the data (a string) Returns: output (int) – the size of the data (a uint32_t)
-
getCallbacksEnabled
(self) → bool Queries the object to know if its callbacks are enabled or disabled.
Returns: output (bool) – true if callbacks are enabled, false otherwise
-
getChildrenNodesOrganizationDirtySignature
() Gets the current dirty signature for the flag OrsChildrenNodesOrganizationDirty
Returns: childrenNodesOrganizationDirtySignature (int) – the dirty signature
-
classmethod
getClassDenomination
()
-
static
getClassFromProgId
(progId)
-
getClassName
(self) → str Retrieves the class name of the core object wrapped by this Interface object.
Returns: output (str) – the class name (a string)
-
getClassNameStatic
() → str getClassNameStatic
Returns: output (str) –
-
getCreationTime
(self) → int Returns the time Number of seconds since Jan 1 2000 of creation of this object.
Returns: output (int) – a uint32_t
-
getDataDirtySignature
() Gets the current dirty signature for the flag OrsDataDirty
Returns: dataDirtySignature (int) – the dirty signature
-
getDirtySignature
(self, dirtyFlag: str) → int Gets the current dirty signature.
Note
Objects can be dirty for several aspects, see the ors_def.h file for the different dirty aspects.
Parameters: dirtyFlag (str) – dirty flag name (a string, see note below) Returns: output (int) – dirty signature (a uint64_t)
-
getEventCallbackEnabled
(self, sEventName: str, sCallbackName: str) → bool Gets the enabled state of a callback subscription to an event.
Parameters: - sEventName (str) – event name (a string)
- sCallbackName (str) – callback name (a string)
Returns: output (bool) – true if callback is enabled, false if disabled or if the callback subscription did not exist
-
getGUID
(self) → str Retrieves the GUID of the core object.
Note
The GUID is the unique identifier of the object. No two objects can have the same GUID. Once you have an object’s GUID, at any time you can obtain a reference to that object via its GUID, given that the object is still alive.
Returns: output (str) –
-
getGeometryDirtySignature
() Gets the current dirty signature for the flag OrsGeometryDirty
Returns: geometryDirtySignature (int) – the dirty signature
-
getHasCallbacksForEvent
(self, anEventName: str) → bool Checks if the receiver has any callbacks for an event.
Parameters: anEventName (str) – name of the event (a string) Returns: output (bool) –
-
getHighlightDirtySignature
() Gets the current dirty signature for the flag OrsHighlightDirty
Returns: highlightDirtySignature (int) – the dirty signature
-
getIsAllowedToBeDeletedInContext
(pluginInstance=None)
-
getIsAvailableInContext
(pluginInstance=None)
-
getIsDirty
(self, dirtyFlag: str) → bool Gets if the object is dirty for a specific dirty flag.
Parameters: dirtyFlag (str) – dirty flag name (a string, see note below) Returns: output (bool) – true if object is dirty, false otherwise
-
getIsDirtyAnyDirtyFlag
(self) → bool Gets if the object is dirty for any of the dirty flags.
Returns: output (bool) – true if object is dirty, false otherwise
-
getIsEqualTo
(self, aManaged: ORSModel.ors.Managed) → bool Checks if the two objects are equal.
Parameters: aManaged (ORSModel.ors.Managed) – an object to compare with (a Managed) Returns: output (bool) – true if the receiver and the argument are equal (class dependent), false otherwise
-
getIsExclusiveToContext
(pluginInstance=None)
-
getIsIdentityPreservedForPickling
(self) → bool Returns True if the GUID is preserved when pickling and unpickling an object.
Returns: output (bool) – Returns True if the GUID is preserved when pickling and unpickling an object
-
getIsInDeleteSet
(self, anIObject: ORSModel.ors.Managed) → bool Gets if an object is included in the receiver delete set.
Note
The delete set is a list of objects that are to be deleted when the receiver is deleted.
Parameters: anIObject (ORSModel.ors.Managed) – object to look for in the receiver delete set (a Managed) Returns: output (bool) – true if the object is in the delete set of the receiver, false otherwise
-
getIsInstanceOf
(self, pProgId: str) → bool Queries the object to know if it is an instance of a certain class.
Parameters: pProgId (str) – Returns: output (bool) –
-
getIsInstanceOfAtLeastOneClasses
(progIdList)
-
getIsModifiedAnyAspect
()
-
getIsPrivateInContext
(pluginInstance=None)
-
getIsPublicInAllContexts
()
-
getIsRepresentable
(self) → bool Queries the object to know if it is representable.
Returns: output (bool) –
-
getIsSameObjectAs
(self, anObject: ORSModel.ors.Managed) → bool Checks to see if the receiver wraps the same underlying object as the supplied argument.
Parameters: anObject (ORSModel.ors.Managed) – an object to compare with (a Managed) Returns: output (bool) – true if underlying object is the same for both the receiver and the argument, false otherwise
-
classmethod
getIsSubclassOf
(parentClass)
-
getIsToBeKeptAliveUntilExit
(self) → bool Queries the object to know if it is permanent for the life of the application.
Note
Permanent objects survive a new session, i.e. they live until the application is terminated.
Returns: output (bool) – true if object is permanent, false otherwise
-
getIsToBeSaved
(self) → bool Queries the object to know if it should be saved in a session file.
Returns: output (bool) – true if object should be saved, false otherwise
-
getObjectWithGUID
(guid: str) → Managed Retrieves an object from its GUID.
Parameters: guid (str) – a GUID (a string) Returns: output (ORSModel.ors.Managed) – An object or none if object is not found
-
getPrivateTitle
(self) → str Gets the private title of the object.
Note
The private title is never shown in the application, but is a means by which an object can be found (getAllObjectsOfClassAndPrivateTitle for example).
Returns: output (str) – private title of the object (a string)
-
getPropertyDirtySignature
() Gets the current dirty signature for the flag OrsPropertyDirty
Returns: propertyDirtySignature (int) – the dirty signature
-
getPythonRepresentation
(self) → str Gets a Python evaluable string representation.
Returns: output (str) – The object’s representation (a string)
-
getReferenceCount
(self) → int Returns the count of references to the object.
Returns: output (int) – the count of references (an int)
-
getTitle
(self) → str Gets the title of the object.
Returns: output (str) – the title (a string)
-
getUserInfo
(self, pTag: str) → str Retrieves a user defined value.
Note
If the key doesn’t exist an empty string is returned.
Parameters: pTag (str) – key of the data (a string) Returns: output (str) – the data (a string)
-
getUserInfoAsArray
(self) → ArrayString Retrieves the user info as a string array.
Note
The user info data is flattened into an array of string pairs, for the key and the value.
Returns: output (ORSModel.ors.ArrayString) – the data (an ArrayString, see note below)
-
getUserInfoPickledObject
(name)
-
getVisibilityDirtySignature
() Gets the current dirty signature for the flag OrsVisibilityDirty
Returns: visibilityDirtySignature (int) – the dirty signature
-
isManaged
(self) → bool Returns: output (bool) –
-
isNone
(self) → bool check if the object is none
Returns: output (bool) –
-
isNotNone
(self) → bool check if the object is Not none
Returns: output (bool) –
-
none
() → Managed Returns a none object, equivalent to a non-existent object (or null).
Returns: output (Managed) –
-
publish
() Sets an object as representable and notifies the Dragonfly UI of a new available object
-
removeBinaryUserInfo
(self, pTag: str) → None Removes a user defined binary value.
Parameters: pTag (str) – key name of the binary value (a string)
-
removeCallbackFromEvent
(guid: str, sEventName: str, sCallbackName: str, bRemoveInDeletedObject: bool) → bool Removes a callback subscription to an event.
Parameters: - guid (str) – object GUID (a string)
- sEventName (str) – name of the callback event (a string)
- sCallbackName (str) – name of the callback (a string)
- bRemoveInDeletedObject (bool) – if true, the callback will be removed from the object even if that object is in the process of being deleted (a boolean)
Returns: output (bool) – true callback existed, false otherwise
-
removeFromDeleteSet
(self, anIObject: ORSModel.ors.Managed) → None Remove an object from the delete set.
Note
The delete set is a list of objects that are to be deleted when the receiver is deleted.
Parameters: anIObject (ORSModel.ors.Managed) – object to be removed from the delete set (a Managed)
-
removeUserInfo
(self, pTag: str) → None Removes a user defined value.
Parameters: pTag (str) – key of the data (a string)
-
selectExclusively
(contextInstance) Selects only the current instance for a context
Parameters: contextInstance (plugin instance) – context instance Note
Only representable object can be selected
-
setAsTemporaryObject
(isTemporaryObject=True) Helper for setting useful properties when marking an object as a (non-)temporary object.
Parameters: isTemporaryObject (bool) – if True, the object will be set as temporary (not representable, not to be saved, callbacks disabled). Otherwise, these properties are set as the opposite.
-
setBinaryUserInfo
(self, pTag: str, pValue: int, iDataSize: int) → None Sets a user defined binary value.
Note
Objects can carry user defined data in the form of strings or binary data.
Parameters: - pTag (str) – key of the data (a string)
- pValue (bytes) – the data (an unsigned char* buffer)
- iDataSize (int) – the size of the data (a uint32_t)
-
setCallbacksEnabled
(self, enabled: bool) → None Sets the object’s callbacks to be enabled or not.
Note
When an object’s callbacks are disabled, absolutely no callbacks are triggered from the receiver.
Parameters: enabled (bool) – true to enable callbacks, false otherwise
-
setChildrenNodesOrganizationDirty
() Calls for a setDirty with the flag OrsChildrenNodesOrganizationDirty
-
setDataDirty
() Calls for a setDirty with the flag OrsDataDirty
-
setDirty
(self, dirtyFlag: str) → None Sets the object as being dirty for a given aspect.
Note
A dirty object is an object that has changed, giving its observers a chance to refresh their view on the object. Several aspects of an object can be dirty, see ORS_def.h for dirty signature flags.
Parameters: dirtyFlag (str) – dirty flag name (a string)
-
setEventCallbackEnabled
(self, sEventName: str, sCallbackName: str, bValue: bool) → bool Enables/disables a callback subscription to an event.
Note
Works for all callback types (object, class and global)
Parameters: - sEventName (str) – event name (a string)
- sCallbackName (str) – callback name (a string)
- bValue (bool) – true to enable the callback, false to disable it
Returns: output (bool) – true if callback subscription existed, false otherwise
-
setExclusiveToContext
(pluginInstance=None)
-
setGeometryDirty
() Calls for a setDirty with the flag OrsGeometryDirty
-
setHighlightDirty
() Calls for a setDirty with the flag OrsHighlightDirty
-
setIdentityIsPreservedForPickling
(self, value: bool) → None Set to True if the GUID is to be preserved when pickling and unpickling an object.
Parameters: value (bool) –
-
setIsNotDirty
(self) → None Sets the object as not being dirty for all dirty flags.
-
setIsRepresentable
(self, isRepresentable: bool) → None Sets the object to be representable or not.
Note
Non representable objects don’t appear in lists and such, the implicit meaning is that these objects are transient and temporary.
Parameters: isRepresentable (bool) – true to make the object representable, false otherwise
-
setIsToBeKeptAliveUntilExit
(self, pFlag: bool) → None Sets the object to be permanent for the life of the application.
Note
Permanent objects survive a new session, i.e. they live until the application is terminated.
Parameters: pFlag (bool) – true to make the object permanent, false otherwise
-
setIsToBeSaved
(self, pIsToBeSaved: bool) → None Sets the object to be saved to session files or not.
Parameters: pIsToBeSaved (bool) – true to cause the object to be saved to session files, false otherwise
-
setPrivateTitle
(self, newPrivateTitle: str) → None Sets the private title of the object.
Note
The private title can later be used to find a reference to that object, given that it’s still alive.
Parameters: newPrivateTitle (str) – a title (a string)
-
setPropertyDirty
() Calls for a setDirty with the flag OrsPropertyDirty
-
setPublicInAllContexts
()
-
setTitle
(self, newVal: str) → None Sets the title of the object.
Parameters: newVal (str) –
-
setUserInfo
(self, pTag: str, pValue: str) → None Sets a user defined value.
Note
Stores the key/value pair in an internal dictionary. If the key already exists its previous value is overwritten.
Parameters: - pTag (str) – a key name (a string)
- pValue (str) – a value (a string)
-
setUserInfoPickledObject
(name: str, picklable_object)
-
setVisibilityDirty
() Calls for a setDirty with the flag OrsVisibilityDirty
-
switchAvailabilityToContext
(oldContextID, newContextID) Switches the availability of the object from an old context to a new context. This will be done only if the old context ID is found in the set of available contexts and the new context ID is not already in the set of available contexts. The availability for all other contexts remains unchanged.
The arguments oldContextID and newContextID are used as strings instead of plugin instances to support the situation where the old or new context is not existing (for example, to perform a copy of the objects).
Parameters: - oldContextID (str) – old context ID
- newContextID (str) – new context ID
-
triggerClassEvent
(self, sEventName: str) → bool Triggers a class event.
Parameters: sEventName (str) – Returns: output (bool) –
-
unpublish
() Sets an object as non-representable and notifies the Dragonfly UI of a loss of the availability of the object.
-
unselect
(contextInstance) Unselects the instance for a context
Parameters: contextInstance (plugin instance) – context instance
-
ORSBaseClass¶
-
class
ORSModel.ors.
ORSBaseClass
brief_description: An abstract class from which all objects issued from the author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005
-
getPythonTraceBack
() → typing.List[str] Set the python traceback for a call from python.
Returns: output (typing.List[str]) –
-
isManaged
(self) → bool Returns: output (bool) –
-
isNone
(self) → bool Returns: output (bool) –
-
setPythonTraceBack
(tb: ORSModel.ors.typing.List[str]) → None Set the python traceback for a call from python.
Parameters: tb (typing.List[str]) –
-