Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/constraint.c')
-rw-r--r--source/blender/blenkernel/intern/constraint.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 668b78a08d4..71b2e7df4b2 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -79,6 +79,8 @@
#include "BKE_tracking.h"
#include "BKE_movieclip.h"
+#include "BIK_api.h"
+
#ifdef WITH_PYTHON
# include "BPY_extern.h"
#endif
@@ -4410,8 +4412,23 @@ bool BKE_constraint_remove(ListBase *list, bConstraint *con)
BLI_freelinkN(list, con);
return true;
}
- else
+ else {
return false;
+ }
+}
+
+bool BKE_constraint_remove_ex(ListBase *list, Object *ob, bConstraint *con, bool clear_dep)
+{
+ if (BKE_constraint_remove(list, con)) {
+ /* ITASC needs to be rebuilt once a constraint is removed [#26920] */
+ if (clear_dep && ELEM(con->type, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK)) {
+ BIK_clear_data(ob->pose);
+ }
+ return true;
+ }
+ else {
+ return false;
+ }
}
/* ......... */