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