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/uvedit/uvedit_ops.c | |
parent | 2c00ecc738c04dc5dc22d4a6b81a1e937526ba6d (diff) |
Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_ops.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 8fc3e7952ca..f5dcac7e062 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -147,14 +147,14 @@ bool ED_object_get_active_image(Object *ob, int mat_nr, if (r_ima) *r_ima = (Image *)node->id; if (r_iuser) *r_iuser = NULL; if (r_node) *r_node = node; - return TRUE; + return true; } if (r_ima) *r_ima = NULL; if (r_iuser) *r_iuser = NULL; if (r_node) *r_node = node; - return FALSE; + return false; } void ED_object_assign_active_image(Main *bmain, Object *ob, int mat_nr, Image *ima) @@ -389,7 +389,7 @@ bool uvedit_face_select_enable(Scene *scene, BMEditMesh *em, BMFace *efa, const ToolSettings *ts = scene->toolsettings; if (ts->uv_flag & UV_SYNC_SELECTION) { - BM_face_select_set(em->bm, efa, TRUE); + BM_face_select_set(em->bm, efa, true); if (do_history) { BM_select_history_store(em->bm, (BMElem *)efa); } @@ -416,7 +416,7 @@ bool uvedit_face_select_disable(Scene *scene, BMEditMesh *em, BMFace *efa, ToolSettings *ts = scene->toolsettings; if (ts->uv_flag & UV_SYNC_SELECTION) { - BM_face_select_set(em->bm, efa, FALSE); + BM_face_select_set(em->bm, efa, false); } else { BMLoop *l; @@ -481,12 +481,12 @@ void uvedit_edge_select_enable(BMEditMesh *em, Scene *scene, BMLoop *l, const bo if (ts->uv_flag & UV_SYNC_SELECTION) { if (ts->selectmode & SCE_SELECT_FACE) - BM_face_select_set(em->bm, l->f, TRUE); + BM_face_select_set(em->bm, l->f, true); else if (ts->selectmode & SCE_SELECT_EDGE) - BM_edge_select_set(em->bm, l->e, TRUE); + BM_edge_select_set(em->bm, l->e, true); else { - BM_vert_select_set(em->bm, l->e->v1, TRUE); - BM_vert_select_set(em->bm, l->e->v2, TRUE); + BM_vert_select_set(em->bm, l->e->v1, true); + BM_vert_select_set(em->bm, l->e->v2, true); } if (do_history) { @@ -512,12 +512,12 @@ void uvedit_edge_select_disable(BMEditMesh *em, Scene *scene, BMLoop *l, if (ts->uv_flag & UV_SYNC_SELECTION) { if (ts->selectmode & SCE_SELECT_FACE) - BM_face_select_set(em->bm, l->f, FALSE); + BM_face_select_set(em->bm, l->f, false); else if (ts->selectmode & SCE_SELECT_EDGE) - BM_edge_select_set(em->bm, l->e, FALSE); + BM_edge_select_set(em->bm, l->e, false); else { - BM_vert_select_set(em->bm, l->e->v1, FALSE); - BM_vert_select_set(em->bm, l->e->v2, FALSE); + BM_vert_select_set(em->bm, l->e->v1, false); + BM_vert_select_set(em->bm, l->e->v2, false); } } else { @@ -566,9 +566,9 @@ void uvedit_uv_select_enable(BMEditMesh *em, Scene *scene, BMLoop *l, if (ts->uv_flag & UV_SYNC_SELECTION) { if (ts->selectmode & SCE_SELECT_FACE) - BM_face_select_set(em->bm, l->f, TRUE); + BM_face_select_set(em->bm, l->f, true); else - BM_vert_select_set(em->bm, l->v, TRUE); + BM_vert_select_set(em->bm, l->v, true); if (do_history) { BM_select_history_remove(em->bm, (BMElem *)l->v); @@ -587,9 +587,9 @@ void uvedit_uv_select_disable(BMEditMesh *em, Scene *scene, BMLoop *l, if (ts->uv_flag & UV_SYNC_SELECTION) { if (ts->selectmode & SCE_SELECT_FACE) - BM_face_select_set(em->bm, l->f, FALSE); + BM_face_select_set(em->bm, l->f, false); else - BM_vert_select_set(em->bm, l->v, FALSE); + BM_vert_select_set(em->bm, l->v, false); } else { MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); @@ -1016,7 +1016,7 @@ static int uv_select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestH uv_select_all_perform(scene, ima, em, SEL_DESELECT); } - BM_mesh_elem_hflag_disable_all(em->bm, BM_FACE, BM_ELEM_TAG, FALSE); + BM_mesh_elem_hflag_disable_all(em->bm, BM_FACE, BM_ELEM_TAG, false); /* set flags for first face and verts */ iterv_curr = uv_select_edgeloop_vertex_map_get(vmap, hit->efa, hit->l); @@ -1708,7 +1708,7 @@ static int uv_remove_doubles_exec(bContext *C, wmOperator *op) scene = CTX_data_scene(C); ima = CTX_data_edit_image(C); - if (use_unselected == FALSE) { + if (use_unselected == false) { UVvert *vert_arr = NULL; BLI_array_declare(vert_arr); MLoopUV **loop_arr = NULL; @@ -2158,7 +2158,7 @@ static int uv_mouse_select(bContext *C, const float co[2], bool extend, bool loo /* de-selecting an edge may deselect a face too - validate */ if (sync) { - if (select == FALSE) { + if (select == false) { BM_select_history_validate(em->bm); } } @@ -2488,10 +2488,10 @@ static int uv_select_split_exec(bContext *C, wmOperator *op) luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); if (luv->flag & MLOOPUV_VERTSEL) { - is_sel = TRUE; + is_sel = true; } else { - is_unsel = TRUE; + is_unsel = true; } /* we have mixed selection, bail out */ @@ -2538,7 +2538,7 @@ static void uv_select_sync_flush(ToolSettings *ts, BMEditMesh *em, const short s /* bmesh API handles flushing but not on de-select */ if (ts->uv_flag & UV_SYNC_SELECTION) { if (ts->selectmode != SCE_SELECT_FACE) { - if (select == FALSE) { + if (select == false) { EDBM_deselect_flush(em); } else { @@ -2546,7 +2546,7 @@ static void uv_select_sync_flush(ToolSettings *ts, BMEditMesh *em, const short s } } - if (select == FALSE) { + if (select == false) { BM_select_history_validate(em->bm); } } @@ -2906,7 +2906,7 @@ static void UV_OT_select_border(wmOperatorType *ot) /* properties */ RNA_def_boolean(ot->srna, "pinned", 0, "Pinned", "Border select pinned UVs only"); - WM_operator_properties_gesture_border(ot, TRUE); + WM_operator_properties_gesture_border(ot, true); } /* ******************** circle select operator **************** */ @@ -3629,7 +3629,7 @@ static int uv_hide_exec(bContext *C, wmOperator *op) if (em->selectmode == SCE_SELECT_FACE) { /* check that every UV is selected */ if (bm_face_is_all_uv_sel(efa, true, cd_loop_uv_offset) == !swap) { - BM_face_select_set(em->bm, efa, FALSE); + BM_face_select_set(em->bm, efa, false); } uvedit_face_select_disable(scene, em, efa, cd_loop_uv_offset); } @@ -3638,7 +3638,7 @@ static int uv_hide_exec(bContext *C, wmOperator *op) BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) { luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); if (UV_SEL_TEST(luv, !swap)) { - BM_vert_select_set(em->bm, l->v, FALSE); + BM_vert_select_set(em->bm, l->v, false); } } } @@ -3648,7 +3648,7 @@ static int uv_hide_exec(bContext *C, wmOperator *op) else if (em->selectmode == SCE_SELECT_FACE) { /* check if a UV is de-selected */ if (bm_face_is_all_uv_sel(efa, false, cd_loop_uv_offset) != !swap) { - BM_face_select_set(em->bm, efa, FALSE); + BM_face_select_set(em->bm, efa, false); uvedit_face_select_disable(scene, em, efa, cd_loop_uv_offset); } } @@ -3656,7 +3656,7 @@ static int uv_hide_exec(bContext *C, wmOperator *op) BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) { luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); if (UV_SEL_TEST(luv, !swap)) { - BM_vert_select_set(em->bm, l->v, FALSE); + BM_vert_select_set(em->bm, l->v, false); if (!swap) luv->flag &= ~MLOOPUV_VERTSEL; } } @@ -3729,7 +3729,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *UNUSED(op)) luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); luv->flag |= MLOOPUV_VERTSEL; } - /* BM_face_select_set(em->bm, efa, TRUE); */ + /* BM_face_select_set(em->bm, efa, true); */ BM_elem_flag_enable(efa, BM_ELEM_TAG); } } @@ -3750,7 +3750,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *UNUSED(op)) luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); luv->flag |= MLOOPUV_VERTSEL; } - /* BM_face_select_set(em->bm, efa, TRUE); */ + /* BM_face_select_set(em->bm, efa, true); */ BM_elem_flag_enable(efa, BM_ELEM_TAG); } } @@ -3766,7 +3766,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *UNUSED(op)) luv->flag |= MLOOPUV_VERTSEL; } } - /* BM_face_select_set(em->bm, efa, TRUE); */ + /* BM_face_select_set(em->bm, efa, true); */ BM_elem_flag_enable(efa, BM_ELEM_TAG); } } @@ -3781,7 +3781,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *UNUSED(op)) luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); luv->flag |= MLOOPUV_VERTSEL; } - /* BM_face_select_set(em->bm, efa, TRUE); */ + /* BM_face_select_set(em->bm, efa, true); */ BM_elem_flag_enable(efa, BM_ELEM_TAG); } } @@ -3796,7 +3796,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *UNUSED(op)) luv->flag |= MLOOPUV_VERTSEL; } } - /* BM_face_select_set(em->bm, efa, TRUE); */ + /* BM_face_select_set(em->bm, efa, true); */ BM_elem_flag_enable(efa, BM_ELEM_TAG); } } @@ -4095,7 +4095,7 @@ static int uv_mark_seam_exec(bContext *C, wmOperator *UNUSED(op)) me->drawflag |= ME_DRAWSEAMS; if (scene->toolsettings->edge_mode_live_unwrap) - ED_unwrap_lscm(scene, ob, FALSE); + ED_unwrap_lscm(scene, ob, false); DAG_id_tag_update(&me->id, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); @@ -4182,30 +4182,30 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "UV_OT_mark_seam", EKEY, KM_PRESS, KM_CTRL, 0); /* pick selection */ - RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select", SELECTMOUSE, KM_PRESS, 0, 0)->ptr, "extend", FALSE); - RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", TRUE); - RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "extend", FALSE); - RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0)->ptr, "extend", TRUE); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select", SELECTMOUSE, KM_PRESS, 0, 0)->ptr, "extend", false); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", true); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "extend", false); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0)->ptr, "extend", true); WM_keymap_add_item(keymap, "UV_OT_select_split", YKEY, KM_PRESS, 0, 0); /* border/circle selection */ kmi = WM_keymap_add_item(keymap, "UV_OT_select_border", BKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "pinned", FALSE); + RNA_boolean_set(kmi->ptr, "pinned", false); kmi = WM_keymap_add_item(keymap, "UV_OT_select_border", BKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "pinned", TRUE); + RNA_boolean_set(kmi->ptr, "pinned", true); WM_keymap_add_item(keymap, "UV_OT_circle_select", CKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "UV_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); + RNA_boolean_set(kmi->ptr, "deselect", false); kmi = WM_keymap_add_item(keymap, "UV_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "deselect", TRUE); + RNA_boolean_set(kmi->ptr, "deselect", true); /* selection manipulation */ - RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0)->ptr, "extend", FALSE); - RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0)->ptr, "extend", FALSE); - RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked", LKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "extend", TRUE); - RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", TRUE); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0)->ptr, "extend", false); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0)->ptr, "extend", false); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked", LKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "extend", true); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", true); /* select more/less */ WM_keymap_add_item(keymap, "UV_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); @@ -4223,9 +4223,9 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf) /* uv operations */ WM_keymap_add_item(keymap, "UV_OT_stitch", VKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "UV_OT_pin", PKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "clear", FALSE); + RNA_boolean_set(kmi->ptr, "clear", false); kmi = WM_keymap_add_item(keymap, "UV_OT_pin", PKEY, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "clear", TRUE); + RNA_boolean_set(kmi->ptr, "clear", true); /* unwrap */ WM_keymap_add_item(keymap, "UV_OT_unwrap", EKEY, KM_PRESS, 0, 0); @@ -4235,9 +4235,9 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf) /* hide */ kmi = WM_keymap_add_item(keymap, "UV_OT_hide", 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, "UV_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", true); WM_keymap_add_item(keymap, "UV_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); @@ -4250,7 +4250,7 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf) WM_keymap_add_menu(keymap, "IMAGE_MT_uvs_select_mode", TABKEY, 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); transform_keymap_for_space(keyconf, keymap, SPACE_IMAGE); } |