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/blenkernel/intern/armature.c | 38 ++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'source/blender/blenkernel/intern/armature.c') diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index afd3ae7e85d..60ec4817f81 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -137,7 +137,7 @@ void BKE_armature_free(bArmature *arm) void BKE_armature_make_local(bArmature *arm) { Main *bmain = G.main; - int is_local = FALSE, is_lib = FALSE; + bool is_local = false, is_lib = false; Object *ob; if (arm->id.lib == NULL) @@ -150,13 +150,13 @@ void BKE_armature_make_local(bArmature *arm) for (ob = bmain->object.first; ob && ELEM(0, is_lib, is_local); ob = ob->id.next) { if (ob->data == arm) { if (ob->id.lib) - is_lib = TRUE; + is_lib = true; else - is_local = TRUE; + is_local = true; } } - if (is_local && is_lib == FALSE) { + if (is_local && is_lib == false) { id_clear_lib_data(bmain, &arm->id); } else if (is_local && is_lib) { @@ -827,7 +827,7 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float const short invert_vgroup = deformflag & ARM_DEF_INVERT_VGROUP; int defbase_tot = 0; /* safety for vertexgroup index overflow */ int i, target_totvert = 0; /* safety for vertexgroup overflow */ - int use_dverts = FALSE; + bool use_dverts = false; int armature_def_nr; int totchan; @@ -891,7 +891,7 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float use_dverts = (dm->getVertDataArray(dm, CD_MDEFORMVERT) != NULL); } else if (dverts) { - use_dverts = TRUE; + use_dverts = true; } if (use_dverts) { @@ -1294,19 +1294,19 @@ void BKE_armature_mat_pose_to_bone_ex(Object *ob, bPoseChannel *pchan, float inm /* recalculate pose matrix with only parent transformations, * bone loc/sca/rot is ignored, scene and frame are not used. */ - BKE_pose_where_is_bone(NULL, ob, &work_pchan, 0.0f, FALSE); + BKE_pose_where_is_bone(NULL, ob, &work_pchan, 0.0f, false); /* find the matrix, need to remove the bone transforms first so this is * calculated as a matrix to set rather then a difference ontop of whats * already there. */ unit_m4(outmat); - BKE_pchan_apply_mat4(&work_pchan, outmat, FALSE); + BKE_pchan_apply_mat4(&work_pchan, outmat, false); BKE_armature_mat_pose_to_bone(&work_pchan, inmat, outmat); } /* same as BKE_object_mat3_to_rot() */ -void BKE_pchan_mat3_to_rot(bPoseChannel *pchan, float mat[3][3], short use_compat) +void BKE_pchan_mat3_to_rot(bPoseChannel *pchan, float mat[3][3], bool use_compat) { switch (pchan->rotmode) { case ROT_MODE_QUAT: @@ -1326,7 +1326,7 @@ void BKE_pchan_mat3_to_rot(bPoseChannel *pchan, float mat[3][3], short use_compa /* Apply a 4x4 matrix to the pose bone, * similar to BKE_object_apply_mat4() */ -void BKE_pchan_apply_mat4(bPoseChannel *pchan, float mat[4][4], short use_compat) +void BKE_pchan_apply_mat4(bPoseChannel *pchan, float mat[4][4], bool use_compat) { float rot[3][3]; mat4_to_loc_rot_size(pchan->loc, rot, pchan->size, mat); @@ -1619,7 +1619,7 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected * we get the libs direct linked in this blend. */ BKE_extract_proxylocal_constraints(&proxylocal_constraints, &pchan->constraints); - BKE_copy_constraints(&pchanw.constraints, &pchanp->constraints, FALSE); + BKE_copy_constraints(&pchanw.constraints, &pchanp->constraints, false); BLI_movelisttolist(&pchanw.constraints, &proxylocal_constraints); /* constraints - set target ob pointer to own object */ @@ -1768,7 +1768,7 @@ typedef struct tSplineIK_Tree { int type; /* type of IK that this serves (CONSTRAINT_TYPE_KINEMATIC or ..._SPLINEIK) */ - short free_points; /* free the point positions array */ + bool free_points; /* free the point positions array */ short chainlen; /* number of bones in the chain */ float *points; /* parametric positions for the joints along the curve */ @@ -1791,7 +1791,7 @@ static void splineik_init_tree_from_pchan(Scene *scene, Object *UNUSED(ob), bPos bSplineIKConstraint *ikData = NULL; float boneLengths[255], *jointPoints; float totLength = 0.0f; - short free_joints = 0; + bool free_joints = 0; int segcount = 0; /* find the SplineIK constraint */ @@ -2261,13 +2261,13 @@ static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseCha int do_modif; for (strip = armob->nlastrips.first; strip; strip = strip->next) { - do_modif = FALSE; + do_modif = false; if (scene_cfra >= strip->start && scene_cfra <= strip->end) - do_modif = TRUE; + do_modif = true; if ((scene_cfra > strip->end) && (strip->flag & ACTSTRIP_HOLDLASTFRAME)) { - do_modif = TRUE; + do_modif = true; /* if there are any other strips active, ignore modifiers for this strip - * 'hold' option should only hold action modifiers if there are @@ -2277,7 +2277,7 @@ static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseCha if (scene_cfra >= strip2->start && scene_cfra <= strip2->end) { if (!(strip2->flag & ACTSTRIP_MUTE)) - do_modif = FALSE; + do_modif = false; } } @@ -2286,7 +2286,7 @@ static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseCha for (strip2 = strip->next; strip2; strip2 = strip2->next) { if (scene_cfra < strip2->start) continue; if ((strip2->flag & ACTSTRIP_HOLDLASTFRAME) && !(strip2->flag & ACTSTRIP_MUTE)) { - do_modif = FALSE; + do_modif = false; } } } @@ -2390,7 +2390,7 @@ void BKE_pose_where_is_bone_tail(bPoseChannel *pchan) /* pchan is validated, as having bone and parent pointer * 'do_extra': when zero skips loc/size/rot, constraints and strip modifiers. */ -void BKE_pose_where_is_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float ctime, int do_extra) +void BKE_pose_where_is_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float ctime, bool do_extra) { /* This gives a chan_mat with actions (ipos) results. */ if (do_extra) -- cgit v1.2.3