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:
Diffstat (limited to 'source/blender/editors/space_node/space_node.c')
-rw-r--r--source/blender/editors/space_node/space_node.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 6e6b0a584cf..289b7d9efa1 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -692,10 +692,6 @@ static void node_group_drop_copy(wmDrag *drag, wmDropBox *drop)
ID *id = WM_drag_get_local_ID_or_import_from_asset(drag, 0);
RNA_string_set(drop->ptr, "name", id->name + 2);
- if (drag->type == WM_DRAG_ASSET) {
- /* ID just appended, so free it when dropping fails. */
- RNA_boolean_set(drop->ptr, "free_id_on_error", true);
- }
}
static void node_id_drop_copy(wmDrag *drag, wmDropBox *drop)
@@ -724,9 +720,21 @@ static void node_dropboxes(void)
{
ListBase *lb = WM_dropboxmap_find("Node Editor", SPACE_NODE, RGN_TYPE_WINDOW);
- WM_dropbox_add(lb, "NODE_OT_add_group", node_group_drop_poll, node_group_drop_copy);
- WM_dropbox_add(lb, "NODE_OT_add_file", node_ima_drop_poll, node_id_path_drop_copy);
- WM_dropbox_add(lb, "NODE_OT_add_mask", node_mask_drop_poll, node_id_drop_copy);
+ WM_dropbox_add(lb,
+ "NODE_OT_add_group",
+ node_group_drop_poll,
+ node_group_drop_copy,
+ WM_drag_free_imported_drag_ID);
+ WM_dropbox_add(lb,
+ "NODE_OT_add_file",
+ node_ima_drop_poll,
+ node_id_path_drop_copy,
+ WM_drag_free_imported_drag_ID);
+ WM_dropbox_add(lb,
+ "NODE_OT_add_mask",
+ node_mask_drop_poll,
+ node_id_drop_copy,
+ WM_drag_free_imported_drag_ID);
}
/* ************* end drop *********** */