2.5 - KeyingSet fixes
authorJoshua Leung <aligorith@gmail.com>
Fri, 4 Sep 2009 10:41:02 +0000 (10:41 +0000)
committerJoshua Leung <aligorith@gmail.com>
Fri, 4 Sep 2009 10:41:02 +0000 (10:41 +0000)
* Fixed warnings in console about missing (removed) property
* Fixed update problems after creating a new keyingset

source/blender/editors/animation/keyingsets.c
source/blender/editors/interface/interface_anim.c

index a91a9bfa911001c7258fb37427dd26c7b10762d8..15d47211615e6b2abf7c9d85b0618493a8bf329f 100644 (file)
@@ -133,6 +133,7 @@ static int add_keyingset_button_exec (bContext *C, wmOperator *op)
                                
                        /* add path to this setting */
                        BKE_keyingset_add_destination(ks, ptr.id.data, NULL, path, index, pflag, KSP_GROUP_KSNAME);
+                       success= 1;
                        
                        /* free the temp path created */
                        MEM_freeN(path);
@@ -144,7 +145,7 @@ static int add_keyingset_button_exec (bContext *C, wmOperator *op)
                ED_anim_dag_flush_update(C);    
                
                /* for now, only send ND_KEYS for KeyingSets */
-               WM_event_add_notifier(C, ND_KEYS, NULL);
+               WM_event_add_notifier(C, NC_SCENE|ND_KEYINGSET, NULL);
        }
        
        return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
@@ -222,7 +223,7 @@ static int remove_keyingset_button_exec (bContext *C, wmOperator *op)
                ED_anim_dag_flush_update(C);    
                
                /* for now, only send ND_KEYS for KeyingSets */
-               WM_event_add_notifier(C, ND_KEYS, NULL);
+               WM_event_add_notifier(C, NC_SCENE|ND_KEYINGSET, NULL);
        }
        
        return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
index 8e15bbde2015526241d2ab1ff05819ff26ec50fc..8c41726b81b786a10604242f3838070a238a4eb3 100644 (file)
@@ -283,11 +283,11 @@ void ui_but_anim_menu(bContext *C, uiBut *but)
                        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);
+                               uiItemO(layout, "Remove from Keying Set", 0, "ANIM_OT_remove_keyingset_button");
                        }
                        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);
+                               uiItemO(layout, "Remove from Keying Set", 0, "ANIM_OT_remove_keyingset_button");
                        }
                }