diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-01 04:34:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-01 08:22:28 +0400 |
commit | 617557b08ea94e2b65a1697ddf0b79651204d92b (patch) | |
tree | 50b24bab075b42fa20456140c9a9681cfb01325b /source/blender/editors/object | |
parent | 2c00ecc738c04dc5dc22d4a6b81a1e937526ba6d (diff) |
Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_add.c | 58 | ||||
-rw-r--r-- | source/blender/editors/object/object_bake.c | 12 | ||||
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 4 | ||||
-rw-r--r-- | source/blender/editors/object/object_edit.c | 8 | ||||
-rw-r--r-- | source/blender/editors/object/object_hook.c | 8 | ||||
-rw-r--r-- | source/blender/editors/object/object_lattice.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 50 | ||||
-rw-r--r-- | source/blender/editors/object/object_ops.c | 34 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 40 | ||||
-rw-r--r-- | source/blender/editors/object/object_select.c | 14 | ||||
-rw-r--r-- | source/blender/editors/object/object_transform.c | 22 |
11 files changed, 126 insertions, 126 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 182a9f70968..e3041d97019 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -477,7 +477,7 @@ void OBJECT_OT_add(wmOperatorType *ot) RNA_def_enum(ot->srna, "type", object_type_items, 0, "Type", ""); - ED_object_add_generic_props(ot, TRUE); + ED_object_add_generic_props(ot, true); } /********************* Add Effector Operator ********************/ @@ -499,7 +499,7 @@ static int effector_add_exec(bContext *C, wmOperator *op) if (type == PFIELD_GUIDE) { Curve *cu; - ob = ED_object_add_type(C, OB_CURVE, loc, rot, FALSE, layer); + ob = ED_object_add_type(C, OB_CURVE, loc, rot, false, layer); if (!ob) return OPERATOR_CANCELLED; @@ -507,13 +507,13 @@ static int effector_add_exec(bContext *C, wmOperator *op) cu = ob->data; cu->flag |= CU_PATH | CU_3D; ED_object_editmode_enter(C, 0); - ED_object_new_primitive_matrix(C, ob, loc, rot, mat, FALSE); + ED_object_new_primitive_matrix(C, ob, loc, rot, mat, false); BLI_addtail(&cu->editnurb->nurbs, add_nurbs_primitive(C, ob, mat, CU_NURBS | CU_PRIM_PATH, 1)); if (!enter_editmode) ED_object_editmode_exit(C, EM_FREEDATA); } else { - ob = ED_object_add_type(C, OB_EMPTY, loc, rot, FALSE, layer); + ob = ED_object_add_type(C, OB_EMPTY, loc, rot, false, layer); if (!ob) return OPERATOR_CANCELLED; @@ -545,7 +545,7 @@ void OBJECT_OT_effector_add(wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "type", field_type_items, 0, "Type", ""); - ED_object_add_generic_props(ot, TRUE); + ED_object_add_generic_props(ot, true); } /********************* Add Camera Operator ********************/ @@ -560,12 +560,12 @@ static int object_camera_add_exec(bContext *C, wmOperator *op) float loc[3], rot[3]; /* force view align for cameras */ - RNA_boolean_set(op->ptr, "view_align", TRUE); + RNA_boolean_set(op->ptr, "view_align", true); if (!ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, &enter_editmode, &layer, NULL)) return OPERATOR_CANCELLED; - ob = ED_object_add_type(C, OB_CAMERA, loc, rot, FALSE, layer); + ob = ED_object_add_type(C, OB_CAMERA, loc, rot, false, layer); if (v3d) { if (v3d->camera == NULL) @@ -594,7 +594,7 @@ void OBJECT_OT_camera_add(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - ED_object_add_generic_props(ot, TRUE); + ED_object_add_generic_props(ot, true); /* hide this for cameras, default */ prop = RNA_struct_type_find_property(ot->srna, "view_align"); @@ -619,7 +619,7 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; if (obedit == NULL || obedit->type != OB_MBALL) { - obedit = ED_object_add_type(C, OB_MBALL, loc, rot, TRUE, layer); + obedit = ED_object_add_type(C, OB_MBALL, loc, rot, true, layer); newob = true; } else { @@ -659,7 +659,7 @@ void OBJECT_OT_metaball_add(wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "type", metaelem_type_items, 0, "Primitive", ""); ED_object_add_unit_props(ot); - ED_object_add_generic_props(ot, TRUE); + ED_object_add_generic_props(ot, true); } /********************* Add Text Operator ********************/ @@ -697,7 +697,7 @@ void OBJECT_OT_text_add(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - ED_object_add_generic_props(ot, TRUE); + ED_object_add_generic_props(ot, true); } /********************* Add Armature Operator ********************/ @@ -716,7 +716,7 @@ static int object_armature_add_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; if ((obedit == NULL) || (obedit->type != OB_ARMATURE)) { - obedit = ED_object_add_type(C, OB_ARMATURE, loc, rot, TRUE, layer); + obedit = ED_object_add_type(C, OB_ARMATURE, loc, rot, true, layer); ED_object_editmode_enter(C, 0); newob = true; } @@ -753,7 +753,7 @@ void OBJECT_OT_armature_add(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - ED_object_add_generic_props(ot, TRUE); + ED_object_add_generic_props(ot, true); } /********************* Add Empty Operator ********************/ @@ -768,7 +768,7 @@ static int object_empty_add_exec(bContext *C, wmOperator *op) if (!ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, NULL, &layer, NULL)) return OPERATOR_CANCELLED; - ob = ED_object_add_type(C, OB_EMPTY, loc, rot, FALSE, layer); + ob = ED_object_add_type(C, OB_EMPTY, loc, rot, false, layer); BKE_object_empty_draw_type_set(ob, type); @@ -793,7 +793,7 @@ void OBJECT_OT_empty_add(wmOperatorType *ot) /* properties */ ot->prop = RNA_def_enum(ot->srna, "type", object_empty_drawtype_items, 0, "Type", ""); - ED_object_add_generic_props(ot, FALSE); + ED_object_add_generic_props(ot, false); } static int empty_drop_named_image_invoke(bContext *C, wmOperator *op, const wmEvent *event) @@ -836,7 +836,7 @@ static int empty_drop_named_image_invoke(bContext *C, wmOperator *op, const wmEv if (!ED_object_add_generic_get_opts(C, op, 'Z', NULL, rot, NULL, &layer, NULL)) return OPERATOR_CANCELLED; - ob = ED_object_add_type(C, OB_EMPTY, NULL, rot, FALSE, layer); + ob = ED_object_add_type(C, OB_EMPTY, NULL, rot, false, layer); /* add under the mouse */ ED_object_location_from_view(C, ob->loc); @@ -870,7 +870,7 @@ void OBJECT_OT_drop_named_image(wmOperatorType *ot) RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); prop = RNA_def_string(ot->srna, "name", NULL, MAX_ID_NAME - 2, "Name", "Image name to assign"); RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - ED_object_add_generic_props(ot, FALSE); + ED_object_add_generic_props(ot, false); } /********************* Add Lamp Operator ********************/ @@ -900,7 +900,7 @@ static int object_lamp_add_exec(bContext *C, wmOperator *op) if (!ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, NULL, &layer, NULL)) return OPERATOR_CANCELLED; - ob = ED_object_add_type(C, OB_LAMP, loc, rot, FALSE, layer); + ob = ED_object_add_type(C, OB_LAMP, loc, rot, false, layer); la = (Lamp *)ob->data; la->type = type; @@ -909,7 +909,7 @@ static int object_lamp_add_exec(bContext *C, wmOperator *op) if (BKE_scene_use_new_shading_nodes(scene)) { ED_node_shader_default(C, &la->id); - la->use_nodes = TRUE; + la->use_nodes = true; } return OPERATOR_FINISHED; @@ -934,7 +934,7 @@ void OBJECT_OT_lamp_add(wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "type", lamp_type_items, 0, "Type", ""); RNA_def_property_translation_context(ot->prop, BLF_I18NCONTEXT_ID_LAMP); - ED_object_add_generic_props(ot, FALSE); + ED_object_add_generic_props(ot, false); } /********************* Add Group Instance Operator ********************/ @@ -967,7 +967,7 @@ static int group_instance_add_exec(bContext *C, wmOperator *op) if (group) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - Object *ob = ED_object_add_type(C, OB_EMPTY, loc, rot, FALSE, layer); + Object *ob = ED_object_add_type(C, OB_EMPTY, loc, rot, false, layer); rename_id(&ob->id, group->id.name + 2); ob->dup_group = group; ob->transflag |= OB_DUPLIGROUP; @@ -1004,7 +1004,7 @@ void OBJECT_OT_group_instance_add(wmOperatorType *ot) RNA_def_string(ot->srna, "name", "Group", MAX_ID_NAME - 2, "Name", "Group name to add"); ot->prop = RNA_def_enum(ot->srna, "group", DummyRNA_NULL_items, 0, "Group", ""); RNA_def_enum_funcs(ot->prop, RNA_group_itemf); - ED_object_add_generic_props(ot, FALSE); + ED_object_add_generic_props(ot, false); } /********************* Add Speaker Operator ********************/ @@ -1019,7 +1019,7 @@ static int object_speaker_add_exec(bContext *C, wmOperator *op) if (!ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, NULL, &layer, NULL)) return OPERATOR_CANCELLED; - ob = ED_object_add_type(C, OB_SPEAKER, loc, rot, FALSE, layer); + ob = ED_object_add_type(C, OB_SPEAKER, loc, rot, false, layer); /* to make it easier to start using this immediately in NLA, a default sound clip is created * ready to be moved around to retime the sound and/or make new sound clips @@ -1059,7 +1059,7 @@ void OBJECT_OT_speaker_add(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - ED_object_add_generic_props(ot, TRUE); + ED_object_add_generic_props(ot, true); } /**************************** Delete Object *************************/ @@ -1093,7 +1093,7 @@ static int object_delete_exec(bContext *C, wmOperator *op) Scene *scene = CTX_data_scene(C); wmWindowManager *wm = CTX_wm_manager(C); wmWindow *win; - const short use_global = RNA_boolean_get(op->ptr, "use_global"); + const bool use_global = RNA_boolean_get(op->ptr, "use_global"); bool changed = false; if (CTX_data_edit_object(C)) @@ -1310,7 +1310,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base, ob->lay = base->lay; copy_m4_m4(ob->obmat, dob->mat); - BKE_object_apply_mat4(ob, ob->obmat, FALSE, FALSE); + BKE_object_apply_mat4(ob, ob->obmat, false, false); if (dupli_gh) BLI_ghash_insert(dupli_gh, dob, ob); @@ -1358,7 +1358,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base, /* note, this may be the parent of other objects, but it should * still work out ok */ - BKE_object_apply_mat4(ob_dst, dob->mat, FALSE, TRUE); + BKE_object_apply_mat4(ob_dst, dob->mat, false, true); /* to set ob_dst->orig and in case theres any other discrepicies */ DAG_id_tag_update(&ob_dst->id, OB_RECALC_OB); @@ -1377,7 +1377,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base, /* similer to the code above, see comments */ invert_m4_m4(ob_dst->parentinv, dob->mat); - BKE_object_apply_mat4(ob_dst, dob->mat, FALSE, TRUE); + BKE_object_apply_mat4(ob_dst, dob->mat, false, true); DAG_id_tag_update(&ob_dst->id, OB_RECALC_OB); } } @@ -1465,7 +1465,7 @@ static void convert_ensure_curve_cache(Main *bmain, Scene *scene, Object *ob) * redo we might end up with an object which isn't evaluated yet. */ if (ELEM3(ob->type, OB_SURF, OB_CURVE, OB_FONT)) { - BKE_displist_make_curveTypes(scene, ob, FALSE); + BKE_displist_make_curveTypes(scene, ob, false); } else if (ob->type == OB_MBALL) { BKE_displist_make_mball(bmain->eval_ctx, scene, ob); diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index 1f022c922e8..5a8d1d081f8 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -548,7 +548,7 @@ static int multiresbake_image_exec(bContext *C, wmOperator *op) WM_jobs_timer(wm_job, 0.5, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */ WM_jobs_callbacks(wm_job, multiresbake_startjob, NULL, NULL, NULL); - G.is_break = FALSE; + G.is_break = false; WM_jobs_start(CTX_wm_manager(C), wm_job); WM_cursor_wait(0); @@ -721,7 +721,7 @@ static void bake_startjob(void *bkv, short *stop, short *do_update, float *progr bkr->progress = progress; RE_test_break_cb(bkr->re, NULL, thread_break); - G.is_break = FALSE; /* blender_test_break uses this global */ + G.is_break = false; /* blender_test_break uses this global */ RE_Database_Baking(bkr->re, bmain, scene, scene->lay, scene->r.bake_mode, bkr->actob); @@ -751,7 +751,7 @@ static void bake_freejob(void *bkv) BKE_report(bkr->reports, RPT_WARNING, "Circular reference in texture stack"); MEM_freeN(bkr); - G.is_rendering = FALSE; + G.is_rendering = false; } /* catch esc */ @@ -807,8 +807,8 @@ static int objects_bake_render_invoke(bContext *C, wmOperator *op, const wmEvent WM_jobs_timer(wm_job, 0.5, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */ WM_jobs_callbacks(wm_job, bake_startjob, NULL, bake_update, NULL); - G.is_break = FALSE; - G.is_rendering = TRUE; + G.is_break = false; + G.is_rendering = true; WM_jobs_start(CTX_wm_manager(C), wm_job); @@ -848,7 +848,7 @@ static int bake_image_exec(bContext *C, wmOperator *op) bkr.reports = op->reports; RE_test_break_cb(bkr.re, NULL, thread_break); - G.is_break = FALSE; /* blender_test_break uses this global */ + G.is_break = false; /* blender_test_break uses this global */ RE_Database_Baking(bkr.re, bmain, scene, scene->lay, scene->r.bake_mode, (scene->r.bake_flag & R_BAKE_TO_ACTIVE) ? OBACT : NULL); diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 1e7e543ccb8..9b79b2e93da 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -1400,7 +1400,7 @@ static int pose_constraint_copy_exec(bContext *C, wmOperator *op) { /* if we're not handling the object we're copying from, copy all constraints over */ if (pchan != chan) { - BKE_copy_constraints(&chan->constraints, &pchan->constraints, TRUE); + BKE_copy_constraints(&chan->constraints, &pchan->constraints, true); /* update flags (need to add here, not just copy) */ chan->constflag |= pchan->constflag; } @@ -1440,7 +1440,7 @@ static int object_constraint_copy_exec(bContext *C, wmOperator *UNUSED(op)) { /* if we're not handling the object we're copying from, copy all constraints over */ if (obact != ob) { - BKE_copy_constraints(&ob->constraints, &obact->constraints, TRUE); + BKE_copy_constraints(&ob->constraints, &obact->constraints, true); DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } } diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 201ce460f88..7ae54a1a803 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -990,7 +990,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) } else if (event == 22) { /* Copy the constraint channels over */ - BKE_copy_constraints(&base->object->constraints, &ob->constraints, TRUE); + BKE_copy_constraints(&base->object->constraints, &ob->constraints, true); do_depgraph_update = true; } @@ -998,7 +998,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) base->object->softflag = ob->softflag; if (base->object->soft) sbFree(base->object->soft); - base->object->soft = copy_softbody(ob->soft, FALSE); + base->object->soft = copy_softbody(ob->soft, false); if (!modifiers_findByType(base->object, eModifierType_Softbody)) { BLI_addhead(&base->object->modifiers, modifier_new(eModifierType_Softbody)); @@ -1439,7 +1439,7 @@ static void UNUSED_FUNCTION(image_aspect) (Scene *scene, View3D *v3d) for (base = FIRSTBASE; base; base = base->next) { if (TESTBASELIB(v3d, base)) { ob = base->object; - done = FALSE; + done = false; for (a = 1; a <= ob->totcol; a++) { ma = give_current_material(ob, a); @@ -1469,7 +1469,7 @@ static void UNUSED_FUNCTION(image_aspect) (Scene *scene, View3D *v3d) if (x > y) ob->size[0] = ob->size[1] * x / y; else ob->size[1] = ob->size[0] * y / x; - done = TRUE; + done = true; DAG_id_tag_update(&ob->id, OB_RECALC_OB); BKE_image_release_ibuf(tex->ima, ibuf, NULL); diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index 5e7572e3681..e67381a1d43 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -152,7 +152,7 @@ static void select_editbmesh_hook(Object *ob, HookModifierData *hmd) BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) { if (nr == hmd->indexar[index]) { - BM_vert_select_set(em->bm, eve, TRUE); + BM_vert_select_set(em->bm, eve, true); if (index < hmd->totindex - 1) index++; } @@ -474,7 +474,7 @@ static int add_hook_object(Main *bmain, Scene *scene, Object *obedit, Object *ob if (!ok) { BKE_report(reports, RPT_ERROR, "Requires selected vertices or active vertex group"); - return FALSE; + return false; } if (mode == OBJECT_ADDHOOK_NEWOB && !ob) { @@ -533,7 +533,7 @@ static int add_hook_object(Main *bmain, Scene *scene, Object *obedit, Object *ob DAG_relations_tag_update(bmain); - return TRUE; + return true; } static int object_add_hook_selob_exec(bContext *C, wmOperator *op) @@ -587,7 +587,7 @@ void OBJECT_OT_hook_add_selob(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "use_bone", FALSE, "Active Bone", + RNA_def_boolean(ot->srna, "use_bone", false, "Active Bone", "Assign the hook to the hook objects active bone"); } diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c index 196e912e74e..2af2ca3b0e9 100644 --- a/source/blender/editors/object/object_lattice.c +++ b/source/blender/editors/object/object_lattice.c @@ -886,7 +886,7 @@ bool mouse_lattice(bContext *C, const int mval[2], bool extend, bool deselect, b view3d_set_viewcontext(C, &vc); lt = ((Lattice *)vc.obedit->data)->editlatt->latt; - bp = findnearestLattvert(&vc, mval, TRUE); + bp = findnearestLattvert(&vc, mval, true); if (bp) { if (extend) { diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 327e840a873..234273de9b9 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -175,8 +175,8 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc return new_md; } -/* Return TRUE if the object has a modifier of type 'type' other than - * the modifier pointed to be 'exclude', otherwise returns FALSE. */ +/* Return true if the object has a modifier of type 'type' other than + * the modifier pointed to be 'exclude', otherwise returns false. */ static bool object_has_modifier(const Object *ob, const ModifierData *exclude, ModifierType type) { @@ -184,19 +184,19 @@ static bool object_has_modifier(const Object *ob, const ModifierData *exclude, for (md = ob->modifiers.first; md; md = md->next) { if ((md != exclude) && (md->type == type)) - return TRUE; + return true; } - return FALSE; + return false; } /* If the object data of 'orig_ob' has other users, run 'callback' on * each of them. * - * If include_orig is TRUE, the callback will run on 'orig_ob' too. + * If include_orig is true, the callback will run on 'orig_ob' too. * - * If the callback ever returns TRUE, iteration will stop and the - * function value will be TRUE. Otherwise the function returns FALSE. + * If the callback ever returns true, iteration will stop and the + * function value will be true. Otherwise the function returns false. */ bool ED_object_iter_other(Main *bmain, Object *orig_ob, const bool include_orig, bool (*callback)(Object *ob, void *callback_data), @@ -220,7 +220,7 @@ bool ED_object_iter_other(Main *bmain, Object *orig_ob, const bool include_orig, (ob->data == orig_ob->data)) { if (callback(ob, callback_data)) - return TRUE; + return true; totfound++; } @@ -230,7 +230,7 @@ bool ED_object_iter_other(Main *bmain, Object *orig_ob, const bool include_orig, return callback(orig_ob, callback_data); } - return FALSE; + return false; } static bool object_has_modifier_cb(Object *ob, void *data) @@ -254,16 +254,16 @@ bool ED_object_multires_update_totlevels_cb(Object *ob, void *totlevel_v) DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } } - return FALSE; + return false; } -/* Return TRUE if no modifier of type 'type' other than 'exclude' */ +/* Return true if no modifier of type 'type' other than 'exclude' */ static bool object_modifier_safe_to_delete(Main *bmain, Object *ob, ModifierData *exclude, ModifierType type) { return (!object_has_modifier(ob, exclude, type) && - !ED_object_iter_other(bmain, ob, FALSE, + !ED_object_iter_other(bmain, ob, false, object_has_modifier_cb, &type)); } @@ -678,7 +678,7 @@ int ED_object_modifier_apply(ReportList *reports, Scene *scene, Object *ob, Modi } else if ((ob->mode & OB_MODE_SCULPT) && (find_multires_modifier_before(scene, md)) && - (modifier_isSameTopology(md) == FALSE)) + (modifier_isSameTopology(md) == false)) { BKE_report(reports, RPT_ERROR, "Constructive modifier cannot be applied to multi-res data in sculpt mode"); return 0; @@ -834,18 +834,18 @@ static int edit_modifier_invoke_properties(bContext *C, wmOperator *op) ModifierData *md; if (RNA_struct_property_is_set(op->ptr, "modifier")) { - return TRUE; + return true; } else { PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_Modifier); if (ptr.data) { md = ptr.data; RNA_string_set(op->ptr, "modifier", md->name); - return TRUE; + return true; } } - return FALSE; + return false; } static ModifierData *edit_modifier_property_get(wmOperator *op, Object *ob, int type) @@ -1134,7 +1134,7 @@ static int multires_higher_levels_delete_exec(bContext *C, wmOperator *op) multiresModifier_del_levels(mmd, ob, 1); - ED_object_iter_other(CTX_data_main(C), ob, TRUE, + ED_object_iter_other(CTX_data_main(C), ob, true, ED_object_multires_update_totlevels_cb, &mmd->totlvl); @@ -1178,7 +1178,7 @@ static int multires_subdivide_exec(bContext *C, wmOperator *op) multiresModifier_subdivide(mmd, ob, 0, mmd->simple); - ED_object_iter_other(CTX_data_main(C), ob, TRUE, + ED_object_iter_other(CTX_data_main(C), ob, true, ED_object_multires_update_totlevels_cb, &mmd->totlvl); @@ -1974,7 +1974,7 @@ static void init_ocean_modifier_bake(struct Ocean *oc, struct OceanModifierData if (!omd || !oc) return; - do_heightfield = TRUE; + do_heightfield = true; do_chop = (omd->chop_amount > 0); do_normals = (omd->flag & MOD_OCEAN_GENERATE_NORMALS); do_jacobian = (omd->flag & MOD_OCEAN_GENERATE_FOAM); @@ -2023,7 +2023,7 @@ static void oceanbake_update(void *customdata, float progress, int *cancel) if (oceanbake_breakjob(oj)) *cancel = 1; - *(oj->do_update) = TRUE; + *(oj->do_update) = true; *(oj->progress) = progress; } @@ -2035,11 +2035,11 @@ static void oceanbake_startjob(void *customdata, short *stop, short *do_update, oj->do_update = do_update; oj->progress = progress; - G.is_break = FALSE; /* XXX shared with render - replace with job 'stop' switch */ + G.is_break = false; /* XXX shared with render - replace with job 'stop' switch */ BKE_bake_ocean(oj->ocean, oj->och, oceanbake_update, (void *)oj); - *do_update = TRUE; + *do_update = true; *stop = 0; } @@ -2053,7 +2053,7 @@ static void oceanbake_endjob(void *customdata) } oj->omd->oceancache = oj->och; - oj->omd->cached = TRUE; + oj->omd->cached = true; } static int ocean_bake_exec(bContext *C, wmOperator *op) @@ -2120,7 +2120,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op) BKE_bake_ocean(ocean, och); omd->oceancache = och; - omd->cached = TRUE; + omd->cached = true; scene->r.cfra = cfra; @@ -2174,7 +2174,7 @@ void OBJECT_OT_ocean_bake(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL; edit_modifier_properties(ot); - RNA_def_boolean(ot->srna, "free", FALSE, "Free", "Free the bake, rather than generating it"); + RNA_def_boolean(ot->srna, "free", false, "Free", "Free the bake, rather than generating it"); } /************************ LaplacianDeform bind operator *********************/ diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index eee811abeee..5f93f4b5deb 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -268,7 +268,7 @@ void ED_operatormacros_object(void) "Duplicate selected objects and move them", OPTYPE_UNDO | OPTYPE_REGISTER); if (ot) { otmacro = WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate"); - RNA_boolean_set(otmacro->ptr, "linked", TRUE); + RNA_boolean_set(otmacro->ptr, "linked", true); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); RNA_enum_set(otmacro->ptr, "proportional", PROP_EDIT_OFF); } @@ -293,19 +293,19 @@ void ED_keymap_object(wmKeyConfig *keyconf) /* Note: this keymap works disregarding mode */ kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "mode", OB_MODE_EDIT); - RNA_boolean_set(kmi->ptr, "toggle", TRUE); + RNA_boolean_set(kmi->ptr, "toggle", true); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, KM_CTRL, 0); RNA_enum_set(kmi->ptr, "mode", OB_MODE_POSE); - RNA_boolean_set(kmi->ptr, "toggle", TRUE); + RNA_boolean_set(kmi->ptr, "toggle", true); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", VKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "mode", OB_MODE_VERTEX_PAINT); - RNA_boolean_set(kmi->ptr, "toggle", TRUE); + RNA_boolean_set(kmi->ptr, "toggle", true); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, KM_CTRL, 0); RNA_enum_set(kmi->ptr, "mode", OB_MODE_WEIGHT_PAINT); - RNA_boolean_set(kmi->ptr, "toggle", TRUE); + RNA_boolean_set(kmi->ptr, "toggle", true); WM_keymap_add_item(keymap, "OBJECT_OT_origin_set", CKEY, KM_PRESS, KM_ALT | KM_SHIFT | KM_CTRL, 0); @@ -331,19 +331,19 @@ void ED_keymap_object(wmKeyConfig *keyconf) kmi = WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0); RNA_enum_set_identifier(kmi->ptr, "direction", "PARENT"); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set_identifier(kmi->ptr, "direction", "PARENT"); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0); RNA_enum_set_identifier(kmi->ptr, "direction", "CHILD"); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set_identifier(kmi->ptr, "direction", "CHILD"); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); WM_keymap_verify_item(keymap, "OBJECT_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_verify_item(keymap, "OBJECT_OT_parent_no_inverse_set", PKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0); @@ -361,10 +361,10 @@ void ED_keymap_object(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "OBJECT_OT_hide_view_clear", HKEY, KM_PRESS, KM_ALT, 0); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_hide_view_set", 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, "OBJECT_OT_hide_view_set", HKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", true); /* same as above but for rendering */ WM_keymap_add_item(keymap, "OBJECT_OT_hide_render_clear", HKEY, KM_PRESS, KM_ALT | KM_CTRL, 0); @@ -373,21 +373,21 @@ void ED_keymap_object(wmKeyConfig *keyconf) /* conflicts, removing */ #if 0 kmi = WM_keymap_add_item(keymap, "OBJECT_OT_hide_render_set", HKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0) - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", true); #endif WM_keymap_add_item(keymap, "OBJECT_OT_move_to_layer", MKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_delete", XKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "use_global", FALSE); + RNA_boolean_set(kmi->ptr, "use_global", false); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_delete", XKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "use_global", TRUE); + RNA_boolean_set(kmi->ptr, "use_global", true); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_delete", DELKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "use_global", FALSE); + RNA_boolean_set(kmi->ptr, "use_global", false); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_delete", DELKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "use_global", TRUE); + RNA_boolean_set(kmi->ptr, "use_global", true); WM_keymap_add_menu(keymap, "INFO_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0); @@ -445,7 +445,7 @@ void ED_keymap_object(wmKeyConfig *keyconf) WM_keymap_add_menu(keymap, "VIEW3D_MT_hook", HKEY, KM_PRESS, KM_CTRL, 0); ED_keymap_proportional_cycle(keyconf, keymap); - ED_keymap_proportional_editmode(keyconf, keymap, FALSE); + ED_keymap_proportional_editmode(keyconf, keymap, false); } void ED_keymap_proportional_cycle(struct wmKeyConfig *UNUSED(keyconf), struct wmKeyMap *keymap) diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index c1adabf0a94..7e138639cea 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -450,7 +450,7 @@ static void object_remove_parent_deform_modifiers(Object *ob, const Object *par) /* assume that we only need to remove the first instance of matching deform modifier here */ for (md = ob->modifiers.first; md; md = mdn) { - short free = FALSE; + bool free = false; mdn = md->next; @@ -458,19 +458,19 @@ static void object_remove_parent_deform_modifiers(Object *ob, const Object *par) if ((md->type == eModifierType_Armature) && (par->type == OB_ARMATURE)) { ArmatureModifierData *amd = (ArmatureModifierData *)md; if (amd->object == par) { - free = TRUE; + free = true; } } else if ((md->type == eModifierType_Lattice) && (par->type == OB_LATTICE)) { LatticeModifierData *lmd = (LatticeModifierData *)md; if (lmd->object == par) { - free = TRUE; + free = true; } } else if ((md->type == eModifierType_Curve) && (par->type == OB_CURVE)) { CurveModifierData *cmd = (CurveModifierData *)md; if (cmd->object == par) { - free = TRUE; + free = true; } } @@ -502,7 +502,7 @@ void ED_object_parent_clear(Object *ob, int type) { /* remove parent, and apply the parented transform result as object's local transforms */ ob->parent = NULL; - BKE_object_apply_mat4(ob, ob->obmat, TRUE, FALSE); + BKE_object_apply_mat4(ob, ob->obmat, true, false); break; } case CLEAR_PARENT_INVERSE: @@ -650,7 +650,7 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object if (keep_transform) { /* was removed because of bug [#23577], * but this can be handy in some cases too [#32616], so make optional */ - BKE_object_apply_mat4(ob, ob->obmat, FALSE, FALSE); + BKE_object_apply_mat4(ob, ob->obmat, false, false); } /* set the parent (except for follow-path constraint option) */ @@ -750,7 +750,7 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object } else if (pararm && (ob->type == OB_MESH) && (par->type == OB_ARMATURE)) { if (partype == PAR_ARMATURE_NAME) - create_vgroups_from_armature(reports, scene, ob, par, ARM_GROUPS_NAME, FALSE); + create_vgroups_from_armature(reports, scene, ob, par, ARM_GROUPS_NAME, false); else if (partype == PAR_ARMATURE_ENVELOPE) create_vgroups_from_armature(reports, scene, ob, par, ARM_GROUPS_ENVELOPE, xmirror); else if (partype == PAR_ARMATURE_AUTO) { @@ -871,7 +871,7 @@ static int parent_set_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent uiPopupMenu *pup = uiPupMenuBegin(C, IFACE_("Set Parent To"), ICON_NONE); uiLayout *layout = uiPupMenuLayout(pup); - wmOperatorType *ot = WM_operatortype_find("OBJECT_OT_parent_set", TRUE); + wmOperatorType *ot = WM_operatortype_find("OBJECT_OT_parent_set", true); PointerRNA opptr; #if 0 @@ -879,12 +879,12 @@ static int parent_set_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent #else opptr = uiItemFullO_ptr(layout, ot, IFACE_("Object"), ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&opptr, "type", PAR_OBJECT); - RNA_boolean_set(&opptr, "keep_transform", FALSE); + RNA_boolean_set(&opptr, "keep_transform", false); opptr = uiItemFullO_ptr(layout, ot, IFACE_("Object (Keep Transform)"), ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&opptr, "type", PAR_OBJECT); - RNA_boolean_set(&opptr, "keep_transform", TRUE); + RNA_boolean_set(&opptr, "keep_transform", true); #endif /* ob becomes parent, make the associated menus */ if (ob->type == OB_ARMATURE) { @@ -960,9 +960,9 @@ void OBJECT_OT_parent_set(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_enum(ot->srna, "type", prop_make_parent_types, 0, "Type", ""); - RNA_def_boolean(ot->srna, "xmirror", FALSE, "X Mirror", + RNA_def_boolean(ot->srna, "xmirror", false, "X Mirror", "Apply weights symmetrically along X axis, for Envelope/Automatic vertex groups creation"); - RNA_def_boolean(ot->srna, "keep_transform", FALSE, "Keep Transform", + RNA_def_boolean(ot->srna, "keep_transform", false, "Keep Transform", "Apply transformation before parenting"); } @@ -1134,7 +1134,7 @@ static int object_track_clear_exec(bContext *C, wmOperator *op) } if (type == 1) - BKE_object_apply_mat4(ob, ob->obmat, TRUE, TRUE); + BKE_object_apply_mat4(ob, ob->obmat, true, true); } CTX_DATA_END; @@ -1320,7 +1320,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op) Scene *scene = CTX_data_scene(C); View3D *v3d = CTX_wm_view3d(C); unsigned int lay, local; - /* bool is_lamp = FALSE; */ /* UNUSED */ + /* bool is_lamp = false; */ /* UNUSED */ lay = move_to_layer_init(C, op); lay &= 0xFFFFFF; @@ -1337,7 +1337,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op) base->object->lay = lay; base->object->flag &= ~SELECT; base->flag &= ~SELECT; - /* if (base->object->type == OB_LAMP) is_lamp = TRUE; */ + /* if (base->object->type == OB_LAMP) is_lamp = true; */ } CTX_DATA_END; } @@ -1350,7 +1350,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op) local = base->lay & 0xFF000000; base->lay = lay + local; base->object->lay = lay; - /* if (base->object->type == OB_LAMP) is_lamp = TRUE; */ + /* if (base->object->type == OB_LAMP) is_lamp = true; */ } CTX_DATA_END; } @@ -1549,13 +1549,13 @@ static int make_links_data_exec(bContext *C, wmOperator *op) DAG_id_tag_update(&ob_dst->id, 0); break; case MAKE_LINKS_ANIMDATA: - BKE_copy_animdata_id((ID *)ob_dst, (ID *)ob_src, FALSE); + BKE_copy_animdata_id((ID *)ob_dst, (ID *)ob_src, false); if (ob_dst->data && ob_src->data) { if (obdata_id->lib) { is_lib = true; break; } - BKE_copy_animdata_id((ID *)ob_dst->data, (ID *)ob_src->data, FALSE); + BKE_copy_animdata_id((ID *)ob_dst->data, (ID *)ob_src->data, false); } DAG_id_tag_update(&ob_dst->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); break; @@ -1572,7 +1572,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op) BKE_group_object_add(group_node->link, ob_dst, scene, base_dst); } else { - is_cycle = TRUE; + is_cycle = true; } } break; @@ -2289,7 +2289,7 @@ static int make_single_user_exec(bContext *C, wmOperator *op) #if 0 /* can't do this separate from materials */ if (RNA_boolean_get(op->ptr, "texture")) - single_mat_users(scene, flag, TRUE); + single_mat_users(scene, flag, true); #endif if (RNA_boolean_get(op->ptr, "animation")) single_object_action_users(scene, flag); diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index a1f447fbf50..41ca4bf50e7 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -183,7 +183,7 @@ void OBJECT_OT_select_by_type(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", object_type_items, 1, "Type", ""); } @@ -398,7 +398,7 @@ void ED_object_select_linked_by_id(bContext *C, ID *id) changed = object_select_all_by_obdata(C, id); } else if (idtype == ID_MA) { - changed = object_select_all_by_material_texture(C, FALSE, (Material *)id, NULL); + changed = object_select_all_by_material_texture(C, false, (Material *)id, NULL); } else if (idtype == ID_LI) { changed = object_select_all_by_library(C, (Library *) id); @@ -447,12 +447,12 @@ static int object_select_linked_exec(bContext *C, wmOperator *op) else if (nr == OBJECT_SELECT_LINKED_MATERIAL || nr == OBJECT_SELECT_LINKED_TEXTURE) { Material *mat = NULL; Tex *tex = NULL; - int use_texture = FALSE; + bool use_texture = false; mat = give_current_material(ob, ob->actcol); if (mat == NULL) return OPERATOR_CANCELLED; if (nr == OBJECT_SELECT_LINKED_TEXTURE) { - use_texture = TRUE; + use_texture = true; if (mat->mtex[(int)mat->texact]) tex = mat->mtex[(int)mat->texact]->tex; if (tex == NULL) return OPERATOR_CANCELLED; @@ -509,7 +509,7 @@ void OBJECT_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"); ot->prop = RNA_def_enum(ot->srna, "type", prop_select_linked_types, 0, "Type", ""); } @@ -885,7 +885,7 @@ void OBJECT_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", ""); } @@ -951,7 +951,7 @@ void OBJECT_OT_select_by_layer(wmOperatorType *ot) /* properties */ RNA_def_enum(ot->srna, "match", match_items, 0, "Match", ""); - 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"); RNA_def_int(ot->srna, "layers", 1, 1, 20, "Layer", "", 1, 20); } diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 1682cde9f16..b0d3d363c45 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -368,7 +368,7 @@ static void ignore_parent_tx(Main *bmain, Scene *scene, Object *ob) /* a change was made, adjust the children to compensate */ for (ob_child = bmain->object.first; ob_child; ob_child = ob_child->id.next) { if (ob_child->parent == ob) { - BKE_object_apply_mat4(ob_child, ob_child->obmat, TRUE, FALSE); + BKE_object_apply_mat4(ob_child, ob_child->obmat, true, false); BKE_object_workob_calc_parent(scene, ob_child, &workob); invert_m4_m4(ob_child->parentinv, workob.obmat); } @@ -442,7 +442,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo float tmat[3][3], timat[3][3]; /* simple rotation matrix */ - BKE_object_rot_to_mat3(ob, rsmat, TRUE); + BKE_object_rot_to_mat3(ob, rsmat, true); /* correct for scale, note mul_m3_m3m3 has swapped args! */ BKE_object_scale_to_mat3(ob, tmat); @@ -613,7 +613,7 @@ static int visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op)) CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) { BKE_object_where_is_calc(scene, ob); - BKE_object_apply_mat4(ob, ob->obmat, TRUE, TRUE); + BKE_object_apply_mat4(ob, ob->obmat, true, true); BKE_object_where_is_calc(scene, ob); /* update for any children that may get moved */ @@ -818,7 +818,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) float min[3], max[3]; /* only bounds support */ INIT_MINMAX(min, max); - BKE_object_minmax_dupli(scene, ob, min, max, TRUE); + BKE_object_minmax_dupli(scene, ob, min, max, true); mid_v3_v3v3(cent, min, max); invert_m4_m4(ob->imat, ob->obmat); mul_m4_v3(ob->imat, cent); @@ -828,7 +828,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) tot_change++; ob->dup_group->id.flag |= LIB_DOIT; - do_inverse_offset = TRUE; + do_inverse_offset = true; } } } @@ -849,7 +849,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) tot_change++; me->id.flag |= LIB_DOIT; - do_inverse_offset = TRUE; + do_inverse_offset = true; } else if (ELEM(ob->type, OB_CURVE, OB_SURF)) { Curve *cu = ob->data; @@ -867,7 +867,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) tot_change++; cu->id.flag |= LIB_DOIT; - do_inverse_offset = TRUE; + do_inverse_offset = true; if (obedit) { if (centermode == GEOMETRY_TO_ORIGIN) { @@ -900,7 +900,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) tot_change++; cu->id.flag |= LIB_DOIT; - do_inverse_offset = TRUE; + do_inverse_offset = true; } } else if (ob->type == OB_ARMATURE) { @@ -921,7 +921,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) tot_change++; arm->id.flag |= LIB_DOIT; - /* do_inverse_offset = TRUE; */ /* docenter_armature() handles this */ + /* do_inverse_offset = true; */ /* docenter_armature() handles this */ BKE_object_where_is_calc(scene, ob); BKE_pose_where_is(scene, ob); /* needed for bone parents */ @@ -944,7 +944,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) tot_change++; mb->id.flag |= LIB_DOIT; - do_inverse_offset = TRUE; + do_inverse_offset = true; if (obedit) { if (centermode == GEOMETRY_TO_ORIGIN) { @@ -965,7 +965,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) tot_change++; lt->id.flag |= LIB_DOIT; - do_inverse_offset = TRUE; + do_inverse_offset = true; } /* offset other selected objects */ |