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/editors/animation/drivers.c
parent9afdda36893276321f7da9af94babf7a5b7b62fe (diff)
fix [#34958] keyframe many items would fail if there was a (") in the text.
Diffstat (limited to 'source/blender/editors/animation/drivers.c')
-rw-r--r--source/blender/editors/animation/drivers.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index d9965ebdcac..ef15e254048 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -434,11 +434,17 @@ static char *get_driver_path_hack(bContext *C, PointerRNA *ptr, PropertyRNA *pro
/* assumes: texture will only be shown if it is active material's active texture it's ok */
if ((ID *)tex == id) {
+ char name_esc_ma[(sizeof(ma->id.name) - 2) * 2];
+ char name_esc_tex[(sizeof(tex->id.name) - 2) * 2];
+
+ BLI_strescape(name_esc_ma, ma->id.name + 2, sizeof(name_esc_ma));
+ BLI_strescape(name_esc_tex, tex->id.name + 2, sizeof(name_esc_tex));
+
/* create new path */
// TODO: use RNA path functions to construct step by step instead?
// FIXME: maybe this isn't even needed anymore...
path = BLI_sprintfN("material_slots[\"%s\"].material.texture_slots[\"%s\"].texture.%s",
- ma->id.name + 2, tex->id.name + 2, basepath);
+ name_esc_ma, name_esc_tex, basepath);
/* free old one */
MEM_freeN(basepath);