diff options
author | Joshua Leung <aligorith@gmail.com> | 2019-02-05 06:21:35 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2019-02-05 06:21:35 +0300 |
commit | 49618b0e18f7554dd70ac898d93abc7baf380081 (patch) | |
tree | fa510093d9d7c21806ac32ad0442ca88380f7c60 /release/scripts | |
parent | af2d2d4dff77a1436b26007b5aa183075d91d537 (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')
-rw-r--r-- | release/scripts/startup/bl_operators/anim.py | 2 |
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") |