Normand Briere
2019-04-28 f1c718cce66e5651a0dae91375db6ebfaded1a92
GroupEditor.java
....@@ -437,11 +437,17 @@
437437 oe.aConstraints.gridwidth = 1;
438438 oe.aConstraints.gridx = 0;
439439
440
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints);
440
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
441
+ liveCB.setToolTipText("Enabled animation");
441442 liveCB.addItemListener(this);
442443
443444 oe.aConstraints.gridx += 1;
445
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints);
446
+ fastCB.setToolTipText("Fast mode");
447
+ fastCB.addItemListener(this);
448
+ oe.aConstraints.gridx += 1;
444449 oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints);
450
+ supportCB.setToolTipText("Enabled rigging");
445451 supportCB.addItemListener(this);
446452
447453 // oe.aConstraints.gridx += 1;
....@@ -449,22 +455,27 @@
449455 // localCB.addItemListener(this);
450456
451457 oe.aConstraints.gridx += 1;
452
- oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints);
458
+ oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), oe.aConstraints);
459
+ crowdCB.setToolTipText("Used for crowds");
453460 crowdCB.addItemListener(this);
454461
455462 oe.aConstraints.gridx += 1;
456463 oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints);
464
+ smoothCB.setToolTipText("Snapping delay");
457465 smoothCB.addItemListener(this);
458466
459467 oe.aConstraints.gridx += 1;
460
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints);
461
- fastCB.addItemListener(this);
462
- oe.aConstraints.gridx += 1;
463468 oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints);
469
+ slowCB.setToolTipText("Smooth interpolation");
464470 slowCB.addItemListener(this);
465471 oe.aConstraints.gridx += 1;
466
- oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints);
472
+ oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE), oe.aConstraints);
473
+ boxCB.setToolTipText("Display bounding boxes");
467474 boxCB.addItemListener(this);
475
+ oe.aConstraints.gridx += 1;
476
+ oe.toolbarPanel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE), oe.aConstraints);
477
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
478
+ zoomBoxCB.addItemListener(this);
468479
469480 // oe.aConstraints.gridx += 1;
470481 // oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints);
....@@ -491,19 +502,22 @@
491502 // debugCB.addItemListener(this);
492503
493504 oe.aConstraints.gridx += 1;
494
- oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints);
505
+ oe.toolbarPanel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL), oe.aConstraints);
495506 oeilCB.addItemListener(this);
496507
497508 oe.aConstraints.gridx += 1;
498
- oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints);
509
+ oe.toolbarPanel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT), oe.aConstraints);
510
+ lookAtCB.setToolTipText("Look-at target");
499511 lookAtCB.addItemListener(this);
500512
501513 oe.aConstraints.gridx += 1;
502514 oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints);
515
+ trackCB.setToolTipText("Enable tracking");
503516 trackCB.addItemListener(this);
504517
505518 oe.aConstraints.gridx += 1;
506519 oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
520
+ screenfitButton.setToolTipText("Screen fit");
507521 screenfitButton.addActionListener(this);
508522 oe.aConstraints.gridx += 1;
509523 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
....@@ -511,6 +525,7 @@
511525 // oe.aConstraints.gridx += 1;
512526 oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
513527 snapobjectButton.addActionListener(this);
528
+ snapobjectButton.setToolTipText("Snap Object");
514529 oe.aConstraints.gridx += 1;
515530
516531 //aConstraints.gridx = 0;
....@@ -519,6 +534,7 @@
519534 oe.aConstraints.gridwidth = 1;
520535
521536 oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
537
+ flashSelectionButton.setToolTipText("Show selection");
522538 flashSelectionButton.addActionListener(this);
523539
524540 oe.toolbarPanel.add(new cButton(" ", false));
....@@ -529,21 +545,28 @@
529545
530546 //
531547 oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
548
+ twoButton.setToolTipText("Show center view only");
532549 twoButton.addActionListener(this);
533550 oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
534551 fourButton.addActionListener(this);
552
+ fourButton.setToolTipText("Show left panel only");
535553 oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
554
+ sixButton.setToolTipText("2-column layout left");
536555 sixButton.addActionListener(this);
537556 oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
557
+ threeButton.setToolTipText("2-column layout right");
538558 threeButton.addActionListener(this);
539559 oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
560
+ sevenButton.setToolTipText("3-column layout");
540561 sevenButton.addActionListener(this);
541562 //
542563
543
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
564
+ oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints);
565
+ rootButton.setToolTipText("Edit object in new tab");
544566 rootButton.addActionListener(this);
545567 oe.aConstraints.gridx += 1;
546568 oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
569
+ closeButton.setToolTipText("Close tab");
547570 closeButton.addActionListener(this);
548571 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
549572 //clearButton.addActionListener(this);
....@@ -676,6 +699,7 @@
676699 JCheckBox fastCB;
677700 JCheckBox slowCB;
678701 JCheckBox boxCB;
702
+ JCheckBox zoomBoxCB;
679703 JCheckBox trackCB;
680704 JCheckBox smoothfocusCB;
681705 // JCheckBox speakerMocapCB;
....@@ -755,6 +779,10 @@
755779 Recompile();
756780 cameraView.repaint();
757781 // refreshContents();
782
+ }
783
+ else if(e.getSource() == zoomBoxCB)
784
+ {
785
+ cameraView.ToggleZoomBoxMode();
758786 }
759787 else if(e.getSource() == smoothfocusCB)
760788 {
....@@ -1782,8 +1810,8 @@
17821810 } else
17831811 if (event.getSource() == computeAOItem)
17841812 {
1785
- CameraPane.drawMode = CameraPane.OCCLUSION;
1786
- CameraPane.theRenderer.repaint();
1813
+ Globals.drawMode = CameraPane.OCCLUSION;
1814
+ Globals.theRenderer.repaint();
17871815 } else
17881816 if (event.getSource() == recompileItem)
17891817 {
....@@ -2094,7 +2122,7 @@
20942122 if (content instanceof cGroup && ((cGroup)content).transientlink )
20952123 content = ((cGroup)content).get(0);
20962124
2097
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2125
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20982126 for (int i=0; i<group.selection.size(); i++)
20992127 {
21002128 boolean random = CameraPane.RANDOM;
....@@ -2103,7 +2131,7 @@
21032131 // group.selection.get(i).setMasterThis(content); // should be identity
21042132 CameraPane.RANDOM = random;
21052133 }
2106
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2134
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21072135 refreshContents();
21082136 }
21092137 } else
....@@ -2911,7 +2939,7 @@
29112939 }
29122940
29132941 copy = group;
2914
- //CameraPane.theRenderer.object = group;
2942
+ //Globals.theRenderer.object = group;
29152943 if(!useclient)
29162944 {
29172945 cameraView.renderCamera = radio.camera;
....@@ -2920,7 +2948,8 @@
29202948 cameraView.cameras[cameraView.cameracount] = radio.camera;
29212949 cameraView.targetLookAt.set(radio.camera.lookAt);
29222950 cameraView.object = group;
2923
- cameraView.lighttouched = true;
2951
+ //cameraView.lighttouched = true;
2952
+ Globals.lighttouched = true;
29242953 topView.object = group;
29252954 frontView.object = group;
29262955 sideView.object = group;
....@@ -2956,7 +2985,7 @@
29562985 if (useclient)
29572986 {
29582987 cameraView.object = client;
2959
- cameraView.lighttouched = true;
2988
+ Globals.lighttouched = true;
29602989 //topView.object = client;
29612990 //frontView.object = client;
29622991 //sideView.object = client;
....@@ -2964,7 +2993,7 @@
29642993 else
29652994 {
29662995 cameraView.object = group;
2967
- cameraView.lighttouched = true;
2996
+ Globals.lighttouched = true;
29682997 //topView.object = group;
29692998 //frontView.object = group;
29702999 //sideView.object = group;
....@@ -3472,7 +3501,7 @@
34723501 String pigment = Object3D.GetPigment(tex);
34733502 //String bump = Object3D.GetBump(tex);
34743503
3475
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3504
+ com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
34763505
34773506 double s = v.s;
34783507
....@@ -3773,7 +3802,7 @@
37733802 group.selection.RelinkToSupport(); // july 2014
37743803 System.out.println("DONE.");
37753804 refreshContents();
3776
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3805
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
37773806 }
37783807
37793808 void ReduceMesh(boolean reduction34)
....@@ -4058,16 +4087,16 @@
40584087
40594088 objEditor.SetText(); // jan 2014
40604089
4061
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4090
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
40624091 CameraPane.flash = true;
40634092
40644093 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
40654094 // a camera
40664095 {
40674096 CameraPane.camerachangeframe = 0; // don't refuse it
4068
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4069
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
4070
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4097
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4098
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4099
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
40714100 }
40724101
40734102 refreshContents();