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:
Diffstat (limited to 'source/blender/editors/object/object_edit.c')
-rw-r--r--source/blender/editors/object/object_edit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 3499a3cc364..e469b575c17 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -1521,6 +1521,7 @@ static EnumPropertyItem *object_mode_set_itemsf(bContext *C, PointerRNA *UNUSED(
(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)) ||
+ (input->value == OB_MODE_HAIR_EDIT) || /* XXX always on, testing for strand data is a bit involved */
(input->value == OB_MODE_OBJECT))
{
RNA_enum_item_add(&item, &totitem, input);
@@ -1554,6 +1555,8 @@ static const char *object_mode_op_string(int mode)
return "PAINT_OT_texture_paint_toggle";
if (mode == OB_MODE_PARTICLE_EDIT)
return "PARTICLE_OT_particle_edit_toggle";
+ if (mode == OB_MODE_HAIR_EDIT)
+ return "HAIR_OT_hair_edit_toggle";
if (mode == OB_MODE_POSE)
return "OBJECT_OT_posemode_toggle";
return NULL;
@@ -1567,6 +1570,9 @@ static bool object_mode_compat_test(Object *ob, ObjectMode mode)
if (ob) {
if (mode == OB_MODE_OBJECT)
return true;
+ /* XXX this is not nice, but testing for cached strands data + shape keys is a bit complicated */
+ if (mode == OB_MODE_HAIR_EDIT)
+ return true;
switch (ob->type) {
case OB_MESH: