From dfe7cde9f1a8dc90d6d77e2c1108bcb0e87eef82 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 7 Oct 2009 09:23:29 +0000 Subject: - rna path lookup crashed if the string was null (reported by Cessen with an empty driver) - added TexMesh access ([#19505] Missing option : TexMesh) - Ctrl+Tab works again, not-so-nice workaround, disallow switching to paint modes from editmode, but would be nicer to manage this with keymaps. --- source/blender/editors/object/object_edit.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/editors/object/object_edit.c') diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 54df3ae92da..268cd3b3542 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -1995,6 +1995,12 @@ static int object_mode_set_exec(bContext *C, wmOperator *op) if(!ob || !object_mode_set_compat(C, op, ob)) return OPERATOR_PASS_THROUGH; + /* Irritating workaround! disallow paint modes from editmode since a number of shortcuts conflict + * XXX - would be much better to handle this on a keymap level */ + if(ob->mode == OB_MODE_EDIT && ELEM6(mode, OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, OB_MODE_TEXTURE_PAINT, OB_MODE_PARTICLE_EDIT, OB_MODE_POSE)) { + return OPERATOR_PASS_THROUGH; + } + /* Exit current mode if it's not the mode we're setting */ if(ob->mode != OB_MODE_OBJECT && ob->mode != mode) WM_operator_name_call(C, object_mode_op_string(ob->mode), WM_OP_EXEC_REGION_WIN, NULL); -- cgit v1.2.3