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:
authorCampbell Barton <ideasman42@gmail.com>2018-11-14 03:24:37 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-14 03:27:42 +0300
commit2b3b481c3d6553e7a4dd90efc25518fe8e1a5bc6 (patch)
treee71363a67c25d8ff951c1541069fb50d8974ab5a /source/blender/editors/sculpt_paint/paint_ops.c
parent91d0c7f9793e4a4a72a959c921b654faa795b17e (diff)
parentb97a2c3688ad29b051898ff2be5f9b9e98bebdba (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_ops.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index 316372ece4e..a48541c990f 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -113,7 +113,7 @@ static int brush_add_gpencil_exec(bContext *C, wmOperator *UNUSED(op))
Paint *paint = &ts->gp_paint->paint;
Brush *br = BKE_paint_brush(paint);
Main *bmain = CTX_data_main(C);
- // ePaintMode mode = ePaintGpencil;
+ // ePaintMode mode = PAINT_MODE_GPENCIL;
if (br) {
br = BKE_brush_copy(bmain, br);
@@ -253,11 +253,11 @@ static int palette_color_add_exec(bContext *C, wmOperator *UNUSED(op))
color = BKE_palette_color_add(palette);
palette->active_color = BLI_listbase_count(&palette->colors) - 1;
- if (ELEM(mode, ePaintTexture3D, ePaintTexture2D, ePaintVertex)) {
+ if (ELEM(mode, PAINT_MODE_TEXTURE_3D, PAINT_MODE_TEXTURE_2D, PAINT_MODE_VERTEX)) {
copy_v3_v3(color->rgb, BKE_brush_color_get(scene, brush));
color->value = 0.0;
}
- else if (mode == ePaintWeight) {
+ else if (mode == PAINT_MODE_WEIGHT) {
zero_v3(color->rgb);
color->value = brush->weight;
}
@@ -458,9 +458,9 @@ static int brush_select_exec(bContext *C, wmOperator *op)
const bool toggle = RNA_boolean_get(op->ptr, "toggle");
const char *tool_name = "Brush";
- if (paint_mode == ePaintInvalid) {
+ if (paint_mode == PAINT_MODE_INVALID) {
paint_mode = BKE_paintmode_get_active_from_context(C);
- if (paint_mode == ePaintInvalid) {
+ if (paint_mode == PAINT_MODE_INVALID) {
return OPERATOR_CANCELLED;
}
}
@@ -485,12 +485,12 @@ static void PAINT_OT_brush_select(wmOperatorType *ot)
{
/* Keep names matching 'rna_enum_object_mode_items' (besides active). */
static const EnumPropertyItem paint_mode_items[] = {
- {ePaintInvalid, "ACTIVE", 0, "Current", "Set brush for active paint mode"},
- {ePaintSculpt, "SCULPT", ICON_SCULPTMODE_HLT, "Sculpt", ""},
- {ePaintVertex, "VERTEX_PAINT", ICON_VPAINT_HLT, "Vertex Paint", ""},
- {ePaintWeight, "WEIGHT_PAINT", ICON_WPAINT_HLT, "Weight Paint", ""},
- {ePaintTexture3D, "TEXTURE_PAINT", ICON_TPAINT_HLT, "Texture Paint", ""},
- {ePaintGpencil, "GPENCIL_PAINT", ICON_GREASEPENCIL, "Grease Pencil Paint", ""},
+ {PAINT_MODE_INVALID, "ACTIVE", 0, "Current", "Set brush for active paint mode"},
+ {PAINT_MODE_SCULPT, "SCULPT", ICON_SCULPTMODE_HLT, "Sculpt", ""},
+ {PAINT_MODE_VERTEX, "VERTEX_PAINT", ICON_VPAINT_HLT, "Vertex Paint", ""},
+ {PAINT_MODE_WEIGHT, "WEIGHT_PAINT", ICON_WPAINT_HLT, "Weight Paint", ""},
+ {PAINT_MODE_TEXTURE_3D, "TEXTURE_PAINT", ICON_TPAINT_HLT, "Texture Paint", ""},
+ {PAINT_MODE_GPENCIL, "GPENCIL_PAINT", ICON_GREASEPENCIL, "Grease Pencil Paint", ""},
{0, NULL, 0, NULL, NULL}
};
PropertyRNA *prop;
@@ -508,7 +508,7 @@ static void PAINT_OT_brush_select(wmOperatorType *ot)
/* props */
/* All properties are hidden, so as not to show the redo panel. */
- prop = RNA_def_enum(ot->srna, "paint_mode", paint_mode_items, ePaintInvalid, "Paint Mode", "");
+ prop = RNA_def_enum(ot->srna, "paint_mode", paint_mode_items, PAINT_MODE_INVALID, "Paint Mode", "");
RNA_def_property_flag(prop, PROP_HIDDEN);
for (const EnumPropertyItem *item = paint_mode_items + 1; item->identifier; item++) {