MeshLib Python Docs
Loading...
Searching...
No Matches
mrmeshpy.Object Class Reference
Inheritance diagram for mrmeshpy.Object:

Public Member Functions

None __init__ (self)
bool addChild (self, Object child, bool recognizedChild=True)
bool addChildBefore (self, Object newChild, Object existingChild)
bool addTag (self, str tag)
None applyScale (self, float scaleFactor)
VisualObject asType (self)
ConstVisualObject asType (ConstObject self)
Const_std_vector_std_shared_ptr_Object children (self)
Const_std_vector_std_shared_ptr_Object_const children (ConstObject self)
bool detachFromParent (self)
Object find (self, str name)
ConstObject find (ConstObject self, str name)
Object findCommonAncestor (self, Object other)
ConstObject findCommonAncestor (ConstObject self, ConstObject other)
Object parent (self)
ConstObject parent (ConstObject self)
None removeAllChildren (self)
bool removeChild (self, Object child)
bool removeChild (self, Object child)
bool removeTag (self, str tag)
None resetXf (self, ConstViewportId id=...)
bool select (self, bool on)
None setAncillary (self, bool ancillary)
None setGlobalVisibility (self, bool on, ConstViewportMask viewportMask='MR::ViewportMask::any()')
None setLocked (self, bool on)
None setName (self, str name)
None setParentLocked (self, bool lock)
None setVisibilityMask (self, ConstViewportMask viewportMask)
None setVisible (self, bool on, ConstViewportMask viewportMask='MR::ViewportMask::all()')
None setWorldXf (self, ConstAffineXf3f xf, ConstViewportId id=...)
None setXf (self, ConstAffineXf3f xf, ConstViewportId id=...)
None setXfsForAllViewports (self, ConstViewportProperty_AffineXf3f xf)
None sortChildren (self)
None swap (self, Object other)
Public Member Functions inherited from mrmeshpy.ConstObject
 __init__ (self, *args, **kwargs)
str className (self)
str classNameInPlural (self)
Object clone (self)
Object cloneTree (self)
ConstChildren constChildren (self)
std_vector_std_string getInfoLines (self)
int getModelHash (self)
bool globalVisibility (self, ConstViewportMask viewportMask='MR::ViewportMask::any()')
ViewportMask globalVisibilityMask (self)
bool hasModel (self)
bool hasVisualRepresentation (self)
int heapBytes (self)
bool isAncestor (self, ConstObject ancestor)
bool isAncillary (self)
bool isGlobalAncillary (self)
bool isLocked (self)
bool isParentLocked (self)
bool isSelected (self)
bool isVisible (self, ConstViewportMask viewportMask='MR::ViewportMask::any()')
str name (self)
None resetRedrawFlag (self)
bool sameModels (self, ConstObject other)
Object shallowClone (self)
Object shallowCloneTree (self)
Const_std_set_std_string tags (self)
str typeName (self)
ViewportMask visibilityMask (self)
AffineXf3f worldXf (self, ConstViewportId id=..., bool_output isDef=None)
ConstAffineXf3f xf (self, ConstViewportId id=..., bool_output isDef=None)
ConstViewportProperty_AffineXf3f xfsForAllViewports (self)
Public Member Functions inherited from mrmeshpy.ConstObjectChildrenHolder
 __init__ (self, *args, **kwargs)
Object getSharedPtr (self)
Public Member Functions inherited from mrmeshpy.ObjectChildrenHolder
None __init__ (self)
None __init__ (self, ConstObjectChildrenHolder arg0)
ObjectChildrenHolder assign (self, ConstObjectChildrenHolder other)

Additional Inherited Members

Static Public Member Functions inherited from mrmeshpy.ConstObject
str StaticClassName ()
str StaticClassNameInPlural ()
str StaticTypeName ()
bool getRedrawFlag (*args, **kwargs)
Box3f getWorldBox (*args, **kwargs)
Box3f getWorldTreeBox (*args, **kwargs)
Static Public Member Functions inherited from mrmeshpy.ObjectChildrenHolder
None __init__ (*args, **kwargs)

Detailed Description

Generated from:  MR::Object
Aliases:  ChangeObjectSelectedAction.Obj, ChangeObjectVisibilityAction.Obj, ObjectPtr, std_shared_ptr_Object

named object in the data model

Constructor & Destructor Documentation

◆ __init__()

None mrmeshpy.Object.__init__ ( self)

Member Function Documentation

◆ addChild()

bool mrmeshpy.Object.addChild ( self,
Object child,
bool recognizedChild = True )
adds given object at the end of children (recognized or not);
returns false if it was already child of this, of if given pointer is empty;
child object will always report this as parent after the call;
\\param recognizedChild if set to false then child object will be excluded from children() and it will be stored by weak_ptr

◆ addChildBefore()

bool mrmeshpy.Object.addChildBefore ( self,
Object newChild,
Object existingChild )
adds given object in the recognized children before existingChild;
if newChild was already among this children then moves it just before existingChild keeping the order of other children intact;
returns false if newChild is nullptr, or existingChild is not a child of this

◆ addTag()

bool mrmeshpy.Object.addTag ( self,
str tag )
adds tag to the object's tag storage
additionally calls ObjectTagManager::tagAddedSignal
NOTE: tags starting with a dot are considered as service ones and might be hidden from UI

◆ applyScale()

None mrmeshpy.Object.applyScale ( self,
float scaleFactor )

◆ asType() [1/2]

ConstVisualObject mrmeshpy.Object.asType ( ConstObject self)

Reimplemented from mrmeshpy.ConstObject.

◆ asType() [2/2]

VisualObject mrmeshpy.Object.asType ( self)

Reimplemented from mrmeshpy.ConstObject.

◆ children() [1/2]

\\deprecated the cast inside is undefined behaviour, use constChildren() instead

Reimplemented from mrmeshpy.ConstObject.

◆ children() [2/2]

Const_std_vector_std_shared_ptr_Object mrmeshpy.Object.children ( self)
an object can hold other sub-objects

Reimplemented from mrmeshpy.ConstObject.

◆ detachFromParent()

bool mrmeshpy.Object.detachFromParent ( self)
removes this from its parent children list
returns false if it was already orphan

◆ find() [1/2]

ConstObject mrmeshpy.Object.find ( ConstObject self,
str name )
finds a direct child by name

Reimplemented from mrmeshpy.ConstObject.

◆ find() [2/2]

Object mrmeshpy.Object.find ( self,
str name )
finds a direct child by name

Reimplemented from mrmeshpy.ConstObject.

◆ findCommonAncestor() [1/2]

ConstObject mrmeshpy.Object.findCommonAncestor ( ConstObject self,
ConstObject other )

Reimplemented from mrmeshpy.ConstObject.

◆ findCommonAncestor() [2/2]

Object mrmeshpy.Object.findCommonAncestor ( self,
Object other )
Find a common ancestor between this object and the other one.
Returns null on failure (which is impossible if both are children of the scene root).
Will return `this` if `other` matches `this`.

Reimplemented from mrmeshpy.ConstObject.

◆ parent() [1/2]

ConstObject mrmeshpy.Object.parent ( ConstObject self)
returns parent object in the tree

Reimplemented from mrmeshpy.ConstObject.

◆ parent() [2/2]

Object mrmeshpy.Object.parent ( self)
returns parent object in the tree

Reimplemented from mrmeshpy.ConstObject.

◆ removeAllChildren()

None mrmeshpy.Object.removeAllChildren ( self)
detaches all recognized children from this, keeping all unrecognized ones

◆ removeChild() [1/2]

bool mrmeshpy.Object.removeChild ( self,
Object child )
returns false if it was not child of this

◆ removeChild() [2/2]

bool mrmeshpy.Object.removeChild ( self,
Object child )

◆ removeTag()

bool mrmeshpy.Object.removeTag ( self,
str tag )
removes tag from the object's tag storage
additionally calls ObjectTagManager::tagRemovedSignal

◆ resetXf()

None mrmeshpy.Object.resetXf ( self,
ConstViewportId id = ... )
forgets specific transform in given viewport (or forgets all specific transforms for {} input)

Reimplemented in mrmeshpy.FeatureObject.

◆ select()

bool mrmeshpy.Object.select ( self,
bool on )
selects the object, returns true if value changed, otherwise returns false

Reimplemented in mrmeshpy.ObjectGcode, and mrmeshpy.SceneRootObject.

◆ setAncillary()

None mrmeshpy.Object.setAncillary ( self,
bool ancillary )
ancillary object is an object hidden (in scene menu) from a regular user
such objects cannot be selected, and if it has been selected, it is unselected when turn ancillary

Reimplemented in mrmeshpy.SceneRootObject.

◆ setGlobalVisibility()

None mrmeshpy.Object.setGlobalVisibility ( self,
bool on,
ConstViewportMask viewportMask = 'MR::ViewportMask::any()' )
if true sets all predecessors visible, otherwise sets this object invisible

◆ setLocked()

None mrmeshpy.Object.setLocked ( self,
bool on )

◆ setName()

None mrmeshpy.Object.setName ( self,
str name )

Reimplemented in mrmeshpy.SceneRootObject.

◆ setParentLocked()

None mrmeshpy.Object.setParentLocked ( self,
bool lock )

◆ setVisibilityMask()

None mrmeshpy.Object.setVisibilityMask ( self,
ConstViewportMask viewportMask )
specifies object visibility as bitmask of viewports

◆ setVisible()

None mrmeshpy.Object.setVisible ( self,
bool on,
ConstViewportMask viewportMask = 'MR::ViewportMask::all()' )
sets the object visible in the viewports specified by the mask (by default in all viewports)

◆ setWorldXf()

None mrmeshpy.Object.setWorldXf ( self,
ConstAffineXf3f xf,
ConstViewportId id = ... )

◆ setXf()

None mrmeshpy.Object.setXf ( self,
ConstAffineXf3f xf,
ConstViewportId id = ... )

Reimplemented in mrmeshpy.FeatureObject.

◆ setXfsForAllViewports()

None mrmeshpy.Object.setXfsForAllViewports ( self,
ConstViewportProperty_AffineXf3f xf )
modifies xfs for all viewports at once

◆ sortChildren()

None mrmeshpy.Object.sortChildren ( self)
sort recognized children by name

◆ swap()

None mrmeshpy.Object.swap ( self,
Object other )
swaps this object with other
note: do not swap object signals, so listeners will get notifications from swapped object
requires implementation of `swapBase_` and `swapSignals_` (if type has signals)

The documentation for this class was generated from the following file: