diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-16 18:54:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-16 18:58:26 +0300 |
commit | 292a2802ad376f4a3a2cc7bed763d0f5856dd98c (patch) | |
tree | f68ba6fc244c8bb95227999d38384b6af0d1f408 /source/blender/editors/screen/screen_context.c | |
parent | bfc9d426bb95e2bc0dd4541d6b4c5f802909149c (diff) |
Cleanup: indentation
Indent lines for multi object editing, no functional changes.
Also strip trailing space from indented regions.
Diffstat (limited to 'source/blender/editors/screen/screen_context.c')
-rw-r--r-- | source/blender/editors/screen/screen_context.c | 118 |
1 files changed, 59 insertions, 59 deletions
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index c023c5d90bc..d51abee2b04 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -213,42 +213,42 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult uint objects_len; Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, &objects_len); for (uint i = 0; i < objects_len; i++) { - Object *ob = objects[i]; - arm = ob->data; - - /* Attention: X-Axis Mirroring is also handled here... */ - for (ebone = arm->edbo->first; ebone; ebone = ebone->next) { - /* first and foremost, bone must be visible and selected */ - if (EBONE_VISIBLE(arm, ebone)) { - /* Get 'x-axis mirror equivalent' bone if the X-Axis Mirroring option is enabled - * so that most users of this data don't need to explicitly check for it themselves. - * - * We need to make sure that these mirrored copies are not selected, otherwise some - * bones will be operated on twice. - */ - if (arm->flag & ARM_MIRROR_EDIT) - flipbone = ED_armature_ebone_get_mirrored(arm->edbo, ebone); - - /* if we're filtering for editable too, use the check for that instead, as it has selection check too */ - if (editable_bones) { - /* only selected + editable */ - if (EBONE_EDITABLE(ebone)) { + Object *ob = objects[i]; + arm = ob->data; + + /* Attention: X-Axis Mirroring is also handled here... */ + for (ebone = arm->edbo->first; ebone; ebone = ebone->next) { + /* first and foremost, bone must be visible and selected */ + if (EBONE_VISIBLE(arm, ebone)) { + /* Get 'x-axis mirror equivalent' bone if the X-Axis Mirroring option is enabled + * so that most users of this data don't need to explicitly check for it themselves. + * + * We need to make sure that these mirrored copies are not selected, otherwise some + * bones will be operated on twice. + */ + if (arm->flag & ARM_MIRROR_EDIT) + flipbone = ED_armature_ebone_get_mirrored(arm->edbo, ebone); + + /* if we're filtering for editable too, use the check for that instead, as it has selection check too */ + if (editable_bones) { + /* only selected + editable */ + if (EBONE_EDITABLE(ebone)) { + CTX_data_list_add(result, &arm->id, &RNA_EditBone, ebone); + + if ((flipbone) && !(flipbone->flag & BONE_SELECTED)) + CTX_data_list_add(result, &arm->id, &RNA_EditBone, flipbone); + } + } + else { + /* only include bones if visible */ CTX_data_list_add(result, &arm->id, &RNA_EditBone, ebone); - - if ((flipbone) && !(flipbone->flag & BONE_SELECTED)) + + if ((flipbone) && EBONE_VISIBLE(arm, flipbone) == 0) CTX_data_list_add(result, &arm->id, &RNA_EditBone, flipbone); } } - else { - /* only include bones if visible */ - CTX_data_list_add(result, &arm->id, &RNA_EditBone, ebone); - - if ((flipbone) && EBONE_VISIBLE(arm, flipbone) == 0) - CTX_data_list_add(result, &arm->id, &RNA_EditBone, flipbone); - } } } - } MEM_freeN(objects); CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION); @@ -264,42 +264,42 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult uint objects_len; Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, &objects_len); for (uint i = 0; i < objects_len; i++) { - Object *ob = objects[i]; - arm = ob->data; - - /* Attention: X-Axis Mirroring is also handled here... */ - for (ebone = arm->edbo->first; ebone; ebone = ebone->next) { - /* first and foremost, bone must be visible and selected */ - if (EBONE_VISIBLE(arm, ebone) && (ebone->flag & BONE_SELECTED)) { - /* Get 'x-axis mirror equivalent' bone if the X-Axis Mirroring option is enabled - * so that most users of this data don't need to explicitly check for it themselves. - * - * We need to make sure that these mirrored copies are not selected, otherwise some - * bones will be operated on twice. - */ - if (arm->flag & ARM_MIRROR_EDIT) - flipbone = ED_armature_ebone_get_mirrored(arm->edbo, ebone); - - /* if we're filtering for editable too, use the check for that instead, as it has selection check too */ - if (selected_editable_bones) { - /* only selected + editable */ - if (EBONE_EDITABLE(ebone)) { + Object *ob = objects[i]; + arm = ob->data; + + /* Attention: X-Axis Mirroring is also handled here... */ + for (ebone = arm->edbo->first; ebone; ebone = ebone->next) { + /* first and foremost, bone must be visible and selected */ + if (EBONE_VISIBLE(arm, ebone) && (ebone->flag & BONE_SELECTED)) { + /* Get 'x-axis mirror equivalent' bone if the X-Axis Mirroring option is enabled + * so that most users of this data don't need to explicitly check for it themselves. + * + * We need to make sure that these mirrored copies are not selected, otherwise some + * bones will be operated on twice. + */ + if (arm->flag & ARM_MIRROR_EDIT) + flipbone = ED_armature_ebone_get_mirrored(arm->edbo, ebone); + + /* if we're filtering for editable too, use the check for that instead, as it has selection check too */ + if (selected_editable_bones) { + /* only selected + editable */ + if (EBONE_EDITABLE(ebone)) { + CTX_data_list_add(result, &arm->id, &RNA_EditBone, ebone); + + if ((flipbone) && !(flipbone->flag & BONE_SELECTED)) + CTX_data_list_add(result, &arm->id, &RNA_EditBone, flipbone); + } + } + else { + /* only include bones if selected */ CTX_data_list_add(result, &arm->id, &RNA_EditBone, ebone); - + if ((flipbone) && !(flipbone->flag & BONE_SELECTED)) CTX_data_list_add(result, &arm->id, &RNA_EditBone, flipbone); } } - else { - /* only include bones if selected */ - CTX_data_list_add(result, &arm->id, &RNA_EditBone, ebone); - - if ((flipbone) && !(flipbone->flag & BONE_SELECTED)) - CTX_data_list_add(result, &arm->id, &RNA_EditBone, flipbone); - } } } - } MEM_freeN(objects); CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION); |