sculpt mode ndof transforms.
authorJean-Luc Peurière <jlp@nerim.net>
Thu, 16 Aug 2007 22:00:29 +0000 (22:00 +0000)
committerJean-Luc Peurière <jlp@nerim.net>
Thu, 16 Aug 2007 22:00:29 +0000 (22:00 +0000)
please test, especially with multires conditions

intern/ghost/intern/GHOST_SystemCarbon.cpp
source/blender/src/space.c
source/blender/src/transform.c

index 756de42f227d519be31be04ec3d64f37d9cf08d8..7f1a2467d1a83b384739b92498c9f5a7e2e5828e 100644 (file)
@@ -486,7 +486,9 @@ bool GHOST_SystemCarbon::processEvents(bool waitForEvent)
                                         * are, but we get a lot of them
                                         */
                                if (i!='cgs ') {
-                                       printf("Missed - Class: '%.4s', Kind: %d\n", &i, ::GetEventKind(event));
+                                       if (i!='tblt') {  // tablet event. we use the one packaged in the mouse event
+                                               printf("Missed - Class: '%.4s', Kind: %d\n", &i, ::GetEventKind(event));
+                                       }
                                }
                        }
                        ::ReleaseEvent(event);
index 6250061f94cd570966304d935154a94140cfe486..31f458085db5dc35ed82d72794c5a3756adc2d7c 100644 (file)
@@ -1476,6 +1476,31 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
                                do_layer_buttons(11); break;
                        case ACCENTGRAVEKEY:
                                do_layer_buttons(-1); break;
+                       
+                       case NDOFMOTION:                
+                               if (G.vd->ndofmode == 0) {
+                                       viewmoveNDOF(1);
+                               } else if (G.vd->ndofmode == 1) {
+                                       viewmoveNDOFfly(1);
+                               } else {
+                                       if (OBACT) {
+                                               ndof_transform();
+                                       }
+                               }
+                break;
+                               
+            case NDOFBUTTON:
+                               if (val == 1) {
+                                       G.vd->ndofmode +=1;
+                                       if (G.vd->ndofmode > 2)         /* we have currently 3 modes : 0 original, 1 fly, 2 transform */
+                                               G.vd->ndofmode = 0;
+                               }
+                               if (val == 2) {
+                                       G.vd->ndoffilter =(G.vd->ndoffilter == 1 ? 0 : 1);
+                               }
+                               allqueue(REDRAWHEADERS, 0);
+                break;
+                               
                        }
                        
                        /* Redraw buttons window as well as view 3d (for floating panel) */
@@ -1577,7 +1602,6 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
                                                ndof_transform();
                                        }
                                }
-                                       
                 break;
 
             case NDOFBUTTON:
index d8bd30796f200c05b8aebff6e3cbe35d3cece1ca..e6ee597db29466f2aa2dfa1327487ba6fddc9d61 100755 (executable)
@@ -3184,13 +3184,7 @@ void ndof_do_transform(float *fval)
                special_aftertrans_update(&Trans);
                
        }
-       
-
-       
-       if (change) {   
-               ;
-       }
-               
+                       
                /* send events out for redraws */
                viewRedrawPost(&Trans);