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>2013-04-24 00:10:22 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-04-24 00:10:22 +0400
commit7dde3551853018147d99e9454abb337384e7a32e (patch)
treea0255cc50e7621d8387baf68af03bc0a6366ce6a /source/blender/makesrna/intern/rna_access.c
parent9afdda36893276321f7da9af94babf7a5b7b62fe (diff)
fix [#34958] keyframe many items would fail if there was a (") in the text.
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 9a102c823a9..cfdfbf4e687 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -4325,14 +4325,25 @@ char *RNA_path_from_ID_to_property(PointerRNA *ptr, PropertyRNA *prop)
propname = RNA_property_identifier(prop);
if (ptrpath) {
- path = BLI_sprintfN(is_rna ? "%s.%s" : "%s[\"%s\"]", ptrpath, propname);
+ if (is_rna) {
+ path = BLI_sprintfN("%s.%s", ptrpath, propname);
+ }
+ else {
+ char propname_esc[MAX_IDPROP_NAME * 2];
+ BLI_strescape(propname_esc, propname, sizeof(propname_esc));
+ path = BLI_sprintfN("%s[\"%s\"]", ptrpath, propname_esc);
+ }
MEM_freeN(ptrpath);
}
else if (RNA_struct_is_ID(ptr->type)) {
- if (is_rna)
+ if (is_rna) {
path = BLI_strdup(propname);
- else
- path = BLI_sprintfN("[\"%s\"]", propname);
+ }
+ else {
+ char propname_esc[MAX_IDPROP_NAME * 2];
+ BLI_strescape(propname_esc, propname, sizeof(propname_esc));
+ path = BLI_sprintfN("[\"%s\"]", propname_esc);
+ }
}
else {
path = NULL;