Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_handlers.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | |||||
| #include "BKE_colortools.h" | #include "BKE_colortools.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_report.h" | #include "BKE_report.h" | ||||
| #include "BKE_screen.h" | #include "BKE_screen.h" | ||||
| #include "BKE_tracking.h" | #include "BKE_tracking.h" | ||||
| #include "BKE_unit.h" | #include "BKE_unit.h" | ||||
| #include "BKE_paint.h" | #include "BKE_paint.h" | ||||
| #include "BKE_curveprofile.h" | #include "BKE_curveprofile.h" | ||||
| #include "BKE_movieclip.h" | |||||
| #include "IMB_colormanagement.h" | #include "IMB_colormanagement.h" | ||||
| #include "ED_screen.h" | #include "ED_screen.h" | ||||
| #include "ED_undo.h" | #include "ED_undo.h" | ||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| #include "UI_view2d.h" | #include "UI_view2d.h" | ||||
| ▲ Show 20 Lines • Show All 7,246 Lines • ▼ Show 20 Lines | static bool ui_numedit_but_TRACKPREVIEW( | ||||
| dy = my - data->draglasty; | dy = my - data->draglasty; | ||||
| if (shift) { | if (shift) { | ||||
| dx /= 5.0f; | dx /= 5.0f; | ||||
| dy /= 5.0f; | dy /= 5.0f; | ||||
| } | } | ||||
| if (!scopes->track_locked) { | if (!scopes->track_locked) { | ||||
| if (scopes->marker->framenr != scopes->framenr) { | const MovieClip *clip = CTX_data_edit_movieclip(C); | ||||
| scopes->marker = BKE_tracking_marker_ensure(scopes->track, scopes->framenr); | int clip_framenr = BKE_movieclip_remap_scene_to_clip_frame(clip, scopes->framenr); | ||||
| if (scopes->marker->framenr != clip_framenr) { | |||||
| scopes->marker = BKE_tracking_marker_ensure(scopes->track, clip_framenr); | |||||
| } | } | ||||
| scopes->marker->flag &= ~(MARKER_DISABLED | MARKER_TRACKED); | scopes->marker->flag &= ~(MARKER_DISABLED | MARKER_TRACKED); | ||||
| scopes->marker->pos[0] += -dx * scopes->slide_scale[0] / BLI_rctf_size_x(&but->block->rect); | scopes->marker->pos[0] += -dx * scopes->slide_scale[0] / BLI_rctf_size_x(&but->block->rect); | ||||
| scopes->marker->pos[1] += -dy * scopes->slide_scale[1] / BLI_rctf_size_y(&but->block->rect); | scopes->marker->pos[1] += -dy * scopes->slide_scale[1] / BLI_rctf_size_y(&but->block->rect); | ||||
| WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, NULL); | WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, NULL); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 3,647 Lines • Show Last 20 Lines | |||||