diff options
author | Sergej Reich <sergej.reich@googlemail.com> | 2013-10-13 15:41:41 +0400 |
---|---|---|
committer | Sergej Reich <sergej.reich@googlemail.com> | 2013-10-13 15:41:41 +0400 |
commit | 5d5176095e82b34499e15d74f1fb76d56f4d9508 (patch) | |
tree | dd8c61741160804873601f6b6350661132ac1b2f /source/blender/editors/object/object_edit.c | |
parent | bcbf976b48762c2f25df470c6d13a124bc868a66 (diff) | |
parent | 42ac7164e30dcca565253aa265201aad497e5360 (diff) |
svn merge -r60422:60726 ^/trunk/blender
Diffstat (limited to 'source/blender/editors/object/object_edit.c')
-rw-r--r-- | source/blender/editors/object/object_edit.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 96144d13519..bd4c2e997fe 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -1471,12 +1471,14 @@ static EnumPropertyItem *object_mode_set_itemsf(bContext *C, PointerRNA *UNUSED( ob = CTX_data_active_object(C); if (ob) { + const bool use_mode_particle_edit = (ob->particlesystem.first != NULL) || (ob->soft != NULL) || + (modifiers_findByType(ob, eModifierType_Cloth) != NULL); while (input->identifier) { if ((input->value == OB_MODE_EDIT && OB_TYPE_SUPPORT_EDITMODE(ob->type)) || (input->value == OB_MODE_POSE && (ob->type == OB_ARMATURE)) || - (input->value == OB_MODE_PARTICLE_EDIT && ob->particlesystem.first) || - ((input->value == OB_MODE_SCULPT || input->value == OB_MODE_VERTEX_PAINT || - input->value == OB_MODE_WEIGHT_PAINT || input->value == OB_MODE_TEXTURE_PAINT) && (ob->type == OB_MESH)) || + (input->value == OB_MODE_PARTICLE_EDIT && use_mode_particle_edit) || + (ELEM4(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_OBJECT)) { RNA_enum_item_add(&item, &totitem, input); |