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/editors/object | |
parent | a1c8595b090254c1270bb66118304186a3add913 (diff) |
GP: Rename CTX and OB modes
Part of T59335.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_edit.c | 6 | ||||
-rw-r--r-- | source/blender/editors/object/object_modes.c | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 676d44e3ea4..59ce42c50a5 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -1615,8 +1615,8 @@ static const EnumPropertyItem *object_mode_set_itemsf( (input->value == OB_MODE_PARTICLE_EDIT && use_mode_particle_edit) || (ELEM(input->value, OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, OB_MODE_TEXTURE_PAINT) && (ob->type == OB_MESH)) || - (ELEM(input->value, OB_MODE_GPENCIL_EDIT, OB_MODE_GPENCIL_PAINT, - OB_MODE_GPENCIL_SCULPT, OB_MODE_GPENCIL_WEIGHT) && (ob->type == OB_GPENCIL)) || + (ELEM(input->value, OB_MODE_EDIT_GPENCIL, OB_MODE_PAINT_GPENCIL, + OB_MODE_SCULPT_GPENCIL, OB_MODE_WEIGHT_GPENCIL) && (ob->type == OB_GPENCIL)) || (input->value == OB_MODE_OBJECT)) { RNA_enum_item_add(&item, &totitem, input); @@ -1674,7 +1674,7 @@ static int object_mode_set_exec(bContext *C, wmOperator *op) /* by default the operator assume is a mesh, but if gp object change mode */ if ((ob != NULL) && (ob->type == OB_GPENCIL) && (mode == OB_MODE_EDIT)) { - mode = OB_MODE_GPENCIL_EDIT; + mode = OB_MODE_EDIT_GPENCIL; } if (!ob || !ED_object_mode_compat_test(ob, mode)) diff --git a/source/blender/editors/object/object_modes.c b/source/blender/editors/object/object_modes.c index 4c625a4d33c..771bbc5c18c 100644 --- a/source/blender/editors/object/object_modes.c +++ b/source/blender/editors/object/object_modes.c @@ -74,13 +74,13 @@ static const char *object_mode_op_string(eObjectMode mode) return "PARTICLE_OT_particle_edit_toggle"; if (mode == OB_MODE_POSE) return "OBJECT_OT_posemode_toggle"; - if (mode == OB_MODE_GPENCIL_EDIT) + if (mode == OB_MODE_EDIT_GPENCIL) return "GPENCIL_OT_editmode_toggle"; - if (mode == OB_MODE_GPENCIL_PAINT) + if (mode == OB_MODE_PAINT_GPENCIL) return "GPENCIL_OT_paintmode_toggle"; - if (mode == OB_MODE_GPENCIL_SCULPT) + if (mode == OB_MODE_SCULPT_GPENCIL) return "GPENCIL_OT_sculptmode_toggle"; - if (mode == OB_MODE_GPENCIL_WEIGHT) + if (mode == OB_MODE_WEIGHT_GPENCIL) return "GPENCIL_OT_weightmode_toggle"; return NULL; } @@ -119,8 +119,8 @@ bool ED_object_mode_compat_test(const Object *ob, eObjectMode mode) return true; break; case OB_GPENCIL: - if (mode & (OB_MODE_EDIT | OB_MODE_GPENCIL_EDIT | OB_MODE_GPENCIL_PAINT | - OB_MODE_GPENCIL_SCULPT | OB_MODE_GPENCIL_WEIGHT)) + if (mode & (OB_MODE_EDIT | OB_MODE_EDIT_GPENCIL | OB_MODE_PAINT_GPENCIL | + OB_MODE_SCULPT_GPENCIL | OB_MODE_WEIGHT_GPENCIL)) { return true; } |