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/include/ED_keyframing.h | |
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/include/ED_keyframing.h')
-rw-r--r-- | source/blender/editors/include/ED_keyframing.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index 92e9c541b6a..86a1f5c4031 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -193,6 +193,9 @@ struct KeyingSet *ANIM_scene_get_active_keyingset(struct Scene *scene); /* Get the index of the Keying Set provided, for the given Scene */ int ANIM_scene_get_keyingset_index(struct Scene *scene, struct KeyingSet *ks); +/* Create (and show) a menu containing all the Keying Sets which can be used in the current context */ +void ANIM_keying_sets_menu_setup(struct bContext *C, char title[], char op_name[]); + /* Check if KeyingSet can be used in the current context */ short ANIM_keyingset_context_ok_poll(struct bContext *C, struct KeyingSet *ks); |