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:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-12-05 22:57:17 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-12-05 22:57:17 +0400
commit9355cc5c399a9d7cd49815c68eeeac788022ba1a (patch)
treec4b9c3c19e31b7a06f98486fcbb85008dc51ca5c /source/blender/editors/object/object_constraint.c
parentf55f9e95db44838130a18f80b33bd77f58e8a987 (diff)
Object tracking; initial commit
This commit implements basis stuff needed for object tracking, use case isn't perfect now, interface also should be cleaned a bit. - Added list of objects to be tracked. Default there's only one object called "Camera" which is used for solving camera motion. Other objects can be added and each of them will have it;s own list of tracks. Only one object can be used for camera solving at this moment. - Added new constraint called "Object Tracking" which makes oriented object be moving in the save way as solved object motion. - Scene orientation tools can be used for orienting object to bundles. - All tools which works with list of tracks or reconstruction data now gets that lists from active editing object. - All objects and their tracking data are available via python api.
Diffstat (limited to 'source/blender/editors/object/object_constraint.c')
-rw-r--r--source/blender/editors/object/object_constraint.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 2a45a7df735..7b9e809fffc 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -408,8 +408,21 @@ static void test_constraints (Object *owner, bPoseChannel *pchan)
if((data->flag&CAMERASOLVER_ACTIVECLIP)==0) {
if(data->clip != NULL && data->track[0]) {
- if (!BKE_tracking_named_track(&data->clip->tracking, data->track))
+ MovieTracking *tracking= &data->clip->tracking;
+ MovieTrackingObject *tracking_object;
+
+ if(data->object[0])
+ tracking_object= BKE_tracking_named_object(tracking, data->object);
+ else
+ tracking_object= BKE_tracking_get_camera_object(tracking);
+
+ if(!tracking_object) {
curcon->flag |= CONSTRAINT_DISABLE;
+ }
+ else {
+ if (!BKE_tracking_named_track(tracking, tracking_object, data->track))
+ curcon->flag |= CONSTRAINT_DISABLE;
+ }
}
else curcon->flag |= CONSTRAINT_DISABLE;
}