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:
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface.c3
-rw-r--r--source/blender/editors/interface/interface_context_menu.c48
-rw-r--r--source/blender/editors/interface/interface_draw.c68
-rw-r--r--source/blender/editors/interface/interface_layout.c5
-rw-r--r--source/blender/editors/interface/interface_templates.c10
5 files changed, 93 insertions, 41 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 06b0634f6fb..a9079cdd021 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -1274,7 +1274,8 @@ static bool ui_but_event_property_operator_string(const bContext *C,
#if 0
else {
printf("ERROR in %s(): Couldn't get path for scene property - %s\n",
- __func__, RNA_property_identifier(prop));
+ __func__,
+ RNA_property_identifier(prop));
}
#endif
}
diff --git a/source/blender/editors/interface/interface_context_menu.c b/source/blender/editors/interface/interface_context_menu.c
index afa1b5c87e1..c8800f495ce 100644
--- a/source/blender/editors/interface/interface_context_menu.c
+++ b/source/blender/editors/interface/interface_context_menu.c
@@ -655,12 +655,16 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but)
#if 0 /* Disabled for now. */
ot = WM_operatortype_find("UI_OT_override_type_set_button", false);
uiItemFullO_ptr(
- layout, ot, "Overrides Type", ICON_NONE,
- NULL, WM_OP_INVOKE_DEFAULT, 0, &op_ptr);
+ layout, ot, "Overrides Type", ICON_NONE, NULL, WM_OP_INVOKE_DEFAULT, 0, &op_ptr);
RNA_boolean_set(&op_ptr, "all", true);
- uiItemFullO_ptr(
- layout, ot, "Single Override Type", ICON_NONE,
- NULL, WM_OP_INVOKE_DEFAULT, 0, &op_ptr);
+ uiItemFullO_ptr(layout,
+ ot,
+ "Single Override Type",
+ ICON_NONE,
+ NULL,
+ WM_OP_INVOKE_DEFAULT,
+ 0,
+ &op_ptr);
RNA_boolean_set(&op_ptr, "all", false);
#endif
uiItemBooleanO(layout,
@@ -678,9 +682,14 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but)
}
else {
#if 0 /* Disabled for now. */
- uiItemFullO(
- layout, "UI_OT_override_type_set_button", "Override Type", ICON_NONE,
- NULL, WM_OP_INVOKE_DEFAULT, 0, &op_ptr);
+ uiItemFullO(layout,
+ "UI_OT_override_type_set_button",
+ "Override Type",
+ ICON_NONE,
+ NULL,
+ WM_OP_INVOKE_DEFAULT,
+ 0,
+ &op_ptr);
RNA_boolean_set(&op_ptr, "all", false);
#endif
uiItemBooleanO(layout,
@@ -896,9 +905,15 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but)
if (kmi) {
if (ISKEYBOARD(kmi->type)) {
#if 0 /* would rather use a block but, but gets weirdly positioned... */
- uiDefBlockBut(
- block, menu_change_shortcut, but, "Change Shortcut",
- 0, 0, uiLayoutGetWidth(layout), UI_UNIT_Y, "");
+ uiDefBlockBut(block,
+ menu_change_shortcut,
+ but,
+ "Change Shortcut",
+ 0,
+ 0,
+ uiLayoutGetWidth(layout),
+ UI_UNIT_Y,
+ "");
#endif
but2 = uiDefIconTextBut(block,
@@ -1005,9 +1020,14 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but)
/* XXX inactive option, not for public! */
#if 0
- uiItemFullO(
- layout, "WM_OT_doc_edit", "Submit Description", ICON_NONE,
- NULL, WM_OP_INVOKE_DEFAULT, 0, &ptr_props);
+ uiItemFullO(layout,
+ "WM_OT_doc_edit",
+ "Submit Description",
+ ICON_NONE,
+ NULL,
+ WM_OP_INVOKE_DEFAULT,
+ 0,
+ &ptr_props);
RNA_string_set(&ptr_props, "doc_id", buf);
RNA_string_set(&ptr_props, "doc_new", RNA_property_description(but->rnaprop));
#endif
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 0517278a149..efc748d39a1 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -167,8 +167,13 @@ void UI_draw_roundbox_4fv(
{
#if 0
float vec[7][2] = {
- {0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293},
- {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805},
+ {0.195, 0.02},
+ {0.383, 0.067},
+ {0.55, 0.169},
+ {0.707, 0.293},
+ {0.831, 0.45},
+ {0.924, 0.617},
+ {0.98, 0.805},
};
int a;
@@ -270,13 +275,16 @@ void UI_draw_roundbox_4fv(
}
#if 0
-static void round_box_shade_col(uint attr, const float col1[3], float const col2[3], const float fac)
+static void round_box_shade_col(uint attr,
+ const float col1[3],
+ float const col2[3],
+ const float fac)
{
float col[4] = {
- fac * col1[0] + (1.0f - fac) * col2[0],
- fac * col1[1] + (1.0f - fac) * col2[1],
- fac * col1[2] + (1.0f - fac) * col2[2],
- 1.0f,
+ fac * col1[0] + (1.0f - fac) * col2[0],
+ fac * col1[1] + (1.0f - fac) * col2[1],
+ fac * col1[2] + (1.0f - fac) * col2[2],
+ 1.0f,
};
immAttr4fv(attr, col);
}
@@ -296,8 +304,13 @@ void UI_draw_roundbox_shade_x(bool filled,
{
#if 0
float vec[7][2] = {
- {0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293},
- {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805},
+ {0.195, 0.02},
+ {0.383, 0.067},
+ {0.55, 0.169},
+ {0.707, 0.293},
+ {0.831, 0.45},
+ {0.924, 0.617},
+ {0.98, 0.805},
};
const float div = maxy - miny;
const float idiv = 1.0f / div;
@@ -317,9 +330,9 @@ void UI_draw_roundbox_shade_x(bool filled,
}
/* 'shade' defines strength of shading */
- coltop[0] = min_ff(1.0f, col[0] + shadetop);
- coltop[1] = min_ff(1.0f, col[1] + shadetop);
- coltop[2] = min_ff(1.0f, col[2] + shadetop);
+ coltop[0] = min_ff(1.0f, col[0] + shadetop);
+ coltop[1] = min_ff(1.0f, col[1] + shadetop);
+ coltop[2] = min_ff(1.0f, col[2] + shadetop);
coldown[0] = max_ff(0.0f, col[0] + shadedown);
coldown[1] = max_ff(0.0f, col[1] + shadedown);
coldown[2] = max_ff(0.0f, col[2] + shadedown);
@@ -440,13 +453,24 @@ void UI_draw_roundbox_shade_x(bool filled,
#if 0 /* unused */
/* linear vertical shade within button or in outline */
/* view2d scrollers use it */
-void UI_draw_roundbox_shade_y(
- bool filled, float minx, float miny, float maxx, float maxy,
- float rad, float shadeleft, float shaderight, const float col[4])
+void UI_draw_roundbox_shade_y(bool filled,
+ float minx,
+ float miny,
+ float maxx,
+ float maxy,
+ float rad,
+ float shadeleft,
+ float shaderight,
+ const float col[4])
{
float vec[7][2] = {
- {0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293},
- {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805},
+ {0.195, 0.02},
+ {0.383, 0.067},
+ {0.55, 0.169},
+ {0.707, 0.293},
+ {0.831, 0.45},
+ {0.924, 0.617},
+ {0.98, 0.805},
};
const float div = maxx - minx;
const float idiv = 1.0f / div;
@@ -466,14 +490,13 @@ void UI_draw_roundbox_shade_y(
immBindBuiltinProgram(GPU_SHADER_2D_SMOOTH_COLOR);
/* 'shade' defines strength of shading */
- colLeft[0] = min_ff(1.0f, col[0] + shadeleft);
- colLeft[1] = min_ff(1.0f, col[1] + shadeleft);
- colLeft[2] = min_ff(1.0f, col[2] + shadeleft);
+ colLeft[0] = min_ff(1.0f, col[0] + shadeleft);
+ colLeft[1] = min_ff(1.0f, col[1] + shadeleft);
+ colLeft[2] = min_ff(1.0f, col[2] + shadeleft);
colRight[0] = max_ff(0.0f, col[0] + shaderight);
colRight[1] = max_ff(0.0f, col[1] + shaderight);
colRight[2] = max_ff(0.0f, col[2] + shaderight);
-
vert_count += (roundboxtype & UI_CNR_BOTTOM_RIGHT) ? 9 : 1;
vert_count += (roundboxtype & UI_CNR_TOP_RIGHT) ? 9 : 1;
vert_count += (roundboxtype & UI_CNR_TOP_LEFT) ? 9 : 1;
@@ -2461,7 +2484,8 @@ void ui_draw_dropshadow(
/* alpha ranges from 2 to 20 or so */
#if 0 /* Old Method (pre 2.8) */
float color[4] = {0.0f, 0.0f, 0.0f, calpha};
- UI_draw_roundbox_4fv(true, rct->xmin - a, rct->ymin - a, rct->xmax + a, rct->ymax - 10.0f + a, rad + a, color);
+ UI_draw_roundbox_4fv(
+ true, rct->xmin - a, rct->ymin - a, rct->xmax + a, rct->ymax - 10.0f + a, rad + a, color);
#endif
/* Compute final visibility to match old method result. */
/* TODO we could just find a better fit function inside the shader instead of this. */
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 8e463bf8447..9b54192c772 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -112,7 +112,7 @@ typedef enum uiItemType {
ITEM_LAYOUT_ROOT
#if 0
- TEMPLATE_COLUMN_FLOW,
+ TEMPLATE_COLUMN_FLOW,
TEMPLATE_SPLIT,
TEMPLATE_BOX,
@@ -1538,7 +1538,8 @@ void uiItemsFullEnumO(uiLayout *layout,
* introduction of GP editing modes)
*/
#if 0
- RNA_property_enum_items_gettexted_all(block->evil_C, &ptr, prop, &item_array, &totitem, &free);
+ RNA_property_enum_items_gettexted_all(
+ block->evil_C, &ptr, prop, &item_array, &totitem, &free);
#else
RNA_property_enum_items_gettexted(block->evil_C, &ptr, prop, &item_array, &totitem, &free);
#endif
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 6666991ad26..7e6b58ba850 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -2354,8 +2354,14 @@ void uiTemplateOperatorRedoProperties(uiLayout *layout, const bContext *C)
/* Disable for now, doesn't fit well in popover. */
#if 0
/* Repeat button with operator name as text. */
- uiItemFullO(layout, "SCREEN_OT_repeat_last", RNA_struct_ui_name(op->type->srna),
- ICON_NONE, NULL, WM_OP_INVOKE_DEFAULT, 0, NULL);
+ uiItemFullO(layout,
+ "SCREEN_OT_repeat_last",
+ RNA_struct_ui_name(op->type->srna),
+ ICON_NONE,
+ NULL,
+ WM_OP_INVOKE_DEFAULT,
+ 0,
+ NULL);
#endif
if (WM_operator_repeat_check(C, op)) {