diff options
author | Pullusb <bernou.samuel@gmail.com> | 2021-03-28 02:26:34 +0300 |
---|---|---|
committer | Pullusb <bernou.samuel@gmail.com> | 2021-03-28 02:26:34 +0300 |
commit | d2263a464b17a2d9b79074510e8bcc73e66d5da1 (patch) | |
tree | 5d43f6e8c18c8ce987bcd0df9e89252bb6250d1c | |
parent | 63492d3d0334e1827f611f8fe5a931f3ccbddfc0 (diff) |
GPencil Tools: Fix T86833 allow multiple lattices
Starting blender 2.93, Gpencil Object can hold more than one lattice.
This fix makes the 'Box deform' feature compatible with the new behavior.
-rw-r--r-- | greasepencil_tools/__init__.py | 2 | ||||
-rw-r--r-- | greasepencil_tools/box_deform.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/greasepencil_tools/__init__.py b/greasepencil_tools/__init__.py index fa8e97c1..24b0399a 100644 --- a/greasepencil_tools/__init__.py +++ b/greasepencil_tools/__init__.py @@ -21,7 +21,7 @@ bl_info = { "name": "Grease Pencil Tools", "description": "Extra tools for Grease Pencil", "author": "Samuel Bernou, Antonio Vazquez, Daniel Martinez Lara, Matias Mendiola", -"version": (1, 4, 0), +"version": (1, 4, 1), "blender": (2, 91, 0), "location": "Sidebar > Grease Pencil > Grease Pencil Tools", "warning": "", diff --git a/greasepencil_tools/box_deform.py b/greasepencil_tools/box_deform.py index 7a2caf36..92f171f6 100644 --- a/greasepencil_tools/box_deform.py +++ b/greasepencil_tools/box_deform.py @@ -530,10 +530,10 @@ valid:Spacebar/Enter, cancel:Del/Backspace/Tab/Ctrl+T" print('Deleted remaining lattice object') delete_cage(phantom_obj) - if [m for m in self.gp_obj.grease_pencil_modifiers if m.type == 'GP_LATTICE']: - self.report({'ERROR'}, "Grease pencil object already has a lattice modifier (can only have one)") - return {'CANCELLED'} - + if bpy.app.version < (2,93,0): + if [m for m in self.gp_obj.grease_pencil_modifiers if m.type == 'GP_LATTICE']: + self.report({'ERROR'}, "Grease pencil object already has a lattice modifier (multi-lattices are enabled in blender 2.93+)") + return {'CANCELLED'} self.gp_mode = context.mode#store mode for restore |