[Bf-blender-cvs] [8da62a9a86d] master: Fix T83547: UV Editor stitching preview is gone.

Jeroen Bakker noreply at git.blender.org
Wed Dec 16 15:03:36 CET 2020


Commit: 8da62a9a86d98676ff0bc4cffd389dcbed7e3071
Author: Jeroen Bakker
Date:   Wed Dec 16 15:01:25 2020 +0100
Branches: master
https://developer.blender.org/rB8da62a9a86d98676ff0bc4cffd389dcbed7e3071

Fix T83547: UV Editor stitching preview is gone.

Issue was related that the draw manager didn't invoked the draw handlers
for image editors.

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

M	source/blender/draw/intern/draw_manager.c

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

diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index 988975bd399..ffc565d0514 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -2073,7 +2073,6 @@ void DRW_draw_render_loop_2d_ex(struct Depsgraph *depsgraph,
    * for the image editor this is when showing UV's.*/
   const bool do_populate_loop = (DST.draw_ctx.space_data->spacetype == SPACE_IMAGE);
   const bool do_annotations = drw_draw_show_annotation();
-  const bool do_region_callbacks = (DST.draw_ctx.space_data->spacetype != SPACE_IMAGE);
   const bool do_draw_gizmos = (DST.draw_ctx.space_data->spacetype != SPACE_IMAGE);
 
   /* Get list of enabled engines */
@@ -2125,7 +2124,7 @@ void DRW_draw_render_loop_2d_ex(struct Depsgraph *depsgraph,
   /* Start Drawing */
   DRW_state_reset();
 
-  if (do_region_callbacks && DST.draw_ctx.evil_C) {
+  if (DST.draw_ctx.evil_C) {
     ED_region_draw_cb_draw(DST.draw_ctx.evil_C, DST.draw_ctx.region, REGION_DRAW_PRE_VIEW);
   }
 
@@ -2147,10 +2146,8 @@ void DRW_draw_render_loop_2d_ex(struct Depsgraph *depsgraph,
     if (do_annotations) {
       ED_annotation_draw_view2d(DST.draw_ctx.evil_C, true);
     }
-    if (do_region_callbacks) {
-      GPU_depth_test(GPU_DEPTH_NONE);
-      ED_region_draw_cb_draw(DST.draw_ctx.evil_C, DST.draw_ctx.region, REGION_DRAW_POST_VIEW);
-    }
+    GPU_depth_test(GPU_DEPTH_NONE);
+    ED_region_draw_cb_draw(DST.draw_ctx.evil_C, DST.draw_ctx.region, REGION_DRAW_POST_VIEW);
     GPU_matrix_pop_projection();
     /* Callback can be nasty and do whatever they want with the state.
      * Don't trust them! */



More information about the Bf-blender-cvs mailing list