Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-06-06 22:58:30 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-06-06 22:58:30 +0400
commitf43a733f591377f2cdce0555443dba003c05fd30 (patch)
tree6574507d07111ea418e5c09ce1adb4feac32561d /source/blender/editors/space_clip/clip_draw.c
parent3e3e5b2ea3a8dadfbd1dcfe295ddf28bc2236141 (diff)
Changed semantic of recently added start_frame
Now it's indicates at which scene frame number movie clip starts playing back. This this setting is still belongs to clip datavlock and used by all users of clip such as movie compositor nodes, constraints and so. After long discussion and thoughts about this it was decided that this would match image's current behavior (which initially seen a bit crappy), but that's actually allows: - Keep semantics of start frame in image and clip datablocks in sync - Allows to support features like support of loading image sequences with crappy numbers in suffix which doesn't fit long int. - Allows to eliminate extra boolean checkbox to control such kind of offset. Hopefully from pipeline POV it wouldn't hurt because idea of having this things implemented in original way was working only if sequence before processing started naming form 001.
Diffstat (limited to 'source/blender/editors/space_clip/clip_draw.c')
-rw-r--r--source/blender/editors/space_clip/clip_draw.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index d55d32deaa4..62ea0b00ff8 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -155,7 +155,7 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Sc
else
glColor4ub(255, 255, 0, 96);
- glRecti((i - sfra) * framelen, 0, (i - sfra + 1)*framelen, 4);
+ glRecti((i - sfra + clip->start_frame - 1) * framelen, 0, (i - sfra + clip->start_frame) * framelen, 4);
}
}
}
@@ -183,7 +183,7 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Sc
}
if (!ok)
- glRecti((i - sfra) * framelen, 0, (i - sfra + 1) * framelen, 8);
+ glRecti((i - sfra + clip->start_frame - 1) * framelen, 0, (i - sfra + clip->start_frame) * framelen, 8);
}
}
@@ -338,17 +338,17 @@ static void draw_track_path(SpaceClip *sc, MovieClip *UNUSED(clip), MovieTrackin
int count = sc->path_length;
int i, a, b, curindex = -1;
float path[102][2];
- int tiny = sc->flag & SC_SHOW_TINY_MARKER, framenr;
+ int tiny = sc->flag & SC_SHOW_TINY_MARKER, framenr, start_frame;
MovieTrackingMarker *marker;
if (count == 0)
return;
- marker = BKE_tracking_get_marker(track, sc->user.framenr);
- if (marker->framenr != sc->user.framenr || marker->flag & MARKER_DISABLED)
- return;
+ start_frame = framenr = ED_space_clip_clip_framenr(sc);
- framenr = marker->framenr;
+ marker = BKE_tracking_get_marker(track, framenr);
+ if (marker->framenr != framenr || marker->flag & MARKER_DISABLED)
+ return;
a = count;
i = framenr - 1;
@@ -362,7 +362,7 @@ static void draw_track_path(SpaceClip *sc, MovieClip *UNUSED(clip), MovieTrackin
add_v2_v2v2(path[--a], marker->pos, track->offset);
ED_clip_point_undistorted_pos(sc, path[a], path[a]);
- if (marker->framenr == sc->user.framenr)
+ if (marker->framenr == start_frame)
curindex = a;
}
else {
@@ -381,7 +381,7 @@ static void draw_track_path(SpaceClip *sc, MovieClip *UNUSED(clip), MovieTrackin
break;
if (marker->framenr == i) {
- if (marker->framenr == sc->user.framenr)
+ if (marker->framenr == start_frame)
curindex = b;
add_v2_v2v2(path[b++], marker->pos, track->offset);
@@ -924,7 +924,7 @@ static void draw_marker_texts(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
if (marker->flag & MARKER_DISABLED)
strcpy(state, "disabled");
- else if (marker->framenr != sc->user.framenr)
+ else if (marker->framenr != ED_space_clip_clip_framenr(sc))
strcpy(state, "estimated");
else if (marker->flag & MARKER_TRACKED)
strcpy(state, "tracked");
@@ -972,7 +972,7 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
ListBase *tracksbase = BKE_tracking_get_tracks(tracking);
MovieTrackingTrack *track, *act_track;
MovieTrackingMarker *marker;
- int framenr = sc->user.framenr;
+ int framenr = ED_space_clip_clip_framenr(sc);
int undistort = sc->user.render_flag & MCLIP_PROXY_RENDER_UNDISTORT;
float *marker_pos = NULL, *fp, *active_pos = NULL, cur_pos[2];