Skip to content

Commit

Permalink
Adjust screenshot operator call to Blender 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SBCV committed Feb 20, 2022
1 parent 129fe92 commit 2a7550e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions photogrammetry_importer/panels/screenshot_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ def execute(self, context):
bpy.context.scene.camera = selected_cam
area_3d.spaces[0].region_3d.view_perspective = "CAMERA"
_update_ui(context)
bpy.ops.screen.screenshot(
filepath=ofp, full=full_screenshot, check_existing=False
)
if full_screenshot:
bpy.ops.screen.screenshot(filepath=ofp, check_existing=False)
else:
bpy.ops.screen.screenshot_area(filepath=ofp, check_existing=False)

# Restore previous settings
area_3d.spaces[0].region_3d.view_perspective = previous_perspective
Expand Down

0 comments on commit 2a7550e

Please sign in to comment.