![]() |
3DCoat Python API
The 3DCoat Python API documentation.
|
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) | |
| coat.SceneElement.__init__ | ( | self | ) |
Reimplemented in coat.Curve, coat.Curve, coat.Curve, and coat.Curve.
| coat.SceneElement.__init__ | ( | self, | |
| any | vo ) |
Reimplemented in coat.Curve, coat.Curve, coat.Curve, and coat.Curve.
| coat.SceneElement.__init__ | ( | self, | |
| any | c ) |
Reimplemented in coat.Curve, coat.Curve, coat.Curve, and coat.Curve.
| coat.SceneElement.__init__ | ( | self, | |
| SceneElement | other ) |
Reimplemented in coat.Curve, coat.Curve, coat.Curve, and coat.Curve.
| coat.SceneElement.__init__ | ( | self | ) |
Reimplemented in coat.Curve, coat.Curve, coat.Curve, and coat.Curve.
| bool coat.SceneElement.__eq__ | ( | self, | |
| SceneElement | other ) |
| bool coat.SceneElement.__ne__ | ( | self, | |
| SceneElement | other ) |
| SceneElement coat.SceneElement.addChild | ( | self, | |
| str | name ) |
add the child element of the same nature
| name | the name |
| coat.SceneElement.addLinkedPath | ( | self, | |
| str | path ) |
set the linked file path
| coat.SceneElement.changeParent | ( | self, | |
| SceneElement | newParent ) |
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, | |
| int | index ) |
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 | ) |
Collect the selected elements in the subtree (including this element if selected)
| coat.SceneElement.copyMergeTo | ( | self, | |
| SceneElement | dest, | ||
| BoolOpType | op ) |
copy and merge the volume to another one, delete this volume
| dest | the destination |
| op | the boolean operation type |
| 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
| 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, | |
| str | name ) |
find the element in subtree by name
| name | the name t seek |
| str coat.SceneElement.getLinkedPath | ( | self, | |
| int | id ) |
get the linked file path
| 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, | |
| SceneElement | child ) |
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, | |
| any | fn ) |
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, | |
| any | fn ) |
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
|
| int coat.SceneElement.linkedObjectCount | ( | self | ) |
get the linked file path
| coat.SceneElement.mergeSubtree | ( | self, | |
| bool | booleanMerge = False ) |
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, | |
| SceneElement | dest, | ||
| BoolOpType | op ) |
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, | |
| int | index ) |
remove one child from the subtree
| index | index of the child |
| SceneElement coat.SceneElement.rename | ( | self, | |
| str | name ) |
rename the element
| name | the new name |
| coat.SceneElement.select | ( | self | ) |
add the object to selected
| bool coat.SceneElement.selected | ( | self | ) |
Check if the scene element is selected.
| coat.SceneElement.selectOne | ( | self | ) |
unselect all similar elements and select this one
| coat.SceneElement.setGhost | ( | self, | |
| bool | ghost ) |
sets the ghosting state (if available)
| ghost | set true to ghost |
| coat.SceneElement.setReferenceColor | ( | self, | |
| vec4 | color ) |
set the reference color for the element
| color | the (r, g, b, a) color, each channel is 0..1 |
| SceneElement coat.SceneElement.setTransform | ( | self, | |
| mat4 | Transform ) |
Set the transform matrix.
| Transform | the transform matrix |
| coat.SceneElement.setVisibility | ( | self, | |
| bool | visible ) |
set the visibility of the element
| visible | true if need to be visible |
| SceneElement coat.SceneElement.transform | ( | self, | |
| mat4 | Transform ) |
Additional transform over the object.
| Transform | the matrix |
| SceneElement coat.SceneElement.transform_single | ( | self, | |
| mat4 | Transform ) |
Additional transform over the object, not applied to child objects.
| Transform | the matrix |
| coat.SceneElement.unselectAll | ( | self | ) |
unselect all similar objects
| bool coat.SceneElement.visible | ( | self | ) |
returns own visibility state reference.
It does not take into account that parent may be invisible.
| Volume coat.SceneElement.Volume | ( | self | ) |
returns the volume object to operate over voxels or surface