Bugfix #24524
authorTon Roosendaal <ton@blender.org>
Wed, 10 Nov 2010 18:00:51 +0000 (18:00 +0000)
committerTon Roosendaal <ton@blender.org>
Wed, 10 Nov 2010 18:00:51 +0000 (18:00 +0000)
Mesh loop tools allowed to be invoked outside 3d region (properties).
That caused crash, it needs 3d view code to work.

source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/mesh/loopcut.c

index d83f25299be1b78ec6a21d8c3ef663ebcbce0d02..c9934275f3fd088d87eb52cd50c4d55fbc5c5004 100644 (file)
@@ -2114,7 +2114,7 @@ void MESH_OT_loop_select(wmOperatorType *ot)
        
        /* api callbacks */
        ot->invoke= mesh_select_loop_invoke;
-       ot->poll= ED_operator_editmesh_view3d;
+       ot->poll= ED_operator_editmesh_region_view3d;
        
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -2220,7 +2220,7 @@ static int mesh_shortest_path_select_invoke(bContext *C, wmOperator *UNUSED(op),
 
 static int mesh_shortest_path_select_poll(bContext *C)
 {
-       if(ED_operator_editmesh_view3d(C)) {
+       if(ED_operator_editmesh_region_view3d(C)) {
                Object *obedit= CTX_data_edit_object(C);
                EditMesh *em= BKE_mesh_get_editmesh(obedit->data);
                return (em->selectmode & SCE_SELECT_EDGE);
@@ -2545,7 +2545,7 @@ void MESH_OT_select_linked_pick(wmOperatorType *ot)
        
        /* api callbacks */
        ot->invoke= select_linked_pick_invoke;
-       ot->poll= ED_operator_editmesh_view3d;
+       ot->poll= ED_operator_editmesh_region_view3d;
        
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
index e858867969748d628d03a1ac57c9db5386df8b4d..85faf00fef8a4baeec71f1e651fe3dbc1811b36b 100644 (file)
@@ -490,7 +490,7 @@ void MESH_OT_edgering_select (wmOperatorType *ot)
        
        /* callbacks */
        ot->invoke= ringsel_invoke;
-       ot->poll= ED_operator_editmesh_view3d;
+       ot->poll= ED_operator_editmesh_region_view3d; 
        
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -509,7 +509,7 @@ void MESH_OT_loopcut (wmOperatorType *ot)
        ot->invoke= ringcut_invoke;
        ot->modal= ringcut_modal;
        ot->cancel= ringcut_cancel;
-       ot->poll= ED_operator_editmesh_view3d;
+       ot->poll= ED_operator_editmesh_region_view3d;
        
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;