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:2843
mat4 Scaling(XYZ=float)
Definition coat.py:614
mat4 RotationX(Angle=float)
Definition coat.py:607
toRoom(name=str)
switch to the room
Definition coat.py:3251
float getUnwrapIslandsDistance()
get the border around the islands when we pack it
Definition coat.py:3976
unwrap(uv_set=int)
unwrap the current uv-set
Definition coat.py:4048
Mesh islandToMesh(uv_set=int, island_index=int)
get the mesh that contains the island, xy of each point is the UV coordinate.
Definition coat.py:3991
int islandsCount(uv_set=int)
get the islands count over the current uv-set
Definition coat.py:3985
applyUVSet()
apply uv changes to the paint room mesh (if we use uv/paint context)
Definition coat.py:4121
int uvSetsCount()
get the UV-sets count.
Definition coat.py:3968
setUnwrapIslandsDistance(distance=float)
set the border around the islands when we pack it
Definition coat.py:3972