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:
authorTon Roosendaal <ton@blender.org>2009-06-16 17:09:36 +0400
committerTon Roosendaal <ton@blender.org>2009-06-16 17:09:36 +0400
commit2d40b8d56ff100b71dac7c4694f6115dcc0b01b5 (patch)
treee6ad74b116dccf3442290ba4a76bd314729bce6b /source/blender/editors/mesh/editmesh_lib.c
parent7d026421142306dee486628bd15d4f5aa2b77481 (diff)
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.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_lib.c')
-rw-r--r--source/blender/editors/mesh/editmesh_lib.c9
1 files changed, 9 insertions, 0 deletions
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;
+}