Cleanup: use bool
This commit is contained in:
parent
e76f94e0fb
commit
45835e227e
|
@ -633,7 +633,7 @@ typedef struct bPoseChanDeform {
|
|||
DualQuat *b_bone_dual_quats;
|
||||
} bPoseChanDeform;
|
||||
|
||||
static void pchan_b_bone_defmats(bPoseChannel *pchan, bPoseChanDeform *pdef_info, int use_quaternion)
|
||||
static void pchan_b_bone_defmats(bPoseChannel *pchan, bPoseChanDeform *pdef_info, const bool use_quaternion)
|
||||
{
|
||||
Bone *bone = pchan->bone;
|
||||
Mat4 b_bone[MAX_BBONE_SUBDIV], b_bone_rest[MAX_BBONE_SUBDIV];
|
||||
|
@ -867,9 +867,9 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float
|
|||
bDeformGroup *dg;
|
||||
DualQuat *dualquats = NULL;
|
||||
float obinv[4][4], premat[4][4], postmat[4][4];
|
||||
const short use_envelope = deformflag & ARM_DEF_ENVELOPE;
|
||||
const short use_quaternion = deformflag & ARM_DEF_QUATERNION;
|
||||
const short invert_vgroup = deformflag & ARM_DEF_INVERT_VGROUP;
|
||||
const bool use_envelope = (deformflag & ARM_DEF_ENVELOPE) != 0;
|
||||
const bool use_quaternion = (deformflag & ARM_DEF_QUATERNION) != 0;
|
||||
const bool invert_vgroup = (deformflag & ARM_DEF_INVERT_VGROUP) != 0;
|
||||
int defbase_tot = 0; /* safety for vertexgroup index overflow */
|
||||
int i, target_totvert = 0; /* safety for vertexgroup overflow */
|
||||
bool use_dverts = false;
|
||||
|
|
|
@ -542,7 +542,7 @@ void MESH_OT_edge_collapse(wmOperatorType *ot)
|
|||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
static int edbm_add_edge_face__smooth_get(BMesh *bm)
|
||||
static bool edbm_add_edge_face__smooth_get(BMesh *bm)
|
||||
{
|
||||
BMEdge *e;
|
||||
BMIter iter;
|
||||
|
@ -710,7 +710,7 @@ static int edbm_add_edge_face_exec(bContext *C, wmOperator *op)
|
|||
BMOperator bmop;
|
||||
Object *obedit = CTX_data_edit_object(C);
|
||||
BMEditMesh *em = BKE_editmesh_from_object(obedit);
|
||||
const short use_smooth = edbm_add_edge_face__smooth_get(em->bm);
|
||||
const bool use_smooth = edbm_add_edge_face__smooth_get(em->bm);
|
||||
const int totedge_orig = em->bm->totedge;
|
||||
const int totface_orig = em->bm->totface;
|
||||
/* when this is used to dissolve we could avoid this, but checking isnt too slow */
|
||||
|
@ -3576,7 +3576,7 @@ static int edbm_fill_grid_exec(bContext *C, wmOperator *op)
|
|||
BMOperator bmop;
|
||||
Object *obedit = CTX_data_edit_object(C);
|
||||
BMEditMesh *em = BKE_editmesh_from_object(obedit);
|
||||
const short use_smooth = edbm_add_edge_face__smooth_get(em->bm);
|
||||
const bool use_smooth = edbm_add_edge_face__smooth_get(em->bm);
|
||||
const int totedge_orig = em->bm->totedge;
|
||||
const int totface_orig = em->bm->totface;
|
||||
const bool use_interp_simple = RNA_boolean_get(op->ptr, "use_interp_simple");
|
||||
|
|
|
@ -506,9 +506,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
|
|||
new_w[i] = dist;
|
||||
}
|
||||
else if (wmd->proximity_mode == MOD_WVG_PROXIMITY_GEOMETRY) {
|
||||
const short use_trgt_verts = (wmd->proximity_flags & MOD_WVG_PROXIMITY_GEOM_VERTS);
|
||||
const short use_trgt_edges = (wmd->proximity_flags & MOD_WVG_PROXIMITY_GEOM_EDGES);
|
||||
const short use_trgt_faces = (wmd->proximity_flags & MOD_WVG_PROXIMITY_GEOM_FACES);
|
||||
const bool use_trgt_verts = (wmd->proximity_flags & MOD_WVG_PROXIMITY_GEOM_VERTS) != 0;
|
||||
const bool use_trgt_edges = (wmd->proximity_flags & MOD_WVG_PROXIMITY_GEOM_EDGES) != 0;
|
||||
const bool use_trgt_faces = (wmd->proximity_flags & MOD_WVG_PROXIMITY_GEOM_FACES) != 0;
|
||||
|
||||
if (use_trgt_verts || use_trgt_edges || use_trgt_faces) {
|
||||
DerivedMesh *target_dm = obr->derivedFinal;
|
||||
|
|
Loading…
Reference in New Issue