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_boid.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_boid.c')
-rw-r--r--source/blender/makesrna/intern/rna_boid.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c
index 9d44ae87b57..9b2ce863108 100644
--- a/source/blender/makesrna/intern/rna_boid.c
+++ b/source/blender/makesrna/intern/rna_boid.c
@@ -142,7 +142,12 @@ static StructRNA *rna_BoidRule_refine(struct PointerRNA *ptr)
static char *rna_BoidRule_path(PointerRNA *ptr)
{
- return BLI_sprintfN("rules[\"%s\"]", ((BoidRule *)ptr->data)->name); /* XXX not unique */
+ BoidRule *rule = (BoidRule *)ptr->data;
+ char name_esc[sizeof(rule->name) * 2];
+
+ BLI_strescape(name_esc, rule->name, sizeof(name_esc));
+
+ return BLI_sprintfN("rules[\"%s\"]", name_esc); /* XXX not unique */
}
static PointerRNA rna_BoidState_active_boid_rule_get(PointerRNA *ptr)