3DCoat Python API
The 3DCoat Python API documentation.
|
Public Member Functions | |
clearScene (askUser=bool) | |
clear the whole scene | |
SceneElement | current () |
returns the current sculpt object | |
SceneElement | sculptRoot () |
get the root of all sculpt objects | |
SceneElement | curvesRoot () |
get the root of all curves | |
int | getLayer (name=str, addIfNotExists=bool) |
get the Layer ID by name, add the layer if not exists | |
str | getLayerName (LayerID=int) |
get the layer name | |
setLayerName (LayerID=int, name=str) | |
set the layer name | |
int | getLayerBlending (LayerID=int) |
get the layer blending mode | |
setLayerBlending (LayerID=int, mode=int) | |
set the layer blending mode | |
int | getCurrentLayer () |
get current layer identifier | |
setCurrentLayer (LayerID=int) | |
set the current layer | |
mergeVisibleLayers () | |
merge all visible layers | |
mergeLayerDown (LayerID=int) | |
merge the layer down | |
applyLayerBlending (LayerID=int) | |
apply layer blending | |
invalidateLayer (LayerID=int) | |
refresh the layer appearance in scene | |
setActiveLayer (LayerID=int) | |
activate the layer | |
removeLayer (LayerID=int) | |
remove the layer | |
bool | layerVisible (LayerID=int) |
return the layer visibility | |
setLayerVisibility (LayerID=int, Visible=bool) | |
set the layer visibility | |
setLayerColorOpacity (LayerID=int, Opacity=float) | |
set the layer opacity | |
setLayerDepthOpacity (LayerID=int, Opacity=float) | |
set the layer depth opacity | |
setLayerMetalnessOpacity (LayerID=int, Opacity=float) | |
set the layer metalness opacity | |
setLayerGlossOpacity (LayerID=int, Opacity=float) | |
set the layer gloss/roughness opacity | |
int | assignLayerMask (LayerID=int) |
assign the mask to the layer if it is not assigned before | |
removeLayerMask (LayerID=int) | |
remove the layer mask | |
int | getLayerMaskLayer (LayerID=int) |
get the mask identifier assigned to the layer | |
disableLayerMask (LayerID=int) | |
disable the mask for the layer | |
enableLayerMask (LayerID=int) | |
enable the mask for the layer | |
bool | maskEnabled (LayerID=int) |
check if the mask is enabled for the layer | |
setClippingLayer (LayerID=int) | |
set this layer as clipping layer | |
disableClippingLayer (LayerID=int) | |
disable the clipping layer | |
int | PaintObjectsCount () |
Get the count of paint objects in scene. | |
int | PaintMaterialCount () |
Get the count of paint materials. | |
int | PaintUVSetsCount () |
Get the paint UV-sets (textures) count. | |
RemovePaintObject (idx=int) | |
Remove the paint object. | |
RemovePaintMaterial (idx=int) | |
Remove the paint material. | |
RemoveUVSet (idx=int) | |
Remove the UV-set (texture) | |
str | PaintObjectName (idx=int) |
Get the reference to the object name. | |
str | PaintMaterialName (idx=int) |
Get the reference to the material mane. | |
str | PaintUVSetName (idx=int) |
Get the reference to the UV set name. | |
SceneElement | importMesh (filename=str, transform=mat4) |
import mesh into scene, it is the same as File->Import->Import mesh for vertex painting/reference ... This is the optimal way to import mesh into the scene | |
ScaleSceneVisually (scale=float) | |
Scale the whole scene visually but keep the export size. | |
ScaleSceneUnits (scale=float) | |
Keep the scene visial size in scene, but scale the export size. | |
float | GetSceneScale () |
the length of 1 scene unit when you export the scene | |
str | GetSceneUnits () |
get the name of the current scene units | |
bool | setSceneUnits (units=str) |
Set the scene units without actual scaling the scene to new units, just name change. | |
list | getAvailableUnits () |
Get the list of all available units. | |
bool | convertSceneUnits (destination_unit_name=str) |
Convert the scene units to the new units, the scene scale will be changed, visual size will be kept. | |
coat.Scene.applyLayerBlending | ( | LayerID = int | ) |
apply layer blending
LayerID | the layer identifier |
int coat.Scene.assignLayerMask | ( | LayerID = int | ) |
assign the mask to the layer if it is not assigned before
LayerID | the layer identifier to assign the mask |
coat.Scene.clearScene | ( | askUser = bool | ) |
clear the whole scene
askUser | set true to ask user for unsaved changes |
bool coat.Scene.convertSceneUnits | ( | destination_unit_name = str | ) |
Convert the scene units to the new units, the scene scale will be changed, visual size will be kept.
destination_unit_name | the name of new units |
SceneElement coat.Scene.current | ( | ) |
returns the current sculpt object
SceneElement coat.Scene.curvesRoot | ( | ) |
get the root of all curves
coat.Scene.disableClippingLayer | ( | LayerID = int | ) |
disable the clipping layer
LayerID | the layer identifier |
coat.Scene.disableLayerMask | ( | LayerID = int | ) |
disable the mask for the layer
LayerID | the layer identifier |
coat.Scene.enableLayerMask | ( | LayerID = int | ) |
enable the mask for the layer
LayerID | the layer identifier |
list coat.Scene.getAvailableUnits | ( | ) |
Get the list of all available units.
int coat.Scene.getCurrentLayer | ( | ) |
get current layer identifier
int coat.Scene.getLayer | ( | name = str , |
|
addIfNotExists = bool |
|||
) |
get the Layer ID by name, add the layer if not exists
name | layer name |
addIfNotExists | set true to add layer if it does not exist |
int coat.Scene.getLayerBlending | ( | LayerID = int | ) |
get the layer blending mode
LayerID | the layer identifier |
int coat.Scene.getLayerMaskLayer | ( | LayerID = int | ) |
get the mask identifier assigned to the layer
LayerID | the layer identifier |
str coat.Scene.getLayerName | ( | LayerID = int | ) |
get the layer name
LayerID | the layer identifier |
float coat.Scene.GetSceneScale | ( | ) |
the length of 1 scene unit when you export the scene
str coat.Scene.GetSceneUnits | ( | ) |
get the name of the current scene units
SceneElement coat.Scene.importMesh | ( | filename = str , |
|
transform = mat4 |
|||
) |
import mesh into scene, it is the same as File->Import->Import mesh for vertex painting/reference ... This is the optimal way to import mesh into the scene
filename | the filename, if it is empty, the dialog appears |
coat.Scene.invalidateLayer | ( | LayerID = int | ) |
refresh the layer appearance in scene
LayerID | the layer identifier |
bool coat.Scene.layerVisible | ( | LayerID = int | ) |
return the layer visibility
bool coat.Scene.maskEnabled | ( | LayerID = int | ) |
check if the mask is enabled for the layer
LayerID | the layer identifier |
coat.Scene.mergeLayerDown | ( | LayerID = int | ) |
merge the layer down
LayerID | the layer identifier |
coat.Scene.mergeVisibleLayers | ( | ) |
merge all visible layers
int coat.Scene.PaintMaterialCount | ( | ) |
Get the count of paint materials.
str coat.Scene.PaintMaterialName | ( | idx = int | ) |
Get the reference to the material mane.
idx | the index of the material |
str coat.Scene.PaintObjectName | ( | idx = int | ) |
Get the reference to the object name.
idx | index of the object |
int coat.Scene.PaintObjectsCount | ( | ) |
Get the count of paint objects in scene.
str coat.Scene.PaintUVSetName | ( | idx = int | ) |
Get the reference to the UV set name.
idx | the index of the UV set |
int coat.Scene.PaintUVSetsCount | ( | ) |
Get the paint UV-sets (textures) count.
coat.Scene.removeLayer | ( | LayerID = int | ) |
remove the layer
LayerID | the layer identifier |
coat.Scene.removeLayerMask | ( | LayerID = int | ) |
remove the layer mask
LayerID | the layer identifier |
coat.Scene.RemovePaintMaterial | ( | idx = int | ) |
Remove the paint material.
idx | the index of the material |
coat.Scene.RemovePaintObject | ( | idx = int | ) |
Remove the paint object.
idx | the index of the object |
coat.Scene.RemoveUVSet | ( | idx = int | ) |
Remove the UV-set (texture)
idx | the index of the UV-set (texture) |
coat.Scene.ScaleSceneUnits | ( | scale = float | ) |
Keep the scene visial size in scene, but scale the export size.
scale | the scale, >1 means objects become bigger in export |
coat.Scene.ScaleSceneVisually | ( | scale = float | ) |
Scale the whole scene visually but keep the export size.
scale | the scale, >1 means objects become bigger in scene |
SceneElement coat.Scene.sculptRoot | ( | ) |
get the root of all sculpt objects
coat.Scene.setActiveLayer | ( | LayerID = int | ) |
activate the layer
LayerID | the layer identifier |
coat.Scene.setClippingLayer | ( | LayerID = int | ) |
set this layer as clipping layer
LayerID | the layer identifier |
coat.Scene.setCurrentLayer | ( | LayerID = int | ) |
set the current layer
LayerID | the layer identifier |
coat.Scene.setLayerBlending | ( | LayerID = int , |
|
mode = int |
|||
) |
set the layer blending mode
LayerID | the layer identifier |
mode | the index of blending mode as it is ordered in the Layers UI |
coat.Scene.setLayerColorOpacity | ( | LayerID = int , |
|
Opacity = float |
|||
) |
set the layer opacity
LayerID | the layer identifier |
Opacity | the color opacity |
coat.Scene.setLayerDepthOpacity | ( | LayerID = int , |
|
Opacity = float |
|||
) |
set the layer depth opacity
LayerID | the layer identifier |
Opacity | the depth opacity |
coat.Scene.setLayerGlossOpacity | ( | LayerID = int , |
|
Opacity = float |
|||
) |
set the layer gloss/roughness opacity
LayerID | the layer identifier |
Opacity | the gloss/roughness opacity |
coat.Scene.setLayerMetalnessOpacity | ( | LayerID = int , |
|
Opacity = float |
|||
) |
set the layer metalness opacity
LayerID | the layer identifier |
Opacity | the metalness opacity |
coat.Scene.setLayerName | ( | LayerID = int , |
|
name = str |
|||
) |
set the layer name
LayerID | the layer identifier |
name | the new name |
coat.Scene.setLayerVisibility | ( | LayerID = int , |
|
Visible = bool |
|||
) |
set the layer visibility
Visible | the visibility |
bool coat.Scene.setSceneUnits | ( | units = str | ) |
Set the scene units without actual scaling the scene to new units, just name change.
units | the name of new units |