diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-24 00:10:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-24 00:10:22 +0400 |
commit | 7dde3551853018147d99e9454abb337384e7a32e (patch) | |
tree | a0255cc50e7621d8387baf68af03bc0a6366ce6a /source/blender/makesrna/intern/rna_nla.c | |
parent | 9afdda36893276321f7da9af94babf7a5b7b62fe (diff) |
fix [#34958] keyframe many items would fail if there was a (") in the text.
Diffstat (limited to 'source/blender/makesrna/intern/rna_nla.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_nla.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c index 9afaad96019..3bf6c11d935 100644 --- a/source/blender/makesrna/intern/rna_nla.c +++ b/source/blender/makesrna/intern/rna_nla.c @@ -84,7 +84,13 @@ static char *rna_NlaStrip_path(PointerRNA *ptr) for (nls = nlt->strips.first; nls; nls = nls->next) { if (nls == strip) { /* XXX but if we animate like this, the control will never work... */ - return BLI_sprintfN("animation_data.nla_tracks[\"%s\"].strips[\"%s\"]", nlt->name, strip->name); + char name_esc_nlt[sizeof(nlt->name) * 2]; + char name_esc_strip[sizeof(strip->name) * 2]; + + BLI_strescape(name_esc_nlt, nlt->name, sizeof(name_esc_nlt)); + BLI_strescape(name_esc_strip, strip->name, sizeof(name_esc_strip)); + return BLI_sprintfN("animation_data.nla_tracks[\"%s\"].strips[\"%s\"]", + name_esc_nlt, name_esc_strip); } } } |