Revision: 36580
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36580
Author:   joeedh
Date:     2011-05-09 20:43:05 +0000 (Mon, 09 May 2011)
Log Message:
-----------
=bmesh= undo loopcut commit, for some reason the recent merge didn't catch it

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/editors/mesh/knifetool.c
    branches/bmesh/blender/source/blender/editors/mesh/loopcut.c
    branches/bmesh/blender/source/blender/editors/transform/transform.c
    branches/bmesh/blender/source/blender/editors/transform/transform_ops.c
    branches/bmesh/blender/source/blender/makesdna/DNA_windowmanager_types.h
    branches/bmesh/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: branches/bmesh/blender/source/blender/editors/mesh/knifetool.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/mesh/knifetool.c      
2011-05-09 20:14:34 UTC (rev 36579)
+++ branches/bmesh/blender/source/blender/editors/mesh/knifetool.c      
2011-05-09 20:43:05 UTC (rev 36580)
@@ -1707,6 +1707,8 @@
        kcd->vthresh = KMAXDIST-1;
        kcd->ethresh = KMAXDIST;
        
+       kcd->extend = 1;
+       
        knife_recalc_projmat(kcd);
        
        ED_region_tag_redraw(kcd->ar);
@@ -1825,7 +1827,11 @@
                        return OPERATOR_RUNNING_MODAL;
                        
                case EKEY:
-                       kcd->extend = event->val!=KM_RELEASE;
+                       kcd->extend = event->val==KM_RELEASE;
+                       if (event->val == KM_RELEASE) {
+                               knife_finish_cut(kcd);
+                               kcd->mode = MODE_IDLE;
+                       }
                        return OPERATOR_RUNNING_MODAL;
                case LEFTCTRLKEY:
                case RIGHTCTRLKEY:

Modified: branches/bmesh/blender/source/blender/editors/mesh/loopcut.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/mesh/loopcut.c        
2011-05-09 20:14:34 UTC (rev 36579)
+++ branches/bmesh/blender/source/blender/editors/mesh/loopcut.c        
2011-05-09 20:43:05 UTC (rev 36580)
@@ -104,9 +104,6 @@
 
        int extend;
        int do_cut;
-       
-       double leftmouse_time;
-       wmTimer *timer;
 } tringselOpData;
 
 /* modal loop selection drawing callback */
@@ -346,9 +343,6 @@
 {
        tringselOpData *lcd= op->customdata;
        
-       if (lcd->timer)
-               WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), 
lcd->timer);
-       
        /* deactivate the extra drawing stuff in 3D-View */
        ED_region_draw_cb_exit(lcd->ar->type, lcd->draw_handle);
        
@@ -431,10 +425,6 @@
        BMEdge *edge;
        int dist = 75;
 
-       /*if we're in the cut-n-slide macro, set release_confirm based on user 
pref*/
-       if (op->opm)
-               RNA_boolean_set(op->next->ptr, "release_confirm", 
U.loopcut_finish_on_release);
-       
        if(modifiers_isDeformedByLattice(obedit) || 
modifiers_isDeformedByArmature(obedit))
                BKE_report(op->reports, RPT_WARNING, "Loop cut doesn't work 
well on deformed edit mesh display");
        
@@ -470,7 +460,7 @@
        switch (event->type) {
                case RETKEY:
                case LEFTMOUSE: /* confirm */ // XXX hardcoded
-                       if (event->val == KM_RELEASE) {
+                       if (event->val == KM_PRESS) {
                                /* finish */
                                ED_region_tag_redraw(lcd->ar);
                                
@@ -479,24 +469,11 @@
                                
                                ED_area_headerprint(CTX_wm_area(C), NULL);
                                
-                               return OPERATOR_FINISHED|OPERATOR_ABORT_MACRO;
-                       } else {
-                               lcd->timer = 
WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER2, 0.12);
+                               return OPERATOR_FINISHED;
                        }
                        
                        ED_region_tag_redraw(lcd->ar);
                        break;
-               case TIMER2: 
-                       /* finish */
-                       ED_region_tag_redraw(lcd->ar);
-                       
-                       ringsel_finish(C, op);
-                       ringsel_exit(C, op);
-                       
-                       ED_area_headerprint(CTX_wm_area(C), NULL);
-
-                       return OPERATOR_FINISHED;
-               
                case RIGHTMOUSE: /* abort */ // XXX hardcoded
                        ED_region_tag_redraw(lcd->ar);
                        ringsel_exit(C, op);

Modified: branches/bmesh/blender/source/blender/editors/transform/transform.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/transform/transform.c 
2011-05-09 20:14:34 UTC (rev 36579)
+++ branches/bmesh/blender/source/blender/editors/transform/transform.c 
2011-05-09 20:43:05 UTC (rev 36580)
@@ -1525,8 +1525,6 @@
        t->mode = mode;
 
        t->launch_event = event ? event->type : -1;
-       if (RNA_property_is_set(op->ptr, "launch_event"))
-               t->launch_event = RNA_int_get(op->ptr, "launch_event");
 
        if (t->launch_event == EVT_TWEAK_R)
        {

Modified: 
branches/bmesh/blender/source/blender/editors/transform/transform_ops.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/transform/transform_ops.c     
2011-05-09 20:14:34 UTC (rev 36579)
+++ branches/bmesh/blender/source/blender/editors/transform/transform_ops.c     
2011-05-09 20:43:05 UTC (rev 36580)
@@ -499,8 +499,6 @@
        // Add confirm method all the time. At the end because it's not really 
that important and should be hidden only in log, not in keymap edit
        /*prop =*/ RNA_def_boolean(ot->srna, "release_confirm", 0, "Confirm on 
Release", "Always confirm operation when releasing button");
        //RNA_def_property_flag(prop, PROP_HIDDEN);
-
-       RNA_def_int(ot->srna, "launch_event", -1, 0, INT_MAX, "", "", -1, 
INT_MAX);
 }
 
 void TRANSFORM_OT_translate(struct wmOperatorType *ot)

Modified: 
branches/bmesh/blender/source/blender/makesdna/DNA_windowmanager_types.h
===================================================================
--- branches/bmesh/blender/source/blender/makesdna/DNA_windowmanager_types.h    
2011-05-09 20:14:34 UTC (rev 36579)
+++ branches/bmesh/blender/source/blender/makesdna/DNA_windowmanager_types.h    
2011-05-09 20:43:05 UTC (rev 36580)
@@ -313,7 +313,6 @@
 #define OPERATOR_PASS_THROUGH  8
 /* in case operator got executed outside WM code... like via fileselect */
 #define OPERATOR_HANDLED               16
-#define OPERATOR_ABORT_MACRO   32
 
 /* wmOperator flag */
 #define OP_GRAB_POINTER                        1

Modified: 
branches/bmesh/blender/source/blender/windowmanager/intern/wm_operators.c
===================================================================
--- branches/bmesh/blender/source/blender/windowmanager/intern/wm_operators.c   
2011-05-09 20:14:34 UTC (rev 36579)
+++ branches/bmesh/blender/source/blender/windowmanager/intern/wm_operators.c   
2011-05-09 20:43:05 UTC (rev 36580)
@@ -208,7 +208,7 @@
                if(opm->type->exec) {
                        retval= opm->type->exec(C, opm);
                
-                       if ((retval & OPERATOR_FINISHED) && !(retval & 
OPERATOR_ABORT_MACRO)) {
+                       if (retval & OPERATOR_FINISHED) {
                                MacroData *md = op->customdata;
                                md->retval = OPERATOR_FINISHED; /* keep in mind 
that at least one operator finished */
                        } else {
@@ -233,7 +233,7 @@
 
                BLI_movelisttolist(&op->reports->list, &opm->reports->list);
                
-               if ((retval & OPERATOR_FINISHED) && !(retval & 
OPERATOR_ABORT_MACRO)) {
+               if (retval & OPERATOR_FINISHED) {
                        MacroData *md = op->customdata;
                        md->retval = OPERATOR_FINISHED; /* keep in mind that at 
least one operator finished */
                } else {
@@ -261,7 +261,7 @@
                retval = opm->type->modal(C, opm, event);
 
                /* if this one is done but it's not the last operator in the 
macro */
-               if (opm->next && (retval & OPERATOR_FINISHED) && !(retval & 
OPERATOR_ABORT_MACRO)) {
+               if (opm->next && (retval & OPERATOR_FINISHED)) {
                        MacroData *md = op->customdata;
 
                        md->retval = OPERATOR_FINISHED; /* keep in mind that at 
least one operator finished */

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to