diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-06-15 06:09:18 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-06-15 06:15:53 +0400 |
commit | fff18e049abbb21b4521b538c321391955984436 (patch) | |
tree | 6dbcff475a8644a8a4907810c557cc4917964088 /source | |
parent | 6443bfdeb1b606cf5fcb7bf132792bd0a6c00674 (diff) |
Text Editor: dropping id's now paste in Python data path (like pyconsole)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_text/space_text.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c index 6e49569314f..fbca9bcc04f 100644 --- a/source/blender/editors/space_text/space_text.c +++ b/source/blender/editors/space_text/space_text.c @@ -484,7 +484,13 @@ static int text_drop_paste_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent static void text_drop_paste(wmDrag *drag, wmDropBox *drop) { - RNA_string_set(drop->ptr, "text", ((ID *)drag->poin)->name + 2); + char *text; + ID *id = drag->poin; + + /* copy drag path to properties */ + text = RNA_path_full_ID_py(id); + RNA_string_set(drop->ptr, "text", text); + MEM_freeN(text); } /* this region dropbox definition */ |