diff options
author | Ton Roosendaal <ton@blender.org> | 2011-01-29 20:56:34 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-01-29 20:56:34 +0300 |
commit | 83cb3b1fe74ccc7f8eedb2c96f36dc02302300f0 (patch) | |
tree | 33108707b31a6b64f72b13952351aa1631d80c0e /source | |
parent | ff58fc3e86dd00295cc55caf835dc6ac6d22ba96 (diff) |
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. :)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/mesh/mesh_data.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; |