Bugfixes:
authorJoshua Leung <aligorith@gmail.com>
Fri, 25 Sep 2009 01:30:32 +0000 (01:30 +0000)
committerJoshua Leung <aligorith@gmail.com>
Fri, 25 Sep 2009 01:30:32 +0000 (01:30 +0000)
* #19459: Shape Keys not Animateable
Shape Keys were missing the appropriate 'path' callbacks.

* #19458: 3D Viewport doesn't refresh when adding new bone in editmode (using Shift-A)
The 'wrong' notifier was being sent. Currently, Armature EditMode only responds to NC_OBJECT|ND_TRANSFORM, which isn't strictly that correct for all cases.

* Alignment code for constraints headers (i.e. enable/disable lumped with the delete constraint button) was causing the delete button to not work anymore. Removed the offending code (it shouldn't have been there to start off with).

* When object's don't have their own AnimData (i.e. if you only animate the values of some shapekeys), a space is no longer left beside the object's name for a visibility toggle in the Graph Editor.

source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/armature/editarmature.c
source/blender/editors/interface/interface_templates.c
source/blender/makesrna/intern/rna_key.c

index 7f0f2411bd08f09f525a6a45896baf9dd9ff0bf9..c6ecad03be8bda1e5a3b0e28d288029785676ff1 100644 (file)
@@ -461,6 +461,9 @@ static void acf_object_name(bAnimListElem *ale, char *name)
 /* check if some setting exists for this channel */
 static short acf_object_setting_valid(bAnimContext *ac, bAnimListElem *ale, int setting)
 {
+       Base *base= (Base *)ale->data;
+       Object *ob= base->object;
+       
        switch (setting) {
                /* muted only in NLA */
                case ACHANNEL_SETTING_MUTE: 
@@ -468,7 +471,7 @@ static short acf_object_setting_valid(bAnimContext *ac, bAnimListElem *ale, int
                        
                /* visible only in Graph Editor */
                case ACHANNEL_SETTING_VISIBLE: 
-                       return ((ac) && (ac->spacetype == SPACE_IPO));
+                       return ((ac) && (ac->spacetype == SPACE_IPO) && (ob->adt));
                
                /* only select and expand supported otherwise */
                case ACHANNEL_SETTING_SELECT:
index bc210fbcb546743fd6cfdaf4182b463344d8204b..5c224fbd4db39d5978b6defd827b285deaf1e0db 100644 (file)
@@ -3448,7 +3448,8 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op)
        else
                VecAddf(bone->tail, bone->head, imat[2]);       // bone with unit length 1, pointing up Z
 
-       WM_event_add_notifier(C, NC_OBJECT, obedit);
+       /* note, notifier might evolve */
+       WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, obedit);
        
        return OPERATOR_FINISHED;
 }
index 31f371c555308019eaccba7a3123764c816a4137..af4a4c13c808b16b62cd3addd73eb07dac660400 100644 (file)
@@ -905,10 +905,9 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
        
                /* Close 'button' - emboss calls here disable drawing of 'button' behind X */
                uiBlockSetEmboss(block, UI_EMBOSSN);
-                       uiBlockBeginAlign(block);
                        uiDefIconButBitS(block, ICONTOGN, CONSTRAINT_OFF, B_CONSTRAINT_TEST, ICON_CHECKBOX_DEHLT, xco+243, yco, 19, 19, &con->flag, 0.0, 0.0, 0.0, 0.0, "enable/disable constraint");
+                       
                        uiDefIconButO(block, BUT, "CONSTRAINT_OT_delete", WM_OP_INVOKE_DEFAULT, ICON_X, xco+262, yco, 19, 19, "Delete constraint");
-                       uiBlockEndAlign(block);
                uiBlockSetEmboss(block, UI_EMBOSS);
        }
        
index e66ee683e6155f84b2dda28ab905dad56f8d02b5..e1551404438fc1386ce348b26e926794c7098f06 100644 (file)
@@ -257,6 +257,11 @@ static PointerRNA rna_ShapeKey_data_get(CollectionPropertyIterator *iter)
        return rna_pointer_inherit_refine(&iter->parent, type, rna_iterator_array_get(iter));
 }
 
+static char *rna_ShapeKey_path(PointerRNA *ptr)
+{
+       return BLI_sprintfN("keys[\"%s\"]", ((KeyBlock*)ptr->data)->name);
+}
+
 static void rna_Key_update_data(bContext *C, PointerRNA *ptr)
 {
        Main *bmain= CTX_data_main(C);
@@ -343,6 +348,7 @@ static void rna_def_keyblock(BlenderRNA *brna)
        srna= RNA_def_struct(brna, "ShapeKey", NULL);
        RNA_def_struct_ui_text(srna, "Shape Key", "Shape key in a shape keys datablock.");
        RNA_def_struct_sdna(srna, "KeyBlock");
+       RNA_def_struct_path_func(srna, "rna_ShapeKey_path");
        RNA_def_struct_ui_icon(srna, ICON_SHAPEKEY_DATA);
 
        prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);