diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-22 02:19:45 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-22 12:48:16 +0300 |
commit | 620b960d3d8cfd90b9f0df6ba3671c33eccb8309 (patch) | |
tree | 64f69db4bf9d44f0a32d1c92b0714bf2dc98ff2d /source/blender/editors/armature/pose_edit.c | |
parent | bba60bb564cf5a16cfcac744d4ba82cf8eba3da9 (diff) |
Cleanup: style, use braces for editors
Diffstat (limited to 'source/blender/editors/armature/pose_edit.c')
-rw-r--r-- | source/blender/editors/armature/pose_edit.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index 0a886074f42..cf64210ebdb 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -263,8 +263,9 @@ static int pose_calculate_paths_invoke(bContext *C, wmOperator *op, const wmEven { Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C)); - if (ELEM(NULL, ob, ob->pose)) + if (ELEM(NULL, ob, ob->pose)) { return OPERATOR_CANCELLED; + } /* set default settings from existing/stored settings */ { @@ -291,8 +292,9 @@ static int pose_calculate_paths_exec(bContext *C, wmOperator *op) Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C)); Scene *scene = CTX_data_scene(C); - if (ELEM(NULL, ob, ob->pose)) + if (ELEM(NULL, ob, ob->pose)) { return OPERATOR_CANCELLED; + } /* grab baking settings from operator settings */ { @@ -391,8 +393,9 @@ static int pose_update_paths_exec(bContext *C, wmOperator *UNUSED(op)) Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C)); Scene *scene = CTX_data_scene(C); - if (ELEM(NULL, ob, scene)) + if (ELEM(NULL, ob, scene)) { return OPERATOR_CANCELLED; + } /* calculate the bones that now have motionpaths... */ /* TODO: only make for the selected bones? */ @@ -427,8 +430,9 @@ static void ED_pose_clear_paths(Object *ob, bool only_selected) bPoseChannel *pchan; bool skipped = false; - if (ELEM(NULL, ob, ob->pose)) + if (ELEM(NULL, ob, ob->pose)) { return; + } /* free the motionpath blocks for all bones - This is easier for users to quickly clear all */ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { @@ -444,8 +448,9 @@ static void ED_pose_clear_paths(Object *ob, bool only_selected) } /* if nothing was skipped, there should be no paths left! */ - if (skipped == false) + if (skipped == false) { ob->pose->avs.path_bakeflag &= ~MOTIONPATH_BAKE_HAS_PATHS; + } /* tag armature object for copy on write - so removed paths don't still show */ DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE); @@ -458,8 +463,9 @@ static int pose_clear_paths_exec(bContext *C, wmOperator *op) bool only_selected = RNA_boolean_get(op->ptr, "only_selected"); /* only continue if there's an object */ - if (ELEM(NULL, ob, ob->pose)) + if (ELEM(NULL, ob, ob->pose)) { return OPERATOR_CANCELLED; + } /* use the backend function for this */ ED_pose_clear_paths(ob, only_selected); @@ -735,8 +741,9 @@ static int pose_armature_layers_showall_exec(bContext *C, wmOperator *op) int i; /* sanity checking */ - if (arm == NULL) + if (arm == NULL) { return OPERATOR_CANCELLED; + } /* use RNA to set the layers * although it would be faster to just set directly using bitflags, we still @@ -744,8 +751,9 @@ static int pose_armature_layers_showall_exec(bContext *C, wmOperator *op) */ RNA_id_pointer_create(&arm->id, &ptr); - for (i = 0; i < maxLayers; i++) + for (i = 0; i < maxLayers; i++) { layers[i] = 1; + } RNA_boolean_set_array(&ptr, "layers", layers); @@ -788,8 +796,9 @@ static int armature_layers_invoke(bContext *C, wmOperator *op, const wmEvent *ev bool layers[32]; /* sanity checking */ - if (arm == NULL) + if (arm == NULL) { return OPERATOR_CANCELLED; + } /* Get RNA pointer to armature data to use that to retrieve the layers as ints * to init the operator. */ |