.. | .. |
---|
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, String c, final String t, int count, cGridBag row) |
---|
| 46 | + { |
---|
| 47 | + cButton textureButton; |
---|
| 48 | + final String path = "textures/" + f + "/" + c + "/"; // + t; |
---|
| 49 | + row.add(textureButton = GetButton(path + "icons/" + t, !Grafreed.NIMBUSLAF)); |
---|
| 50 | + textureButton.setToolTipText(c + count); |
---|
| 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) |
---|
| 267 | + { |
---|
| 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) |
---|
253 | 332 | { |
---|
254 | 333 | //cameraView.envyoff = false; |
---|
255 | | - group.skyboxname = name; |
---|
| 334 | + group.skyboxname = skybox; |
---|
256 | 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 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 354 | + { |
---|
| 355 | + Object3D obj = group.selection.get(i); |
---|
| 356 | + obj.SetPigmentTexture("@" + texture); |
---|
| 357 | + } |
---|
| 358 | + |
---|
| 359 | + refreshContents(); |
---|
| 360 | + } |
---|
| 361 | + |
---|
260 | 362 | //ObjEditor objEditor; |
---|
261 | 363 | public void closeUI2() |
---|
262 | 364 | { |
---|
.. | .. |
---|
294 | 396 | this.copy = this.group = group; |
---|
295 | 397 | //selectees = this.group.selectees; |
---|
296 | 398 | |
---|
297 | | - if (copy.versions == null) |
---|
| 399 | + if (copy.versionlist == null) |
---|
298 | 400 | { |
---|
299 | | - copy.versions = new byte[100][]; |
---|
| 401 | + copy.versionlist = new Object3D[100]; |
---|
300 | 402 | copy.versionindex = -1; |
---|
301 | 403 | } |
---|
302 | 404 | |
---|
.. | .. |
---|
321 | 423 | |
---|
322 | 424 | ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true); |
---|
323 | 425 | |
---|
324 | | - if (copy.versions == null) |
---|
| 426 | + if (copy.versionlist == null) |
---|
325 | 427 | { |
---|
326 | | - copy.versions = new byte[100][]; |
---|
| 428 | + copy.versionlist = new Object3D[100]; |
---|
327 | 429 | copy.versionindex = -1; |
---|
328 | 430 | |
---|
329 | 431 | Save(true); |
---|
.. | .. |
---|
797 | 899 | buildToolsMenu(menu); |
---|
798 | 900 | } |
---|
799 | 901 | |
---|
| 902 | + JTabbedPane resourcecontainer; |
---|
| 903 | + cGridBag currenttab; |
---|
| 904 | + boolean added; // patch for jar |
---|
| 905 | + |
---|
| 906 | + int tabcount = 0; |
---|
| 907 | + int colcount = 0; |
---|
| 908 | + int rowcount = 0; |
---|
| 909 | + int texturecount = 0; |
---|
| 910 | + |
---|
| 911 | + int columns = 5; |
---|
| 912 | + int rows = 7; |
---|
| 913 | + |
---|
| 914 | + public void ResourceCallBack(String[] path) |
---|
| 915 | + { |
---|
| 916 | +// for (int i = 0; i < path.length; i++) |
---|
| 917 | +// System.out.print(path[i] + "/"); |
---|
| 918 | +// System.out.println(); |
---|
| 919 | + |
---|
| 920 | + if (//rowcount == 0 || |
---|
| 921 | + path.length == 1) |
---|
| 922 | + { |
---|
| 923 | + currenttab = new cGridBag(); |
---|
| 924 | + added = false; |
---|
| 925 | + String tabname = path[0]; // String.valueOf((char)('A'+tabcount)); |
---|
| 926 | + currenttab.setName(tabname); |
---|
| 927 | + rowcount = 1; |
---|
| 928 | + colcount = 0; |
---|
| 929 | + texturecount = 0; |
---|
| 930 | + } |
---|
| 931 | + |
---|
| 932 | + if (path.length > 2 && path[2].toLowerCase().endsWith(".jpg")) |
---|
| 933 | + { |
---|
| 934 | + if (!added) |
---|
| 935 | + { |
---|
| 936 | + added = true; |
---|
| 937 | + resourcecontainer.add(currenttab); |
---|
| 938 | + String tabname = path[0]; // String.valueOf((char)('A'+tabcount)); |
---|
| 939 | + resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname); |
---|
| 940 | + } |
---|
| 941 | + |
---|
| 942 | + AddTextureButton(path[0], path[1], path[2], texturecount++, currenttab); |
---|
| 943 | + |
---|
| 944 | + if (++colcount >= columns) |
---|
| 945 | + { |
---|
| 946 | + colcount = 0; |
---|
| 947 | + currenttab.Return(); |
---|
| 948 | + |
---|
| 949 | + if (rowcount++ >= rows) |
---|
| 950 | + { |
---|
| 951 | + rowcount = 0; |
---|
| 952 | + } |
---|
| 953 | + } |
---|
| 954 | + } |
---|
| 955 | + else |
---|
| 956 | + { |
---|
| 957 | +// if (!path[path.length-1].equals("icons")) |
---|
| 958 | +// resourcecontainer.Return(); |
---|
| 959 | + } |
---|
| 960 | + } |
---|
| 961 | + |
---|
| 962 | + void CreateTexturePanel(cGridBag container) |
---|
| 963 | + { |
---|
| 964 | + resourcecontainer = new JTabbedPane(JTabbedPane.LEFT); |
---|
| 965 | + container.add(resourcecontainer); |
---|
| 966 | + |
---|
| 967 | + Grafreed.ParseResources("textures", this); |
---|
| 968 | + } |
---|
800 | 969 | |
---|
801 | 970 | void SetupUI2(ObjEditor oe) |
---|
802 | 971 | { |
---|
.. | .. |
---|
869 | 1038 | restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
870 | 1039 | restoreCameraButton.addActionListener(this); |
---|
871 | 1040 | |
---|
872 | | - copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
873 | | - saveButton.setToolTipText("New version"); |
---|
874 | | - saveButton.addActionListener(this); |
---|
| 1041 | + copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1042 | + saveVersionButton.setToolTipText("Duplicate current version"); |
---|
| 1043 | + saveVersionButton.addActionListener(this); |
---|
875 | 1044 | |
---|
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); |
---|
| 1045 | + copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1046 | + deleteVersionButton.setToolTipText("Delete current version"); |
---|
| 1047 | + deleteVersionButton.addActionListener(this); |
---|
| 1048 | + |
---|
| 1049 | + copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1050 | + previousVersionButton.setToolTipText("Previous version"); |
---|
| 1051 | + previousVersionButton.addActionListener(this); |
---|
| 1052 | + previousVersionButton.setEnabled(false); |
---|
880 | 1053 | |
---|
881 | 1054 | cGridBag updown = new cGridBag().setVertical(true); |
---|
882 | 1055 | updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
883 | | - restoreButton.setToolTipText("Restore current"); |
---|
| 1056 | + restoreButton.setToolTipText("Undo (restore current version)"); |
---|
884 | 1057 | restoreButton.addActionListener(this); |
---|
885 | | - restoreButton.setEnabled(false); |
---|
| 1058 | + //restoreButton.setEnabled(false); |
---|
886 | 1059 | |
---|
887 | 1060 | updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
888 | | - replaceButton.setToolTipText("Replace current"); |
---|
| 1061 | + replaceButton.setToolTipText("Save (replace current version)"); |
---|
889 | 1062 | replaceButton.addActionListener(this); |
---|
890 | | - replaceButton.setEnabled(false); |
---|
| 1063 | + //replaceButton.setEnabled(false); |
---|
891 | 1064 | |
---|
892 | 1065 | copyOptionsPanel.add(updown); |
---|
893 | 1066 | |
---|
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); |
---|
| 1067 | + copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1068 | + nextVersionButton.setToolTipText("Next version"); |
---|
| 1069 | + nextVersionButton.addActionListener(this); |
---|
| 1070 | + nextVersionButton.setEnabled(false); |
---|
898 | 1071 | |
---|
899 | 1072 | oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
900 | 1073 | liveCB.setToolTipText("Enable animation"); |
---|
.. | .. |
---|
1028 | 1201 | |
---|
1029 | 1202 | oe.toolboxPanel.add(row2); |
---|
1030 | 1203 | |
---|
1031 | | - // ENVYMAPS |
---|
1032 | | - cGridBag skyboxpane = new cGridBag(); |
---|
1033 | | - skyboxpane.preferredHeight = 100; |
---|
| 1204 | + cGridBag textures = new cGridBag(); |
---|
1034 | 1205 | |
---|
1035 | | - oe.toolboxPanel.add(skyboxpane); |
---|
| 1206 | + CreateTexturePanel(textures); |
---|
1036 | 1207 | |
---|
1037 | | - JTabbedPane skyboxpanel = new JTabbedPane(); |
---|
1038 | | - skyboxpane.add(skyboxpanel); |
---|
| 1208 | + oe.toolboxPanel.add(textures); |
---|
1039 | 1209 | |
---|
1040 | | - AddSkyboxTab0(skyboxpanel); |
---|
1041 | | - AddSkyboxTab1(skyboxpanel); |
---|
1042 | | - AddSkyboxTab2(skyboxpanel); |
---|
| 1210 | + textures.preferredHeight = 100; |
---|
| 1211 | + |
---|
| 1212 | + CreateSkyboxPanel(oe.skyboxPanel); |
---|
1043 | 1213 | |
---|
1044 | 1214 | // EDIT panel |
---|
1045 | 1215 | editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
1047 | 1217 | editButton.addActionListener(this); |
---|
1048 | 1218 | |
---|
1049 | 1219 | editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1050 | | - uneditButton.setToolTipText("Remove selection controls"); |
---|
| 1220 | + uneditButton.setToolTipText("Unpin and remove selection controls"); |
---|
1051 | 1221 | uneditButton.addActionListener(this); |
---|
1052 | 1222 | |
---|
1053 | 1223 | editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
1054 | | - allParamsButton.setToolTipText("Show all controle"); |
---|
| 1224 | + allParamsButton.setToolTipText("Show all controls"); |
---|
1055 | 1225 | allParamsButton.addActionListener(this); |
---|
1056 | 1226 | |
---|
1057 | | - editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1058 | | - clearPanelButton.setToolTipText("Clear edit panel"); |
---|
| 1227 | + editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1228 | + clearPanelButton.setToolTipText("Clear all controls"); |
---|
1059 | 1229 | clearPanelButton.addActionListener(this); |
---|
1060 | 1230 | |
---|
1061 | | - editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1062 | | - unselectButton.setToolTipText("Unselect"); |
---|
1063 | | - unselectButton.addActionListener(this); |
---|
| 1231 | + //editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1232 | + //unselectButton.setToolTipText("Unselect"); |
---|
| 1233 | + //unselectButton.addActionListener(this); |
---|
1064 | 1234 | |
---|
1065 | 1235 | editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1066 | 1236 | flashSelectionButton.setToolTipText("Highlight selection"); |
---|
.. | .. |
---|
1120 | 1290 | dgr.addDragGestureListener(this); |
---|
1121 | 1291 | }catch(Exception e) {} |
---|
1122 | 1292 | */ |
---|
1123 | | - radio.layout = sixButton; // sevenButton; |
---|
| 1293 | + radio.layout = threeButton; // sixButton; |
---|
1124 | 1294 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
1125 | 1295 | } |
---|
1126 | 1296 | |
---|
.. | .. |
---|
1171 | 1341 | smoothCB.setToolTipText("Snapping delay"); |
---|
1172 | 1342 | smoothCB.addItemListener(this); |
---|
1173 | 1343 | |
---|
1174 | | - panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
1175 | | - slowCB.setToolTipText("Smooth interpolation"); |
---|
1176 | | - slowCB.addItemListener(this); |
---|
| 1344 | +// panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
| 1345 | +// slowCB.setToolTipText("Smooth interpolation"); |
---|
| 1346 | +// slowCB.addItemListener(this); |
---|
| 1347 | + panel.add(minshaderCB = new cCheckBox("Min shader", Globals.MINSHADER)); //, constraints); |
---|
| 1348 | + minshaderCB.setToolTipText("Minimal fast shader"); |
---|
| 1349 | + minshaderCB.addItemListener(this); |
---|
1177 | 1350 | |
---|
1178 | 1351 | // constraints.gridy += 1; |
---|
1179 | 1352 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
.. | .. |
---|
1262 | 1435 | } |
---|
1263 | 1436 | |
---|
1264 | 1437 | radioButton.SetObject(obj); |
---|
1265 | | - radioButton.layout = sixButton; // sevenButton; |
---|
| 1438 | + radioButton.layout = threeButton; // sixButton; |
---|
1266 | 1439 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
1267 | 1440 | radioButton.addActionListener(this); |
---|
1268 | 1441 | radioPanel.add(radioButton); |
---|
.. | .. |
---|
1287 | 1460 | cCheckBox localCB; |
---|
1288 | 1461 | cCheckBox crowdCB; |
---|
1289 | 1462 | cCheckBox smoothCB; |
---|
| 1463 | + cCheckBox minshaderCB; |
---|
| 1464 | + |
---|
1290 | 1465 | cToggleButton fastCB; |
---|
1291 | 1466 | cCheckBox slowCB; |
---|
1292 | 1467 | cCheckBox boxCB; |
---|
.. | .. |
---|
1357 | 1532 | { |
---|
1358 | 1533 | cameraView.ToggleInertia(); |
---|
1359 | 1534 | cameraView.repaint(); |
---|
| 1535 | + } |
---|
| 1536 | + else if(e.getSource() == minshaderCB) |
---|
| 1537 | + { |
---|
| 1538 | + Globals.MINSHADER ^= true; |
---|
| 1539 | + cameraView.programInitialized = false; |
---|
| 1540 | + cameraView.repaint(); |
---|
1360 | 1541 | } |
---|
1361 | 1542 | else if(e.getSource() == localCB) |
---|
1362 | 1543 | { |
---|
.. | .. |
---|
2497 | 2678 | if (source == invariantsItem) |
---|
2498 | 2679 | { |
---|
2499 | 2680 | System.out.println("Invariants:"); |
---|
2500 | | - Grafreed.grafreeD.universe.invariants(); |
---|
| 2681 | + Grafreed.grafreed.universe.invariants(); |
---|
2501 | 2682 | } else |
---|
2502 | 2683 | if (source == memoryItem) |
---|
2503 | 2684 | { |
---|
.. | .. |
---|
2528 | 2709 | { |
---|
2529 | 2710 | ToggleFullScreen(); |
---|
2530 | 2711 | } else |
---|
2531 | | - if (source == undoButton) |
---|
| 2712 | + if (source == previousVersionButton) |
---|
2532 | 2713 | { |
---|
2533 | 2714 | // Go to previous version |
---|
2534 | 2715 | //if (!Undo()) |
---|
2535 | 2716 | //java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2536 | | - Undo(); |
---|
| 2717 | + PreviousVersion(); |
---|
2537 | 2718 | } else |
---|
2538 | 2719 | if (source == restoreButton) |
---|
2539 | 2720 | { |
---|
2540 | 2721 | // Restore current version |
---|
2541 | 2722 | Restore(); |
---|
| 2723 | + //restoreButton.setEnabled(false); |
---|
2542 | 2724 | } else |
---|
2543 | 2725 | if (source == replaceButton) |
---|
2544 | 2726 | { |
---|
2545 | 2727 | // Overwrite current version |
---|
2546 | 2728 | Replace(); |
---|
| 2729 | + //replaceButton.setEnabled(false); |
---|
2547 | 2730 | } else |
---|
2548 | | - if (source == redoButton) |
---|
| 2731 | + if (source == nextVersionButton) |
---|
2549 | 2732 | { |
---|
2550 | 2733 | // Go to next version |
---|
2551 | | - Redo(); |
---|
| 2734 | + NextVersion(); |
---|
2552 | 2735 | } else |
---|
2553 | | - if (source == saveButton) |
---|
| 2736 | + if (source == saveVersionButton) |
---|
2554 | 2737 | { |
---|
2555 | 2738 | // Save a new version |
---|
2556 | 2739 | if (!Save(true)) |
---|
2557 | 2740 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 2741 | + } else |
---|
| 2742 | + if (source == deleteVersionButton) |
---|
| 2743 | + { |
---|
| 2744 | + // Delete a new version |
---|
| 2745 | + DeleteVersion(); |
---|
2558 | 2746 | } else |
---|
2559 | 2747 | if (source == oneStepButton) |
---|
2560 | 2748 | { |
---|
.. | .. |
---|
2609 | 2797 | } else |
---|
2610 | 2798 | if (source == undoItem) |
---|
2611 | 2799 | { |
---|
2612 | | - Undo(); |
---|
| 2800 | + PreviousVersion(); |
---|
2613 | 2801 | } else |
---|
2614 | 2802 | if (source == redoItem) |
---|
2615 | 2803 | { |
---|
2616 | | - Redo(); |
---|
| 2804 | + NextVersion(); |
---|
2617 | 2805 | } else |
---|
2618 | 2806 | if (source == duplicateItem) |
---|
2619 | 2807 | { |
---|
.. | .. |
---|
3746 | 3934 | { |
---|
3747 | 3935 | Object3D child = (Object3D)e.nextElement(); |
---|
3748 | 3936 | if(child.editWindow != null) |
---|
3749 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3750 | 3937 | child.pinned = false; |
---|
3751 | 3938 | child.CloseUI(); |
---|
3752 | 3939 | listUI.remove(child); |
---|
| 3940 | +// objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3753 | 3941 | |
---|
3754 | 3942 | //child.editWindow = null; // ??????????? |
---|
3755 | 3943 | } |
---|
.. | .. |
---|
3768 | 3956 | obj.CloseUI(); |
---|
3769 | 3957 | } |
---|
3770 | 3958 | listUI.clear(); |
---|
| 3959 | + SetPinStates(group.selection.size() > 0); |
---|
3771 | 3960 | refreshContents(true); |
---|
3772 | 3961 | } else |
---|
3773 | 3962 | if (source == allParamsButton) |
---|
.. | .. |
---|
3854 | 4043 | radio.layout.doClick(); |
---|
3855 | 4044 | |
---|
3856 | 4045 | ClearUnpinned(); |
---|
| 4046 | + |
---|
3857 | 4047 | //Grafreed.Assert(group != null); |
---|
3858 | 4048 | //Grafreed.Assert(group.selection != null); |
---|
3859 | 4049 | SetPinStates(group.selection == null || group.selection.size() > 0); |
---|
.. | .. |
---|
3870 | 4060 | } else if (event.getSource() == editCameraItem) |
---|
3871 | 4061 | { |
---|
3872 | 4062 | cameraView.ProtectCamera(); |
---|
| 4063 | + cameraView.requestFocusInWindow(); |
---|
3873 | 4064 | cameraView.repaint(); |
---|
3874 | 4065 | return; |
---|
3875 | 4066 | } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) |
---|
3876 | 4067 | { |
---|
3877 | 4068 | cameraView.RevertCamera(); |
---|
| 4069 | + cameraView.requestFocusInWindow(); |
---|
3878 | 4070 | cameraView.repaint(); |
---|
3879 | 4071 | return; |
---|
3880 | 4072 | // } else if (event.getSource() == textureButton) |
---|
.. | .. |
---|
5007 | 5199 | |
---|
5008 | 5200 | freezemodel = false; |
---|
5009 | 5201 | } |
---|
5010 | | - |
---|
5011 | | - boolean flashIt = true; |
---|
5012 | | - |
---|
| 5202 | + |
---|
5013 | 5203 | public void valueChanged(TreeSelectionEvent e) |
---|
5014 | 5204 | //public boolean handleEvent(Event event) |
---|
5015 | 5205 | { |
---|
.. | .. |
---|
5082 | 5272 | { |
---|
5083 | 5273 | editButton.setEnabled(enabled); |
---|
5084 | 5274 | uneditButton.setEnabled(enabled); |
---|
5085 | | - unselectButton.setEnabled(enabled); |
---|
| 5275 | + //unselectButton.setEnabled(enabled); |
---|
5086 | 5276 | flashSelectionButton.setEnabled(enabled); |
---|
| 5277 | + |
---|
| 5278 | + clearPanelButton.setEnabled(!listUI.isEmpty()); |
---|
5087 | 5279 | } |
---|
5088 | 5280 | |
---|
5089 | 5281 | void refreshContents(boolean cp) |
---|
5090 | 5282 | { |
---|
5091 | | - if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
| 5283 | + //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
5092 | 5284 | if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
5093 | 5285 | { |
---|
5094 | 5286 | objEditor.ClearInfo(); // .GetMaterial()); |
---|
.. | .. |
---|
5924 | 6116 | |
---|
5925 | 6117 | cButton restoreCameraButton; |
---|
5926 | 6118 | |
---|
5927 | | - cButton saveButton; |
---|
5928 | 6119 | cButton oneStepButton; |
---|
5929 | 6120 | |
---|
5930 | 6121 | cButton groupButton; |
---|