diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-08-22 20:43:19 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-08-28 21:52:54 +0300 |
commit | 34ed58dcaffd957f50380f4115d2cb9c46de31ee (patch) | |
tree | c287b36c4862433f6b55e1fc8cb2d7c2dffbd589 /source/blender/editors/space_text/space_text.c | |
parent | 69a966aca0c147ef21eeee986cc73554bfe5e948 (diff) |
Fix T68971: Copy As New Driver from Material node creates a bad reference.
NodeTree structures of materials and some other data blocks are
effectively node group datablock objects that are contained inside
the parent block. Thus, direct references to them are only valid
while blender is running, and are lost on save.
Fix Copy As New Driver to create a reference that goes through
the owner datablock, by adding a new ID flag to mark private
pseudo-datablocks.
Also fix functions that return full paths to structures and
properties, e.g. used in python tooltips. Functions for paths
from ID to struct or property can't be changed because of
Animation Data related code.
Reviewers: mont29
Differential Revision: https://developer.blender.org/D5559
Diffstat (limited to 'source/blender/editors/space_text/space_text.c')
-rw-r--r-- | source/blender/editors/space_text/space_text.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c index c1a3c79b0d8..9f39313b9ab 100644 --- a/source/blender/editors/space_text/space_text.c +++ b/source/blender/editors/space_text/space_text.c @@ -29,6 +29,7 @@ #include "BLI_blenlib.h" +#include "BKE_global.h" #include "BKE_context.h" #include "BKE_library.h" #include "BKE_screen.h" @@ -356,7 +357,7 @@ static void text_drop_paste(wmDrag *drag, wmDropBox *drop) ID *id = WM_drag_ID(drag, 0); /* copy drag path to properties */ - text = RNA_path_full_ID_py(id); + text = RNA_path_full_ID_py(G_MAIN, id); RNA_string_set(drop->ptr, "text", text); MEM_freeN(text); } |