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/blenkernel/intern/depsgraph.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/blenkernel/intern/depsgraph.c')
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 4eaf49dc679..b0776a0b51b 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -647,16 +647,21 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
continue;
/* special case for camera tracking -- it doesn't use targets to define relations */
- if(ELEM(cti->type, CONSTRAINT_TYPE_FOLLOWTRACK, CONSTRAINT_TYPE_CAMERASOLVER)) {
+ if(ELEM3(cti->type, CONSTRAINT_TYPE_FOLLOWTRACK, CONSTRAINT_TYPE_CAMERASOLVER, CONSTRAINT_TYPE_OBJECTSOLVER)) {
+ int depends_on_camera= 0;
+
if(cti->type==CONSTRAINT_TYPE_FOLLOWTRACK) {
bFollowTrackConstraint *data= (bFollowTrackConstraint *)con->data;
- if((data->clip || data->flag&FOLLOWTRACK_ACTIVECLIP) && data->track[0]) {
- if(scene->camera) {
- node2 = dag_get_node(dag, scene->camera);
- dag_add_relation(dag, node2, node, DAG_RL_DATA_OB|DAG_RL_OB_OB, cti->name);
- }
- }
+ if((data->clip || data->flag&FOLLOWTRACK_ACTIVECLIP) && data->track[0])
+ depends_on_camera= 1;
+ }
+ else if(cti->type==CONSTRAINT_TYPE_OBJECTSOLVER)
+ depends_on_camera= 1;
+
+ if(depends_on_camera && scene->camera) {
+ node2 = dag_get_node(dag, scene->camera);
+ dag_add_relation(dag, node2, node, DAG_RL_DATA_OB|DAG_RL_OB_OB, cti->name);
}
dag_add_relation(dag,scenenode,node,DAG_RL_SCENE, "Scene Relation");
@@ -2160,7 +2165,7 @@ static void dag_object_time_update_flags(Object *ob)
if (cti) {
/* special case for camera tracking -- it doesn't use targets to define relations */
- if(ELEM(cti->type, CONSTRAINT_TYPE_FOLLOWTRACK, CONSTRAINT_TYPE_CAMERASOLVER)) {
+ if(ELEM3(cti->type, CONSTRAINT_TYPE_FOLLOWTRACK, CONSTRAINT_TYPE_CAMERASOLVER, CONSTRAINT_TYPE_OBJECTSOLVER)) {
ob->recalc |= OB_RECALC_OB;
}
else if (cti->get_constraint_targets) {