2.5 - A few bugfixes...

* Autoside renaming tools in EditMode for armatures now works again. (Wrong property name)
* Action used by NLA Strips can now be chosen/changed to another action
This commit is contained in:
Joshua Leung 2009-09-03 12:20:59 +00:00
parent 78425fb657
commit 92395bb93c
5 changed files with 9 additions and 6 deletions

@ -80,6 +80,7 @@ class BONE_PT_bone(BoneButtonsPanel):
if not bone:
bone = context.edit_bone
pchan = None
else:
pchan = ob.pose.pose_channels[context.bone.name]

@ -1069,9 +1069,9 @@ class VIEW3D_MT_edit_ARMATURE(bpy.types.Menu):
layout.itemS()
layout.item_enumO("armature.autoside_names", "axis", 'XAXIS', text="AutoName Left/Right")
layout.item_enumO("armature.autoside_names", "axis", 'YAXIS', text="AutoName Front/Back")
layout.item_enumO("armature.autoside_names", "axis", 'ZAXIS', text="AutoName Top/Bottom")
layout.item_enumO("armature.autoside_names", "type", 'XAXIS', text="AutoName Left/Right")
layout.item_enumO("armature.autoside_names", "type", 'YAXIS', text="AutoName Front/Back")
layout.item_enumO("armature.autoside_names", "type", 'ZAXIS', text="AutoName Top/Bottom")
layout.itemO("armature.flip_names")
layout.itemS()

@ -5387,7 +5387,7 @@ static int armature_autoside_names_exec (bContext *C, wmOperator *op)
Object *ob= CTX_data_edit_object(C);
bArmature *arm;
char newname[32];
short axis= RNA_enum_get(op->ptr, "axis");
short axis= RNA_enum_get(op->ptr, "type");
/* paranoia checks */
if (ELEM(NULL, ob, ob->pose))
@ -5434,7 +5434,7 @@ void ARMATURE_OT_autoside_names (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* settings */
RNA_def_enum(ot->srna, "axis", axis_items, 0, "Axis", "Axis tag names with.");
RNA_def_enum(ot->srna, "type", axis_items, 0, "Axis", "Axis tag names with.");
}

@ -119,6 +119,7 @@ static int nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
for (ale= anim_data.first; ale; ale= ale->next) {
// TODO: need some way to select active animdata too...
if (ale->type == ANIMTYPE_NLATRACK) {
NlaTrack *nlt= (NlaTrack *)ale->data;
AnimData *adt= ale->adt;
@ -210,7 +211,7 @@ static void nla_panel_animdata (const bContext *C, Panel *pa)
/* Active Action Properties ------------------------------------- */
/* action */
row= uiLayoutRow(layout, 1);
uiItemR(row, NULL, 0, &adt_ptr, "action", 0);
uiTemplateID(row, C, &adt_ptr, "action", NULL, NULL/*"ACT_OT_new", "ACT_OT_unlink"*/); // XXX: need to make these operators
/* extrapolation */
row= uiLayoutRow(layout, 1);

@ -350,6 +350,7 @@ void rna_def_nlastrip(BlenderRNA *brna)
/* Action */
prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "act");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Action", "Action referenced by this strip.");
/* Action extents */