Camera tracking integration
=========================== - Hopefully last fix for sensor-related compilation error. - Set SAD correlation and KLT pyramid level for tracks created on previous version of Blender. - Do not flip current frame number when it's getting to close to right boundary of clip editor.
This commit is contained in:
@@ -130,6 +130,7 @@
|
||||
#include "BKE_screen.h"
|
||||
#include "BKE_sequencer.h"
|
||||
#include "BKE_texture.h" // for open_plugin_tex
|
||||
#include "BKE_tracking.h"
|
||||
#include "BKE_utildefines.h" // SWITCH_INT DATA ENDB DNA1 O_BINARY GLOB USER TEST REND
|
||||
#include "BKE_sound.h"
|
||||
|
||||
@@ -12368,6 +12369,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
}
|
||||
|
||||
for (clip= main->movieclip.first; clip; clip= clip->id.next) {
|
||||
MovieTrackingTrack *track;
|
||||
|
||||
if(clip->aspx<1.0f) {
|
||||
clip->aspx= 1.0f;
|
||||
clip->aspy= 1.0f;
|
||||
@@ -12383,6 +12386,17 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
|
||||
if(clip->tracking.camera.pixel_aspect<0.01f)
|
||||
clip->tracking.camera.pixel_aspect= 1.f;
|
||||
|
||||
track= clip->tracking.tracks.first;
|
||||
while(track) {
|
||||
if(track->pyramid_levels==0)
|
||||
track->pyramid_levels= 2;
|
||||
|
||||
if(track->minimum_correlation==0.0f)
|
||||
track->minimum_correlation= 0.75f;
|
||||
|
||||
track= track->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,19 +175,11 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Sc
|
||||
fontsize= BLF_height(fontid, str);
|
||||
fontwidth= BLF_width(fontid, str);
|
||||
|
||||
if(x+fontwidth+6.0f<=ar->winx) {
|
||||
glRecti(x, 8, x+fontwidth+6, 12+fontsize);
|
||||
glRecti(x, 8, x+fontwidth+6, 12+fontsize);
|
||||
|
||||
UI_ThemeColor(TH_TEXT);
|
||||
BLF_position(fontid, x+2.0f, 10.0f, 0.0f);
|
||||
BLF_draw(fontid, str, strlen(str));
|
||||
} else {
|
||||
glRecti(x+framelen, 8.0f, x+framelen-fontwidth-6.0f, 12.0f+fontsize);
|
||||
|
||||
UI_ThemeColor(TH_TEXT);
|
||||
BLF_position(fontid, x-2.0f-fontwidth+framelen, 10.0f, 0.0f);
|
||||
BLF_draw(fontid, str, strlen(str));
|
||||
}
|
||||
UI_ThemeColor(TH_TEXT);
|
||||
BLF_position(fontid, x+2.0f, 10.0f, 0.0f);
|
||||
BLF_draw(fontid, str, strlen(str));
|
||||
}
|
||||
|
||||
static void draw_movieclip_notes(SpaceClip *sc, ARegion *ar)
|
||||
|
||||
@@ -136,7 +136,7 @@ void draw_depth_gpencil(Scene *scene, ARegion *ar, View3D *v3d);
|
||||
void view3d_clr_clipping(void);
|
||||
void view3d_set_clipping(RegionView3D *rv3d);
|
||||
void add_view3d_after(ListBase *lb, Base *base, int flag);
|
||||
void view3d_viewborder_size_get(struct Scene *scene, struct Objecy *camob, struct ARegion *ar, float size_r[2]);
|
||||
void view3d_viewborder_size_get(struct Scene *scene, struct Object *camob, struct ARegion *ar, float size_r[2]);
|
||||
|
||||
void circf(float x, float y, float rad);
|
||||
void circ(float x, float y, float rad);
|
||||
|
||||
Reference in New Issue
Block a user