From 6cf2e89f6b37b5d077d20b8e8dae2dd81c97c18c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Sat, 13 Oct 2018 16:40:26 +0200 Subject: [PATCH] Document CameraImageProvider Makes it easier than looking up the Qt documentation online. --- cura/CameraImageProvider.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/cura/CameraImageProvider.py b/cura/CameraImageProvider.py index 6a07f6b029..edb0f205c7 100644 --- a/cura/CameraImageProvider.py +++ b/cura/CameraImageProvider.py @@ -1,15 +1,26 @@ +# Copyright (c) 2018 Ultimaker B.V. +# Cura is released under the terms of the LGPLv3 or higher. + from PyQt5.QtGui import QImage from PyQt5.QtQuick import QQuickImageProvider from PyQt5.QtCore import QSize from UM.Application import Application - +## Creates screenshots of the current scene. class CameraImageProvider(QQuickImageProvider): def __init__(self): super().__init__(QQuickImageProvider.Image) ## Request a new image. + # + # The image will be taken using the current camera position. + # Only the actual objects in the scene will get rendered. Not the build + # plate and such! + # \param id The ID for the image to create. This is the requested image + # source, with the "image:" scheme and provider identifier removed. It's + # a Qt thing, they'll provide this parameter. + # \param size The dimensions of the image to scale to. def requestImage(self, id, size): for output_device in Application.getInstance().getOutputDeviceManager().getOutputDevices(): try: