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_key.c
parente3f2034e7b925bc7e31e65051842cf26d70a20bc (diff)
Cleanup: style, use braces in RNA
Diffstat (limited to 'source/blender/makesrna/intern/rna_key.c')
-rw-r--r--source/blender/makesrna/intern/rna_key.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index c5997f27dc2..8ab2127d898 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -288,8 +288,9 @@ PointerRNA rna_object_shapekey_index_get(ID *id, int value)
KeyBlock *kb = NULL;
PointerRNA ptr;
- if (key && value < key->totkey)
+ if (key && value < key->totkey) {
kb = BLI_findlink(&key->block, value);
+ }
RNA_pointer_create(id, &RNA_ShapeKey, kb, &ptr);
@@ -302,8 +303,9 @@ int rna_object_shapekey_index_set(ID *id, PointerRNA value, int current)
if (key) {
int a = BLI_findindex(&key->block, value.data);
- if (a != -1)
+ if (a != -1) {
return a;
+ }
}
return current;
@@ -675,10 +677,12 @@ static char *rna_ShapeKey_path(PointerRNA *ptr)
BLI_strescape(name_esc, kb->name, sizeof(name_esc));
- if ((id) && (GS(id->name) != ID_KE))
+ if ((id) && (GS(id->name) != ID_KE)) {
return BLI_sprintfN("shape_keys.key_blocks[\"%s\"]", name_esc);
- else
+ }
+ else {
return BLI_sprintfN("key_blocks[\"%s\"]", name_esc);
+ }
}
static void rna_Key_update_data(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
@@ -699,8 +703,9 @@ static KeyBlock *rna_ShapeKeyData_find_keyblock(Key *key, float *point)
KeyBlock *kb;
/* sanity checks */
- if (ELEM(NULL, key, point))
+ if (ELEM(NULL, key, point)) {
return NULL;
+ }
/* we'll need to manually search through the keyblocks and check
* if the point is somewhere in the middle of each block's data
@@ -771,13 +776,16 @@ static char *rna_ShapeKeyPoint_path(PointerRNA *ptr)
BLI_strescape(name_esc_kb, kb->name, sizeof(name_esc_kb));
- if (GS(id->name) == ID_KE)
+ if (GS(id->name) == ID_KE) {
return BLI_sprintfN("key_blocks[\"%s\"].data[%d]", name_esc_kb, index);
- else
+ }
+ else {
return BLI_sprintfN("shape_keys.key_blocks[\"%s\"].data[%d]", name_esc_kb, index);
+ }
}
- else
+ else {
return NULL; /* XXX: there's really no way to resolve this... */
+ }
}
#else