Index: source/blender/editors/armature/armature_relations.c =================================================================== --- source/blender/editors/armature/armature_relations.c (revision 58126) +++ source/blender/editors/armature/armature_relations.c (working copy) @@ -170,7 +170,7 @@ } /* join armature exec is exported for use in object->join objects operator... */ -int join_armature_exec(bContext *C, wmOperator *UNUSED(op)) +int join_armature_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); @@ -180,6 +180,7 @@ bPoseChannel *pchan, *pchann; EditBone *curbone; float mat[4][4], oimat[4][4]; + int ok = 0; /* Ensure we're not in editmode and that the active object is an armature*/ if (!ob || ob->type != OB_ARMATURE) @@ -187,6 +188,19 @@ if (!arm || arm->edbo) return OPERATOR_CANCELLED; + CTX_DATA_BEGIN(C, Base *, base, selected_editable_bases) + { + if (base->object == ob) + ok = 1; + } + CTX_DATA_END; + + /* that way the active object is always selected */ + if (ok == 0) { + BKE_report(op->reports, RPT_WARNING, "Active object is not a selected armature"); + return OPERATOR_CANCELLED; + } + /* Get editbones of active armature to add editbones to */ ED_armature_to_edit(ob); @@ -270,7 +284,8 @@ } } CTX_DATA_END; - + + DAG_relations_tag_update(bmain); /* because we removed object(s) */ ED_armature_from_edit(ob); @@ -468,8 +483,8 @@ /* TODO: use context iterators for this? */ CTX_DATA_BEGIN(C, Base *, base, visible_bases) { - if (base->object == obedit) base->flag |= SELECT; - else base->flag &= ~SELECT; + if (base->object == obedit) base->flag |= 1; + else base->flag &= ~1; } CTX_DATA_END; Index: source/blender/editors/curve/editcurve.c =================================================================== --- source/blender/editors/curve/editcurve.c (revision 58126) +++ source/blender/editors/curve/editcurve.c (working copy) @@ -6100,7 +6100,7 @@ /************** join operator, to be used externally? ****************/ /* TODO: shape keys - as with meshes */ -int join_curve_exec(bContext *C, wmOperator *UNUSED(op)) +int join_curve_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); @@ -6111,8 +6111,21 @@ BPoint *bp; ListBase tempbase; float imat[4][4], cmat[4][4]; - int a; + int a, ok = 0; + CTX_DATA_BEGIN(C, Base *, base, selected_editable_bases) + { + if (base->object == ob) + ok = 1; + } + CTX_DATA_END; + + /* that way the active object is always selected */ + if (ok == 0) { + BKE_report(op->reports, RPT_WARNING, "Active object is not a selected curve"); + return OPERATOR_CANCELLED; + } + tempbase.first = tempbase.last = NULL; /* trasnform all selected curves inverse in obact */