.. | .. |
---|
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, |
---|
.. | .. |
---|
41 | 42 | }); |
---|
42 | 43 | } |
---|
43 | 44 | |
---|
| 45 | + public void AddTextureButton(String f, final String t, cGridBag row) |
---|
| 46 | + { |
---|
| 47 | + cButton textureButton; |
---|
| 48 | + final String path = "textures/" + f + "/"; // + t; |
---|
| 49 | + row.add(textureButton = GetButton(path + "icons/" + t, !Grafreed.NIMBUSLAF)); |
---|
| 50 | + textureButton.setToolTipText(f + "s"); |
---|
| 51 | + textureButton.addActionListener(new ActionListener() |
---|
| 52 | + { |
---|
| 53 | + @Override |
---|
| 54 | + public void actionPerformed(ActionEvent e) |
---|
| 55 | + { |
---|
| 56 | + ChangeTexture(path + t); |
---|
| 57 | + } |
---|
| 58 | + }); |
---|
| 59 | + } |
---|
| 60 | + |
---|
44 | 61 | public void AddSkyboxTab0(JTabbedPane skyboxpanel) |
---|
45 | 62 | { |
---|
46 | 63 | cGridBag tab0 = new cGridBag().setVertical(true); |
---|
.. | .. |
---|
60 | 77 | //AddSkyboxButton("default", "cornell", row0); |
---|
61 | 78 | AddSkyboxButton("penguins", "dust", row0); |
---|
62 | 79 | AddSkyboxButton("penguins", "tropic", row0); |
---|
63 | | - AddSkyboxButton("default", "skycube", row0); |
---|
| 80 | + AddSkyboxButton("penguins", "yonder", row0); |
---|
64 | 81 | |
---|
65 | 82 | AddSkyboxButton("default", "uffizi", row1); |
---|
66 | 83 | AddSkyboxButton("bridge", "Bridge", row1); |
---|
.. | .. |
---|
90 | 107 | AddSkyboxButton("park", "Skansen3", row6); |
---|
91 | 108 | AddSkyboxButton("park", "Skansen4", row6); |
---|
92 | 109 | AddSkyboxButton("park", "Skansen5", row6); |
---|
93 | | - AddSkyboxButton("park", "Stairs", row6); |
---|
| 110 | + AddSkyboxButton("persson", "VancouverConventionCentre", row6); |
---|
94 | 111 | |
---|
95 | 112 | tab0.add(row0); |
---|
96 | 113 | tab0.add(row1); |
---|
.. | .. |
---|
144 | 161 | |
---|
145 | 162 | AddSkyboxButton("mountain", "Maskonaive2", row4); |
---|
146 | 163 | AddSkyboxButton("mountain", "Maskonaive3", row4); |
---|
147 | | - AddSkyboxButton("mountain", "Ryfjallet", row4); |
---|
148 | 164 | AddSkyboxButton("mountain", "Teide", row4); |
---|
149 | 165 | AddSkyboxButton("park", "Tantolunden4", row4); |
---|
150 | 166 | |
---|
151 | | - AddSkyboxButton("penguins", "wrath", row5); |
---|
152 | | - AddSkyboxButton("penguins", "yonder", row5); |
---|
| 167 | + AddSkyboxButton("park", "Stairs", row5); |
---|
| 168 | + AddSkyboxButton("default", "skycube", row6); |
---|
153 | 169 | AddSkyboxButton("rocky", "Langholmen", row5); |
---|
154 | 170 | AddSkyboxButton("rocky", "Skinnarviksberget", row5); |
---|
155 | | - AddSkyboxButton("rocky", "Tantolunden6", row5); |
---|
156 | 171 | |
---|
| 172 | + AddSkyboxButton("rocky", "Tantolunden6", row5); |
---|
157 | 173 | AddSkyboxButton("default", "CloudyHills", row6); |
---|
158 | 174 | AddSkyboxButton("daz", "Autumn", row6); |
---|
159 | | - AddSkyboxButton("daz", "Greenlands", row6); |
---|
160 | 175 | AddSkyboxButton("daz", "MountainTrail", row6); |
---|
161 | | - AddSkyboxButton("daz", "Oasis", row6); |
---|
162 | 176 | /* |
---|
163 | 177 | Autumn |
---|
164 | 178 | Greenlands |
---|
.. | .. |
---|
210 | 224 | AddSkyboxButton("penguins", "sleepyhollow", row1); |
---|
211 | 225 | |
---|
212 | 226 | AddSkyboxButton("penguins", "kenon_star", row2); |
---|
213 | | - AddSkyboxButton("indoors", "DallasW", row2); |
---|
214 | | - AddSkyboxButton("indoors", "MarriottMadisonWest", row2); |
---|
| 227 | + AddSkyboxButton("persson", "corona", row2); |
---|
| 228 | + AddSkyboxButton("persson", "spaceskybox", row2); |
---|
215 | 229 | AddSkyboxButton("indoors", "Vasa", row2); |
---|
216 | 230 | |
---|
217 | 231 | AddSkyboxButton("winter", "Backyard", row3); |
---|
.. | .. |
---|
232 | 246 | AddSkyboxButton("daz", "TheRock", row6); |
---|
233 | 247 | AddSkyboxButton("daz", "TopOfTheWorld", row6); |
---|
234 | 248 | AddSkyboxButton("daz", "Winter", row6); |
---|
235 | | - AddSkyboxButton("penguins", "desertdawn", row6); |
---|
| 249 | + AddSkyboxButton("mountain", "Ryfjallet", row6); |
---|
236 | 250 | |
---|
237 | 251 | tab0.add(row0); |
---|
238 | 252 | tab0.add(row1); |
---|
.. | .. |
---|
248 | 262 | //tab0.add(new cGridBag()); |
---|
249 | 263 | } |
---|
250 | 264 | } |
---|
251 | | - |
---|
252 | | - public void ChangeSkybox(String name) |
---|
| 265 | + |
---|
| 266 | + public void AddSkyboxTab3(JTabbedPane skyboxpanel) |
---|
253 | 267 | { |
---|
254 | | - cameraView.envyoff = false; |
---|
255 | | - cameraView.skyboxname = name; |
---|
256 | | - cameraView.skyboxext = "jpg"; |
---|
| 268 | + cGridBag tab0 = new cGridBag().setVertical(true); |
---|
| 269 | + |
---|
| 270 | + tab0.setName("Others"); |
---|
| 271 | + skyboxpanel.add(tab0); |
---|
| 272 | + |
---|
| 273 | + cGridBag row0 = new cGridBag(); |
---|
| 274 | + cGridBag row1 = new cGridBag(); |
---|
| 275 | + cGridBag row2 = new cGridBag(); |
---|
| 276 | + cGridBag row3 = new cGridBag(); |
---|
| 277 | + cGridBag row4 = new cGridBag(); |
---|
| 278 | + cGridBag row5 = new cGridBag(); |
---|
| 279 | + cGridBag row6 = new cGridBag(); |
---|
| 280 | + |
---|
| 281 | + AddSkyboxButton("mayhem", "afterrain", row0); |
---|
| 282 | + AddSkyboxButton("mayhem", "aqua4", row0); |
---|
| 283 | + AddSkyboxButton("mayhem", "aqua9", row0); |
---|
| 284 | + AddSkyboxButton("mayhem", "flame", row0); |
---|
| 285 | + |
---|
| 286 | + AddSkyboxButton("mayhem", "h2s", row1); |
---|
| 287 | + AddSkyboxButton("mayhem", "prehistoric", row1); |
---|
| 288 | + AddSkyboxButton("mayhem", "scorched", row1); |
---|
| 289 | + AddSkyboxButton("penguins", "desertdawn", row1); |
---|
| 290 | + |
---|
| 291 | + AddSkyboxButton("persson", "Citadella", row2); |
---|
| 292 | + AddSkyboxButton("persson", "Citadella2", row2); |
---|
| 293 | + AddSkyboxButton("persson", "clouds1", row2); |
---|
| 294 | + AddSkyboxButton("penguins", "wrath", row2); |
---|
| 295 | + |
---|
| 296 | + AddSkyboxButton("persson", "FishermansBastion", row3); |
---|
| 297 | + AddSkyboxButton("persson", "HeroesSquare", row3); |
---|
| 298 | + AddSkyboxButton("indoors", "DallasW", row3); |
---|
| 299 | + AddSkyboxButton("indoors", "MarriottMadisonWest", row3); |
---|
| 300 | + |
---|
| 301 | + AddSkyboxButton("persson", "LancellottiChapel", row4); |
---|
| 302 | + AddSkyboxButton("persson", "PereaBeach1", row4); |
---|
| 303 | + AddSkyboxButton("persson", "PereaBeach2", row4); |
---|
| 304 | + AddSkyboxButton("persson", "redeclipse", row4); |
---|
| 305 | + |
---|
| 306 | + AddSkyboxButton("daz", "Greenlands", row5); |
---|
| 307 | + AddSkyboxButton("daz", "Oasis", row5); |
---|
| 308 | + AddSkyboxButton("elyvisions", "arch3", row5); |
---|
| 309 | + AddSkyboxButton("elyvisions", "calm_sea", row5); |
---|
| 310 | + |
---|
| 311 | + AddSkyboxButton("elyvisions", "rainbow", row6); |
---|
| 312 | + AddSkyboxButton("elyvisions", "distant_sunset", row6); |
---|
| 313 | + AddSkyboxButton("elyvisions", "heaven", row6); |
---|
| 314 | + AddSkyboxButton("elyvisions", "hot", row6); |
---|
| 315 | + |
---|
| 316 | + tab0.add(row0); |
---|
| 317 | + tab0.add(row1); |
---|
| 318 | + tab0.add(row2); |
---|
| 319 | + tab0.add(row3); |
---|
| 320 | + tab0.add(row4); |
---|
| 321 | + tab0.add(row5); |
---|
| 322 | + tab0.add(row6); |
---|
| 323 | + |
---|
| 324 | + for (int i=5; --i>=0;) |
---|
| 325 | + { |
---|
| 326 | + //oe.toolboxPanel.Return(); |
---|
| 327 | + //tab0.add(new cGridBag()); |
---|
| 328 | + } |
---|
| 329 | + } |
---|
| 330 | + |
---|
| 331 | + public void ChangeSkybox(String skybox) |
---|
| 332 | + { |
---|
| 333 | + //cameraView.envyoff = false; |
---|
| 334 | + group.skyboxname = skybox; |
---|
| 335 | + group.skyboxext = "jpg"; |
---|
257 | 336 | cameraView.repaint(); |
---|
258 | 337 | } |
---|
| 338 | + |
---|
| 339 | + public void CreateSkyboxPanel(cGridBag skyboxPanel) |
---|
| 340 | + { |
---|
| 341 | + JTabbedPane skyboxpane = new JTabbedPane(); |
---|
| 342 | + |
---|
| 343 | + AddSkyboxTab0(skyboxpane); |
---|
| 344 | + AddSkyboxTab1(skyboxpane); |
---|
| 345 | + AddSkyboxTab2(skyboxpane); |
---|
| 346 | + AddSkyboxTab3(skyboxpane); |
---|
| 347 | + |
---|
| 348 | + skyboxPanel.add(skyboxpane); |
---|
| 349 | + } |
---|
259 | 350 | |
---|
| 351 | + public void ChangeTexture(String texture) |
---|
| 352 | + { |
---|
| 353 | + cameraView.repaint(); |
---|
| 354 | + } |
---|
| 355 | + |
---|
260 | 356 | //ObjEditor objEditor; |
---|
261 | 357 | public void closeUI2() |
---|
262 | 358 | { |
---|
.. | .. |
---|
294 | 390 | this.copy = this.group = group; |
---|
295 | 391 | //selectees = this.group.selectees; |
---|
296 | 392 | |
---|
297 | | - if (copy.versions == null) |
---|
| 393 | + if (copy.versionlist == null) |
---|
298 | 394 | { |
---|
299 | | - copy.versions = new byte[100][]; |
---|
| 395 | + copy.versionlist = new Object3D[100]; |
---|
300 | 396 | copy.versionindex = -1; |
---|
301 | 397 | } |
---|
302 | 398 | |
---|
.. | .. |
---|
321 | 417 | |
---|
322 | 418 | ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true); |
---|
323 | 419 | |
---|
324 | | - if (copy.versions == null) |
---|
| 420 | + if (copy.versionlist == null) |
---|
325 | 421 | { |
---|
326 | | - copy.versions = new byte[100][]; |
---|
| 422 | + copy.versionlist = new Object3D[100]; |
---|
327 | 423 | copy.versionindex = -1; |
---|
328 | 424 | |
---|
329 | 425 | Save(true); |
---|
.. | .. |
---|
797 | 893 | buildToolsMenu(menu); |
---|
798 | 894 | } |
---|
799 | 895 | |
---|
| 896 | + JTabbedPane resourcecontainer; |
---|
| 897 | + cGridBag currenttab; |
---|
| 898 | + boolean added; // patch for jar |
---|
| 899 | + |
---|
| 900 | + int tabcount = 0; |
---|
| 901 | + int colcount = 0; |
---|
| 902 | + int rowcount = 0; |
---|
| 903 | + |
---|
| 904 | + int columns = 5; |
---|
| 905 | + int rows = 7; |
---|
| 906 | + |
---|
| 907 | + public void ResourceCallBack(String[] path) |
---|
| 908 | + { |
---|
| 909 | + for (int i = 0; i < path.length; i++) |
---|
| 910 | + System.out.print(path[i] + "/"); |
---|
| 911 | + System.out.println(); |
---|
| 912 | + if (rowcount == 0) |
---|
| 913 | + { |
---|
| 914 | + currenttab = new cGridBag(); |
---|
| 915 | + added = false; |
---|
| 916 | + String tabname = String.valueOf((char)('A'+tabcount)); |
---|
| 917 | + currenttab.setName(tabname); |
---|
| 918 | + rowcount = 1; |
---|
| 919 | + } |
---|
| 920 | + |
---|
| 921 | + if (path.length > 1 && path[1].toLowerCase().endsWith(".jpg")) |
---|
| 922 | + { |
---|
| 923 | + if (!added) |
---|
| 924 | + { |
---|
| 925 | + added = true; |
---|
| 926 | + resourcecontainer.add(currenttab); |
---|
| 927 | + String tabname = String.valueOf((char)('A'+tabcount)); |
---|
| 928 | + resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname); |
---|
| 929 | + } |
---|
| 930 | + |
---|
| 931 | + AddTextureButton(path[0], path[1], currenttab); |
---|
| 932 | + if (++colcount >= columns) |
---|
| 933 | + { |
---|
| 934 | + colcount = 0; |
---|
| 935 | + currenttab.Return(); |
---|
| 936 | + |
---|
| 937 | + if (rowcount++ >= rows) |
---|
| 938 | + { |
---|
| 939 | + rowcount = 0; |
---|
| 940 | + } |
---|
| 941 | + } |
---|
| 942 | + } |
---|
| 943 | + else |
---|
| 944 | + { |
---|
| 945 | +// if (!path[path.length-1].equals("icons")) |
---|
| 946 | +// resourcecontainer.Return(); |
---|
| 947 | + } |
---|
| 948 | + } |
---|
| 949 | + |
---|
| 950 | + void CreateTexturePanel(cGridBag container) |
---|
| 951 | + { |
---|
| 952 | + resourcecontainer = new JTabbedPane(); |
---|
| 953 | + container.add(resourcecontainer); |
---|
| 954 | + |
---|
| 955 | + Grafreed.ParseResources("textures", this); |
---|
| 956 | + } |
---|
800 | 957 | |
---|
801 | 958 | void SetupUI2(ObjEditor oe) |
---|
802 | 959 | { |
---|
.. | .. |
---|
869 | 1026 | restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
870 | 1027 | restoreCameraButton.addActionListener(this); |
---|
871 | 1028 | |
---|
872 | | - copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
873 | | - saveButton.setToolTipText("New version"); |
---|
874 | | - saveButton.addActionListener(this); |
---|
| 1029 | + copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1030 | + saveVersionButton.setToolTipText("Duplicate current version"); |
---|
| 1031 | + saveVersionButton.addActionListener(this); |
---|
875 | 1032 | |
---|
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); |
---|
| 1033 | + copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1034 | + deleteVersionButton.setToolTipText("Delete current version"); |
---|
| 1035 | + deleteVersionButton.addActionListener(this); |
---|
| 1036 | + |
---|
| 1037 | + copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1038 | + previousVersionButton.setToolTipText("Previous version"); |
---|
| 1039 | + previousVersionButton.addActionListener(this); |
---|
| 1040 | + previousVersionButton.setEnabled(false); |
---|
880 | 1041 | |
---|
881 | 1042 | cGridBag updown = new cGridBag().setVertical(true); |
---|
882 | 1043 | updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
883 | | - restoreButton.setToolTipText("Restore current"); |
---|
| 1044 | + restoreButton.setToolTipText("Undo (restore current version)"); |
---|
884 | 1045 | restoreButton.addActionListener(this); |
---|
885 | | - restoreButton.setEnabled(false); |
---|
| 1046 | + //restoreButton.setEnabled(false); |
---|
886 | 1047 | |
---|
887 | 1048 | updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
888 | | - replaceButton.setToolTipText("Replace current"); |
---|
| 1049 | + replaceButton.setToolTipText("Save (replace current version)"); |
---|
889 | 1050 | replaceButton.addActionListener(this); |
---|
890 | | - replaceButton.setEnabled(false); |
---|
| 1051 | + //replaceButton.setEnabled(false); |
---|
891 | 1052 | |
---|
892 | 1053 | copyOptionsPanel.add(updown); |
---|
893 | 1054 | |
---|
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); |
---|
| 1055 | + copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1056 | + nextVersionButton.setToolTipText("Next version"); |
---|
| 1057 | + nextVersionButton.addActionListener(this); |
---|
| 1058 | + nextVersionButton.setEnabled(false); |
---|
898 | 1059 | |
---|
899 | 1060 | oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
900 | 1061 | liveCB.setToolTipText("Enable animation"); |
---|
.. | .. |
---|
1028 | 1189 | |
---|
1029 | 1190 | oe.toolboxPanel.add(row2); |
---|
1030 | 1191 | |
---|
1031 | | - // ENVYMAPS |
---|
1032 | | - cGridBag skyboxpane = new cGridBag(); |
---|
1033 | | - skyboxpane.preferredHeight = 100; |
---|
| 1192 | + cGridBag textures = new cGridBag(); |
---|
1034 | 1193 | |
---|
1035 | | - oe.toolboxPanel.add(skyboxpane); |
---|
| 1194 | + CreateTexturePanel(textures); |
---|
1036 | 1195 | |
---|
1037 | | - JTabbedPane skyboxpanel = new JTabbedPane(); |
---|
1038 | | - skyboxpane.add(skyboxpanel); |
---|
| 1196 | + oe.toolboxPanel.add(textures); |
---|
1039 | 1197 | |
---|
1040 | | - AddSkyboxTab0(skyboxpanel); |
---|
1041 | | - AddSkyboxTab1(skyboxpanel); |
---|
1042 | | - AddSkyboxTab2(skyboxpanel); |
---|
| 1198 | + textures.preferredHeight = 100; |
---|
| 1199 | + |
---|
| 1200 | + CreateSkyboxPanel(oe.skyboxPanel); |
---|
1043 | 1201 | |
---|
1044 | 1202 | // EDIT panel |
---|
1045 | 1203 | editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
1047 | 1205 | editButton.addActionListener(this); |
---|
1048 | 1206 | |
---|
1049 | 1207 | editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1050 | | - uneditButton.setToolTipText("Remove selection controls"); |
---|
| 1208 | + uneditButton.setToolTipText("Unpin and remove selection controls"); |
---|
1051 | 1209 | uneditButton.addActionListener(this); |
---|
1052 | 1210 | |
---|
1053 | 1211 | editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
1054 | | - allParamsButton.setToolTipText("Show all controle"); |
---|
| 1212 | + allParamsButton.setToolTipText("Show all controls"); |
---|
1055 | 1213 | allParamsButton.addActionListener(this); |
---|
1056 | 1214 | |
---|
1057 | | - editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1058 | | - clearPanelButton.setToolTipText("Clear edit panel"); |
---|
| 1215 | + editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1216 | + clearPanelButton.setToolTipText("Clear all controls"); |
---|
1059 | 1217 | clearPanelButton.addActionListener(this); |
---|
1060 | 1218 | |
---|
1061 | | - editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1062 | | - unselectButton.setToolTipText("Unselect"); |
---|
1063 | | - unselectButton.addActionListener(this); |
---|
| 1219 | + //editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1220 | + //unselectButton.setToolTipText("Unselect"); |
---|
| 1221 | + //unselectButton.addActionListener(this); |
---|
1064 | 1222 | |
---|
1065 | 1223 | editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1066 | 1224 | flashSelectionButton.setToolTipText("Highlight selection"); |
---|
.. | .. |
---|
1120 | 1278 | dgr.addDragGestureListener(this); |
---|
1121 | 1279 | }catch(Exception e) {} |
---|
1122 | 1280 | */ |
---|
1123 | | - radio.layout = sixButton; // sevenButton; |
---|
| 1281 | + radio.layout = threeButton; // sixButton; |
---|
1124 | 1282 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
1125 | 1283 | } |
---|
1126 | 1284 | |
---|
.. | .. |
---|
1171 | 1329 | smoothCB.setToolTipText("Snapping delay"); |
---|
1172 | 1330 | smoothCB.addItemListener(this); |
---|
1173 | 1331 | |
---|
1174 | | - panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
1175 | | - slowCB.setToolTipText("Smooth interpolation"); |
---|
1176 | | - slowCB.addItemListener(this); |
---|
| 1332 | +// panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
| 1333 | +// slowCB.setToolTipText("Smooth interpolation"); |
---|
| 1334 | +// slowCB.addItemListener(this); |
---|
| 1335 | + panel.add(minshaderCB = new cCheckBox("Min shader", Globals.MINSHADER)); //, constraints); |
---|
| 1336 | + minshaderCB.setToolTipText("Minimal fast shader"); |
---|
| 1337 | + minshaderCB.addItemListener(this); |
---|
1177 | 1338 | |
---|
1178 | 1339 | // constraints.gridy += 1; |
---|
1179 | 1340 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
.. | .. |
---|
1262 | 1423 | } |
---|
1263 | 1424 | |
---|
1264 | 1425 | radioButton.SetObject(obj); |
---|
1265 | | - radioButton.layout = sixButton; // sevenButton; |
---|
| 1426 | + radioButton.layout = threeButton; // sixButton; |
---|
1266 | 1427 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
1267 | 1428 | radioButton.addActionListener(this); |
---|
1268 | 1429 | radioPanel.add(radioButton); |
---|
.. | .. |
---|
1287 | 1448 | cCheckBox localCB; |
---|
1288 | 1449 | cCheckBox crowdCB; |
---|
1289 | 1450 | cCheckBox smoothCB; |
---|
| 1451 | + cCheckBox minshaderCB; |
---|
| 1452 | + |
---|
1290 | 1453 | cToggleButton fastCB; |
---|
1291 | 1454 | cCheckBox slowCB; |
---|
1292 | 1455 | cCheckBox boxCB; |
---|
.. | .. |
---|
1357 | 1520 | { |
---|
1358 | 1521 | cameraView.ToggleInertia(); |
---|
1359 | 1522 | cameraView.repaint(); |
---|
| 1523 | + } |
---|
| 1524 | + else if(e.getSource() == minshaderCB) |
---|
| 1525 | + { |
---|
| 1526 | + Globals.MINSHADER ^= true; |
---|
| 1527 | + cameraView.programInitialized = false; |
---|
| 1528 | + cameraView.repaint(); |
---|
1360 | 1529 | } |
---|
1361 | 1530 | else if(e.getSource() == localCB) |
---|
1362 | 1531 | { |
---|
.. | .. |
---|
2497 | 2666 | if (source == invariantsItem) |
---|
2498 | 2667 | { |
---|
2499 | 2668 | System.out.println("Invariants:"); |
---|
2500 | | - Grafreed.grafreeD.universe.invariants(); |
---|
| 2669 | + Grafreed.grafreed.universe.invariants(); |
---|
2501 | 2670 | } else |
---|
2502 | 2671 | if (source == memoryItem) |
---|
2503 | 2672 | { |
---|
.. | .. |
---|
2528 | 2697 | { |
---|
2529 | 2698 | ToggleFullScreen(); |
---|
2530 | 2699 | } else |
---|
2531 | | - if (source == undoButton) |
---|
| 2700 | + if (source == previousVersionButton) |
---|
2532 | 2701 | { |
---|
2533 | 2702 | // Go to previous version |
---|
2534 | 2703 | //if (!Undo()) |
---|
2535 | 2704 | //java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2536 | | - Undo(); |
---|
| 2705 | + PreviousVersion(); |
---|
2537 | 2706 | } else |
---|
2538 | 2707 | if (source == restoreButton) |
---|
2539 | 2708 | { |
---|
2540 | 2709 | // Restore current version |
---|
2541 | 2710 | Restore(); |
---|
| 2711 | + //restoreButton.setEnabled(false); |
---|
2542 | 2712 | } else |
---|
2543 | 2713 | if (source == replaceButton) |
---|
2544 | 2714 | { |
---|
2545 | 2715 | // Overwrite current version |
---|
2546 | 2716 | Replace(); |
---|
| 2717 | + //replaceButton.setEnabled(false); |
---|
2547 | 2718 | } else |
---|
2548 | | - if (source == redoButton) |
---|
| 2719 | + if (source == nextVersionButton) |
---|
2549 | 2720 | { |
---|
2550 | 2721 | // Go to next version |
---|
2551 | | - Redo(); |
---|
| 2722 | + NextVersion(); |
---|
2552 | 2723 | } else |
---|
2553 | | - if (source == saveButton) |
---|
| 2724 | + if (source == saveVersionButton) |
---|
2554 | 2725 | { |
---|
2555 | 2726 | // Save a new version |
---|
2556 | 2727 | if (!Save(true)) |
---|
2557 | 2728 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 2729 | + } else |
---|
| 2730 | + if (source == deleteVersionButton) |
---|
| 2731 | + { |
---|
| 2732 | + // Delete a new version |
---|
| 2733 | + DeleteVersion(); |
---|
2558 | 2734 | } else |
---|
2559 | 2735 | if (source == oneStepButton) |
---|
2560 | 2736 | { |
---|
.. | .. |
---|
2609 | 2785 | } else |
---|
2610 | 2786 | if (source == undoItem) |
---|
2611 | 2787 | { |
---|
2612 | | - Undo(); |
---|
| 2788 | + PreviousVersion(); |
---|
2613 | 2789 | } else |
---|
2614 | 2790 | if (source == redoItem) |
---|
2615 | 2791 | { |
---|
2616 | | - Redo(); |
---|
| 2792 | + NextVersion(); |
---|
2617 | 2793 | } else |
---|
2618 | 2794 | if (source == duplicateItem) |
---|
2619 | 2795 | { |
---|
.. | .. |
---|
3746 | 3922 | { |
---|
3747 | 3923 | Object3D child = (Object3D)e.nextElement(); |
---|
3748 | 3924 | if(child.editWindow != null) |
---|
3749 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3750 | 3925 | child.pinned = false; |
---|
3751 | 3926 | child.CloseUI(); |
---|
3752 | 3927 | listUI.remove(child); |
---|
| 3928 | +// objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3753 | 3929 | |
---|
3754 | 3930 | //child.editWindow = null; // ??????????? |
---|
3755 | 3931 | } |
---|
.. | .. |
---|
3768 | 3944 | obj.CloseUI(); |
---|
3769 | 3945 | } |
---|
3770 | 3946 | listUI.clear(); |
---|
| 3947 | + SetPinStates(group.selection.size() > 0); |
---|
3771 | 3948 | refreshContents(true); |
---|
3772 | 3949 | } else |
---|
3773 | 3950 | if (source == allParamsButton) |
---|
.. | .. |
---|
3854 | 4031 | radio.layout.doClick(); |
---|
3855 | 4032 | |
---|
3856 | 4033 | ClearUnpinned(); |
---|
| 4034 | + |
---|
3857 | 4035 | //Grafreed.Assert(group != null); |
---|
3858 | 4036 | //Grafreed.Assert(group.selection != null); |
---|
3859 | 4037 | SetPinStates(group.selection == null || group.selection.size() > 0); |
---|
.. | .. |
---|
3870 | 4048 | } else if (event.getSource() == editCameraItem) |
---|
3871 | 4049 | { |
---|
3872 | 4050 | cameraView.ProtectCamera(); |
---|
| 4051 | + cameraView.requestFocusInWindow(); |
---|
3873 | 4052 | cameraView.repaint(); |
---|
3874 | 4053 | return; |
---|
3875 | 4054 | } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) |
---|
3876 | 4055 | { |
---|
3877 | 4056 | cameraView.RevertCamera(); |
---|
| 4057 | + cameraView.requestFocusInWindow(); |
---|
3878 | 4058 | cameraView.repaint(); |
---|
3879 | 4059 | return; |
---|
3880 | 4060 | // } else if (event.getSource() == textureButton) |
---|
.. | .. |
---|
5007 | 5187 | |
---|
5008 | 5188 | freezemodel = false; |
---|
5009 | 5189 | } |
---|
5010 | | - |
---|
5011 | | - boolean flashIt = true; |
---|
5012 | | - |
---|
| 5190 | + |
---|
5013 | 5191 | public void valueChanged(TreeSelectionEvent e) |
---|
5014 | 5192 | //public boolean handleEvent(Event event) |
---|
5015 | 5193 | { |
---|
.. | .. |
---|
5082 | 5260 | { |
---|
5083 | 5261 | editButton.setEnabled(enabled); |
---|
5084 | 5262 | uneditButton.setEnabled(enabled); |
---|
5085 | | - unselectButton.setEnabled(enabled); |
---|
| 5263 | + //unselectButton.setEnabled(enabled); |
---|
5086 | 5264 | flashSelectionButton.setEnabled(enabled); |
---|
| 5265 | + |
---|
| 5266 | + clearPanelButton.setEnabled(!listUI.isEmpty()); |
---|
5087 | 5267 | } |
---|
5088 | 5268 | |
---|
5089 | 5269 | void refreshContents(boolean cp) |
---|
5090 | 5270 | { |
---|
5091 | | - if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
| 5271 | + //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
5092 | 5272 | if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
5093 | 5273 | { |
---|
5094 | 5274 | objEditor.ClearInfo(); // .GetMaterial()); |
---|
.. | .. |
---|
5924 | 6104 | |
---|
5925 | 6105 | cButton restoreCameraButton; |
---|
5926 | 6106 | |
---|
5927 | | - cButton saveButton; |
---|
5928 | 6107 | cButton oneStepButton; |
---|
5929 | 6108 | |
---|
5930 | 6109 | cButton groupButton; |
---|