diff options
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_draw.c | 8 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 124 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_unwrap_ops.c | 64 |
3 files changed, 98 insertions, 98 deletions
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index 4b2f23e823b..7b5a264a440 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -120,7 +120,7 @@ static void draw_uvs_shadow(SpaceImage *sima, Object *obedit) EditFace *efa; TFace *tf; - em= EM_GetEditMesh((Mesh*)obedit->data); + em= BKE_mesh_get_editmesh((Mesh*)obedit->data); /* draws the grey mesh when painting */ glColor3ub(112, 112, 112); @@ -136,7 +136,7 @@ static void draw_uvs_shadow(SpaceImage *sima, Object *obedit) glEnd(); } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } static int draw_uvs_dm_shadow(DerivedMesh *dm) @@ -428,7 +428,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) int drawfaces, interpedges, lastsel, sel; Image *ima= sima->image; - em= EM_GetEditMesh(me); + em= BKE_mesh_get_editmesh(me); activetf= EM_get_active_mtface(em, &efa_act, NULL, 0); /* will be set to NULL if hidden */ settings= scene->toolsettings; @@ -826,7 +826,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) } glPointSize(1.0); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } void draw_uvedit_main(SpaceImage *sima, ARegion *ar, Scene *scene, Object *obedit) diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 17b2aff1b21..0b82efda7ab 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -81,9 +81,9 @@ int ED_uvedit_test(Object *obedit) if(obedit->type != OB_MESH) return 0; - em = EM_GetEditMesh(obedit->data); + em = BKE_mesh_get_editmesh(obedit->data); ret = EM_texFaceCheck(em); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return ret; } @@ -105,9 +105,9 @@ void ED_uvedit_assign_image(Scene *scene, Object *obedit, Image *ima, Image *pre if(!obedit || (obedit->type != OB_MESH)) return; - em= EM_GetEditMesh(((Mesh*)obedit->data)); + em= BKE_mesh_get_editmesh(((Mesh*)obedit->data)); if(!em || !em->faces.first) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return; } @@ -145,7 +145,7 @@ void ED_uvedit_assign_image(Scene *scene, Object *obedit, Image *ima, Image *pre if(update) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } /* dotile - 1, set the tile flag (from the space image) @@ -164,7 +164,7 @@ void ED_uvedit_set_tile(bContext *C, Scene *scene, Object *obedit, Image *ima, i if(ima->type==IMA_TYPE_R_RESULT || ima->type==IMA_TYPE_COMPOSITE) return; - em= EM_GetEditMesh((Mesh*)obedit->data); + em= BKE_mesh_get_editmesh((Mesh*)obedit->data); for(efa= em->faces.first; efa; efa= efa->next) { tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE); @@ -184,7 +184,7 @@ void ED_uvedit_set_tile(bContext *C, Scene *scene, Object *obedit, Image *ima, i DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } /*********************** space conversion *********************/ @@ -368,7 +368,7 @@ void uv_copy_aspect(float uv_orig[][2], float uv[][2], float aspx, float aspy) int ED_uvedit_minmax(Scene *scene, Image *ima, Object *obedit, float *min, float *max) { - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; int sel; @@ -386,13 +386,13 @@ int ED_uvedit_minmax(Scene *scene, Image *ima, Object *obedit, float *min, float } } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return sel; } int uvedit_center(Scene *scene, Image *ima, Object *obedit, float *cent, int mode) { - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; float min[2], max[2]; @@ -421,11 +421,11 @@ int uvedit_center(Scene *scene, Image *ima, Object *obedit, float *cent, int mod cent[0]= (min[0]+max[0])/2.0; cent[1]= (min[1]+max[1])/2.0; - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return 1; } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return 0; } @@ -584,7 +584,7 @@ static void find_nearest_uv_vert(Scene *scene, Image *ima, EditMesh *em, float c int ED_uvedit_nearest_uv(Scene *scene, Object *obedit, Image *ima, float co[2], float uv[2]) { - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; float mindist, dist; @@ -614,7 +614,7 @@ int ED_uvedit_nearest_uv(Scene *scene, Object *obedit, Image *ima, float co[2], } } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return found; } @@ -994,7 +994,7 @@ static void weld_align_uv(bContext *C, int tool) scene= CTX_data_scene(C); obedit= CTX_data_edit_object(C); - em= EM_GetEditMesh((Mesh*)obedit->data); + em= BKE_mesh_get_editmesh((Mesh*)obedit->data); ima= CTX_data_edit_image(C); INIT_MINMAX2(min, max); @@ -1055,7 +1055,7 @@ static void weld_align_uv(bContext *C, int tool) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } static int align_exec(bContext *C, wmOperator *op) @@ -1129,7 +1129,7 @@ static int stitch_exec(bContext *C, wmOperator *op) sima= (SpaceImage*)CTX_wm_space_data(C); scene= CTX_data_scene(C); obedit= CTX_data_edit_object(C); - em= EM_GetEditMesh((Mesh*)obedit->data); + em= BKE_mesh_get_editmesh((Mesh*)obedit->data); ima= CTX_data_edit_image(C); if(RNA_boolean_get(op->ptr, "use_limit")) { @@ -1145,7 +1145,7 @@ static int stitch_exec(bContext *C, wmOperator *op) vmap= EM_make_uv_vert_map(em, 1, 0, limit); if(vmap == NULL) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1276,7 +1276,7 @@ static int stitch_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -1309,7 +1309,7 @@ static int select_inverse_exec(bContext *C, wmOperator *op) scene= CTX_data_scene(C); obedit= CTX_data_edit_object(C); - em= EM_GetEditMesh((Mesh*)obedit->data); + em= BKE_mesh_get_editmesh((Mesh*)obedit->data); ima= CTX_data_edit_image(C); if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) { @@ -1330,7 +1330,7 @@ static int select_inverse_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -1360,7 +1360,7 @@ static int de_select_all_exec(bContext *C, wmOperator *op) scene= CTX_data_scene(C); obedit= CTX_data_edit_object(C); - em= EM_GetEditMesh((Mesh*)obedit->data); + em= BKE_mesh_get_editmesh((Mesh*)obedit->data); ima= CTX_data_edit_image(C); if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) { @@ -1398,7 +1398,7 @@ static int de_select_all_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -1445,7 +1445,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop) Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); Image *ima= CTX_data_edit_image(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; NearestHit hit; @@ -1480,7 +1480,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop) /* find edge */ find_nearest_uv_edge(scene, ima, em, co, &hit); if(hit.efa == NULL) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } } @@ -1488,7 +1488,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop) /* find vertex */ find_nearest_uv_vert(scene, ima, em, co, penalty, &hit); if(hit.efa == NULL) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1503,7 +1503,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop) /* find edge */ find_nearest_uv_edge(scene, ima, em, co, &hit); if(hit.efa == NULL) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1522,7 +1522,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop) /* find face */ find_nearest_uv_face(scene, ima, em, co, &hit); if(hit.efa == NULL) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1544,12 +1544,12 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop) find_nearest_uv_vert(scene, ima, em, co, NULL, &hit); if(hit.efa==NULL) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } } else { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1702,7 +1702,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_PASS_THROUGH|OPERATOR_FINISHED; } @@ -1808,13 +1808,13 @@ static int select_linked_exec(bContext *C, wmOperator *op) Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); Image *ima= CTX_data_edit_image(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); float limit[2]; int extend; if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) { BKE_report(op->reports, RPT_ERROR, "Can't select linked when sync selection is enabled."); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1825,7 +1825,7 @@ static int select_linked_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -1852,13 +1852,13 @@ static int unlink_selection_exec(bContext *C, wmOperator *op) Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); Image *ima= CTX_data_edit_image(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) { BKE_report(op->reports, RPT_ERROR, "Can't unlink selection when sync selection is enabled."); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1880,7 +1880,7 @@ static int unlink_selection_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -1913,7 +1913,7 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje * This only needs to be done when the Mesh is not used for * selection (so for sticky modes, vertex or location based). */ - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; int nverts, i; @@ -1969,7 +1969,7 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje eve->tmp.l = a; */ if(vmap == NULL) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return; } @@ -2031,7 +2031,7 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje } } } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } static int border_select_exec(bContext *C, wmOperator *op) @@ -2041,7 +2041,7 @@ static int border_select_exec(bContext *C, wmOperator *op) Object *obedit= CTX_data_edit_object(C); Image *ima= CTX_data_edit_image(C); ARegion *ar= CTX_wm_region(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tface; rcti rect; @@ -2154,11 +2154,11 @@ static int border_select_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -2211,7 +2211,7 @@ int circle_select_exec(bContext *C, wmOperator *op) SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); ARegion *ar= CTX_wm_region(C); EditFace *efa; MTFace *tface; @@ -2249,7 +2249,7 @@ int circle_select_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2347,7 +2347,7 @@ void UV_OT_snap_cursor(wmOperatorType *ot) static int snap_uvs_to_cursor(Scene *scene, Image *ima, Object *obedit, View2D *v2d) { - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tface; short change= 0; @@ -2365,13 +2365,13 @@ static int snap_uvs_to_cursor(Scene *scene, Image *ima, Object *obedit, View2D * } } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return change; } static int snap_uvs_to_adjacent_unselected(Scene *scene, Image *ima, Object *obedit) { - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; EditVert *eve; MTFace *tface; @@ -2446,7 +2446,7 @@ static int snap_uvs_to_adjacent_unselected(Scene *scene, Image *ima, Object *obe if(!change) { MEM_freeN(coords); MEM_freeN(usercount); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return change; } @@ -2493,13 +2493,13 @@ static int snap_uvs_to_adjacent_unselected(Scene *scene, Image *ima, Object *obe MEM_freeN(coords); MEM_freeN(usercount); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return change; } static int snap_uvs_to_pixels(SpaceImage *sima, Scene *scene, Object *obedit) { - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); Image *ima= sima->image; EditFace *efa; MTFace *tface; @@ -2524,7 +2524,7 @@ static int snap_uvs_to_pixels(SpaceImage *sima, Scene *scene, Object *obedit) } } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return change; } @@ -2586,7 +2586,7 @@ static int pin_exec(bContext *C, wmOperator *op) Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); Image *ima= CTX_data_edit_image(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tface; int clear= RNA_boolean_get(op->ptr, "clear"); @@ -2614,7 +2614,7 @@ static int pin_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2640,7 +2640,7 @@ static int select_pinned_exec(bContext *C, wmOperator *op) Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); Image *ima= CTX_data_edit_image(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tface; @@ -2659,7 +2659,7 @@ static int select_pinned_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2682,7 +2682,7 @@ static int hide_exec(bContext *C, wmOperator *op) SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; int swap= RNA_boolean_get(op->ptr, "unselected"); @@ -2691,7 +2691,7 @@ static int hide_exec(bContext *C, wmOperator *op) EM_hide_mesh(em, swap); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2799,7 +2799,7 @@ static int hide_exec(bContext *C, wmOperator *op) EM_validate_selections(em); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2825,7 +2825,7 @@ static int reveal_exec(bContext *C, wmOperator *op) SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; @@ -2834,7 +2834,7 @@ static int reveal_exec(bContext *C, wmOperator *op) EM_reveal_mesh(em); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -2930,7 +2930,7 @@ static int reveal_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index e8a0de28658..e9dd1969ee2 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -72,12 +72,12 @@ static int ED_uvedit_ensure_uvs(bContext *C, Scene *scene, Object *obedit) { - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; if(ED_uvedit_test(obedit)) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return 1; } @@ -85,7 +85,7 @@ static int ED_uvedit_ensure_uvs(bContext *C, Scene *scene, Object *obedit) EM_add_data_layer(em, &em->fdata, CD_MTFACE); if(!ED_uvedit_test(obedit)) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return 0; } @@ -99,7 +99,7 @@ static int ED_uvedit_ensure_uvs(bContext *C, Scene *scene, Object *obedit) uvedit_face_select(scene, efa, tf); } - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return 1; } @@ -223,7 +223,7 @@ static void minimize_stretch_init(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); MinStretch *ms; int fill_holes= RNA_boolean_get(op->ptr, "fill_holes"); @@ -405,7 +405,7 @@ static int pack_islands_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); ParamHandle *handle; handle = construct_param_handle(scene, em, 1, 0, 1, 1); @@ -416,7 +416,7 @@ static int pack_islands_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -438,7 +438,7 @@ static int average_islands_scale_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); ParamHandle *handle; handle= construct_param_handle(scene, em, 1, 0, 1, 1); @@ -449,7 +449,7 @@ static int average_islands_scale_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -471,19 +471,19 @@ static ParamHandle *liveHandle = NULL; void ED_uvedit_live_unwrap_begin(Scene *scene, Object *obedit) { - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); short abf = scene->toolsettings->unwrapper == 1; short fillholes = scene->toolsettings->uvcalc_flag & UVCALC_FILLHOLES; if(!ED_uvedit_test(obedit)) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return; } liveHandle = construct_param_handle(scene, em, 0, fillholes, 1, 1); param_lscm_begin(liveHandle, PARAM_TRUE, abf); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } void ED_uvedit_live_unwrap_re_solve(void) @@ -606,7 +606,7 @@ static void uv_map_transform(bContext *C, wmOperator *op, float center[3], float /* context checks are messy here, making it work in both 3d view and uv editor */ Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); View3D *v3d= CTX_wm_view3d(C); RegionView3D *rv3d= CTX_wm_region_view3d(C); /* common operator properties */ @@ -633,7 +633,7 @@ static void uv_map_transform(bContext *C, wmOperator *op, float center[3], float else uv_map_rotation_matrix(rotmat, rv3d, obedit, upangledeg, sideangledeg, radius); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); } static void uv_transform_properties(wmOperatorType *ot, int radius) @@ -786,7 +786,7 @@ static int unwrap_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); ParamHandle *handle; int method = RNA_enum_get(op->ptr, "method"); int fill_holes = RNA_boolean_get(op->ptr, "fill_holes"); @@ -794,7 +794,7 @@ static int unwrap_exec(bContext *C, wmOperator *op) /* add uvs if they don't exist yet */ if(!ED_uvedit_ensure_uvs(C, scene, obedit)) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -813,7 +813,7 @@ static int unwrap_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -898,7 +898,7 @@ static int from_view_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); ARegion *ar= CTX_wm_region(C); EditFace *efa; MTFace *tf; @@ -906,7 +906,7 @@ static int from_view_exec(bContext *C, wmOperator *op) /* add uvs if they don't exist yet */ if(!ED_uvedit_ensure_uvs(C, scene, obedit)) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -946,7 +946,7 @@ static int from_view_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -982,13 +982,13 @@ static int reset_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; /* add uvs if they don't exist yet */ if(!ED_uvedit_ensure_uvs(C, scene, obedit)) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1013,7 +1013,7 @@ static int reset_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -1069,14 +1069,14 @@ static int sphere_project_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; float center[3], rotmat[4][4]; /* add uvs if they don't exist yet */ if(!ED_uvedit_ensure_uvs(C, scene, obedit)) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1101,7 +1101,7 @@ static int sphere_project_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -1141,14 +1141,14 @@ static int cylinder_project_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; float center[3], rotmat[4][4]; /* add uvs if they don't exist yet */ if(!ED_uvedit_ensure_uvs(C, scene, obedit)) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1173,7 +1173,7 @@ static int cylinder_project_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } @@ -1199,7 +1199,7 @@ static int cube_project_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); - EditMesh *em= EM_GetEditMesh((Mesh*)obedit->data); + EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; MTFace *tf; float no[3], cube_size, *loc, dx, dy; @@ -1207,7 +1207,7 @@ static int cube_project_exec(bContext *C, wmOperator *op) /* add uvs if they don't exist yet */ if(!ED_uvedit_ensure_uvs(C, scene, obedit)) { - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_CANCELLED; } @@ -1260,7 +1260,7 @@ static int cube_project_exec(bContext *C, wmOperator *op) DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - EM_EndEditMesh(obedit->data, em); + BKE_mesh_end_editmesh(obedit->data, em); return OPERATOR_FINISHED; } |