diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_proj.c')
-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); |