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:
authorCampbell Barton <ideasman42@gmail.com>2014-06-15 06:09:18 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-06-15 06:15:53 +0400
commitfff18e049abbb21b4521b538c321391955984436 (patch)
tree6dbcff475a8644a8a4907810c557cc4917964088 /source/blender/editors/space_text
parent6443bfdeb1b606cf5fcb7bf132792bd0a6c00674 (diff)
Text Editor: dropping id's now paste in Python data path (like pyconsole)
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r--source/blender/editors/space_text/space_text.c8
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 */