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.
This commit is contained in:
William Reynish 2009-08-03 10:54:02 +00:00
parent acd4b4732b
commit 9ae77b0eff
4 changed files with 57 additions and 44 deletions

@ -170,6 +170,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel):
sub = col.column() sub = col.column()
sub.active = mat.face_texture sub.active = mat.face_texture
sub.itemR(mat, "face_texture_alpha") sub.itemR(mat, "face_texture_alpha")
col.itemS()
col.itemR(mat, "vertex_color_paint") col.itemR(mat, "vertex_color_paint")
col.itemR(mat, "vertex_color_light") col.itemR(mat, "vertex_color_light")
col.itemR(mat, "object_color") col.itemR(mat, "object_color")
@ -373,24 +374,28 @@ class MATERIAL_PT_raymir(MaterialButtonsPanel):
col = split.column() col = split.column()
col.itemR(raym, "reflect", text="Reflectivity", slider=True) col.itemR(raym, "reflect", text="Reflectivity", slider=True)
col.itemR(mat, "mirror_color", text="") col.itemR(mat, "mirror_color", text="")
col.itemR(raym, "fresnel") col.itemL(text="Fresnel:")
col.itemR(raym, "fresnel", text="Amount")
sub = col.column() sub = col.column()
sub.active = raym.fresnel > 0 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 = 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 = col.column()
sub.active = raym.gloss < 1 sub.active = raym.gloss < 1
sub.itemR(raym, "gloss_threshold", slider=True, text="Threshold") sub.itemR(raym, "gloss_threshold", slider=True, text="Threshold")
sub.itemR(raym, "gloss_samples", text="Samples") sub.itemR(raym, "gloss_samples", text="Samples")
sub.itemR(raym, "gloss_anisotropic", slider=True, text="Anisotropic") 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): class MATERIAL_PT_raytransp(MaterialButtonsPanel):
__label__= "Ray Transparency" __label__= "Ray Transparency"
@ -419,25 +424,31 @@ class MATERIAL_PT_raytransp(MaterialButtonsPanel):
col = split.column() col = split.column()
col.itemR(rayt, "ior") col.itemR(rayt, "ior")
col.itemR(rayt, "fresnel") col.itemR(rayt, "falloff")
sub = col.column() col.itemR(rayt, "limit")
sub.active = rayt.fresnel > 0
sub.itemR(rayt, "fresnel_fac", text="Fac", slider=True)
col = split.column() col = split.column()
col.itemR(rayt, "gloss", slider=True) 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="Blend", slider=True)
col = split.column()
col.itemL(text="Gloss:")
col.itemR(rayt, "gloss", text="Amount", slider=True)
sub = col.column() sub = col.column()
sub.active = rayt.gloss < 1 sub.active = rayt.gloss < 1
sub.itemR(rayt, "gloss_threshold", slider=True, text="Threshold") sub.itemR(rayt, "gloss_threshold", slider=True, text="Threshold")
sub.itemR(rayt, "gloss_samples", text="Samples") 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): class MATERIAL_PT_halo(MaterialButtonsPanel):
__label__= "Halo" __label__= "Halo"
COMPAT_ENGINES = set(['BLENDER_RENDER']) COMPAT_ENGINES = set(['BLENDER_RENDER'])

@ -94,17 +94,17 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
style->paneltitle.uifont_id= UIFONT_DEFAULT; style->paneltitle.uifont_id= UIFONT_DEFAULT;
style->paneltitle.points= 12; style->paneltitle.points= 12;
style->paneltitle.kerning= 1; style->paneltitle.kerning= 1;
style->paneltitle.shadow= 5; style->paneltitle.shadow= 1;
style->paneltitle.shadx= 2; style->paneltitle.shadx= 0;
style->paneltitle.shady= -2; style->paneltitle.shady= -1;
style->paneltitle.shadowalpha= 0.25f; style->paneltitle.shadowalpha= 0.15f;
style->paneltitle.shadowcolor= 0.0f; style->paneltitle.shadowcolor= 1.0f;
style->grouplabel.uifont_id= UIFONT_DEFAULT; style->grouplabel.uifont_id= UIFONT_DEFAULT;
style->grouplabel.points= 12; style->grouplabel.points= 12;
style->grouplabel.kerning= 1; style->grouplabel.kerning= 1;
style->grouplabel.shadow= 3; style->grouplabel.shadow= 3;
style->grouplabel.shadx= 1; style->grouplabel.shadx= 0;
style->grouplabel.shady= -1; style->grouplabel.shady= -1;
style->grouplabel.shadowalpha= 0.25f; style->grouplabel.shadowalpha= 0.25f;
@ -112,9 +112,9 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
style->widgetlabel.points= 11; style->widgetlabel.points= 11;
style->widgetlabel.kerning= 1; style->widgetlabel.kerning= 1;
style->widgetlabel.shadow= 3; style->widgetlabel.shadow= 3;
style->widgetlabel.shadx= 1; style->widgetlabel.shadx= 0;
style->widgetlabel.shady= -1; style->widgetlabel.shady= -1;
style->widgetlabel.shadowalpha= 0.3f; style->widgetlabel.shadowalpha= 0.15f;
style->widgetlabel.shadowcolor= 1.0f; style->widgetlabel.shadowcolor= 1.0f;
style->widget.uifont_id= UIFONT_DEFAULT; style->widget.uifont_id= UIFONT_DEFAULT;

@ -641,8 +641,8 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
PropertyRNA *prop; PropertyRNA *prop;
static EnumPropertyItem prop_fadeto_mir_items[] = { static EnumPropertyItem prop_fadeto_mir_items[] = {
{MA_RAYMIR_FADETOSKY, "FADE_TO_SKY", 0, "Fade to Sky Color", ""}, {MA_RAYMIR_FADETOSKY, "FADE_TO_SKY", 0, "Sky", ""},
{MA_RAYMIR_FADETOMAT, "FADE_TO_MATERIAL", 0, "Fade to Material Color", ""}, {MA_RAYMIR_FADETOMAT, "FADE_TO_MATERIAL", 0, "Material", ""},
{0, NULL, 0, NULL, NULL}}; {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "MaterialRaytraceMirror", NULL); srna= RNA_def_struct(brna, "MaterialRaytraceMirror", NULL);

@ -1178,19 +1178,19 @@ static void rna_def_texture(BlenderRNA *brna)
static EnumPropertyItem prop_type_items[] = { static EnumPropertyItem prop_type_items[] = {
{0, "NONE", 0, "None", ""}, {0, "NONE", 0, "None", ""},
{TEX_CLOUDS, "CLOUDS", 0, "Clouds", ""}, {TEX_PLUGIN, "PLUGIN", ICON_CONSTRAINT, "Plugin", ""},
{TEX_WOOD, "WOOD", 0, "Wood", ""}, {TEX_IMAGE, "IMAGE", ICON_RENDER_RESULT, "Image or Movie", ""},
{TEX_MARBLE, "MARBLE", 0, "Marble", ""}, {TEX_ENVMAP, "ENVIRONMENT_MAP", ICON_RENDER_RESULT, "Environment Map", ""},
{TEX_MAGIC, "MAGIC", 0, "Magic", ""}, {TEX_CLOUDS, "CLOUDS", ICON_TEXTURE, "Clouds", ""},
{TEX_BLEND, "BLEND", 0, "Blend", ""}, {TEX_WOOD, "WOOD", ICON_TEXTURE, "Wood", ""},
{TEX_STUCCI, "STUCCI", 0, "Stucci", ""}, {TEX_MARBLE, "MARBLE", ICON_TEXTURE, "Marble", ""},
{TEX_NOISE, "NOISE", 0, "Noise", ""}, {TEX_MAGIC, "MAGIC", ICON_TEXTURE, "Magic", ""},
{TEX_IMAGE, "IMAGE", 0, "Image or Movie", ""}, {TEX_BLEND, "BLEND", ICON_TEXTURE, "Blend", ""},
{TEX_PLUGIN, "PLUGIN", 0, "Plugin", ""}, {TEX_STUCCI, "STUCCI", ICON_TEXTURE, "Stucci", ""},
{TEX_ENVMAP, "ENVIRONMENT_MAP", 0, "Environment Map", ""}, {TEX_NOISE, "NOISE", ICON_TEXTURE, "Noise", ""},
{TEX_MUSGRAVE, "MUSGRAVE", 0, "Musgrave", ""}, {TEX_MUSGRAVE, "MUSGRAVE", ICON_TEXTURE, "Musgrave", ""},
{TEX_VORONOI, "VORONOI", 0, "Voronoi", ""}, {TEX_VORONOI, "VORONOI", ICON_TEXTURE, "Voronoi", ""},
{TEX_DISTNOISE, "DISTORTED_NOISE", 0, "Distorted Noise", ""}, {TEX_DISTNOISE, "DISTORTED_NOISE", ICON_TEXTURE, "Distorted Noise", ""},
{0, NULL, 0, NULL, NULL}}; {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Texture", "ID"); srna= RNA_def_struct(brna, "Texture", "ID");
@ -1200,6 +1200,8 @@ static void rna_def_texture(BlenderRNA *brna)
RNA_def_struct_refine_func(srna, "rna_Texture_refine"); RNA_def_struct_refine_func(srna, "rna_Texture_refine");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); 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_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Type", ""); RNA_def_property_ui_text(prop, "Type", "");
RNA_def_property_update(prop, NC_TEXTURE, NULL); RNA_def_property_update(prop, NC_TEXTURE, NULL);