[Bf-blender-cvs] [cd20a1399e9] temp-udim-images: Support active tile selection without an active image

Lukas Stockner noreply at git.blender.org
Wed Jun 27 23:53:25 CEST 2018


Commit: cd20a1399e95932f0b76f6270498ad1e0f9aea1f
Author: Lukas Stockner
Date:   Thu Jun 28 01:22:30 2018 +0200
Branches: temp-udim-images
https://developer.blender.org/rBcd20a1399e95932f0b76f6270498ad1e0f9aea1f

Support active tile selection without an active image

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

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

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

diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 81fbbbbb851..d37f6bc39de 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -4128,9 +4128,15 @@ void IMAGE_OT_fill_tile(wmOperatorType *ot)
 
 static int image_select_tile_poll(bContext *C)
 {
+	SpaceImage *sima = CTX_wm_space_image(C);
 	Image *ima = CTX_data_edit_image(C);
 
-	return (ima && ima->source == IMA_SRC_TILED);
+	if (ima) {
+		return (ima->source == IMA_SRC_TILED);
+	}
+	else {
+		return (sima->tile_grid_shape[0] > 1) || (sima->tile_grid_shape[1] > 1);
+	}
 }
 
 static int image_select_tile_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)



More information about the Bf-blender-cvs mailing list