[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30172] branches/soc-2010-jwilkins: * default overlay color changed to black

Jason Wilkins Jason.A.Wilkins at gmail.com
Sat Jul 10 05:48:47 CEST 2010


Revision: 30172
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30172
Author:   jwilkins
Date:     2010-07-10 05:48:23 +0200 (Sat, 10 Jul 2010)

Log Message:
-----------
* default overlay color changed to black
* can change overlay color from user prefs
* bug fix: unified strength wasn't showing in user prefs

Modified Paths:
--------------
    branches/soc-2010-jwilkins/release/scripts/ui/space_userpref.py
    branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c
    branches/soc-2010-jwilkins/source/blender/makesdna/DNA_userdef_types.h
    branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_userdef.c

Modified: branches/soc-2010-jwilkins/release/scripts/ui/space_userpref.py
===================================================================
--- branches/soc-2010-jwilkins/release/scripts/ui/space_userpref.py	2010-07-10 03:16:49 UTC (rev 30171)
+++ branches/soc-2010-jwilkins/release/scripts/ui/space_userpref.py	2010-07-10 03:48:23 UTC (rev 30172)
@@ -339,7 +339,8 @@
         col = row.column()
         col.label(text="Paint and Sculpt:")
         col.prop(edit, "sculpt_paint_use_unified_size", text="Unify Size")
-        col.prop(edit, "sculpt_paint_use_unified_alpha", text="Unify Strength")
+        col.prop(edit, "sculpt_paint_use_unified_strength", text="Unify Strength")
+        col.prop(edit, "sculpt_paint_overlay_col", text="Overlay Color")
         col.prop(sculpt, "use_openmp", text="Threaded Sculpt")
         col.prop(sculpt, "fast_navigate")
         col.prop(sculpt, "show_brush")

Modified: branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c	2010-07-10 03:16:49 UTC (rev 30171)
+++ branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c	2010-07-10 03:48:23 UTC (rev 30172)
@@ -783,7 +783,12 @@
 					}
 				}
 
-				glColor4f(1.0f, 1.0f, 1.0f, brush->texture_overlay_alpha / 100.0f);
+				glColor4f(
+					U.sculpt_paint_overlay_col[0],
+					U.sculpt_paint_overlay_col[1],
+					U.sculpt_paint_overlay_col[2],
+					brush->texture_overlay_alpha / 100.0f);
+
 				glBegin(GL_QUADS);
 				if (brush->mtex.brush_map_mode == MTEX_MAP_MODE_FIXED) {
 					if (brush->draw_anchored) {

Modified: branches/soc-2010-jwilkins/source/blender/makesdna/DNA_userdef_types.h
===================================================================
--- branches/soc-2010-jwilkins/source/blender/makesdna/DNA_userdef_types.h	2010-07-10 03:16:49 UTC (rev 30171)
+++ branches/soc-2010-jwilkins/source/blender/makesdna/DNA_userdef_types.h	2010-07-10 03:48:23 UTC (rev 30172)
@@ -378,7 +378,7 @@
 	int sculpt_paint_unified_size; /* unified radius of brush in pixels */
 	float sculpt_paint_unified_unprojected_radius;/* unified radius of brush in Blender units */
 	float sculpt_paint_unified_alpha; /* unified strength of brush */
-	int pad2;
+	float sculpt_paint_overlay_col[3];
 } UserDef;
 
 extern UserDef U; /* from blenkernel blender.c */

Modified: branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_userdef.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_userdef.c	2010-07-10 03:16:49 UTC (rev 30171)
+++ branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_userdef.c	2010-07-10 03:48:23 UTC (rev 30172)
@@ -2214,34 +2214,40 @@
 	RNA_def_property_ui_text(prop, "Grease Pencil Eraser Radius", "Radius of eraser 'brush'");
 
 	/* sculpt and paint */
+
+	prop= RNA_def_property(srna, "sculpt_paint_overlay_col", PROP_FLOAT, PROP_COLOR);
+	RNA_def_property_float_sdna(prop, NULL, "sculpt_paint_overlay_col");
+	RNA_def_property_array(prop, 3);
+	RNA_def_property_ui_text(prop, "Sculpt/Paint Overlay Color", "Color of texture overlay");
+
 	prop= RNA_def_property(srna, "sculpt_paint_use_unified_size", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "sculpt_paint_settings", SCULPT_PAINT_USE_UNIFIED_SIZE);
-	RNA_def_property_ui_text(prop, "Use Unified Radius", "Instead of per brush radius, the radius is shared across brushes");
+	RNA_def_property_ui_text(prop, "Sculpt/Paint Use Unified Radius", "Instead of per brush radius, the radius is shared across brushes");
 
 	prop= RNA_def_property(srna, "sculpt_paint_use_unified_strength", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "sculpt_paint_settings", SCULPT_PAINT_USE_UNIFIED_ALPHA);
-	RNA_def_property_ui_text(prop, "Use Unified Strength", "Instead of per brush strength, the strength is shared across brushes");
+	RNA_def_property_ui_text(prop, "Sculpt/Paint Use Unified Strength", "Instead of per brush strength, the strength is shared across brushes");
 
 	prop= RNA_def_property(srna, "sculpt_paint_unified_lock_brush_size", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "sculpt_paint_settings", SCULPT_PAINT_UNIFIED_LOCK_BRUSH_SIZE);
-	RNA_def_property_ui_text(prop, "Use Unified Blender Units", "When locked all brushes stay same size relative to object; when unlocked all brush sizes are given in pixels");
+	RNA_def_property_ui_text(prop, "Sculpt/Paint Use Unified Blender Units", "When locked all brushes stay same size relative to object; when unlocked all brush sizes are given in pixels");
 
 	prop= RNA_def_property(srna, "sculpt_paint_unified_size", PROP_INT, PROP_DISTANCE);
 	RNA_def_property_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS*10);
 	RNA_def_property_ui_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS, 1, 0);
-	RNA_def_property_ui_text(prop, "Unified Size", "Unified radius of the brush in pixels");
+	RNA_def_property_ui_text(prop, "Sculpt/Paint Unified Size", "Unified radius of the brush in pixels");
 
 	prop= RNA_def_property(srna, "sculpt_paint_unified_unprojected_radius", PROP_FLOAT, PROP_DISTANCE);
 	RNA_def_property_range(prop, 0, FLT_MAX);
 	RNA_def_property_ui_range(prop, 0, 1, 0, 0);
-	RNA_def_property_ui_text(prop, "Unified Surface Size", "Unified radius of brush in Blender units");
+	RNA_def_property_ui_text(prop, "Sculpt/Paint Unified Surface Size", "Unified radius of brush in Blender units");
 
 	prop= RNA_def_property(srna, "sculpt_paint_unified_strength", PROP_FLOAT, PROP_FACTOR);
 	RNA_def_property_float_sdna(prop, NULL, "sculpt_paint_unified_alpha");
 	RNA_def_property_float_default(prop, 0.5f);
 	RNA_def_property_range(prop, 0.0f, 10.0f);
 	RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 0.001);
-	RNA_def_property_ui_text(prop, "Unified Strength", "Unified power of effect of brushes when applied");
+	RNA_def_property_ui_text(prop, "Sculpt/Paint Unified Strength", "Unified power of effect of brushes when applied");
 
 	/* duplication linking */
 	prop= RNA_def_property(srna, "duplicate_mesh", PROP_BOOLEAN, PROP_NONE);





More information about the Bf-blender-cvs mailing list