Skip to content

Commit

Permalink
New version release
Browse files Browse the repository at this point in the history
  • Loading branch information
chsh2 committed May 6, 2023
1 parent 650202b commit 4c45380
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"author" : "https://github.com/chsh2/nijiGPen",
"description" : "Tools modifying Grease Pencil strokes in a 2D plane",
"blender" : (3, 3, 0),
"version" : (0, 4, 2),
"version" : (0, 4, 3),
"location" : "View3D > Sidebar > NijiGP, in Draw and Edit mode of Grease Pencil objects",
"warning" : "This addon is still in an early stage of development",
"category" : "Object"
Expand Down
3 changes: 1 addition & 2 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,6 @@ def stroke_to_poly(stroke_list, scale = False, correct_orientation = False, scal
Convert Blender strokes to a list of 2D coordinates compatible with Clipper.
Scaling can be applied instead of Clipper's built-in method
"""

import pyclipper
poly_list = []
w_bound = [math.inf, -math.inf]
h_bound = [math.inf, -math.inf]
Expand Down Expand Up @@ -305,6 +303,7 @@ def stroke_to_poly(stroke_list, scale = False, correct_orientation = False, scal
# Since Grease Pencil does not care whether the sequence of points is clockwise,
# Clipper may regard some strokes as negative polygons, which needs a fix
if correct_orientation:
import pyclipper
for co_list in poly_list:
if not pyclipper.Orientation(co_list):
co_list.reverse()
Expand Down

0 comments on commit 4c45380

Please sign in to comment.