From af3e348430218e609c80d86c8dd418bed15e70e8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 19 May 2012 13:28:19 +0000 Subject: code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars. --- source/blender/editors/armature/editarmature.c | 6 +++--- source/blender/editors/armature/poseobject.c | 8 ++++---- source/blender/editors/armature/reeb.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'source/blender/editors/armature') diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 7ce2988b067..ac5af846900 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -3325,9 +3325,9 @@ static int armature_extrude_exec(bContext *C, wmOperator *op) for (ebone = arm->edbo->first; ((ebone) && (ebone != first)); ebone = ebone->next) { if (EBONE_VISIBLE(arm, ebone)) { /* we extrude per definition the tip */ - do_extrude = 0; + do_extrude = FALSE; if (ebone->flag & (BONE_TIPSEL | BONE_SELECTED)) - do_extrude = 1; + do_extrude = TRUE; else if (ebone->flag & BONE_ROOTSEL) { /* but, a bone with parent deselected we do the root... */ if (ebone->parent && (ebone->parent->flag & BONE_TIPSEL)) ; @@ -3361,7 +3361,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op) totbone++; newbone = MEM_callocN(sizeof(EditBone), "extrudebone"); - if (do_extrude == 1) { + if (do_extrude == TRUE) { copy_v3_v3(newbone->head, ebone->tail); copy_v3_v3(newbone->tail, newbone->head); newbone->parent = ebone; diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index e9c960c4080..f18fa2f8bf8 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -1451,7 +1451,7 @@ static int pose_group_assign_exec(bContext *C, wmOperator *op) ScrArea *sa = CTX_wm_area(C); Object *ob; bPose *pose; - short done = 0; + short done = FALSE; /* since this call may also be used from the buttons window, we need to check for where to get the object */ if (sa->spacetype == SPACE_BUTS) @@ -1476,7 +1476,7 @@ static int pose_group_assign_exec(bContext *C, wmOperator *op) CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones) { pchan->agrp_index = pose->active_group; - done = 1; + done = TRUE; } CTX_DATA_END; @@ -1514,7 +1514,7 @@ static int pose_group_unassign_exec(bContext *C, wmOperator *UNUSED(op)) { ScrArea *sa = CTX_wm_area(C); Object *ob; - short done = 0; + short done = FALSE; /* since this call may also be used from the buttons window, we need to check for where to get the object */ if (sa->spacetype == SPACE_BUTS) @@ -1531,7 +1531,7 @@ static int pose_group_unassign_exec(bContext *C, wmOperator *UNUSED(op)) { if (pchan->agrp_index) { pchan->agrp_index = 0; - done = 1; + done = TRUE; } } CTX_DATA_END; diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c index 316c4699c0b..3f056f9638c 100644 --- a/source/blender/editors/armature/reeb.c +++ b/source/blender/editors/armature/reeb.c @@ -1818,7 +1818,7 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold)) static void filterGraph(ReebGraph *rg, short options, float threshold_internal, float threshold_external) { - int done = 1; + int done = TRUE; calculateGraphLength(rg); @@ -1833,7 +1833,7 @@ static void filterGraph(ReebGraph *rg, short options, float threshold_internal, if (threshold_internal > 0 || threshold_external > 0) { /* filter until there's nothing more to do */ while (done == 1) { - done = 0; /* no work done yet */ + done = FALSE; /* no work done yet */ done = filterInternalExternalReebGraph(rg, threshold_internal, threshold_external); } -- cgit v1.2.3