diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-09-14 23:12:29 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-09-14 23:12:29 +0400 |
commit | 725c30f6063354182628e4adbb563eadb4980222 (patch) | |
tree | fe6c74ba3b42cb1dadfc8707d914d6713b99eaac /source/blender/editors/object | |
parent | c6107e0c7602db46ee535542a205d1afcccaebfb (diff) |
2.5 Bugfixes
#19345: can't get out of grayed out pointer field.
#19342: item_pointerR fields can't be cleared with one item.
#19341: fix hanging tooltips when manipulating regions.
#19339: context panel still allowed tabbing, but it has no header.
#19334: editing SSS settings crashed previewrender.
#19330: object mode could not be switched on from the header menu.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_edit.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index e5a8df8cb26..c734a7c606d 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -1957,29 +1957,26 @@ static int object_mode_set_compat(bContext *C, wmOperator *op, Object *ob) ObjectMode mode = RNA_enum_get(op->ptr, "mode"); if(ob) { + if(mode == OB_MODE_OBJECT) + return 1; + switch(ob->type) { - case OB_EMPTY: - case OB_LAMP: - case OB_CAMERA: - if(mode & OB_MODE_OBJECT) - return 1; - return 0; case OB_MESH: - if(mode & ( OB_MODE_OBJECT|OB_MODE_EDIT|OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT|OB_MODE_PARTICLE_EDIT)) + if(mode & (OB_MODE_EDIT|OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT|OB_MODE_PARTICLE_EDIT)) return 1; return 0; case OB_CURVE: case OB_SURF: case OB_FONT: case OB_MBALL: - if(mode & (OB_MODE_OBJECT|OB_MODE_EDIT)) + if(mode & (OB_MODE_EDIT)) return 1; return 0; case OB_LATTICE: - if(mode & (OB_MODE_OBJECT|OB_MODE_EDIT|OB_MODE_WEIGHT_PAINT)) + if(mode & (OB_MODE_EDIT|OB_MODE_WEIGHT_PAINT)) return 1; case OB_ARMATURE: - if(mode & (OB_MODE_OBJECT|OB_MODE_EDIT|OB_MODE_POSE)) + if(mode & (OB_MODE_EDIT|OB_MODE_POSE)) return 1; } } @@ -2036,7 +2033,7 @@ void OBJECT_OT_mode_set(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - prop= RNA_def_enum(ot->srna, "mode", object_mode_items, 0, "Mode", ""); + prop= RNA_def_enum(ot->srna, "mode", object_mode_items, OB_MODE_OBJECT, "Mode", ""); RNA_def_enum_funcs(prop, object_mode_set_itemsf); RNA_def_boolean(ot->srna, "toggle", 0, "Toggle", ""); |