Normand Briere
2019-06-03 e24558ddeacfc945b9e9ba0a32b552d04e2ed4dd
CameraPane.java
....@@ -56,8 +56,6 @@
5656 static int CURRENTANTIALIAS = 0; // 1;
5757 /*static*/ boolean RENDERSHADOW = true;
5858 /*static*/ int RENDERPROGRAM = 2; // 0 == none, 1 == fast, 2 == normal
59
- static boolean ANIMATION = false;
60
- static String filename;
6159
6260 boolean DISPLAYTEXT = false;
6361 //boolean REDUCETEXTURE = true;
....@@ -92,6 +90,8 @@
9290
9391 static int tickcount = 0; // slow pose issue
9492
93
+static boolean BUTTONLESSWHEEL = false;
94
+static boolean ZOOMBOXMODE = false;
9595 static boolean BOXMODE = false;
9696 static boolean IMAGEFLIP = false;
9797 static boolean SMOOTHFOCUS = false;
....@@ -106,7 +106,7 @@
106106 static boolean OEIL = true;
107107 static boolean OEILONCE = false; // do oeilon then oeiloff
108108 static boolean LOOKAT = true;
109
-static boolean RANDOM = true; // false;
109
+static boolean SWITCH = true; // false;
110110 static boolean HANDLES = false; // selection doesn't work!!
111111 static boolean PAINTMODE = false;
112112
....@@ -223,6 +223,11 @@
223223 public boolean IsBoxMode()
224224 {
225225 return BOXMODE;
226
+ }
227
+
228
+ public boolean IsZoomBoxMode()
229
+ {
230
+ return ZOOMBOXMODE;
226231 }
227232
228233 public void ClearDepth()
....@@ -1612,18 +1617,18 @@
16121617 //col.getColorComponents(ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB), CameraPane.modelParams0);
16131618 if (!material.multiply)
16141619 {
1615
- display.color = color;
1620
+ display.color = material.color;
16161621 display.saturation = material.modulation;
16171622 }
16181623 else
16191624 {
1620
- display.color *= color*2;
1625
+ display.color *= material.color*2;
16211626 display.saturation *= material.modulation*2;
16221627 }
16231628
16241629 cColor.HSBtoRGB(display.color, display.saturation, 1, display.modelParams0);
16251630
1626
- float[] colorV = GrafreeD.colorV;
1631
+ float[] colorV = Grafreed.colorV;
16271632
16281633 /**/
16291634 if (display.DrawMode() == display.DEFAULT) // && display.RENDERPROGRAM == 0)
....@@ -2135,7 +2140,7 @@
21352140 System.err.println("LIVE = " + Globals.isLIVE());
21362141
21372142 if (!Globals.isLIVE()) // save sound
2138
- GrafreeD.savesound = true; // wav.save();
2143
+ Grafreed.savesound = true; // wav.save();
21392144 // else
21402145 repaint(); // start loop // may 2013
21412146 }
....@@ -2168,6 +2173,11 @@
21682173 public void ToggleBoxMode()
21692174 {
21702175 BOXMODE ^= true;
2176
+ }
2177
+
2178
+ public void ToggleZoomBoxMode()
2179
+ {
2180
+ ZOOMBOXMODE ^= true;
21712181 }
21722182
21732183 public void ToggleSmoothFocus()
....@@ -2257,7 +2267,7 @@
22572267
22582268 void ToggleRandom()
22592269 {
2260
- RANDOM ^= true;
2270
+ SWITCH ^= true;
22612271 }
22622272
22632273 void ToggleHandles()
....@@ -4196,6 +4206,7 @@
41964206
41974207 com.sun.opengl.util.texture.Texture CompressTexture2(String name)
41984208 {
4209
+ new Exception().printStackTrace();
41994210 System.exit(0);
42004211 com.sun.opengl.util.texture.Texture texture = null;
42014212
....@@ -8011,7 +8022,7 @@
80118022 }
80128023 }
80138024
8014
- /*boolean*/ public void BindTextures(cTexture tex, int resolution) // INTERFACE
8025
+ /*boolean*/ public void BindTextures(cTexture tex, int resolution) throws Exception // INTERFACE
80158026 {
80168027 if (// DrawMode() != 0 || /*tex == null ||*/
80178028 ambientOcclusion ) // || !textureon)
....@@ -8056,7 +8067,7 @@
80568067 return; // true;
80578068 }
80588069
8059
- CacheTexture GetCacheTexture(String tex, boolean bump, int resolution)
8070
+ CacheTexture GetCacheTexture(String tex, boolean bump, int resolution) throws Exception
80608071 {
80618072 CacheTexture/*com.sun.opengl.util.texture.Texture*/ texture = null;
80628073
....@@ -8064,12 +8075,16 @@
80648075 {
80658076 String texname = tex;
80668077
8067
- String[] split = tex.split("Textures");
8068
- if (split.length > 1)
8069
- texname = "/Users/nbriere/Textures" + split[split.length-1];
8070
- else
8071
- if (!texname.startsWith("/"))
8072
- texname = "/Users/nbriere/Textures/" + texname;
8078
+// String[] split = tex.split("Textures");
8079
+// if (split.length > 1)
8080
+// texname = "/Users/nbriere/Textures" + split[split.length-1];
8081
+// else
8082
+// if (!texname.startsWith("/"))
8083
+// texname = "/Users/nbriere/Textures/" + texname;
8084
+ if (!new File(tex).exists())
8085
+ {
8086
+ texname = javax.swing.filechooser.FileSystemView.getFileSystemView().getDefaultDirectory() + "/Textures/" + texname;
8087
+ }
80738088
80748089 if (CACHETEXTURE)
80758090 texture = textures.get(texname); // TEXTURE CACHE
....@@ -8169,7 +8184,9 @@
81698184 texturedata = GetFileTexture(cachename, processbump, resolution);
81708185
81718186
8172
- if (texturedata != null)
8187
+ if (texturedata == null)
8188
+ throw new Exception();
8189
+
81738190 texture = new CacheTexture(com.sun.opengl.util.texture.TextureIO.newTexture(texturedata),resolution);
81748191 //texture = GetTexture(tex, bump);
81758192 }
....@@ -8291,7 +8308,7 @@
82918308 return texture;
82928309 }
82938310
8294
- com.sun.opengl.util.texture.Texture GetTexture(String tex, boolean bump, int resolution)
8311
+ com.sun.opengl.util.texture.Texture GetTexture(String tex, boolean bump, int resolution) throws Exception
82958312 {
82968313 CacheTexture texture = GetCacheTexture(tex, bump, resolution);
82978314
....@@ -8309,14 +8326,14 @@
83098326 return texture!=null?texture.texture:null;
83108327 }
83118328
8312
- public com.sun.opengl.util.texture.TextureData GetTextureData(String tex, boolean bump, int resolution)
8329
+ public com.sun.opengl.util.texture.TextureData GetTextureData(String tex, boolean bump, int resolution) throws Exception
83138330 {
83148331 CacheTexture texture = GetCacheTexture(tex, bump, resolution);
83158332
83168333 return texture!=null?texture.texturedata:null;
83178334 }
83188335
8319
- boolean BindTexture(String tex, boolean bump, int resolution)
8336
+ boolean BindTexture(String tex, boolean bump, int resolution) throws Exception
83208337 {
83218338 if (/*tex == null ||*/ ambientOcclusion ) // || !textureon)
83228339 {
....@@ -9382,7 +9399,7 @@
93829399 //gl.glFlush();
93839400 gl.glAccum(gl.GL_ACCUM, 1.0f / ACSIZE);
93849401
9385
- if (ANIMATION && ABORTED)
9402
+ if (Globals.ANIMATION && ABORTED)
93869403 {
93879404 System.err.println(" ABORTED FRAME");
93889405 break;
....@@ -9412,7 +9429,7 @@
94129429 setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
94139430
94149431 // save image
9415
- if (ANIMATION && !ABORTED)
9432
+ if (Globals.ANIMATION && !ABORTED)
94169433 {
94179434 VPwidth = viewport[2];
94189435 VPheight = viewport[3];
....@@ -9523,11 +9540,11 @@
95239540
95249541 // imagecount++;
95259542
9526
- String fullname = filename + (i%100000)/10000 + "" + (i%10000)/1000 + "" + (i%1000)/100 + "" + (i%100)/10 + "" + (i%10) + "." + ext;
9543
+ String fullname = Globals.filename + (i%100000)/10000 + "" + (i%10000)/1000 + "" + (i%1000)/100 + "" + (i%100)/10 + "" + (i%10) + "." + ext;
95279544
95289545 if (!BOXMODE)
95299546 {
9530
- System.out.println("image: " + fullname + " (wav cursor=" + (GrafreeD.wav.cursor / 735 / 4) + ")");
9547
+ System.out.println("image: " + fullname + " (wav cursor=" + (Grafreed.wav.cursor / 735 / 4) + ")");
95319548 }
95329549
95339550 if (!BOXMODE)
....@@ -9565,7 +9582,7 @@
95659582 ABORTED = false;
95669583 }
95679584 else
9568
- GrafreeD.wav.cursor += 735 * ACSIZE;
9585
+ Grafreed.wav.cursor += 735 * ACSIZE;
95699586
95709587 if (false)
95719588 {
....@@ -10228,11 +10245,11 @@
1022810245
1022910246 public void display(GLAutoDrawable drawable)
1023010247 {
10231
- if (GrafreeD.savesound && GrafreeD.hassound)
10248
+ if (Grafreed.savesound && Grafreed.hassound)
1023210249 {
10233
- GrafreeD.wav.save();
10234
- GrafreeD.savesound = false;
10235
- GrafreeD.hassound = false;
10250
+ Grafreed.wav.save();
10251
+ Grafreed.savesound = false;
10252
+ Grafreed.hassound = false;
1023610253 }
1023710254 // if (DEBUG_SELECTION)
1023810255 // {
....@@ -10362,7 +10379,7 @@
1036210379 Object3D theobject = object;
1036310380 Object3D theparent = object.parent;
1036410381 object.parent = null;
10365
- object = (Object3D)GrafreeD.clone(object);
10382
+ object = (Object3D)Grafreed.clone(object);
1036610383 object.Stripify();
1036710384 if (theobject.selection == null || theobject.selection.Size() == 0)
1036810385 theobject.PreprocessOcclusion(this);
....@@ -10783,7 +10800,16 @@
1078310800 // Bump noise
1078410801 gl.glActiveTexture(GL.GL_TEXTURE6);
1078510802 //gl.glBindTexture(GL.GL_TEXTURE_2D, bump_noise);
10786
- BindTexture(NOISE_TEXTURE, false, 2);
10803
+
10804
+ try
10805
+ {
10806
+ BindTexture(NOISE_TEXTURE, false, 2);
10807
+ }
10808
+ catch (Exception e)
10809
+ {
10810
+ System.err.println("FAILED: " + NOISE_TEXTURE);
10811
+ }
10812
+
1078710813
1078810814 gl.glActiveTexture(GL.GL_TEXTURE0);
1078910815 gl.glEnable(GL.GL_TEXTURE_2D);
....@@ -11247,8 +11273,14 @@
1124711273 {
1124811274 renderpass++;
1124911275 // System.out.println("Draw object... ");
11276
+ STEP = 1;
1125011277 if (FAST) // in case there is no script
11251
- STEP = 16;
11278
+ STEP = 8;
11279
+
11280
+ if (CURRENTANTIALIAS == 0 || ACSIZE == 1)
11281
+ {
11282
+ STEP *= 4;
11283
+ }
1125211284
1125311285 //object.FullInvariants();
1125411286
....@@ -11262,8 +11294,8 @@
1126211294 e.printStackTrace();
1126311295 }
1126411296
11265
- if (GrafreeD.RENDERME > 0)
11266
- GrafreeD.RENDERME--; // mechante magouille
11297
+ if (Grafreed.RENDERME > 0)
11298
+ Grafreed.RENDERME--; // mechante magouille
1126711299
1126811300 Globals.ONESTEP = false;
1126911301 }
....@@ -11333,7 +11365,14 @@
1133311365
1133411366 usedtextures.clear();
1133511367
11336
- BindTextures(DEFAULT_TEXTURES, 2);
11368
+ try
11369
+ {
11370
+ BindTextures(DEFAULT_TEXTURES, 2);
11371
+ }
11372
+ catch (Exception e)
11373
+ {
11374
+ System.err.println("FAILED: " + DEFAULT_TEXTURES);
11375
+ }
1133711376 }
1133811377 //System.out.println("--> " + stackdepth);
1133911378 // GrafreeD.traceon();
....@@ -11424,7 +11463,14 @@
1142411463 if (checker != null && DrawMode() == DEFAULT)
1142511464 {
1142611465 //BindTexture(IMMORTAL_TEXTURE);
11427
- BindTextures(checker.GetTextures(), checker.texres);
11466
+ try
11467
+ {
11468
+ BindTextures(checker.GetTextures(), checker.texres);
11469
+ }
11470
+ catch (Exception e)
11471
+ {
11472
+ System.err.println("FAILED: " + checker.GetTextures());
11473
+ }
1142811474 // NEAREST
1142911475 GetGL().glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST); // GL.GL_LINEAR);
1143011476 DrawChecker(gl);
....@@ -12586,8 +12632,10 @@
1258612632 "MAX ndotl.x, ndotl.x, -ndotl.x;" +
1258712633
1258812634 "SUB temp.x, one.x, ndotl.x;" +
12589
- "ADD temp.x, temp.x, options2.z;" + // lightsheen
12590
- "ADD temp.y, one.y, options2.y;" + // sursurface
12635
+ // Tuning for default skin
12636
+ //"ADD temp.x, temp.x, options2.z;" + // lightsheen
12637
+ "MAD temp.x, options2.z, half.y, temp.x;" + // lightsheen
12638
+ "ADD temp.y, one.y, options2.y;" + // subsurface
1259112639 "MUL temp.x, temp.x, temp.y;" +
1259212640
1259312641 "MUL saturation, saturation, temp.xxxx;" +
....@@ -13496,7 +13544,7 @@
1349613544 public void mousePressed(MouseEvent e)
1349713545 {
1349813546 //System.out.println("mousePressed: " + e);
13499
- clickStart(e.getX(), e.getY(), e.getModifiersEx());
13547
+ clickStart(e.getX(), e.getY(), e.getModifiers(), e.getModifiersEx());
1350013548 }
1350113549
1350213550 static long prevtime = 0;
....@@ -13523,6 +13571,7 @@
1352313571
1352413572 //System.err.println("Dtime = " + Dtime + "; units = " + e.getUnitsToScroll() + "; ratio (units/ms) = " + ratio);
1352513573
13574
+ if (BUTTONLESSWHEEL)
1352613575 if (Math.abs(ratio) < 0.1 || Math.abs(Dtime) == 0) // < 30)
1352713576 {
1352813577 return;
....@@ -13531,7 +13580,7 @@
1353113580 boolean capsLocked = Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK);
1353213581
1353313582 // TIMER
13534
- if (!wheeltimer.isRunning() && e.getModifiersEx() == 0 && !capsLocked) // VR
13583
+ if (ZOOMBOXMODE && !wheeltimer.isRunning() && e.getModifiersEx() == 0 && !capsLocked) // VR
1353513584 {
1353613585 keepboxmode = BOXMODE;
1353713586 keepsupport = SUPPORT;
....@@ -13571,8 +13620,8 @@
1357113620 // mode |= META;
1357213621 //}
1357313622
13574
- SetMouseMode(WHEEL | e.getModifiersEx());
13575
- drag(anchorX, anchorY + e.getUnitsToScroll()*8, 0);
13623
+ SetMouseMode(e.getModifiers(), WHEEL | e.getModifiersEx());
13624
+ drag(anchorX, anchorY + e.getUnitsToScroll()*8, 0, 0);
1357613625 anchorX = ax;
1357713626 anchorY = ay;
1357813627 prevX = px;
....@@ -13632,6 +13681,10 @@
1363213681 // wasliveok = true;
1363313682 // waslive = false;
1363413683
13684
+ // May 2019 Forget it:
13685
+ if (true)
13686
+ return;
13687
+
1363513688 // source == timer
1363613689 if (mouseDown)
1363713690 {
....@@ -13670,7 +13723,7 @@
1367013723
1367113724 javax.swing.Timer timer = new javax.swing.Timer(350, this);
1367213725
13673
- void clickStart(int x, int y, int modifiers)
13726
+ void clickStart(int x, int y, int modifiers, int modifiersex)
1367413727 {
1367513728 if (!wasliveok)
1367613729 return;
....@@ -13687,7 +13740,7 @@
1368713740 // touched = true; // main DL
1368813741 if (isRenderer)
1368913742 {
13690
- SetMouseMode(modifiers);
13743
+ SetMouseMode(modifiers, modifiersex);
1369113744 }
1369213745
1369313746 selectX = anchorX = x;
....@@ -13700,7 +13753,7 @@
1370013753 clicked = true;
1370113754 hold = false;
1370213755
13703
- if (((modifiers & ~1024) & ~0) == 0) // Single or multiple selection
13756
+ if (((modifiersex & ~1024) & ~0) == 0) // Single or multiple selection
1370413757 // june 2013 means CTRL_CLICK: if (((modifiers & ~1024) & ~128) == 0) // Single or multiple selection
1370513758 {
1370613759 // System.out.println("RESTART II " + modifiers);
....@@ -13731,7 +13784,7 @@
1373113784 info.camera = renderCamera;
1373213785 info.x = x;
1373313786 info.y = y;
13734
- info.modifiers = modifiers;
13787
+ info.modifiers = modifiersex;
1373513788 editObj = object.doEditClick(info, 0);
1373613789 if (!editObj)
1373713790 {
....@@ -13748,11 +13801,11 @@
1374813801
1374913802 public void mouseDragged(MouseEvent e)
1375013803 {
13804
+ //System.out.println("mouseDragged: " + e);
1375113805 if (isRenderer)
1375213806 movingcamera = true;
1375313807 //if (drawing)
1375413808 //return;
13755
- //System.out.println("mouseDragged: " + e);
1375613809 if ((e.getModifiersEx() & CTRL) != 0
1375713810 || (e.getModifiersEx() & COMMAND) != 0) // || IsFrozen())
1375813811 {
....@@ -13760,7 +13813,7 @@
1376013813 clickEnd(e.getX(), e.getY(), e.getModifiersEx());
1376113814 }
1376213815 else
13763
- drag(e.getX(), e.getY(), e.getModifiersEx());
13816
+ drag(e.getX(), e.getY(), e.getModifiers(), e.getModifiersEx());
1376413817
1376513818 //try { Thread.sleep(1); } catch (Exception ex) {}
1376613819 }
....@@ -13933,6 +13986,7 @@
1393313986
1393413987 public void run()
1393513988 {
13989
+ new Exception().printStackTrace();
1393613990 System.exit(0);
1393713991 for (;;)
1393813992 {
....@@ -13996,7 +14050,7 @@
1399614050 {
1399714051 Globals.lighttouched = true;
1399814052 }
13999
- drag(X, (mouseMode != 0) ? Y : anchorY, MODIFIERS);
14053
+ drag(X, (mouseMode != 0) ? Y : anchorY, 0, MODIFIERS);
1400014054 }
1400114055 //else
1400214056 }
....@@ -14096,7 +14150,7 @@
1409614150 int X, Y;
1409714151 boolean SX, SY;
1409814152
14099
- void drag(int x, int y, int modifiers)
14153
+ void drag(int x, int y, int modifiers, int modifiersex)
1410014154 {
1410114155 if (IsFrozen())
1410214156 {
....@@ -14105,17 +14159,17 @@
1410514159
1410614160 drag = true; // NEW
1410714161
14108
- boolean continuous = (modifiers & COMMAND) == COMMAND;
14162
+ boolean continuous = (modifiersex & COMMAND) == COMMAND;
1410914163
1411014164 X = x;
1411114165 Y = y;
1411214166 // floating state for animation
14113
- MODIFIERS = modifiers;
14114
- modifiers &= ~1024;
14167
+ MODIFIERS = modifiersex;
14168
+ modifiersex &= ~1024;
1411514169 if (false) // modifiers != 0)
1411614170 {
1411714171 //new Exception().printStackTrace();
14118
- System.out.println("mouseDragged: " + modifiers);
14172
+ System.out.println("mouseDragged: " + modifiersex);
1411914173 System.out.println("SHIFT = " + SHIFT);
1412014174 System.out.println("CONTROL = " + COMMAND);
1412114175 System.out.println("META = " + META);
....@@ -14135,7 +14189,7 @@
1413514189 info.camera = renderCamera;
1413614190 info.x = x;
1413714191 info.y = y;
14138
- object.editWindow.copy.doEditDrag(info);
14192
+ object.editWindow.copy.doEditDrag(info, (modifiers & MouseEvent.BUTTON3_MASK) != 0);
1413914193 } else
1414014194 {
1414114195 if (x < startX)
....@@ -14287,7 +14341,6 @@
1428714341 public void mouseMoved(MouseEvent e)
1428814342 {
1428914343 //System.out.println("mouseMoved: " + e);
14290
-
1429114344 if (isRenderer)
1429214345 return;
1429314346
....@@ -14335,9 +14388,9 @@
1433514388 boolean control = ((modifiers & CTRL) != 0); // june 2013: for point selection
1433614389 boolean command = ((modifiers & COMMAND) != 0); // june 2013: for multiple selection
1433714390
14338
- if (control || command || IsFrozen())
14391
+// No delay if (control || command || IsFrozen())
1433914392 timeout = true;
14340
- else
14393
+// ?? May 2019 else
1434114394 // timer.setDelay((modifiers & 128) != 0?0:350);
1434214395 mouseDown = false;
1434314396 if (!control && !command) // june 2013
....@@ -14447,7 +14500,7 @@
1444714500 System.out.println("keyReleased: " + e);
1444814501 }
1444914502
14450
- void SetMouseMode(int modifiers)
14503
+ void SetMouseMode(int modifiers, int modifiersex)
1445114504 {
1445214505 //System.out.println("SetMouseMode = " + modifiers);
1445314506 //modifiers &= ~1024;
....@@ -14459,25 +14512,25 @@
1445914512 //if (modifiers == 0) // || (modifiers == (1024 | CONTROL)))
1446014513 // return;
1446114514 //System.out.println("SetMode = " + modifiers);
14462
- if ((modifiers & WHEEL) == WHEEL)
14515
+ if ((modifiersex & WHEEL) == WHEEL)
1446314516 {
1446414517 mouseMode |= ZOOM;
1446514518 }
1446614519
1446714520 boolean capsLocked = Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK);
14468
- if (capsLocked || (modifiers & META) == META)
14521
+ if (capsLocked) // || (modifiers & META) == META)
1446914522 {
1447014523 mouseMode |= VR; // BACKFORTH;
1447114524 }
14472
- if ((modifiers & CTRLCLICK) == CTRLCLICK)
14525
+ if ((modifiersex & CTRLCLICK) == CTRLCLICK)
1447314526 {
1447414527 mouseMode |= SELECT;
1447514528 }
14476
- if ((modifiers & COMMAND) == COMMAND)
14529
+ if ((modifiersex & COMMAND) == COMMAND)
1447714530 {
1447814531 mouseMode |= SELECT;
1447914532 }
14480
- if ((modifiers & SHIFT) == SHIFT || forcetranslate)
14533
+ if ((modifiersex & SHIFT) == SHIFT || forcetranslate || (modifiers & MouseEvent.BUTTON3_MASK) != 0)
1448114534 {
1448214535 mouseMode &= ~VR;
1448314536 mouseMode |= TRANSLATE;
....@@ -14506,7 +14559,7 @@
1450614559
1450714560 if (isRenderer) //
1450814561 {
14509
- SetMouseMode(modifiers);
14562
+ SetMouseMode(0, modifiers);
1451014563 }
1451114564
1451214565 Globals.theRenderer.keyPressed(key);
....@@ -14842,7 +14895,7 @@
1484214895 //RESIZETEXTURE ^= true;
1484314896 //break;
1484414897 case 'z':
14845
- RENDERSHADOW ^= true;
14898
+ Globals.RENDERSHADOW ^= true;
1484614899 Globals.lighttouched = true;
1484714900 repaint();
1484814901 break;
....@@ -14966,7 +15019,7 @@
1496615019 //mode = ROTATE;
1496715020 if ((MODIFIERS & COMMAND) == 0) // VR??
1496815021 {
14969
- SetMouseMode(modifiers);
15022
+ SetMouseMode(0, modifiers);
1497015023 }
1497115024 }
1497215025
....@@ -15100,8 +15153,9 @@
1510015153
1510115154 protected void processMouseMotionEvent(MouseEvent e)
1510215155 {
15103
- //System.out.println("processMouseMotionEvent: " + mouseMode);
15104
- if (e.getButton() == MouseEvent.NOBUTTON && (mouseMode & SELECT) == 0)
15156
+ //System.out.println("processMouseMotionEvent: " + mouseMode + " " + e.getModifiers() + " " + e.getModifiersEx() + " " + e.getButton());
15157
+ //if (e.getButton() == MouseEvent.NOBUTTON && (mouseMode & SELECT) == 0)
15158
+ if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) == 0 && (e.getModifiers() & MouseEvent.BUTTON3_MASK) == 0 && (mouseMode & SELECT) == 0)
1510515159 {
1510615160 mouseMoved(e);
1510715161 } else
....@@ -15131,6 +15185,7 @@
1513115185
1513215186 void SelectParent()
1513315187 {
15188
+ new Exception().printStackTrace();
1513415189 System.exit(0);
1513515190 Composite group = (Composite) object;
1513615191 java.util.Vector selectees = new java.util.Vector(group.selection);
....@@ -15154,6 +15209,7 @@
1515415209
1515515210 void SelectChildren()
1515615211 {
15212
+ new Exception().printStackTrace();
1515715213 System.exit(0);
1515815214 /*
1515915215 Composite group = (Composite) object;
....@@ -15536,6 +15592,7 @@
1553615592 public boolean mouseDown(Event evt, int x, int y)
1553715593 {
1553815594 System.out.println("mouseDown: " + evt);
15595
+ System.exit(0);
1553915596 /*
1554015597 locked = true;
1554115598 drag = false;
....@@ -15579,7 +15636,7 @@
1557915636 {
1558015637 keyPressed(0, modifiers);
1558115638 }
15582
- clickStart(x, y, modifiers);
15639
+ // clickStart(x, y, modifiers);
1558315640 return true;
1558415641 }
1558515642
....@@ -15697,7 +15754,7 @@
1569715754 {
1569815755 keyReleased(0, 0);
1569915756 }
15700
- drag(x, y, modifiers);
15757
+ drag(x, y, 0, modifiers);
1570115758 return true;
1570215759 }
1570315760
....@@ -16267,6 +16324,7 @@
1626716324 {
1626816325 if (!selection)
1626916326 {
16327
+ new Exception().printStackTrace();
1627016328 System.exit(0);
1627116329 return;
1627216330 }
....@@ -16394,16 +16452,16 @@
1639416452 System.out.println("; fromto " + sel + " " + Trunk(previousselectedpoint.toParent[3][0]) + " " + Trunk(previousselectedpoint.toParent[3][2]) + " " + Trunk(selectedpoint.toParent[3][0]) + " " + Trunk(selectedpoint.toParent[3][2]));
1639516453 }
1639616454
16397
- previousselectedpoint = (Sphere) GrafreeD.clone(selectedpoint);
16455
+ previousselectedpoint = (Sphere) Grafreed.clone(selectedpoint);
1639816456 }
1639916457 }
1640016458
1640116459 if (!movingcamera && !PAINTMODE)
1640216460 object.editWindow.ScreenFitPoint(); // fev 2014
1640316461
16404
- if (PAINTMODE && GrafreeD.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0)
16462
+ if (PAINTMODE && Grafreed.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0)
1640516463 {
16406
- Object3D paintobj = GrafreeD.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0);
16464
+ Object3D paintobj = Grafreed.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0);
1640716465
1640816466 Object3D group = new Object3D("inst" + paintcount++);
1640916467
....@@ -16559,7 +16617,7 @@
1655916617 gl.glDisable(gl.GL_CULL_FACE);
1656016618 }
1656116619
16562
- if (!RENDERSHADOW)
16620
+ if (!Globals.RENDERSHADOW)
1656316621 gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
1656416622
1656516623 // SB gl.glPolygonOffset(2.5f, 10);
....@@ -16569,7 +16627,7 @@
1656916627 //gl.glColorMask(false, false, false, false);
1657016628
1657116629 //render_scene_from_light_view(gl, drawable, 0, 0);
16572
- if (RENDERSHADOW && Globals.lighttouched && !movingcamera) // && !parent.IsFreezed())
16630
+ if (Globals.RENDERSHADOW && Globals.lighttouched && (!movingcamera || !Globals.FREEZEONMOVE)) // && !parent.IsFreezed())
1657316631 {
1657416632 gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
1657516633