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/editors/object/object_constraint.c')
-rw-r--r--source/blender/editors/object/object_constraint.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 50b798c5bea..b36416151a9 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -55,6 +55,7 @@
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_report.h"
+#include "BKE_tracking.h"
#include "BIK_api.h"
#ifdef WITH_PYTHON
@@ -402,6 +403,23 @@ static void test_constraints (Object *owner, bPoseChannel *pchan)
data->flag &= ~CONSTRAINT_SPLINEIK_BOUND;
}
}
+ else if (curcon->type == CONSTRAINT_TYPE_FOLLOWTRACK) {
+ bFollowTrackConstraint *data = curcon->data;
+
+ if((data->flag&CAMERASOLVER_ACTIVECLIP)==0) {
+ if(data->clip != NULL && data->track[0]) {
+ if (!BKE_tracking_named_track(&data->clip->tracking, data->track))
+ curcon->flag |= CONSTRAINT_DISABLE;
+ }
+ else curcon->flag |= CONSTRAINT_DISABLE;
+ }
+ }
+ else if (curcon->type == CONSTRAINT_TYPE_CAMERASOLVER) {
+ bCameraSolverConstraint *data = curcon->data;
+
+ if((data->flag&CAMERASOLVER_ACTIVECLIP)==0 && data->clip == NULL)
+ curcon->flag |= CONSTRAINT_DISABLE;
+ }
/* Check targets for constraints */
if (cti && cti->get_constraint_targets) {
@@ -1368,7 +1386,9 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase
BPY_pyconstraint_update(ob, con);
}
#endif
+ break;
}
+
default:
break;
}