Assorted tiny UI tweaks

This commit is contained in:
2009-09-26 16:43:20 +00:00
parent 903d8231d9
commit 128dba3329
5 changed files with 58 additions and 56 deletions

View File

@@ -38,13 +38,13 @@ class DATA_PT_camera(DataButtonsPanel):
layout.itemR(cam, "type", expand=True) layout.itemR(cam, "type", expand=True)
row = layout.row(align=True) row = layout.row()
if cam.type == 'PERSP': if cam.type == 'PERSP':
row.itemR(cam, "lens_unit", text="")
if cam.lens_unit == 'MILLIMETERS': if cam.lens_unit == 'MILLIMETERS':
row.itemR(cam, "lens", text="Angle") row.itemR(cam, "lens", text="Angle")
elif cam.lens_unit == 'DEGREES': elif cam.lens_unit == 'DEGREES':
row.itemR(cam, "angle") row.itemR(cam, "angle")
row.itemR(cam, "lens_unit", text="")
elif cam.type == 'ORTHO': elif cam.type == 'ORTHO':
row.itemR(cam, "ortho_scale") row.itemR(cam, "ortho_scale")
@@ -86,11 +86,13 @@ class DATA_PT_camera_display(DataButtonsPanel):
col.itemR(cam, "show_name", text="Name") col.itemR(cam, "show_name", text="Name")
col = split.column() col = split.column()
col.itemR(cam, "draw_size", text="Size")
col.itemS()
col.itemR(cam, "show_passepartout", text="Passepartout") col.itemR(cam, "show_passepartout", text="Passepartout")
sub = col.column() sub = col.column()
sub.active = cam.show_passepartout sub.active = cam.show_passepartout
sub.itemR(cam, "passepartout_alpha", text="Alpha", slider=True) sub.itemR(cam, "passepartout_alpha", text="Alpha", slider=True)
col.itemR(cam, "draw_size", text="Size")
bpy.types.register(DATA_PT_context_camera) bpy.types.register(DATA_PT_context_camera)
bpy.types.register(DATA_PT_camera) bpy.types.register(DATA_PT_camera)

View File

@@ -1574,7 +1574,7 @@ static int screen_full_area_exec(bContext *C, wmOperator *op)
static void SCREEN_OT_screen_full_area(wmOperatorType *ot) static void SCREEN_OT_screen_full_area(wmOperatorType *ot)
{ {
ot->name = "Toggle Make Area Fullscreen"; ot->name = "Toggle Full Screen";
ot->idname = "SCREEN_OT_screen_full_area"; ot->idname = "SCREEN_OT_screen_full_area";
ot->exec= screen_full_area_exec; ot->exec= screen_full_area_exec;
@@ -2097,7 +2097,7 @@ static int region_foursplit_exec(bContext *C, wmOperator *op)
static void SCREEN_OT_region_foursplit(wmOperatorType *ot) static void SCREEN_OT_region_foursplit(wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name= "Split Region in 4 Parts"; ot->name= "Toggle Quad View";
ot->idname= "SCREEN_OT_region_foursplit"; ot->idname= "SCREEN_OT_region_foursplit";
/* api callbacks */ /* api callbacks */
@@ -2347,7 +2347,7 @@ static int screen_animation_play(bContext *C, wmOperator *op, wmEvent *event)
static void SCREEN_OT_animation_play(wmOperatorType *ot) static void SCREEN_OT_animation_play(wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name= "Animation player"; ot->name= "Play Animation";
ot->idname= "SCREEN_OT_animation_play"; ot->idname= "SCREEN_OT_animation_play";
/* api callbacks */ /* api callbacks */

View File

@@ -1119,15 +1119,15 @@ static void node_composit_buts_blur(uiLayout *layout, PointerRNA *ptr)
} }
uiItemR(col, NULL, 0, ptr, "relative", 0); uiItemR(col, NULL, 0, ptr, "relative", 0);
row= uiLayoutRow(col, 1); col= uiLayoutColumn(layout, 1);
if (RNA_boolean_get(ptr, "relative")== 1) { if (RNA_boolean_get(ptr, "relative")== 1) {
uiItemR(row, "X", 0, ptr, "factor_x", 0); uiItemR(col, "X", 0, ptr, "factor_x", 0);
uiItemR(row, "Y", 0, ptr, "factor_y", 0); uiItemR(col, "Y", 0, ptr, "factor_y", 0);
} }
else { else {
uiItemR(row, "X", 0, ptr, "sizex", 0); uiItemR(col, "X", 0, ptr, "sizex", 0);
uiItemR(row, "Y", 0, ptr, "sizey", 0); uiItemR(col, "Y", 0, ptr, "sizey", 0);
} }
} }
@@ -1140,10 +1140,8 @@ static void node_composit_buts_dblur(uiLayout *layout, PointerRNA *ptr)
col= uiLayoutColumn(layout, 1); col= uiLayoutColumn(layout, 1);
uiItemL(col, "Center:", 0); uiItemL(col, "Center:", 0);
uiItemR(col, "X", 0, ptr, "center_x", 0);
row= uiLayoutRow(col, 1); uiItemR(col, "Y", 0, ptr, "center_y", 0);
uiItemR(row, "X:", 0, ptr, "center_x", 0);
uiItemR(row, "Y", 0, ptr, "center_y", 0);
uiItemS(layout); uiItemS(layout);
@@ -1172,7 +1170,7 @@ static void node_composit_buts_defocus(uiLayout *layout, PointerRNA *ptr)
{ {
uiLayout *sub, *col; uiLayout *sub, *col;
col= uiLayoutColumn(layout, 1); col= uiLayoutColumn(layout, 0);
uiItemL(col, "Bokeh Type:", 0); uiItemL(col, "Bokeh Type:", 0);
uiItemR(col, "", 0, ptr, "bokeh", 0); uiItemR(col, "", 0, ptr, "bokeh", 0);
uiItemR(col, NULL, 0, ptr, "angle", 0); uiItemR(col, NULL, 0, ptr, "angle", 0);
@@ -1211,7 +1209,7 @@ static void node_composit_buts_glare(uiLayout *layout, PointerRNA *ptr)
uiItemR(layout, NULL, 0, ptr, "iterations", 0); uiItemR(layout, NULL, 0, ptr, "iterations", 0);
if (RNA_enum_get(ptr, "glare_type")!= 0) if (RNA_enum_get(ptr, "glare_type")!= 0)
uiItemR(layout, NULL, 0, ptr, "color_modulation", 0); uiItemR(layout, NULL, 0, ptr, "color_modulation", UI_ITEM_R_SLIDER);
} }
uiItemR(layout, NULL, 0, ptr, "mix", 0); uiItemR(layout, NULL, 0, ptr, "mix", 0);
@@ -1222,7 +1220,7 @@ static void node_composit_buts_glare(uiLayout *layout, PointerRNA *ptr)
uiItemR(layout, NULL, 0, ptr, "angle_offset", 0); uiItemR(layout, NULL, 0, ptr, "angle_offset", 0);
} }
if (RNA_enum_get(ptr, "glare_type")== 0 || RNA_enum_get(ptr, "glare_type")== 2) { if (RNA_enum_get(ptr, "glare_type")== 0 || RNA_enum_get(ptr, "glare_type")== 2) {
uiItemR(layout, NULL, 0, ptr, "fade", 0); uiItemR(layout, NULL, 0, ptr, "fade", UI_ITEM_R_SLIDER);
if (RNA_enum_get(ptr, "glare_type")== 0) if (RNA_enum_get(ptr, "glare_type")== 0)
uiItemR(layout, NULL, 0, ptr, "rotate_45", 0); uiItemR(layout, NULL, 0, ptr, "rotate_45", 0);
@@ -1237,18 +1235,18 @@ static void node_composit_buts_tonemap(uiLayout *layout, PointerRNA *ptr)
{ {
uiLayout *col; uiLayout *col;
col = uiLayoutColumn(layout, 1); col = uiLayoutColumn(layout, 0);
uiItemR(col, "", 0, ptr, "tonemap_type", 0); uiItemR(col, "", 0, ptr, "tonemap_type", 0);
if (RNA_enum_get(ptr, "tonemap_type")== 0) { if (RNA_enum_get(ptr, "tonemap_type")== 0) {
uiItemR(col, NULL, 0, ptr, "key", 0); uiItemR(col, NULL, 0, ptr, "key", UI_ITEM_R_SLIDER);
uiItemR(col, NULL, 0, ptr, "offset", 0); uiItemR(col, NULL, 0, ptr, "offset", 0);
uiItemR(col, NULL, 0, ptr, "gamma", 0); uiItemR(col, NULL, 0, ptr, "gamma", 0);
} }
else { else {
uiItemR(col, NULL, 0, ptr, "intensity", 0); uiItemR(col, NULL, 0, ptr, "intensity", 0);
uiItemR(col, NULL, 0, ptr, "contrast", 0); uiItemR(col, NULL, 0, ptr, "contrast", UI_ITEM_R_SLIDER);
uiItemR(col, NULL, 0, ptr, "adaptation", 0); uiItemR(col, NULL, 0, ptr, "adaptation", UI_ITEM_R_SLIDER);
uiItemR(col, NULL, 0, ptr, "correction", 0); uiItemR(col, NULL, 0, ptr, "correction", UI_ITEM_R_SLIDER);
} }
} }
@@ -1270,7 +1268,7 @@ static void node_composit_buts_vecblur(uiLayout *layout, PointerRNA *ptr)
{ {
uiLayout *col; uiLayout *col;
col= uiLayoutColumn(layout, 1); col= uiLayoutColumn(layout, 0);
uiItemR(col, NULL, 0, ptr, "samples", 0); uiItemR(col, NULL, 0, ptr, "samples", 0);
uiItemR(col, "Blur", 0, ptr, "factor", 0); uiItemR(col, "Blur", 0, ptr, "factor", 0);
@@ -1309,7 +1307,7 @@ static void node_composit_buts_splitviewer(uiLayout *layout, PointerRNA *ptr)
{ {
uiLayout *row, *col; uiLayout *row, *col;
col= uiLayoutColumn(layout, 1); col= uiLayoutColumn(layout, 0);
row= uiLayoutRow(col, 0); row= uiLayoutRow(col, 0);
uiItemR(row, NULL, 0, ptr, "axis", UI_ITEM_R_EXPAND); uiItemR(row, NULL, 0, ptr, "axis", UI_ITEM_R_EXPAND);
uiItemR(col, NULL, 0, ptr, "factor", 0); uiItemR(col, NULL, 0, ptr, "factor", 0);
@@ -1351,7 +1349,7 @@ static void node_composit_buts_hue_sat(uiLayout *layout, PointerRNA *ptr)
{ {
uiLayout *col; uiLayout *col;
col =uiLayoutColumn(layout, 1); col =uiLayoutColumn(layout, 0);
uiItemR(col, NULL, 0, ptr, "hue", UI_ITEM_R_SLIDER); uiItemR(col, NULL, 0, ptr, "hue", UI_ITEM_R_SLIDER);
uiItemR(col, NULL, 0, ptr, "sat", UI_ITEM_R_SLIDER); uiItemR(col, NULL, 0, ptr, "sat", UI_ITEM_R_SLIDER);
uiItemR(col, NULL, 0, ptr, "val", UI_ITEM_R_SLIDER); uiItemR(col, NULL, 0, ptr, "val", UI_ITEM_R_SLIDER);
@@ -1384,7 +1382,7 @@ static void node_composit_buts_color_spill(uiLayout *layout, PointerRNA *ptr)
{ {
uiLayout *row, *col; uiLayout *row, *col;
col =uiLayoutColumn(layout, 1); col =uiLayoutColumn(layout, 0);
uiItemR(col, NULL, 0, ptr, "factor", 0); uiItemR(col, NULL, 0, ptr, "factor", 0);
row= uiLayoutRow(col, 0); row= uiLayoutRow(col, 0);
uiItemR(row, NULL, 0, ptr, "channel", UI_ITEM_R_EXPAND); uiItemR(row, NULL, 0, ptr, "channel", UI_ITEM_R_EXPAND);
@@ -1392,35 +1390,37 @@ static void node_composit_buts_color_spill(uiLayout *layout, PointerRNA *ptr)
static void node_composit_buts_chroma_matte(uiLayout *layout, PointerRNA *ptr) static void node_composit_buts_chroma_matte(uiLayout *layout, PointerRNA *ptr)
{ {
uiBlock *block= uiLayoutFreeBlock(layout);
bNode *node= ptr->data;
rctf *butr= &node->butr;
short dx=(butr->xmax-butr->xmin)/2;
NodeChroma *c= node->storage;
uiBlockBeginAlign(block); uiLayout *col;
uiDefButF(block, NUMSLI, B_NODE_EXEC, "Acceptance ", col= uiLayoutColumn(layout, 0);
butr->xmin, butr->ymin+60, butr->xmax-butr->xmin, 20, uiItemR(col, NULL, 0, ptr, "acceptance", 0);
&c->t1, 1.0f, 80.0f, 100, 0, "Tolerance for colors to be considered a keying color"); uiItemR(col, NULL, 0, ptr, "cutoff", 0);
uiDefButF(block, NUMSLI, B_NODE_EXEC, "Cutoff ",
butr->xmin, butr->ymin+40, butr->xmax-butr->xmin, 20,
&c->t2, 0.0f, 30.0f, 100, 0, "Colors below this will be considered as exact matches for keying color");
uiDefButF(block, NUMSLI, B_NODE_EXEC, "Lift ", col= uiLayoutColumn(layout, 1);
butr->xmin, butr->ymin+20, dx, 20, uiItemR(col, NULL, 0, ptr, "lift", UI_ITEM_R_SLIDER);
&c->fsize, 0.0f, 1.0f, 100, 0, "Alpha Lift"); uiItemR(col, NULL, 0, ptr, "gain", UI_ITEM_R_SLIDER);
uiDefButF(block, NUMSLI, B_NODE_EXEC, "Gain ", uiItemR(col, NULL, 0, ptr, "shadow_adjust", UI_ITEM_R_SLIDER);
butr->xmin+dx, butr->ymin+20, dx, 20,
&c->fstrength, 0.0f, 1.0f, 100, 0, "Alpha Gain");
uiDefButF(block, NUMSLI, B_NODE_EXEC, "Shadow Adjust ", // uiBlock *block= uiLayoutFreeBlock(layout);
butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, // bNode *node= ptr->data;
&c->t3, 0.0f, 1.0f, 100, 0, "Adjusts the brightness of any shadows captured"); // rctf *butr= &node->butr;
uiBlockEndAlign(block); // short dx=(butr->xmax-butr->xmin)/2;
// NodeChroma *c= node->storage;
if(c->t2 > c->t1) // uiBlockBeginAlign(block);
c->t2=c->t1; //
// uiDefButF(block, NUMSLI, B_NODE_EXEC, "Acceptance ", butr->xmin, butr->ymin+60, butr->xmax-butr->xmin, 20, &c->t1, 1.0f, 80.0f, 100, 0, "Tolerance for colors to be considered a keying color");
// uiDefButF(block, NUMSLI, B_NODE_EXEC, "Cutoff ", butr->xmin, butr->ymin+40, butr->xmax-butr->xmin, 20, &c->t2, 0.0f, 30.0f, 100, 0, "Colors below this will be considered as exact matches for keying color");
//
// uiDefButF(block, NUMSLI, B_NODE_EXEC, "Lift ", butr->xmin, butr->ymin+20, dx, 20, &c->fsize, 0.0f, 1.0f, 100, 0, "Alpha Lift");
// uiDefButF(block, NUMSLI, B_NODE_EXEC, "Gain ", butr->xmin+dx, butr->ymin+20, dx, 20, &c->fstrength, 0.0f, 1.0f, 100, 0, "Alpha Gain");
//
// uiDefButF(block, NUMSLI, B_NODE_EXEC, "Shadow Adjust ", butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, &c->t3, 0.0f, 1.0f, 100, 0, "Adjusts the brightness of any shadows captured");
// uiBlockEndAlign(block);
//
// if(c->t2 > c->t1)
// c->t2=c->t1;
} }
static void node_composit_buts_color_matte(uiLayout *layout, PointerRNA *ptr) static void node_composit_buts_color_matte(uiLayout *layout, PointerRNA *ptr)

View File

@@ -1056,7 +1056,7 @@ static int viewhome_exec(bContext *C, wmOperator *op) /* was view3d_home() in 2.
void VIEW3D_OT_view_all(wmOperatorType *ot) void VIEW3D_OT_view_all(wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name= "View home"; ot->name= "View All";
ot->description = "View all objects in scene."; ot->description = "View all objects in scene.";
ot->idname= "VIEW3D_OT_view_all"; ot->idname= "VIEW3D_OT_view_all";
@@ -1195,7 +1195,7 @@ void VIEW3D_OT_view_center(wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name= "View center"; ot->name= "View Selected";
ot->description = "Move the view to the selection center."; ot->description = "Move the view to the selection center.";
ot->idname= "VIEW3D_OT_view_center"; ot->idname= "VIEW3D_OT_view_center";

View File

@@ -242,7 +242,7 @@ static void rna_def_image(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}}; {0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem prop_field_order_items[]= { static const EnumPropertyItem prop_field_order_items[]= {
{0, "EVEN", 0, "Even", "Even Fields first"}, {0, "EVEN", 0, "Even", "Even Fields first"},
{IMA_STD_FIELD, "Odd", 0, "Odd", "Odd Fields first"}, {IMA_STD_FIELD, "ODD", 0, "Odd", "Odd Fields first"},
{0, NULL, 0, NULL, NULL}}; {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Image", "ID"); srna= RNA_def_struct(brna, "Image", "ID");