Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2010-05-11 18:25:48 +0400
committerTon Roosendaal <ton@blender.org>2010-05-11 18:25:48 +0400
commitc3dbd2a46bf8dcfb8aff318dbce4ce5ac1b88d3e (patch)
treeb5d479bfc9bdb40b71129e387292e2f3bf546e22 /source/blender/editors/space_view3d/space_view3d.c
parente8408697deedda04fb2c5d319e98a35a5a0b9f61 (diff)
Dropbox refinement in 3d window: the "drop image" dropbox checks for
object under mouse cursor. If not, another dropbox operation can be used.
Diffstat (limited to 'source/blender/editors/space_view3d/space_view3d.c')
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 326409f310f..472631c3616 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -413,14 +413,16 @@ static int view3d_mat_drop_poll(bContext *C, wmDrag *drag, wmEvent *event)
static int view3d_ima_drop_poll(bContext *C, wmDrag *drag, wmEvent *event)
{
- if(drag->type==WM_DRAG_ID) {
- ID *id= (ID *)drag->poin;
- if( GS(id->name)==ID_IM )
- return 1;
- }
- else if(drag->type==WM_DRAG_PATH){
- if(ELEM(drag->icon, 0, ICON_FILE_IMAGE)) /* rule might not work? */
- return 1;
+ if( ED_view3d_give_base_under_cursor(C, event->mval) ) {
+ if(drag->type==WM_DRAG_ID) {
+ ID *id= (ID *)drag->poin;
+ if( GS(id->name)==ID_IM )
+ return 1;
+ }
+ else if(drag->type==WM_DRAG_PATH){
+ if(ELEM(drag->icon, 0, ICON_FILE_IMAGE)) /* rule might not work? */
+ return 1;
+ }
}
return 0;
}