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:
authorJesse Yurkovich <jesse.y@gmail.com>2022-08-04 10:45:25 +0300
committerJesse Yurkovich <jesse.y@gmail.com>2022-08-04 10:45:25 +0300
commitfdd282021a98ac89f40cff7d33f646fb96a96133 (patch)
treee1cd4f079e8e501b185d82e093f889f93d4f7eb3 /source/blender/editors/space_image
parent550ebc5c8f484210239fb515c7cdaead4826999d (diff)
Cleanup: Fix compile warnings
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/image_buttons.c3
-rw-r--r--source/blender/editors/space_image/image_undo.cc2
2 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 48f43e05315..2109d3f9701 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -869,7 +869,8 @@ void uiTemplateImage(uiLayout *layout,
uiItemS(col);
uiItemR(col, &imaptr, "generated_type", UI_ITEM_R_EXPAND, IFACE_("Type"), ICON_NONE);
- if (ima->gen_type == IMA_GENTYPE_BLANK) {
+ ImageTile *base_tile = BKE_image_get_tile(ima, 0);
+ if (base_tile->gen_type == IMA_GENTYPE_BLANK) {
uiItemR(col, &imaptr, "generated_color", 0, NULL, ICON_NONE);
}
}
diff --git a/source/blender/editors/space_image/image_undo.cc b/source/blender/editors/space_image/image_undo.cc
index 9e8db58ccc2..065641c4051 100644
--- a/source/blender/editors/space_image/image_undo.cc
+++ b/source/blender/editors/space_image/image_undo.cc
@@ -454,7 +454,6 @@ struct UndoImageBuf {
struct {
short source;
bool use_float;
- char gen_type;
} image_state;
};
@@ -473,7 +472,6 @@ static UndoImageBuf *ubuf_from_image_no_tiles(Image *image, const ImBuf *ibuf)
MEM_callocN(sizeof(*ubuf->tiles) * ubuf->tiles_len, __func__));
BLI_strncpy(ubuf->ibuf_name, ibuf->name, sizeof(ubuf->ibuf_name));
- ubuf->image_state.gen_type = image->gen_type;
ubuf->image_state.source = image->source;
ubuf->image_state.use_float = ibuf->rect_float != nullptr;