[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60584] trunk/blender/source/blender: Fix #36981, Removing Sample line fails during render.

Lukas Toenne lukas.toenne at googlemail.com
Mon Oct 7 11:25:40 CEST 2013


Revision: 60584
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60584
Author:   lukastoenne
Date:     2013-10-07 09:25:39 +0000 (Mon, 07 Oct 2013)
Log Message:
-----------
Fix #36981, Removing Sample line fails during render.
The SAMPLELINE flag in histogram was set during the BKE_histogram_update_sample_line function. That function in turn is called during every scope update in area draw function, meaning that during render
it constantly gets set. OTOH the operator tries to disable the flag on invoke, which "cancels" the sample line by default. So during render the operator un-setting of the flag has no effect, because the
render job immediatly triggers a redraw, which updates scopes and sets it again.

Moved the flag out of the actual sample line update function into the operator execute. Now only the operator enables/disables overall sample line drawing, while the rest of the update works as before.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/colortools.c
    trunk/blender/source/blender/editors/space_image/image_ops.c

Modified: trunk/blender/source/blender/blenkernel/intern/colortools.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/colortools.c	2013-10-07 08:25:30 UTC (rev 60583)
+++ trunk/blender/source/blender/blenkernel/intern/colortools.c	2013-10-07 09:25:39 UTC (rev 60584)
@@ -972,9 +972,6 @@
 	if (ibuf->rect_float)
 		cm_processor = IMB_colormanagement_display_processor_new(view_settings, display_settings);
 
-	/* persistent draw */
-	hist->flag |= HISTO_FLAG_SAMPLELINE; /* keep drawing the flag after */
-
 	for (i = 0; i < 256; i++) {
 		x = (int)(0.5f + x1 + (float)i * (x2 - x1) / 255.0f);
 		y = (int)(0.5f + y1 + (float)i * (y2 - y1) / 255.0f);

Modified: trunk/blender/source/blender/editors/space_image/image_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_image/image_ops.c	2013-10-07 08:25:30 UTC (rev 60583)
+++ trunk/blender/source/blender/editors/space_image/image_ops.c	2013-10-07 09:25:39 UTC (rev 60584)
@@ -2417,6 +2417,9 @@
 	hist->co[1][0] = x2f;
 	hist->co[1][1] = y2f;
 
+	/* enable line drawing */
+	hist->flag |= HISTO_FLAG_SAMPLELINE;
+
 	BKE_histogram_update_sample_line(hist, ibuf, &scene->view_settings, &scene->display_settings);
 	
 	/* reset y zoom */




More information about the Bf-blender-cvs mailing list