Fixing several issues with keyingsets:
*Add a new idname to keyingsets, keeping name as label-only (using same string for both made lookup fail when using i18n other than english, as it tried to compare an untranslated static string id against a translated RNA name). Also adding a description string (can be helpful with custom keyingsets, imho). *Fixed a few other bugs related to that area (namely, you can’t deselect current keyingset from the shift-ctrl-alt-I popup menu, and insert/delete key ops were using a rather strange way to get chosen custom keyingset…). *Fixed UI code so that it always uses (RNA) enum, and simplified menu-creation code.
This commit is contained in:
@@ -67,15 +67,16 @@ class ANIM_OT_keying_set_export(Operator):
|
||||
scene = context.scene
|
||||
ks = scene.keying_sets.active
|
||||
|
||||
f.write("# Keying Set: %s\n" % ks.name)
|
||||
f.write("# Keying Set: %s\n" % ks.bl_idname)
|
||||
|
||||
f.write("import bpy\n\n")
|
||||
# XXX, why not current scene?
|
||||
f.write("scene= bpy.data.scenes[0]\n\n")
|
||||
f.write("scene = bpy.context.scene\n\n")
|
||||
|
||||
# Add KeyingSet and set general settings
|
||||
f.write("# Keying Set Level declarations\n")
|
||||
f.write("ks= scene.keying_sets.new(name=\"%s\")\n" % ks.name)
|
||||
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)
|
||||
|
||||
if not ks.is_path_absolute:
|
||||
f.write("ks.is_path_absolute = False\n")
|
||||
|
Reference in New Issue
Block a user