[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50934] trunk/blender/source/blender/ editors/interface/interface_templates.c: fix [#32678] Changing RGB Curve via 'X' or 'Y' coordinates does not update

Campbell Barton ideasman42 at gmail.com
Fri Sep 28 03:47:47 CEST 2012


Revision: 50934
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50934
Author:   campbellbarton
Date:     2012-09-28 01:47:45 +0000 (Fri, 28 Sep 2012)
Log Message:
-----------
fix [#32678] Changing RGB Curve via 'X' or 'Y' coordinates does not update

Modified Paths:
--------------
    trunk/blender/source/blender/editors/interface/interface_templates.c

Modified: trunk/blender/source/blender/editors/interface/interface_templates.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_templates.c	2012-09-28 01:16:26 UTC (rev 50933)
+++ trunk/blender/source/blender/editors/interface/interface_templates.c	2012-09-28 01:47:45 UTC (rev 50934)
@@ -1749,11 +1749,11 @@
 	ED_region_tag_redraw(CTX_wm_region(C));
 }
 
-static void curvemap_buttons_update(bContext *UNUSED(C), void *UNUSED(arg1), void *cumap_v)
+static void curvemap_buttons_update(bContext *C, void *arg1_v, void *cumap_v)
 {
 	CurveMapping *cumap = cumap_v;
-
 	curvemapping_changed(cumap, TRUE);
+	rna_update_cb(C, arg1_v, NULL);
 }
 
 static void curvemap_buttons_reset(bContext *C, void *cb_v, void *cumap_v)
@@ -1900,9 +1900,9 @@
 
 	if (cmp) {
 		uiLayoutRow(layout, TRUE);
-		uiBlockSetNFunc(block, curvemap_buttons_update, NULL, cumap);
-		uiDefButF(block, NUM, 0, "X", 0, 2 * UI_UNIT_Y, UI_UNIT_X * 10, UI_UNIT_Y, &cmp->x, 0.0f, 1.0f, 1, 5, "");
-		uiDefButF(block, NUM, 0, "Y", 0, 1 * UI_UNIT_Y, UI_UNIT_X * 10, UI_UNIT_Y, &cmp->y, 0.0f, 1.0f, 1, 5, "");
+		uiBlockSetNFunc(block, curvemap_buttons_update, MEM_dupallocN(cb), cumap);
+		bt = uiDefButF(block, NUM, 0, "X", 0, 2 * UI_UNIT_Y, UI_UNIT_X * 10, UI_UNIT_Y, &cmp->x, 0.0f, 1.0f, 1, 5, "");
+		bt = uiDefButF(block, NUM, 0, "Y", 0, 1 * UI_UNIT_Y, UI_UNIT_X * 10, UI_UNIT_Y, &cmp->y, 0.0f, 1.0f, 1, 5, "");
 	}
 
 	/* black/white levels */




More information about the Bf-blender-cvs mailing list