Normand Briere
2019-08-04 0c85af6e46f48b7425d59fc776b193c06a4a1f52
GroupEditor.java
....@@ -356,9 +356,9 @@
356356 this.copy = this.group = group;
357357 //selectees = this.group.selectees;
358358
359
- if (copy.versions == null)
359
+ if (copy.versionlist == null)
360360 {
361
- copy.versions = new byte[100][];
361
+ copy.versionlist = new Object3D[100];
362362 copy.versionindex = -1;
363363 }
364364
....@@ -383,9 +383,9 @@
383383
384384 ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true);
385385
386
- if (copy.versions == null)
386
+ if (copy.versionlist == null)
387387 {
388
- copy.versions = new byte[100][];
388
+ copy.versionlist = new Object3D[100];
389389 copy.versionindex = -1;
390390
391391 Save(true);
....@@ -932,7 +932,7 @@
932932 restoreCameraButton.addActionListener(this);
933933
934934 copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
935
- saveButton.setToolTipText("New version");
935
+ saveButton.setToolTipText("Duplicate current version");
936936 saveButton.addActionListener(this);
937937
938938 copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
....@@ -942,12 +942,12 @@
942942
943943 cGridBag updown = new cGridBag().setVertical(true);
944944 updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
945
- restoreButton.setToolTipText("Restore current");
945
+ restoreButton.setToolTipText("Undo (restore current version)");
946946 restoreButton.addActionListener(this);
947947 restoreButton.setEnabled(false);
948948
949949 updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
950
- replaceButton.setToolTipText("Replace current");
950
+ replaceButton.setToolTipText("Save (replace current version)");
951951 replaceButton.addActionListener(this);
952952 replaceButton.setEnabled(false);
953953
....@@ -1110,14 +1110,14 @@
11101110 editButton.addActionListener(this);
11111111
11121112 editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1113
- uneditButton.setToolTipText("Remove selection controls");
1113
+ uneditButton.setToolTipText("Unpin and remove selection controls");
11141114 uneditButton.addActionListener(this);
11151115
11161116 editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
11171117 allParamsButton.setToolTipText("Show all controle");
11181118 allParamsButton.addActionListener(this);
11191119
1120
- editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1120
+ editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
11211121 clearPanelButton.setToolTipText("Clear edit panel");
11221122 clearPanelButton.addActionListener(this);
11231123
....@@ -1183,7 +1183,7 @@
11831183 dgr.addDragGestureListener(this);
11841184 }catch(Exception e) {}
11851185 */
1186
- radio.layout = sixButton; // sevenButton;
1186
+ radio.layout = threeButton; // sixButton;
11871187 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
11881188 }
11891189
....@@ -1234,9 +1234,12 @@
12341234 smoothCB.setToolTipText("Snapping delay");
12351235 smoothCB.addItemListener(this);
12361236
1237
- panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
1238
- slowCB.setToolTipText("Smooth interpolation");
1239
- slowCB.addItemListener(this);
1237
+// panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
1238
+// slowCB.setToolTipText("Smooth interpolation");
1239
+// slowCB.addItemListener(this);
1240
+ panel.add(minshaderCB = new cCheckBox("Min shader", Globals.MINSHADER)); //, constraints);
1241
+ minshaderCB.setToolTipText("Minimal fast shader");
1242
+ minshaderCB.addItemListener(this);
12401243
12411244 // constraints.gridy += 1;
12421245 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
....@@ -1325,7 +1328,7 @@
13251328 }
13261329
13271330 radioButton.SetObject(obj);
1328
- radioButton.layout = sixButton; // sevenButton;
1331
+ radioButton.layout = threeButton; // sixButton;
13291332 radioButton.SetCamera(cameraView.renderCamera, false);
13301333 radioButton.addActionListener(this);
13311334 radioPanel.add(radioButton);
....@@ -1350,6 +1353,8 @@
13501353 cCheckBox localCB;
13511354 cCheckBox crowdCB;
13521355 cCheckBox smoothCB;
1356
+ cCheckBox minshaderCB;
1357
+
13531358 cToggleButton fastCB;
13541359 cCheckBox slowCB;
13551360 cCheckBox boxCB;
....@@ -1420,6 +1425,12 @@
14201425 {
14211426 cameraView.ToggleInertia();
14221427 cameraView.repaint();
1428
+ }
1429
+ else if(e.getSource() == minshaderCB)
1430
+ {
1431
+ Globals.MINSHADER ^= true;
1432
+ cameraView.programInitialized = false;
1433
+ cameraView.repaint();
14231434 }
14241435 else if(e.getSource() == localCB)
14251436 {
....@@ -2602,11 +2613,13 @@
26022613 {
26032614 // Restore current version
26042615 Restore();
2616
+ restoreButton.setEnabled(false);
26052617 } else
26062618 if (source == replaceButton)
26072619 {
26082620 // Overwrite current version
26092621 Replace();
2622
+ replaceButton.setEnabled(false);
26102623 } else
26112624 if (source == redoButton)
26122625 {
....@@ -3809,10 +3822,10 @@
38093822 {
38103823 Object3D child = (Object3D)e.nextElement();
38113824 if(child.editWindow != null)
3812
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
38133825 child.pinned = false;
38143826 child.CloseUI();
38153827 listUI.remove(child);
3828
+// objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
38163829
38173830 //child.editWindow = null; // ???????????
38183831 }
....@@ -3831,6 +3844,7 @@
38313844 obj.CloseUI();
38323845 }
38333846 listUI.clear();
3847
+ SetPinStates(group.selection.size() > 0);
38343848 refreshContents(true);
38353849 } else
38363850 if (source == allParamsButton)
....@@ -3917,6 +3931,7 @@
39173931 radio.layout.doClick();
39183932
39193933 ClearUnpinned();
3934
+
39203935 //Grafreed.Assert(group != null);
39213936 //Grafreed.Assert(group.selection != null);
39223937 SetPinStates(group.selection == null || group.selection.size() > 0);
....@@ -3933,11 +3948,13 @@
39333948 } else if (event.getSource() == editCameraItem)
39343949 {
39353950 cameraView.ProtectCamera();
3951
+ cameraView.requestFocusInWindow();
39363952 cameraView.repaint();
39373953 return;
39383954 } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton)
39393955 {
39403956 cameraView.RevertCamera();
3957
+ cameraView.requestFocusInWindow();
39413958 cameraView.repaint();
39423959 return;
39433960 // } else if (event.getSource() == textureButton)
....@@ -5070,9 +5087,7 @@
50705087
50715088 freezemodel = false;
50725089 }
5073
-
5074
- boolean flashIt = true;
5075
-
5090
+
50765091 public void valueChanged(TreeSelectionEvent e)
50775092 //public boolean handleEvent(Event event)
50785093 {
....@@ -5147,6 +5162,8 @@
51475162 uneditButton.setEnabled(enabled);
51485163 unselectButton.setEnabled(enabled);
51495164 flashSelectionButton.setEnabled(enabled);
5165
+
5166
+ clearPanelButton.setEnabled(!listUI.isEmpty());
51505167 }
51515168
51525169 void refreshContents(boolean cp)