Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2009-05-20 17:56:22 +0400
committerMatt Ebb <matt@mke3.net>2009-05-20 17:56:22 +0400
commit2e91f1b1555b54784eda5d133d8a3b594d0b8797 (patch)
treeab48c8791ff115246d1baf5c06bf30b9c268011d
parenta47c673b5525fde6484d4392160fbb5101f2c108 (diff)
Assorted UI tweaks/cleanups
-rw-r--r--release/ui/buttons_data_armature.py8
-rw-r--r--release/ui/buttons_data_camera.py2
-rw-r--r--release/ui/buttons_scene.py47
-rw-r--r--release/ui/buttons_world.py96
-rw-r--r--source/blender/editors/interface/interface.c2
-rw-r--r--source/blender/editors/interface/interface_style.c2
-rw-r--r--source/blender/editors/interface/interface_widgets.c9
-rw-r--r--source/blender/makesrna/intern/rna_world.c5
8 files changed, 80 insertions, 91 deletions
diff --git a/release/ui/buttons_data_armature.py b/release/ui/buttons_data_armature.py
index 5a54b4dcc8e..2982ad52a6d 100644
--- a/release/ui/buttons_data_armature.py
+++ b/release/ui/buttons_data_armature.py
@@ -14,7 +14,7 @@ class DATA_PT_skeleton(DataButtonsPanel):
__label__ = "Skeleton"
def draw(self, context):
- arm = context.main.armatures[0]
+ arm = context.active_object.data
layout = self.layout
row = layout.row()
@@ -44,7 +44,7 @@ class DATA_PT_display(DataButtonsPanel):
__label__ = "Display"
def draw(self, context):
- arm = context.main.armatures[0]
+ arm = context.active_object.data
layout = self.layout
split = layout.split()
@@ -65,7 +65,7 @@ class DATA_PT_paths(DataButtonsPanel):
__label__ = "Paths"
def draw(self, context):
- arm = context.main.armatures[0]
+ arm = context.active_object.data
layout = self.layout
split = layout.split()
@@ -95,7 +95,7 @@ class DATA_PT_ghost(DataButtonsPanel):
__label__ = "Ghost"
def draw(self, context):
- arm = context.main.armatures[0]
+ arm = context.active_object.data
layout = self.layout
split = layout.split()
diff --git a/release/ui/buttons_data_camera.py b/release/ui/buttons_data_camera.py
index 3bca07c319d..bb87bdf3d06 100644
--- a/release/ui/buttons_data_camera.py
+++ b/release/ui/buttons_data_camera.py
@@ -72,7 +72,7 @@ class DATA_PT_cameradisplay(DataButtonsPanel):
sub = split.column()
sub.itemR(cam, "show_passepartout", text="Passepartout")
if (cam.show_passepartout):
- sub.itemR(cam, "passepartout_alpha", text="Alpha")
+ sub.itemR(cam, "passepartout_alpha", text="Alpha", slider="True")
sub.itemR(cam, "draw_size", text="Size")
bpy.types.register(DATA_PT_cameralens)
diff --git a/release/ui/buttons_scene.py b/release/ui/buttons_scene.py
index bc9813eb166..b5cba23f989 100644
--- a/release/ui/buttons_scene.py
+++ b/release/ui/buttons_scene.py
@@ -103,23 +103,9 @@ class RENDER_PT_render(RenderButtonsPanel):
rd = scene.render_data
row = layout.row()
- row.itemO("SCREEN_OT_render", text="RENDER", icon=0) # ICON_SCENE
- row.item_booleanO("SCREEN_OT_render", "anim", True, text="ANIM", icon=0)
+ row.itemO("SCREEN_OT_render", text="Render Still")
+ row.item_booleanO("SCREEN_OT_render", "anim", True, text="Render Animation")
- split = layout.split()
-
- sub = split.column(align=True)
- sub.itemR(scene, "start_frame", text="Start")
- sub.itemR(scene, "end_frame", text="End")
-
- sub = split.column(align=True)
- sub.itemR(rd, "fps")
- sub.itemR(rd, "fps_base",text="/")
-
- sub = split.column(align=True)
- sub.itemR(scene, "current_frame", text="Frame")
- sub.itemR(scene, "frame_step", text="Step")
-
row = layout.row()
row.itemR(rd, "do_composite")
row.itemR(rd, "do_sequence")
@@ -156,27 +142,32 @@ class RENDER_PT_dimensions(RenderButtonsPanel):
rd = scene.render_data
- row = layout.row()
- row.itemL(text="Resolution:")
- row.itemL(text="Aspect Ratio:")
-
split = layout.split()
-
+
col = split.column(align=True)
+ col.itemL(text="Resolution:")
col.itemR(rd, "resolution_x", text="X")
col.itemR(rd, "resolution_y", text="Y")
col.itemR(rd, "resolution_percentage", text="")
- col = split.column()
- sub = col.column(align=True)
- sub.itemR(rd, "pixel_aspect_x", text="X")
- sub.itemR(rd, "pixel_aspect_y", text="Y")
+ col.itemL(text="Aspect Ratio:")
+ col.itemR(rd, "pixel_aspect_x", text="X")
+ col.itemR(rd, "pixel_aspect_y", text="Y")
- sub = col.column()
- sub.itemR(rd, "border", text="Border")
+ col.itemR(rd, "border", text="Border")
if rd.border:
- sub.itemR(rd, "crop_to_border")
+ col.itemR(rd, "crop_to_border")
+ col = split.column(align=True)
+ col.itemL(text="Frame Range:")
+ col.itemR(scene, "start_frame", text="Start")
+ col.itemR(scene, "end_frame", text="End")
+ col.itemR(scene, "frame_step", text="Step")
+
+ col.itemL(text="Frame Rate:")
+ col.itemR(rd, "fps")
+ col.itemR(rd, "fps_base",text="/")
+
bpy.types.register(RENDER_PT_render)
bpy.types.register(RENDER_PT_dimensions)
bpy.types.register(RENDER_PT_antialiasing)
diff --git a/release/ui/buttons_world.py b/release/ui/buttons_world.py
index 124c9d3d766..f8ccf4f329f 100644
--- a/release/ui/buttons_world.py
+++ b/release/ui/buttons_world.py
@@ -46,16 +46,15 @@ class WORLD_PT_mist(WorldButtonsPanel):
row = layout.row()
row.itemR(world.mist, "enabled", text="Enable")
- if (world.mist.enabled):
-
- flow = layout.column_flow()
- flow.itemR(world.mist, "start")
- flow.itemR(world.mist, "depth")
- flow.itemR(world.mist, "height")
- flow.itemR(world.mist, "intensity")
- col = layout.column()
- col.itemL(text="Fallof:")
- col.row().itemR(world.mist, "falloff", expand=True)
+
+ flow = layout.column_flow()
+ flow.itemR(world.mist, "start")
+ flow.itemR(world.mist, "depth")
+ flow.itemR(world.mist, "height")
+ flow.itemR(world.mist, "intensity")
+ col = layout.column()
+ col.itemL(text="Fallof:")
+ col.row().itemR(world.mist, "falloff", expand=True)
class WORLD_PT_stars(WorldButtonsPanel):
__label__ = "Stars"
@@ -66,13 +65,12 @@ class WORLD_PT_stars(WorldButtonsPanel):
row = layout.row()
row.itemR(world.stars, "enabled", text="Enable")
- if (world.stars.enabled):
- flow = layout.column_flow()
- flow.itemR(world.stars, "size")
- flow.itemR(world.stars, "min_distance", text="MinDist")
- flow.itemR(world.stars, "average_separation", text="StarDist")
- flow.itemR(world.stars, "color_randomization", text="Colnoise")
+ flow = layout.column_flow()
+ flow.itemR(world.stars, "size")
+ flow.itemR(world.stars, "min_distance", text="Min. Dist")
+ flow.itemR(world.stars, "average_separation", text="Separation")
+ flow.itemR(world.stars, "color_randomization", text="Random:")
class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
__label__ = "Ambient Occlusion"
@@ -85,51 +83,49 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
row = layout.row()
row.itemR(ao, "enabled", text="Enable")
- if (ao.enabled):
-
+ row = layout.row()
+ row.itemR(ao, "gather_method", expand=True)
+
+ if ao.gather_method == 'RAYTRACE':
row = layout.row()
- row.itemR(ao, "gather_method", expand=True)
+ row.itemR(ao, "samples")
+ row.itemR(ao, "distance")
- if ao.gather_method == 'RAYTRACE':
- row = layout.row()
- row.itemR(ao, "samples")
- row.itemR(ao, "distance")
-
- row = layout.row()
- row.itemR(ao, "sample_method")
- if ao.sample_method == 'ADAPTIVE_QMC':
- row = layout.row()
- row.itemR(ao, "threshold")
- row.itemR(ao, "adapt_to_speed")
-
- if ao.sample_method == 'CONSTANT_JITTERED':
- row = layout.row()
- row.itemR(ao, "bias")
-
- if ao.gather_method == 'APPROXIMATE':
+ row = layout.row()
+ row.itemR(ao, "sample_method")
+ if ao.sample_method == 'ADAPTIVE_QMC':
row = layout.row()
- row.itemR(ao, "passes")
- row.itemR(ao, "error_tolerance")
+ row.itemR(ao, "threshold")
+ row.itemR(ao, "adapt_to_speed")
+ if ao.sample_method == 'CONSTANT_JITTERED':
row = layout.row()
- row.itemR(ao, "correction")
- row.itemR(ao, "pixel_cache")
-
+ row.itemR(ao, "bias")
+
+ if ao.gather_method == 'APPROXIMATE':
row = layout.row()
- row.itemS()
-
+ row.itemR(ao, "passes")
+ row.itemR(ao, "error_tolerance", text="Error")
+
row = layout.row()
- row.itemR(ao, "falloff")
- row.itemR(ao, "strength")
+ row.itemR(ao, "correction")
+ row.itemR(ao, "pixel_cache")
+
+ row = layout.row()
+ row.itemS()
- col = layout.column()
- col.row().itemR(ao, "blend_mode", expand=True)
- col.row().itemR(ao, "color", expand=True)
- col.itemR(ao, "energy")
+ row = layout.row()
+ row.itemR(ao, "falloff")
+ row.itemR(ao, "strength")
+
+ col = layout.column()
+ col.row().itemR(ao, "blend_mode", expand=True)
+ col.row().itemR(ao, "color", expand=True)
+ col.itemR(ao, "energy")
bpy.types.register(WORLD_PT_world)
+bpy.types.register(WORLD_PT_ambient_occlusion)
bpy.types.register(WORLD_PT_mist)
bpy.types.register(WORLD_PT_stars)
-bpy.types.register(WORLD_PT_ambient_occlusion)
bpy.types.register(WORLD_PT_color_correction)
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index e937ab0c50a..2bcc1a03923 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -1986,7 +1986,7 @@ void uiBlockEndAlign(uiBlock *block)
int ui_but_can_align(uiBut *but)
{
- return !ELEM(but->type, LABEL, ROUNDBOX);
+ return !ELEM3(but->type, LABEL, ROUNDBOX, TOG);
}
static void ui_block_do_align_but(uiBlock *block, uiBut *first, int nr)
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index f789f81e0d3..34f4d7294ee 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -90,7 +90,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
BLI_strncpy(style->name, name, MAX_STYLE_NAME);
style->paneltitle.uifont_id= UIFONT_DEFAULT;
- style->paneltitle.points= 14;
+ style->paneltitle.points= 13;
style->paneltitle.shadow= 5;
style->paneltitle.shadx= 2;
style->paneltitle.shady= -2;
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 7bc63c5c676..18b39518ee6 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -1378,6 +1378,7 @@ static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int s
double value;
float offs, fac;
char outline[3];
+ int slideralign;
widget_init(&wtb);
widget_init(&wtb1);
@@ -1395,10 +1396,12 @@ static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int s
rect1= *rect;
value= ui_get_but_val(but);
- fac= (value-but->softmin)*(rect1.xmax - rect1.xmin - 2.0f*offs)/(but->softmax - but->softmin);
+ fac= (value-but->softmin)*(rect1.xmax - rect1.xmin - offs)/(but->softmax - but->softmin);
- rect1.xmax= rect1.xmin + fac + 2.0f*offs;
- round_box_edges(&wtb1, roundboxalign, &rect1, offs);
+ rect1.xmax= rect1.xmin + fac + offs;
+ slideralign = roundboxalign;
+ slideralign &= ~(2|4);
+ round_box_edges(&wtb1, slideralign, &rect1, offs);
VECCOPY(outline, wcol->outline);
VECCOPY(wcol->outline, wcol->item);
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index 7a9638af314..eb764e4bc2d 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -156,17 +156,15 @@ static void rna_def_ambient_occlusion(BlenderRNA *brna)
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aodist");
- RNA_def_property_range(prop, 0.001, 5000);
RNA_def_property_ui_text(prop, "Distance", "Length of rays, defines how far away other faces give occlusion effect.");
prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aodistfac");
- RNA_def_property_range(prop, 0.00001, 10);
RNA_def_property_ui_text(prop, "Strength", "Distance attenuation factor, the higher, the 'shorter' the shadows.");
prop= RNA_def_property(srna, "energy", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aoenergy");
- RNA_def_property_range(prop, 0.01, 3);
+ RNA_def_property_ui_range(prop, 0, 10, 0.1, 3);
RNA_def_property_ui_text(prop, "Energy", "Global energy scale for ambient occlusion.");
prop= RNA_def_property(srna, "bias", PROP_FLOAT, PROP_NONE);
@@ -192,6 +190,7 @@ static void rna_def_ambient_occlusion(BlenderRNA *brna)
prop= RNA_def_property(srna, "correction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_approx_correction");
RNA_def_property_range(prop, 0, 1);
+ RNA_def_property_ui_range(prop, 0, 1, 0.1, 2);
RNA_def_property_ui_text(prop, "Correction", "Ad-hoc correction for over-occlusion due to the approximation (for Approximate).");
prop= RNA_def_property(srna, "falloff", PROP_BOOLEAN, PROP_NONE);