3DCoat Python API
The 3DCoat Python API documentation.
|
Public Member Functions | |
__init__ (self) | |
__init__ (self, Model source) | |
__init__ (self, Mesh source) | |
Model | __assign__ (self, Model source) |
Model | __assign__ (self, Mesh source) |
Model | __iadd__ (self, Model source) |
Model | __iadd__ (self, Mesh source) |
Model | transform (self, mat4 m) |
transform the whole Model with the matrix | |
Model | MakeCopy (self) |
make a copy of the source mesh. | |
__init__ (self) | |
displayOptions (self, bool showWireframe=True, bool showColored=True, bool showSeams=True, bool showSharpEdges=True, bool smoothView=False) | |
Set the display options for the retopo/modeling/uv meshes. | |
int | getObjectsCount (self) |
get the retopo groups count | |
int | getCurrentObject (self) |
get the index of the current group | |
setCurrentObject (self, int index) | |
set the current group index | |
str | getObjectName (self, int group_index) |
get the retopo group name | |
removeObject (self, int group_index) | |
remove the group by index | |
setObjectName (self, int index, str name) | |
rename the group by index | |
setObjectVisibility (self, int index, bool visible) | |
set the group visibility | |
bool | getObjectVisibility (self, int index) |
get the group visibility | |
int | addObject (self, str name) |
add new retopo group | |
int | addMaterial (self, str name) |
add the new UV set/Material | |
removeUnusedMaterials (self) | |
remove all unused UV sets (not referred within the mesh) | |
vec4 | getObjectReferenceColor (self, int group_index) |
get the group reference color | |
setObjectReferenceColor (self, int group_index, vec4 color) | |
set the group reference color | |
selectedToObject (self, int group_index) | |
move the selected faces to the group | |
Mesh | getWholeMesh (self) |
get the whole mesh from the retopo room | |
Mesh | selectedToMesh (self) |
get the selected faces as the Mesh object | |
Mesh | visibleToMesh (self) |
get the visible faces as the Mesh object | |
addTransformed (self, Mesh mesh, mat4 Transform=mat4.Identity, BoolOpType b=BoolOpType.BOOL_MERGE, bool select=False, bool snap_to_existing=False) | |
insert the mesh to the retopo/modeling room, each object of the mesh treated as the new retopo layer | |
Mesh | getObjectMesh (self, int group_index) |
get the mesh from some retopo group | |
setObjectMesh (self, int group_index, Mesh mesh, mat4 transform=mat4.Identity) | |
replace the retopo layer with mesh | |
int | duplicateObject (self, int group_index, str name=None, mat4 transform=mat4.Identity, bool select=False) |
duplicate the object (retopo group) | |
str | generateName (self, str base) |
generate unique name for the object, it will start as the string in base base | |
clearObjectMesh (self, int group_index) | |
remove all faces from the group | |
clear (self) | |
clear the whole mesh | |
dropUndo (self) | |
Drop the whole mesh to the undo queue, it is important if you want allow the user to undo your mesh changes, call it before your changes. | |
list | getSelectedFaces (self) |
get the list of selected faces | |
setSelectedFaces (self, list faces) | |
set the selected faces list | |
selectFace (self, int face) | |
select the face by index | |
selectObject (self, int group_index, bool add_to_selected=True) | |
select all feces in the group | |
list | getObjectFaces (self, int group_index) |
get the list of faces in the group | |
bool | isFaceSelected (self, int face) |
check if the face selected | |
unselectAllFaces (self) | |
unselect all faces | |
expandSelection (self) | |
expand the faces/vertices/edges selection to the connected geometry | |
contractSelection (self) | |
contract the faces/vertices/edges selection to the connected geometry | |
selectedToEdges (self) | |
convert faces/vertices selection to edges selection | |
selectedToFaces (self) | |
convert edges/vertices selection to faces selection | |
selectedToVertices (self) | |
convert faces/edges selection to vertices selection | |
list | getSelectedEdges (self) |
returns even amount of vertex indices, pairs os start and end vertices of the selected edges | |
setSelectedEdges (self, list edges) | |
set the selected edges list | |
selectEdge (self, int vertex1, int vertex2) | |
select the edge by vertex indices (add to selection) | |
bool | isEdgeSelected (self, int vertex1, int vertex2) |
check if the edge is selected, order of vertices has no matter | |
unselectAllEdges (self) | |
unselect all edges | |
list | getSelectedVertices (self) |
get the list of selected vertices | |
list | getSelectedVerticesWeights (self) |
get the soft selection weights of the selected vertices, 1 is maximum value | |
setSelectedVertices (self, list vertices, list weights) | |
set the selected vertices list | |
selectVertex (self, int vertex, float weight=1.0) | |
add the vertex to the selection | |
bool | isVertexSelected (self, int vertex) |
check if the vertex is selected | |
unselectAllVertices (self) | |
unselect all vertices | |
int | facesCount (self) |
get the faces count | |
int | vertsCount (self) |
get the positional vertices count | |
int | vertsUvCount (self) |
get the uv vertices count | |
removeFace (self, int face) | |
remove the face by index | |
int | createNewFace (self, int Group, int UVSet) |
create empty face, you need to call setFaceVertices to set the vertices, setFaceUVVerts to set the UV vertices | |
int | getFaceVertsCount (self, int face) |
get the vertices count over the face | |
int | getFaceVertex (self, int face, int vertex_index) |
get the vertex index over the face | |
list | getFaceVerts (self, int face) |
get the list of UV vertex indices over the face, pay attention UV vertices are not same as position vertices | |
setFaceVerts (self, int face, list vertices) | |
set the list of positional vertex indices over the face | |
bool | getFaceVisibility (self, int face) |
get the face visibility | |
setFaceVisibility (self, int face, bool visibility) | |
set the face visibility | |
float | getFaceSquare (self, int face) |
get the face square | |
float | getFaceUVSquare (self, int face) |
get the face square in UV space | |
vec3 | getFaceNormal (self, int face) |
get the face normal | |
int | getFaceObject (self, int face) |
get the group index of the face | |
setFaceObject (self, int face, int group) | |
set the group index of the face | |
int | getFaceMaterial (self, int face) |
get the UV set index for the face | |
setFaceMaterial (self, int face, int uv_set) | |
set the UV set for the face | |
int | getFaceUvVertsCount (self, int face) |
get the amount of UV vertices over the face | |
int | getFaceUvVertex (self, int face, int vertex_index) |
get the UV vertex index over the face | |
list | getFaceUvVerts (self, int face) |
get the list of UV vertices indices over the face | |
setFaceUvVerts (self, int face, list vertices) | |
set the UV vertices for the face | |
vec3 | getVertex (self, int vertex) |
get the vertex position in space | |
setVertex (self, int vertex, vec3 position) | |
set the vertex position in space | |
int | createNewVertex (self, vec3 position) |
create the positional vertex | |
vec2 | getVertexUV (self, int uv_vertex) |
get the UV coordinates of the UV vertex | |
setVertexUV (self, int uv_vertex, vec2 uv) | |
set the UV for the UV vertex | |
int | createNewUvVertex (self, vec2 uv) |
create new UV vertex to be used for faces | |
vec3 | getVertexNormal (self, int vertex) |
get vertex normal, calculated as average of adjacent faces normals | |
updateNormals (self, bool for_snapping=True) | |
update the vertex normals | |
updateTopology (self) | |
update the connectivity information, it should be called sometimes if you feel that the connectivity information lost due to some heavy operations | |
cleanup (self) | |
complete cleanul from non-manifolds or other problems, some faces may be removed | |
list | getVertsNearVertex (self, int vertex) |
get the list of vertices that are adjacent to the vertex | |
list | getFacesNearVertex (self, int vertex) |
get the list of faces that are adjacent to the vertex | |
list | getFaceNeighbors (self, int face) |
get the list of faces that are adjacent to the face | |
list | getFacesNearEdge (self, int vertex1, int vertex2) |
get the list of faces that are adjacent to the edge | |
bool | isOpenEdge (self, int vertex1, int vertex2) |
check if the edge is open | |
bool | isSharpEdge (self, int vertex1, int vertex2) |
check if the edge is sharp | |
setEdgeSharpness (self, int vertex1, int vertex2, bool sharp) | |
set the sharpness state for the edge | |
bool | isSeam (self, int vertex1, int vertex2) |
check if edge is seam | |
setEdgeSeam (self, int vertex1, int vertex2, bool seam) | |
set or clear the seam state for the edge | |
collapseEdge (self, int vertex1, int vertex2) | |
collapse the edge to the middle of the edge | |
int | islandsCount (self, int uv_set) |
get the islands count over the current uv-set | |
Mesh | islandToMesh (self, int uv_set, int island_index) |
get the mesh that contains the island, xy of each point is the UV coordinate. | |
Mesh | islandToMeshInSpace (self, int uv_set, int island_index) |
get the mesh that contains the island, each point is the coordinate in space (not the uv coordinate!). | |
list | getIslandVertexMapping (self, int uv_set, int island_index) |
get the mapping from the vertex index in the mesh that was got by islandToMesh to the vertex index in the original mesh | |
list | getIslandBorder (self, int uv_set, int island_index) |
get unsorted list of edges on the border of the island | |
list | getBorderBetweenIslands (self, int uv_set1, int island_index1, int uv_set2, int island_index2) |
get the border between two islands | |
vec2 | getIslandVertexUv (self, int uv_set, int island_index, int vertex_index) |
get the uv coordinate of the positional vertex in the island | |
meshToIsland (self, Mesh mesh, int uv_set, int island_index) | |
use the mesh (that was previously got by islandToMesh) to replace the island in the current uv-set | |
pack (self, int uv_set, bool rotate, bool shuffle) | |
pack the islands in the current uv-set | |
unwrap (self, int uv_set) | |
unwrap the current uv-set | |
toAbf (self, int uv_set, int island_index) | |
unwrap the island using the ABF approach | |
toLscm (self, int uv_set, int island_index) | |
unwrap the island using the LSCM approach | |
toGu (self, int uv_set, int island_index) | |
unwrap the island using the GU (Globally Uniform) approach | |
toPlanar (self, int uv_set, int island_index) | |
unwrap the island using the Planar approach | |
toStripe (self, int uv_set, int island_index) | |
try to uwrap the island as the regular stripe | |
extrudeSelected (self) | |
Extrude the selected edges or selected faces without the actual moving of the extruded elements. | |
moveSelectedFacesAlongFacesNormals (self, float displacement) | |
move selected faces along the faces normals, trying to keep faces parallel to the original direction | |
moveSelectedFacesAlongVertexNormals (self, float displacement) | |
move selected faces along the vertex normals, each vertex displace on the same distance | |
subdivideSelectedFaces (self, bool apply_catmull_clark=False) | |
subdivide the selected faces | |
subdivide (self, bool apply_catmull_clark=True) | |
subdivide the whole mesh | |
transformSelected (self, mat4 transform, bool apply_symmetry) | |
apply the transformation to the selected elements | |
scaleSelectedFacesClusters (self, float scale, ClusterScale method=ClusterScale.Uniform_Scaling) | |
scale each selection cluster separately, to own center mass | |
bevelOverSelectedVertices (self, float size) | |
perform the bevel over the selected vertices. | |
bevelOverSelectedEdges (self, float size, int segments=1, bool OldVariant=False) | |
perform the bevel over the selected edges. | |
int | splitEdge (self, int vertex1, int vertex2, float position) |
split existing edge somewhere between vertices. | |
bool | connect (self, int vertex1, int vertex2) |
split existing edge somewhere between vertices. | |
bool | checkConnectivity (self, int vertex1, int vertex2) |
check if connecting the two vertices is possible | |
connectSelectedVerts (self) | |
connect selected vertices in smart way | |
invertSelectedFacesTopoplogically (self) | |
invert selected faces only within the connective area, if some objects has no selected faces, the selection there will not change | |
inset (self, float distance) | |
perform the inset over the selected faces | |
shell (self) | |
perform the shell operation over the selected faces. | |
intrude (self) | |
perform the intrude operation over the selected faces. | |
relaxSelected (self) | |
relax selected vergtices | |
selectPath (self, int vertex1, int vertex2) | |
select all edges on the path from vertex1 to vertex2 (add to existing edges selection) | |
list | getPath (self, int vertex1, int vertex2) |
get all vertices on the path from vertex1 to vertex2 | |
Static Public Member Functions | |
Model | fromRetopo () |
get the reference to the mesh in the retopo room | |
Model | fromModeling () |
get the reference to the mesh in the modeling room, currently it is the same mesh as in the retopo room | |
Model | fromUv () |
get the reference to the mesh in the uv room, pay attention that topology changes to that mesh may lead to instability! | |
Mesh | flattenSingleIsland (Mesh mesh, int method, bool optimize_rotation=True, bool scale_to_geometry=True) |
Flatten the mesh that consists of the single island. | |
coat.Model.__init__ | ( | self | ) |
coat.Model.__init__ | ( | self, | |
Model | source ) |
coat.Model.__init__ | ( | self, | |
Mesh | source ) |
coat.Model.__init__ | ( | self | ) |
int coat.Model.addMaterial | ( | self, | |
str | name ) |
add the new UV set/Material
name | the name |
int coat.Model.addObject | ( | self, | |
str | name ) |
add new retopo group
name | the group name |
coat.Model.addTransformed | ( | self, | |
Mesh | mesh, | ||
mat4 | Transform = mat4.Identity, | ||
BoolOpType | b = BoolOpType.BOOL_MERGE, | ||
bool | select = False, | ||
bool | snap_to_existing = False ) |
insert the mesh to the retopo/modeling room, each object of the mesh treated as the new retopo layer
mesh | the Mesh object |
Transform | the transformation matrix |
b | the boolean operation type |
select | the flag that indicates if we need to select faces of the the inserted mesh, used only if b is BOOL_MERGE |
snap_to_existing | the flag that indicates if we need to snap the mesh to the existing sculpt/paint objects |
coat.Model.bevelOverSelectedEdges | ( | self, | |
float | size, | ||
int | segments = 1, | ||
bool | OldVariant = False ) |
perform the bevel over the selected edges.
size | the bevel width |
OldVariant | if true the older variant of the bevel (splits edges in strightforward way), in some cases it works more stable. |
coat.Model.bevelOverSelectedVertices | ( | self, | |
float | size ) |
perform the bevel over the selected vertices.
As result, new faces will be selected
size | the bevel size |
bool coat.Model.checkConnectivity | ( | self, | |
int | vertex1, | ||
int | vertex2 ) |
check if connecting the two vertices is possible
vertex1 | the positional vertex index (1) |
vertex2 | the positional vertex index (2) |
coat.Model.cleanup | ( | self | ) |
complete cleanul from non-manifolds or other problems, some faces may be removed
coat.Model.clear | ( | self | ) |
clear the whole mesh
coat.Model.clearObjectMesh | ( | self, | |
int | group_index ) |
remove all faces from the group
group_index | the group index |
coat.Model.collapseEdge | ( | self, | |
int | vertex1, | ||
int | vertex2 ) |
collapse the edge to the middle of the edge
vertex1 | the positional vertex index (1) |
vertex2 | the positional vertex index (2) |
bool coat.Model.connect | ( | self, | |
int | vertex1, | ||
int | vertex2 ) |
split existing edge somewhere between vertices.
vertex1 | the positional vertex index (1) |
vertex2 | the positional vertex index (2) |
coat.Model.connectSelectedVerts | ( | self | ) |
connect selected vertices in smart way
coat.Model.contractSelection | ( | self | ) |
contract the faces/vertices/edges selection to the connected geometry
int coat.Model.createNewFace | ( | self, | |
int | Group, | ||
int | UVSet ) |
create empty face, you need to call setFaceVertices to set the vertices, setFaceUVVerts to set the UV vertices
Group | the face group index |
UVSet | the UV set index |
int coat.Model.createNewUvVertex | ( | self, | |
vec2 | uv ) |
create new UV vertex to be used for faces
uv | the texture coordinates |
int coat.Model.createNewVertex | ( | self, | |
vec3 | position ) |
create the positional vertex
position | the position |
coat.Model.displayOptions | ( | self, | |
bool | showWireframe = True, | ||
bool | showColored = True, | ||
bool | showSeams = True, | ||
bool | showSharpEdges = True, | ||
bool | smoothView = False ) |
Set the display options for the retopo/modeling/uv meshes.
showWireframe | show the wireframe |
showColored | show colored clusters |
showSeams | show seams |
showSharpEdges | show sharp edges |
smoothView | smooth view |
coat.Model.dropUndo | ( | self | ) |
Drop the whole mesh to the undo queue, it is important if you want allow the user to undo your mesh changes, call it before your changes.
It works for UV room too.
int coat.Model.duplicateObject | ( | self, | |
int | group_index, | ||
str | name = None, | ||
mat4 | transform = mat4.Identity, | ||
bool | select = False ) |
duplicate the object (retopo group)
group_index | the object/group index |
name | the new name, if not passed the name will be generated automatically |
transform | the additional transformation matrix |
select | the flag that indicates if we need to select the new object's faces (in addition to existing selection) |
coat.Model.expandSelection | ( | self | ) |
expand the faces/vertices/edges selection to the connected geometry
coat.Model.extrudeSelected | ( | self | ) |
Extrude the selected edges or selected faces without the actual moving of the extruded elements.
They stay selected, so you amy apply some transform to the selected elements
int coat.Model.facesCount | ( | self | ) |
get the faces count
|
static |
Flatten the mesh that consists of the single island.
mesh | the mesh that consists of the single island |
method | the flattening method. 0 - flatten to the plane, 1 - LSCM, 2 - ABF, 3 - GU, 4 - Stripe (if possible) |
optimize_rotation | optimize the rotation of the island, place it approximately horizontally or vertically |
scale_to_geometry | scale the island to keep average edge length equal to the average edge length of the original mesh |
|
static |
get the reference to the mesh in the modeling room, currently it is the same mesh as in the retopo room
|
static |
get the reference to the mesh in the retopo room
|
static |
get the reference to the mesh in the uv room, pay attention that topology changes to that mesh may lead to instability!
str coat.Model.generateName | ( | self, | |
str | base ) |
generate unique name for the object, it will start as the string in base base
base | the base name |
list coat.Model.getBorderBetweenIslands | ( | self, | |
int | uv_set1, | ||
int | island_index1, | ||
int | uv_set2, | ||
int | island_index2 ) |
get the border between two islands
uv_set1 | the uv set index of the first island |
island_index1 | the island index within the uv set of the first island |
uv_set2 | the uv set index of the second island |
island_index2 | the island index within the uv set of the second island |
int coat.Model.getCurrentObject | ( | self | ) |
get the index of the current group
int coat.Model.getFaceMaterial | ( | self, | |
int | face ) |
get the UV set index for the face
face | the face index |
list coat.Model.getFaceNeighbors | ( | self, | |
int | face ) |
get the list of faces that are adjacent to the face
face | the face index |
vec3 coat.Model.getFaceNormal | ( | self, | |
int | face ) |
get the face normal
face | the face index |
int coat.Model.getFaceObject | ( | self, | |
int | face ) |
get the group index of the face
face | the face index |
list coat.Model.getFacesNearEdge | ( | self, | |
int | vertex1, | ||
int | vertex2 ) |
get the list of faces that are adjacent to the edge
vertex1 | the positional vertex index (1) |
vertex2 | the positional vertex index (2) |
list coat.Model.getFacesNearVertex | ( | self, | |
int | vertex ) |
get the list of faces that are adjacent to the vertex
vertex | the vertex index |
float coat.Model.getFaceSquare | ( | self, | |
int | face ) |
get the face square
face | the face index |
float coat.Model.getFaceUVSquare | ( | self, | |
int | face ) |
get the face square in UV space
face | the face index |
int coat.Model.getFaceUvVertex | ( | self, | |
int | face, | ||
int | vertex_index ) |
get the UV vertex index over the face
face | the face index |
vertex_index | the vertex index over the face |
list coat.Model.getFaceUvVerts | ( | self, | |
int | face ) |
get the list of UV vertices indices over the face
face | the face index |
int coat.Model.getFaceUvVertsCount | ( | self, | |
int | face ) |
get the amount of UV vertices over the face
face | the face index |
int coat.Model.getFaceVertex | ( | self, | |
int | face, | ||
int | vertex_index ) |
get the vertex index over the face
face | the face index |
vertex_index | the vertex index over the face |
list coat.Model.getFaceVerts | ( | self, | |
int | face ) |
get the list of UV vertex indices over the face, pay attention UV vertices are not same as position vertices
face | the face index |
int coat.Model.getFaceVertsCount | ( | self, | |
int | face ) |
get the vertices count over the face
face | the face index |
bool coat.Model.getFaceVisibility | ( | self, | |
int | face ) |
get the face visibility
face | the face index |
list coat.Model.getIslandBorder | ( | self, | |
int | uv_set, | ||
int | island_index ) |
get unsorted list of edges on the border of the island
uv_set | the uv set index |
island_index | the island index within the uv set |
list coat.Model.getIslandVertexMapping | ( | self, | |
int | uv_set, | ||
int | island_index ) |
get the mapping from the vertex index in the mesh that was got by islandToMesh to the vertex index in the original mesh
uv_set | the uv set index |
island_index | the island index within the uv set |
vec2 coat.Model.getIslandVertexUv | ( | self, | |
int | uv_set, | ||
int | island_index, | ||
int | vertex_index ) |
get the uv coordinate of the positional vertex in the island
uv_set | the uv set index |
island_index | the island index within the uv set |
vertex_index | the positional vertex index |
list coat.Model.getObjectFaces | ( | self, | |
int | group_index ) |
get the list of faces in the group
group_index | the group index |
Mesh coat.Model.getObjectMesh | ( | self, | |
int | group_index ) |
str coat.Model.getObjectName | ( | self, | |
int | group_index ) |
get the retopo group name
group_index | the group index |
vec4 coat.Model.getObjectReferenceColor | ( | self, | |
int | group_index ) |
get the group reference color
group_index | the group index |
int coat.Model.getObjectsCount | ( | self | ) |
get the retopo groups count
bool coat.Model.getObjectVisibility | ( | self, | |
int | index ) |
get the group visibility
index | the group index |
list coat.Model.getPath | ( | self, | |
int | vertex1, | ||
int | vertex2 ) |
get all vertices on the path from vertex1 to vertex2
vertex1 | the first vertex |
vertex2 | the second vertex |
list coat.Model.getSelectedEdges | ( | self | ) |
returns even amount of vertex indices, pairs os start and end vertices of the selected edges
list coat.Model.getSelectedFaces | ( | self | ) |
get the list of selected faces
list coat.Model.getSelectedVertices | ( | self | ) |
get the list of selected vertices
list coat.Model.getSelectedVerticesWeights | ( | self | ) |
get the soft selection weights of the selected vertices, 1 is maximum value
vec3 coat.Model.getVertex | ( | self, | |
int | vertex ) |
get the vertex position in space
vertex | the vertex index |
vec3 coat.Model.getVertexNormal | ( | self, | |
int | vertex ) |
get vertex normal, calculated as average of adjacent faces normals
vertex | the vertex index |
vec2 coat.Model.getVertexUV | ( | self, | |
int | uv_vertex ) |
get the UV coordinates of the UV vertex
uv_vertex | the uv vertex index |
list coat.Model.getVertsNearVertex | ( | self, | |
int | vertex ) |
get the list of vertices that are adjacent to the vertex
vertex | the vertex index |
coat.Model.inset | ( | self, | |
float | distance ) |
perform the inset over the selected faces
coat.Model.intrude | ( | self | ) |
perform the intrude operation over the selected faces.
After calling the intrude() you should call the moveSelectedFacesAlongFacesNormals or moveSelectedFacesAlongVertexNormals to give some thickness to the resulting figure
coat.Model.invertSelectedFacesTopoplogically | ( | self | ) |
invert selected faces only within the connective area, if some objects has no selected faces, the selection there will not change
bool coat.Model.isEdgeSelected | ( | self, | |
int | vertex1, | ||
int | vertex2 ) |
check if the edge is selected, order of vertices has no matter
vertex1 | the first vertex index |
vertex2 | the second vertex index |
bool coat.Model.isFaceSelected | ( | self, | |
int | face ) |
check if the face selected
face | the face index |
int coat.Model.islandsCount | ( | self, | |
int | uv_set ) |
get the islands count over the current uv-set
uv_set | the uv-set index |
Mesh coat.Model.islandToMesh | ( | self, | |
int | uv_set, | ||
int | island_index ) |
get the mesh that contains the island, xy of each point is the UV coordinate.
The mesh contains only one island
uv_set | the uv set index |
island_index | the island index within the uv set |
Mesh coat.Model.islandToMeshInSpace | ( | self, | |
int | uv_set, | ||
int | island_index ) |
get the mesh that contains the island, each point is the coordinate in space (not the uv coordinate!).
The mesh contains only one island. The faces correspond to the faces of the mesh that was got by islandToMesh
uv_set | the uv set index |
island_index | the island index within the uv set |
bool coat.Model.isOpenEdge | ( | self, | |
int | vertex1, | ||
int | vertex2 ) |
check if the edge is open
vertex1 | the positional vertex index (1) |
vertex2 | the positional vertex index (2) |
bool coat.Model.isSeam | ( | self, | |
int | vertex1, | ||
int | vertex2 ) |
check if edge is seam
vertex1 | the positional vertex index (1) |
vertex2 | the positional vertex index (2) |
bool coat.Model.isSharpEdge | ( | self, | |
int | vertex1, | ||
int | vertex2 ) |
check if the edge is sharp
vertex1 | the positional vertex index (1) |
vertex2 | the positional vertex index (2) |
bool coat.Model.isVertexSelected | ( | self, | |
int | vertex ) |
check if the vertex is selected
vertex | the vertex index |
Model coat.Model.MakeCopy | ( | self | ) |
make a copy of the source mesh.
Pay attention, if you taken it from the retopo/uv context, it will no longer refer to the retopo/uv mesh, it will be independent copy
coat.Model.meshToIsland | ( | self, | |
Mesh | mesh, | ||
int | uv_set, | ||
int | island_index ) |
use the mesh (that was previously got by islandToMesh) to replace the island in the current uv-set
mesh | the mesh that was previously got by islandToMesh |
uv_set | the uv set index |
island_index | the island index within the uv set |
coat.Model.moveSelectedFacesAlongFacesNormals | ( | self, | |
float | displacement ) |
move selected faces along the faces normals, trying to keep faces parallel to the original direction
displacement | the displacement value |
coat.Model.moveSelectedFacesAlongVertexNormals | ( | self, | |
float | displacement ) |
move selected faces along the vertex normals, each vertex displace on the same distance
displacement | the displacement value |
coat.Model.pack | ( | self, | |
int | uv_set, | ||
bool | rotate, | ||
bool | shuffle ) |
pack the islands in the current uv-set
uv_set | the uv set index |
rotate | allow rotation while packing |
shuffle | shuffle the identical islands to avoid the exact overlapping |
coat.Model.relaxSelected | ( | self | ) |
relax selected vergtices
coat.Model.removeFace | ( | self, | |
int | face ) |
remove the face by index
face | the face index |
coat.Model.removeObject | ( | self, | |
int | group_index ) |
remove the group by index
coat.Model.removeUnusedMaterials | ( | self | ) |
remove all unused UV sets (not referred within the mesh)
coat.Model.scaleSelectedFacesClusters | ( | self, | |
float | scale, | ||
ClusterScale | method = ClusterScale.Uniform_Scaling ) |
scale each selection cluster separately, to own center mass
scale | the scale coefficient |
coat.Model.selectEdge | ( | self, | |
int | vertex1, | ||
int | vertex2 ) |
select the edge by vertex indices (add to selection)
vertex1 | the first vertex index |
vertex2 | the second vertex index |
coat.Model.selectedToEdges | ( | self | ) |
convert faces/vertices selection to edges selection
coat.Model.selectedToFaces | ( | self | ) |
convert edges/vertices selection to faces selection
coat.Model.selectedToObject | ( | self, | |
int | group_index ) |
move the selected faces to the group
group_index | the group index |
coat.Model.selectedToVertices | ( | self | ) |
convert faces/edges selection to vertices selection
coat.Model.selectFace | ( | self, | |
int | face ) |
select the face by index
face | the face index |
coat.Model.selectObject | ( | self, | |
int | group_index, | ||
bool | add_to_selected = True ) |
select all feces in the group
group_index | the group index |
coat.Model.selectPath | ( | self, | |
int | vertex1, | ||
int | vertex2 ) |
select all edges on the path from vertex1 to vertex2 (add to existing edges selection)
vertex1 | the first vertex |
vertex2 | the second vertex |
coat.Model.selectVertex | ( | self, | |
int | vertex, | ||
float | weight = 1.0 ) |
add the vertex to the selection
vertex | the vertex index |
weight | the soft selection weight, 1 is maximum value |
coat.Model.setCurrentObject | ( | self, | |
int | index ) |
set the current group index
index | the index |
coat.Model.setEdgeSeam | ( | self, | |
int | vertex1, | ||
int | vertex2, | ||
bool | seam ) |
set or clear the seam state for the edge
vertex1 | the positional vertex index (1) |
vertex2 | the positional vertex index (2) |
seam | the seam state |
coat.Model.setEdgeSharpness | ( | self, | |
int | vertex1, | ||
int | vertex2, | ||
bool | sharp ) |
set the sharpness state for the edge
vertex1 | the positional vertex index (1) |
vertex2 | the positional vertex index (2) |
sharp | the sharpness state |
coat.Model.setFaceMaterial | ( | self, | |
int | face, | ||
int | uv_set ) |
set the UV set for the face
face | the face index |
uv_set | the UV set index |
coat.Model.setFaceObject | ( | self, | |
int | face, | ||
int | group ) |
set the group index of the face
face | the face index |
group | the group index |
coat.Model.setFaceUvVerts | ( | self, | |
int | face, | ||
list | vertices ) |
set the UV vertices for the face
face | the face index |
vertices | the UV vertices list |
coat.Model.setFaceVerts | ( | self, | |
int | face, | ||
list | vertices ) |
set the list of positional vertex indices over the face
face | the face index |
vertices | the list of vertex indices |
coat.Model.setFaceVisibility | ( | self, | |
int | face, | ||
bool | visibility ) |
set the face visibility
face | the face index |
visibility | the visibility state |
replace the retopo layer with mesh
group_index | the group index |
mesh | the Mesh object to insert |
transform | the transformation matrix |
coat.Model.setObjectName | ( | self, | |
int | index, | ||
str | name ) |
rename the group by index
index | the group index to rename |
name | the new name |
coat.Model.setObjectReferenceColor | ( | self, | |
int | group_index, | ||
vec4 | color ) |
set the group reference color
group_index | the group index |
color | the (r,g,b,a) vector, 0..255 |
coat.Model.setObjectVisibility | ( | self, | |
int | index, | ||
bool | visible ) |
set the group visibility
index | the group index |
visible | the visibility state |
coat.Model.setSelectedEdges | ( | self, | |
list | edges ) |
set the selected edges list
edges | the edges indices list (should be even amount of indices) |
coat.Model.setSelectedFaces | ( | self, | |
list | faces ) |
set the selected faces list
faces | the faces indices list |
coat.Model.setSelectedVertices | ( | self, | |
list | vertices, | ||
list | weights ) |
set the selected vertices list
vertices | the list of vertices indices |
weights | the list of soft selection weights, the size of the list should be zero or equal to the size of the vertices list. If it is empty, the vertices will be selected with the maximal weight |
coat.Model.setVertex | ( | self, | |
int | vertex, | ||
vec3 | position ) |
set the vertex position in space
vertex | the vertex index |
position | the position |
coat.Model.setVertexUV | ( | self, | |
int | uv_vertex, | ||
vec2 | uv ) |
set the UV for the UV vertex
uv_vertex | the uv vertex index |
uv | the UV coordinates |
coat.Model.shell | ( | self | ) |
perform the shell operation over the selected faces.
After calling the shell() you should call the moveSelectedFacesAlongFacesNormals or moveSelectedFacesAlongVertexNormals to give some thickness to the resulting figure
int coat.Model.splitEdge | ( | self, | |
int | vertex1, | ||
int | vertex2, | ||
float | position ) |
split existing edge somewhere between vertices.
vertex1 | the positional vertex index (1) |
vertex2 | the positional vertex index (2) |
position | the position to split the edge, [0..1], 0 - near the vertex1, 1 - near the vertex2 |
coat.Model.subdivide | ( | self, | |
bool | apply_catmull_clark = True ) |
subdivide the whole mesh
apply_catmull_clark | apply the catmull-clark subdivision |
coat.Model.subdivideSelectedFaces | ( | self, | |
bool | apply_catmull_clark = False ) |
subdivide the selected faces
apply_catmull_clark | apply the catmull-clark subdivision |
coat.Model.toAbf | ( | self, | |
int | uv_set, | ||
int | island_index ) |
unwrap the island using the ABF approach
uv_set | the uv set index |
island_index | the island index within the uv set |
coat.Model.toGu | ( | self, | |
int | uv_set, | ||
int | island_index ) |
unwrap the island using the GU (Globally Uniform) approach
uv_set | the uv set index |
island_index | the island index within the uv set |
coat.Model.toLscm | ( | self, | |
int | uv_set, | ||
int | island_index ) |
unwrap the island using the LSCM approach
uv_set | the uv set index |
island_index | the island index within the uv set |
coat.Model.toPlanar | ( | self, | |
int | uv_set, | ||
int | island_index ) |
unwrap the island using the Planar approach
uv_set | the uv set index |
island_index | the island index within the uv set |
coat.Model.toStripe | ( | self, | |
int | uv_set, | ||
int | island_index ) |
try to uwrap the island as the regular stripe
uv_set | the uv set index |
island_index | the island index within the uv set |
coat.Model.transformSelected | ( | self, | |
mat4 | transform, | ||
bool | apply_symmetry ) |
apply the transformation to the selected elements
transform | the transformation matrix |
apply_symmetry | apply the global symmetry |
coat.Model.unselectAllEdges | ( | self | ) |
unselect all edges
coat.Model.unselectAllFaces | ( | self | ) |
unselect all faces
coat.Model.unselectAllVertices | ( | self | ) |
unselect all vertices
coat.Model.unwrap | ( | self, | |
int | uv_set ) |
unwrap the current uv-set
uv_set | the uv set index |
coat.Model.updateNormals | ( | self, | |
bool | for_snapping = True ) |
update the vertex normals
for_snapping | if true, the normals will lay in the middle of faces, ne respecting the faces square. |
coat.Model.updateTopology | ( | self | ) |
update the connectivity information, it should be called sometimes if you feel that the connectivity information lost due to some heavy operations
int coat.Model.vertsCount | ( | self | ) |
get the positional vertices count
int coat.Model.vertsUvCount | ( | self | ) |
get the uv vertices count