Normand Briere
2019-04-22 c60a1ad4f6aa4904e80280586b440a584b5ff061
GroupEditor.java
....@@ -437,7 +437,7 @@
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);
441441 liveCB.addItemListener(this);
442442
443443 oe.aConstraints.gridx += 1;
....@@ -449,7 +449,7 @@
449449 // localCB.addItemListener(this);
450450
451451 oe.aConstraints.gridx += 1;
452
- oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints);
452
+ oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), oe.aConstraints);
453453 crowdCB.addItemListener(this);
454454
455455 oe.aConstraints.gridx += 1;
....@@ -1120,6 +1120,8 @@
11201120 resetParentItem.addActionListener(this);
11211121 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11221122 repairParentItem.addActionListener(this);
1123
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1124
+ repairShadowItem.addActionListener(this);
11231125 menu.add(invariantsItem = new MenuItem("Invariants"));
11241126 invariantsItem.addActionListener(this);
11251127 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1780,7 +1782,7 @@
17801782 } else
17811783 if (event.getSource() == computeAOItem)
17821784 {
1783
- CameraPane.drawMode = CameraPane.OCCLUSION;
1785
+ Globals.drawMode = CameraPane.OCCLUSION;
17841786 CameraPane.theRenderer.repaint();
17851787 } else
17861788 if (event.getSource() == recompileItem)
....@@ -2545,6 +2547,20 @@
25452547
25462548 refreshContents();
25472549 } else
2550
+ if (event.getSource() == repairShadowItem)
2551
+ {
2552
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2553
+ {
2554
+ Object3D obj = (Object3D)e.nextElement();
2555
+ obj.RepairShadow();
2556
+// for (int i=0; i<obj.size(); i++)
2557
+// {
2558
+// obj.get(i).parent = obj;
2559
+// }
2560
+ }
2561
+
2562
+ refreshContents();
2563
+ } else
25482564 if (event.getSource() == sortbysizeItem)
25492565 {
25502566 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2904,7 +2920,8 @@
29042920 cameraView.cameras[cameraView.cameracount] = radio.camera;
29052921 cameraView.targetLookAt.set(radio.camera.lookAt);
29062922 cameraView.object = group;
2907
- cameraView.lighttouched = true;
2923
+ //cameraView.lighttouched = true;
2924
+ Globals.lighttouched = true;
29082925 topView.object = group;
29092926 frontView.object = group;
29102927 sideView.object = group;
....@@ -2940,7 +2957,7 @@
29402957 if (useclient)
29412958 {
29422959 cameraView.object = client;
2943
- cameraView.lighttouched = true;
2960
+ Globals.lighttouched = true;
29442961 //topView.object = client;
29452962 //frontView.object = client;
29462963 //sideView.object = client;
....@@ -2948,7 +2965,7 @@
29482965 else
29492966 {
29502967 cameraView.object = group;
2951
- cameraView.lighttouched = true;
2968
+ Globals.lighttouched = true;
29522969 //topView.object = group;
29532970 //frontView.object = group;
29542971 //sideView.object = group;
....@@ -4042,7 +4059,7 @@
40424059
40434060 objEditor.SetText(); // jan 2014
40444061
4045
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4062
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
40464063 CameraPane.flash = true;
40474064
40484065 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
....@@ -5009,6 +5026,7 @@
50095026
50105027 private MenuItem resetParentItem;
50115028 private MenuItem repairParentItem;
5029
+ private MenuItem repairShadowItem;
50125030 private MenuItem sortbysizeItem;
50135031 private MenuItem sortbynameItem;
50145032