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:
authorBastien Montagne <montagne29@wanadoo.fr>2012-03-08 18:04:06 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-03-08 18:04:06 +0400
commita80b7d612947e1d26b10165a37bb603dae527afd (patch)
tree7a575b2f99b093e43d50d9322f8d1c50477b0fa6 /release/scripts/startup/bl_operators/anim.py
parenta5f2db9992327764126ee7f275294d1f0699a26a (diff)
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.
Diffstat (limited to 'release/scripts/startup/bl_operators/anim.py')
-rw-r--r--release/scripts/startup/bl_operators/anim.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_operators/anim.py b/release/scripts/startup/bl_operators/anim.py
index d26a7728af1..2689cfda8eb 100644
--- a/release/scripts/startup/bl_operators/anim.py
+++ b/release/scripts/startup/bl_operators/anim.py
@@ -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")