3DCoat Python API
The 3DCoat Python API documentation.
|
Public Member Functions | |
int | uvSetsCount () |
get the UV-sets count. | |
setUnwrapIslandsDistance (distance=float) | |
set the border around the islands when we pack it | |
float | getUnwrapIslandsDistance () |
get the border around the islands when we pack it | |
int | currentUvSet () |
get the current uv-set index | |
int | islandsCount (uv_set=int) |
get the islands count over the current uv-set | |
Mesh | islandToMesh (uv_set=int, island_index=int) |
get the mesh that contains the island, xy of each point is the UV coordinate. | |
Mesh | islandToMeshInSpace (uv_set=int, island_index=int) |
get the mesh that contains the island, each point is the coordinate in space (not the uv coordinate!). | |
list | getIslandVertexMapping (uv_set=int, island_index=int) |
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 (uv_set=int, island_index=int) |
get unsorted list of edges on the border of the island | |
list | getBorderBetweenIslands (uv_set1=int, island_index1=int, uv_set2=int, island_index2=int) |
get the border between two islands | |
vec2 | getIslandVertexUv (uv_set=int, island_index=int, vertex_index=int) |
get the uv coordinate of the positional vertex in the island | |
Mesh | flattenSingleIsland (mesh=Mesh, method=int, optimize_rotation=bool, scale_to_geometry=bool) |
Flatten the mesh that consists of the single island. | |
meshToIsland (mesh=Mesh, uv_set=int, island_index=int) | |
use the mesh (that was previously got by islandToMesh) to replace the island in the current uv-set | |
pack (uv_set=int, rotate=bool, shuffle=bool) | |
pack the islands in the current uv-set | |
unwrap (uv_set=int) | |
unwrap the current uv-set | |
toAbf (uv_set=int, island_index=int) | |
unwrap the island using the ABF approach | |
toLscm (uv_set=int, island_index=int) | |
unwrap the island using the LSCM approach | |
toGu (uv_set=int, island_index=int) | |
unwrap the island using the GU (Globally Uniform) approach | |
toPlanar (uv_set=int, island_index=int) | |
unwrap the island using the Planar approach | |
toStripe (uv_set=int, island_index=int) | |
try to uwrap the island as the regular stripe | |
toUvSet (uv_set=int, island_index=int, destination_uv_set=int) | |
move the island from one uv-set to another one | |
Mesh | getWholeMesh () |
get the whole mesh from the paint/UV/Retopo room - in dependence on current room | |
Mesh | selectedToMesh () |
get the selected faces as the Mesh object | |
list | getSeams () |
get all seams across the mesh | |
addSeam (start_vertex_index=Any, end_vertex_index=int) | |
add the seam to the mesh | |
removeSeam (start_vertex_index=int, end_vertex_index=int) | |
remove the seam from the mesh | |
list | getSharpEdges () |
get the sharp edges across the mesh | |
addSharpEdge (start_vertex_index=int, end_vertex_index=int) | |
add the sharp edge to the mesh | |
removeSharpEdge (start_vertex_index=int, end_vertex_index=int) | |
remove the sharp edge from the mesh | |
unwrapUnassigned () | |
re-wrap/extend islands in correspondence to the changed seams and inserted faces. | |
applyUVSet () | |
apply uv changes to the paint room mesh (if we use uv/paint context) | |
coat.uv.addSeam | ( | start_vertex_index = Any , |
|
end_vertex_index = int |
|||
) |
add the seam to the mesh
start_vertex_index | the start positional vertex index |
end_vertex_index | the end positional vertex index |
coat.uv.addSharpEdge | ( | start_vertex_index = int , |
|
end_vertex_index = int |
|||
) |
add the sharp edge to the mesh
start_vertex_index | the start positional vertex index |
end_vertex_index | the end positional vertex index |
coat.uv.applyUVSet | ( | ) |
apply uv changes to the paint room mesh (if we use uv/paint context)
int coat.uv.currentUvSet | ( | ) |
get the current uv-set index
Mesh coat.uv.flattenSingleIsland | ( | mesh = Mesh , |
|
method = int , |
|||
optimize_rotation = bool , |
|||
scale_to_geometry = bool |
|||
) |
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 |
list coat.uv.getBorderBetweenIslands | ( | uv_set1 = int , |
|
island_index1 = int , |
|||
uv_set2 = int , |
|||
island_index2 = int |
|||
) |
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 |
list coat.uv.getIslandBorder | ( | uv_set = int , |
|
island_index = int |
|||
) |
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.uv.getIslandVertexMapping | ( | uv_set = int , |
|
island_index = int |
|||
) |
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.uv.getIslandVertexUv | ( | uv_set = int , |
|
island_index = int , |
|||
vertex_index = int |
|||
) |
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.uv.getSeams | ( | ) |
get all seams across the mesh
list coat.uv.getSharpEdges | ( | ) |
get the sharp edges across the mesh
float coat.uv.getUnwrapIslandsDistance | ( | ) |
get the border around the islands when we pack it
Mesh coat.uv.getWholeMesh | ( | ) |
get the whole mesh from the paint/UV/Retopo room - in dependence on current room
int coat.uv.islandsCount | ( | uv_set = int | ) |
get the islands count over the current uv-set
uv_set | the uv-set index |
Mesh coat.uv.islandToMesh | ( | uv_set = int , |
|
island_index = int |
|||
) |
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.uv.islandToMeshInSpace | ( | uv_set = int , |
|
island_index = int |
|||
) |
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 |
coat.uv.meshToIsland | ( | mesh = Mesh , |
|
uv_set = int , |
|||
island_index = int |
|||
) |
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.uv.pack | ( | uv_set = int , |
|
rotate = bool , |
|||
shuffle = bool |
|||
) |
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.uv.removeSeam | ( | start_vertex_index = int , |
|
end_vertex_index = int |
|||
) |
remove the seam from the mesh
start_vertex_index | the start positional vertex index |
end_vertex_index | the end positional vertex index |
coat.uv.removeSharpEdge | ( | start_vertex_index = int , |
|
end_vertex_index = int |
|||
) |
remove the sharp edge from the mesh
start_vertex_index | the start positional vertex index |
end_vertex_index | the end positional vertex index |
Mesh coat.uv.selectedToMesh | ( | ) |
get the selected faces as the Mesh object
coat.uv.setUnwrapIslandsDistance | ( | distance = float | ) |
set the border around the islands when we pack it
distance | the border size in percents |
coat.uv.toAbf | ( | uv_set = int , |
|
island_index = int |
|||
) |
unwrap the island using the ABF approach
uv_set | the uv set index |
island_index | the island index within the uv set |
coat.uv.toGu | ( | uv_set = int , |
|
island_index = int |
|||
) |
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.uv.toLscm | ( | uv_set = int , |
|
island_index = int |
|||
) |
unwrap the island using the LSCM approach
uv_set | the uv set index |
island_index | the island index within the uv set |
coat.uv.toPlanar | ( | uv_set = int , |
|
island_index = int |
|||
) |
unwrap the island using the Planar approach
uv_set | the uv set index |
island_index | the island index within the uv set |
coat.uv.toStripe | ( | uv_set = int , |
|
island_index = int |
|||
) |
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.uv.toUvSet | ( | uv_set = int , |
|
island_index = int , |
|||
destination_uv_set = int |
|||
) |
move the island from one uv-set to another one
uv_set | the source uv set index |
island_index | the island index within the source uv set |
destination_uv_set | the destination uv set index |
coat.uv.unwrap | ( | uv_set = int | ) |
unwrap the current uv-set
uv_set | the uv set index |
coat.uv.unwrapUnassigned | ( | ) |
re-wrap/extend islands in correspondence to the changed seams and inserted faces.
Pay attention, that it may lead to islands intersection.
int coat.uv.uvSetsCount | ( | ) |
get the UV-sets count.