diff options
author | Ethan-Hall <Ethan1080> | 2022-05-09 14:06:42 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-05-09 14:06:42 +0300 |
commit | 719c86c0a65d0e9301fa879b23e3a78229d6f1c8 (patch) | |
tree | 7483ed522778e994dceaf721c3f437e783e4cb28 /source | |
parent | b508999d8d9715155ed0f5a5c8b1a23d1e21c46d (diff) |
Fix: compiler warnings due to recent commit
This is a fix for warnings caused by the patch b96cdbcf7aac.
Differential Revision: https://developer.blender.org/D14891
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_proj.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 872dfe68793..02e992029ff 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -6600,12 +6600,15 @@ static bool proj_paint_add_slot(bContext *C, wmOperator *op) } case PAINT_CANVAS_SOURCE_COLOR_ATTRIBUTE: { new_node = nodeAddStaticNode(C, ntree, SH_NODE_ATTRIBUTE); - if (layer = proj_paint_color_attribute_create(op, ob)) { + if ((layer = proj_paint_color_attribute_create(op, ob))) { BLI_strncpy_utf8( - &((NodeShaderAttribute *)new_node->storage)->name, &layer->name, MAX_NAME); + ((NodeShaderAttribute *)new_node->storage)->name, layer->name, MAX_NAME); } break; } + case PAINT_CANVAS_SOURCE_MATERIAL: + BLI_assert_unreachable(); + return false; } nodeSetActive(ntree, new_node); @@ -6783,6 +6786,9 @@ static void texture_paint_add_texture_paint_slot_ui(bContext *C, wmOperator *op) uiItemR(layout, op->ptr, "domain", UI_ITEM_R_EXPAND, NULL, ICON_NONE); uiItemR(layout, op->ptr, "data_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE); break; + case PAINT_CANVAS_SOURCE_MATERIAL: + BLI_assert_unreachable(); + break; } uiItemR(layout, op->ptr, "color", 0, NULL, ICON_NONE); |