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:
authorCampbell Barton <ideasman42@gmail.com>2018-07-01 21:15:21 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-01 21:15:21 +0300
commit37994e0af2cf6f0d7ed8a072eb765dfb022ceaef (patch)
tree07ea3a893aa2dc586f22a46681aa77c430f63317 /source/blender/editors/interface/interface_ops.c
parent192e5d65a746798f6bddf897570ff8aba55c9c5a (diff)
parent26c5a1c301d3d554c4b1244b219f9883249f382d (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/interface/interface_ops.c')
-rw-r--r--source/blender/editors/interface/interface_ops.c35
1 files changed, 21 insertions, 14 deletions
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index 571c1327f78..0f08f8c7ed9 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -347,7 +347,7 @@ enum {
static EnumPropertyItem override_type_items[] = {
{UIOverride_Type_NOOP, "NOOP", 0, "NoOp",
- "'No-Operation', place holder preventing automatic override to ever affect the property"},
+ "'No-Operation', place holder preventing automatic override to ever affect the property"},
{UIOverride_Type_Replace, "REPLACE", 0, "Replace", "Completely replace value from linked data by local one"},
{UIOverride_Type_Difference, "DIFFERENCE", 0, "Difference", "Store difference to linked data value"},
{UIOverride_Type_Factor, "FACTOR", 0, "Factor", "Store factor to linked data value (useful e.g. for scale)"},
@@ -408,7 +408,7 @@ static int override_type_set_button_exec(bContext *C, wmOperator *op)
}
IDOverrideStaticPropertyOperation *opop = RNA_property_override_property_operation_get(
- &ptr, prop, operation, index, true, NULL, &created);
+ &ptr, prop, operation, index, true, NULL, &created);
if (!created) {
opop->operation = operation;
}
@@ -443,8 +443,9 @@ static void UI_OT_override_type_set_button(wmOperatorType *ot)
/* properties */
RNA_def_boolean(ot->srna, "all", 1, "All", "Reset to default values all elements of the array");
- ot->prop = RNA_def_enum(ot->srna, "type", override_type_items, UIOverride_Type_Replace,
- "Type", "Type of override operation");
+ ot->prop = RNA_def_enum(
+ ot->srna, "type", override_type_items, UIOverride_Type_Replace,
+ "Type", "Type of override operation");
/* TODO: add itemf callback, not all options are available for all data types... */
}
@@ -493,7 +494,7 @@ static int override_remove_button_exec(bContext *C, wmOperator *op)
bool is_strict_find;
/* Remove override operation for given item, add singular operations for the other items as needed. */
IDOverrideStaticPropertyOperation *opop = BKE_override_static_property_operation_find(
- oprop, NULL, NULL, index, index, false, &is_strict_find);
+ oprop, NULL, NULL, index, index, false, &is_strict_find);
BLI_assert(opop != NULL);
if (!is_strict_find) {
/* No specific override operation, we have to get generic one,
@@ -1024,9 +1025,10 @@ static int editsource_exec(bContext *C, wmOperator *op)
if (but_store) {
if (but_store->py_dbg_ln != -1) {
- ret = editsource_text_edit(C, op,
- but_store->py_dbg_fn,
- but_store->py_dbg_ln);
+ ret = editsource_text_edit(
+ C, op,
+ but_store->py_dbg_fn,
+ but_store->py_dbg_ln);
}
else {
BKE_report(op->reports, RPT_ERROR, "Active button is not from a script, cannot edit source");
@@ -1134,14 +1136,18 @@ static int edittranslation_exec(bContext *C, wmOperator *op)
uiStringInfo rna_ctxt = {BUT_GET_RNA_LABEL_CONTEXT, NULL};
if (!BLI_is_dir(root)) {
- BKE_report(op->reports, RPT_ERROR, "Please set your User Preferences' 'Translation Branches "
- "Directory' path to a valid directory");
+ BKE_report(
+ op->reports, RPT_ERROR,
+ "Please set your User Preferences' 'Translation Branches "
+ "Directory' path to a valid directory");
return OPERATOR_CANCELLED;
}
ot = WM_operatortype_find(EDTSRC_I18N_OP_NAME, 0);
if (ot == NULL) {
- BKE_reportf(op->reports, RPT_ERROR, "Could not find operator '%s'! Please enable ui_translate add-on "
- "in the User Preferences", EDTSRC_I18N_OP_NAME);
+ BKE_reportf(
+ op->reports, RPT_ERROR,
+ "Could not find operator '%s'! Please enable ui_translate add-on "
+ "in the User Preferences", EDTSRC_I18N_OP_NAME);
return OPERATOR_CANCELLED;
}
/* Try to find a valid po file for current language... */
@@ -1152,8 +1158,9 @@ static int edittranslation_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- UI_but_string_info_get(C, but, &but_label, &rna_label, &enum_label, &but_tip, &rna_tip, &enum_tip,
- &rna_struct, &rna_prop, &rna_enum, &rna_ctxt, NULL);
+ UI_but_string_info_get(
+ C, but, &but_label, &rna_label, &enum_label, &but_tip, &rna_tip, &enum_tip,
+ &rna_struct, &rna_prop, &rna_enum, &rna_ctxt, NULL);
WM_operator_properties_create_ptr(&ptr, ot);
RNA_string_set(&ptr, "lang", uilng);