(gp_layer, dist, smooth_iterations)
| 36 | |
| 37 | |
| 38 | def smooth_distribute_gp_layer(gp_layer, dist, smooth_iterations): |
| 39 | strokes = [[i.co for i in j.points] for j in gp_layer.strokes] |
| 40 | for i, stroke in enumerate(strokes): |
| 41 | new_locations = smooth_stroke(smooth_iterations, .3, distribute_evenly_along_curve(stroke, dist)) |
| 42 | points = gp_layer.strokes[i].points |
| 43 | for k in range(len(new_locations), len(stroke)): |
| 44 | points.pop() |
| 45 | |
| 46 | for k in range(len(stroke), len(new_locations)): |
| 47 | points.add() |
| 48 | # for k in range(len(points)): |
| 49 | # points.pop() |
| 50 | # print(len(points)) |
| 51 | # points.add(len(new_locations)) |
| 52 | for j, point in enumerate(gp_layer.strokes[i].points): |
| 53 | point.co = new_locations[j] |
| 54 | |
| 55 | |
| 56 | def find_splits(strokes): |
no test coverage detected