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/object_add.c | |
parent | 2c00ecc738c04dc5dc22d4a6b81a1e937526ba6d (diff) |
Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define
Diffstat (limited to 'source/blender/editors/object/object_add.c')
-rw-r--r-- | source/blender/editors/object/object_add.c | 58 |
1 files changed, 29 insertions, 29 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); |