3DCoat Python API
The 3DCoat Python API documentation.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
coat.SceneElement Class Reference

Public Member Functions

 __init__ (self)
 
 __init__ (self, vo=Any)
 
 __init__ (self, c=Any)
 
 __init__ (self, other=SceneElement)
 
 __init__ (self)
 
bool __eq__ (self, other=SceneElement)
 
bool __ne__ (self, other=SceneElement)
 
SceneElement parent (self)
 get the parent scene graph element
 
int childCount (self)
 returns the child elements count
 
SceneElement child (self, index=int)
 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, Transform=mat4)
 Set the transform matrix.
 
SceneElement transform (self, Transform=mat4)
 Additional transform over the object.
 
SceneElement density (self, density_value=float)
 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, Transform=mat4)
 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
 
SceneElement rename (self, name=str)
 rename the element
 
SceneElement addChild (self, name=str)
 add the child element of the same nature
 
SceneElement findInSubtree (self, name=str)
 find the element in subtree by name
 
bool iterateSubtree (self, fn=Any)
 iterate over the subtree
 
bool iterateVisibleSubtree (self, fn=Any)
 iterate over the visible subtree
 
 mergeSubtree (self, booleanMerge=bool)
 merge all subtree volumes into this
 
 mergeTo (self, dest=SceneElement, op=BoolOpType)
 merge the volume to another one, delete this volume
 
 copyMergeTo (self, dest=SceneElement, op=BoolOpType)
 copy and merge the volume to another one, delete this volume
 
 removeSubtree (self)
 remove the whole subtree
 
 removeSubtreeItem (self, index=int)
 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, newParent=SceneElement)
 change the parent element for the current one
 
bool isParentOf (self, child=SceneElement)
 check if the element is parent of another one
 
bool visible (self)
 returns own visibility state reference.
 
 setVisibility (self, visible=bool)
 set the visibility of the element
 
bool ghost (self)
 returs the state of ghosting (if available)
 
 setGhost (self, ghost=bool)
 sets the ghosting state (if available)
 
vec4 getReferenceColor (self)
 get the reference color for the element
 
 setReferenceColor (self, color=vec4)
 set the reference color for the element
 
Any Volume (self)
 
 select (self)
 
 selectOne (self)
 
 unselectAll (self)
 
bool selected (self)
 
list collectSelected (self)
 

Constructor & Destructor Documentation

◆ __init__() [1/5]

coat.SceneElement.__init__ (   self)

◆ __init__() [2/5]

coat.SceneElement.__init__ (   self,
  vo = Any 
)

◆ __init__() [3/5]

coat.SceneElement.__init__ (   self,
  c = Any 
)

◆ __init__() [4/5]

coat.SceneElement.__init__ (   self,
  other = SceneElement 
)

◆ __init__() [5/5]

coat.SceneElement.__init__ (   self)

Member Function Documentation

◆ __eq__()

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

◆ __ne__()

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

◆ addChild()

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

add the child element of the same nature

Parameters
namethe name
Returns
the new element reference

◆ changeParent()

coat.SceneElement.changeParent (   self,
  newParent = SceneElement 
)

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,
  index = int 
)

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)

◆ copyMergeTo()

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

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

Parameters
destthe destination
opthe boolean operation type

◆ density()

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

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,
  name = str 
)

find the element in subtree by name

Parameters
namethe name t seek
Returns
the element reference

◆ 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,
  child = SceneElement 
)

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,
  fn = Any 
)

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,
  fn = Any 
)

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

◆ mergeSubtree()

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

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,
  dest = SceneElement,
  op = BoolOpType 
)

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,
  index = int 
)

remove one child from the subtree

Parameters
indexindex of the child

◆ rename()

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

rename the element

Parameters
namethe new name
Returns
this element reference

◆ select()

coat.SceneElement.select (   self)

◆ selected()

bool coat.SceneElement.selected (   self)

◆ selectOne()

coat.SceneElement.selectOne (   self)

◆ setGhost()

coat.SceneElement.setGhost (   self,
  ghost = bool 
)

sets the ghosting state (if available)

Parameters
ghostset true to ghost

◆ setReferenceColor()

coat.SceneElement.setReferenceColor (   self,
  color = vec4 
)

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,
  Transform = mat4 
)

Set the transform matrix.

Parameters
Transformthe transform matrix
Returns
this element reference

◆ setVisibility()

coat.SceneElement.setVisibility (   self,
  visible = bool 
)

set the visibility of the element

Parameters
visibletrue if need to be visible

◆ transform()

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

Additional transform over the object.

Parameters
Transformthe matrix
Returns
this element reference

◆ transform_single()

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

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

Parameters
Transformthe matrix
Returns
this element reference

◆ unselectAll()

coat.SceneElement.unselectAll (   self)

◆ 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()

Any coat.SceneElement.Volume (   self)

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