Convert uv islands to the cloth pieces with extra borders to be sewed together.
Convert uv islands to the cloth pieces with extra borders to be sewed together
1
2import coat
3
4
6border_percent = 0.5
8
11
12
13for s in range(n_sets):
14
16
18 print("n_islands: " + str(n_islands) + "\n")
19
20 for i in range(n_islands):
21 print("cloth_" + str(s) + "_"+str(i))
22
24
25 island_mesh.expandOpenEdges(border_percent / 100.0)
26
28
29 v.toSurface()
30
31
32
36
SceneElement sculptRoot()
get the root of all sculpt objects
Definition coat.py:2687
mat4 Scaling(float XYZ)
Definition coat.py:578
mat4 RotationX(float Angle)
Definition coat.py:564
toRoom(str name, bool Force=False)
switch to the room
Definition coat.py:3284
int islandsCount(int uv_set)
get the islands count over the current uv-set
Definition coat.py:3971
float getUnwrapIslandsDistance()
get the border around the islands when we pack it
Definition coat.py:3962
applyUVSet()
apply uv changes to the paint room mesh (if we use uv/paint context)
Definition coat.py:4107
int uvSetsCount()
get the UV-sets count.
Definition coat.py:3954
unwrap(int uv_set)
unwrap the current uv-set
Definition coat.py:4034
Mesh islandToMesh(int uv_set, int island_index)
get the mesh that contains the island, xy of each point is the UV coordinate.
Definition coat.py:3977
setUnwrapIslandsDistance(float distance)
set the border around the islands when we pack it
Definition coat.py:3958