3DCoat Python API
The 3DCoat Python API documentation.
Loading...
Searching...
No Matches
coat.SceneElement Class Reference
Inheritance diagram for coat.SceneElement:
coat.Curve

Public Member Functions

 __init__ (self)
 
 __init__ (self, any vo)
 
 __init__ (self, any c)
 
 __init__ (self, SceneElement other)
 
 __init__ (self)
 
bool __eq__ (self, SceneElement other)
 
bool __ne__ (self, SceneElement other)
 
SceneElement parent (self)
 get the parent scene graph element
 
int childCount (self)
 returns the child elements count
 
SceneElement child (self, int index)
 returns child element by index
 
bool isSculptObject (self)
 Check if it is the sculpt object.
 
bool isCurve (self)
 Check if the element is curve.
 
SceneElement setTransform (self, mat4 Transform)
 Set the transform matrix.
 
SceneElement transform (self, mat4 Transform)
 Additional transform over the object.
 
SceneElement density (self, float density_value)
 this command useful if you use voxels, it sets the scale for the volume so that there will be density_value of voxels per mm
 
SceneElement transform_single (self, mat4 Transform)
 Additional transform over the object, not applied to child objects.
 
mat4 getTransform (self)
 get the scene element transform
 
SceneElement clear (self)
 Clear the element content.
 
str name (self)
 get the element name
 
str getLinkedPath (self, int id)
 get the linked file path
 
int linkedObjectCount (self)
 get the linked file path
 
 addLinkedPath (self, str path)
 set the linked file path
 
SceneElement rename (self, str name)
 rename the element
 
SceneElement addChild (self, str name)
 add the child element of the same nature
 
SceneElement findInSubtree (self, str name)
 find the element in subtree by name
 
bool iterateSubtree (self, any fn)
 iterate over the subtree
 
bool iterateVisibleSubtree (self, any fn)
 iterate over the visible subtree
 
 mergeSubtree (self, bool booleanMerge=False)
 merge all subtree volumes into this
 
 mergeTo (self, SceneElement dest, BoolOpType op)
 merge the volume to another one, delete this volume
 
 copyMergeTo (self, SceneElement dest, BoolOpType op)
 copy and merge the volume to another one, delete this volume
 
 removeSubtree (self)
 remove the whole subtree
 
 removeSubtreeItem (self, int index)
 remove one child from the subtree
 
 remove (self)
 remove this item and all child objects from the scene
 
SceneElement duplicate (self)
 diplicate the item
 
SceneElement duplicateAsInstance (self)
 create the instance of the object if instancing supported
 
 changeParent (self, SceneElement newParent)
 change the parent element for the current one
 
bool isParentOf (self, SceneElement child)
 check if the element is parent of another one
 
bool visible (self)
 returns own visibility state reference.
 
 setVisibility (self, bool visible)
 set the visibility of the element
 
bool ghost (self)
 returs the state of ghosting (if available)
 
 setGhost (self, bool ghost)
 sets the ghosting state (if available)
 
vec4 getReferenceColor (self)
 get the reference color for the element
 
 setReferenceColor (self, vec4 color)
 set the reference color for the element
 
Volume Volume (self)
 returns the volume object to operate over voxels or surface
 
 select (self)
 add the object to selected
 
 selectOne (self)
 unselect all similar elements and select this one
 
 unselectAll (self)
 unselect all similar objects
 
bool selected (self)
 Check if the scene element is selected.
 
list collectSelected (self)
 Collect the selected elements in the subtree (including this element if selected)
 

Constructor & Destructor Documentation

◆ __init__() [1/5]

coat.SceneElement.__init__ ( self)

Reimplemented in coat.Curve, coat.Curve, coat.Curve, and coat.Curve.

◆ __init__() [2/5]

coat.SceneElement.__init__ ( self,
any vo )

Reimplemented in coat.Curve, coat.Curve, coat.Curve, and coat.Curve.

◆ __init__() [3/5]

coat.SceneElement.__init__ ( self,
any c )

Reimplemented in coat.Curve, coat.Curve, coat.Curve, and coat.Curve.

◆ __init__() [4/5]

coat.SceneElement.__init__ ( self,
SceneElement other )

Reimplemented in coat.Curve, coat.Curve, coat.Curve, and coat.Curve.

◆ __init__() [5/5]

coat.SceneElement.__init__ ( self)

Reimplemented in coat.Curve, coat.Curve, coat.Curve, and coat.Curve.

Member Function Documentation

◆ __eq__()

bool coat.SceneElement.__eq__ ( self,
SceneElement other )

◆ __ne__()

bool coat.SceneElement.__ne__ ( self,
SceneElement other )

◆ addChild()

SceneElement coat.SceneElement.addChild ( self,
str name )

add the child element of the same nature

Parameters
namethe name
Returns
the new element reference

◆ addLinkedPath()

coat.SceneElement.addLinkedPath ( self,
str path )

set the linked file path

Returns
the name

◆ changeParent()

coat.SceneElement.changeParent ( self,
SceneElement newParent )

change the parent element for the current one

Parameters
newParentthe new parent reference. Pay attention, changing paren is not always possible!

◆ child()

SceneElement coat.SceneElement.child ( self,
int index )

returns child element by index

Parameters
indexthe index of the element in subtree
Returns
the child reference

◆ childCount()

int coat.SceneElement.childCount ( self)

returns the child elements count

Returns
child count

◆ clear()

SceneElement coat.SceneElement.clear ( self)

Clear the element content.

Returns
this element reference

◆ collectSelected()

list coat.SceneElement.collectSelected ( self)

Collect the selected elements in the subtree (including this element if selected)

◆ copyMergeTo()

coat.SceneElement.copyMergeTo ( self,
SceneElement dest,
BoolOpType op )

copy and merge the volume to another one, delete this volume

Parameters
destthe destination
opthe boolean operation type

◆ density()

SceneElement coat.SceneElement.density ( self,
float density_value )

this command useful if you use voxels, it sets the scale for the volume so that there will be density_value of voxels per mm

Parameters
density_valuethe voxels per mm

◆ duplicate()

SceneElement coat.SceneElement.duplicate ( self)

diplicate the item

Returns
the new item reference

◆ duplicateAsInstance()

SceneElement coat.SceneElement.duplicateAsInstance ( self)

create the instance of the object if instancing supported

Returns
the instance reference

◆ findInSubtree()

SceneElement coat.SceneElement.findInSubtree ( self,
str name )

find the element in subtree by name

Parameters
namethe name t seek
Returns
the element reference

◆ getLinkedPath()

str coat.SceneElement.getLinkedPath ( self,
int id )

get the linked file path

Returns
the name

◆ getReferenceColor()

vec4 coat.SceneElement.getReferenceColor ( self)

get the reference color for the element

Returns
the color (r,g,b,a), each channel is 0..1

◆ getTransform()

mat4 coat.SceneElement.getTransform ( self)

get the scene element transform

Returns
the transform matrix

◆ ghost()

bool coat.SceneElement.ghost ( self)

returs the state of ghosting (if available)

Returns
true if ghosted

◆ isCurve()

bool coat.SceneElement.isCurve ( self)

Check if the element is curve.

Returns
true if this is curve

◆ isParentOf()

bool coat.SceneElement.isParentOf ( self,
SceneElement child )

check if the element is parent of another one

Parameters
childthe child element
Returns
true if this element is parent of the child

◆ isSculptObject()

bool coat.SceneElement.isSculptObject ( self)

Check if it is the sculpt object.

Returns
true if this is the sculpt object

◆ iterateSubtree()

bool coat.SceneElement.iterateSubtree ( self,
any fn )

iterate over the subtree

Parameters
fnthe function to call, return true if need to stop the iterations, function looks like
def fn(el):
...code...
return False or True
el is coat.SceneElement
Returns
true if the callback interrupted the iterations

◆ iterateVisibleSubtree()

bool coat.SceneElement.iterateVisibleSubtree ( self,
any fn )

iterate over the visible subtree

Parameters
fnthe function to call, return true if need to stop the iterations, function looks like
def fn(el):
...code...
return False or True
el is coat.SceneElement
Returns
True if the callback interrupted the iterations

◆ linkedObjectCount()

int coat.SceneElement.linkedObjectCount ( self)

get the linked file path

Returns
the name

◆ mergeSubtree()

coat.SceneElement.mergeSubtree ( self,
bool booleanMerge = False )

merge all subtree volumes into this

Parameters
booleanMergeuse boolean summ to merge. Othervice merge meshes without booleans. This option works only for surfave, in voxels it will always do boolean summ

◆ mergeTo()

coat.SceneElement.mergeTo ( self,
SceneElement dest,
BoolOpType op )

merge the volume to another one, delete this volume

Parameters
destthe destination
opthe boolean operation type

◆ name()

str coat.SceneElement.name ( self)

get the element name

Returns
the name

◆ parent()

SceneElement coat.SceneElement.parent ( self)

get the parent scene graph element

Returns
the parent reference

◆ remove()

coat.SceneElement.remove ( self)

remove this item and all child objects from the scene

◆ removeSubtree()

coat.SceneElement.removeSubtree ( self)

remove the whole subtree

◆ removeSubtreeItem()

coat.SceneElement.removeSubtreeItem ( self,
int index )

remove one child from the subtree

Parameters
indexindex of the child

◆ rename()

SceneElement coat.SceneElement.rename ( self,
str name )

rename the element

Parameters
namethe new name
Returns
this element reference

◆ select()

coat.SceneElement.select ( self)

add the object to selected

◆ selected()

bool coat.SceneElement.selected ( self)

Check if the scene element is selected.

◆ selectOne()

coat.SceneElement.selectOne ( self)

unselect all similar elements and select this one

◆ setGhost()

coat.SceneElement.setGhost ( self,
bool ghost )

sets the ghosting state (if available)

Parameters
ghostset true to ghost

◆ setReferenceColor()

coat.SceneElement.setReferenceColor ( self,
vec4 color )

set the reference color for the element

Parameters
colorthe (r, g, b, a) color, each channel is 0..1

◆ setTransform()

SceneElement coat.SceneElement.setTransform ( self,
mat4 Transform )

Set the transform matrix.

Parameters
Transformthe transform matrix
Returns
this element reference

◆ setVisibility()

coat.SceneElement.setVisibility ( self,
bool visible )

set the visibility of the element

Parameters
visibletrue if need to be visible

◆ transform()

SceneElement coat.SceneElement.transform ( self,
mat4 Transform )

Additional transform over the object.

Parameters
Transformthe matrix
Returns
this element reference

◆ transform_single()

SceneElement coat.SceneElement.transform_single ( self,
mat4 Transform )

Additional transform over the object, not applied to child objects.

Parameters
Transformthe matrix
Returns
this element reference

◆ unselectAll()

coat.SceneElement.unselectAll ( self)

unselect all similar objects

◆ visible()

bool coat.SceneElement.visible ( self)

returns own visibility state reference.

It does not take into account that parent may be invisible.

Returns
item local visibility reference, you may get and set the visibility with the reference.

◆ Volume()

Volume coat.SceneElement.Volume ( self)

returns the volume object to operate over voxels or surface


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