diff options
author | Antonioya <blendergit@gmail.com> | 2018-12-14 18:45:57 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-12-14 18:52:12 +0300 |
commit | 780f0f646da1aac01dc3164fd7d493426aca9e19 (patch) | |
tree | 453cb60e732399e22279e8eee7a1c9725416c427 /source/blender/blenkernel/intern | |
parent | a1c8595b090254c1270bb66118304186a3add913 (diff) |
GP: Rename CTX and OB modes
Part of T59335.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/context.c | 8 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/paint.c | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index c2e5659a64f..b000b3709f2 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -194,7 +194,7 @@ Brush *BKE_brush_add_gpencil(Main *bmain, ToolSettings *ts, const char *name) { Brush *brush; Paint *paint = &ts->gp_paint->paint; - brush = BKE_brush_add(bmain, name, OB_MODE_GPENCIL_PAINT); + brush = BKE_brush_add(bmain, name, OB_MODE_PAINT_GPENCIL); BKE_paint_brush_set(paint, brush); id_us_min(&brush->id); diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c index 96dd90cdf35..a907babd661 100644 --- a/source/blender/blenkernel/intern/context.c +++ b/source/blender/blenkernel/intern/context.c @@ -1007,10 +1007,10 @@ int CTX_data_mode_enum_ex(const Object *obedit, const Object *ob, const eObjectM else if (object_mode & OB_MODE_VERTEX_PAINT) return CTX_MODE_PAINT_VERTEX; else if (object_mode & OB_MODE_TEXTURE_PAINT) return CTX_MODE_PAINT_TEXTURE; else if (object_mode & OB_MODE_PARTICLE_EDIT) return CTX_MODE_PARTICLE; - else if (object_mode & OB_MODE_GPENCIL_PAINT) return CTX_MODE_GPENCIL_PAINT; - else if (object_mode & OB_MODE_GPENCIL_EDIT) return CTX_MODE_GPENCIL_EDIT; - else if (object_mode & OB_MODE_GPENCIL_SCULPT) return CTX_MODE_GPENCIL_SCULPT; - else if (object_mode & OB_MODE_GPENCIL_WEIGHT) return CTX_MODE_GPENCIL_WEIGHT; + else if (object_mode & OB_MODE_PAINT_GPENCIL) return CTX_MODE_PAINT_GPENCIL; + else if (object_mode & OB_MODE_EDIT_GPENCIL) return CTX_MODE_EDIT_GPENCIL; + else if (object_mode & OB_MODE_SCULPT_GPENCIL) return CTX_MODE_SCULPT_GPENCIL; + else if (object_mode & OB_MODE_WEIGHT_GPENCIL) return CTX_MODE_WEIGHT_GPENCIL; } } diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index 08c6413efa2..c5bfa41fa0b 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -226,7 +226,7 @@ Paint *BKE_paint_get_active(Scene *sce, ViewLayer *view_layer) return &ts->wpaint->paint; case OB_MODE_TEXTURE_PAINT: return &ts->imapaint.paint; - case OB_MODE_GPENCIL_PAINT: + case OB_MODE_PAINT_GPENCIL: return &ts->gp_paint->paint; case OB_MODE_EDIT: if (ts->use_uv_sculpt) @@ -337,7 +337,7 @@ ePaintMode BKE_paintmode_get_from_tool(const struct bToolRef *tref) return PAINT_MODE_VERTEX; case CTX_MODE_PAINT_WEIGHT: return PAINT_MODE_WEIGHT; - case CTX_MODE_GPENCIL_PAINT: + case CTX_MODE_PAINT_GPENCIL: return PAINT_MODE_GPENCIL; case CTX_MODE_PAINT_TEXTURE: return PAINT_MODE_TEXTURE_3D; @@ -389,7 +389,7 @@ void BKE_paint_runtime_init(const ToolSettings *ts, Paint *paint) } else if (paint == &ts->gp_paint->paint) { paint->runtime.tool_offset = offsetof(Brush, gpencil_tool); - paint->runtime.ob_mode = OB_MODE_GPENCIL_PAINT; + paint->runtime.ob_mode = OB_MODE_PAINT_GPENCIL; } else if (paint == &ts->uvsculpt->paint) { /* We don't use these yet. */ |