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:
authorJoshua Leung <aligorith@gmail.com>2009-09-04 11:26:32 +0400
committerJoshua Leung <aligorith@gmail.com>2009-09-04 11:26:32 +0400
commit15ef88b90239af30b08e798cc57cea317f1d56c9 (patch)
treea02b2fd7c3da8494ca032065e8639a012a1b35b9 /source/blender/editors/interface/interface_anim.c
parent62dd488ad16911620137ac655ae2f5980374c2bc (diff)
Keying Sets: Added options to add/remove properties from the active Keying Set to the RMB menu (and also via KKEY and ALT-K respectively)
Diffstat (limited to 'source/blender/editors/interface/interface_anim.c')
-rw-r--r--source/blender/editors/interface/interface_anim.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c
index d7904a19bfe..8e15bbde201 100644
--- a/source/blender/editors/interface/interface_anim.c
+++ b/source/blender/editors/interface/interface_anim.c
@@ -209,6 +209,18 @@ void ui_but_anim_remove_driver(bContext *C)
WM_operator_name_call(C, "ANIM_OT_remove_driver_button", WM_OP_INVOKE_DEFAULT, NULL);
}
+void ui_but_anim_add_keyingset(bContext *C)
+{
+ /* this operator calls uiAnimContextProperty above */
+ WM_operator_name_call(C, "ANIM_OT_add_keyingset_button", WM_OP_INVOKE_DEFAULT, NULL);
+}
+
+void ui_but_anim_remove_keyingset(bContext *C)
+{
+ /* this operator calls uiAnimContextProperty above */
+ WM_operator_name_call(C, "ANIM_OT_remove_keyingset_button", WM_OP_INVOKE_DEFAULT, NULL);
+}
+
void ui_but_anim_menu(bContext *C, uiBut *but)
{
uiPopupMenu *pup;
@@ -264,6 +276,20 @@ void ui_but_anim_menu(bContext *C, uiBut *but)
else
uiItemBooleanO(layout, "Add Driver", 0, "ANIM_OT_add_driver_button", "all", 0);
}
+
+ if(RNA_property_animateable(&but->rnapoin, but->rnaprop)) {
+ uiItemS(layout);
+
+ if(length) {
+ uiItemBooleanO(layout, "Add All to Keying Set", 0, "ANIM_OT_add_keyingset_button", "all", 1);
+ uiItemBooleanO(layout, "Add Single to Keying Set", 0, "ANIM_OT_add_keyingset_button", "all", 0);
+ uiItemBooleanO(layout, "Remove from Keying Set", 0, "ANIM_OT_remove_keyingset_button", "all", 0);
+ }
+ else {
+ uiItemBooleanO(layout, "Add to Keying Set", 0, "ANIM_OT_add_keyingset_button", "all", 0);
+ uiItemBooleanO(layout, "Remove from Keying Set", 0, "ANIM_OT_remove_keyingset_button", "all", 0);
+ }
+ }
uiPupMenuEnd(C, pup);
}