diff options
Diffstat (limited to 'source/blender/editors/screen/screen_ops.c')
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index ff0a89b9e1c..d06259d1487 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -57,6 +57,7 @@ #include "ED_util.h" #include "ED_screen.h" +#include "ED_mesh.h" #include "ED_screen_types.h" #include "RE_pipeline.h" @@ -216,11 +217,14 @@ int ED_operator_uvedit(bContext *C) EditMesh *em= NULL; if(obedit && obedit->type==OB_MESH) - em= ((Mesh *)obedit->data)->edit_mesh; + em= EM_GetEditMesh((Mesh *)obedit->data); - if(em && (em->faces.first) && (CustomData_has_layer(&em->fdata, CD_MTFACE))) + if(em && (em->faces.first) && (CustomData_has_layer(&em->fdata, CD_MTFACE))) { + EM_EndEditMesh(obedit->data, em); return 1; + } + EM_EndEditMesh(obedit->data, em); return 0; } @@ -230,11 +234,14 @@ int ED_operator_uvmap(bContext *C) EditMesh *em= NULL; if(obedit && obedit->type==OB_MESH) - em= ((Mesh *)obedit->data)->edit_mesh; + em= EM_GetEditMesh((Mesh *)obedit->data); - if(em && (em->faces.first)) + if(em && (em->faces.first)) { + EM_EndEditMesh(obedit->data, em); return 1; + } + EM_EndEditMesh(obedit->data, em); return 0; } |