[Bf-blender-cvs] [9ae097e239a] master: Animation: Clarified tooltip for Viewport Render Animation

Sybren A. Stüvel noreply at git.blender.org
Wed Dec 18 16:35:31 CET 2019


Commit: 9ae097e239a943a9b409155b943bc5510d14d9c8
Author: Sybren A. Stüvel
Date:   Wed Dec 18 15:17:51 2019 +0100
Branches: master
https://developer.blender.org/rB9ae097e239a943a9b409155b943bc5510d14d9c8

Animation: Clarified tooltip for Viewport Render Animation

The tooltip was static, so it was the same for viewport-rendering the
current frame and for the entire animation. It is now different for
those two.

The structure of `screen_opengl_render_description()` is such that it
allows for adding a new description for a soon-to-come feature (T72229).

===================================================================

M	source/blender/editors/render/render_opengl.c

===================================================================

diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index 10244cfa3fd..b46b8cdda89 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -1124,6 +1124,17 @@ static int screen_opengl_render_exec(bContext *C, wmOperator *op)
   return OPERATOR_FINISHED;
 }
 
+static char *screen_opengl_render_description(struct bContext *UNUSED(C),
+                                              struct wmOperatorType *UNUSED(ot),
+                                              struct PointerRNA *ptr)
+{
+  if (!RNA_boolean_get(ptr, "animation")) {
+    return NULL;
+  }
+
+  return BLI_strdup("Render the viewport for the animation range of this scene");
+}
+
 void RENDER_OT_opengl(wmOperatorType *ot)
 {
   PropertyRNA *prop;
@@ -1134,6 +1145,7 @@ void RENDER_OT_opengl(wmOperatorType *ot)
   ot->idname = "RENDER_OT_opengl";
 
   /* api callbacks */
+  ot->get_description = screen_opengl_render_description;
   ot->invoke = screen_opengl_render_invoke;
   ot->exec = screen_opengl_render_exec; /* blocking */
   ot->modal = screen_opengl_render_modal;



More information about the Bf-blender-cvs mailing list