diff options
Diffstat (limited to 'source/blender/editors/mesh/mesh_data.c')
-rw-r--r-- | source/blender/editors/mesh/mesh_data.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 5a7414d8edd..9164dc7d4c8 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -51,6 +51,7 @@ #include "BKE_displist.h" #include "BKE_image.h" #include "BKE_library.h" +#include "BKE_main.h" #include "BKE_material.h" #include "BKE_mesh.h" #include "BKE_report.h" @@ -350,6 +351,7 @@ void MESH_OT_uv_texture_add(wmOperatorType *ot) static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event) { + Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); View3D *v3d= CTX_wm_view3d(C); Base *base= ED_view3d_give_base_under_cursor(C, event->mval); @@ -394,7 +396,7 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event) if(me->edit_mesh==NULL) return OPERATOR_CANCELLED; - ED_uvedit_assign_image(scene, obedit, ima, NULL); + ED_uvedit_assign_image(bmain, scene, obedit, ima, NULL); if(exitmode) { load_editMesh(scene, obedit); |