[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22171] branches/blender2.5/blender: UI tweaks

William Reynish william at reynish.com
Mon Aug 3 12:54:02 CEST 2009


Revision: 22171
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22171
Author:   billrey
Date:     2009-08-03 12:54:02 +0200 (Mon, 03 Aug 2009)

Log Message:
-----------
UI tweaks

-Removed shadows from most UI items. The shadow settings are unfortunately not really useful, because you can't set them for individual items. There was a lot of black text with black shadows, which really only makes the text look fuzzy. For shadows to improve clarity, they should be the opposite color of the text label, not the same color.

-Tweaked material layout, with clearer grouping in Ray Mirror and Ray Transparency panels.

-Added icons in the texture type menu to signify which textures are procedural and which ones are images, and plugins.

Modified Paths:
--------------
    branches/blender2.5/blender/release/ui/buttons_material.py
    branches/blender2.5/blender/source/blender/editors/interface/interface_style.c
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_material.c
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c

Modified: branches/blender2.5/blender/release/ui/buttons_material.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_material.py	2009-08-03 08:16:36 UTC (rev 22170)
+++ branches/blender2.5/blender/release/ui/buttons_material.py	2009-08-03 10:54:02 UTC (rev 22171)
@@ -170,6 +170,7 @@
 		sub = col.column()
 		sub.active = mat.face_texture
 		sub.itemR(mat, "face_texture_alpha")
+		col.itemS()
 		col.itemR(mat, "vertex_color_paint")
 		col.itemR(mat, "vertex_color_light")
 		col.itemR(mat, "object_color")
@@ -373,25 +374,29 @@
 		col = split.column()
 		col.itemR(raym, "reflect", text="Reflectivity", slider=True)
 		col.itemR(mat, "mirror_color", text="")
-		col.itemR(raym, "fresnel")
+		col.itemL(text="Fresnel:")
+		col.itemR(raym, "fresnel", text="Amount")
 		sub = col.column()
 		sub.active = raym.fresnel > 0
-		sub.itemR(raym, "fresnel_fac", text="Fac", slider=True)
+		sub.itemR(raym, "fresnel_fac", text="Blend", slider=True)
+		col.itemS()
+		col.itemS()
+		sub = col.split(percentage=0.4)
+		sub.itemL(text="Fade To:")
+		sub.itemR(raym, "fade_to", text="")
 		
 		col = split.column()
-		col.itemR(raym, "gloss", slider=True)
+		col.itemR(raym, "depth")
+		col.itemR(raym, "distance", text="Max Dist")
+		col.itemL(text="Gloss:")
+		col.itemR(raym, "gloss", text="Amount", slider=True)
 		sub = col.column()
 		sub.active = raym.gloss < 1
 		sub.itemR(raym, "gloss_threshold", slider=True, text="Threshold")
 		sub.itemR(raym, "gloss_samples", text="Samples")
 		sub.itemR(raym, "gloss_anisotropic", slider=True, text="Anisotropic")
 		
-		row = layout.row()
-		row.itemR(raym, "distance", text="Max Dist")
-		row.itemR(raym, "depth")
 		
-		layout.itemR(raym, "fade_to")
-		
 class MATERIAL_PT_raytransp(MaterialButtonsPanel):
 	__label__= "Ray Transparency"
 	__default_closed__ = True
@@ -419,25 +424,31 @@
 		
 		col = split.column()
 		col.itemR(rayt, "ior")
-		col.itemR(rayt, "fresnel")
+		col.itemR(rayt, "falloff")
+		col.itemR(rayt, "limit")
+		
+		col = split.column()
+		col.itemR(rayt, "depth")
+		col.itemR(rayt, "filter", slider=True)
+		col.itemR(rayt, "specular_opacity", slider=True, text="Spec Opacity")
+		
+		split = layout.split()
+		
+		col = split.column()
+		col.itemL(text="Fresnel:")
+		col.itemR(rayt, "fresnel", text="Amount")
 		sub = col.column()
 		sub.active = rayt.fresnel > 0
-		sub.itemR(rayt, "fresnel_fac", text="Fac", slider=True)
+		sub.itemR(rayt, "fresnel_fac", text="Blend", slider=True)
 		
 		col = split.column()
-		col.itemR(rayt, "gloss", slider=True)
+		col.itemL(text="Gloss:")
+		col.itemR(rayt, "gloss", text="Amount", slider=True)
 		sub = col.column()
 		sub.active = rayt.gloss < 1
 		sub.itemR(rayt, "gloss_threshold", slider=True, text="Threshold")
 		sub.itemR(rayt, "gloss_samples", text="Samples")
 		
-		flow = layout.column_flow()
-		flow.itemR(rayt, "filter", slider=True)
-		flow.itemR(rayt, "limit")
-		flow.itemR(rayt, "falloff")
-		flow.itemR(rayt, "specular_opacity", slider=True, text="Spec Opacity")
-		flow.itemR(rayt, "depth")
-		
 class MATERIAL_PT_halo(MaterialButtonsPanel):
 	__label__= "Halo"
 	COMPAT_ENGINES = set(['BLENDER_RENDER'])

Modified: branches/blender2.5/blender/source/blender/editors/interface/interface_style.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/interface/interface_style.c	2009-08-03 08:16:36 UTC (rev 22170)
+++ branches/blender2.5/blender/source/blender/editors/interface/interface_style.c	2009-08-03 10:54:02 UTC (rev 22171)
@@ -94,17 +94,17 @@
 	style->paneltitle.uifont_id= UIFONT_DEFAULT;
 	style->paneltitle.points= 12;
 	style->paneltitle.kerning= 1;
-	style->paneltitle.shadow= 5;
-	style->paneltitle.shadx= 2;
-	style->paneltitle.shady= -2;
-	style->paneltitle.shadowalpha= 0.25f;
-	style->paneltitle.shadowcolor= 0.0f;
+	style->paneltitle.shadow= 1;
+	style->paneltitle.shadx= 0;
+	style->paneltitle.shady= -1;
+	style->paneltitle.shadowalpha= 0.15f;
+	style->paneltitle.shadowcolor= 1.0f;
 	
 	style->grouplabel.uifont_id= UIFONT_DEFAULT;
 	style->grouplabel.points= 12;
 	style->grouplabel.kerning= 1;
 	style->grouplabel.shadow= 3;
-	style->grouplabel.shadx= 1;
+	style->grouplabel.shadx= 0;
 	style->grouplabel.shady= -1;
 	style->grouplabel.shadowalpha= 0.25f;
 	
@@ -112,9 +112,9 @@
 	style->widgetlabel.points= 11;
 	style->widgetlabel.kerning= 1;
 	style->widgetlabel.shadow= 3;
-	style->widgetlabel.shadx= 1;
+	style->widgetlabel.shadx= 0;
 	style->widgetlabel.shady= -1;
-	style->widgetlabel.shadowalpha= 0.3f;
+	style->widgetlabel.shadowalpha= 0.15f;
 	style->widgetlabel.shadowcolor= 1.0f;
 	
 	style->widget.uifont_id= UIFONT_DEFAULT;

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_material.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_material.c	2009-08-03 08:16:36 UTC (rev 22170)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_material.c	2009-08-03 10:54:02 UTC (rev 22171)
@@ -641,8 +641,8 @@
 	PropertyRNA *prop;
 
 	static EnumPropertyItem prop_fadeto_mir_items[] = {
-		{MA_RAYMIR_FADETOSKY, "FADE_TO_SKY", 0, "Fade to Sky Color", ""},
-		{MA_RAYMIR_FADETOMAT, "FADE_TO_MATERIAL", 0, "Fade to Material Color", ""},
+		{MA_RAYMIR_FADETOSKY, "FADE_TO_SKY", 0, "Sky", ""},
+		{MA_RAYMIR_FADETOMAT, "FADE_TO_MATERIAL", 0, "Material", ""},
 		{0, NULL, 0, NULL, NULL}};
 
 	srna= RNA_def_struct(brna, "MaterialRaytraceMirror", NULL);

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c	2009-08-03 08:16:36 UTC (rev 22170)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c	2009-08-03 10:54:02 UTC (rev 22171)
@@ -1178,19 +1178,19 @@
 
 	static EnumPropertyItem prop_type_items[] = {
 		{0, "NONE", 0, "None", ""},
-		{TEX_CLOUDS, "CLOUDS", 0, "Clouds", ""},
-		{TEX_WOOD, "WOOD", 0, "Wood", ""},
-		{TEX_MARBLE, "MARBLE", 0, "Marble", ""},
-		{TEX_MAGIC, "MAGIC", 0, "Magic", ""},
-		{TEX_BLEND, "BLEND", 0, "Blend", ""},
-		{TEX_STUCCI, "STUCCI", 0, "Stucci", ""},
-		{TEX_NOISE, "NOISE", 0, "Noise", ""},
-		{TEX_IMAGE, "IMAGE", 0, "Image or Movie", ""},
-		{TEX_PLUGIN, "PLUGIN", 0, "Plugin", ""},
-		{TEX_ENVMAP, "ENVIRONMENT_MAP", 0, "Environment Map", ""},
-		{TEX_MUSGRAVE, "MUSGRAVE", 0, "Musgrave", ""},
-		{TEX_VORONOI, "VORONOI", 0, "Voronoi", ""},
-		{TEX_DISTNOISE, "DISTORTED_NOISE", 0, "Distorted Noise", ""},
+		{TEX_PLUGIN, "PLUGIN", ICON_CONSTRAINT, "Plugin", ""},
+		{TEX_IMAGE, "IMAGE", ICON_RENDER_RESULT, "Image or Movie", ""},
+		{TEX_ENVMAP, "ENVIRONMENT_MAP", ICON_RENDER_RESULT, "Environment Map", ""},
+		{TEX_CLOUDS, "CLOUDS", ICON_TEXTURE, "Clouds", ""},
+		{TEX_WOOD, "WOOD", ICON_TEXTURE, "Wood", ""},
+		{TEX_MARBLE, "MARBLE", ICON_TEXTURE, "Marble", ""},
+		{TEX_MAGIC, "MAGIC", ICON_TEXTURE, "Magic", ""},
+		{TEX_BLEND, "BLEND", ICON_TEXTURE, "Blend", ""},
+		{TEX_STUCCI, "STUCCI", ICON_TEXTURE, "Stucci", ""},
+		{TEX_NOISE, "NOISE", ICON_TEXTURE, "Noise", ""},
+		{TEX_MUSGRAVE, "MUSGRAVE", ICON_TEXTURE, "Musgrave", ""},
+		{TEX_VORONOI, "VORONOI", ICON_TEXTURE, "Voronoi", ""},
+		{TEX_DISTNOISE, "DISTORTED_NOISE", ICON_TEXTURE, "Distorted Noise", ""},
 		{0, NULL, 0, NULL, NULL}};
 
 	srna= RNA_def_struct(brna, "Texture", "ID");
@@ -1200,10 +1200,12 @@
 	RNA_def_struct_refine_func(srna, "rna_Texture_refine");
 
 	prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+	//RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+	RNA_def_property_enum_sdna(prop, NULL, "type");
 	RNA_def_property_enum_items(prop, prop_type_items);
 	RNA_def_property_ui_text(prop, "Type", "");
 	RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
+	
 	prop= RNA_def_property(srna, "use_color_ramp", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_COLORBAND);
 	RNA_def_property_boolean_funcs(prop, NULL, "rna_Texture_use_color_ramp_set");





More information about the Bf-blender-cvs mailing list