diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-11-07 16:55:18 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-11-07 16:55:18 +0400 |
commit | 27d42c63d9b507b1771ed5a7923c389c719b877b (patch) | |
tree | 8dd4ca61e197a7053633f62b4a5d8091957724c4 /source/blender/editors/interface/resources.c | |
parent | e122dc0748f6a4d77b236e26beba93e2a9a36bf0 (diff) |
Camera tracking integration
===========================
Commiting camera tracking integration gsoc project into trunk.
This commit includes:
- Bundled version of libmv library (with some changes against official repo,
re-sync with libmv repo a bit later)
- New datatype ID called MovieClip which is optimized to work with movie
clips (both of movie files and image sequences) and doing camera/motion
tracking operations.
- New editor called Clip Editor which is currently used for motion/tracking
stuff only, but which can be easily extended to work with masks too.
This editor supports:
* Loading movie files/image sequences
* Build proxies with different size for loaded movie clip, also supports
building undistorted proxies to increase speed of playback in
undistorted mode.
* Manual lens distortion mode calibration using grid and grease pencil
* Supervised 2D tracking using two different algorithms KLT and SAD.
* Basic algorithm for feature detection
* Camera motion solving. scene orientation
- New constraints to "link" scene objects with solved motions from clip:
* Follow Track (make object follow 2D motion of track with given name
or parent object to reconstructed 3D position of track)
* Camera Solver to make camera moving in the same way as reconstructed camera
This commit NOT includes changes from tomato branch:
- New nodes (they'll be commited as separated patch)
- Automatic image offset guessing for image input node and image editor
(need to do more tests and gather more feedback)
- Code cleanup in libmv-capi. It's not so critical cleanup, just increasing
readability and understanadability of code. Better to make this chaneg when
Keir will finish his current patch.
More details about this project can be found on this page:
http://wiki.blender.org/index.php/User:Nazg-gul/GSoC-2011
Further development of small features would be done in trunk, bigger/experimental
features would first be implemented in tomato branch.
Diffstat (limited to 'source/blender/editors/interface/resources.c')
-rw-r--r-- | source/blender/editors/interface/resources.c | 75 |
1 files changed, 74 insertions, 1 deletions
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 921a1879bb7..5f392daeec6 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -153,6 +153,9 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo case SPACE_LOGIC: ts= &btheme->tlogic; break; + case SPACE_CLIP: + ts= &btheme->tclip; + break; default: ts= &btheme->tv3d; break; @@ -409,6 +412,27 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo case TH_PREVIEW_BACK: cp= ts->preview_back; break; + + case TH_MARKER_OUTLINE: + cp= ts->marker_outline; break; + case TH_MARKER: + cp= ts->marker; break; + case TH_ACT_MARKER: + cp= ts->act_marker; break; + case TH_SEL_MARKER: + cp= ts->sel_marker; break; + case TH_BUNDLE_SOLID: + cp= ts->bundle_solid; break; + case TH_DIS_MARKER: + cp= ts->dis_marker; break; + case TH_PATH_BEFORE: + cp= ts->path_before; break; + case TH_PATH_AFTER: + cp= ts->path_after; break; + case TH_CAMERA_PATH: + cp= ts->camera_path; break; + case TH_LOCK_MARKER: + cp= ts->lock_marker; break; } } } @@ -533,6 +557,7 @@ static void ui_theme_init_new(bTheme *btheme) ui_theme_init_new_do(&btheme->tlogic); ui_theme_init_new_do(&btheme->tuserpref); ui_theme_init_new_do(&btheme->tconsole); + ui_theme_init_new_do(&btheme->tclip); } @@ -639,7 +664,9 @@ void ui_theme_init_default(void) SETCOL(btheme->tv3d.bone_solid, 200, 200, 200, 255); SETCOL(btheme->tv3d.bone_pose, 80, 200, 255, 80); // alpha 80 is not meant editable, used for wire+action draw - + + SETCOL(btheme->tv3d.bundle_solid, 200, 200, 200, 255); + SETCOL(btheme->tv3d.camera_path, 0x00, 0x00, 0x00, 255); /* space buttons */ /* to have something initialized */ @@ -777,6 +804,23 @@ void ui_theme_init_default(void) /* space logic */ btheme->tlogic= btheme->tv3d; SETCOL(btheme->tlogic.back, 100, 100, 100, 255); + + /* space clip */ + btheme->tclip= btheme->tv3d; + + SETCOL(btheme->tclip.marker_outline, 0x00, 0x00, 0x00, 255); + SETCOL(btheme->tclip.marker, 0x7f, 0x7f, 0x00, 255); + SETCOL(btheme->tclip.act_marker, 0xff, 0xff, 0xff, 255); + SETCOL(btheme->tclip.sel_marker, 0xff, 0xff, 0x00, 255); + SETCOL(btheme->tclip.dis_marker, 0x7f, 0x00, 0x00, 255); + SETCOL(btheme->tclip.lock_marker, 0x7f, 0x7f, 0x7f, 255); + SETCOL(btheme->tclip.path_before, 0xff, 0x00, 0x00, 255); + SETCOL(btheme->tclip.path_after, 0x00, 0x00, 0xff, 255); + SETCOL(btheme->tclip.grid, 0x5e, 0x5e, 0x5e, 255); + SETCOL(btheme->tclip.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->tclip.handle_vertex, 0x00, 0x00, 0x00, 0xff); + SETCOL(btheme->tclip.handle_vertex_select, 0xff, 0xff, 0, 0xff); + btheme->tclip.handle_vertex_size= 4; } @@ -1590,6 +1634,35 @@ void init_userdef_do_versions(void) } } + { + bTheme *btheme; + for(btheme= U.themes.first; btheme; btheme= btheme->next) { + if(btheme->tv3d.bundle_solid[3] == 0) + SETCOL(btheme->tv3d.bundle_solid, 200, 200, 200, 255); + + if(btheme->tv3d.camera_path[3] == 0) + SETCOL(btheme->tv3d.camera_path, 0x00, 0x00, 0x00, 255); + + if((btheme->tclip.back[3]) == 0) { + btheme->tclip= btheme->tv3d; + + SETCOL(btheme->tclip.marker_outline, 0x00, 0x00, 0x00, 255); + SETCOL(btheme->tclip.marker, 0x7f, 0x7f, 0x00, 255); + SETCOL(btheme->tclip.act_marker, 0xff, 0xff, 0xff, 255); + SETCOL(btheme->tclip.sel_marker, 0xff, 0xff, 0x00, 255); + SETCOL(btheme->tclip.dis_marker, 0x7f, 0x00, 0x00, 255); + SETCOL(btheme->tclip.lock_marker, 0x7f, 0x7f, 0x7f, 255); + SETCOL(btheme->tclip.path_before, 0xff, 0x00, 0x00, 255); + SETCOL(btheme->tclip.path_after, 0x00, 0x00, 0xff, 255); + SETCOL(btheme->tclip.grid, 0x5e, 0x5e, 0x5e, 255); + SETCOL(btheme->tclip.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->tclip.handle_vertex, 0x00, 0x00, 0x00, 0xff); + SETCOL(btheme->tclip.handle_vertex_select, 0xff, 0xff, 0, 0xff); + btheme->tclip.handle_vertex_size= 4; + } + } + } + /* GL Texture Garbage Collection (variable abused above!) */ if (U.textimeout == 0) { U.texcollectrate = 60; |