diff options
Diffstat (limited to 'greasepencil_tools/rotate_canvas.py')
-rw-r--r-- | greasepencil_tools/rotate_canvas.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/greasepencil_tools/rotate_canvas.py b/greasepencil_tools/rotate_canvas.py index c2482fbd..812aa025 100644 --- a/greasepencil_tools/rotate_canvas.py +++ b/greasepencil_tools/rotate_canvas.py @@ -283,7 +283,8 @@ class RC_OT_Set_rotation(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): cam_ob = context.scene.camera @@ -306,7 +307,9 @@ class RC_OT_Reset_rotation(bpy.types.Operator): @classmethod def poll(cls, context): - return context.space_data.region_3d.view_perspective == 'CAMERA' and context.scene.camera.get('stored_rotation') + return context.area.type == 'VIEW_3D' \ + and context.space_data.region_3d.view_perspective == 'CAMERA' \ + and context.scene.camera.get('stored_rotation') def execute(self, context): cam_ob = context.scene.camera |