3DCoat Python API
The 3DCoat Python API documentation.
|
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) |
coat.SceneElement.__init__ | ( | self | ) |
coat.SceneElement.__init__ | ( | self, | |
vo = Any |
|||
) |
coat.SceneElement.__init__ | ( | self, | |
c = Any |
|||
) |
coat.SceneElement.__init__ | ( | self, | |
other = SceneElement |
|||
) |
coat.SceneElement.__init__ | ( | self | ) |
bool coat.SceneElement.__eq__ | ( | self, | |
other = SceneElement |
|||
) |
bool coat.SceneElement.__ne__ | ( | self, | |
other = SceneElement |
|||
) |
SceneElement coat.SceneElement.addChild | ( | self, | |
name = str |
|||
) |
add the child element of the same nature
name | the name |
coat.SceneElement.changeParent | ( | self, | |
newParent = SceneElement |
|||
) |
change the parent element for the current one
newParent | the new parent reference. Pay attention, changing paren is not always possible! |
SceneElement coat.SceneElement.child | ( | self, | |
index = int |
|||
) |
returns child element by index
index | the index of the element in subtree |
int coat.SceneElement.childCount | ( | self | ) |
returns the child elements count
SceneElement coat.SceneElement.clear | ( | self | ) |
Clear the element content.
list coat.SceneElement.collectSelected | ( | self | ) |
coat.SceneElement.copyMergeTo | ( | self, | |
dest = SceneElement , |
|||
op = BoolOpType |
|||
) |
copy and merge the volume to another one, delete this volume
dest | the destination |
op | the boolean operation type |
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
density_value | the voxels per mm |
SceneElement coat.SceneElement.duplicate | ( | self | ) |
diplicate the item
SceneElement coat.SceneElement.duplicateAsInstance | ( | self | ) |
create the instance of the object if instancing supported
SceneElement coat.SceneElement.findInSubtree | ( | self, | |
name = str |
|||
) |
find the element in subtree by name
name | the name t seek |
vec4 coat.SceneElement.getReferenceColor | ( | self | ) |
get the reference color for the element
mat4 coat.SceneElement.getTransform | ( | self | ) |
get the scene element transform
bool coat.SceneElement.ghost | ( | self | ) |
returs the state of ghosting (if available)
bool coat.SceneElement.isCurve | ( | self | ) |
Check if the element is curve.
bool coat.SceneElement.isParentOf | ( | self, | |
child = SceneElement |
|||
) |
check if the element is parent of another one
child | the child element |
bool coat.SceneElement.isSculptObject | ( | self | ) |
Check if it is the sculpt object.
bool coat.SceneElement.iterateSubtree | ( | self, | |
fn = Any |
|||
) |
iterate over the subtree
fn | the function to call, return true if need to stop the iterations, function looks like def fn(el):
...code...
return False or True
|
bool coat.SceneElement.iterateVisibleSubtree | ( | self, | |
fn = Any |
|||
) |
iterate over the visible subtree
fn | the function to call, return true if need to stop the iterations, function looks like def fn(el):
...code...
return False or True
|
coat.SceneElement.mergeSubtree | ( | self, | |
booleanMerge = bool |
|||
) |
merge all subtree volumes into this
booleanMerge | use boolean summ to merge. Othervice merge meshes without booleans. This option works only for surfave, in voxels it will always do boolean summ |
coat.SceneElement.mergeTo | ( | self, | |
dest = SceneElement , |
|||
op = BoolOpType |
|||
) |
merge the volume to another one, delete this volume
dest | the destination |
op | the boolean operation type |
str coat.SceneElement.name | ( | self | ) |
get the element name
SceneElement coat.SceneElement.parent | ( | self | ) |
get the parent scene graph element
coat.SceneElement.remove | ( | self | ) |
remove this item and all child objects from the scene
coat.SceneElement.removeSubtree | ( | self | ) |
remove the whole subtree
coat.SceneElement.removeSubtreeItem | ( | self, | |
index = int |
|||
) |
remove one child from the subtree
index | index of the child |
SceneElement coat.SceneElement.rename | ( | self, | |
name = str |
|||
) |
rename the element
name | the new name |
coat.SceneElement.select | ( | self | ) |
bool coat.SceneElement.selected | ( | self | ) |
coat.SceneElement.selectOne | ( | self | ) |
coat.SceneElement.setGhost | ( | self, | |
ghost = bool |
|||
) |
sets the ghosting state (if available)
ghost | set true to ghost |
coat.SceneElement.setReferenceColor | ( | self, | |
color = vec4 |
|||
) |
set the reference color for the element
color | the (r, g, b, a) color, each channel is 0..1 |
SceneElement coat.SceneElement.setTransform | ( | self, | |
Transform = mat4 |
|||
) |
Set the transform matrix.
Transform | the transform matrix |
coat.SceneElement.setVisibility | ( | self, | |
visible = bool |
|||
) |
set the visibility of the element
visible | true if need to be visible |
SceneElement coat.SceneElement.transform | ( | self, | |
Transform = mat4 |
|||
) |
Additional transform over the object.
Transform | the matrix |
SceneElement coat.SceneElement.transform_single | ( | self, | |
Transform = mat4 |
|||
) |
Additional transform over the object, not applied to child objects.
Transform | the matrix |
coat.SceneElement.unselectAll | ( | self | ) |
bool coat.SceneElement.visible | ( | self | ) |
returns own visibility state reference.
It does not take into account that parent may be invisible.
Any coat.SceneElement.Volume | ( | self | ) |