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:
authorMiika Hamalainen <blender@miikah.org>2011-11-07 20:36:49 +0400
committerMiika Hamalainen <blender@miikah.org>2011-11-07 20:36:49 +0400
commitedec46b0a6aac18f406991b9e16228d4bd848c61 (patch)
tree1240768d737c63705fdb38c9832d926ed0bcda94 /source/blender/editors/object/object_constraint.c
parent2ed6f077b3952123d56916980d18a379ecb3e5ac (diff)
parent4d7a9e5c055fd3903162b61fdd40fb77b2b96793 (diff)
Merge with trunk r41625
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;
}