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
parent9afdda36893276321f7da9af94babf7a5b7b62fe (diff)
fix [#34958] keyframe many items would fail if there was a (") in the text.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c2
-rw-r--r--source/blender/blenkernel/intern/linestyle.c40
2 files changed, 23 insertions, 19 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 48d83652f56..f3d5b838a0d 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -745,7 +745,7 @@ void BKE_animdata_fix_paths_rename(ID *owner_id, AnimData *adt, ID *ref_id, cons
/* NLA Data - Animation Data for Strips */
for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next)
nlastrips_path_rename_fix(owner_id, prefix, oldName, newName, oldN, newN, &nlt->strips, verify_paths);
-
+
/* free the temp names */
MEM_freeN(oldN);
MEM_freeN(newN);
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;