2.5 - Newly created KeyingSets are now automatically named properly.
authorJoshua Leung <aligorith@gmail.com>
Tue, 18 Aug 2009 04:15:47 +0000 (04:15 +0000)
committerJoshua Leung <aligorith@gmail.com>
Tue, 18 Aug 2009 04:15:47 +0000 (04:15 +0000)
source/blender/blenkernel/intern/anim_sys.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/space_outliner/outliner_header.c
source/blender/makesrna/intern/rna_scene.c

index 204935cc38d3dc007d13a415351d0c6b45609d74..5eaf21335157f4702348de78d16a43e120c1ee56 100644 (file)
@@ -276,7 +276,7 @@ KeyingSet *BKE_keyingset_add (ListBase *list, const char name[], short flag, sho
        if (name)
                BLI_snprintf(ks->name, 64, name);
        else
-               strcpy(ks->name, "Keying Set");
+               strcpy(ks->name, "KeyingSet");
        
        ks->flag= flag;
        ks->keyingflag= keyingflag;
@@ -285,7 +285,7 @@ KeyingSet *BKE_keyingset_add (ListBase *list, const char name[], short flag, sho
        BLI_addtail(list, ks);
        
        /* make sure KeyingSet has a unique name (this helps with identification) */
-       BLI_uniquename(list, ks, "Keying Set", ' ', offsetof(KeyingSet, name), 64);
+       BLI_uniquename(list, ks, "KeyingSet", '.', offsetof(KeyingSet, name), 64);
        
        /* return new KeyingSet for further editing */
        return ks;
index fffec61ec60d9e7db9a1a398be0fb9976f5e7e67..762ad82344b749fa780babc4864699633412601e 100644 (file)
@@ -3901,7 +3901,7 @@ static KeyingSet *verify_active_keyingset(Scene *scene, short add)
        /* add if none found */
        // XXX the default settings have yet to evolve
        if ((add) && (ks==NULL)) {
-               ks= BKE_keyingset_add(&scene->keyingsets, "Keying Set", KEYINGSET_ABSOLUTE, 0);
+               ks= BKE_keyingset_add(&scene->keyingsets, NULL, KEYINGSET_ABSOLUTE, 0);
                scene->active_keyingset= BLI_countlist(&scene->keyingsets);
        }
        
index 0c7859ed4e27c238fb06993d35957afff5479de8..d4eeaabd1d3a3ed793f01ba3d898f4c23e06715b 100644 (file)
@@ -177,7 +177,7 @@ static void do_outliner_buttons(bContext *C, void *arg, int event)
                        /* add a new KeyingSet if active is -1 */
                        if (scene->active_keyingset == -1) {
                                // XXX the default settings have yet to evolve... need to keep this in sync with the 
-                               BKE_keyingset_add(&scene->keyingsets, "KeyingSet", KEYINGSET_ABSOLUTE, 0);
+                               BKE_keyingset_add(&scene->keyingsets, NULL, KEYINGSET_ABSOLUTE, 0);
                                scene->active_keyingset= BLI_countlist(&scene->keyingsets);
                        }
                        
@@ -196,6 +196,8 @@ static void do_outliner_buttons(bContext *C, void *arg, int event)
                                        BLI_freelinkN(&scene->keyingsets, ks);
                                        scene->active_keyingset= 0;
                                }
+                               else
+                                       scene->active_keyingset= 0;
                        }
                        
                        /* redraw regions with KeyingSet info */
index 440f12be2ce81e6b0346903e9756826988f7324e..bb6611205b630e698c038cb08a0fdde03a0efae4 100644 (file)
@@ -1845,6 +1845,7 @@ void RNA_def_scene(BlenderRNA *brna)
        
        prop= RNA_def_property(srna, "active_keying_set", PROP_POINTER, PROP_NONE);
        RNA_def_property_struct_type(prop, "KeyingSet");
+       RNA_def_property_flag(prop, PROP_EDITABLE);
        RNA_def_property_editable_func(prop, "rna_Scene_active_keying_set_editable");
        RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get", "rna_Scene_active_keying_set_set", NULL);
        RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes.");