68 region->v2d.tot.xmin = -10.0f;
69 region->v2d.tot.ymin =
float(-area->winy) / 3.0f;
70 region->v2d.tot.xmax =
float(area->winx);
71 region->v2d.tot.ymax = 0.0f;
73 region->v2d.cur = region->v2d.tot;
75 region->v2d.min[0] = 0.0f;
76 region->v2d.min[1] = 0.0f;
81 region->v2d.minzoom = 0.01f;
82 region->v2d.maxzoom = 50;
91 region->v2d.tot.xmin = 0.0f;
92 region->v2d.tot.ymin = -10.0f;
93 region->v2d.tot.xmax =
float(scene->r.efra);
94 region->v2d.tot.ymax = 10.0f;
96 region->v2d.cur = region->v2d.tot;
98 region->v2d.min[0] = FLT_MIN;
99 region->v2d.min[1] = FLT_MIN;
107 region->v2d.minzoom = 0.0f;
108 region->v2d.maxzoom = 0.0f;
109 region->v2d.keepzoom = 0;
110 region->v2d.keepofs = 0;
111 region->v2d.align = 0;
112 region->v2d.flag = 0;
114 region->v2d.keeptot = 0;
165 region = MEM_cnew<ARegion>(
"header for clip");
172 region = MEM_cnew<ARegion>(
"tools for clip");
179 region = MEM_cnew<ARegion>(
"properties for clip");
186 region = MEM_cnew<ARegion>(
"channels for clip");
196 region = MEM_cnew<ARegion>(
"preview for clip");
202 region = MEM_cnew<ARegion>(
"main region for clip");
363#ifdef WITH_INPUT_NDOF
605 float x1, y1,
w, h, aspx, aspy;
606 int width, height, winx, winy;
617 region->v2d.tot.xmin = 0;
618 region->v2d.tot.ymin = 0;
619 region->v2d.tot.xmax =
w;
620 region->v2d.tot.ymax = h;
622 region->v2d.mask.xmin = region->v2d.mask.ymin = 0;
623 region->v2d.mask.xmax = winx;
624 region->v2d.mask.ymax = winy;
627 x1 = region->winrct.xmin + (winx - sc->
zoom *
w) / 2.0f;
628 y1 = region->winrct.ymin + (winy - sc->
zoom * h) / 2.0f;
634 region->v2d.cur.xmin = (region->winrct.xmin -
float(x1)) / sc->
zoom;
635 region->v2d.cur.xmax = region->v2d.cur.xmin + (
float(winx) / sc->
zoom);
638 region->v2d.cur.ymin = (region->winrct.ymin -
float(y1)) / sc->
zoom;
639 region->v2d.cur.ymax = region->v2d.cur.ymin + (
float(winy) / sc->
zoom);
642 region->v2d.cur.xmin /=
w;
643 region->v2d.cur.xmax /=
w;
644 region->v2d.cur.ymin /= h;
645 region->v2d.cur.ymax /= h;
679 float aspx, aspy, zoomx, zoomy,
x,
y;
681 bool show_cursor =
false;
685 if (clip && clip->tracking_context) {
691 ImBuf *tmpibuf =
nullptr;
728 int mask_width, mask_height;
843 View2D *v2d = ®ion->v2d;
895 View2D *v2d = ®ion->v2d;
977 View2D *v2d = ®ion->v2d;
1022 switch (wmn->
data) {
1210 std::unique_ptr<SpaceType> st = std::make_unique<SpaceType>();
1230 st->blend_read_after_liblink =
nullptr;
1234 art = MEM_cnew<ARegionType>(
"spacetype clip region");
1245 art = MEM_cnew<ARegionType>(
"spacetype clip region preview");
1257 art = MEM_cnew<ARegionType>(
"spacetype clip region properties");
1269 art = MEM_cnew<ARegionType>(
"spacetype clip region tools");
1281 art = MEM_cnew<ARegionType>(
"spacetype clip region");
1293 art = MEM_cnew<ARegionType>(
"spacetype clip channels region");
Depsgraph * CTX_data_expect_evaluated_depsgraph(const bContext *C)
void CTX_data_dir_set(bContextDataResult *result, const char **dir)
bool CTX_data_equals(const char *member, const char *str)
Mask * CTX_data_edit_mask(const bContext *C)
bool CTX_data_dir(const char *member)
void CTX_data_id_pointer_set(bContextDataResult *result, ID *id)
ScrArea * CTX_wm_area(const bContext *C)
@ CTX_RESULT_MEMBER_NOT_FOUND
Scene * CTX_data_scene(const bContext *C)
SpaceClip * CTX_wm_space_clip(const bContext *C)
#define BKE_LIB_FOREACHID_PROCESS_IDSUPER(data_, id_super_, cb_flag_)
@ IDWALK_CB_DIRECT_WEAK_LINK
int BKE_lib_query_foreachid_process_flags_get(const LibraryForeachIDData *data)
@ ID_REMAP_APPLY_ENSURE_REAL
void BKE_movieclip_update_scopes(struct MovieClip *clip, const struct MovieClipUser *user, struct MovieClipScopes *scopes)
void BKE_movieclip_user_set_frame(struct MovieClipUser *user, int framenr)
void BKE_spacetype_register(std::unique_ptr< SpaceType > st)
ARegion * BKE_area_find_region_type(const ScrArea *area, int region_type)
void BKE_tracking_dopesheet_update(struct MovieTracking *tracking)
void BKE_autotrack_context_sync_user(struct AutoTrackContext *context, struct MovieClipUser *user)
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_path_split_dir_file(const char *filepath, char *dir, size_t dir_maxncpy, char *file, size_t file_maxncpy) ATTR_NONNULL(1
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
void BLI_rcti_init(struct rcti *rect, int xmin, int xmax, int ymin, int ymax)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
#define STRNCPY(dst, src)
#define BLO_write_struct(writer, struct_name, data_ptr)
#define DNA_struct_default_alloc(struct_name)
@ TRACKING_2D_STABILIZATION
@ V2D_VIEWSYNC_AREA_VERTICAL
@ V2D_SCROLL_VERTICAL_HANDLES
@ V2D_SCROLL_HORIZONTAL_HANDLES
MovieClip * ED_space_clip_get_clip(const SpaceClip *sc)
void ED_space_clip_get_size(const SpaceClip *sc, int *r_width, int *r_height)
void ED_space_clip_get_zoom(const SpaceClip *sc, const ARegion *region, float *r_zoomx, float *r_zoomy)
void ED_space_clip_get_aspect(const SpaceClip *sc, float *r_aspx, float *r_aspy)
bool ED_clip_view_selection(const bContext *C, const ARegion *region, bool fit)
ImBuf * ED_space_clip_get_stable_buffer(const SpaceClip *sc, float loc[2], float *scale, float *angle)
void ED_mask_get_size(ScrArea *area, int *r_width, int *r_height)
void ED_mask_draw_region(Depsgraph *depsgraph, Mask *mask, ARegion *region, char draw_flag, char draw_type, eMaskOverlayMode overlay_mode, float blend_factor, int width_i, int height_i, float aspx, float aspy, bool do_scale_applied, bool do_draw_cb, float stabmat[4][4], const bContext *C)
void ED_area_tag_redraw(ScrArea *area)
ARegionType * ED_area_type_hud(int space_type)
void ED_region_panels(const bContext *C, ARegion *region)
void ED_region_header(const bContext *C, ARegion *region)
void ED_region_header_init(ARegion *region)
void ED_region_panels_init(wmWindowManager *wm, ARegion *region)
void ED_region_tag_redraw(ARegion *region)
void ED_region_draw_cb_draw(const bContext *C, ARegion *region, int type)
#define REGION_DRAW_POST_VIEW
#define REGION_DRAW_PRE_VIEW
void ED_image_draw_cursor(ARegion *region, const float cursor[2])
void GPU_matrix_scale_2f(float x, float y)
#define GPU_matrix_mul(x)
void GPU_matrix_translate_2f(float x, float y)
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
#define UI_SIDEBAR_PANEL_WIDTH
#define UI_COMPACT_PANEL_WIDTH
void UI_ThemeClearColor(int colorid)
void UI_view2d_scrollers_draw(View2D *v2d, const rcti *mask_custom)
void UI_view2d_view_restore(const bContext *C)
void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
void VIEW2D_GGT_navigate_impl(wmGizmoGroupType *gzgt, const char *idname)
#define UI_TIME_SCRUB_MARGIN_Y
void UI_view2d_view_ortho(const View2D *v2d)
void UI_view2d_draw_lines_x__discrete_frames_or_seconds(const View2D *v2d, const Scene *scene, bool display_seconds, bool display_minor_lines)
void UI_view2d_view_to_region_fl(const View2D *v2d, float x, float y, float *r_region_x, float *r_region_y) ATTR_NONNULL()
void UI_view2d_draw_scale_y__values(const ARegion *region, const View2D *v2d, const rcti *rect, int colorid)
@ WM_GIZMOMAP_DRAWSTEP_2D
#define ND_GPENCIL_EDITMODE
void ANIM_draw_cfra(const bContext *C, View2D *v2d, short flag)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
IDRemapperApplyResult apply(ID **r_id_ptr, IDRemapperApplyOptions options, ID *id_self=nullptr) const
bool contains_mappings_for_any(IDTypeFilter filter) const
void clip_draw_dopesheet_channels(const bContext *C, ARegion *region)
void clip_draw_dopesheet_main(SpaceClip *sc, ARegion *region, Scene *scene)
void CLIP_OT_dopesheet_view_all(wmOperatorType *ot)
void CLIP_OT_dopesheet_select_channel(wmOperatorType *ot)
void clip_draw_cache_and_notes(const bContext *C, SpaceClip *sc, ARegion *region)
void clip_draw_main(const bContext *C, SpaceClip *sc, ARegion *region)
void clip_draw_grease_pencil(bContext *C, int onlyv2d)
void clip_draw_graph(SpaceClip *sc, ARegion *region, Scene *scene)
void CLIP_OT_graph_delete_knot(wmOperatorType *ot)
void CLIP_OT_graph_center_current_frame(wmOperatorType *ot)
void CLIP_OT_graph_delete_curve(wmOperatorType *ot)
void CLIP_OT_graph_select_all_markers(wmOperatorType *ot)
void ED_clip_graph_center_current_frame(Scene *scene, ARegion *region)
void CLIP_OT_graph_select(wmOperatorType *ot)
void CLIP_OT_graph_select_box(wmOperatorType *ot)
void CLIP_OT_graph_view_all(wmOperatorType *ot)
void CLIP_OT_graph_disable_markers(wmOperatorType *ot)
void CLIP_OT_paste_tracks(wmOperatorType *ot)
void CLIP_OT_create_plane_track(wmOperatorType *ot)
void CLIP_OT_delete_marker(wmOperatorType *ot)
void CLIP_OT_set_origin(wmOperatorType *ot)
void CLIP_OT_view_zoom_in(wmOperatorType *ot)
void CLIP_OT_stabilize_2d_rotation_add(wmOperatorType *ot)
void CLIP_OT_view_zoom_ratio(wmOperatorType *ot)
void CLIP_OT_stabilize_2d_remove(wmOperatorType *ot)
void CLIP_OT_track_copy_color(wmOperatorType *ot)
void CLIP_OT_hide_tracks_clear(wmOperatorType *ot)
void CLIP_OT_cursor_set(wmOperatorType *ot)
void CLIP_OT_keyframe_delete(wmOperatorType *ot)
void CLIP_OT_stabilize_2d_rotation_remove(wmOperatorType *ot)
void CLIP_OT_select_circle(wmOperatorType *ot)
void CLIP_OT_mode_set(wmOperatorType *ot)
void CLIP_OT_clear_solution(wmOperatorType *ot)
void CLIP_OT_stabilize_2d_select(wmOperatorType *ot)
void CLIP_OT_view_zoom(wmOperatorType *ot)
void CLIP_OT_hide_tracks(wmOperatorType *ot)
void CLIP_OT_track_markers(wmOperatorType *ot)
void CLIP_OT_view_zoom_out(wmOperatorType *ot)
void CLIP_OT_stabilize_2d_add(wmOperatorType *ot)
void CLIP_OT_apply_solution_scale(wmOperatorType *ot)
void CLIP_OT_set_solver_keyframe(wmOperatorType *ot)
void CLIP_OT_open(wmOperatorType *ot)
void CLIP_OT_detect_features(wmOperatorType *ot)
void CLIP_OT_set_scene_frames(wmOperatorType *ot)
void CLIP_OT_change_frame(wmOperatorType *ot)
void CLIP_OT_lock_tracks(wmOperatorType *ot)
void CLIP_OT_average_tracks(wmOperatorType *ot)
void CLIP_OT_view_selected(wmOperatorType *ot)
void CLIP_OT_set_solution_scale(wmOperatorType *ot)
void CLIP_OT_set_axis(wmOperatorType *ot)
void CLIP_OT_tracking_object_new(wmOperatorType *ot)
void CLIP_OT_keyframe_insert(wmOperatorType *ot)
void CLIP_OT_select_lasso(wmOperatorType *ot)
void CLIP_OT_copy_tracks(wmOperatorType *ot)
void CLIP_OT_select_all(wmOperatorType *ot)
void CLIP_OT_slide_marker(wmOperatorType *ot)
void CLIP_OT_solve_camera(wmOperatorType *ot)
void CLIP_OT_prefetch(wmOperatorType *ot)
void CLIP_OT_set_scale(wmOperatorType *ot)
void CLIP_OT_stabilize_2d_rotation_select(wmOperatorType *ot)
void CLIP_OT_view_center_cursor(wmOperatorType *ot)
void CLIP_OT_select_box(wmOperatorType *ot)
void CLIP_OT_add_marker_at_click(wmOperatorType *ot)
void CLIP_OT_clean_tracks(wmOperatorType *ot)
void CLIP_OT_join_tracks(wmOperatorType *ot)
void CLIP_OT_rebuild_proxy(wmOperatorType *ot)
void CLIP_OT_lock_selection_toggle(wmOperatorType *ot)
void CLIP_OT_slide_plane_marker(wmOperatorType *ot)
void CLIP_OT_refine_markers(wmOperatorType *ot)
void CLIP_OT_select_grouped(wmOperatorType *ot)
void CLIP_OT_delete_track(wmOperatorType *ot)
void CLIP_OT_add_marker(wmOperatorType *ot)
void CLIP_OT_select(wmOperatorType *ot)
void CLIP_OT_update_image_from_plane_marker(wmOperatorType *ot)
void CLIP_OT_view_pan(wmOperatorType *ot)
void CLIP_OT_view_all(wmOperatorType *ot)
void CLIP_OT_tracking_object_remove(wmOperatorType *ot)
void CLIP_OT_disable_markers(wmOperatorType *ot)
void CLIP_OT_set_plane(wmOperatorType *ot)
void CLIP_OT_new_image_from_plane_marker(wmOperatorType *ot)
void CLIP_OT_reload(wmOperatorType *ot)
void CLIP_OT_clear_track_path(wmOperatorType *ot)
void CLIP_OT_frame_jump(wmOperatorType *ot)
draw_view in_light_buf[] float
void IMB_freeImBuf(ImBuf *)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
void RNA_collection_clear(PointerRNA *ptr, const char *name)
void RNA_collection_add(PointerRNA *ptr, const char *name, PointerRNA *r_value)
static bool clip_main_region_poll(const RegionPollParams *params)
static void clip_id_remap(ScrArea *, SpaceLink *slink, const blender::bke::id::IDRemapper &mappings)
static void clip_scopes_tag_refresh(ScrArea *area)
static void clip_refresh(const bContext *C, ScrArea *area)
static bool clip_drop_poll(bContext *, wmDrag *drag, const wmEvent *)
static void clip_listener(const wmSpaceTypeListenerParams *params)
static bool clip_tools_region_poll(const RegionPollParams *params)
static void clip_space_blend_read_data(BlendDataReader *, SpaceLink *sl)
static SpaceLink * clip_create(const ScrArea *, const Scene *)
static void clip_header_region_listener(const wmRegionListenerParams *params)
static void clip_header_region_draw(const bContext *C, ARegion *region)
static void movieclip_main_area_set_view2d(const bContext *C, ARegion *region)
static void clip_free(SpaceLink *sl)
static void clip_area_sync_frame_from_scene(ScrArea *area, const Scene *scene)
static bool clip_preview_region_poll(const RegionPollParams *params)
static void clip_properties_region_draw(const bContext *C, ARegion *region)
static void clip_dropboxes()
static void clip_preview_region_init(wmWindowManager *wm, ARegion *region)
static void dopesheet_region_draw(const bContext *C, ARegion *region)
static void graph_region_draw(const bContext *C, ARegion *region)
static void clip_header_region_init(wmWindowManager *, ARegion *region)
static void clip_operatortypes()
static void clip_foreach_id(SpaceLink *space_link, LibraryForeachIDData *data)
static void clip_keymap(wmKeyConfig *keyconf)
static bool clip_channels_region_poll(const RegionPollParams *params)
static void clip_properties_region_listener(const wmRegionListenerParams *params)
static SpaceLink * clip_duplicate(SpaceLink *sl)
static void init_preview_region(const Scene *scene, const ScrArea *area, const SpaceClip *sc, ARegion *region)
static void clip_tools_region_init(wmWindowManager *wm, ARegion *region)
static void clip_space_blend_write(BlendWriter *writer, SpaceLink *sl)
static void clip_main_region_init(wmWindowManager *wm, ARegion *region)
static bool clip_properties_region_poll(const RegionPollParams *params)
static void clip_main_region_draw(const bContext *C, ARegion *region)
static void clip_tools_region_draw(const bContext *C, ARegion *region)
static void clip_channels_region_listener(const wmRegionListenerParams *)
static void clip_channels_region_init(wmWindowManager *wm, ARegion *region)
static void clip_channels_region_draw(const bContext *C, ARegion *region)
static int clip_context(const bContext *C, const char *member, bContextDataResult *result)
static void CLIP_GGT_navigate(wmGizmoGroupType *gzgt)
static void clip_preview_region_listener(const wmRegionListenerParams *)
static void clip_main_region_listener(const wmRegionListenerParams *params)
static void clip_props_region_listener(const wmRegionListenerParams *params)
static void clip_properties_region_init(wmWindowManager *wm, ARegion *region)
static void clip_gizmos()
const char * clip_context_dir[]
static void clip_drop_copy(bContext *, wmDrag *drag, wmDropBox *drop)
static void clip_scopes_check_gpencil_change(ScrArea *area)
static void clip_preview_region_draw(const bContext *C, ARegion *region)
static void clip_init(wmWindowManager *, ScrArea *area)
bool(* poll)(const RegionPollParams *params)
void(* listener)(const wmRegionListenerParams *params)
void(* draw)(const bContext *C, ARegion *region)
void(* init)(wmWindowManager *wm, ARegion *region)
struct ImBuf * track_preview
struct ImBuf * track_search
struct MovieClipUser user
struct MovieClipScopes scopes
struct wmKeyConfig * defaultconf
rcti ED_time_scrub_clamp_scroller_mask(const rcti &scroller_mask)
void ED_time_scrub_draw_current_frame(const ARegion *region, const Scene *scene, bool display_seconds)
void ED_time_scrub_draw(const ARegion *region, const Scene *scene, bool display_seconds, bool discrete_frames)
bool ED_time_scrub_event_in_region(const ARegion *region, const wmEvent *event)
wmDropBox * WM_dropbox_add(ListBase *lb, const char *idname, bool(*poll)(bContext *C, wmDrag *drag, const wmEvent *event), void(*copy)(bContext *C, wmDrag *drag, wmDropBox *drop), void(*cancel)(Main *bmain, wmDrag *drag, wmDropBox *drop), WMDropboxTooltipFunc tooltip)
int WM_drag_get_path_file_type(const wmDrag *drag)
const char * WM_drag_get_single_path(const wmDrag *drag)
ListBase * WM_dropboxmap_find(const char *idname, int spaceid, int regionid)
wmEventHandler_Dropbox * WM_event_add_dropbox_handler(ListBase *handlers, ListBase *dropboxes)
wmEventHandler_Keymap * WM_event_add_keymap_handler_poll(ListBase *handlers, wmKeyMap *keymap, EventHandlerPoll poll)
wmEventHandler_Keymap * WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap *keymap)
wmEventHandler_Keymap * WM_event_add_keymap_handler_v2d_mask(ListBase *handlers, wmKeyMap *keymap)
wmGizmoGroupTypeRef * WM_gizmogrouptype_append_and_link(wmGizmoMapType *gzmap_type, void(*wtfunc)(wmGizmoGroupType *))
void WM_gizmomap_draw(wmGizmoMap *gzmap, const bContext *C, const eWM_GizmoFlagMapDrawStep drawstep)
wmGizmoMapType * WM_gizmomaptype_ensure(const wmGizmoMapType_Params *gzmap_params)
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))