Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPullusb <bernou.samuel@gmail.com>2021-03-28 02:26:34 +0300
committerPullusb <bernou.samuel@gmail.com>2021-03-28 02:26:34 +0300
commitd2263a464b17a2d9b79074510e8bcc73e66d5da1 (patch)
tree5d43f6e8c18c8ce987bcd0df9e89252bb6250d1c /greasepencil_tools
parent63492d3d0334e1827f611f8fe5a931f3ccbddfc0 (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.
Diffstat (limited to 'greasepencil_tools')
-rw-r--r--greasepencil_tools/__init__.py2
-rw-r--r--greasepencil_tools/box_deform.py8
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