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:
authorNicholas Bishop <nicholasbishop@gmail.com>2009-08-17 21:26:58 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2009-08-17 21:26:58 +0400
commitb0508659f650bce8ed7e7142aa362088c6597d62 (patch)
tree3a4a7be894056573ff279ae7656deb1b14f3392e /source/blender/editors
parentf3caa80a49fc1978e04915d663be540390180791 (diff)
2.5 editmode:
* Added a poll to the editmode operator that checks first that the object is an editable type (no more tabkey on camera, bug reported by DingTo)
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/object/object_edit.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index d4f2493be2b..f8d969d2462 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -3859,6 +3859,16 @@ static int editmode_toggle_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
+static int editmode_toggle_poll(bContext *C)
+{
+ Object *ob = CTX_data_active_object(C);
+
+ return ob && (ob->type == OB_MESH || ob->type == OB_ARMATURE ||
+ ob->type == OB_FONT || ob->type == OB_MBALL ||
+ ob->type == OB_LATTICE || ob->type == OB_SURF ||
+ ob->type == OB_CURVE);
+}
+
void OBJECT_OT_editmode_toggle(wmOperatorType *ot)
{
@@ -3870,7 +3880,7 @@ void OBJECT_OT_editmode_toggle(wmOperatorType *ot)
/* api callbacks */
ot->exec= editmode_toggle_exec;
- ot->poll= ED_operator_object_active;
+ ot->poll= editmode_toggle_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;