[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44171] branches/soc-2008-mxcurioni/source /blender: Fix for a color preview not immediately updated during the manipulation of a color picker .

Tamito Kajiyama rd6t-kjym at asahi-net.or.jp
Thu Feb 16 22:52:05 CET 2012


Revision: 44171
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44171
Author:   kjym3
Date:     2012-02-16 21:52:05 +0000 (Thu, 16 Feb 2012)
Log Message:
-----------
Fix for a color preview not immediately updated during the manipulation of a color picker.
Problem report by Light BWK through personal communications, thanks!

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/source/blender/editors/space_buttons/space_buttons.c
    branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_linestyle.c
    branches/soc-2008-mxcurioni/source/blender/windowmanager/WM_types.h

Modified: branches/soc-2008-mxcurioni/source/blender/editors/space_buttons/space_buttons.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/editors/space_buttons/space_buttons.c	2012-02-16 20:17:45 UTC (rev 44170)
+++ branches/soc-2008-mxcurioni/source/blender/editors/space_buttons/space_buttons.c	2012-02-16 21:52:05 UTC (rev 44171)
@@ -369,6 +369,10 @@
 			ED_area_tag_redraw(sa);
 			sbuts->preview= 1;
 			break;
+		case NC_LINESTYLE:
+			ED_area_tag_redraw(sa);
+			sbuts->preview= 1;
+			break;
 	}
 
 	if(wmn->data == ND_KEYS)

Modified: branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_linestyle.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_linestyle.c	2012-02-16 20:17:45 UTC (rev 44170)
+++ branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_linestyle.c	2012-02-16 21:52:05 UTC (rev 44171)
@@ -277,7 +277,7 @@
 	RNA_def_property_string_sdna(prop, NULL, "modifier.name");
 	RNA_def_property_string_funcs(prop, NULL, NULL, set_name_func);
 	RNA_def_property_ui_text(prop, "Modifier Name", "Name of the modifier");
-	RNA_def_property_update(prop, NC_SCENE, NULL);
+	RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 	RNA_def_struct_name_property(srna, prop);
 
 	if (blend) {
@@ -285,13 +285,13 @@
 		RNA_def_property_enum_sdna(prop, NULL, "modifier.blend");
 		RNA_def_property_enum_items(prop, (color) ? color_blend_items : value_blend_items);
 		RNA_def_property_ui_text(prop, "Blend", "Specify how the modifier value is blended into the base value");
-		RNA_def_property_update(prop, NC_SCENE, NULL);
+		RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 
 		prop= RNA_def_property(srna, "influence", PROP_FLOAT, PROP_FACTOR);
 		RNA_def_property_float_sdna(prop, NULL, "modifier.influence");
 		RNA_def_property_range(prop, 0.0f, 1.0f);
 		RNA_def_property_ui_text(prop, "Influence", "Influence factor by which the modifier changes the property");
-		RNA_def_property_update(prop, NC_SCENE, NULL);
+		RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 	}
 
 	prop= RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
@@ -335,18 +335,18 @@
 	RNA_def_property_pointer_sdna(prop, NULL, "color_ramp");
 	RNA_def_property_struct_type(prop, "ColorRamp");
 	RNA_def_property_ui_text(prop, "Color Ramp", "Color ramp used to change line color");
-	RNA_def_property_update(prop, NC_SCENE, NULL);
+	RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 
 	if (range) {
 		prop= RNA_def_property(srna, "range_min", PROP_FLOAT, PROP_NONE);
 		RNA_def_property_float_sdna(prop, NULL, "range_min");
 		RNA_def_property_ui_text(prop, "Range Min", "Lower bound of the input range the mapping is applied");
-		RNA_def_property_update(prop, NC_SCENE, NULL);
+		RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 
 		prop= RNA_def_property(srna, "range_max", PROP_FLOAT, PROP_NONE);
 		RNA_def_property_float_sdna(prop, NULL, "range_max");
 		RNA_def_property_ui_text(prop, "Range Max", "Upper bound of the input range the mapping is applied");
-		RNA_def_property_update(prop, NC_SCENE, NULL);
+		RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 	}
 }
 
@@ -363,41 +363,41 @@
 	RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
 	RNA_def_property_enum_items(prop, mapping_items);
 	RNA_def_property_ui_text(prop, "Mapping", "Select the mapping type");
-	RNA_def_property_update(prop, NC_SCENE, NULL);
+	RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 
 	prop= RNA_def_property(srna, "invert", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flags", LS_MODIFIER_INVERT);
 	RNA_def_property_ui_text(prop, "Invert", "Invert the fade-out direction of the linear mapping");
-	RNA_def_property_update(prop, NC_SCENE, NULL);
+	RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 
 	prop = RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
 	RNA_def_property_pointer_sdna(prop, NULL, "curve");
 	RNA_def_property_struct_type(prop, "CurveMapping");
 	RNA_def_property_ui_text(prop, "Curve", "Curve used for the curve mapping");
-	RNA_def_property_update(prop, NC_SCENE, NULL);
+	RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 
 	if (range) {
 		prop= RNA_def_property(srna, "range_min", PROP_FLOAT, PROP_NONE);
 		RNA_def_property_float_sdna(prop, NULL, "range_min");
 		RNA_def_property_ui_text(prop, "Range Min", "Lower bound of the input range the mapping is applied");
-		RNA_def_property_update(prop, NC_SCENE, NULL);
+		RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 
 		prop= RNA_def_property(srna, "range_max", PROP_FLOAT, PROP_NONE);
 		RNA_def_property_float_sdna(prop, NULL, "range_max");
 		RNA_def_property_ui_text(prop, "Range Max", "Upper bound of the input range the mapping is applied");
-		RNA_def_property_update(prop, NC_SCENE, NULL);
+		RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 	}
 
 	if (value) {
 		prop= RNA_def_property(srna, "value_min", PROP_FLOAT, PROP_NONE);
 		RNA_def_property_float_sdna(prop, NULL, "value_min");
 		RNA_def_property_ui_text(prop, "Value Min", "Minimum output value of the mapping");
-		RNA_def_property_update(prop, NC_SCENE, NULL);
+		RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 
 		prop= RNA_def_property(srna, "value_max", PROP_FLOAT, PROP_NONE);
 		RNA_def_property_float_sdna(prop, NULL, "value_max");
 		RNA_def_property_ui_text(prop, "Value Max", "Maximum output value of the mapping");
-		RNA_def_property_update(prop, NC_SCENE, NULL);
+		RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 	}
 }
 
@@ -422,7 +422,7 @@
 	RNA_def_property_enum_sdna(prop, NULL, "mat_attr");
 	RNA_def_property_enum_items(prop, mat_attr_items);
 	RNA_def_property_ui_text(prop, "Material Attribute", "Specify which material attribute is used");
-	RNA_def_property_update(prop, NC_SCENE, NULL);
+	RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 
 }
 
@@ -476,7 +476,7 @@
 	RNA_def_property_struct_type(prop, "Object");
 	RNA_def_property_flag(prop, PROP_EDITABLE);
 	RNA_def_property_ui_text(prop, "Target", "Target object from which the distance is measured");
-	RNA_def_property_update(prop, NC_SCENE, NULL);
+	RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 
 	srna= RNA_def_struct(brna, "LineStyleColorModifier_Material", "LineStyleColorModifier");
 	RNA_def_struct_ui_text(srna, "Material", "Change line color based on a material attribute");
@@ -487,7 +487,7 @@
 	prop= RNA_def_property(srna, "use_ramp", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flags", LS_MODIFIER_USE_RAMP);
 	RNA_def_property_ui_text(prop, "Ramp", "Use color ramp to map the BW average into an RGB color");
-	RNA_def_property_update(prop, NC_SCENE, NULL);
+	RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 
 	/* alpha transparency modifiers */
 
@@ -517,7 +517,7 @@
 	RNA_def_property_struct_type(prop, "Object");
 	RNA_def_property_flag(prop, PROP_EDITABLE);
 	RNA_def_property_ui_text(prop, "Target", "Target object from which the distance is measured");
-	RNA_def_property_update(prop, NC_SCENE, NULL);
+	RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 
 	srna= RNA_def_struct(brna, "LineStyleAlphaModifier_Material", "LineStyleAlphaModifier");
 	RNA_def_struct_ui_text(srna, "Material", "Change alpha transparency based on a material attribute");
@@ -553,7 +553,7 @@
 	RNA_def_property_struct_type(prop, "Object");
 	RNA_def_property_flag(prop, PROP_EDITABLE);
 	RNA_def_property_ui_text(prop, "Target", "Target object from which the distance is measured");
-	RNA_def_property_update(prop, NC_SCENE, NULL);
+	RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 
 	srna= RNA_def_struct(brna, "LineStyleThicknessModifier_Material", "LineStyleThicknessModifier");
 	RNA_def_struct_ui_text(srna, "Material", "Change line thickness based on a material attribute");
@@ -568,19 +568,19 @@
 	prop= RNA_def_property(srna, "orientation", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "orientation");
 	RNA_def_property_ui_text(prop, "Orientation", "Angle of the main direction");
-	RNA_def_property_update(prop, NC_SCENE, NULL);
+	RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 
 	prop= RNA_def_property(srna, "min_thickness", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "min_thickness");
 	RNA_def_property_range(prop, 0.0f, 10000.0f);
 	RNA_def_property_ui_text(prop, "Min Thickness", "Minimum thickness in the direction perpendicular to the main direction");
-	RNA_def_property_update(prop, NC_SCENE, NULL);
+	RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 
 	prop= RNA_def_property(srna, "max_thickness", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "max_thickness");
 	RNA_def_property_range(prop, 0.0f, 10000.0f);
 	RNA_def_property_ui_text(prop, "Max Thickness", "Maximum thickness in the main direction");
-	RNA_def_property_update(prop, NC_SCENE, NULL);
+	RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 
 	/* geometry modifiers */
 
@@ -597,7 +597,7 @@
 	prop= RNA_def_property(srna, "sampling", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "sampling");
 	RNA_def_property_ui_text(prop, "Sampling", "New sampling value to be used for subsequent modifiers");
-	RNA_def_property_update(prop, NC_SCENE, NULL);
+	RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 
 	srna= RNA_def_struct(brna, "LineStyleGeometryModifier_BezierCurve", "LineStyleGeometryModifier");
 	RNA_def_struct_ui_text(srna, "Bezier Curve", "Replace stroke backbone geometry by a Bezier curve approximation of the original backbone geometry");
@@ -606,7 +606,7 @@
 	prop= RNA_def_property(srna, "error", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "error");
 	RNA_def_property_ui_text(prop, "Error", "Maximum distance allowed between the new Bezier curve and the original backbone geometry)");
-	RNA_def_property_update(prop, NC_SCENE, NULL);
+	RNA_def_property_update(prop, NC_LINESTYLE, NULL);
 
 	srna= RNA_def_struct(brna, "LineStyleGeometryModifier_SinusDisplacement", "LineStyleGeometryModifier");
 	RNA_def_struct_ui_text(srna, "Sinus Displacement", "Add sinus displacement to stroke backbone geometry");
@@ -615,17 +615,17 @@
 	prop= RNA_def_property(srna, "wavelength", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "wavelength");

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list