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