diff --git a/source/blender/blenkernel/BKE_constraint.h b/source/blender/blenkernel/BKE_constraint.h index 5396a503ac5..610df2685bf 100644 --- a/source/blender/blenkernel/BKE_constraint.h +++ b/source/blender/blenkernel/BKE_constraint.h @@ -236,10 +236,7 @@ struct bConstraint *BKE_constraint_add_for_pose(struct Object *ob, const char *name, short type); -bool BKE_constraint_remove_ex(ListBase *list, - struct Object *ob, - struct bConstraint *con, - bool clear_dep); +bool BKE_constraint_remove_ex(ListBase *list, struct Object *ob, struct bConstraint *con); /** * Remove the specified constraint from the given constraint stack. */ diff --git a/source/blender/blenkernel/intern/constraint.cc b/source/blender/blenkernel/intern/constraint.cc index 213620938a7..170cd3ad57e 100644 --- a/source/blender/blenkernel/intern/constraint.cc +++ b/source/blender/blenkernel/intern/constraint.cc @@ -5615,12 +5615,12 @@ bool BKE_constraint_remove(ListBase *list, bConstraint *con) return false; } -bool BKE_constraint_remove_ex(ListBase *list, Object *ob, bConstraint *con, bool clear_dep) +bool BKE_constraint_remove_ex(ListBase *list, Object *ob, bConstraint *con) { const short type = con->type; if (BKE_constraint_remove(list, con)) { /* ITASC needs to be rebuilt once a constraint is removed #26920. */ - if (clear_dep && ELEM(type, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK)) { + if (ELEM(type, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK)) { BIK_clear_data(ob->pose); } return true; @@ -5680,7 +5680,7 @@ bool BKE_constraint_apply_and_remove_for_object(Depsgraph *depsgraph, return false; } - return BKE_constraint_remove_ex(constraints, ob, con, true); + return BKE_constraint_remove_ex(constraints, ob, con); } bool BKE_constraint_apply_for_pose( @@ -5743,7 +5743,7 @@ bool BKE_constraint_apply_and_remove_for_pose(Depsgraph *depsgraph, return false; } - return BKE_constraint_remove_ex(constraints, ob, con, true); + return BKE_constraint_remove_ex(constraints, ob, con); } void BKE_constraint_panel_expand(bConstraint *con) diff --git a/source/blender/editors/object/object_constraint.cc b/source/blender/editors/object/object_constraint.cc index 182b7ec586e..96101d939b3 100644 --- a/source/blender/editors/object/object_constraint.cc +++ b/source/blender/editors/object/object_constraint.cc @@ -1450,7 +1450,7 @@ static int constraint_delete_exec(bContext *C, wmOperator *op) STRNCPY(name, con->name); /* free the constraint */ - if (BKE_constraint_remove_ex(lb, ob, con, true)) { + if (BKE_constraint_remove_ex(lb, ob, con)) { /* Needed to set the flags on pose-bones correctly. */ ED_object_constraint_update(bmain, ob); diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc index 5bce12bdaa6..c76f1480ff2 100644 --- a/source/blender/editors/space_outliner/outliner_tools.cc +++ b/source/blender/editors/space_outliner/outliner_tools.cc @@ -2294,7 +2294,7 @@ static void constraint_fn(int event, TreeElement *te, TreeStoreElem * /*tselem*/ lb = &ob->constraints; } - if (BKE_constraint_remove_ex(lb, ob, constraint, true)) { + if (BKE_constraint_remove_ex(lb, ob, constraint)) { /* there's no active constraint now, so make sure this is the case */ BKE_constraints_active_set(&ob->constraints, nullptr);