From 83cb3b1fe74ccc7f8eedb2c96f36dc02302300f0 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sat, 29 Jan 2011 17:56:34 +0000 Subject: Todo item: When dropping image on an object, it now sets view to show texture in solid view mode. Nicer interaction, and good for dummies & demos. :) --- source/blender/editors/mesh/mesh_data.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/mesh') diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 424d2b273e6..5f03edb38a2 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -316,6 +316,7 @@ void MESH_OT_uv_texture_add(wmOperatorType *ot) static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event) { Scene *scene= CTX_data_scene(C); + View3D *v3d= CTX_wm_view3d(C); Base *base= ED_view3d_give_base_under_cursor(C, event->mval); Image *ima= NULL; Mesh *me; @@ -367,6 +368,10 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event) me->edit_mesh= NULL; } + /* dummie drop support; ensure view shows a result :) */ + if(v3d) + v3d->flag2 |= V3D_SOLID_TEX; + WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; -- cgit v1.2.3