Blender V2.61 - r43446
|
#include "DNA_gpencil_types.h"
#include "DNA_movieclip_types.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "MEM_guardedalloc.h"
#include "BKE_context.h"
#include "BKE_movieclip.h"
#include "BKE_tracking.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
#include "BLI_utildefines.h"
#include "BLI_math.h"
#include "BLI_string.h"
#include "BLI_rect.h"
#include "BLI_math_base.h"
#include "ED_screen.h"
#include "ED_clip.h"
#include "ED_gpencil.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "RNA_access.h"
#include "BLF_api.h"
#include "clip_intern.h"
Go to the source code of this file.
Functions | |
void | clip_draw_curfra_label (SpaceClip *sc, float x, float y) |
static void | draw_movieclip_cache (SpaceClip *sc, ARegion *ar, MovieClip *clip, Scene *scene) |
static void | draw_movieclip_notes (SpaceClip *sc, ARegion *ar) |
static void | draw_movieclip_buffer (SpaceClip *sc, ARegion *ar, ImBuf *ibuf, int width, int height, float zoomx, float zoomy) |
static void | draw_track_path (SpaceClip *sc, MovieClip *UNUSED(clip), MovieTrackingTrack *track) |
static void | draw_marker_outline (SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker, float marker_pos[2], int width, int height) |
static void | track_colors (MovieTrackingTrack *track, int act, float col[3], float scol[3]) |
static void | draw_marker_areas (SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker, float marker_pos[2], int width, int height, int act, int sel) |
static void | draw_marker_slide_zones (SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker, float marker_pos[2], int outline, int sel, int act, int width, int height) |
static void | draw_marker_texts (SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker, float marker_pos[2], int act, int width, int height, float zoomx, float zoomy) |
static void | view2d_to_region_float (View2D *v2d, float x, float y, float *regionx, float *regiony) |
static void | draw_tracking_tracks (SpaceClip *sc, ARegion *ar, MovieClip *clip, int width, int height, float zoomx, float zoomy) |
static void | draw_distortion (SpaceClip *sc, ARegion *ar, MovieClip *clip, int width, int height, float zoomx, float zoomy) |
void | clip_draw_main (SpaceClip *sc, ARegion *ar, Scene *scene) |
void | clip_draw_grease_pencil (bContext *C, int onlyv2d) |
Definition in file clip_draw.c.
void clip_draw_curfra_label | ( | SpaceClip * | sc, |
float | x, | ||
float | y | ||
) |
Definition at line 74 of file clip_draw.c.
References BLF_draw(), BLF_position(), BLF_size(), BLF_width_and_height(), BLI_snprintf(), UserDef::dpi, MovieClipUser::framenr, TH_TEXT, U, UI_GetStyle(), UI_ThemeColor(), uiFontStyle::uifont_id, SpaceClip::user, and uiStyle::widget.
Referenced by draw_graph_cfra(), and draw_movieclip_cache().
void clip_draw_grease_pencil | ( | bContext * | C, |
int | onlyv2d | ||
) |
Definition at line 1302 of file clip_draw.c.
References CTX_wm_space_clip(), draw_gpencil_2dimage(), draw_gpencil_view2d(), ED_space_clip(), ED_space_clip_get_buffer(), SpaceClip::flag, glMultMatrixf, IMB_freeImBuf(), SpaceClip::mode, SC_MANUAL_CALIBRATION, SC_MODE_DISTORTION, SC_SHOW_GPENCIL, and SpaceClip::unistabmat.
Referenced by clip_main_area_draw().
Definition at line 1244 of file clip_draw.c.
References SpaceClip::angle, BKE_tracking_stabdata_to_mat4(), copy_v2_v2(), draw_distortion(), draw_movieclip_buffer(), draw_movieclip_cache(), draw_movieclip_notes(), draw_tracking_tracks(), ED_space_clip(), ED_space_clip_get_buffer(), ED_space_clip_get_stable_buffer(), ED_space_clip_size(), ED_space_clip_zoom(), SpaceClip::flag, IMB_freeImBuf(), invert_m4_m4(), SpaceClip::loc, mul_serie_m4(), mul_v2_v2fl(), NULL, SC_SHOW_STABLE, SpaceClip::scale, SpaceClip::stabmat, SpaceClip::unistabmat, unit_m4(), ImBuf::x, and zero_v2().
Referenced by clip_main_area_draw().
static void draw_distortion | ( | SpaceClip * | sc, |
ARegion * | ar, | ||
MovieClip * | clip, | ||
int | width, | ||
int | height, | ||
float | zoomx, | ||
float | zoomy | ||
) | [static] |
Definition at line 1061 of file clip_draw.c.
References add_v2_v2(), BKE_tracking_apply_intrinsics(), BKE_tracking_invert_intrinsics(), MovieTracking::camera, bGPDlayer::color, copy_v2_v2(), DO_MINMAX2, ListBase::first, SpaceClip::flag, bGPDstroke::flag, FLT_MAX, MovieTrackingCamera::focal, bGPDlayer::frames, glMultMatrixf, GP_STROKE_2DSPACE, MovieClip::gpd, i, INIT_MINMAX2, bGPdata::layers, len(), len_v2v2(), max, min, SpaceClip::mode, mul_v2_fl(), bGPDstroke::next, bGPDlayer::next, bGPDframe::next, MovieTrackingCamera::pixel_aspect, bGPDstroke::points, SC_MANUAL_CALIBRATION, SC_MODE_DISTORTION, SC_SHOW_GRID, SpaceClip::stabmat, bGPDframe::strokes, sub_v2_v2v2(), bGPDlayer::thickness, bGPDstroke::totpoints, MovieClip::tracking, ARegion::v2d, simple_enum_gen::val, view2d_to_region_float(), bGPDspoint::x, bGPDspoint::y, and zero_v2().
Referenced by clip_draw_main().
static void draw_marker_areas | ( | SpaceClip * | sc, |
MovieTrackingTrack * | track, | ||
MovieTrackingMarker * | marker, | ||
float | marker_pos[2], | ||
int | width, | ||
int | height, | ||
int | act, | ||
int | sel | ||
) | [static] |
Definition at line 465 of file clip_draw.c.
References add_v2_v2v2(), BLI_in_rctf(), BLI_init_rctf(), ED_clip_point_undistorted_pos(), MovieTrackingMarker::flag, MovieTrackingTrack::flag, SpaceClip::flag, i, MARKER_DISABLED, MovieTrackingTrack::offset, MovieTrackingTrack::pat_flag, MovieTrackingTrack::pat_max, MovieTrackingTrack::pat_min, MovieTrackingMarker::pos, MovieTrackingTrack::pyramid_levels, SC_SHOW_MARKER_PATTERN, SC_SHOW_MARKER_SEARCH, SC_SHOW_PYRAMID_LEVELS, SC_SHOW_TINY_MARKER, MovieTrackingTrack::search_flag, MovieTrackingTrack::search_max, MovieTrackingTrack::search_min, SELECT, TH_ACT_MARKER, TH_DIS_MARKER, TH_LOCK_MARKER, track_colors(), TRACK_LOCKED, TRACK_SELECTED, TRACK_VIEW_SELECTED, MovieTrackingTrack::tracker, TRACKER_KLT, UI_ThemeColor(), UI_ThemeColorShade(), and SpaceClip::zoom.
Referenced by draw_tracking_tracks().
static void draw_marker_outline | ( | SpaceClip * | sc, |
MovieTrackingTrack * | track, | ||
MovieTrackingMarker * | marker, | ||
float | marker_pos[2], | ||
int | width, | ||
int | height | ||
) | [static] |
Definition at line 375 of file clip_draw.c.
References add_v2_v2v2(), BLI_in_rctf(), BLI_init_rctf(), ED_clip_point_undistorted_pos(), MovieTrackingMarker::flag, SpaceClip::flag, MARKER_DISABLED, MovieTrackingTrack::offset, MovieTrackingTrack::pat_max, MovieTrackingTrack::pat_min, MovieTrackingMarker::pos, SC_SHOW_MARKER_PATTERN, SC_SHOW_MARKER_SEARCH, SC_SHOW_TINY_MARKER, MovieTrackingTrack::search_max, MovieTrackingTrack::search_min, TH_MARKER_OUTLINE, TRACK_VIEW_SELECTED, UI_ThemeColor(), and SpaceClip::zoom.
Referenced by draw_tracking_tracks().
static void draw_marker_slide_zones | ( | SpaceClip * | sc, |
MovieTrackingTrack * | track, | ||
MovieTrackingMarker * | marker, | ||
float | marker_pos[2], | ||
int | outline, | ||
int | sel, | ||
int | act, | ||
int | width, | ||
int | height | ||
) | [static] |
Definition at line 629 of file clip_draw.c.
References MovieTrackingMarker::flag, MovieTrackingTrack::flag, SpaceClip::flag, MARKER_DISABLED, MIN2, MovieTrackingTrack::pat_flag, MovieTrackingTrack::pat_max, MovieTrackingTrack::pat_min, SC_SHOW_MARKER_PATTERN, SC_SHOW_MARKER_SEARCH, SC_SHOW_TINY_MARKER, SpaceClip::scale, MovieTrackingTrack::search_flag, MovieTrackingTrack::search_max, MovieTrackingTrack::search_min, SELECT, TH_MARKER_OUTLINE, track_colors(), TRACK_LOCKED, TRACK_VIEW_SELECTED, UI_ThemeColor(), and SpaceClip::zoom.
Referenced by draw_tracking_tracks().
static void draw_marker_texts | ( | SpaceClip * | sc, |
MovieTrackingTrack * | track, | ||
MovieTrackingMarker * | marker, | ||
float | marker_pos[2], | ||
int | act, | ||
int | width, | ||
int | height, | ||
float | zoomx, | ||
float | zoomy | ||
) | [static] |
Definition at line 758 of file clip_draw.c.
References BLF_draw(), BLF_height_max(), BLF_position(), BLF_size(), BLI_snprintf(), UserDef::dpi, MovieTrackingTrack::error, ListBase::first, MovieTrackingMarker::flag, MovieTrackingTrack::flag, SpaceClip::flag, MovieClipUser::framenr, MovieTrackingMarker::framenr, MARKER_DISABLED, MARKER_TRACKED, mul_m4_v3(), MovieTrackingTrack::name, MovieTrackingTrack::pat_min, SC_SHOW_MARKER_PATTERN, SC_SHOW_MARKER_SEARCH, MovieTrackingTrack::search_min, SpaceClip::stabmat, state, str, TH_ACT_MARKER, TH_DIS_MARKER, TH_SEL_MARKER, TRACK_HAS_BUNDLE, TRACK_LOCKED, TRACK_VIEW_SELECTED, U, UI_ThemeColor(), UI_ThemeColorShade(), uiFontStyle::uifont_id, UserDef::uistyles, SpaceClip::user, and uiStyle::widget.
Referenced by draw_tracking_tracks().
static void draw_movieclip_buffer | ( | SpaceClip * | sc, |
ARegion * | ar, | ||
ImBuf * | ibuf, | ||
int | width, | ||
int | height, | ||
float | zoomx, | ||
float | zoomy | ||
) | [static] |
Definition at line 213 of file clip_draw.c.
References ED_space_clip(), SpaceClip::flag, MovieTrackingStabilization::flag, glaDrawPixelsSafe(), glMultMatrixf, IMB_rect_from_float(), ImBuf::rect, ImBuf::rect_float, SC_MUTE_FOOTAGE, SC_SHOW_STABLE, MovieTracking::stabilization, SpaceClip::stabmat, MovieClip::tracking, TRACKING_2D_STABILIZATION, UI_view2d_to_region_no_clip(), ARegion::v2d, ImBuf::x, and ImBuf::y.
Referenced by clip_draw_main().
static void draw_movieclip_cache | ( | SpaceClip * | sc, |
ARegion * | ar, | ||
MovieClip * | clip, | ||
Scene * | scene | ||
) | [static] |
Definition at line 94 of file clip_draw.c.
References BKE_movieclip_get_cache_segments(), BKE_tracking_active_track(), BKE_tracking_get_reconstruction(), MovieTrackingReconstruction::cameras, MovieTrackingReconstruction::camnr, clip_draw_curfra_label(), EFRA, MovieTrackingMarker::flag, MovieTrackingReconstruction::flag, MovieClipUser::framenr, MovieTrackingMarker::framenr, i, MARKER_DISABLED, MARKER_TRACKED, MovieTrackingTrack::markers, MovieTrackingTrack::markersnr, SFRA, TH_CFRAME, MovieClip::tracking, TRACKING_RECONSTRUCTED, UI_ThemeColor(), SpaceClip::user, and ARegion::winx.
Referenced by clip_draw_main().
Definition at line 194 of file clip_draw.c.
References BLI_strncpy(), ED_region_info_draw(), ED_space_clip(), SpaceClip::flag, MovieTrackingStats::message, SC_LOCK_SELECTION, MovieTracking::stats, str, and MovieClip::tracking.
Referenced by clip_draw_main().
static void draw_track_path | ( | SpaceClip * | sc, |
MovieClip * | UNUSEDclip, | ||
MovieTrackingTrack * | track | ||
) | [static] |
Definition at line 269 of file clip_draw.c.
References add_v2_v2v2(), BKE_tracking_get_marker(), curindex, ED_clip_point_undistorted_pos(), MovieTrackingMarker::flag, SpaceClip::flag, MovieClipUser::framenr, MovieTrackingMarker::framenr, i, MARKER_DISABLED, MovieTrackingTrack::offset, SpaceClip::path_length, MovieTrackingMarker::pos, SC_SHOW_TINY_MARKER, TH_MARKER_OUTLINE, TH_PATH_AFTER, TH_PATH_BEFORE, TRACK_VIEW_SELECTED, UI_ThemeColor(), and SpaceClip::user.
Referenced by draw_tracking_tracks().
static void draw_tracking_tracks | ( | SpaceClip * | sc, |
ARegion * | ar, | ||
MovieClip * | clip, | ||
int | width, | ||
int | height, | ||
float | zoomx, | ||
float | zoomy | ||
) | [static] |
Definition at line 835 of file clip_draw.c.
References BKE_tracking_active_object(), BKE_tracking_active_track(), BKE_tracking_apply_intrinsics(), BKE_tracking_get_marker(), BKE_tracking_get_tracks(), BKE_tracking_projection_matrix(), MovieTrackingTrack::bundle_pos, MovieTracking::camera, copy_v2_v2(), copy_v4_v4(), draw_marker_areas(), draw_marker_outline(), draw_marker_slide_zones(), draw_marker_texts(), draw_track_path(), ED_clip_point_undistorted_pos(), ListBase::first, MovieTrackingTrack::flag, SpaceClip::flag, MovieClipUser::framenr, glMultMatrixf, len_v2(), MARKER_VISIBLE, MCLIP_PROXY_RENDER_UNDISTORT, MEM_callocN(), MEM_freeN(), mul_v4_m4v4(), MovieTrackingTrack::next, NULL, MovieTrackingTrack::offset, MovieTrackingCamera::pixel_aspect, MovieTrackingMarker::pos, MovieClipUser::render_flag, SC_SHOW_BUNDLES, SC_SHOW_NAMES, SC_SHOW_TRACK_PATH, SpaceClip::stabmat, sub_v2_v2(), TRACK_HAS_BUNDLE, TRACK_HIDDEN, MovieClip::tracking, SpaceClip::user, ARegion::v2d, and view2d_to_region_float().
Referenced by clip_draw_main().
static void track_colors | ( | MovieTrackingTrack * | track, |
int | act, | ||
float | col[3], | ||
float | scol[3] | ||
) | [static] |
Definition at line 450 of file clip_draw.c.
References MovieTrackingTrack::color, copy_v3_v3(), MovieTrackingTrack::flag, mul_v3_v3fl(), TH_ACT_MARKER, TH_MARKER, TH_SEL_MARKER, TRACK_CUSTOMCOLOR, and UI_GetThemeColor3fv().
Referenced by draw_marker_areas(), and draw_marker_slide_zones().
static void view2d_to_region_float | ( | View2D * | v2d, |
float | x, | ||
float | y, | ||
float * | regionx, | ||
float * | regiony | ||
) | [static] |
Definition at line 824 of file clip_draw.c.
References View2D::cur, View2D::mask, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by draw_distortion(), and draw_tracking_tracks().