[Bf-extensions-cvs] [d2263a46] master: GPencil Tools: Fix T86833 allow multiple lattices
Pullusb
noreply at git.blender.org
Sun Mar 28 00:26:42 CET 2021
Commit: d2263a464b17a2d9b79074510e8bcc73e66d5da1
Author: Pullusb
Date: Sun Mar 28 00:26:34 2021 +0100
Branches: master
https://developer.blender.org/rBAd2263a464b17a2d9b79074510e8bcc73e66d5da1
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.
===================================================================
M greasepencil_tools/__init__.py
M greasepencil_tools/box_deform.py
===================================================================
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
More information about the Bf-extensions-cvs
mailing list