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/object/object_modes.c | |
parent | bba60bb564cf5a16cfcac744d4ba82cf8eba3da9 (diff) |
Cleanup: style, use braces for editors
Diffstat (limited to 'source/blender/editors/object/object_modes.c')
-rw-r--r-- | source/blender/editors/object/object_modes.c | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/source/blender/editors/object/object_modes.c b/source/blender/editors/object/object_modes.c index 7c881aa7cab..cc28ceaf95b 100644 --- a/source/blender/editors/object/object_modes.c +++ b/source/blender/editors/object/object_modes.c @@ -54,28 +54,39 @@ static const char *object_mode_op_string(eObjectMode mode) { - if (mode & OB_MODE_EDIT) + if (mode & OB_MODE_EDIT) { return "OBJECT_OT_editmode_toggle"; - if (mode == OB_MODE_SCULPT) + } + if (mode == OB_MODE_SCULPT) { return "SCULPT_OT_sculptmode_toggle"; - if (mode == OB_MODE_VERTEX_PAINT) + } + if (mode == OB_MODE_VERTEX_PAINT) { return "PAINT_OT_vertex_paint_toggle"; - if (mode == OB_MODE_WEIGHT_PAINT) + } + if (mode == OB_MODE_WEIGHT_PAINT) { return "PAINT_OT_weight_paint_toggle"; - if (mode == OB_MODE_TEXTURE_PAINT) + } + if (mode == OB_MODE_TEXTURE_PAINT) { return "PAINT_OT_texture_paint_toggle"; - if (mode == OB_MODE_PARTICLE_EDIT) + } + if (mode == OB_MODE_PARTICLE_EDIT) { return "PARTICLE_OT_particle_edit_toggle"; - if (mode == OB_MODE_POSE) + } + if (mode == OB_MODE_POSE) { return "OBJECT_OT_posemode_toggle"; - if (mode == OB_MODE_EDIT_GPENCIL) + } + if (mode == OB_MODE_EDIT_GPENCIL) { return "GPENCIL_OT_editmode_toggle"; - if (mode == OB_MODE_PAINT_GPENCIL) + } + if (mode == OB_MODE_PAINT_GPENCIL) { return "GPENCIL_OT_paintmode_toggle"; - if (mode == OB_MODE_SCULPT_GPENCIL) + } + if (mode == OB_MODE_SCULPT_GPENCIL) { return "GPENCIL_OT_sculptmode_toggle"; - if (mode == OB_MODE_WEIGHT_GPENCIL) + } + if (mode == OB_MODE_WEIGHT_GPENCIL) { return "GPENCIL_OT_weightmode_toggle"; + } return NULL; } @@ -86,8 +97,9 @@ static const char *object_mode_op_string(eObjectMode mode) bool ED_object_mode_compat_test(const Object *ob, eObjectMode mode) { if (ob) { - if (mode == OB_MODE_OBJECT) + if (mode == OB_MODE_OBJECT) { return true; + } switch (ob->type) { case OB_MESH: @@ -100,16 +112,19 @@ bool ED_object_mode_compat_test(const Object *ob, eObjectMode mode) case OB_SURF: case OB_FONT: case OB_MBALL: - if (mode & (OB_MODE_EDIT)) + if (mode & (OB_MODE_EDIT)) { return true; + } break; case OB_LATTICE: - if (mode & (OB_MODE_EDIT | OB_MODE_WEIGHT_PAINT)) + if (mode & (OB_MODE_EDIT | OB_MODE_WEIGHT_PAINT)) { return true; + } break; case OB_ARMATURE: - if (mode & (OB_MODE_EDIT | OB_MODE_POSE)) + if (mode & (OB_MODE_EDIT | OB_MODE_POSE)) { return true; + } break; case OB_GPENCIL: if (mode & (OB_MODE_EDIT | OB_MODE_EDIT_GPENCIL | OB_MODE_PAINT_GPENCIL | |