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.
This commit is contained in:
Joshua Leung 2019-02-05 16:21:35 +13:00
parent af2d2d4dff
commit 49618b0e18
1 changed files with 1 additions and 1 deletions

View File

@ -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")