diff --git a/CHANGELOG.md b/CHANGELOG.md index b7a2842..16e5605 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +2.0.10 + +- fix: poll error in console + 2.0.9 - fix: prefix/suffix UIlist actions trigger UI redraw to see changes live diff --git a/OP_helpers.py b/OP_helpers.py index 7485847..955aa12 100644 --- a/OP_helpers.py +++ b/OP_helpers.py @@ -31,7 +31,8 @@ class GPTB_OT_flipx_view(bpy.types.Operator): @classmethod def poll(cls, context): - return context.region_data.view_perspective == 'CAMERA' + return context.area.type == 'VIEW_3D' and \ + context.region_data.view_perspective == 'CAMERA' def execute(self, context): context.scene.camera.scale.x *= -1 @@ -251,7 +252,8 @@ class GPTB_OT_set_view_as_cam(bpy.types.Operator): @classmethod def poll(cls, context): - return context.region_data.view_perspective != 'CAMERA'# need to be out of camera + return context.area.type == 'VIEW_3D' and \ + context.region_data.view_perspective != 'CAMERA'# need to be out of camera # return context.scene.camera and not context.scene.camera.name.startswith('Cam') def execute(self, context): diff --git a/__init__.py b/__init__.py index d990dd3..0dcbd2d 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, 0, 9), +"version": (2, 0, 10), "blender": (3, 0, 0), "location": "Sidebar (N menu) > Gpencil > Toolbox / Gpencil properties", "warning": "",