.. | .. |
---|
16 | 16 | //import buoy.widget.BFileChooser; |
---|
17 | 17 | |
---|
18 | 18 | class GroupEditor extends ObjEditor implements //iParse, //iCallBack, |
---|
| 19 | + Grafreed.iResourceCallBack, |
---|
19 | 20 | ObjectUI, |
---|
20 | 21 | Runnable, |
---|
21 | 22 | ActionListener, |
---|
.. | .. |
---|
60 | 61 | //AddSkyboxButton("default", "cornell", row0); |
---|
61 | 62 | AddSkyboxButton("penguins", "dust", row0); |
---|
62 | 63 | AddSkyboxButton("penguins", "tropic", row0); |
---|
63 | | - AddSkyboxButton("default", "skycube", row0); |
---|
| 64 | + AddSkyboxButton("penguins", "yonder", row0); |
---|
64 | 65 | |
---|
65 | 66 | AddSkyboxButton("default", "uffizi", row1); |
---|
66 | 67 | AddSkyboxButton("bridge", "Bridge", row1); |
---|
.. | .. |
---|
90 | 91 | AddSkyboxButton("park", "Skansen3", row6); |
---|
91 | 92 | AddSkyboxButton("park", "Skansen4", row6); |
---|
92 | 93 | AddSkyboxButton("park", "Skansen5", row6); |
---|
93 | | - AddSkyboxButton("park", "Stairs", row6); |
---|
| 94 | + AddSkyboxButton("persson", "VancouverConventionCentre", row6); |
---|
94 | 95 | |
---|
95 | 96 | tab0.add(row0); |
---|
96 | 97 | tab0.add(row1); |
---|
.. | .. |
---|
144 | 145 | |
---|
145 | 146 | AddSkyboxButton("mountain", "Maskonaive2", row4); |
---|
146 | 147 | AddSkyboxButton("mountain", "Maskonaive3", row4); |
---|
147 | | - AddSkyboxButton("mountain", "Ryfjallet", row4); |
---|
148 | 148 | AddSkyboxButton("mountain", "Teide", row4); |
---|
149 | 149 | AddSkyboxButton("park", "Tantolunden4", row4); |
---|
150 | 150 | |
---|
151 | | - AddSkyboxButton("penguins", "wrath", row5); |
---|
152 | | - AddSkyboxButton("penguins", "yonder", row5); |
---|
| 151 | + AddSkyboxButton("park", "Stairs", row5); |
---|
| 152 | + AddSkyboxButton("default", "skycube", row6); |
---|
153 | 153 | AddSkyboxButton("rocky", "Langholmen", row5); |
---|
154 | 154 | AddSkyboxButton("rocky", "Skinnarviksberget", row5); |
---|
155 | | - AddSkyboxButton("rocky", "Tantolunden6", row5); |
---|
156 | 155 | |
---|
| 156 | + AddSkyboxButton("rocky", "Tantolunden6", row5); |
---|
157 | 157 | AddSkyboxButton("default", "CloudyHills", row6); |
---|
158 | 158 | AddSkyboxButton("daz", "Autumn", row6); |
---|
159 | | - AddSkyboxButton("daz", "Greenlands", row6); |
---|
160 | 159 | AddSkyboxButton("daz", "MountainTrail", row6); |
---|
161 | | - AddSkyboxButton("daz", "Oasis", row6); |
---|
162 | 160 | /* |
---|
163 | 161 | Autumn |
---|
164 | 162 | Greenlands |
---|
.. | .. |
---|
210 | 208 | AddSkyboxButton("penguins", "sleepyhollow", row1); |
---|
211 | 209 | |
---|
212 | 210 | AddSkyboxButton("penguins", "kenon_star", row2); |
---|
213 | | - AddSkyboxButton("indoors", "DallasW", row2); |
---|
214 | | - AddSkyboxButton("indoors", "MarriottMadisonWest", row2); |
---|
| 211 | + AddSkyboxButton("persson", "corona", row2); |
---|
| 212 | + AddSkyboxButton("persson", "spaceskybox", row2); |
---|
215 | 213 | AddSkyboxButton("indoors", "Vasa", row2); |
---|
216 | 214 | |
---|
217 | 215 | AddSkyboxButton("winter", "Backyard", row3); |
---|
.. | .. |
---|
232 | 230 | AddSkyboxButton("daz", "TheRock", row6); |
---|
233 | 231 | AddSkyboxButton("daz", "TopOfTheWorld", row6); |
---|
234 | 232 | AddSkyboxButton("daz", "Winter", row6); |
---|
235 | | - AddSkyboxButton("penguins", "desertdawn", row6); |
---|
| 233 | + AddSkyboxButton("mountain", "Ryfjallet", row6); |
---|
236 | 234 | |
---|
237 | 235 | tab0.add(row0); |
---|
238 | 236 | tab0.add(row1); |
---|
.. | .. |
---|
248 | 246 | //tab0.add(new cGridBag()); |
---|
249 | 247 | } |
---|
250 | 248 | } |
---|
251 | | - |
---|
252 | | - public void ChangeSkybox(String name) |
---|
| 249 | + |
---|
| 250 | + public void AddSkyboxTab3(JTabbedPane skyboxpanel) |
---|
253 | 251 | { |
---|
254 | | - cameraView.envyoff = false; |
---|
255 | | - cameraView.skyboxname = name; |
---|
256 | | - cameraView.skyboxext = "jpg"; |
---|
| 252 | + cGridBag tab0 = new cGridBag().setVertical(true); |
---|
| 253 | + |
---|
| 254 | + tab0.setName("Others"); |
---|
| 255 | + skyboxpanel.add(tab0); |
---|
| 256 | + |
---|
| 257 | + cGridBag row0 = new cGridBag(); |
---|
| 258 | + cGridBag row1 = new cGridBag(); |
---|
| 259 | + cGridBag row2 = new cGridBag(); |
---|
| 260 | + cGridBag row3 = new cGridBag(); |
---|
| 261 | + cGridBag row4 = new cGridBag(); |
---|
| 262 | + cGridBag row5 = new cGridBag(); |
---|
| 263 | + cGridBag row6 = new cGridBag(); |
---|
| 264 | + |
---|
| 265 | + AddSkyboxButton("mayhem", "afterrain", row0); |
---|
| 266 | + AddSkyboxButton("mayhem", "aqua4", row0); |
---|
| 267 | + AddSkyboxButton("mayhem", "aqua9", row0); |
---|
| 268 | + AddSkyboxButton("mayhem", "flame", row0); |
---|
| 269 | + |
---|
| 270 | + AddSkyboxButton("mayhem", "h2s", row1); |
---|
| 271 | + AddSkyboxButton("mayhem", "prehistoric", row1); |
---|
| 272 | + AddSkyboxButton("mayhem", "scorched", row1); |
---|
| 273 | + AddSkyboxButton("penguins", "desertdawn", row1); |
---|
| 274 | + |
---|
| 275 | + AddSkyboxButton("persson", "Citadella", row2); |
---|
| 276 | + AddSkyboxButton("persson", "Citadella2", row2); |
---|
| 277 | + AddSkyboxButton("persson", "clouds1", row2); |
---|
| 278 | + AddSkyboxButton("penguins", "wrath", row2); |
---|
| 279 | + |
---|
| 280 | + AddSkyboxButton("persson", "FishermansBastion", row3); |
---|
| 281 | + AddSkyboxButton("persson", "HeroesSquare", row3); |
---|
| 282 | + AddSkyboxButton("indoors", "DallasW", row3); |
---|
| 283 | + AddSkyboxButton("indoors", "MarriottMadisonWest", row3); |
---|
| 284 | + |
---|
| 285 | + AddSkyboxButton("persson", "LancellottiChapel", row4); |
---|
| 286 | + AddSkyboxButton("persson", "PereaBeach1", row4); |
---|
| 287 | + AddSkyboxButton("persson", "PereaBeach2", row4); |
---|
| 288 | + AddSkyboxButton("persson", "redeclipse", row4); |
---|
| 289 | + |
---|
| 290 | + AddSkyboxButton("daz", "Greenlands", row5); |
---|
| 291 | + AddSkyboxButton("daz", "Oasis", row5); |
---|
| 292 | + AddSkyboxButton("elyvisions", "arch3", row5); |
---|
| 293 | + AddSkyboxButton("elyvisions", "calm_sea", row5); |
---|
| 294 | + |
---|
| 295 | + AddSkyboxButton("elyvisions", "rainbow", row6); |
---|
| 296 | + AddSkyboxButton("elyvisions", "distant_sunset", row6); |
---|
| 297 | + AddSkyboxButton("elyvisions", "heaven", row6); |
---|
| 298 | + AddSkyboxButton("elyvisions", "hot", row6); |
---|
| 299 | + |
---|
| 300 | + tab0.add(row0); |
---|
| 301 | + tab0.add(row1); |
---|
| 302 | + tab0.add(row2); |
---|
| 303 | + tab0.add(row3); |
---|
| 304 | + tab0.add(row4); |
---|
| 305 | + tab0.add(row5); |
---|
| 306 | + tab0.add(row6); |
---|
| 307 | + |
---|
| 308 | + for (int i=5; --i>=0;) |
---|
| 309 | + { |
---|
| 310 | + //oe.toolboxPanel.Return(); |
---|
| 311 | + //tab0.add(new cGridBag()); |
---|
| 312 | + } |
---|
| 313 | + } |
---|
| 314 | + |
---|
| 315 | + public void CallBack(String[] path) |
---|
| 316 | + { |
---|
| 317 | + for (int i = 0; i < path.length; i++) |
---|
| 318 | + { |
---|
| 319 | + System.out.print(path[i] + "/"); |
---|
| 320 | + } |
---|
| 321 | + |
---|
| 322 | + System.out.println(); |
---|
| 323 | + } |
---|
| 324 | + |
---|
| 325 | + public void ChangeSkybox(String skybox) |
---|
| 326 | + { |
---|
| 327 | + //cameraView.envyoff = false; |
---|
| 328 | + group.skyboxname = skybox; |
---|
| 329 | + group.skyboxext = "jpg"; |
---|
257 | 330 | cameraView.repaint(); |
---|
| 331 | + |
---|
| 332 | + Grafreed.ParseResources("textures", this); |
---|
258 | 333 | } |
---|
259 | 334 | |
---|
260 | 335 | //ObjEditor objEditor; |
---|
.. | .. |
---|
294 | 369 | this.copy = this.group = group; |
---|
295 | 370 | //selectees = this.group.selectees; |
---|
296 | 371 | |
---|
297 | | - if (copy.versions == null) |
---|
| 372 | + if (copy.versionlist == null) |
---|
298 | 373 | { |
---|
299 | | - copy.versions = new byte[100][]; |
---|
| 374 | + copy.versionlist = new Object3D[100]; |
---|
300 | 375 | copy.versionindex = -1; |
---|
301 | 376 | } |
---|
302 | 377 | |
---|
.. | .. |
---|
321 | 396 | |
---|
322 | 397 | ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true); |
---|
323 | 398 | |
---|
324 | | - if (copy.versions == null) |
---|
| 399 | + if (copy.versionlist == null) |
---|
325 | 400 | { |
---|
326 | | - copy.versions = new byte[100][]; |
---|
| 401 | + copy.versionlist = new Object3D[100]; |
---|
327 | 402 | copy.versionindex = -1; |
---|
328 | 403 | |
---|
329 | 404 | Save(true); |
---|
.. | .. |
---|
869 | 944 | restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
870 | 945 | restoreCameraButton.addActionListener(this); |
---|
871 | 946 | |
---|
872 | | - copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
873 | | - saveButton.setToolTipText("New version"); |
---|
874 | | - saveButton.addActionListener(this); |
---|
| 947 | + copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 948 | + saveVersionButton.setToolTipText("Duplicate current version"); |
---|
| 949 | + saveVersionButton.addActionListener(this); |
---|
875 | 950 | |
---|
876 | | - copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
877 | | - undoButton.setToolTipText("Previous version"); |
---|
878 | | - undoButton.addActionListener(this); |
---|
879 | | - undoButton.setEnabled(false); |
---|
| 951 | + copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 952 | + deleteVersionButton.setToolTipText("Delete current version"); |
---|
| 953 | + deleteVersionButton.addActionListener(this); |
---|
| 954 | + |
---|
| 955 | + copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 956 | + previousVersionButton.setToolTipText("Previous version"); |
---|
| 957 | + previousVersionButton.addActionListener(this); |
---|
| 958 | + previousVersionButton.setEnabled(false); |
---|
880 | 959 | |
---|
881 | 960 | cGridBag updown = new cGridBag().setVertical(true); |
---|
882 | 961 | updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
883 | | - restoreButton.setToolTipText("Restore current"); |
---|
| 962 | + restoreButton.setToolTipText("Undo (restore current version)"); |
---|
884 | 963 | restoreButton.addActionListener(this); |
---|
885 | | - restoreButton.setEnabled(false); |
---|
| 964 | + //restoreButton.setEnabled(false); |
---|
886 | 965 | |
---|
887 | 966 | updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
888 | | - replaceButton.setToolTipText("Replace current"); |
---|
| 967 | + replaceButton.setToolTipText("Save (replace current version)"); |
---|
889 | 968 | replaceButton.addActionListener(this); |
---|
890 | | - replaceButton.setEnabled(false); |
---|
| 969 | + //replaceButton.setEnabled(false); |
---|
891 | 970 | |
---|
892 | 971 | copyOptionsPanel.add(updown); |
---|
893 | 972 | |
---|
894 | | - copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
895 | | - redoButton.setToolTipText("Next version"); |
---|
896 | | - redoButton.addActionListener(this); |
---|
897 | | - redoButton.setEnabled(false); |
---|
| 973 | + copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 974 | + nextVersionButton.setToolTipText("Next version"); |
---|
| 975 | + nextVersionButton.addActionListener(this); |
---|
| 976 | + nextVersionButton.setEnabled(false); |
---|
898 | 977 | |
---|
899 | 978 | oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
900 | 979 | liveCB.setToolTipText("Enable animation"); |
---|
.. | .. |
---|
1032 | 1111 | cGridBag skyboxpane = new cGridBag(); |
---|
1033 | 1112 | skyboxpane.preferredHeight = 100; |
---|
1034 | 1113 | |
---|
1035 | | - oe.toolboxPanel.add(skyboxpane); |
---|
| 1114 | + oe.skyboxPanel.add(skyboxpane); |
---|
1036 | 1115 | |
---|
1037 | 1116 | JTabbedPane skyboxpanel = new JTabbedPane(); |
---|
1038 | 1117 | skyboxpane.add(skyboxpanel); |
---|
.. | .. |
---|
1040 | 1119 | AddSkyboxTab0(skyboxpanel); |
---|
1041 | 1120 | AddSkyboxTab1(skyboxpanel); |
---|
1042 | 1121 | AddSkyboxTab2(skyboxpanel); |
---|
| 1122 | + AddSkyboxTab3(skyboxpanel); |
---|
1043 | 1123 | |
---|
1044 | 1124 | // EDIT panel |
---|
1045 | 1125 | editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
1047 | 1127 | editButton.addActionListener(this); |
---|
1048 | 1128 | |
---|
1049 | 1129 | editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1050 | | - uneditButton.setToolTipText("Remove selection controls"); |
---|
| 1130 | + uneditButton.setToolTipText("Unpin and remove selection controls"); |
---|
1051 | 1131 | uneditButton.addActionListener(this); |
---|
1052 | 1132 | |
---|
1053 | 1133 | editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
1054 | 1134 | allParamsButton.setToolTipText("Show all controle"); |
---|
1055 | 1135 | allParamsButton.addActionListener(this); |
---|
1056 | 1136 | |
---|
1057 | | - editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1137 | + editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1058 | 1138 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
1059 | 1139 | clearPanelButton.addActionListener(this); |
---|
1060 | 1140 | |
---|
1061 | | - editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1062 | | - unselectButton.setToolTipText("Unselect"); |
---|
1063 | | - unselectButton.addActionListener(this); |
---|
| 1141 | + //editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1142 | + //unselectButton.setToolTipText("Unselect"); |
---|
| 1143 | + //unselectButton.addActionListener(this); |
---|
1064 | 1144 | |
---|
1065 | 1145 | editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1066 | 1146 | flashSelectionButton.setToolTipText("Highlight selection"); |
---|
.. | .. |
---|
1120 | 1200 | dgr.addDragGestureListener(this); |
---|
1121 | 1201 | }catch(Exception e) {} |
---|
1122 | 1202 | */ |
---|
1123 | | - radio.layout = sixButton; // sevenButton; |
---|
| 1203 | + radio.layout = threeButton; // sixButton; |
---|
1124 | 1204 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
1125 | 1205 | } |
---|
1126 | 1206 | |
---|
.. | .. |
---|
1171 | 1251 | smoothCB.setToolTipText("Snapping delay"); |
---|
1172 | 1252 | smoothCB.addItemListener(this); |
---|
1173 | 1253 | |
---|
1174 | | - panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
1175 | | - slowCB.setToolTipText("Smooth interpolation"); |
---|
1176 | | - slowCB.addItemListener(this); |
---|
| 1254 | +// panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
| 1255 | +// slowCB.setToolTipText("Smooth interpolation"); |
---|
| 1256 | +// slowCB.addItemListener(this); |
---|
| 1257 | + panel.add(minshaderCB = new cCheckBox("Min shader", Globals.MINSHADER)); //, constraints); |
---|
| 1258 | + minshaderCB.setToolTipText("Minimal fast shader"); |
---|
| 1259 | + minshaderCB.addItemListener(this); |
---|
1177 | 1260 | |
---|
1178 | 1261 | // constraints.gridy += 1; |
---|
1179 | 1262 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
.. | .. |
---|
1262 | 1345 | } |
---|
1263 | 1346 | |
---|
1264 | 1347 | radioButton.SetObject(obj); |
---|
1265 | | - radioButton.layout = sixButton; // sevenButton; |
---|
| 1348 | + radioButton.layout = threeButton; // sixButton; |
---|
1266 | 1349 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
1267 | 1350 | radioButton.addActionListener(this); |
---|
1268 | 1351 | radioPanel.add(radioButton); |
---|
.. | .. |
---|
1287 | 1370 | cCheckBox localCB; |
---|
1288 | 1371 | cCheckBox crowdCB; |
---|
1289 | 1372 | cCheckBox smoothCB; |
---|
| 1373 | + cCheckBox minshaderCB; |
---|
| 1374 | + |
---|
1290 | 1375 | cToggleButton fastCB; |
---|
1291 | 1376 | cCheckBox slowCB; |
---|
1292 | 1377 | cCheckBox boxCB; |
---|
.. | .. |
---|
1357 | 1442 | { |
---|
1358 | 1443 | cameraView.ToggleInertia(); |
---|
1359 | 1444 | cameraView.repaint(); |
---|
| 1445 | + } |
---|
| 1446 | + else if(e.getSource() == minshaderCB) |
---|
| 1447 | + { |
---|
| 1448 | + Globals.MINSHADER ^= true; |
---|
| 1449 | + cameraView.programInitialized = false; |
---|
| 1450 | + cameraView.repaint(); |
---|
1360 | 1451 | } |
---|
1361 | 1452 | else if(e.getSource() == localCB) |
---|
1362 | 1453 | { |
---|
.. | .. |
---|
2497 | 2588 | if (source == invariantsItem) |
---|
2498 | 2589 | { |
---|
2499 | 2590 | System.out.println("Invariants:"); |
---|
2500 | | - Grafreed.grafreeD.universe.invariants(); |
---|
| 2591 | + Grafreed.grafreed.universe.invariants(); |
---|
2501 | 2592 | } else |
---|
2502 | 2593 | if (source == memoryItem) |
---|
2503 | 2594 | { |
---|
.. | .. |
---|
2528 | 2619 | { |
---|
2529 | 2620 | ToggleFullScreen(); |
---|
2530 | 2621 | } else |
---|
2531 | | - if (source == undoButton) |
---|
| 2622 | + if (source == previousVersionButton) |
---|
2532 | 2623 | { |
---|
2533 | 2624 | // Go to previous version |
---|
2534 | 2625 | //if (!Undo()) |
---|
2535 | 2626 | //java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2536 | | - Undo(); |
---|
| 2627 | + PreviousVersion(); |
---|
2537 | 2628 | } else |
---|
2538 | 2629 | if (source == restoreButton) |
---|
2539 | 2630 | { |
---|
2540 | 2631 | // Restore current version |
---|
2541 | 2632 | Restore(); |
---|
| 2633 | + //restoreButton.setEnabled(false); |
---|
2542 | 2634 | } else |
---|
2543 | 2635 | if (source == replaceButton) |
---|
2544 | 2636 | { |
---|
2545 | 2637 | // Overwrite current version |
---|
2546 | 2638 | Replace(); |
---|
| 2639 | + //replaceButton.setEnabled(false); |
---|
2547 | 2640 | } else |
---|
2548 | | - if (source == redoButton) |
---|
| 2641 | + if (source == nextVersionButton) |
---|
2549 | 2642 | { |
---|
2550 | 2643 | // Go to next version |
---|
2551 | | - Redo(); |
---|
| 2644 | + NextVersion(); |
---|
2552 | 2645 | } else |
---|
2553 | | - if (source == saveButton) |
---|
| 2646 | + if (source == saveVersionButton) |
---|
2554 | 2647 | { |
---|
2555 | 2648 | // Save a new version |
---|
2556 | 2649 | if (!Save(true)) |
---|
2557 | 2650 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 2651 | + } else |
---|
| 2652 | + if (source == deleteVersionButton) |
---|
| 2653 | + { |
---|
| 2654 | + // Delete a new version |
---|
| 2655 | + DeleteVersion(); |
---|
2558 | 2656 | } else |
---|
2559 | 2657 | if (source == oneStepButton) |
---|
2560 | 2658 | { |
---|
.. | .. |
---|
2609 | 2707 | } else |
---|
2610 | 2708 | if (source == undoItem) |
---|
2611 | 2709 | { |
---|
2612 | | - Undo(); |
---|
| 2710 | + PreviousVersion(); |
---|
2613 | 2711 | } else |
---|
2614 | 2712 | if (source == redoItem) |
---|
2615 | 2713 | { |
---|
2616 | | - Redo(); |
---|
| 2714 | + NextVersion(); |
---|
2617 | 2715 | } else |
---|
2618 | 2716 | if (source == duplicateItem) |
---|
2619 | 2717 | { |
---|
.. | .. |
---|
3746 | 3844 | { |
---|
3747 | 3845 | Object3D child = (Object3D)e.nextElement(); |
---|
3748 | 3846 | if(child.editWindow != null) |
---|
3749 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3750 | 3847 | child.pinned = false; |
---|
3751 | 3848 | child.CloseUI(); |
---|
3752 | 3849 | listUI.remove(child); |
---|
| 3850 | +// objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3753 | 3851 | |
---|
3754 | 3852 | //child.editWindow = null; // ??????????? |
---|
3755 | 3853 | } |
---|
.. | .. |
---|
3768 | 3866 | obj.CloseUI(); |
---|
3769 | 3867 | } |
---|
3770 | 3868 | listUI.clear(); |
---|
| 3869 | + SetPinStates(group.selection.size() > 0); |
---|
3771 | 3870 | refreshContents(true); |
---|
3772 | 3871 | } else |
---|
3773 | 3872 | if (source == allParamsButton) |
---|
.. | .. |
---|
3854 | 3953 | radio.layout.doClick(); |
---|
3855 | 3954 | |
---|
3856 | 3955 | ClearUnpinned(); |
---|
| 3956 | + |
---|
3857 | 3957 | //Grafreed.Assert(group != null); |
---|
3858 | 3958 | //Grafreed.Assert(group.selection != null); |
---|
3859 | 3959 | SetPinStates(group.selection == null || group.selection.size() > 0); |
---|
.. | .. |
---|
3870 | 3970 | } else if (event.getSource() == editCameraItem) |
---|
3871 | 3971 | { |
---|
3872 | 3972 | cameraView.ProtectCamera(); |
---|
| 3973 | + cameraView.requestFocusInWindow(); |
---|
3873 | 3974 | cameraView.repaint(); |
---|
3874 | 3975 | return; |
---|
3875 | 3976 | } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) |
---|
3876 | 3977 | { |
---|
3877 | 3978 | cameraView.RevertCamera(); |
---|
| 3979 | + cameraView.requestFocusInWindow(); |
---|
3878 | 3980 | cameraView.repaint(); |
---|
3879 | 3981 | return; |
---|
3880 | 3982 | // } else if (event.getSource() == textureButton) |
---|
.. | .. |
---|
5007 | 5109 | |
---|
5008 | 5110 | freezemodel = false; |
---|
5009 | 5111 | } |
---|
5010 | | - |
---|
5011 | | - boolean flashIt = true; |
---|
5012 | | - |
---|
| 5112 | + |
---|
5013 | 5113 | public void valueChanged(TreeSelectionEvent e) |
---|
5014 | 5114 | //public boolean handleEvent(Event event) |
---|
5015 | 5115 | { |
---|
.. | .. |
---|
5082 | 5182 | { |
---|
5083 | 5183 | editButton.setEnabled(enabled); |
---|
5084 | 5184 | uneditButton.setEnabled(enabled); |
---|
5085 | | - unselectButton.setEnabled(enabled); |
---|
| 5185 | + //unselectButton.setEnabled(enabled); |
---|
5086 | 5186 | flashSelectionButton.setEnabled(enabled); |
---|
| 5187 | + |
---|
| 5188 | + clearPanelButton.setEnabled(!listUI.isEmpty()); |
---|
5087 | 5189 | } |
---|
5088 | 5190 | |
---|
5089 | 5191 | void refreshContents(boolean cp) |
---|
5090 | 5192 | { |
---|
5091 | | - if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
| 5193 | + //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
5092 | 5194 | if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
5093 | 5195 | { |
---|
5094 | 5196 | objEditor.ClearInfo(); // .GetMaterial()); |
---|
.. | .. |
---|
5924 | 6026 | |
---|
5925 | 6027 | cButton restoreCameraButton; |
---|
5926 | 6028 | |
---|
5927 | | - cButton saveButton; |
---|
5928 | 6029 | cButton oneStepButton; |
---|
5929 | 6030 | |
---|
5930 | 6031 | cButton groupButton; |
---|