From 617557b08ea94e2b65a1697ddf0b79651204d92b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 1 Apr 2014 11:34:00 +1100 Subject: Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define --- source/blender/editors/armature/armature_add.c | 6 ++-- source/blender/editors/armature/armature_edit.c | 4 +-- source/blender/editors/armature/armature_ops.c | 42 +++++++++++----------- source/blender/editors/armature/armature_select.c | 2 +- .../blender/editors/armature/armature_skinning.c | 2 +- .../editors/armature/editarmature_generate.c | 2 +- .../editors/armature/editarmature_retarget.c | 10 +++--- source/blender/editors/armature/meshlaplacian.c | 8 ++--- source/blender/editors/armature/pose_edit.c | 4 +-- source/blender/editors/armature/pose_group.c | 10 +++--- source/blender/editors/armature/pose_select.c | 4 +-- source/blender/editors/armature/pose_slide.c | 12 +++---- source/blender/editors/armature/pose_transform.c | 12 +++---- source/blender/editors/armature/reeb.c | 6 ++-- 14 files changed, 61 insertions(+), 63 deletions(-) (limited to 'source/blender/editors/armature') diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c index 456dd802086..52a8137f27f 100644 --- a/source/blender/editors/armature/armature_add.c +++ b/source/blender/editors/armature/armature_add.c @@ -548,9 +548,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 = FALSE; + do_extrude = false; if (ebone->flag & (BONE_TIPSEL | BONE_SELECTED)) { - do_extrude = TRUE; + do_extrude = true; } else if (ebone->flag & BONE_ROOTSEL) { /* but, a bone with parent deselected we do the root... */ @@ -589,7 +589,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op) totbone++; newbone = MEM_callocN(sizeof(EditBone), "extrudebone"); - if (do_extrude == TRUE) { + 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/armature_edit.c b/source/blender/editors/armature/armature_edit.c index 63869f50c1b..e5e4ee9bf08 100644 --- a/source/blender/editors/armature/armature_edit.c +++ b/source/blender/editors/armature/armature_edit.c @@ -268,8 +268,8 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op) { Object *ob = CTX_data_edit_object(C); const short type = RNA_enum_get(op->ptr, "type"); - const short axis_only = RNA_boolean_get(op->ptr, "axis_only"); - const short axis_flip = RNA_boolean_get(op->ptr, "axis_flip"); + const bool axis_only = RNA_boolean_get(op->ptr, "axis_only"); + const bool axis_flip = RNA_boolean_get(op->ptr, "axis_flip"); float imat[3][3]; diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c index be23c285cf7..f3c23c1f202 100644 --- a/source/blender/editors/armature/armature_ops.c +++ b/source/blender/editors/armature/armature_ops.c @@ -179,7 +179,7 @@ void ED_operatormacros_armature(void) "Create new bones from the selected joints and move them", OPTYPE_UNDO | OPTYPE_REGISTER); otmacro = WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude"); - RNA_boolean_set(otmacro->ptr, "forked", FALSE); + RNA_boolean_set(otmacro->ptr, "forked", false); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); RNA_enum_set(otmacro->ptr, "proportional", 0); @@ -189,7 +189,7 @@ void ED_operatormacros_armature(void) "Create new bones from the selected joints and move them", OPTYPE_UNDO | OPTYPE_REGISTER); otmacro = WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude"); - RNA_boolean_set(otmacro->ptr, "forked", TRUE); + RNA_boolean_set(otmacro->ptr, "forked", true); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); RNA_enum_set(otmacro->ptr, "proportional", 0); } @@ -215,16 +215,16 @@ void ED_keymap_armature(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "SKETCH_OT_gesture", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", LEFTMOUSE, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "snap", TRUE); + RNA_boolean_set(kmi->ptr, "snap", true); WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, 0, 0); kmi = WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "snap", TRUE); + RNA_boolean_set(kmi->ptr, "snap", true); /* only set in editmode armature, by space_view3d listener */ kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "unselected", FALSE); + RNA_boolean_set(kmi->ptr, "unselected", false); kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", true); WM_keymap_add_item(keymap, "ARMATURE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "ARMATURE_OT_align", AKEY, KM_PRESS, KM_CTRL | KM_ALT, 0); @@ -243,21 +243,21 @@ void ED_keymap_armature(wmKeyConfig *keyconf) RNA_enum_set(kmi->ptr, "action", SEL_INVERT); kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_mirror", MKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); WM_keymap_add_item(keymap, "ARMATURE_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "ARMATURE_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0); @@ -315,9 +315,9 @@ void ED_keymap_armature(wmKeyConfig *keyconf) WM_keymap_add_menu(keymap, "INFO_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0); kmi = WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "unselected", FALSE); + RNA_boolean_set(kmi->ptr, "unselected", false); kmi = WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", true); WM_keymap_add_item(keymap, "POSE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); @@ -334,16 +334,16 @@ void ED_keymap_armature(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "POSE_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0); kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "flipped", FALSE); + RNA_boolean_set(kmi->ptr, "flipped", false); kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "flipped", TRUE); + RNA_boolean_set(kmi->ptr, "flipped", true); #ifdef __APPLE__ WM_keymap_add_item(keymap, "POSE_OT_copy", CKEY, KM_PRESS, KM_OSKEY, 0); kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_OSKEY, 0); - RNA_boolean_set(kmi->ptr, "flipped", FALSE); + RNA_boolean_set(kmi->ptr, "flipped", false); kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_OSKEY | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "flipped", TRUE); + RNA_boolean_set(kmi->ptr, "flipped", true); #endif kmi = WM_keymap_add_item(keymap, "POSE_OT_select_all", AKEY, KM_PRESS, 0, 0); @@ -355,17 +355,17 @@ void ED_keymap_armature(wmKeyConfig *keyconf) kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); WM_keymap_add_item(keymap, "POSE_OT_select_linked", LKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "POSE_OT_select_grouped", GKEY, KM_PRESS, KM_SHIFT, 0); diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c index d51b27aefb8..e420e56fdb0 100644 --- a/source/blender/editors/armature/armature_select.c +++ b/source/blender/editors/armature/armature_select.c @@ -256,7 +256,7 @@ void ARMATURE_OT_select_linked(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first"); + RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first"); } /* does bones and points */ diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c index e3059e113d6..560af2dbd0b 100644 --- a/source/blender/editors/armature/armature_skinning.c +++ b/source/blender/editors/armature/armature_skinning.c @@ -272,7 +272,7 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob, if (numbones == 0) return; - if (ED_vgroup_data_create(ob->data) == FALSE) + if (ED_vgroup_data_create(ob->data) == false) return; /* create an array of pointer to bones that are skinnable diff --git a/source/blender/editors/armature/editarmature_generate.c b/source/blender/editors/armature/editarmature_generate.c index 179e0a97c9d..4eb9e3ecc79 100644 --- a/source/blender/editors/armature/editarmature_generate.c +++ b/source/blender/editors/armature/editarmature_generate.c @@ -39,7 +39,7 @@ void setBoneRollFromNormal(EditBone *bone, const float no[3], float UNUSED(invma copy_v3_v3(normal, no); mul_m3_v3(tmat, normal); - bone->roll = ED_rollBoneToVector(bone, normal, FALSE); + bone->roll = ED_rollBoneToVector(bone, normal, false); } } diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index a0411f246c8..8f71f722525 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -159,11 +159,11 @@ static float rollBoneByQuatAligned(EditBone *bone, float old_up_axis[3], float q if (angle_normalized_v3v3(x_axis, new_up_axis) < angle_normalized_v3v3(z_axis, new_up_axis)) { rotation_between_vecs_to_quat(qroll, new_up_axis, x_axis); /* set roll rotation quat */ - return ED_rollBoneToVector(bone, x_axis, FALSE); + return ED_rollBoneToVector(bone, x_axis, false); } else { rotation_between_vecs_to_quat(qroll, new_up_axis, z_axis); /* set roll rotation quat */ - return ED_rollBoneToVector(bone, z_axis, FALSE); + return ED_rollBoneToVector(bone, z_axis, false); } } @@ -208,7 +208,7 @@ static float rollBoneByQuatJoint(RigEdge *edge, RigEdge *previous, float qrot[4] /* real qroll between normal and up_axis */ rotation_between_vecs_to_quat(qroll, new_up_axis, normal); - return ED_rollBoneToVector(edge->bone, normal, FALSE); + return ED_rollBoneToVector(edge->bone, normal, false); } } @@ -219,7 +219,7 @@ float rollBoneByQuat(EditBone *bone, float old_up_axis[3], float qrot[4]) copy_v3_v3(new_up_axis, old_up_axis); mul_qt_v3(qrot, new_up_axis); - return ED_rollBoneToVector(bone, new_up_axis, FALSE); + return ED_rollBoneToVector(bone, new_up_axis, false); } /************************************ DESTRUCTORS ******************************************************/ @@ -1129,7 +1129,7 @@ static void RIG_removeUneededOffsets(RigGraph *rg) } } -static void RIG_arcFromBoneChain(RigGraph *rg, ListBase *list, EditBone *root_bone, RigNode *starting_node, int selected) +static void RIG_arcFromBoneChain(RigGraph *rg, ListBase *list, EditBone *root_bone, RigNode *starting_node, bool selected) { EditBone *bone, *last_bone = root_bone; RigArc *arc = NULL; diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index bc47a673365..c2a54c6d9f8 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -635,8 +635,8 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource, bool use_topology = (me->editflag & ME_EDIT_MIRROR_TOPO) != 0; MVert *mvert = me->mvert; - int use_vert_sel = FALSE; - int use_face_sel = FALSE; + bool use_vert_sel = false; + bool use_face_sel = false; *err_str = NULL; @@ -662,9 +662,7 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource, if (use_vert_sel) { for (a = 0, mp = me->mpoly; a < me->totpoly; mp++, a++) { for (j = 0, ml = me->mloop + mp->loopstart; j < mp->totloop; j++, ml++) { - if (use_vert_sel) { - mask[ml->v] = (mvert[ml->v].flag & SELECT) != 0; - } + mask[ml->v] = (mvert[ml->v].flag & SELECT) != 0; } } } diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index d1c096e6cf5..b354facb9b3 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -424,7 +424,7 @@ static void pose_copy_menu(Scene *scene) /* copy constraints to tmpbase and apply 'local' tags before * appending to list of constraints for this channel */ - BKE_copy_constraints(&tmp_constraints, &pchanact->constraints, TRUE); + BKE_copy_constraints(&tmp_constraints, &pchanact->constraints, true); if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) { bConstraint *con; @@ -536,7 +536,7 @@ static void pose_copy_menu(Scene *scene) /* copy constraints to tmpbase and apply 'local' tags before * appending to list of constraints for this channel */ - BKE_copy_constraints(&tmp_constraints, &const_copy, TRUE); + BKE_copy_constraints(&tmp_constraints, &const_copy, true); if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) { /* add proxy-local tags */ for (con = tmp_constraints.first; con; con = con->next) diff --git a/source/blender/editors/armature/pose_group.c b/source/blender/editors/armature/pose_group.c index d2d48fce8e6..376c1bc0838 100644 --- a/source/blender/editors/armature/pose_group.c +++ b/source/blender/editors/armature/pose_group.c @@ -176,7 +176,7 @@ static int pose_group_assign_exec(bContext *C, wmOperator *op) { Object *ob = ED_pose_object_from_context(C); bPose *pose; - short done = FALSE; + bool done = false; /* only continue if there's an object, and a pose there too */ if (ELEM(NULL, ob, ob->pose)) @@ -195,7 +195,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 = TRUE; + done = true; } CTX_DATA_END; @@ -232,7 +232,7 @@ void POSE_OT_group_assign(wmOperatorType *ot) static int pose_group_unassign_exec(bContext *C, wmOperator *UNUSED(op)) { Object *ob = ED_pose_object_from_context(C); - short done = FALSE; + bool done = false; /* only continue if there's an object, and a pose there too */ if (ELEM(NULL, ob, ob->pose)) @@ -243,7 +243,7 @@ static int pose_group_unassign_exec(bContext *C, wmOperator *UNUSED(op)) { if (pchan->agrp_index) { pchan->agrp_index = 0; - done = TRUE; + done = true; } } CTX_DATA_END; @@ -438,7 +438,7 @@ void POSE_OT_group_sort(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -static void pose_group_select(bContext *C, Object *ob, int select) +static void pose_group_select(bContext *C, Object *ob, bool select) { bPose *pose = ob->pose; diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c index 4038200d0a0..a852f47ba4b 100644 --- a/source/blender/editors/armature/pose_select.c +++ b/source/blender/editors/armature/pose_select.c @@ -332,7 +332,7 @@ void POSE_OT_select_linked(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first"); + RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first"); } /* -------------------------------------- */ @@ -846,7 +846,7 @@ void POSE_OT_select_grouped(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first"); + RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first"); ot->prop = RNA_def_enum(ot->srna, "type", prop_select_grouped_types, 0, "Type", ""); } diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c index ec49dad69b5..56cc5c5b1ee 100644 --- a/source/blender/editors/armature/pose_slide.c +++ b/source/blender/editors/armature/pose_slide.c @@ -1013,11 +1013,11 @@ static float pose_propagate_get_boneHoldEndFrame(Object *ob, tPChanFCurveLink *p } /* get reference value from F-Curve using RNA */ -static short pose_propagate_get_refVal(Object *ob, FCurve *fcu, float *value) +static bool pose_propagate_get_refVal(Object *ob, FCurve *fcu, float *value) { PointerRNA id_ptr, ptr; PropertyRNA *prop; - short found = FALSE; + bool found = false; /* base pointer is always the object -> id_ptr */ RNA_id_pointer_create(&ob->id, &id_ptr); @@ -1027,7 +1027,7 @@ static short pose_propagate_get_refVal(Object *ob, FCurve *fcu, float *value) if (RNA_property_array_check(prop)) { /* array */ if (fcu->array_index < RNA_property_array_length(&ptr, prop)) { - found = TRUE; + found = true; switch (RNA_property_type(prop)) { case PROP_BOOLEAN: *value = (float)RNA_property_boolean_get_index(&ptr, prop, fcu->array_index); @@ -1039,14 +1039,14 @@ static short pose_propagate_get_refVal(Object *ob, FCurve *fcu, float *value) *value = RNA_property_float_get_index(&ptr, prop, fcu->array_index); break; default: - found = FALSE; + found = false; break; } } } else { /* not an array */ - found = TRUE; + found = true; switch (RNA_property_type(prop)) { case PROP_BOOLEAN: *value = (float)RNA_property_boolean_get(&ptr, prop); @@ -1061,7 +1061,7 @@ static short pose_propagate_get_refVal(Object *ob, FCurve *fcu, float *value) *value = RNA_property_float_get(&ptr, prop); break; default: - found = FALSE; + found = false; break; } } diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index 5fba6554b8c..094af99776b 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -78,7 +78,7 @@ static void applyarmature_fix_boneparents(Scene *scene, Object *armob) /* apply current transform from parent (not yet destroyed), * then calculate new parent inverse matrix */ - BKE_object_apply_mat4(ob, ob->obmat, FALSE, FALSE); + BKE_object_apply_mat4(ob, ob->obmat, false, false); BKE_object_workob_calc_parent(scene, ob, &workob); invert_m4_m4(ob->parentinv, workob.obmat); @@ -218,7 +218,7 @@ static int pose_visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op)) */ BKE_armature_mat_pose_to_bone(pchan, pchan->pose_mat, delta_mat); - BKE_pchan_apply_mat4(pchan, delta_mat, TRUE); + BKE_pchan_apply_mat4(pchan, delta_mat, true); } CTX_DATA_END; @@ -521,10 +521,10 @@ void POSE_OT_paste(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - prop = RNA_def_boolean(ot->srna, "flipped", FALSE, "Flipped on X-Axis", "Paste the stored pose flipped on to current pose"); + prop = RNA_def_boolean(ot->srna, "flipped", false, "Flipped on X-Axis", "Paste the stored pose flipped on to current pose"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); - RNA_def_boolean(ot->srna, "selected_mask", FALSE, "On Selected Only", "Only paste the stored pose on to selected bones in the current pose"); + RNA_def_boolean(ot->srna, "selected_mask", false, "On Selected Only", "Only paste the stored pose on to selected bones in the current pose"); } /* ********************************************** */ @@ -812,7 +812,7 @@ static int pose_clear_user_transforms_exec(bContext *C, wmOperator *op) Scene *scene = CTX_data_scene(C); Object *ob = CTX_data_active_object(C); float cframe = (float)CFRA; - const short only_select = RNA_boolean_get(op->ptr, "only_selected"); + const bool only_select = RNA_boolean_get(op->ptr, "only_selected"); if ((ob->adt) && (ob->adt->action)) { /* XXX: this is just like this to avoid contaminating anything else; @@ -879,5 +879,5 @@ void POSE_OT_user_transforms_clear(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "only_selected", TRUE, "Only Selected", "Only visible/selected bones"); + RNA_def_boolean(ot->srna, "only_selected", true, "Only Selected", "Only visible/selected bones"); } diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c index e36b5c808dc..8cc6059e87b 100644 --- a/source/blender/editors/armature/reeb.c +++ b/source/blender/editors/armature/reeb.c @@ -1796,7 +1796,7 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold)) static void filterGraph(ReebGraph *rg, short options, float threshold_internal, float threshold_external) { - int done = TRUE; + bool done = true; calculateGraphLength(rg); @@ -1810,8 +1810,8 @@ 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 = FALSE; /* no work done yet */ + while (done == true) { + done = false; /* no work done yet */ done = filterInternalExternalReebGraph(rg, threshold_internal, threshold_external); } -- cgit v1.2.3