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
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-24 21:05:45 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-24 21:08:25 +0300
commit7b48e04b6e5949c87d37cb0a425ab1067c770d8c (patch)
tree611a5325d35dfa8a496371c2c3be3f11b13ddd6d /source
parent63bacfed4bf87879290c3633c75b327b2a46f7f7 (diff)
Fix T59650: adding texture paint slot image shows wrong color.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c4
1 files changed, 4 insertions, 0 deletions
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));