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>2019-06-03 17:21:57 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-06-03 17:24:38 +0300
commit1f650c402d3b43eee7cb51c7d4f373ba82ac2116 (patch)
treeba2432fe9424ae545d3758d37ec8ebb0419a2ba5 /source/blender/makesrna/intern/rna_wm_api.c
parente3f2034e7b925bc7e31e65051842cf26d70a20bc (diff)
Cleanup: style, use braces in RNA
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_wm_api.c42
1 files changed, 28 insertions, 14 deletions
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c
index e4caeb2a5ae..1fea87df10c 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -228,17 +228,22 @@ static wmKeyMapItem *rna_KeyMap_item_new(wmKeyMap *km,
WM_operator_bl_idname(idname_bl, idname);
- if (shift)
+ if (shift) {
modifier |= KM_SHIFT;
- if (ctrl)
+ }
+ if (ctrl) {
modifier |= KM_CTRL;
- if (alt)
+ }
+ if (alt) {
modifier |= KM_ALT;
- if (oskey)
+ }
+ if (oskey) {
modifier |= KM_OSKEY;
+ }
- if (any)
+ if (any) {
modifier = KM_ANY;
+ }
/* create keymap item */
kmi = WM_keymap_add_item(km, idname_bl, type, value, modifier, keymodifier);
@@ -296,24 +301,31 @@ static wmKeyMapItem *rna_KeyMap_item_new_modal(wmKeyMap *km,
return NULL;
}
- if (shift)
+ if (shift) {
modifier |= KM_SHIFT;
- if (ctrl)
+ }
+ if (ctrl) {
modifier |= KM_CTRL;
- if (alt)
+ }
+ if (alt) {
modifier |= KM_ALT;
- if (oskey)
+ }
+ if (oskey) {
modifier |= KM_OSKEY;
+ }
- if (any)
+ if (any) {
modifier = KM_ANY;
+ }
/* not initialized yet, do delayed lookup */
- if (!km->modal_items)
+ if (!km->modal_items) {
return WM_modalkeymap_add_item_str(km, type, value, modifier, keymodifier, propvalue_str);
+ }
- if (RNA_enum_value_from_id(km->modal_items, propvalue_str, &propvalue) == 0)
+ if (RNA_enum_value_from_id(km->modal_items, propvalue_str, &propvalue) == 0) {
BKE_report(reports, RPT_WARNING, "Property value not in enumeration");
+ }
return WM_modalkeymap_add_item(km, type, value, modifier, keymodifier, propvalue);
}
@@ -382,10 +394,12 @@ static wmKeyMap *rna_keymap_find_modal(wmKeyConfig *UNUSED(keyconf), const char
{
wmOperatorType *ot = WM_operatortype_find(idname, 0);
- if (!ot)
+ if (!ot) {
return NULL;
- else
+ }
+ else {
return ot->modalkeymap;
+ }
}
static void rna_KeyMap_remove(wmKeyConfig *keyconfig, ReportList *reports, PointerRNA *keymap_ptr)