From 2d40b8d56ff100b71dac7c4694f6115dcc0b01b5 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Tue, 16 Jun 2009 13:09:36 +0000 Subject: 2.5 Added SpaceLogic, to restore the old logic buttons into. In future it can be used for a more advanced logic editor, with states, behaviour, whatever. We'll see! This commit only adds the backend for new space. Committed this now as reference for when we need another space type. It's still not well plugin-able (dynamic space types), but my idea is to just have a new SpacePlugIn for this, with a neat small API to define all relevant callbacks. Also note the icon for the spacetype is wrong still. --- source/blender/editors/mesh/editmesh_lib.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/blender/editors/mesh/editmesh_lib.c') diff --git a/source/blender/editors/mesh/editmesh_lib.c b/source/blender/editors/mesh/editmesh_lib.c index bfa381550df..e1b63022dd4 100644 --- a/source/blender/editors/mesh/editmesh_lib.c +++ b/source/blender/editors/mesh/editmesh_lib.c @@ -51,11 +51,13 @@ editmesh_lib: generic (no UI, no menus) operations/evaluators for editmesh data #include "BLI_editVert.h" #include "BKE_customdata.h" +#include "BKE_context.h" #include "BKE_global.h" #include "BKE_mesh.h" #include "BKE_utildefines.h" #include "ED_mesh.h" +#include "ED_screen.h" #include "ED_view3d.h" #include "mesh_intern.h" @@ -2278,3 +2280,10 @@ void EM_free_uv_vert_map(UvVertMap *vmap) } } +/* poll call for mesh operators requiring a view3d context */ +int EM_view3d_poll(bContext *C) +{ + if(ED_operator_editmesh(C) && ED_operator_view3d_active(C)) + return 1; + return 0; +} -- cgit v1.2.3