[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25154] trunk/blender/source/blender/ editors: Loop cut and edge ring select only have an invoke and require view3d, so change poll function to reflect that (and not, you know, crash...).

Martin Poirier theeth at yahoo.com
Sun Dec 6 18:38:39 CET 2009


Revision: 25154
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25154
Author:   theeth
Date:     2009-12-06 18:38:39 +0100 (Sun, 06 Dec 2009)

Log Message:
-----------
Loop cut and edge ring select only have an invoke and require view3d, so change poll function to reflect that (and not, you know, crash...).

Modified Paths:
--------------
    trunk/blender/source/blender/editors/include/ED_screen.h
    trunk/blender/source/blender/editors/mesh/loopcut.c
    trunk/blender/source/blender/editors/screen/screen_ops.c

Modified: trunk/blender/source/blender/editors/include/ED_screen.h
===================================================================
--- trunk/blender/source/blender/editors/include/ED_screen.h	2009-12-06 17:36:27 UTC (rev 25153)
+++ trunk/blender/source/blender/editors/include/ED_screen.h	2009-12-06 17:38:39 UTC (rev 25154)
@@ -134,6 +134,7 @@
 int		ED_operator_object_active(struct bContext *C);
 int		ED_operator_object_active_editable(struct bContext *C);
 int		ED_operator_editmesh(struct bContext *C);
+int		ED_operator_editmesh_view3d(struct bContext *C);
 int		ED_operator_editarmature(struct bContext *C);
 int		ED_operator_editcurve(struct bContext *C);
 int		ED_operator_editsurf(struct bContext *C);

Modified: trunk/blender/source/blender/editors/mesh/loopcut.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/loopcut.c	2009-12-06 17:36:27 UTC (rev 25153)
+++ trunk/blender/source/blender/editors/mesh/loopcut.c	2009-12-06 17:38:39 UTC (rev 25154)
@@ -455,7 +455,7 @@
 	ot->invoke= ringsel_invoke;
 	ot->modal= ringsel_modal;
 	ot->cancel= ringsel_cancel;
-	ot->poll= ED_operator_editmesh;
+	ot->poll= ED_operator_editmesh_view3d;
 	
 	/* flags */
 	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -474,7 +474,7 @@
 	ot->invoke= ringcut_invoke;
 	ot->modal= ringsel_modal;
 	ot->cancel= ringsel_cancel;
-	ot->poll= ED_operator_editmesh;
+	ot->poll= ED_operator_editmesh_view3d;
 	
 	/* flags */
 	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;

Modified: trunk/blender/source/blender/editors/screen/screen_ops.c
===================================================================
--- trunk/blender/source/blender/editors/screen/screen_ops.c	2009-12-06 17:36:27 UTC (rev 25153)
+++ trunk/blender/source/blender/editors/screen/screen_ops.c	2009-12-06 17:38:39 UTC (rev 25154)
@@ -232,6 +232,11 @@
 	return 0;
 }
 
+int ED_operator_editmesh_view3d(bContext *C)
+{
+	return ED_operator_editmesh(C) && ED_operator_view3d_active(C);
+}
+
 int ED_operator_editarmature(bContext *C)
 {
 	Object *obedit= CTX_data_edit_object(C);





More information about the Bf-blender-cvs mailing list