[Bf-blender-cvs] [f3d3e125b77] soc-2021-vse-strip-thumbnails: Small fix of using defined constant instead of immediate value

Aditya Y Jeppu noreply at git.blender.org
Fri Sep 3 11:26:00 CEST 2021


Commit: f3d3e125b774774648f0c9ec84741d3e2c7ef578
Author: Aditya Y Jeppu
Date:   Fri Sep 3 14:53:29 2021 +0530
Branches: soc-2021-vse-strip-thumbnails
https://developer.blender.org/rBf3d3e125b774774648f0c9ec84741d3e2c7ef578

Small fix of using defined constant instead of immediate value

===================================================================

M	source/blender/editors/space_sequencer/sequencer_draw.c

===================================================================

diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 1966f9bc06d..1ec6d9dc4a7 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -1345,14 +1345,14 @@ static void seq_get_thumb_image_dimensions(Sequence *seq,
   float image_width = seq->strip->stripdata->orig_width;
   float image_height = seq->strip->stripdata->orig_height;
 
-  /* Fix the dimensions to be max 256 for x or y. */
+  /* Fix the dimensions to be max SEQ_RENDER_THUMB_SIZE (256) for x or y. */
   float aspect_ratio = (float)image_width / image_height;
   if (image_width > image_height) {
-    image_width = 256;
+    image_width = SEQ_RENDER_THUMB_SIZE;
     image_height = round_fl_to_int(image_width / aspect_ratio);
   }
   else {
-    image_height = 256;
+    image_height = SEQ_RENDER_THUMB_SIZE;
     image_width = round_fl_to_int(image_height * aspect_ratio);
   }
 
@@ -1461,7 +1461,7 @@ static void sequencer_thumbnail_init_job(const bContext *C, View2D *v2d, Editing
                        CTX_wm_window(C),
                        CTX_data_scene(C),
                        "Draw Thumbnails",
-                       WM_JOB_PROGRESS,  // TODO(AYJ): change this and use SEQ_RENDER_THUMB_SIZE
+                       0,
                        WM_JOB_TYPE_SEQ_DRAW_THUMBNAIL);
 
   /* Get the thumbnail job if it exists. */



More information about the Bf-blender-cvs mailing list