Camera tracking integration: Final pre-merge code clean-up

This commit is contained in:
Sergey Sharybin 2011-11-07 12:50:26 +00:00
parent ca24008a77
commit af5526e58c
7 changed files with 9 additions and 20 deletions

@ -202,7 +202,7 @@ option(WITH_JACK "Enable Jack Support (http://www.jackaudio.org)" OFF)
option(WITH_LZO "Enable fast LZO compression (used for pointcache)" ON) option(WITH_LZO "Enable fast LZO compression (used for pointcache)" ON)
option(WITH_LZMA "Enable best LZMA compression, (used for pointcache)" ON) option(WITH_LZMA "Enable best LZMA compression, (used for pointcache)" ON)
# Tracking # Camera/motion tracking
option(WITH_LIBMV "Enable libmv structure from motion library" ON) option(WITH_LIBMV "Enable libmv structure from motion library" ON)
# Misc # Misc

@ -39,7 +39,6 @@ set(SRC
libmv-capi.cpp libmv-capi.cpp
libmv/numeric/numeric.cc libmv/numeric/numeric.cc
libmv/numeric/poly.cc libmv/numeric/poly.cc
libmv/numeric/tinyvector.cc
libmv/simple_pipeline/reconstruction.cc libmv/simple_pipeline/reconstruction.cc
libmv/simple_pipeline/resect.cc libmv/simple_pipeline/resect.cc
libmv/simple_pipeline/intersect.cc libmv/simple_pipeline/intersect.cc

@ -394,15 +394,15 @@ class CLIP_PT_display(Panel):
col.prop(sc, "show_marker_search", text="Search") col.prop(sc, "show_marker_search", text="Search")
col.prop(sc, "show_pyramid_levels", text="Pyramid") col.prop(sc, "show_pyramid_levels", text="Pyramid")
col.prop(sc, "show_track_path", text="Path") col.prop(sc, "show_track_path", text="Track Path")
row = col.row() row = col.row()
row.active = sc.show_track_path row.active = sc.show_track_path
row.prop(sc, "path_length", text="Length") row.prop(sc, "path_length", text="Length")
col.prop(sc, "show_disabled", text="Disabled") col.prop(sc, "show_disabled", "Disabled Tracks")
col.prop(sc, "show_bundles", text="Bundles") col.prop(sc, "show_bundles", text="Bundles")
col.prop(sc, "show_names", text="Names") col.prop(sc, "show_names", text="Track Names")
col.prop(sc, "show_tiny_markers", text="Tiny Markers") col.prop(sc, "show_tiny_markers", text="Tiny Markers")
col.prop(sc, "show_grease_pencil", text="Grease Pencil") col.prop(sc, "show_grease_pencil", text="Grease Pencil")

@ -1190,7 +1190,6 @@ static void emDM_getVert(DerivedMesh *dm, int index, MVert *vert_r)
/* TODO what to do with vert_r->flag? */ /* TODO what to do with vert_r->flag? */
vert_r->bweight = (unsigned char) (ev->bweight*255.0f); vert_r->bweight = (unsigned char) (ev->bweight*255.0f);
vert_r->flag= ev->f;
} }
static void emDM_getEdge(DerivedMesh *dm, int index, MEdge *edge_r) static void emDM_getEdge(DerivedMesh *dm, int index, MEdge *edge_r)

@ -52,7 +52,7 @@
#include "DNA_curve_types.h" #include "DNA_curve_types.h"
#include "DNA_mesh_types.h" #include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h" #include "DNA_meshdata_types.h"
#include "DNA_lamp_types.h"
#include "DNA_lattice_types.h" #include "DNA_lattice_types.h"
#include "DNA_scene_types.h" #include "DNA_scene_types.h"
#include "DNA_text_types.h" #include "DNA_text_types.h"

@ -643,7 +643,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
if(!cti) if(!cti)
continue; continue;
/* special case for FollowTrack -- it doesn't use targets to define relations */ /* special case for camera tracking -- it doesn't use targets to define relations */
if(ELEM(cti->type, CONSTRAINT_TYPE_FOLLOWTRACK, CONSTRAINT_TYPE_CAMERASOLVER)) { if(ELEM(cti->type, CONSTRAINT_TYPE_FOLLOWTRACK, CONSTRAINT_TYPE_CAMERASOLVER)) {
if(cti->type==CONSTRAINT_TYPE_FOLLOWTRACK) { if(cti->type==CONSTRAINT_TYPE_FOLLOWTRACK) {
bFollowTrackConstraint *data= (bFollowTrackConstraint *)con->data; bFollowTrackConstraint *data= (bFollowTrackConstraint *)con->data;
@ -2148,7 +2148,7 @@ static void dag_object_time_update_flags(Object *ob)
bConstraintTarget *ct; bConstraintTarget *ct;
if (cti) { if (cti) {
/* special case for FollowTrack -- it doesn't use targets to define relations */ /* special case for camera tracking -- it doesn't use targets to define relations */
if(ELEM(cti->type, CONSTRAINT_TYPE_FOLLOWTRACK, CONSTRAINT_TYPE_CAMERASOLVER)) { if(ELEM(cti->type, CONSTRAINT_TYPE_FOLLOWTRACK, CONSTRAINT_TYPE_CAMERASOLVER)) {
ob->recalc |= OB_RECALC_OB; ob->recalc |= OB_RECALC_OB;
} }
@ -2563,8 +2563,8 @@ static void dag_id_flush_update(Scene *sce, ID *id)
/* camera's matrix is used to orient reconstructed stuff, /* camera's matrix is used to orient reconstructed stuff,
so it should happen tracking-related constraints recalculation so it should happen tracking-related constraints recalculation
when camera is changing */ when camera is changing (sergey) */
if(sce->camera && &sce->camera->id == id && sce->clip) { if(sce->camera && &sce->camera->id == id && object_get_movieclip(sce, sce->camera, 1)) {
dag_id_flush_update(sce, &sce->clip->id); dag_id_flush_update(sce, &sce->clip->id);
} }

@ -12323,7 +12323,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
{ {
{ {
bScreen *sc; bScreen *sc;
Camera *cam;
MovieClip *clip; MovieClip *clip;
for (sc= main->screen.first; sc; sc= sc->id.next) { for (sc= main->screen.first; sc; sc= sc->id.next) {
@ -12350,14 +12349,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
} }
} }
for(cam= main->camera.first; cam; cam= cam->id.next) {
if (cam->sensor_x < 0.01)
cam->sensor_x = DEFAULT_SENSOR_WIDTH;
if (cam->sensor_y < 0.01)
cam->sensor_y = DEFAULT_SENSOR_HEIGHT;
}
for (clip= main->movieclip.first; clip; clip= clip->id.next) { for (clip= main->movieclip.first; clip; clip= clip->id.next) {
MovieTrackingTrack *track; MovieTrackingTrack *track;