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/blenkernel/intern/linestyle.c
parent9afdda36893276321f7da9af94babf7a5b7b62fe (diff)
fix [#34958] keyframe many items would fail if there was a (") in the text.
Diffstat (limited to 'source/blender/blenkernel/intern/linestyle.c')
-rw-r--r--source/blender/blenkernel/intern/linestyle.c40
1 files changed, 22 insertions, 18 deletions
diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c
index 6a8061274f8..05ceb8f76ea 100644
--- a/source/blender/blenkernel/intern/linestyle.c
+++ b/source/blender/blenkernel/intern/linestyle.c
@@ -1018,25 +1018,29 @@ char *BKE_path_from_ID_to_color_ramp(FreestyleLineStyle *linestyle, ColorBand *c
for (m = (LineStyleModifier *)linestyle->color_modifiers.first; m; m = m->next) {
switch (m->type) {
- case LS_MODIFIER_ALONG_STROKE:
- if (color_ramp == ((LineStyleColorModifier_AlongStroke *)m)->color_ramp)
- found = true;
- break;
- case LS_MODIFIER_DISTANCE_FROM_CAMERA:
- if (color_ramp == ((LineStyleColorModifier_DistanceFromCamera *)m)->color_ramp)
- found = true;
- break;
- case LS_MODIFIER_DISTANCE_FROM_OBJECT:
- if (color_ramp == ((LineStyleColorModifier_DistanceFromObject *)m)->color_ramp)
- found = true;
- break;
- case LS_MODIFIER_MATERIAL:
- if (color_ramp == ((LineStyleColorModifier_Material *)m)->color_ramp)
- found = true;
- break;
+ case LS_MODIFIER_ALONG_STROKE:
+ if (color_ramp == ((LineStyleColorModifier_AlongStroke *)m)->color_ramp)
+ found = true;
+ break;
+ case LS_MODIFIER_DISTANCE_FROM_CAMERA:
+ if (color_ramp == ((LineStyleColorModifier_DistanceFromCamera *)m)->color_ramp)
+ found = true;
+ break;
+ case LS_MODIFIER_DISTANCE_FROM_OBJECT:
+ if (color_ramp == ((LineStyleColorModifier_DistanceFromObject *)m)->color_ramp)
+ found = true;
+ break;
+ case LS_MODIFIER_MATERIAL:
+ if (color_ramp == ((LineStyleColorModifier_Material *)m)->color_ramp)
+ found = true;
+ break;
+ }
+
+ if (found) {
+ char name_esc[sizeof(m->name) * 2];
+ BLI_strescape(name_esc, m->name, sizeof(name_esc));
+ return BLI_sprintfN("color_modifiers[\"%s\"].color_ramp", name_esc);
}
- if (found)
- return BLI_sprintfN("color_modifiers[\"%s\"].color_ramp", m->name);
}
printf("BKE_path_from_ID_to_color_ramp: No color ramps correspond to the given pointer.\n");
return NULL;