Commit: 7b48e04b6e5949c87d37cb0a425ab1067c770d8c
Author: Brecht Van Lommel
Date: Thu Jan 24 19:05:45 2019 +0100
Branches: master
https://developer.blender.org/rB7b48e04b6e5949c87d37cb0a425ab1067c770d8c
Fix T59650: adding texture paint slot image shows wrong color.
===================================================================
M source/blender/editors/sculpt_paint/paint_image_proj.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c
b/source/blender/editors/sculpt_paint/paint_image_proj.c
index c6584a01c17..80133db906e 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -6083,8 +6083,12 @@ static void
get_default_texture_layer_name_for_object(Object *ob, int texture_ty
static int texture_paint_add_texture_paint_slot_invoke(bContext *C, wmOperator
*op, const wmEvent *UNUSED(event))
{
+ /* Get material and default color to display in the popup. */
Object *ob = ED_object_active_context(C);
+ Material *ma = get_or_create_current_material(C, ob);
+
int type = get_texture_layer_type(op, "type");
+ proj_paint_default_color(op, type, ma);
char imagename[MAX_ID_NAME - 2];
get_default_texture_layer_name_for_object(ob, type, (char *)&imagename,
sizeof(imagename));
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs