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/include | |
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/include')
-rw-r--r-- | source/blender/editors/include/ED_clip.h | 64 | ||||
-rw-r--r-- | source/blender/editors/include/ED_space_api.h | 1 | ||||
-rw-r--r-- | source/blender/editors/include/ED_transform.h | 1 | ||||
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/UI_icons.h | 6 | ||||
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 27 | ||||
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 13 |
7 files changed, 99 insertions, 15 deletions
diff --git a/source/blender/editors/include/ED_clip.h b/source/blender/editors/include/ED_clip.h new file mode 100644 index 00000000000..7d36159f47e --- /dev/null +++ b/source/blender/editors/include/ED_clip.h @@ -0,0 +1,64 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2009 Blender Foundation. + * All rights reserved. + * + * Contributor(s): Blender Foundation, + * Sergey Sharybin + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file ED_clip.h + * \ingroup editors + */ + +#ifndef ED_MOVIECLIP_H +#define ED_MOVIECLIP_H + +struct ARegion; +struct bContext; +struct ImBuf; +struct Main; +struct MovieClip; +struct SpaceClip; +struct wmEvent; + +/* clip_editor.c */ +int ED_space_clip_poll(struct bContext *C); + +void ED_space_clip_set(struct bContext *C, struct SpaceClip *sc, struct MovieClip *clip); +struct MovieClip *ED_space_clip(struct SpaceClip *sc); +void ED_space_clip_size(struct SpaceClip *sc, int *width, int *height); +void ED_space_clip_zoom(struct SpaceClip *sc, ARegion *ar, float *zoomx, float *zoomy); +void ED_space_clip_aspect(struct SpaceClip *sc, float *aspx, float *aspy); + +struct ImBuf *ED_space_clip_get_buffer(struct SpaceClip *sc); +struct ImBuf *ED_space_clip_get_stable_buffer(struct SpaceClip *sc, float loc[2], float *scale, float *angle); + +void ED_clip_update_frame(const struct Main *mainp, int cfra); +int ED_clip_view_selection(struct SpaceClip *sc, struct ARegion *ar, int fit); + +void ED_clip_point_undistorted_pos(SpaceClip *sc, float co[2], float nco[2]); +void ED_clip_point_stable_pos(struct bContext *C, float x, float y, float *xr, float *yr); +void ED_clip_mouse_pos(struct bContext *C, struct wmEvent *event, float co[2]); + +/* clip_ops.c */ +void ED_operatormacros_clip(void); + +#endif /* ED_TEXT_H */ diff --git a/source/blender/editors/include/ED_space_api.h b/source/blender/editors/include/ED_space_api.h index 8e445ab1cee..b5a1ca193db 100644 --- a/source/blender/editors/include/ED_space_api.h +++ b/source/blender/editors/include/ED_space_api.h @@ -54,6 +54,7 @@ void ED_spacetype_sequencer(void); void ED_spacetype_logic(void); void ED_spacetype_console(void); void ED_spacetype_userpref(void); +void ED_spacetype_clip(void); /* calls for instancing and freeing spacetype static data called in WM_init_exit */ diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index 3a6cbc556d1..37f647abfd9 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -94,6 +94,7 @@ enum { #define CTX_AUTOCONFIRM 32 #define CTX_BMESH 64 #define CTX_NDOF 128 +#define CTX_MOVIECLIP 256 /* Standalone call to get the transformation center corresponding to the current situation * returns 1 if successful, 0 otherwise (usually means there's no selection) diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index e43ad964c9c..82a1e6f1f00 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -290,4 +290,6 @@ void ED_view3d_camera_lock_init(struct View3D *v3d, struct RegionView3D *rv3d); /* copy the view to the camera, return TRUE if */ int ED_view3d_camera_lock_sync(struct View3D *v3d, struct RegionView3D *rv3d); +struct BGpic *ED_view3D_background_image_add(struct View3D *v3d); + #endif /* ED_VIEW3D_H */ diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index 8cb37ab337d..c7afe2fb28f 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -173,6 +173,7 @@ DEF_ICON(NODETREE) DEF_ICON(LOGIC) DEF_ICON(CONSOLE) DEF_ICON(PREFERENCES) +DEF_ICON(CLIP) DEF_ICON(ASSET_MANAGER) #ifndef DEF_ICON_BLANK_SKIP DEF_ICON(BLANK057) @@ -180,7 +181,6 @@ DEF_ICON(ASSET_MANAGER) DEF_ICON(BLANK059) DEF_ICON(BLANK060) DEF_ICON(BLANK061) - DEF_ICON(BLANK061b) #endif /* MODES */ @@ -642,6 +642,8 @@ DEF_ICON(DRIVER) /* ANIMATION */ DEF_ICON(SOLO_OFF) DEF_ICON(SOLO_ON) +DEF_ICON(FRAME_PREV) +DEF_ICON(FRAME_NEXT) #ifndef DEF_ICON_BLANK_SKIP /* available */ DEF_ICON(BLANK186) @@ -666,8 +668,6 @@ DEF_ICON(SOLO_ON) DEF_ICON(BLANK205) DEF_ICON(BLANK206) DEF_ICON(BLANK207) - DEF_ICON(BLANK208) - DEF_ICON(BLANK208b) #endif /* EDITING */ diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 7a556eddd2b..942252bc00f 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -222,18 +222,19 @@ typedef struct uiLayout uiLayout; #define TOGBUT (37<<9) #define OPTION (38<<9) #define OPTIONN (39<<9) +#define TRACKPREVIEW (40<<9) /* buttons with value >= SEARCH_MENU don't get undo pushes */ -#define SEARCH_MENU (40<<9) -#define BUT_EXTRA (41<<9) -#define HSVCIRCLE (42<<9) -#define LISTBOX (43<<9) -#define LISTROW (44<<9) -#define HOTKEYEVT (45<<9) -#define BUT_IMAGE (46<<9) -#define HISTOGRAM (47<<9) -#define WAVEFORM (48<<9) -#define VECTORSCOPE (49<<9) -#define PROGRESSBAR (50<<9) +#define SEARCH_MENU (41<<9) +#define BUT_EXTRA (42<<9) +#define HSVCIRCLE (43<<9) +#define LISTBOX (44<<9) +#define LISTROW (45<<9) +#define HOTKEYEVT (46<<9) +#define BUT_IMAGE (47<<9) +#define HISTOGRAM (48<<9) +#define WAVEFORM (49<<9) +#define VECTORSCOPE (50<<9) +#define PROGRESSBAR (51<<9) #define BUTTYPE (63<<9) @@ -749,6 +750,10 @@ void uiTemplateKeymapItemProperties(uiLayout *layout, struct PointerRNA *ptr); void uiTemplateList(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *activeptr, const char *activeprop, const char *prop_list, int rows, int maxrows, int type); +void uiTemplateMovieClip(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, int compact); +void uiTemplateTrack(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname); +void uiTemplateMarker(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname, PointerRNA *userptr, PointerRNA *trackptr, int cmpact); + /* items */ void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname); void uiItemEnumO(uiLayout *layout, const char *opname, const char *name, int icon, const char *propname, int value); diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 9c46a5d28de..4b1371c532c 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -247,7 +247,18 @@ enum { TH_DRAWEXTRA_FACEAREA, TH_DRAWEXTRA_FACEANG, - TH_NODE_CURVING + TH_NODE_CURVING, + + TH_MARKER_OUTLINE, + TH_MARKER, + TH_ACT_MARKER, + TH_SEL_MARKER, + TH_BUNDLE_SOLID, + TH_DIS_MARKER, + TH_PATH_BEFORE, + TH_PATH_AFTER, + TH_CAMERA_PATH, + TH_LOCK_MARKER }; /* XXX WARNING: previous is saved in file, so do not change order! */ |