[Bf-blender-cvs] [58b6c91d36d] master: Cleanup: Remove unused runtime field from the MovieClip
Sergey Sharybin
noreply at git.blender.org
Thu Jan 5 12:40:42 CET 2023
Commit: 58b6c91d36dfd0d5b0d81ebbdd76f648285c4967
Author: Sergey Sharybin
Date: Thu Jan 5 12:21:04 2023 +0100
Branches: master
https://developer.blender.org/rB58b6c91d36dfd0d5b0d81ebbdd76f648285c4967
Cleanup: Remove unused runtime field from the MovieClip
It is a part of old-standing TODO, and code which accesses
the value was commented out for many years.
Remove the field to help with an upcoming const-correctness
improvements.
===================================================================
M source/blender/blenkernel/intern/movieclip.c
M source/blender/makesdna/DNA_movieclip_types.h
===================================================================
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c
index 010dd4a01bf..2e95866d642 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -1344,7 +1344,6 @@ static ImBuf *movieclip_get_postprocessed_ibuf(
}
if (ibuf) {
- clip->lastframe = framenr;
real_ibuf_size(clip, user, ibuf, &clip->lastsize[0], &clip->lastsize[1]);
/* Post-process frame and put to cache if needed. */
@@ -1566,17 +1565,7 @@ bool BKE_movieclip_has_frame(MovieClip *clip, MovieClipUser *user)
void BKE_movieclip_get_size(MovieClip *clip, MovieClipUser *user, int *width, int *height)
{
-#if 0
- /* originally was needed to support image sequences with different image dimensions,
- * which might be useful for such things as reconstruction of unordered image sequence,
- * or painting/rotoscoping of non-equal-sized images, but this ended up in unneeded
- * cache lookups and even unwanted non-proxied files loading when doing mask parenting,
- * so let's disable this for now and assume image sequence consists of images with
- * equal sizes (sergey)
- * TODO(sergey): Support reading sequences of different resolution.
- */
- if (user->framenr == clip->lastframe) {
-#endif
+ /* TODO(sergey): Support reading sequences of different resolution. */
if (clip->lastsize[0] != 0 && clip->lastsize[1] != 0) {
*width = clip->lastsize[0];
*height = clip->lastsize[1];
diff --git a/source/blender/makesdna/DNA_movieclip_types.h b/source/blender/makesdna/DNA_movieclip_types.h
index a262baf6a2b..20da4a6253f 100644
--- a/source/blender/makesdna/DNA_movieclip_types.h
+++ b/source/blender/makesdna/DNA_movieclip_types.h
@@ -65,8 +65,7 @@ typedef struct MovieClip {
/** Sequence or movie. */
int source;
- /** Last accessed frame number. */
- int lastframe;
+ int _pad;
/** Size of last accessed frame. */
int lastsize[2];
More information about the Bf-blender-cvs
mailing list