3DCoat Python API
The 3DCoat Python API documentation.
|
Static Public Member Functions | |
clearScene (bool askUser=False) | |
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 (str name, bool addIfNotExists=True) |
get the Layer ID by name, add the layer if not exists | |
str | getLayerName (int LayerID) |
get the layer name | |
setLayerName (int LayerID, str name) | |
set the layer name | |
int | getLayerBlending (int LayerID) |
get the layer blending mode | |
setLayerBlending (int LayerID, int mode) | |
set the layer blending mode | |
int | getCurrentLayer () |
get current layer identifier | |
setCurrentLayer (int LayerID) | |
set the current layer | |
mergeVisibleLayers () | |
merge all visible layers | |
mergeLayerDown (int LayerID) | |
merge the layer down | |
applyLayerBlending (int LayerID) | |
apply layer blending | |
invalidateLayer (int LayerID) | |
refresh the layer appearance in scene | |
setActiveLayer (int LayerID) | |
activate the layer | |
removeLayer (int LayerID) | |
remove the layer | |
bool | layerIsEmpty (int layerID) |
Check if the layer is empty. | |
removeEmptyLayers () | |
remove all unused layers | |
bool | layerVisible (int LayerID) |
return the layer visibility | |
setLayerVisibility (int LayerID, bool Visible) | |
set the layer visibility | |
setLayerColorOpacity (int LayerID, float Opacity) | |
set the layer opacity | |
setLayerDepthOpacity (int LayerID, float Opacity) | |
set the layer depth opacity | |
setLayerMetalnessOpacity (int LayerID, float Opacity) | |
set the layer metalness opacity | |
setLayerGlossOpacity (int LayerID, float Opacity) | |
set the layer gloss/roughness opacity | |
int | assignLayerMask (int LayerID) |
assign the mask to the layer if it is not assigned before | |
removeLayerMask (int LayerID) | |
remove the layer mask | |
extractMaskAsLayer (int LayerID) | |
If the layer has the mask attached, the mask will be extracted as a new layer and the masking disabled. | |
setMaskForTheLayer (int LayerID, int MaskLayerID) | |
set the MaskLayerID to be used as mask for the LayerID. | |
enableLayerMask (int LayerID, bool enable) | |
enable or disable the layer mask | |
bool | isLayerMaskEnabled (int LayerID) |
check if the mask is enabled for the layer | |
invertLayerMask (int LayerID) | |
invert the layer mask (if assigned) | |
int | getLayerMaskLayer (int LayerID) |
get the mask identifier assigned to the layer | |
disableLayerMask (int LayerID) | |
disable the mask for the layer | |
enableLayerMask (int LayerID) | |
enable the mask for the layer | |
bool | maskEnabled (int LayerID) |
check if the mask is enabled for the layer | |
setClippingLayer (int LayerID) | |
set this layer as clipping layer | |
disableClippingLayer (int LayerID) | |
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 (int idx) | |
Remove the paint object. | |
RemovePaintMaterial (int idx) | |
Remove the paint material. | |
RemoveUVSet (int idx) | |
Remove the UV-set (texture) | |
str | PaintObjectName (int idx) |
Get the reference to the object name. | |
str | PaintMaterialName (int idx) |
Get the reference to the material mane. | |
str | PaintUVSetName (int idx) |
Get the reference to the UV set name. | |
SceneElement | importMesh (str filename, mat4 transform=mat4.Identity) |
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 (float scale) | |
Scale the whole scene visually but keep the export size. | |
ScaleSceneUnits (float scale) | |
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 (str units) |
Set the scene units without actual scaling the scene to new units, just name change. | |
vec3 | getSceneShift () |
get the scene shift value, look the Edit->Scale master->X,Y,Z | |
setSceneShift (vec3 shift) | |
set the scene shift value, look the Edit->Scale master->X,Y,Z | |
list | getAvailableUnits () |
Get the list of all available units. | |
bool | convertSceneUnits (str destination_unit_name) |
Convert the scene units to the new units, the scene scale will be changed, visual size will be kept. | |
|
static |
apply layer blending
LayerID | the layer identifier |
|
static |
assign the mask to the layer if it is not assigned before
LayerID | the layer identifier to assign the mask |
|
static |
clear the whole scene
askUser | set true to ask user for unsaved changes |
|
static |
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 |
|
static |
returns the current sculpt object
|
static |
get the root of all curves
|
static |
disable the clipping layer
LayerID | the layer identifier |
|
static |
disable the mask for the layer
LayerID | the layer identifier |
|
static |
enable the mask for the layer
LayerID | the layer identifier |
|
static |
enable or disable the layer mask
LayerID | the layer identifier |
enable | true to enable, false to disable |
|
static |
If the layer has the mask attached, the mask will be extracted as a new layer and the masking disabled.
LayerID | the layer identifier |
|
static |
Get the list of all available units.
|
static |
get current layer identifier
|
static |
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 |
|
static |
get the layer blending mode
LayerID | the layer identifier |
|
static |
get the mask identifier assigned to the layer
LayerID | the layer identifier |
|
static |
get the layer name
LayerID | the layer identifier |
|
static |
the length of 1 scene unit when you export the scene
|
static |
get the scene shift value, look the Edit->Scale master->X,Y,Z
|
static |
get the name of the current scene units
|
static |
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 |
|
static |
refresh the layer appearance in scene
LayerID | the layer identifier |
|
static |
invert the layer mask (if assigned)
LayerID | the layer identifier |
|
static |
check if the mask is enabled for the layer
LayerID | the layer identifier |
|
static |
Check if the layer is empty.
layerID | the layer identifier |
|
static |
return the layer visibility
|
static |
check if the mask is enabled for the layer
LayerID | the layer identifier |
|
static |
merge the layer down
LayerID | the layer identifier |
|
static |
merge all visible layers
|
static |
Get the count of paint materials.
|
static |
Get the reference to the material mane.
idx | the index of the material |
|
static |
Get the reference to the object name.
idx | index of the object |
|
static |
Get the count of paint objects in scene.
|
static |
Get the reference to the UV set name.
idx | the index of the UV set |
|
static |
Get the paint UV-sets (textures) count.
|
static |
remove all unused layers
|
static |
remove the layer
LayerID | the layer identifier |
|
static |
remove the layer mask
LayerID | the layer identifier |
|
static |
Remove the paint material.
idx | the index of the material |
|
static |
Remove the paint object.
idx | the index of the object |
|
static |
Remove the UV-set (texture)
idx | the index of the UV-set (texture) |
|
static |
Keep the scene visial size in scene, but scale the export size.
scale | the scale, >1 means objects become bigger in export |
|
static |
Scale the whole scene visually but keep the export size.
scale | the scale, >1 means objects become bigger in scene |
|
static |
get the root of all sculpt objects
|
static |
activate the layer
LayerID | the layer identifier |
|
static |
set this layer as clipping layer
LayerID | the layer identifier |
|
static |
set the current layer
LayerID | the layer identifier |
|
static |
set the layer blending mode
LayerID | the layer identifier |
mode | the index of blending mode as it is ordered in the Layers UI |
|
static |
set the layer opacity
LayerID | the layer identifier |
Opacity | the color opacity |
|
static |
set the layer depth opacity
LayerID | the layer identifier |
Opacity | the depth opacity |
|
static |
set the layer gloss/roughness opacity
LayerID | the layer identifier |
Opacity | the gloss/roughness opacity |
|
static |
set the layer metalness opacity
LayerID | the layer identifier |
Opacity | the metalness opacity |
|
static |
set the layer name
LayerID | the layer identifier |
name | the new name |
|
static |
set the layer visibility
Visible | the visibility |
|
static |
set the MaskLayerID to be used as mask for the LayerID.
The MaskLayerID will disappear among the layers list
LayerID | the layer to be masked |
MaskLayerID | the mask layer |
|
static |
set the scene shift value, look the Edit->Scale master->X,Y,Z
shift | the new shift value |
|
static |
Set the scene units without actual scaling the scene to new units, just name change.
units | the name of new units |