.. | .. |
---|
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, |
---|
.. | .. |
---|
28 | 29 | { |
---|
29 | 30 | cButton skyboxButton; |
---|
30 | 31 | final String path = "cubemaps/" + f + "-skyboxes/" + s; |
---|
31 | | - //row.add(skyboxButton = GetButton(path + "/" + s + ".jpg", !Grafreed.NIMBUSLAF)); |
---|
32 | | - row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF)); |
---|
| 32 | + row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.NIMBUSLAF)); |
---|
| 33 | + //row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF)); |
---|
33 | 34 | skyboxButton.setToolTipText(s); |
---|
34 | 35 | skyboxButton.addActionListener(new ActionListener() |
---|
35 | 36 | { |
---|
.. | .. |
---|
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); |
---|
.. | .. |
---|
57 | 74 | cGridBag row6 = new cGridBag(); |
---|
58 | 75 | |
---|
59 | 76 | AddSkyboxButton("default", "rgb", row0); |
---|
60 | | - AddSkyboxButton("default", "cornell", row0); |
---|
61 | | - AddSkyboxButton("default", "uffizi", row0); |
---|
62 | | - AddSkyboxButton("default", "CloudyHills", row0); |
---|
63 | | - |
---|
64 | | - AddSkyboxButton("default", "skycube", row1); |
---|
| 77 | + //AddSkyboxButton("default", "cornell", row0); |
---|
| 78 | + AddSkyboxButton("penguins", "dust", row0); |
---|
| 79 | + AddSkyboxButton("penguins", "tropic", row0); |
---|
| 80 | + AddSkyboxButton("penguins", "yonder", row0); |
---|
| 81 | + |
---|
| 82 | + AddSkyboxButton("default", "uffizi", row1); |
---|
65 | 83 | AddSkyboxButton("bridge", "Bridge", row1); |
---|
66 | 84 | AddSkyboxButton("bridge", "Bridge2", row1); |
---|
67 | 85 | AddSkyboxButton("urban", "GamlaStan2", row1); |
---|
.. | .. |
---|
73 | 91 | |
---|
74 | 92 | AddSkyboxButton("urban", "SaintLazarusChurch3", row3); |
---|
75 | 93 | AddSkyboxButton("urban", "UnionSquare", row3); |
---|
| 94 | + AddSkyboxButton("urban", "Medborgarplatsen", row3); |
---|
76 | 95 | AddSkyboxButton("park", "BerzeliiPark", row3); |
---|
77 | | - AddSkyboxButton("park", "Buddha", row3); |
---|
78 | 96 | |
---|
| 97 | + AddSkyboxButton("park", "Buddha", row4); |
---|
79 | 98 | AddSkyboxButton("park", "CNTower2", row4); |
---|
80 | 99 | AddSkyboxButton("park", "NiagaraFalls1", row4); |
---|
81 | 100 | AddSkyboxButton("park", "NiagaraFalls3", row4); |
---|
82 | | - AddSkyboxButton("park", "Park", row4); |
---|
83 | 101 | |
---|
| 102 | + AddSkyboxButton("park", "Park", row5); |
---|
84 | 103 | AddSkyboxButton("park", "Pond", row5); |
---|
85 | 104 | AddSkyboxButton("park", "Skansen", row5); |
---|
86 | 105 | AddSkyboxButton("park", "Skansen2", row5); |
---|
87 | | - AddSkyboxButton("park", "Skansen3", row5); |
---|
88 | 106 | |
---|
| 107 | + AddSkyboxButton("park", "Skansen3", row6); |
---|
89 | 108 | AddSkyboxButton("park", "Skansen4", row6); |
---|
90 | 109 | AddSkyboxButton("park", "Skansen5", row6); |
---|
91 | | - AddSkyboxButton("park", "Stairs", row6); |
---|
92 | | - AddSkyboxButton("park", "Tantolunden4", row6); |
---|
| 110 | + AddSkyboxButton("persson", "VancouverConventionCentre", row6); |
---|
93 | 111 | |
---|
94 | 112 | tab0.add(row0); |
---|
95 | 113 | tab0.add(row1); |
---|
.. | .. |
---|
140 | 158 | AddSkyboxButton("forest", "Langholmen2", row3); |
---|
141 | 159 | AddSkyboxButton("forest", "Plants", row3); |
---|
142 | 160 | AddSkyboxButton("mountain", "Maskonaive", row3); |
---|
| 161 | + |
---|
143 | 162 | AddSkyboxButton("mountain", "Maskonaive2", row4); |
---|
144 | | - |
---|
145 | 163 | AddSkyboxButton("mountain", "Maskonaive3", row4); |
---|
146 | | - AddSkyboxButton("mountain", "Ryfjallet", row4); |
---|
147 | | - AddSkyboxButton("mountain", "Teide", row4); |
---|
| 164 | + AddSkyboxButton("mountain", "Teide", row4); |
---|
| 165 | + AddSkyboxButton("park", "Tantolunden4", row4); |
---|
148 | 166 | |
---|
| 167 | + AddSkyboxButton("park", "Stairs", row5); |
---|
| 168 | + AddSkyboxButton("default", "skycube", row6); |
---|
149 | 169 | AddSkyboxButton("rocky", "Langholmen", row5); |
---|
150 | | - AddSkyboxButton("rocky", "Riddarfjarden", row5); |
---|
151 | 170 | AddSkyboxButton("rocky", "Skinnarviksberget", row5); |
---|
| 171 | + |
---|
152 | 172 | AddSkyboxButton("rocky", "Tantolunden6", row5); |
---|
| 173 | + AddSkyboxButton("default", "CloudyHills", row6); |
---|
| 174 | + AddSkyboxButton("daz", "Autumn", row6); |
---|
| 175 | + AddSkyboxButton("daz", "MountainTrail", row6); |
---|
153 | 176 | /* |
---|
154 | | -Kastellholmen |
---|
155 | | -Langholmen |
---|
156 | | -Riddarfjarden |
---|
157 | | -Skinnarviksberget |
---|
158 | | -Tanto |
---|
159 | | -Tantolunden2 |
---|
160 | | -Tantolunden6 |
---|
| 177 | +Autumn |
---|
| 178 | +Greenlands |
---|
| 179 | +MountainTrail |
---|
| 180 | +Oasis |
---|
| 181 | +TheRock |
---|
| 182 | +TopOfTheWorld |
---|
| 183 | +Winter |
---|
161 | 184 | */ |
---|
162 | 185 | |
---|
163 | 186 | tab0.add(row0); |
---|
.. | .. |
---|
197 | 220 | |
---|
198 | 221 | AddSkyboxButton("urban", "CNTower", row1); |
---|
199 | 222 | AddSkyboxButton("bridge", "ArstaBridge", row1); |
---|
200 | | - AddSkyboxButton("indoors", "DallasW", row1); |
---|
201 | | - AddSkyboxButton("indoors", "MarriottMadisonWest", row1); |
---|
| 223 | + AddSkyboxButton("rocky", "Riddarfjarden", row1); |
---|
| 224 | + AddSkyboxButton("penguins", "sleepyhollow", row1); |
---|
202 | 225 | |
---|
| 226 | + AddSkyboxButton("penguins", "kenon_star", row2); |
---|
| 227 | + AddSkyboxButton("persson", "corona", row2); |
---|
| 228 | + AddSkyboxButton("persson", "spaceskybox", row2); |
---|
203 | 229 | AddSkyboxButton("indoors", "Vasa", row2); |
---|
204 | | - AddSkyboxButton("winter", "Backyard", row2); |
---|
205 | | - AddSkyboxButton("winter", "Creek", row2); |
---|
206 | | - AddSkyboxButton("winter", "FootballField3", row2); |
---|
207 | 230 | |
---|
| 231 | + AddSkyboxButton("winter", "Backyard", row3); |
---|
| 232 | + AddSkyboxButton("winter", "Creek", row3); |
---|
| 233 | + AddSkyboxButton("winter", "FootballField3", row3); |
---|
208 | 234 | AddSkyboxButton("winter", "Forest", row3); |
---|
209 | | - AddSkyboxButton("winter", "HornstullsStrand2", row3); |
---|
210 | | - AddSkyboxButton("winter", "House", row3); |
---|
211 | | - AddSkyboxButton("winter", "IceLake", row3); |
---|
212 | 235 | |
---|
| 236 | + AddSkyboxButton("winter", "HornstullsStrand2", row4); |
---|
| 237 | + AddSkyboxButton("winter", "House", row4); |
---|
| 238 | + AddSkyboxButton("winter", "IceLake", row4); |
---|
213 | 239 | AddSkyboxButton("winter", "IceRiver", row4); |
---|
214 | | - AddSkyboxButton("winter", "Park3", row4); |
---|
215 | | - AddSkyboxButton("winter", "PondWinter", row4); |
---|
216 | 240 | |
---|
| 241 | + AddSkyboxButton("winter", "Park3", row5); |
---|
| 242 | + AddSkyboxButton("winter", "PondWinter", row5); |
---|
217 | 243 | AddSkyboxButton("winter", "Tantolunden5", row5); |
---|
218 | 244 | AddSkyboxButton("winter", "Vindelalven", row5); |
---|
219 | | - /* |
---|
220 | | -Backyard |
---|
221 | | -Creek |
---|
222 | | -FootballField3 |
---|
223 | | -Forest |
---|
224 | | -HornstullsStrand2 |
---|
225 | | -House |
---|
226 | | -IceLake |
---|
227 | | -IceRiver |
---|
228 | | -Park3 |
---|
229 | | -PondWinter |
---|
230 | | -Tantolunden5 |
---|
231 | | -Vindelalven * |
---|
232 | | - */ |
---|
| 245 | + |
---|
| 246 | + AddSkyboxButton("daz", "TheRock", row6); |
---|
| 247 | + AddSkyboxButton("daz", "TopOfTheWorld", row6); |
---|
| 248 | + AddSkyboxButton("daz", "Winter", row6); |
---|
| 249 | + AddSkyboxButton("mountain", "Ryfjallet", row6); |
---|
233 | 250 | |
---|
234 | 251 | tab0.add(row0); |
---|
235 | 252 | tab0.add(row1); |
---|
.. | .. |
---|
245 | 262 | //tab0.add(new cGridBag()); |
---|
246 | 263 | } |
---|
247 | 264 | } |
---|
248 | | - |
---|
249 | | - public void ChangeSkybox(String name) |
---|
| 265 | + |
---|
| 266 | + public void AddSkyboxTab3(JTabbedPane skyboxpanel) |
---|
250 | 267 | { |
---|
251 | | - cameraView.envyoff = false; |
---|
252 | | - cameraView.skyboxname = name; |
---|
253 | | - 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"; |
---|
254 | 336 | cameraView.repaint(); |
---|
255 | 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 | + } |
---|
256 | 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 | + |
---|
| 362 | + public void Show3DView() |
---|
| 363 | + { |
---|
| 364 | + // bug |
---|
| 365 | + //gridPanel.setDividerLocation(1.0); |
---|
| 366 | + //bigPanel.setDividerLocation(0.0); |
---|
| 367 | + bigThree.ClearUI(); |
---|
| 368 | + bigThree.add(centralPanel); |
---|
| 369 | + bigThree.FlushUI(); |
---|
| 370 | + } |
---|
| 371 | + |
---|
257 | 372 | //ObjEditor objEditor; |
---|
258 | 373 | public void closeUI2() |
---|
259 | 374 | { |
---|
.. | .. |
---|
291 | 406 | this.copy = this.group = group; |
---|
292 | 407 | //selectees = this.group.selectees; |
---|
293 | 408 | |
---|
294 | | - if (copy.versions == null) |
---|
| 409 | + if (copy.versionlist == null) |
---|
295 | 410 | { |
---|
296 | | - copy.versions = new byte[100][]; |
---|
| 411 | + copy.versionlist = new Object3D[100]; |
---|
297 | 412 | copy.versionindex = -1; |
---|
298 | 413 | } |
---|
299 | 414 | |
---|
.. | .. |
---|
318 | 433 | |
---|
319 | 434 | ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true); |
---|
320 | 435 | |
---|
321 | | - if (copy.versions == null) |
---|
| 436 | + if (copy.versionlist == null) |
---|
322 | 437 | { |
---|
323 | | - copy.versions = new byte[100][]; |
---|
| 438 | + copy.versionlist = new Object3D[100]; |
---|
324 | 439 | copy.versionindex = -1; |
---|
325 | 440 | |
---|
326 | 441 | Save(true); |
---|
.. | .. |
---|
794 | 909 | buildToolsMenu(menu); |
---|
795 | 910 | } |
---|
796 | 911 | |
---|
| 912 | + JTabbedPane resourcecontainer; |
---|
| 913 | + cGridBag currenttab; |
---|
| 914 | + boolean added; // patch for jar |
---|
| 915 | + |
---|
| 916 | + int tabcount = 0; |
---|
| 917 | + int colcount = 0; |
---|
| 918 | + int rowcount = 0; |
---|
| 919 | + int texturecount = 0; |
---|
| 920 | + |
---|
| 921 | + int columns = 5; |
---|
| 922 | + int rows = 7; |
---|
| 923 | + |
---|
| 924 | + public void ResourceCallBack(String[] path) |
---|
| 925 | + { |
---|
| 926 | +// for (int i = 0; i < path.length; i++) |
---|
| 927 | +// System.out.print(path[i] + "/"); |
---|
| 928 | +// System.out.println(); |
---|
| 929 | + |
---|
| 930 | + if (//rowcount == 0 || |
---|
| 931 | + path.length == 1) |
---|
| 932 | + { |
---|
| 933 | + currenttab = new cGridBag(); |
---|
| 934 | + added = false; |
---|
| 935 | + String tabname = path[0]; // String.valueOf((char)('A'+tabcount)); |
---|
| 936 | + currenttab.setName(tabname); |
---|
| 937 | + rowcount = 1; |
---|
| 938 | + colcount = 0; |
---|
| 939 | + texturecount = 0; |
---|
| 940 | + } |
---|
| 941 | + |
---|
| 942 | + if (path.length > 2 && path[2].toLowerCase().endsWith(".jpg")) |
---|
| 943 | + { |
---|
| 944 | + if (!added) |
---|
| 945 | + { |
---|
| 946 | + added = true; |
---|
| 947 | + resourcecontainer.add(currenttab); |
---|
| 948 | + String tabname = path[0]; // String.valueOf((char)('A'+tabcount)); |
---|
| 949 | + resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname); |
---|
| 950 | + } |
---|
| 951 | + |
---|
| 952 | + AddTextureButton(path[0], path[1], path[2], texturecount++, currenttab); |
---|
| 953 | + |
---|
| 954 | + if (++colcount >= columns) |
---|
| 955 | + { |
---|
| 956 | + colcount = 0; |
---|
| 957 | + currenttab.Return(); |
---|
| 958 | + |
---|
| 959 | + if (rowcount++ >= rows) |
---|
| 960 | + { |
---|
| 961 | + rowcount = 0; |
---|
| 962 | + } |
---|
| 963 | + } |
---|
| 964 | + } |
---|
| 965 | + else |
---|
| 966 | + { |
---|
| 967 | +// if (!path[path.length-1].equals("icons")) |
---|
| 968 | +// resourcecontainer.Return(); |
---|
| 969 | + } |
---|
| 970 | + } |
---|
| 971 | + |
---|
| 972 | + void CreateTexturePanel(cGridBag container) |
---|
| 973 | + { |
---|
| 974 | + resourcecontainer = new JTabbedPane(JTabbedPane.LEFT); |
---|
| 975 | + container.add(resourcecontainer); |
---|
| 976 | + |
---|
| 977 | + Grafreed.ParseResources("textures", this); |
---|
| 978 | + } |
---|
797 | 979 | |
---|
798 | 980 | void SetupUI2(ObjEditor oe) |
---|
799 | 981 | { |
---|
.. | .. |
---|
812 | 994 | //new Exception().printStackTrace(); |
---|
813 | 995 | |
---|
814 | 996 | oe.radioPanel = new JPanel(new GridBagLayout()); |
---|
815 | | - oe.aConstraints.weightx = 1; |
---|
816 | | - oe.aConstraints.weighty = 0; |
---|
817 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
818 | | - oe.aConstraints.gridwidth = 100; |
---|
819 | | - oe.aConstraints.gridheight = 1; |
---|
820 | 997 | // oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
821 | 998 | |
---|
822 | 999 | oe.buttonGroup = new ButtonGroup(); |
---|
.. | .. |
---|
854 | 1031 | maxButton.addActionListener(this); |
---|
855 | 1032 | } |
---|
856 | 1033 | |
---|
| 1034 | + cButton gcButton; |
---|
| 1035 | + |
---|
| 1036 | + oe.toolbarPanel.add(gcButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1037 | + gcButton.setToolTipText("Garbage collect"); |
---|
| 1038 | + gcButton.addActionListener(new ActionListener() |
---|
| 1039 | + { |
---|
| 1040 | + public void actionPerformed(ActionEvent e) |
---|
| 1041 | + { |
---|
| 1042 | + System.gc(); |
---|
| 1043 | + } |
---|
| 1044 | + }); |
---|
| 1045 | + |
---|
| 1046 | + oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1047 | + collapseButton.setToolTipText("Collapse toolbar"); |
---|
| 1048 | + collapseButton.addActionListener(this); |
---|
| 1049 | + |
---|
| 1050 | + oe.toolbarPanel.add(maximize3DButton = GetButton("", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1051 | + maximize3DButton.setToolTipText("Maximize 3D view"); |
---|
| 1052 | + maximize3DButton.addActionListener(this); |
---|
| 1053 | + |
---|
| 1054 | + oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1055 | + twoButton.setToolTipText("Show 3D view only"); |
---|
| 1056 | + twoButton.addActionListener(this); |
---|
| 1057 | + this.fullscreenLayout = twoButton; |
---|
| 1058 | + |
---|
| 1059 | + oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1060 | + threeButton.setToolTipText("Show controls and 3D view"); |
---|
| 1061 | + threeButton.addActionListener(this); |
---|
| 1062 | + if (Globals.ADVANCED) |
---|
| 1063 | + { |
---|
| 1064 | + oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1065 | + sixButton.setToolTipText("Show 3D view and controls"); |
---|
| 1066 | + sixButton.addActionListener(this); |
---|
| 1067 | + } |
---|
| 1068 | +// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1069 | +// sevenButton.setToolTipText("3-column layout"); |
---|
| 1070 | +// sevenButton.addActionListener(this); |
---|
| 1071 | + // |
---|
| 1072 | + |
---|
857 | 1073 | oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
858 | 1074 | fullButton.setToolTipText("Full-screen window"); |
---|
859 | 1075 | fullButton.addActionListener(this); |
---|
.. | .. |
---|
866 | 1082 | restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
867 | 1083 | restoreCameraButton.addActionListener(this); |
---|
868 | 1084 | |
---|
869 | | - copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
870 | | - saveButton.setToolTipText("New version"); |
---|
871 | | - saveButton.addActionListener(this); |
---|
| 1085 | + copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1086 | + saveVersionButton.setToolTipText("Duplicate current version"); |
---|
| 1087 | + saveVersionButton.addActionListener(this); |
---|
872 | 1088 | |
---|
873 | | - copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
874 | | - undoButton.setToolTipText("Previous version"); |
---|
875 | | - undoButton.addActionListener(this); |
---|
876 | | - undoButton.setEnabled(false); |
---|
| 1089 | + copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1090 | + deleteVersionButton.setToolTipText("Delete current version"); |
---|
| 1091 | + deleteVersionButton.addActionListener(this); |
---|
| 1092 | + |
---|
| 1093 | + copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1094 | + previousVersionButton.setToolTipText("Previous version"); |
---|
| 1095 | + previousVersionButton.addActionListener(this); |
---|
| 1096 | + previousVersionButton.setEnabled(false); |
---|
877 | 1097 | |
---|
878 | 1098 | cGridBag updown = new cGridBag().setVertical(true); |
---|
879 | 1099 | updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
880 | | - restoreButton.setToolTipText("Restore current"); |
---|
| 1100 | + restoreButton.setToolTipText("Undo (restore current version)"); |
---|
881 | 1101 | restoreButton.addActionListener(this); |
---|
882 | | - restoreButton.setEnabled(false); |
---|
| 1102 | + //restoreButton.setEnabled(false); |
---|
883 | 1103 | |
---|
884 | 1104 | updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
885 | | - replaceButton.setToolTipText("Replace current"); |
---|
| 1105 | + replaceButton.setToolTipText("Save (replace current version)"); |
---|
886 | 1106 | replaceButton.addActionListener(this); |
---|
887 | | - replaceButton.setEnabled(false); |
---|
| 1107 | + //replaceButton.setEnabled(false); |
---|
888 | 1108 | |
---|
889 | 1109 | copyOptionsPanel.add(updown); |
---|
890 | 1110 | |
---|
891 | | - copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
892 | | - redoButton.setToolTipText("Next version"); |
---|
893 | | - redoButton.addActionListener(this); |
---|
894 | | - redoButton.setEnabled(false); |
---|
| 1111 | + copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1112 | + nextVersionButton.setToolTipText("Next version"); |
---|
| 1113 | + nextVersionButton.addActionListener(this); |
---|
| 1114 | + nextVersionButton.setEnabled(false); |
---|
| 1115 | + |
---|
| 1116 | + oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1117 | + oneStepButton.setToolTipText("Animate one step forward"); |
---|
| 1118 | + oneStepButton.addActionListener(this); |
---|
895 | 1119 | |
---|
896 | 1120 | oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
897 | 1121 | liveCB.setToolTipText("Enable animation"); |
---|
898 | 1122 | liveCB.addItemListener(this); |
---|
899 | 1123 | |
---|
900 | | - oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
901 | | - oneStepButton.setToolTipText("Animate one step forward"); |
---|
902 | | - oneStepButton.addActionListener(this); |
---|
903 | | - |
---|
904 | 1124 | oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
905 | 1125 | fastCB.setToolTipText("Fast mode"); |
---|
906 | 1126 | fastCB.addItemListener(this); |
---|
.. | .. |
---|
927 | 1147 | |
---|
928 | 1148 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
929 | 1149 | |
---|
930 | | - oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
931 | | - twoButton.setToolTipText("Show 3D view only"); |
---|
932 | | - twoButton.addActionListener(this); |
---|
933 | | - this.fullscreenLayout = twoButton; |
---|
934 | | - |
---|
935 | | - oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
936 | | - threeButton.setToolTipText("Show controls and 3D view"); |
---|
937 | | - threeButton.addActionListener(this); |
---|
938 | | - oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
939 | | - sixButton.setToolTipText("Show 3D view and controls"); |
---|
940 | | - sixButton.addActionListener(this); |
---|
941 | | -// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
942 | | -// sevenButton.setToolTipText("3-column layout"); |
---|
943 | | -// sevenButton.addActionListener(this); |
---|
944 | | - // |
---|
945 | 1150 | |
---|
946 | 1151 | oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
947 | 1152 | rootButton.setToolTipText("Open selection in new tab"); |
---|
.. | .. |
---|
1025 | 1230 | |
---|
1026 | 1231 | oe.toolboxPanel.add(row2); |
---|
1027 | 1232 | |
---|
1028 | | - // ENVYMAPS |
---|
1029 | | - cGridBag skyboxpane = new cGridBag(); |
---|
1030 | | - skyboxpane.preferredHeight = 100; |
---|
| 1233 | + cGridBag textures = new cGridBag(); |
---|
1031 | 1234 | |
---|
1032 | | - oe.toolboxPanel.add(skyboxpane); |
---|
| 1235 | + CreateTexturePanel(textures); |
---|
1033 | 1236 | |
---|
1034 | | - JTabbedPane skyboxpanel = new JTabbedPane(); |
---|
1035 | | - skyboxpane.add(skyboxpanel); |
---|
| 1237 | + oe.toolboxPanel.add(textures); |
---|
1036 | 1238 | |
---|
1037 | | - AddSkyboxTab0(skyboxpanel); |
---|
1038 | | - AddSkyboxTab1(skyboxpanel); |
---|
1039 | | - AddSkyboxTab2(skyboxpanel); |
---|
| 1239 | + textures.preferredHeight = 100; |
---|
| 1240 | + |
---|
| 1241 | + CreateSkyboxPanel(oe.skyboxPanel); |
---|
1040 | 1242 | |
---|
1041 | 1243 | // EDIT panel |
---|
1042 | 1244 | editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
1044 | 1246 | editButton.addActionListener(this); |
---|
1045 | 1247 | |
---|
1046 | 1248 | editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1047 | | - uneditButton.setToolTipText("Remove selection controls"); |
---|
| 1249 | + uneditButton.setToolTipText("Unpin and remove selection controls"); |
---|
1048 | 1250 | uneditButton.addActionListener(this); |
---|
1049 | 1251 | |
---|
1050 | 1252 | editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
1051 | | - allParamsButton.setToolTipText("Show all controle"); |
---|
| 1253 | + allParamsButton.setToolTipText("Show all controls"); |
---|
1052 | 1254 | allParamsButton.addActionListener(this); |
---|
1053 | 1255 | |
---|
1054 | | - editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1055 | | - clearPanelButton.setToolTipText("Clear edit panel"); |
---|
| 1256 | + editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1257 | + clearPanelButton.setToolTipText("Clear all controls"); |
---|
1056 | 1258 | clearPanelButton.addActionListener(this); |
---|
1057 | 1259 | |
---|
1058 | | - editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1059 | | - unselectButton.setToolTipText("Unselect"); |
---|
1060 | | - unselectButton.addActionListener(this); |
---|
| 1260 | + //editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1261 | + //unselectButton.setToolTipText("Unselect"); |
---|
| 1262 | + //unselectButton.addActionListener(this); |
---|
1061 | 1263 | |
---|
1062 | 1264 | editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1063 | 1265 | flashSelectionButton.setToolTipText("Highlight selection"); |
---|
.. | .. |
---|
1117 | 1319 | dgr.addDragGestureListener(this); |
---|
1118 | 1320 | }catch(Exception e) {} |
---|
1119 | 1321 | */ |
---|
1120 | | - radio.layout = sixButton; // sevenButton; |
---|
| 1322 | + radio.layout = threeButton; // sixButton; |
---|
1121 | 1323 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
1122 | 1324 | } |
---|
1123 | 1325 | |
---|
.. | .. |
---|
1168 | 1370 | smoothCB.setToolTipText("Snapping delay"); |
---|
1169 | 1371 | smoothCB.addItemListener(this); |
---|
1170 | 1372 | |
---|
1171 | | - panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
1172 | | - slowCB.setToolTipText("Smooth interpolation"); |
---|
1173 | | - slowCB.addItemListener(this); |
---|
| 1373 | +// panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
| 1374 | +// slowCB.setToolTipText("Smooth interpolation"); |
---|
| 1375 | +// slowCB.addItemListener(this); |
---|
| 1376 | + panel.add(minshaderCB = new cCheckBox("Min shader", Globals.MINSHADER)); //, constraints); |
---|
| 1377 | + minshaderCB.setToolTipText("Minimal fast shader"); |
---|
| 1378 | + minshaderCB.addItemListener(this); |
---|
1174 | 1379 | |
---|
1175 | 1380 | // constraints.gridy += 1; |
---|
1176 | 1381 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
.. | .. |
---|
1259 | 1464 | } |
---|
1260 | 1465 | |
---|
1261 | 1466 | radioButton.SetObject(obj); |
---|
1262 | | - radioButton.layout = sixButton; // sevenButton; |
---|
| 1467 | + radioButton.layout = threeButton; // sixButton; |
---|
1263 | 1468 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
1264 | 1469 | radioButton.addActionListener(this); |
---|
1265 | 1470 | radioPanel.add(radioButton); |
---|
.. | .. |
---|
1284 | 1489 | cCheckBox localCB; |
---|
1285 | 1490 | cCheckBox crowdCB; |
---|
1286 | 1491 | cCheckBox smoothCB; |
---|
| 1492 | + cCheckBox minshaderCB; |
---|
| 1493 | + |
---|
1287 | 1494 | cToggleButton fastCB; |
---|
1288 | 1495 | cCheckBox slowCB; |
---|
1289 | 1496 | cCheckBox boxCB; |
---|
.. | .. |
---|
1354 | 1561 | { |
---|
1355 | 1562 | cameraView.ToggleInertia(); |
---|
1356 | 1563 | cameraView.repaint(); |
---|
| 1564 | + } |
---|
| 1565 | + else if(e.getSource() == minshaderCB) |
---|
| 1566 | + { |
---|
| 1567 | + Globals.MINSHADER ^= true; |
---|
| 1568 | + cameraView.programInitialized = false; |
---|
| 1569 | + cameraView.repaint(); |
---|
1357 | 1570 | } |
---|
1358 | 1571 | else if(e.getSource() == localCB) |
---|
1359 | 1572 | { |
---|
.. | .. |
---|
1631 | 1844 | TreePath path; |
---|
1632 | 1845 | |
---|
1633 | 1846 | public TransferableTreePath(TreePath tp) { |
---|
1634 | | - path = tp; |
---|
| 1847 | + Object[] objs = new Object[tp.getPathCount()]; |
---|
| 1848 | + for (int i=0; i<objs.length; i++) |
---|
| 1849 | + { |
---|
| 1850 | + objs[i] = ((Object3D)tp.getPathComponent(i)).GetUUID(); |
---|
| 1851 | + } |
---|
| 1852 | + path = new TreePath(objs); |
---|
1635 | 1853 | } |
---|
1636 | 1854 | |
---|
1637 | 1855 | public synchronized DataFlavor[] getTransferDataFlavors() { |
---|
.. | .. |
---|
2494 | 2712 | if (source == invariantsItem) |
---|
2495 | 2713 | { |
---|
2496 | 2714 | System.out.println("Invariants:"); |
---|
2497 | | - Grafreed.grafreeD.universe.invariants(); |
---|
| 2715 | + Grafreed.grafreed.universe.invariants(); |
---|
2498 | 2716 | } else |
---|
2499 | 2717 | if (source == memoryItem) |
---|
2500 | 2718 | { |
---|
.. | .. |
---|
2525 | 2743 | { |
---|
2526 | 2744 | ToggleFullScreen(); |
---|
2527 | 2745 | } else |
---|
2528 | | - if (source == undoButton) |
---|
| 2746 | + if (source == collapseButton) |
---|
| 2747 | + { |
---|
| 2748 | + this.expandedLayout = radio.layout; |
---|
| 2749 | + CollapseToolbar(); |
---|
| 2750 | + } else |
---|
| 2751 | + if (source == maximize3DButton) |
---|
| 2752 | + { |
---|
| 2753 | + this.expandedLayout = radio.layout; |
---|
| 2754 | + radio.layout = twoButton; |
---|
| 2755 | + Show3DView(); |
---|
| 2756 | + CollapseToolbar(); |
---|
| 2757 | + } else |
---|
| 2758 | + if (source == previousVersionButton) |
---|
2529 | 2759 | { |
---|
2530 | 2760 | // Go to previous version |
---|
2531 | 2761 | //if (!Undo()) |
---|
2532 | 2762 | //java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2533 | | - Undo(); |
---|
| 2763 | + PreviousVersion(); |
---|
2534 | 2764 | } else |
---|
2535 | 2765 | if (source == restoreButton) |
---|
2536 | 2766 | { |
---|
2537 | 2767 | // Restore current version |
---|
2538 | 2768 | Restore(); |
---|
| 2769 | + //restoreButton.setEnabled(false); |
---|
2539 | 2770 | } else |
---|
2540 | 2771 | if (source == replaceButton) |
---|
2541 | 2772 | { |
---|
2542 | 2773 | // Overwrite current version |
---|
2543 | 2774 | Replace(); |
---|
| 2775 | + //replaceButton.setEnabled(false); |
---|
2544 | 2776 | } else |
---|
2545 | | - if (source == redoButton) |
---|
| 2777 | + if (source == nextVersionButton) |
---|
2546 | 2778 | { |
---|
2547 | 2779 | // Go to next version |
---|
2548 | | - Redo(); |
---|
| 2780 | + NextVersion(); |
---|
2549 | 2781 | } else |
---|
2550 | | - if (source == saveButton) |
---|
| 2782 | + if (source == saveVersionButton) |
---|
2551 | 2783 | { |
---|
2552 | 2784 | // Save a new version |
---|
2553 | 2785 | if (!Save(true)) |
---|
2554 | 2786 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 2787 | + } else |
---|
| 2788 | + if (source == deleteVersionButton) |
---|
| 2789 | + { |
---|
| 2790 | + // Delete a new version |
---|
| 2791 | + DeleteVersion(); |
---|
2555 | 2792 | } else |
---|
2556 | 2793 | if (source == oneStepButton) |
---|
2557 | 2794 | { |
---|
.. | .. |
---|
2606 | 2843 | } else |
---|
2607 | 2844 | if (source == undoItem) |
---|
2608 | 2845 | { |
---|
2609 | | - Undo(); |
---|
| 2846 | + PreviousVersion(); |
---|
2610 | 2847 | } else |
---|
2611 | 2848 | if (source == redoItem) |
---|
2612 | 2849 | { |
---|
2613 | | - Redo(); |
---|
| 2850 | + NextVersion(); |
---|
2614 | 2851 | } else |
---|
2615 | 2852 | if (source == duplicateItem) |
---|
2616 | 2853 | { |
---|
.. | .. |
---|
3469 | 3706 | if (CameraPane.FULLSCREEN) |
---|
3470 | 3707 | fullscreenLayout = radio.layout; |
---|
3471 | 3708 | |
---|
3472 | | - // bug |
---|
3473 | | - //gridPanel.setDividerLocation(1.0); |
---|
3474 | | - //bigPanel.setDividerLocation(0.0); |
---|
3475 | | -// bigThree.remove(scenePanel); |
---|
3476 | | -// bigThree.remove(centralPanel); |
---|
3477 | | -// bigThree.remove(XYZPanel); |
---|
3478 | | -// aWindowConstraints.gridx = 0; |
---|
3479 | | -// aWindowConstraints.gridy = 0; |
---|
3480 | | -// aWindowConstraints.gridwidth = 1; |
---|
3481 | | -// // aConstraints.gridheight = 3; |
---|
3482 | | -// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
3483 | | -// aWindowConstraints.weightx = 0; |
---|
3484 | | -// aWindowConstraints.weighty = 1; |
---|
3485 | | -// //bigThree.add(jtp, aWindowConstraints); |
---|
3486 | | -// aWindowConstraints.weightx = 1; |
---|
3487 | | -// aWindowConstraints.gridwidth = 3; |
---|
3488 | | -// // aConstraints.gridheight = 3; |
---|
3489 | | -// aWindowConstraints.gridx = 1; |
---|
3490 | | -// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
3491 | | -// bigThree.add(centralPanel, aWindowConstraints); |
---|
3492 | | -// aWindowConstraints.weightx = 0; |
---|
3493 | | -// aWindowConstraints.gridx = 4; |
---|
3494 | | -// aWindowConstraints.gridwidth = 1; |
---|
3495 | | -// // aConstraints.gridheight = 3; |
---|
3496 | | -// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
3497 | | -// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
3498 | | -// scenePanel.setVisible(false); |
---|
3499 | | -// centralPanel.setVisible(true); |
---|
3500 | | -// XYZPanel.setVisible(false); |
---|
3501 | | - bigThree.ClearUI(); |
---|
3502 | | - bigThree.add(centralPanel); |
---|
3503 | | - bigThree.FlushUI(); |
---|
| 3709 | + Show3DView(); |
---|
3504 | 3710 | |
---|
3505 | 3711 | cameraView.requestFocusInWindow(); |
---|
3506 | 3712 | |
---|
.. | .. |
---|
3743 | 3949 | { |
---|
3744 | 3950 | Object3D child = (Object3D)e.nextElement(); |
---|
3745 | 3951 | if(child.editWindow != null) |
---|
3746 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3747 | 3952 | child.pinned = false; |
---|
3748 | 3953 | child.CloseUI(); |
---|
3749 | 3954 | listUI.remove(child); |
---|
| 3955 | +// objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3750 | 3956 | |
---|
3751 | 3957 | //child.editWindow = null; // ??????????? |
---|
3752 | 3958 | } |
---|
.. | .. |
---|
3765 | 3971 | obj.CloseUI(); |
---|
3766 | 3972 | } |
---|
3767 | 3973 | listUI.clear(); |
---|
| 3974 | + SetPinStates(group.selection.size() > 0); |
---|
3768 | 3975 | refreshContents(true); |
---|
3769 | 3976 | } else |
---|
3770 | 3977 | if (source == allParamsButton) |
---|
.. | .. |
---|
3851 | 4058 | radio.layout.doClick(); |
---|
3852 | 4059 | |
---|
3853 | 4060 | ClearUnpinned(); |
---|
| 4061 | + |
---|
3854 | 4062 | //Grafreed.Assert(group != null); |
---|
3855 | 4063 | //Grafreed.Assert(group.selection != null); |
---|
3856 | 4064 | SetPinStates(group.selection == null || group.selection.size() > 0); |
---|
.. | .. |
---|
3867 | 4075 | } else if (event.getSource() == editCameraItem) |
---|
3868 | 4076 | { |
---|
3869 | 4077 | cameraView.ProtectCamera(); |
---|
| 4078 | + cameraView.requestFocusInWindow(); |
---|
3870 | 4079 | cameraView.repaint(); |
---|
3871 | 4080 | return; |
---|
3872 | 4081 | } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) |
---|
3873 | 4082 | { |
---|
3874 | 4083 | cameraView.RevertCamera(); |
---|
| 4084 | + cameraView.requestFocusInWindow(); |
---|
3875 | 4085 | cameraView.repaint(); |
---|
3876 | 4086 | return; |
---|
3877 | 4087 | // } else if (event.getSource() == textureButton) |
---|
.. | .. |
---|
5004 | 5214 | |
---|
5005 | 5215 | freezemodel = false; |
---|
5006 | 5216 | } |
---|
5007 | | - |
---|
5008 | | - boolean flashIt = true; |
---|
5009 | | - |
---|
| 5217 | + |
---|
5010 | 5218 | public void valueChanged(TreeSelectionEvent e) |
---|
5011 | 5219 | //public boolean handleEvent(Event event) |
---|
5012 | 5220 | { |
---|
.. | .. |
---|
5079 | 5287 | { |
---|
5080 | 5288 | editButton.setEnabled(enabled); |
---|
5081 | 5289 | uneditButton.setEnabled(enabled); |
---|
5082 | | - unselectButton.setEnabled(enabled); |
---|
| 5290 | + //unselectButton.setEnabled(enabled); |
---|
5083 | 5291 | flashSelectionButton.setEnabled(enabled); |
---|
| 5292 | + |
---|
| 5293 | + clearPanelButton.setEnabled(!listUI.isEmpty()); |
---|
5084 | 5294 | } |
---|
5085 | 5295 | |
---|
5086 | 5296 | void refreshContents(boolean cp) |
---|
5087 | 5297 | { |
---|
5088 | | - if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
| 5298 | + //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
5089 | 5299 | if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
5090 | 5300 | { |
---|
5091 | 5301 | objEditor.ClearInfo(); // .GetMaterial()); |
---|
.. | .. |
---|
5095 | 5305 | Object3D child = (Object3D) group.selection.get(i); |
---|
5096 | 5306 | |
---|
5097 | 5307 | objEditor.AddInfo(child, this, true); |
---|
5098 | | - System.err.println("info : " + child.GetPath()); |
---|
| 5308 | +// System.err.println("info : " + child.GetPath()); |
---|
5099 | 5309 | } |
---|
5100 | 5310 | |
---|
5101 | 5311 | objEditor.SetText(); // jan 2014 |
---|
.. | .. |
---|
5921 | 6131 | |
---|
5922 | 6132 | cButton restoreCameraButton; |
---|
5923 | 6133 | |
---|
5924 | | - cButton saveButton; |
---|
5925 | 6134 | cButton oneStepButton; |
---|
5926 | 6135 | |
---|
5927 | 6136 | cButton groupButton; |
---|