diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-03-25 14:34:18 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-03-25 14:34:18 +0300 |
commit | b88278b62b676765c03a94dd739ace73b582cea7 (patch) | |
tree | 1c5b0bc210aa0e38f91e49946bd35089f0192036 /source/blender/editors/animation/anim_ops.c | |
parent | 57b2ea62ab6f2f8e6dbd8cd51be0ef93b65ef34a (diff) |
More assorted Keying Sets changes for Cessen (mainly api stuff):
* Added operator (Ctrl Shift Alt I) to show menu for changing the active Keying Set in the 3D view (todo item from last commit)
* KeyingSetInfo (i.e. the Builtin Keying Set classes) can now be accessed from Keying Set instances with ks.type_info
* Added ks.remove_all_paths() function to remove all the paths for a Keying Set.
---
These two changes mean that builtin Keying Sets could be refreshed in response to context changes by doing:
<code>
ks = bpy.context.scene.active_keying_set
if ks.absolute==False and ks.type_info:
ksi = ks.type_info
# remove existing paths to fill with new
ks.remove_all_paths()
# check if Keying Set can be used in current context
if ksi.poll(bpy.context):
# call iterator() which calls generate() and re-populates paths list
ksi.iterator(bpy.context, ks)
</code>
And then, once this has been done, the paths that the Keying Set will operate on can be accessed as
<code>
paths = bpy.context.scene.active_keying_set.paths
</code>
Diffstat (limited to 'source/blender/editors/animation/anim_ops.c')
-rw-r--r-- | source/blender/editors/animation/anim_ops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index 348520b60bf..88d6051b23b 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -361,6 +361,8 @@ void ED_operatortypes_anim(void) WM_operatortype_append(ANIM_OT_keying_set_remove); WM_operatortype_append(ANIM_OT_keying_set_path_add); WM_operatortype_append(ANIM_OT_keying_set_path_remove); + + WM_operatortype_append(ANIM_OT_keying_set_active_set); } void ED_keymap_anim(wmKeyConfig *keyconf) |