diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-11-30 19:18:03 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-11-30 19:21:39 +0300 |
commit | fd4cd626be9542a58fe5b30bf9409d5e435ff140 (patch) | |
tree | b152e25ce25976bc22a065a3b8b4e428bb1fe579 /source/blender/editors/space_view3d/space_view3d.c | |
parent | 503dbb65c02b0cd0d80f0cbed6419285162b3262 (diff) |
More fixes related to D&D:
* Same issue as T42760 was also reproducible in some cases in 3DView.
* You got an error message about missing RNA prop in some drop-called operators.
* You could not drop a movie file in nodes, (some cases of) 3DView, nor ImageEditor.
Diffstat (limited to 'source/blender/editors/space_view3d/space_view3d.c')
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 78961b0e8e0..55d5273b198 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -599,7 +599,7 @@ static int view3d_ima_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent return 1; } else if (drag->type == WM_DRAG_PATH) { - if (ELEM(drag->icon, 0, ICON_FILE_IMAGE)) /* rule might not work? */ + if (ELEM(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_MOVIE)) /* rule might not work? */ return 1; } return 0; @@ -665,10 +665,14 @@ static void view3d_id_path_drop_copy(wmDrag *drag, wmDropBox *drop) { ID *id = (ID *)drag->poin; - if (id) + if (id) { RNA_string_set(drop->ptr, "name", id->name + 2); - if (drag->path[0]) + RNA_struct_property_unset(drop->ptr, "filepath"); + } + else if (drag->path[0]) { RNA_string_set(drop->ptr, "filepath", drag->path); + RNA_struct_property_unset(drop->ptr, "image"); + } } |