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:
authorAntony Riakiotakis <kalast@gmail.com>2014-07-24 13:39:04 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-07-24 13:39:04 +0400
commitcc40925c360fe031a623311045e1b74b4618629f (patch)
treeccb4deb03740d0cedb12cf279562c9964c8327c8 /source/blender/editors/sculpt_paint/paint_image.c
parent6e41b008e3fadf76e5a9e2f29005f192c2ed33ec (diff)
UI cleanup:
New layer in texture painting will now allow entering image parameters, similar to new image.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 0e765060967..21def9fe6d4 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -1372,7 +1372,7 @@ void paint_proj_mesh_data_ensure(bContext *C, Object *ob, wmOperator *op)
if (ma) {
has_material = true;
if (!ma->texpaintslot) {
- proj_paint_add_slot(C, MAP_COL, ma);
+ proj_paint_add_slot(C, MAP_COL, ma, NULL);
}
}
}
@@ -1385,7 +1385,7 @@ void paint_proj_mesh_data_ensure(bContext *C, Object *ob, wmOperator *op)
Material *ma = BKE_material_add(CTX_data_main(C), "Material");
/* no material found, just assign to first slot */
assign_material(ob, ma, 1, BKE_MAT_ASSIGN_USERPREF);
- proj_paint_add_slot(C, MAP_COL, ma);
+ proj_paint_add_slot(C, MAP_COL, ma, NULL);
}
me = BKE_mesh_from_object(ob);
@@ -1407,14 +1407,8 @@ void paint_proj_mesh_data_ensure(bContext *C, Object *ob, wmOperator *op)
Main *bmain = CTX_data_main(C);
float color[4] = {0.0, 0.0, 0.0, 1.0};
- /* should not be allowed, but just in case */
- if (imapaint->slot_xresolution_default == 0)
- imapaint->slot_xresolution_default = 1024;
- if (imapaint->slot_yresolution_default == 0)
- imapaint->slot_yresolution_default = 1024;
-
- width = imapaint->slot_xresolution_default;
- height = imapaint->slot_yresolution_default;
+ width = 1024;
+ height = 1024;
imapaint->stencil = BKE_image_add_generated(bmain, width, height, "Stencil", 32, false, IMA_GENTYPE_BLANK, color);
}
}