diff options
Diffstat (limited to 'cura/Snapshot.py')
-rw-r--r-- | cura/Snapshot.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cura/Snapshot.py b/cura/Snapshot.py index 353b5ae17c..6f12aa88ba 100644 --- a/cura/Snapshot.py +++ b/cura/Snapshot.py @@ -30,11 +30,17 @@ class Snapshot: return min_x, max_x, min_y, max_y - ## Return a QImage of the scene - # Uses PreviewPass that leaves out some elements - # Aspect ratio assumes a square @staticmethod def snapshot(width = 300, height = 300): + """Return a QImage of the scene + + Uses PreviewPass that leaves out some elements Aspect ratio assumes a square + + :param width: width of the aspect ratio default 300 + :param height: height of the aspect ratio default 300 + :return: None when there is no model on the build plate otherwise it will return an image + """ + scene = Application.getInstance().getController().getScene() active_camera = scene.getActiveCamera() render_width, render_height = active_camera.getWindowSize() |