diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-08-04 13:59:20 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-08-04 13:59:20 +0300 |
commit | d6762bedee6fd12308e4cd6b46521caf1e2f6395 (patch) | |
tree | 86b6af1c23e97adc7d7527977d7133642b0d77be /source/blender/editors | |
parent | 778f0aca5263f9fd37ef1f7a1162af0328630cf8 (diff) | |
parent | f921ae46658348121c3408b01171e0e21667438c (diff) |
Merge branch 'blender-v2.90-release'
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_clip/clip_buttons.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_edit.c | 5 |
2 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c index 3b1cc6fcab0..71f75d96cb1 100644 --- a/source/blender/editors/space_clip/clip_buttons.c +++ b/source/blender/editors/space_clip/clip_buttons.c @@ -259,6 +259,8 @@ typedef struct { MovieTrackingTrack *track; MovieTrackingMarker *marker; + /** current frame number */ + int framenr; /** position of marker in pixel coords */ float marker_pos[2]; /** position and dimensions of marker pattern in pixel coords */ @@ -286,7 +288,8 @@ static void marker_update_cb(bContext *C, void *arg_cb, void *UNUSED(arg)) return; } - MovieTrackingMarker *marker = cb->marker; + int clip_framenr = BKE_movieclip_remap_scene_to_clip_frame(cb->clip, cb->framenr); + MovieTrackingMarker *marker = BKE_tracking_marker_ensure(cb->track, clip_framenr); marker->flag = cb->marker_flag; WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, NULL); @@ -300,7 +303,9 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event) BKE_movieclip_get_size(cb->clip, cb->user, &width, &height); - MovieTrackingMarker *marker = cb->marker; + int clip_framenr = BKE_movieclip_remap_scene_to_clip_frame(cb->clip, cb->framenr); + MovieTrackingMarker *marker = BKE_tracking_marker_ensure(cb->track, clip_framenr); + if (event == B_MARKER_POS) { marker->pos[0] = cb->marker_pos[0] / width; marker->pos[1] = cb->marker_pos[1] / height; @@ -456,6 +461,7 @@ void uiTemplateMarker(uiLayout *layout, cb->track = track; cb->marker = marker; cb->marker_flag = marker->flag; + cb->framenr = user->framenr; if (compact) { block = uiLayoutGetBlock(layout); diff --git a/source/blender/editors/space_image/image_edit.c b/source/blender/editors/space_image/image_edit.c index cb0fdcf23ca..4eb4e6649d9 100644 --- a/source/blender/editors/space_image/image_edit.c +++ b/source/blender/editors/space_image/image_edit.c @@ -400,7 +400,10 @@ bool ED_image_slot_cycle(struct Image *image, int direction) } } - if (i == num_slots) { + if (num_slots == 1) { + image->render_slot = 0; + } + else if (i == num_slots) { image->render_slot = ((cur == 1) ? 0 : 1); } |