[Bf-blender-cvs] [e1e975aeb81] temp-udim-images: Fix UDIM grid being drawn too wide

Lukas Stockner noreply at git.blender.org
Tue Jun 12 18:56:20 CEST 2018


Commit: e1e975aeb81f8c6b9f8938e03b42e34220182413
Author: Lukas Stockner
Date:   Tue Jun 12 18:11:22 2018 +0200
Branches: temp-udim-images
https://developer.blender.org/rBe1e975aeb81f8c6b9f8938e03b42e34220182413

Fix UDIM grid being drawn too wide

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

M	source/blender/editors/space_image/image_draw.c

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

diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index cf8c9f6ca16..b15d80e9ae0 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -640,7 +640,7 @@ static bool draw_image_udim_grid(ARegion *ar, SpaceImage *sima, float zoomx, flo
 {
     Image *ima = ED_space_image(sima);
 
-	int num_col = max_ii(ima->num_tiles, 10);
+	int num_col = min_ii(ima->num_tiles, 10);
 	int num_row = 1 + (ima->num_tiles / 10);
 
     const int xmin = MAX2(floor(ar->v2d.cur.xmin), 0);



More information about the Bf-blender-cvs mailing list