Bugfixes:

* #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.
This commit is contained in:
2009-09-25 01:30:32 +00:00
parent 2060127e1f
commit 558626714e
4 changed files with 13 additions and 4 deletions

View 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:

View 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;
}

View 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);
}

View 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);