diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-23 08:47:27 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-23 08:56:30 +0300 |
commit | 35f153cdc3f04dbfc2752b818aba09b6c844364a (patch) | |
tree | 7ba322031d40dcc4523d0899e36a4e2b235af916 | |
parent | 646a96bf8edc211a06f3df652101c265ee166e8d (diff) |
Fix T42928: Drag-drop of generated files to compo reloads them, loosing edits
Origins of this issue goes back to T33402, where compo wasn't sure what kind
of image it is working with (compo should know if it's multilayer or regular
image).
Now we only reload images when dar-dropping from outside of blender.
-rw-r--r-- | source/blender/editors/space_node/node_add.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c index c3064432131..83015228b78 100644 --- a/source/blender/editors/space_node/node_add.c +++ b/source/blender/editors/space_node/node_add.c @@ -334,9 +334,14 @@ static int node_add_file_exec(bContext *C, wmOperator *op) } node->id = (ID *)ima; - - BKE_image_signal(ima, NULL, IMA_SIGNAL_RELOAD); - WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, ima); + + /* When adding new image file via drag-drop we need to load imbuf in order + * to get proper image source. + */ + if (RNA_struct_property_is_set(op->ptr, "filepath")) { + BKE_image_signal(ima, NULL, IMA_SIGNAL_RELOAD); + WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, ima); + } snode_notify(C, snode); snode_dag_update(C, snode); |