[Bf-blender-cvs] [2ccc464] temp-menu_shadow_theme_color: Remove unused menu_shadow_fac

julianeisel noreply at git.blender.org
Thu Jan 8 23:33:51 CET 2015


Commit: 2ccc464334c2dfd32d192feb1ee9cf0fa7669a52
Author: julianeisel
Date:   Thu Jan 8 23:33:03 2015 +0100
Branches: temp-menu_shadow_theme_color
https://developer.blender.org/rB2ccc464334c2dfd32d192feb1ee9cf0fa7669a52

Remove unused menu_shadow_fac

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

M	source/blender/editors/interface/resources.c
M	source/blender/makesdna/DNA_userdef_types.h
M	source/blender/makesrna/intern/rna_userdef.c

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

diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 34390ce..7a41aaa 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -854,7 +854,6 @@ void ui_theme_init_default(void)
 	rgba_char_args_set(btheme->tui.yaxis,   0, 220,   0, 255);
 	rgba_char_args_set(btheme->tui.zaxis,   0,   0, 220, 255);
 
-	btheme->tui.menu_shadow_fac = 0.5f;
 	btheme->tui.menu_shadow_width = 12;
 	
 	/* Bone Color Sets */
@@ -2331,9 +2330,7 @@ void init_userdef_do_versions(void)
 		bTheme *btheme;
 		
 		for (btheme = U.themes.first; btheme; btheme = btheme->next) {
-			/* rna definition limits fac to 0.01 */
-			if (btheme->tui.menu_shadow_fac == 0.0f) {
-				btheme->tui.menu_shadow_fac = 0.5f;
+			if (btheme->tui.menu_shadow_width == 0) {
 				btheme->tui.menu_shadow_width = 12;
 			}
 		}
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index d81f745..7725d6b 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -171,13 +171,12 @@ typedef struct ThemeUI {
 
 	char widget_emboss[4];
 
-	/* menu shadows: fac: 0 - 1 for blend factor, width: size of shadow in pixels, shadow: color of shadow */
-	float menu_shadow_fac;
-	short menu_shadow_width;
+	/* menu shadows: width: size of shadow in pixels, shadow: color of shadow */
 	char menu_shadow[4];
-	
-	short pad[3];
-	
+	short menu_shadow_width;
+
+	short pad;
+
 	char iconfile[256];	// FILE_MAXFILE length
 	float icon_alpha;
 
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 4c23617..5490bce 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -1024,22 +1024,17 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "State Colors", "");
 	RNA_def_property_update(prop, 0, "rna_userdef_update");
 
-	prop = RNA_def_property(srna, "menu_shadow_fac", PROP_FLOAT, PROP_FACTOR);
-	RNA_def_property_ui_text(prop, "Menu Shadow Strength", "Blending factor for menu shadows");
-	RNA_def_property_range(prop, 0.01f, 1.0f);
-	RNA_def_property_update(prop, 0, "rna_userdef_update");
-	
-	prop = RNA_def_property(srna, "menu_shadow_width", PROP_INT, PROP_PIXEL);
-	RNA_def_property_ui_text(prop, "Menu Shadow Width", "Width of menu shadows, set to zero to disable");
-	RNA_def_property_range(prop, 0.0f, 24.0f);
-	RNA_def_property_update(prop, 0, "rna_userdef_update");
-	
 	prop = RNA_def_property(srna, "menu_shadow", PROP_FLOAT, PROP_COLOR_GAMMA);
 	RNA_def_property_float_sdna(prop, NULL, "menu_shadow");
 	RNA_def_property_array(prop, 4);
 	RNA_def_property_ui_text(prop, "Shadow Color", "Color of menu shadows");
 	RNA_def_property_update(prop, 0, "rna_userdef_update");
-	
+
+	prop = RNA_def_property(srna, "menu_shadow_width", PROP_INT, PROP_PIXEL);
+	RNA_def_property_ui_text(prop, "Menu Shadow Width", "Width of menu shadows, set to zero to disable");
+	RNA_def_property_range(prop, 0.0f, 24.0f);
+	RNA_def_property_update(prop, 0, "rna_userdef_update");
+
 	prop = RNA_def_property(srna, "icon_file", PROP_STRING, PROP_FILEPATH);
 	RNA_def_property_string_sdna(prop, NULL, "iconfile");
 	RNA_def_property_ui_text(prop, "Icon File", "");




More information about the Bf-blender-cvs mailing list