diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-14 03:20:08 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-14 03:20:08 +0300 |
commit | b97a2c3688ad29b051898ff2be5f9b9e98bebdba (patch) | |
tree | de011963a87fa4977bbae61f1143f44603569d14 /source/blender/blenkernel/intern | |
parent | c1d29ea7835c0f2ebd20531dfe3996c6bbce6b58 (diff) |
Cleanup: naming for paint modes
- Rename ePaint* -> PAINT_MODE_*.
- Use PAINT_OVERLAY_ prefix for eOverlayControlFlags.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/paint.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index 0541bd58c85..dd5d801d2ac 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -83,9 +83,9 @@ void BKE_paint_invalidate_overlay_tex(Scene *scene, const Tex *tex) return; if (br->mtex.tex == tex) - overlay_flags |= PAINT_INVALID_OVERLAY_TEXTURE_PRIMARY; + overlay_flags |= PAINT_OVERLAY_INVALID_TEXTURE_PRIMARY; if (br->mask_mtex.tex == tex) - overlay_flags |= PAINT_INVALID_OVERLAY_TEXTURE_SECONDARY; + overlay_flags |= PAINT_OVERLAY_INVALID_TEXTURE_SECONDARY; } void BKE_paint_invalidate_cursor_overlay(Scene *scene, CurveMapping *curve) @@ -94,14 +94,14 @@ void BKE_paint_invalidate_cursor_overlay(Scene *scene, CurveMapping *curve) Brush *br = p->brush; if (br && br->curve == curve) - overlay_flags |= PAINT_INVALID_OVERLAY_CURVE; + overlay_flags |= PAINT_OVERLAY_INVALID_CURVE; } void BKE_paint_invalidate_overlay_all(void) { - overlay_flags |= (PAINT_INVALID_OVERLAY_TEXTURE_SECONDARY | - PAINT_INVALID_OVERLAY_TEXTURE_PRIMARY | - PAINT_INVALID_OVERLAY_CURVE); + overlay_flags |= (PAINT_OVERLAY_INVALID_TEXTURE_SECONDARY | + PAINT_OVERLAY_INVALID_TEXTURE_PRIMARY | + PAINT_OVERLAY_INVALID_CURVE); } eOverlayControlFlags BKE_paint_get_overlay_flags(void) @@ -135,18 +135,18 @@ Paint *BKE_paint_get_active_from_paintmode(Scene *sce, ePaintMode mode) ToolSettings *ts = sce->toolsettings; switch (mode) { - case ePaintSculpt: + case PAINT_MODE_SCULPT: return &ts->sculpt->paint; - case ePaintVertex: + case PAINT_MODE_VERTEX: return &ts->vpaint->paint; - case ePaintWeight: + case PAINT_MODE_WEIGHT: return &ts->wpaint->paint; - case ePaintTexture2D: - case ePaintTexture3D: + case PAINT_MODE_TEXTURE_2D: + case PAINT_MODE_TEXTURE_3D: return &ts->imapaint.paint; - case ePaintSculptUV: + case PAINT_MODE_SCULPT_UV: return &ts->uvsculpt->paint; - case ePaintInvalid: + case PAINT_MODE_INVALID: return NULL; default: return &ts->imapaint.paint; @@ -231,39 +231,39 @@ ePaintMode BKE_paintmode_get_active_from_context(const bContext *C) if ((sima = CTX_wm_space_image(C)) != NULL) { if (obact && obact->mode == OB_MODE_EDIT) { if (sima->mode == SI_MODE_PAINT) - return ePaintTexture2D; + return PAINT_MODE_TEXTURE_2D; else if (ts->use_uv_sculpt) - return ePaintSculptUV; + return PAINT_MODE_SCULPT_UV; } else { - return ePaintTexture2D; + return PAINT_MODE_TEXTURE_2D; } } else if (obact) { switch (obact->mode) { case OB_MODE_SCULPT: - return ePaintSculpt; + return PAINT_MODE_SCULPT; case OB_MODE_VERTEX_PAINT: - return ePaintVertex; + return PAINT_MODE_VERTEX; case OB_MODE_WEIGHT_PAINT: - return ePaintWeight; + return PAINT_MODE_WEIGHT; case OB_MODE_TEXTURE_PAINT: - return ePaintTexture3D; + return PAINT_MODE_TEXTURE_3D; case OB_MODE_EDIT: if (ts->use_uv_sculpt) - return ePaintSculptUV; - return ePaintTexture2D; + return PAINT_MODE_SCULPT_UV; + return PAINT_MODE_TEXTURE_2D; default: - return ePaintTexture2D; + return PAINT_MODE_TEXTURE_2D; } } else { /* default to image paint */ - return ePaintTexture2D; + return PAINT_MODE_TEXTURE_2D; } } - return ePaintInvalid; + return PAINT_MODE_INVALID; } Brush *BKE_paint_brush(Paint *p) @@ -480,19 +480,19 @@ void BKE_paint_cavity_curve_preset(Paint *p, int preset) eObjectMode BKE_paint_object_mode_from_paint_mode(ePaintMode mode) { switch (mode) { - case ePaintSculpt: + case PAINT_MODE_SCULPT: return OB_MODE_SCULPT; - case ePaintVertex: + case PAINT_MODE_VERTEX: return OB_MODE_VERTEX_PAINT; - case ePaintWeight: + case PAINT_MODE_WEIGHT: return OB_MODE_WEIGHT_PAINT; - case ePaintTexture3D: + case PAINT_MODE_TEXTURE_3D: return OB_MODE_TEXTURE_PAINT; - case ePaintTexture2D: + case PAINT_MODE_TEXTURE_2D: return OB_MODE_TEXTURE_PAINT; - case ePaintSculptUV: + case PAINT_MODE_SCULPT_UV: return OB_MODE_EDIT; - case ePaintInvalid: + case PAINT_MODE_INVALID: default: return 0; } |