Camera tracking: moved camera solver into it's own job
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 28 Nov 2011 13:49:42 +0000 (13:49 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 28 Nov 2011 13:49:42 +0000 (13:49 +0000)
commit9f3c921957124d65aa0d2cbc4ad2aacb56411670
tree1aa3e3eb139ce638afba27cc129dbfd167446728
parent24cc4a6c2188f8143282851b19c11f0b61d41475
Camera tracking: moved camera solver into it's own job

In some cases solving can take a while (especially when refining is used)
and keeping interface locked is a bit annoying. Now camera solver is moved
to job system and interface isn't locking.

Reporting progress isn't really accurate, but trying to make it more linear
can lead to spending more effort on it than having benefit. Also, changing
status in the information line helps to understand that blender isn't hang
up and solving is till working nicely.

Main changes in code:
- libmv_solveReconstruction now accepts additional parameters:
  * progress_update_callback - a function which is getting called
    from solver algorithm to report progress back to Blender.
  * callback_customdata - a user-defined context which is passing
    to progress_update_callback so progress can be updated in needed
    blender-side data structures.

  This parameters are optional.

- Added structure MovieTrackingStats which is placed in MovieTracking
  structure. It's supposed to be used for displaying information about
  different operations (currently it's only camera solver, but can be
  easily used for something else in the future) in clip editor.
  This statistics structure is getting allocated for time operator is
  working and not saving into .blend file.

- Clip Editor now displays statistics stored in MovieTrackingStats structure
  like it's done for rendering.
13 files changed:
extern/libmv/CMakeLists.txt
extern/libmv/libmv-capi.cpp
extern/libmv/libmv-capi.h
extern/libmv/libmv/simple_pipeline/callbacks.cc [new file with mode: 0644]
extern/libmv/libmv/simple_pipeline/callbacks.h [new file with mode: 0644]
extern/libmv/libmv/simple_pipeline/pipeline.cc
extern/libmv/libmv/simple_pipeline/pipeline.h
source/blender/blenkernel/BKE_tracking.h
source/blender/blenkernel/intern/tracking.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/space_clip/clip_draw.c
source/blender/editors/space_clip/tracking_ops.c
source/blender/makesdna/DNA_tracking_types.h