From 280a575631c4cfb266e994190a045a95214164b9 Mon Sep 17 00:00:00 2001 From: pullusb Date: Wed, 27 Sep 2023 14:54:56 +0200 Subject: [PATCH] fix json palette export 2.3.4 - fixed: bug when exporting json palettes containing empty material slots --- CHANGELOG.md | 4 ++++ OP_palettes.py | 2 ++ __init__.py | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ead9b2..7cd6075 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +2.3.4 + +- fixed: bug when exporting json palettes containing empty material slots + 2.3.3 - fixed: Bug with animation manager objects data diff --git a/OP_palettes.py b/OP_palettes.py index 774980d..8c64d0a 100644 --- a/OP_palettes.py +++ b/OP_palettes.py @@ -129,6 +129,8 @@ class GPTB_OT_save_palette(bpy.types.Operator, ExportHelper): dic = {} allmat=[] for mat in ob.data.materials: + if not mat: + continue if not mat.is_grease_pencil: continue if mat in allmat: diff --git a/__init__.py b/__init__.py index 2f9c377..580d370 100755 --- a/__init__.py +++ b/__init__.py @@ -4,7 +4,7 @@ bl_info = { "name": "GP toolbox", "description": "Tool set for Grease Pencil in animation production", "author": "Samuel Bernou, Christophe Seux", -"version": (2, 3, 3), +"version": (2, 3, 4), "blender": (3, 0, 0), "location": "Sidebar (N menu) > Gpencil > Toolbox / Gpencil properties", "warning": "",