diff options
author | Pullusb <bernou.samuel@gmail.com> | 2022-10-01 17:12:56 +0300 |
---|---|---|
committer | Pullusb <bernou.samuel@gmail.com> | 2022-10-01 17:12:56 +0300 |
commit | 9a87195949ccad14e2de83fb563064725760b2ad (patch) | |
tree | 2dc946c28ffa0aa780ee85e383357ec7a5a0f241 /greasepencil_tools/draw_tools.py | |
parent | f1520a9a78d9e83cb9c05022f330880e5315cb4a (diff) |
GPencil Tools: Fixed empty keyframe error
Fixed error when no keyframes to draw (gpu_extras.batch.batch_for_shader does not accept empty list in 3.4).
Fixed warning messages from error in some operator's poll.
Diffstat (limited to 'greasepencil_tools/draw_tools.py')
-rw-r--r-- | greasepencil_tools/draw_tools.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/greasepencil_tools/draw_tools.py b/greasepencil_tools/draw_tools.py index 6d2cf3a9..375b4332 100644 --- a/greasepencil_tools/draw_tools.py +++ b/greasepencil_tools/draw_tools.py @@ -10,7 +10,8 @@ class GP_OT_camera_flip_x(bpy.types.Operator): @classmethod def poll(cls, context): - return context.space_data.region_3d.view_perspective == 'CAMERA' + return context.area.type == 'VIEW_3D' \ + and context.space_data.region_3d.view_perspective == 'CAMERA' def execute(self, context): context.scene.camera.scale.x *= -1 |