- modal keymap for border select
[blender-staging.git] / source / blender / editors / space_node / node_select.c
index ecbd46b720f4dd01e9855444af1cf279c50369c3..e082f3797c18cf92d4b4b9482071fece70cf2c64 100644 (file)
@@ -244,9 +244,7 @@ static int node_borderselect_exec(bContext *C, wmOperator *op)
        bNode *node;
        rcti rect;
        rctf rectf;
-       short val;
-       
-       val= RNA_int_get(op->ptr, "event_type");
+       int gesture_mode= RNA_int_get(op->ptr, "gesture_mode");
        
        rect.xmin= RNA_int_get(op->ptr, "xmin");
        rect.ymin= RNA_int_get(op->ptr, "ymin");
@@ -261,7 +259,7 @@ static int node_borderselect_exec(bContext *C, wmOperator *op)
 
        for(node= snode->edittree->nodes.first; node; node= node->next) {
                if(BLI_isect_rctf(&rectf, &node->totr, NULL)) {
-                       if(val==NODE_EXTEND)
+                       if(gesture_mode==GESTURE_MODAL_SELECT)
                                node->flag |= SELECT;
                        else
                                node->flag &= ~SELECT;
@@ -290,11 +288,7 @@ void NODE_OT_select_border(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* rna */
-       RNA_def_int(ot->srna, "event_type", 0, INT_MIN, INT_MAX, "Event Type", "", INT_MIN, INT_MAX);
-       RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX);
-       RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX);
-       RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX);
-       RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX);
+       WM_operator_properties_gesture_border(ot, FALSE);
 }
 
 /* ****** Select/Deselect All ****** */