From 4c453809eaa15c262e9a37cbc1d8ab6b8cdbadfb Mon Sep 17 00:00:00 2001 From: chsh2 <110356534+chsh2@users.noreply.github.com> Date: Fri, 5 May 2023 22:17:50 -0700 Subject: [PATCH] New version release --- __init__.py | 2 +- utils.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/__init__.py b/__init__.py index 128d1f6..1a68cfc 100644 --- a/__init__.py +++ b/__init__.py @@ -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" diff --git a/utils.py b/utils.py index 954c2da..8a7d93e 100644 --- a/utils.py +++ b/utils.py @@ -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] @@ -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()