diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index 9d1f52568b4..948b6490331 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -239,12 +239,12 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) strncpy(path, U.textudir, sizeof(path)); } + if (RNA_struct_property_is_set(op->ptr, "files")) + return open_exec(C, op); + if (!RNA_struct_property_is_set(op->ptr, "relative_path")) RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); - if (RNA_struct_property_is_set(op->ptr, "filepath")) - return open_exec(C, op); - open_init(C, op); clip_filesel(C, op, path); diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index 0a6a4af6960..13caf0b51fe 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -792,8 +792,16 @@ static int clip_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(eve static void clip_drop_copy(wmDrag *drag, wmDropBox *drop) { - /* copy drag path to properties */ - RNA_string_set(drop->ptr, "filepath", drag->path); + PointerRNA itemptr; + char dir[FILE_MAX], file[FILE_MAX]; + + BLI_split_dirfile(drag->path, dir, file, sizeof(dir), sizeof(file)); + + RNA_string_set(drop->ptr, "directory", dir); + + RNA_collection_clear(drop->ptr, "files"); + RNA_collection_add(drop->ptr, "files", &itemptr); + RNA_string_set(&itemptr, "name", file); } /* area+region dropbox definition */