rna object constraint remove function wasn't calling ED_object_constraint_update().

This commit is contained in:
Campbell Barton 2011-05-04 05:56:26 +00:00
parent ea5b43d862
commit ff7ae1d4f4
2 changed files with 3 additions and 5 deletions

@ -1096,8 +1096,9 @@ static void rna_Object_constraints_remove(Object *object, ReportList *reports, b
}
remove_constraint(&object->constraints, con);
ED_object_constraint_update(object);
ED_object_constraint_set_active(object, NULL);
WM_main_add_notifier(NC_OBJECT|ND_CONSTRAINT, object);
WM_main_add_notifier(NC_OBJECT|ND_CONSTRAINT|NA_REMOVED, object);
}
static ModifierData *rna_Object_modifier_new(Object *object, bContext *C, ReportList *reports, const char *name, int type)

@ -475,16 +475,13 @@ static void rna_PoseChannel_constraints_remove(ID *id, bPoseChannel *pchan, Repo
const short is_ik= ELEM(con->type, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK);
remove_constraint(&pchan->constraints, con);
ED_object_constraint_update(ob);
constraints_set_active(&pchan->constraints, NULL);
WM_main_add_notifier(NC_OBJECT|ND_CONSTRAINT|NA_REMOVED, id);
if (is_ik) {
BIK_clear_data(ob->pose);
}
WM_main_add_notifier(NC_OBJECT|ND_CONSTRAINT|NA_REMOVED, id);
}
}