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:
authorJoshua Leung <aligorith@gmail.com>2019-02-05 06:21:35 +0300
committerJoshua Leung <aligorith@gmail.com>2019-02-05 06:21:35 +0300
commit49618b0e18f7554dd70ac898d93abc7baf380081 (patch)
treefa510093d9d7c21806ac32ad0442ca88380f7c60 /release/scripts/startup/bl_operators/anim.py
parentaf2d2d4dff77a1436b26007b5aa183075d91d537 (diff)
Fix: Ensure that KeyingSet.bl_description field is properly escaped when using the Export to File operator
Previously, if double-quotes appeared in the KeyingSet.bl_description field, these would cause a syntax error in the resulting .py script export of the KeyingSet. Since single quotes are even more likely to appear (e.g. as apostrophes), we now use triple quotes here. Unreported bug, noticed earlier when investigating T61010.
Diffstat (limited to 'release/scripts/startup/bl_operators/anim.py')
-rw-r--r--release/scripts/startup/bl_operators/anim.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_operators/anim.py b/release/scripts/startup/bl_operators/anim.py
index fa8ca3575a6..61247f1ae1e 100644
--- a/release/scripts/startup/bl_operators/anim.py
+++ b/release/scripts/startup/bl_operators/anim.py
@@ -79,7 +79,7 @@ class ANIM_OT_keying_set_export(Operator):
f.write("# Keying Set Level declarations\n")
f.write("ks = scene.keying_sets.new(idname=\"%s\", name=\"%s\")\n"
"" % (ks.bl_idname, ks.bl_label))
- f.write("ks.bl_description = \"%s\"\n" % ks.bl_description)
+ f.write("ks.bl_description = \"\"\"%s\"\"\"\n" % ks.bl_description)
if not ks.is_path_absolute:
f.write("ks.is_path_absolute = False\n")