diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-06-13 01:25:23 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-06-13 01:25:23 +0400 |
commit | 5dc0b35a019651e052c7770330aafc7f2d7fb690 (patch) | |
tree | 6902f7e9e431868947bd0c5bcbb15696959fa99a /source/blender/editors/space_clip | |
parent | 92d948307549ce1d69ec4e41e42b442360b9bade (diff) |
Added frame offset slider to clip datablocks
In contrast to start_frame (which affects on where footage actually
starts to play and also affects on all data associated with a clip
such as motion tracking, reconstruction and so on) this slider only
affects on a way how frame number is mapping to a filename, without
touching any kind of tracking data.
The formula is:
file_name = clip_file_name + frame_offset - (start_frame - 1)
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/clip_editor.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index b24ff58e590..30965362d37 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -523,7 +523,7 @@ typedef struct SpaceClipDrawContext { unsigned last_texture; /* ID of previously used texture, so it'll be restored after clip drawing */ /* fields to check if cache is still valid */ - int framenr, start_frame; + int framenr, start_frame, frame_offset; short render_size, render_flag; } SpaceClipDrawContext; @@ -565,6 +565,7 @@ int ED_space_clip_load_movieclip_buffer(SpaceClip *sc, ImBuf *ibuf) need_rebind |= context->render_size != sc->user.render_size; need_rebind |= context->render_flag != sc->user.render_flag; need_rebind |= context->start_frame != clip->start_frame; + need_rebind |= context->frame_offset != clip->frame_offset; if (need_rebind) { int width = ibuf->x, height = ibuf->y; @@ -622,6 +623,7 @@ int ED_space_clip_load_movieclip_buffer(SpaceClip *sc, ImBuf *ibuf) context->render_size = sc->user.render_size; context->render_flag = sc->user.render_flag; context->start_frame = clip->start_frame; + context->frame_offset = clip->frame_offset; } else { /* displaying exactly the same image which was loaded t oa texture, |