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>2012-12-02 11:13:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-02 11:13:19 +0400
commit82fc3319599b9c03ae37f09afc826fed7188df8b (patch)
treeea95fa261e18e342869ef7e1cc32cfa080f200d3 /source/blender/editors/space_console
parent04c27843ea7234b33569d3b993775cc83857020b (diff)
There was no way of knowing what ID type a property comes from by the tooltip, (since copying the Data-Path doesn't include the ID the user had to guess).
Now include the full python path to the property in the tool-tip.
Diffstat (limited to 'source/blender/editors/space_console')
-rw-r--r--source/blender/editors/space_console/space_console.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index 75add570708..be8febdab23 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -170,16 +170,13 @@ static int id_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event
static void id_drop_copy(wmDrag *drag, wmDropBox *drop)
{
- char text[64];
+ char *text;
ID *id = drag->poin;
- char id_esc[(sizeof(id->name) - 2) * 2];
-
- BLI_strescape(id_esc, id->name + 2, sizeof(id_esc));
-
- BLI_snprintf(text, sizeof(text), "bpy.data.%s[\"%s\"]", BKE_idcode_to_name_plural(GS(id->name)), id_esc);
/* copy drag path to properties */
+ text = RNA_path_from_ID_python(id);
RNA_string_set(drop->ptr, "text", text);
+ MEM_freeN(text);
}
static int path_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event))