VisualCapsule

Inheritance diagram

Inheritance diagram of ORSModel.ors.VisualCapsule, ORSModel.ors.VisualShape3D, ORSModel.ors.VisualShape, ORSModel.ors.Visual, ORSModel.ors.Node, ORSModel.ors.Managed, ORSModel.ors.ORSBaseClass

Classes

VisualCapsule

class ORSModel.ors.VisualCapsule(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)

Bases: VisualShape3D

Parameters:
  • buffer (bytes) –

  • nBytes (int) –

  • bPreserveIdentity (bool) –

VisualCapsule.__init__(self)

getCapsule(self, iTIndex: int) ORSModel.ors.Capsule
Parameters:

iTIndex (int) –

Returns:

output (ORSModel.ors.Capsule) –

getClassNameStatic() str

getClassNameStatic

Returns:

output (str) –

none() VisualCapsule

Returns a none object, equivalent to a non-existent object (or null).

Returns:

output (VisualCapsule) –

setCapsule(self, aCapsule: ORSModel.ors.Capsule, iTIndex: int)
Parameters:

VisualShape3D

class ORSModel.ors.VisualShape3D(*args, **kwargs)

Bases: VisualShape

Visual 3D Shape manipulation services.

getClassNameStatic() str

getClassNameStatic

Returns:

output (str) –

none() VisualShape3D

Returns a none object, equivalent to a non-existent object (or null).

Returns:

output (VisualShape3D) –

VisualShape

class ORSModel.ors.VisualShape(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)

Bases: Visual

Parameters:
  • buffer (bytes) –

  • nBytes (int) –

  • bPreserveIdentity (bool) –

addAffectedVisual(self, pObject: ORSModel.ors.Managed)
Parameters:

pObject (ORSModel.ors.Managed) –

addShapeIsInvertedForVisual(self, pObject: ORSModel.ors.Managed)
Parameters:

pObject (ORSModel.ors.Managed) –

getAffectedVisualAtIndex(self, index: int) str
Parameters:

index (int) –

Returns:

output (str) –

getAffectedVisualsGUID(self) str
Returns:

output (str) –

getAnchorNames(self) List[str]

Returns the list of anchor names known to the receiver.

Returns:

output (List[str]) – anchor names (a list of strings)

getAnchorVisible(self, sAnchorName: str) bool

Gets if a given anchor is visible or not.

Parameters:

sAnchorName (str) – anchor name (a string)

Returns:

output (bool) – visible state (a bool)

getClassNameStatic() str

getClassNameStatic

Returns:

output (str) –

getColorForAllViews(self) ORSModel.ors.Color
Returns:

output (ORSModel.ors.Color) –

getColorForView(self, aView: ORSModel.ors.View) ORSModel.ors.Color
Parameters:

aView (ORSModel.ors.View) –

Returns:

output (ORSModel.ors.Color) –

getDensityForAllViews(self) float
Returns:

output (float) –

getDensityForView(self, pView: ORSModel.ors.View) float
Parameters:

pView (ORSModel.ors.View) –

Returns:

output (float) –

getDepthWriteDisabled(self) bool

Gets if the shape will write in the depth buffer.

Returns:

output (bool) – -(a bool)

getHighlightedAnchor(self, anchorIndex: int, iTIndex: int) bool
Parameters:
  • anchorIndex (int) –

  • iTIndex (int) –

Returns:

output (bool) –

getHighlightedAnchorCount(self, iTIndex: int) int
Parameters:

iTIndex (int) –

Returns:

output (int) –

getHighlightedBorder(self, borderIndex: int, iTIndex: int) bool
Parameters:
  • borderIndex (int) –

  • iTIndex (int) –

Returns:

output (bool) –

getHighlightedBorderCount(self, iTIndex: int) int
Parameters:

iTIndex (int) –

Returns:

output (int) –

getInvertedVisualsGUID(self) str

Returns the list of inverted visuals for this shape.

Returns:

output (str) – guids (a list of strings)

getIsEditable(self) bool
Returns:

output (bool) –

getIsHighlightableAnchor(self, anchorIndex: int, iTIndex: int) bool
Parameters:
  • anchorIndex (int) –

  • iTIndex (int) –

Returns:

output (bool) –

getIsHighlightableBorder(self, borderIndex: int, iTIndex: int) bool
Parameters:
  • borderIndex (int) –

  • iTIndex (int) –

Returns:

output (bool) –

getKeepClipBoxForAllViews(self) bool
Returns:

output (bool) –

getKeepClipBoxForView(self, aView: ORSModel.ors.View) bool
Parameters:

aView (ORSModel.ors.View) –

Returns:

output (bool) –

getSelectedColor(self) ORSModel.ors.Color

Gets the selected color of the shape.

Returns:

output (ORSModel.ors.Color) – the color (a Color)

getShaderCode(self, aView: ORSModel.ors.View, bInverted: bool) str

get the evaluated shader code (in glsl)

Parameters:
Returns:

output (str) –

getShape(self, timestep: int) ORSModel.ors.Shape
Parameters:

timestep (int) –

Returns:

output (ORSModel.ors.Shape) –

getShapeAffectsVisual(self, pObject: ORSModel.ors.Managed) bool
Parameters:

pObject (ORSModel.ors.Managed) –

Returns:

output (bool) –

getShapeIndex(self) int
Returns:

output (int) –

getShapeIsInvertedForVisual(self, pObject: ORSModel.ors.Managed) bool
Parameters:

pObject (ORSModel.ors.Managed) –

Returns:

output (bool) –

getThicknessForAllViews(self) float
Returns:

output (float) –

getThicknessForView(self, pView: ORSModel.ors.View) float
Parameters:

pView (ORSModel.ors.View) –

Returns:

output (float) –

none() VisualShape

Returns a none object, equivalent to a non-existent object (or null).

Returns:

output (VisualShape) –

pickAnchor(self, pView: ORSModel.ors.View, xPixelPositionInView: int, yPixelPositionInView: int) int
Parameters:
  • pView (ORSModel.ors.View) –

  • xPixelPositionInView (int) –

  • yPixelPositionInView (int) –

Returns:

output (int) –

pickBorder(self, pView: ORSModel.ors.View, xPixelPositionInView: int, yPixelPositionInView: int) int
Parameters:
  • pView (ORSModel.ors.View) –

  • xPixelPositionInView (int) –

  • yPixelPositionInView (int) –

Returns:

output (int) –

pickSpecificBorder(self, pView: ORSModel.ors.View, borderIndex: int, xPixelPositionInView: int, yPixelPositionInView: int) bool
Parameters:
  • pView (ORSModel.ors.View) –

  • borderIndex (int) –

  • xPixelPositionInView (int) –

  • yPixelPositionInView (int) –

Returns:

output (bool) –

removeAffectedVisual(self, pObject: ORSModel.ors.Managed)
Parameters:

pObject (ORSModel.ors.Managed) –

removeShapeIsInvertedForVisual(self, pObject: ORSModel.ors.Managed)
Parameters:

pObject (ORSModel.ors.Managed) –

setAffectedVisualsGUID(self, guids: str)
Parameters:

guids (str) –

setAnchorVisible(self, sAnchorName: str, visible: bool)

Sets if a given anchor is visible or not.

Parameters:
  • sAnchorName (str) – anchor name (a string)

  • visible (bool) – visible state (a bool)

setColorForAllViews(self, color: ORSModel.ors.Color)
Parameters:

color (ORSModel.ors.Color) –

setColorForView(self, aView: ORSModel.ors.View, color: ORSModel.ors.Color)
Parameters:
setDensityForAllViews(self, pValue: float)
Parameters:

pValue (float) –

setDensityForView(self, pView: ORSModel.ors.View, pValue: float)
Parameters:
setDepthWriteDisabled(self, isDisabled: bool)

Sets if the shape will write in the depth buffer.

Parameters:

isDisabled (bool) – isDisabled, (a bool)

setHighlightedAnchor(self, anchorIndex: int, iTIndex: int)
Parameters:
  • anchorIndex (int) –

  • iTIndex (int) –

setHighlightedBorder(self, borderIndex: int, iTIndex: int)
Parameters:
  • borderIndex (int) –

  • iTIndex (int) –

setInvertedVisualsGUID(self, guids: str)

Sets the list of inverted visuals for this shape.

Parameters:

guids (str) – guids (a string)

setIsEditable(self, pFlag: bool)
Parameters:

pFlag (bool) –

setIsHighlightableAnchor(self, anchorIndex: int, iTIndex: int, isHighlightable: bool)
Parameters:
  • anchorIndex (int) –

  • iTIndex (int) –

  • isHighlightable (bool) –

setIsHighlightableBorder(self, borderIndex: int, iTIndex: int, isHighlightable: bool)
Parameters:
  • borderIndex (int) –

  • iTIndex (int) –

  • isHighlightable (bool) –

setKeepClipBoxForAllViews(self, keepClipBox: bool)
Parameters:

keepClipBox (bool) –

setKeepClipBoxForView(self, aView: ORSModel.ors.View, keepClipBox: bool)
Parameters:
setSelectedColor(self, IColor: ORSModel.ors.Color)

Sets the selected color of the shape.

Parameters:

IColor (ORSModel.ors.Color) – the color (a Color)

setShape(self, aShape: ORSModel.ors.Shape, timestep: int)
Parameters:
setShapeIndex(self, iIndex: int)
Parameters:

iIndex (int) –

setThicknessForAllViews(self, value: float)

setThicknessForAllViews

Dirty flags: OrsPropertyDirty

Parameters:

value (float) –

setThicknessForView(self, pView: ORSModel.ors.View, pValue: float)

setThicknessForView

Dirty flags: OrsPropertyDirty

Parameters:
unHighlightAllAnchor(self, iTIndex: int)
Parameters:

iTIndex (int) –

unHighlightAllBorder(self, iTIndex: int)
Parameters:

iTIndex (int) –

Visual

class ORSModel.ors.Visual(*args, **kwargs)

Bases: Node

An abstract class that handles all services pertaining to visualizing objects.

getAction(self) str
Returns:

output (str) –

getAllParentViewsWhereVisualIsVisible(self) ORSModel.ors.List

Gets a list of views where the visual appears.

Returns:

output (ORSModel.ors.List) – a list of views (an List)

getAssociatedState(self) str
Returns:

output (str) –

getBoundingBox(self, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4) ORSModel.ors.Box
Parameters:
Returns:

output (ORSModel.ors.Box) –

getBoundingBoxInView(self, aView: ORSModel.ors.View) ORSModel.ors.Box

Gets the bounding box of the visual in the orientation of the view.

Parameters:

aView (ORSModel.ors.View) – the view (a View)

Returns:

output (ORSModel.ors.Box) – the bounding box (a Box) or NULL if no view is provided

getBoundingRectangleInView(self, aView: ORSModel.ors.View) ORSModel.ors.Rectangle

Gets the bounding rectangle of the visual in the orientation of the view.

Parameters:

aView (ORSModel.ors.View) – the view (a View)

Returns:

output (ORSModel.ors.Rectangle) – the bounding Rectangle (a Rectangle) or NULL if no view is provided

getClassNameStatic() str

getClassNameStatic

Returns:

output (str) –

getClipBox(timestep=0, display=None)

Gets the clip box of the visual

Parameters:
Returns:

aClipBox (ORSModel.ors.Box) – the clip box

getHighlightColor(self) ORSModel.ors.Color
Returns:

output (ORSModel.ors.Color) –

getIsHighlightable(self) bool
Returns:

output (bool) –

getIsHighlightedInView(self, aView: ORSModel.ors.View) bool
Parameters:

aView (ORSModel.ors.View) –

Returns:

output (bool) –

getIsPickable(self) bool

Gets the visual’s pickable state.

Returns:

output (bool) – true if the visual is pickable, false otherwise

getIsSelected(self) bool
Returns:

output (bool) –

getIsShadowEnabled(self) bool
Returns:

output (bool) –

getIsVisibleForAllViews(self) bool

Gets the visibility of the receiver in all views.

Returns:

output (bool) – true if the receiver is visible is all views, false otherwise

getIsVisibleForView(self, IView: ORSModel.ors.View) bool

Gets the visibility of the receiver in a given view.

Parameters:

IView (ORSModel.ors.View) – the view (a View)

Returns:

output (bool) – true if the receiver is visible, false otherwise

getMaterial(self) ORSModel.ors.Material

Gets the visual’s material.

Returns:

output (ORSModel.ors.Material) – a material (an Material) or NULL is none exists

getModel(self) ORSModel.ors.Node

the same for meshes. For the visual that do not have model, return None

Returns:

output (ORSModel.ors.Node) – the model of the visual

getPickTolerance(self) float

Note

The pick tolerance is the radius, around any visual portion, where the mouse cursor can grab the visual. It’s expressed in relative size of the attached view.

Returns:

output (float) –

getShininess(self) float
Returns:

output (float) –

getShowIn2D(self) bool

Gets the visual visibility mode in 2D views.

Returns:

output (bool) – true if the visual is visible in 2D views, false otherwise

getShowIn3D(self) bool

Gets the visual visibility mode in 3D views.

Returns:

output (bool) – true if the visual is visible in 3D views, false otherwise

getTSize(self) int

Gets the T size.

Returns:

output (int) – T size (a uint32_t)

getZEnabled(self) bool

Note

Default value is true.

Note

Z buffering means that the renderer records pixel depth to hide geometry that is behind other geometry. When Z buffer is disabled, the visual is displayed above all geometry ALREADY RENDERED (this statement is important), even if it should not.

Returns:

output (bool) – true if Z buffer is enabled, false otherwise

initializeVisual(self) bool

Initializes the visual.

Returns:

output (bool) –

none() Visual

Returns a none object, equivalent to a non-existent object (or null).

Returns:

output (Visual) –

resetVisibility(self)
setAction(self, anAction: str)
Parameters:

anAction (str) –

setAssociatedState(self, aGlobalState: str)
Parameters:

aGlobalState (str) –

setHighlightColor(self, color: ORSModel.ors.Color)
Parameters:

color (ORSModel.ors.Color) –

setIsHighlightable(self, value: bool)
Parameters:

value (bool) –

setIsHighlightedInView(self, aView: ORSModel.ors.View, aFlag: bool)
Parameters:
setIsPickable(self, value: bool)

Sets the visual to be pickable or not.

Parameters:

value (bool) – TRUE to make the visual pickable, false otherwise

setIsSelected(self, aBool: bool)
Parameters:

aBool (bool) –

setIsShadowEnabled(self, value: bool)
Parameters:

value (bool) –

setIsVisibleForAllViews(self, bValue: bool)

Note

This API overrides all prior calls to setIsVisibleForViews(), or in other words, any view specific setting is erased.

Parameters:

bValue (bool) –

setIsVisibleForView(self, IView: ORSModel.ors.View, bValue: bool)

Note

This API overrides a prior call to setIsVisibleForAllViews(), for a given view.

Parameters:
setMaterial(self, aIMaterial: ORSModel.ors.Material)

Sets the visual’s material.

Parameters:

aIMaterial (ORSModel.ors.Material) – a material (an Material)

setPickTolerance(self, pValue: float)

Note

The pick tolerance is the radius, around any visual portion, where the mouse cursor can grab the visual. It’s expressed in relative size of the attached view.

Note

The anchors will automatically adjust visually to size changes.

Parameters:

pValue (float) –

setShininess(self, aValue: float)
Parameters:

aValue (float) –

setShowIn2D(self, show: bool)

Sets the visual to be visible or not in 2D views.

Parameters:

show (bool) – true to have the visual be visible in 2D views, false otherwise

setShowIn3D(self, show: bool)

Sets the visual to be visible or not in 3D views.

Parameters:

show (bool) – true to have the visual be visible in 3D views, false otherwise

setTSize(self, pTSize: int)

Sets the T size.

Parameters:

pTSize (int) – T size (a uint32_t)

setZEnabled(self, value: bool)

Note

Default value is true.

Note

Z buffering means that the renderer records pixel depth to hide geometry that is behind other geometry. When Z buffer is disabled, the visual is displayed above all geometry ALREADY RENDERED (this statement is important), even if it should not.

Parameters:

value (bool) – true to enable the Z buffer, false to disable it

stackVisualState(self)
unstackVisualState(self)

Node

class ORSModel.ors.Node(*args, **kwargs)

Bases: Managed

An abstract class for any object that can be a node in the visualization flow.

attachChild(self, anINode: ORSModel.ors.Node) bool

Attaches a child node.

Note

Certain parent-child relationships are forbidden, hence the need to verify the result.

Note

Calling this method several times will still result in the child node only appearing once in its parent.

Parameters:

anINode (ORSModel.ors.Node) – the node to attach (a Node)

Returns:

output (bool) – true if child was attached, false otherwise

attachChildAtIndex(self, anINode: ORSModel.ors.Node, index: int) bool

Attaches a child node at a given index.

Note

Certain parent-child relationships are forbidden, hence the need to verify the result.

Note

Calling this method several times will still result in the child node only appearing once in its parent.

Parameters:
  • anINode (ORSModel.ors.Node) – the node to attach (a Node)

  • index (int) – the index (a uint32_t)

Returns:

output (bool) – true if child was attached, false otherwise

copyGraph(self) ORSModel.ors.Node

Returns a copy of the node, including its graph.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Returns:

output (ORSModel.ors.Node) – a new node (a Node)

detachChild(self, anINode: ORSModel.ors.Node) bool

Detaches a child node.

Parameters:

anINode (ORSModel.ors.Node) – the node to detach (a Node)

Returns:

output (bool) – true if child was detached, false otherwise

getAllChildrenNodes(self) ORSModel.ors.List

Returns a flattened list of the child hierarchy of the node.

Note

The child hierarchy is flattened.

Note

Expect a depth first search ordering of the nodes.

Returns:

output (ORSModel.ors.List) – a list of all nodes below the node (a List)

getAllChildrenOfClass(self, pProgId: str) ORSModel.ors.List

Returns all the nodes of the specified class found in the child hierarchy.

Note

Result will be an empty list if no match is found.

Note

The search is done depth-first.

Note

Use static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).

Parameters:

pProgId (str) – the name of the class to test against (a string)

Returns:

output (ORSModel.ors.List) – a list of nodes (a List)

getAllChildrenOfClassReachableByRenderer(self, pProgId: str) ORSModel.ors.List

Returns a flattened list of all the child nodes, of the given class, that are renderable.

Note

The list contains only Managed objects (they will need to be typecast to the appropriate class).

Note

Use static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).

Parameters:

pProgId (str) – the name of the class to test against (a string)

Returns:

output (ORSModel.ors.List) – a list of all child nodes that can be rendered (an List)

getAllParentNodes(self) ORSModel.ors.List

Returns a flattened list of the parent hierarchy of the node.

Note

The parent hierarchy is flattened.

Note

Expect a depth first search ordering of the nodes.

Returns:

output (ORSModel.ors.List) – a list of all nodes above the node (an List)

getAllParentsOfClass(self, pProgId: str) ORSModel.ors.List

Returns all the nodes of the specified class found in the parent hierarchy.

Note

Result will be an empty list if no match is found.

Note

The search is done depth-first.

Note

Use static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).

Parameters:

pProgId (str) – the name of the class to test against (a string)

Returns:

output (ORSModel.ors.List) – a list of nodes (an List)

getChildWithGUID(self, aGUID: str) ORSModel.ors.Node

Gets an immediate child node with the given GUID.

Note

Only immediate children are searched.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Parameters:

aGUID (str) – a GUID (a string)

Returns:

output (ORSModel.ors.Node) – a child node if found (a Node), none() otherwise

getChildWithTitle(self, aTitle: str) ORSModel.ors.Node

Gets an immediate child node with the given title.

Note

Only immediate children are searched.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Parameters:

aTitle (str) – a string (a string)

Returns:

output (ORSModel.ors.Node) – a child node if found (a Node), none() otherwise

getChildrenNodes(self) ORSModel.ors.List

Returns the list of immediate child nodes.

Returns:

output (ORSModel.ors.List) – a list of nodes (an List)

getChildrenOfClass(self, pProgId: str) ORSModel.ors.List

Returns the nodes of the specified class found in the immediate children.

Note

Result will be an empty list if no match is found.

Note

Use static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).

Parameters:

pProgId (str) – the name of the class to test against (a string)

Returns:

output (ORSModel.ors.List) – a list of nodes (an List)

getClassNameStatic() str

getClassNameStatic

Returns:

output (str) –

getFirstChildOfClass(self, pProgId: str) ORSModel.ors.Node

Returns the first object of the specified class found in the child hierarchy.

Note

The search is done breadth-first.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).

Parameters:

pProgId (str) – the name of the class to test against (a string)

Returns:

output (ORSModel.ors.Node) – a node if one exists (a Node), none() otherwise

getFirstChildOfClassAndPrivateTitle(self, pProgId: str, privateTitle: str) ORSModel.ors.Node

Searches the hierarchy for a child node with the specified class and private title.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).

Parameters:
  • pProgId (str) – the name of the class to test against (a string)

  • privateTitle (str) – some text (a string)

Returns:

output (ORSModel.ors.Node) – a node if it exists (a Node), none() otherwise

getFirstFrameTowardsNode(self, anINode: ORSModel.ors.Node) ORSModel.ors.ReferenceFrame

Gets the first frame found going up the hierarchy towards a given object.

Parameters:

anINode (ORSModel.ors.Node) – the target node (an Node)

Returns:

output (ORSModel.ors.ReferenceFrame) – a frame (an ReferenceFrame) or none if no frame is found

getFirstNodeWithClassNameTowardsNode(self, pProgId: str, anINode: ORSModel.ors.Node) ORSModel.ors.Node

Searches the hierarchy for a parent node with the specified class toward a specific parent nopde.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).

Parameters:
  • pProgId (str) – the name of the class to test against (a string)

  • anINode (ORSModel.ors.Node) – a target node

Returns:

output (ORSModel.ors.Node) – a node if it exists (a Node), none() otherwise

getFirstParentOfClass(self, pProgId: str) ORSModel.ors.Node

Returns the first object of the specified class found in the parent hierarchy.

Note

The search is done breadth-first.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).

Parameters:

pProgId (str) – the name of the class to test against (a string)

Returns:

output (ORSModel.ors.Node) – a node if one exists (a Node), none() otherwise

getFirstParentOfClassAndPrivateTitle(self, pProgId: str, privateTitle: str) ORSModel.ors.Node

Searches the hierarchy for a parent node with the specified class and private title.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).

Parameters:
  • pProgId (str) – the name of the class to test against (a string)

  • privateTitle (str) – some text (a string)

Returns:

output (ORSModel.ors.Node) – a node if it exists (a Node), none() otherwise

getFrameTransformationFromNode(self, towardNode: ORSModel.ors.Node, pTimeStep: int) ORSModel.ors.Matrix4x4
Parameters:
Returns:

output (ORSModel.ors.Matrix4x4) –

getImmediateChildOfClass(self, pProgId: str) ORSModel.ors.Node

Searches for a child node with the specified class.

Note

Only the immediate children are searched, not the hierarchy.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).

Parameters:

pProgId (str) – the name of the class to test against (a string)

Returns:

output (ORSModel.ors.Node) – a node if it exists (a Node), none() otherwise

getImmediateParentOfClass(self, pProgId: str) ORSModel.ors.Node

Searches for a parent node with the specified class.

Note

Only the immediate parents are searched, not the hierarchy.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).

Parameters:

pProgId (str) – the name of the class to test against (a string)

Returns:

output (ORSModel.ors.Node) – a node if it exists (a Node), none() otherwise

getImmediateParentWithGUID(self, pGUID: str) ORSModel.ors.Node

Gets a parent node with the given GUID.

Note

Only immediate parents are searched.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Parameters:

pGUID (str) – a GUID (a string)

Returns:

output (ORSModel.ors.Node) – a parent node if found (a Node), none() otherwise

getIsNodeOneOfMyAscendants(self, anINode: ORSModel.ors.Node) bool

Checks to see if a specified node is in the parent hierarchy of the node.

Note

The parent hierarchy is searched in its entirety for the specified node.

Note

The search is conducted depth-first.

Parameters:

anINode (ORSModel.ors.Node) –

Returns:

output (bool) – true if the specified node in the parent hierarchy, false otherwise

getIsNodeOneOfMyDescendants(self, anINode: ORSModel.ors.Node) bool

Checks to see if a specified node is in the child hierarchy of the node.

Note

The child hierarchy is searched in its entirety for the specified node.

Note

The search is conducted depth-first.

Parameters:

anINode (ORSModel.ors.Node) –

Returns:

output (bool) – true if the specified node in the child hierarchy, false otherwise

getMaxTSizeOfChilden(self) int

Get Maximum T Size of all children node of this node.

Returns:

output (int) –

getParentNodes(self) ORSModel.ors.List

Gets the immediate parent nodes.

Returns:

output (ORSModel.ors.List) – a list of nodes (a List)

getParentWithGUID(self, pGUID: str) ORSModel.ors.Node

Gets a parent node (from the hierarchy) with the given GUID.

Note

The whole parent hierarchy is searched.

Note

The search is done breadth-first.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Parameters:

pGUID (str) – a GUID (a string)

Returns:

output (ORSModel.ors.Node) – a parent node if found (a Node), none() otherwise

getParentsOfClass(self, pProgId: str) ORSModel.ors.List

Returns the nodes of the specified class found in the immediate parents.

Note

Result will be an empty list if no match is found.

Note

Use static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).

Parameters:

pProgId (str) – the name of the class to test against (a string)

Returns:

output (ORSModel.ors.List) – a list of nodes (a List)

getVisual(self) ORSModel.ors.Visual
Returns:

output (ORSModel.ors.Visual) – the visual of a model (a Visual)

isVisibleInView(view: View) bool

Gets the visibility of the receiver in a given view.

Parameters:

view (ORSModel.ors.View) – The current view

Returns:

output (bool) – true if the receiver is visible, false otherwise

none() Node

Returns a none object, equivalent to a non-existent object (or null).

Returns:

output (Node) –

propagateChildrenNodesOrganizationDirty(includeSelf=False)

Calls for a propagateDirty with the flag OrsChildrenNodesOrganizationDirty

Parameters:

includeSelf (bool) – True includes the receiver in the propagation, False doesn’t

propagateDataDirty(includeSelf=False)

Calls for a propagateDirty with the flag OrsDataDirty

Parameters:

includeSelf (bool) – True includes the receiver in the propagation, False doesn’t

propagateDirty(self, dirtyFlag: str, includeSelf: bool = False)

Causes a dirty message to be sent to all children nodes.

Note

See ORS_def.h for default dirty flag (ex: ORSDataDirty).

Note

A dirty message has different results for different objects, but generally causes a refresh on the data.

Note

Message propagation is done depth-first.

Parameters:
  • dirtyFlag (str) – a string dirty flag (a string)

  • includeSelf (bool) – should set this dirty (a bool)

propagateGeometryDirty(includeSelf=False)

Calls for a propagateDirty with the flag OrsGeometryDirty

Parameters:

includeSelf (bool) – True includes the receiver in the propagation, False doesn’t

propagateHighlightDirty(includeSelf=False)

Calls for a propagateDirty with the flag OrsHighlightDirty

Parameters:

includeSelf (bool) – True includes the receiver in the propagation, False doesn’t

propagatePropertyDirty(includeSelf=False)

Calls for a propagateDirty with the flag OrsPropertyDirty

Parameters:

includeSelf (bool) – True includes the receiver in the propagation, False doesn’t

propagateVisibilityDirty(includeSelf=False)

Calls for a propagateDirty with the flag OrsVisibilityDirty

Parameters:

includeSelf (bool) – True includes the receiver in the propagation, False doesn’t

refresh()

Refreshes the views related to the current object

refreshAll2DParentViews(self)

Causes all 2D views in the parent hierarchy of the node to be refreshed.

refreshAll2DParentViewsIfVisible(self)

Causes all 2D views in the parent hierarchy of the node to be refreshed if it is a model and it visuals are visible in the views.

refreshAll3DParentViews(self)

Causes all 3D views in the parent hierarchy of the node to be refreshed.

refreshAll3DParentViewsIfVisible(self)

Causes all 3D views in the parent hierarchy of the node to be refreshed if it is a model and it visuals are visible in the views.

refreshAllParentViews(self)

Causes all views in the parent hierarchy of the node to be refreshed.

refreshAllParentViewsIfVisible(self)

Causes all views in the parent hierarchy of the node to be refreshed if it is a model and it visuals are visible in the views.

setAllowRenderingInAllParentViews(self, bValue: bool)

Allows or prevents rendering in the views affected by a node.

Parameters:

bValue (bool) – true to allow rendering, false to disallow it.

switchOrderOfPrecedenceOfChildrenNodes(self, anINode1: ORSModel.ors.Node, anINode2: ORSModel.ors.Node) bool

Rearranges the order of child nodes.

Note

When child nodes are not in the desired order, they can be switched with this method (for example, the order in which they are rendered can be undesired).

Note

Both nodes are swapped in the list of nodes. For example, if nodes are A B C D and this call is made switchOrderOfPrecedenceOfChildrenNodes(A, C), the nodes are then in this order: C B A D.

Note

This method dives down in the child hierarchy until it finds a node where both arguments appear, then performs the switch at that level.

Parameters:
Returns:

output (bool) – true if successful, false otherwise

switchOrderOfPrecedenceOfParentNodes(self, anINode1: ORSModel.ors.Node, anINode2: ORSModel.ors.Node) bool

Rearranges the ordering of immediate parent nodes.

Note

When parent nodes are not in the desired order, they can be switched with this method.

Note

Both nodes are swapped in the list of nodes. For example, if nodes are A B C D and this call is made switchOrderOfPrecedenceOfParentNodes(A, C), the nodes are then in this order: C B A D.

Note

This method acts only on immediate parent nodes, not the entire parent hierarchy.

Parameters:
Returns:

output (bool) – true if successful, false otherwise

Managed

class ORSModel.ors.Managed(*args, **kwargs)

Bases: ORSBaseClass

An abstract class that implements all the default behavior of managed objects.

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)

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 saved.

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)

Loads an object from an XML string.

Parameters:

anXML (str) – an XML (a string)

Managed.atomicLoadFrom(self, buffer: bytes, nBytes: int)

Loads an object from a memory buffer. Used for python pickling.

Parameters:
  • buffer (bytes) – the buffer

  • nBytes (int) – the number of bytes in the buffer (a uint64_t)

Managed.atomicLoadFrom(self, stream: ORSModel.ors.Stream) -> int

Loads an object from a stream (using callback).

Parameters:

stream (ORSModel.ors.Stream) – the stream to read data from

Returns:

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

atomicLoadSpecificNode(self, aFilename: str, aXPathOfTheNodeToLoad: str) bool

Loads an object from a file containing several objects.

Parameters:
  • aFilename (str) – The file name, including entire path (a string)

  • aXPathOfTheNodeToLoad (str) – The XPath specification to find the node

Returns:

output (bool) – true if node was found and loaded, false otherwise

atomicSave(self, aFilename: str, isTemporary: bool = False, iCompressionEngine: int = 1) 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

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

Returns:

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

atomicSaveToLegacyFormat(self, aFilename: str, isTemporary: bool = False, iCompressionEngine: int = 1) int

Saves the object to a file in the legacy (2022.2) format.

Parameters:
  • aFilename (str) – path of the file to save

  • isTemporary (bool) – if true, try to keep file in memory

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

Returns:

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

atomicSaveToStream(self, stream: ORSModel.ors.Stream, iCompressionEngine: int = 1) int

Saves the object to a stream (through callback).

Parameters:
  • stream (ORSModel.ors.Stream) – stream object to save current object in

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

Returns:

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

copy(self) ORSModel.ors.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)

createScalarValuesCollection(self)

method createScalarValuesCollection

deleteObject(self)

Explicitly deletes the core object wrapped by this Interface object.

deleteObjectAndAllItsChildren(self)

Explicitly deletes the core object wrapped by this Interface object, along with all its children.

ensureInitialization(self)

This is for the Python interface.

getAllGroupsContaining(self, anIObject: ORSModel.ors.Managed) ORSModel.ors.List

Gets all the groups that contain the given object.

Parameters:

anIObject (ORSModel.ors.Managed) –

Returns:

output (ORSModel.ors.List) –

getAllInstancesOf(pProgId: str) ORSModel.ors.List

Gathers all existing objects of the specified class.

Parameters:

pProgId (str) –

Returns:

output (ORSModel.ors.List) –

getAllObjectsOfClassAndPrivateTitle(pProgId: str, pPrivateTitle: str) ORSModel.ors.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)

getAllObjectsOfClassAndTitle(pProgId: str, pTitle: str) ORSModel.ors.List

Gathers all existing objects of the specified class, that have a matching title.

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

  • pTitle (str) – 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) ORSModel.ors.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)

getAllRepresentableInstancesOf(pProgId: str) ORSModel.ors.List

Gathers all existing objects of the specified class that are representable.

Parameters:

pProgId (str) –

Returns:

output (ORSModel.ors.List) –

getAllRepresentableObjects() ORSModel.ors.List

Gets all the representable objects of the world.

Returns:

output (ORSModel.ors.List) – a list containing all the representable objects

getAtomicTextRepresentation(self, bSelfContained: bool) str

Retrieves the object’s atomic text representation.

Parameters:

bSelfContained (bool) –

Returns:

output (str) –

getAutoDelete(self) bool

Gets the autodelete value.

Returns:

output (bool) –

getBinaryUserInfo(self, pTag: str)

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)

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

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

getDataChecksum(self) str

Returns the computed checksum of the data.

Returns:

output (str) –

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)

getEntireDirtySignature(self) int

Gets the current dirty signature for all aspects, added up.

Note

Objects can be dirty for several aspects, see the ors_def.h file for the different dirty aspects.

Returns:

output (int) – entire 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) – true if callbacks exist for the event, false otherwise

getHighlightDirtySignature()

Gets the current dirty signature for the flag OrsHighlightDirty

Returns:

highlightDirtySignature (int) – the dirty signature

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

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) –

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

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

getMetadataChecksum(self) str

Returns the computed checksum of the metadata.

Returns:

output (str) –

getObjectWithGUID(guid: str) ORSModel.ors.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

getObjectWithGUIDasPointer(guid: str) ORSModel.ors.Managed

Retrieves an object from its GUID.

Parameters:

guid (str) – a GUID (a string)

Returns:

output (ORSModel.ors.Managed) – An object or nullptr 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)

getScalarValuesCollection(self) ORSModel.ors.ScalarValuesCollection

method getScalarValuesCollection

Returns:

output (ORSModel.ors.ScalarValuesCollection) –

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) ORSModel.ors.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)

getUserInfoAsDictionary()

User info copy of Managed in a easy way for manipulation

return a copy of the object user info as a dictionary

getUserInfoMatchingPattern(self, pattern: str, case_sensitive_search: bool) List[str]

Searches the user info dictionary based on a pattern matching.

Note

The pattern matching is done via regex.

Parameters:
  • pattern (str) – a search pattern (a string)

  • case_sensitive_search (bool) – true to search case-sensitive, false otherwise (a bool)

Returns:

output (List[str]) – a list of keys and values pairs, for all matching keys (a list of strings)

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

Checks if the underlying core object is None.

Note

Interface objects hold references to core objects, so this method checks to see if a core object is truly referred to.

Returns:

output (bool) – true if the core object is non-existent, false otherwise.

isNotNone(self) bool

Checks if the underlying core object is not None.

Note

Interface objects hold references to core objects, so this method checks to see if a core object is truly referred to.

Returns:

output (bool) – true if the core object is existent, false otherwise.

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)

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)

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)

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.

setAutoDelete(self, value: bool)

When set to true, the interface object will call deleteObject on its core object when it is being deleted.

Parameters:

value (bool) –

setBinaryUserInfo(self, pTag: str, pValue: bytes, iDataSize: int)

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)

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)

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

setGeometryDirty()

Calls for a setDirty with the flag OrsGeometryDirty

setHighlightDirty()

Calls for a setDirty with the flag OrsHighlightDirty

setIdentityIsPreservedForPickling(self, value: bool)

Set to True if the GUID is to be preserved when pickling and unpickling an object.

Parameters:

value (bool) –

setIsNotDirty(self)

Sets the object as not being dirty for all dirty flags.

setIsRepresentable(self, isRepresentable: bool)

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)

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)

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)

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

setTitle(self, newVal: str)

Sets the title of the object.

Dirty flags: OrsPropertyDirty

Anonymize newVal:

True

Parameters:

newVal (str) – new title (a string)

setUserInfo(self, pTag: str, pValue: str)
Parameters:
  • pTag (str) –

  • pValue (str) –

setUserInfoFromDictionary(aDic)

Add key value pair to the user Info of the Object. an str call are done on the key and values to insure that we respect the UserInfo protocol of Managed Object

Parameters:

aDic (dict) – a dictionary of information to add to the user information

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

An abstract class from which all objects issued from the ORS Core Library inherit.

getPythonTraceBack() List[str]

Set the python traceback for a call from python.

Returns:

output (List[str]) –

isManaged(self) bool
Returns:

output (bool) –

isNone(self) bool
Returns:

output (bool) –

setPythonTraceBack(tb: List[str])

Set the python traceback for a call from python.

Parameters:

tb (List[str]) –