forked from bartvdbraak/blender
Dropbox refinement in 3d window: the "drop image" dropbox checks for
object under mouse cursor. If not, another dropbox operation can be used.
This commit is contained in:
parent
e8408697de
commit
c3dbd2a46b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user