.. | .. |
---|
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, |
---|
.. | .. |
---|
23 | 24 | DragGestureListener, DragSourceListener, DropTargetListener, |
---|
24 | 25 | ItemListener // ListSelectionListener |
---|
25 | 26 | { |
---|
| 27 | + |
---|
| 28 | + public void AddSkyboxButton(String f, String s, cGridBag row) |
---|
| 29 | + { |
---|
| 30 | + cButton skyboxButton; |
---|
| 31 | + final String path = "cubemaps/" + f + "-skyboxes/" + s; |
---|
| 32 | + row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.NIMBUSLAF)); |
---|
| 33 | + //row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF)); |
---|
| 34 | + skyboxButton.setToolTipText(s); |
---|
| 35 | + skyboxButton.addActionListener(new ActionListener() |
---|
| 36 | + { |
---|
| 37 | + @Override |
---|
| 38 | + public void actionPerformed(ActionEvent e) |
---|
| 39 | + { |
---|
| 40 | + ChangeSkybox(path); |
---|
| 41 | + } |
---|
| 42 | + }); |
---|
| 43 | + } |
---|
| 44 | + |
---|
| 45 | + public void AddSkyboxTab0(JTabbedPane skyboxpanel) |
---|
| 46 | + { |
---|
| 47 | + cGridBag tab0 = new cGridBag().setVertical(true); |
---|
| 48 | + |
---|
| 49 | + tab0.setName("Urban"); |
---|
| 50 | + skyboxpanel.add(tab0); |
---|
| 51 | + |
---|
| 52 | + cGridBag row0 = new cGridBag(); |
---|
| 53 | + cGridBag row1 = new cGridBag(); |
---|
| 54 | + cGridBag row2 = new cGridBag(); |
---|
| 55 | + cGridBag row3 = new cGridBag(); |
---|
| 56 | + cGridBag row4 = new cGridBag(); |
---|
| 57 | + cGridBag row5 = new cGridBag(); |
---|
| 58 | + cGridBag row6 = new cGridBag(); |
---|
| 59 | + |
---|
| 60 | + AddSkyboxButton("default", "rgb", row0); |
---|
| 61 | + //AddSkyboxButton("default", "cornell", row0); |
---|
| 62 | + AddSkyboxButton("penguins", "dust", row0); |
---|
| 63 | + AddSkyboxButton("penguins", "tropic", row0); |
---|
| 64 | + AddSkyboxButton("penguins", "yonder", row0); |
---|
| 65 | + |
---|
| 66 | + AddSkyboxButton("default", "uffizi", row1); |
---|
| 67 | + AddSkyboxButton("bridge", "Bridge", row1); |
---|
| 68 | + AddSkyboxButton("bridge", "Bridge2", row1); |
---|
| 69 | + AddSkyboxButton("urban", "GamlaStan2", row1); |
---|
| 70 | + |
---|
| 71 | + AddSkyboxButton("urban", "Parliament", row2); |
---|
| 72 | + AddSkyboxButton("urban", "Roundabout", row2); |
---|
| 73 | + AddSkyboxButton("urban", "SaintLazarusChurch", row2); |
---|
| 74 | + AddSkyboxButton("urban", "SaintLazarusChurch2", row2); |
---|
| 75 | + |
---|
| 76 | + AddSkyboxButton("urban", "SaintLazarusChurch3", row3); |
---|
| 77 | + AddSkyboxButton("urban", "UnionSquare", row3); |
---|
| 78 | + AddSkyboxButton("urban", "Medborgarplatsen", row3); |
---|
| 79 | + AddSkyboxButton("park", "BerzeliiPark", row3); |
---|
| 80 | + |
---|
| 81 | + AddSkyboxButton("park", "Buddha", row4); |
---|
| 82 | + AddSkyboxButton("park", "CNTower2", row4); |
---|
| 83 | + AddSkyboxButton("park", "NiagaraFalls1", row4); |
---|
| 84 | + AddSkyboxButton("park", "NiagaraFalls3", row4); |
---|
| 85 | + |
---|
| 86 | + AddSkyboxButton("park", "Park", row5); |
---|
| 87 | + AddSkyboxButton("park", "Pond", row5); |
---|
| 88 | + AddSkyboxButton("park", "Skansen", row5); |
---|
| 89 | + AddSkyboxButton("park", "Skansen2", row5); |
---|
| 90 | + |
---|
| 91 | + AddSkyboxButton("park", "Skansen3", row6); |
---|
| 92 | + AddSkyboxButton("park", "Skansen4", row6); |
---|
| 93 | + AddSkyboxButton("park", "Skansen5", row6); |
---|
| 94 | + AddSkyboxButton("persson", "VancouverConventionCentre", row6); |
---|
| 95 | + |
---|
| 96 | + tab0.add(row0); |
---|
| 97 | + tab0.add(row1); |
---|
| 98 | + tab0.add(row2); |
---|
| 99 | + tab0.add(row3); |
---|
| 100 | + tab0.add(row4); |
---|
| 101 | + tab0.add(row5); |
---|
| 102 | + tab0.add(row6); |
---|
| 103 | + |
---|
| 104 | + for (int i=5; --i>=0;) |
---|
| 105 | + { |
---|
| 106 | + //oe.toolboxPanel.Return(); |
---|
| 107 | + //tab0.add(new cGridBag()); |
---|
| 108 | + } |
---|
| 109 | + } |
---|
| 110 | + |
---|
| 111 | + public void AddSkyboxTab1(JTabbedPane skyboxpanel) |
---|
| 112 | + { |
---|
| 113 | + cGridBag tab0 = new cGridBag().setVertical(true); |
---|
| 114 | + |
---|
| 115 | + tab0.setName("Nature"); |
---|
| 116 | + skyboxpanel.add(tab0); |
---|
| 117 | + |
---|
| 118 | + cGridBag row0 = new cGridBag(); |
---|
| 119 | + cGridBag row1 = new cGridBag(); |
---|
| 120 | + cGridBag row2 = new cGridBag(); |
---|
| 121 | + cGridBag row3 = new cGridBag(); |
---|
| 122 | + cGridBag row4 = new cGridBag(); |
---|
| 123 | + cGridBag row5 = new cGridBag(); |
---|
| 124 | + cGridBag row6 = new cGridBag(); |
---|
| 125 | + |
---|
| 126 | + AddSkyboxButton("beach", "HeartInTheSand", row0); |
---|
| 127 | + AddSkyboxButton("beach", "LarnacaBeach", row0); |
---|
| 128 | + AddSkyboxButton("beach", "PalmTrees", row0); |
---|
| 129 | + AddSkyboxButton("beach", "Tenerife", row0); |
---|
| 130 | + |
---|
| 131 | + AddSkyboxButton("beach", "Tenerife2", row1); |
---|
| 132 | + AddSkyboxButton("beach", "Tenerife3", row1); |
---|
| 133 | + AddSkyboxButton("field", "FishPond", row1); |
---|
| 134 | + AddSkyboxButton("field", "Footballfield", row1); |
---|
| 135 | + |
---|
| 136 | + AddSkyboxButton("field", "Meadow", row2); |
---|
| 137 | + AddSkyboxButton("field", "Sorsele", row2); |
---|
| 138 | + AddSkyboxButton("field", "Sorsele2", row2); |
---|
| 139 | + AddSkyboxButton("field", "Sorsele3", row2); |
---|
| 140 | + |
---|
| 141 | + AddSkyboxButton("forest", "Brudslojan", row3); |
---|
| 142 | + AddSkyboxButton("forest", "Langholmen2", row3); |
---|
| 143 | + AddSkyboxButton("forest", "Plants", row3); |
---|
| 144 | + AddSkyboxButton("mountain", "Maskonaive", row3); |
---|
| 145 | + |
---|
| 146 | + AddSkyboxButton("mountain", "Maskonaive2", row4); |
---|
| 147 | + AddSkyboxButton("mountain", "Maskonaive3", row4); |
---|
| 148 | + AddSkyboxButton("mountain", "Teide", row4); |
---|
| 149 | + AddSkyboxButton("park", "Tantolunden4", row4); |
---|
| 150 | + |
---|
| 151 | + AddSkyboxButton("park", "Stairs", row5); |
---|
| 152 | + AddSkyboxButton("default", "skycube", row6); |
---|
| 153 | + AddSkyboxButton("rocky", "Langholmen", row5); |
---|
| 154 | + AddSkyboxButton("rocky", "Skinnarviksberget", row5); |
---|
| 155 | + |
---|
| 156 | + AddSkyboxButton("rocky", "Tantolunden6", row5); |
---|
| 157 | + AddSkyboxButton("default", "CloudyHills", row6); |
---|
| 158 | + AddSkyboxButton("daz", "Autumn", row6); |
---|
| 159 | + AddSkyboxButton("daz", "MountainTrail", row6); |
---|
| 160 | + /* |
---|
| 161 | +Autumn |
---|
| 162 | +Greenlands |
---|
| 163 | +MountainTrail |
---|
| 164 | +Oasis |
---|
| 165 | +TheRock |
---|
| 166 | +TopOfTheWorld |
---|
| 167 | +Winter |
---|
| 168 | + */ |
---|
| 169 | + |
---|
| 170 | + tab0.add(row0); |
---|
| 171 | + tab0.add(row1); |
---|
| 172 | + tab0.add(row2); |
---|
| 173 | + tab0.add(row3); |
---|
| 174 | + tab0.add(row4); |
---|
| 175 | + tab0.add(row5); |
---|
| 176 | + tab0.add(row6); |
---|
| 177 | + |
---|
| 178 | + for (int i=5; --i>=0;) |
---|
| 179 | + { |
---|
| 180 | + //oe.toolboxPanel.Return(); |
---|
| 181 | + //tab0.add(new cGridBag()); |
---|
| 182 | + } |
---|
| 183 | + } |
---|
| 184 | + |
---|
| 185 | + public void AddSkyboxTab2(JTabbedPane skyboxpanel) |
---|
| 186 | + { |
---|
| 187 | + cGridBag tab0 = new cGridBag().setVertical(true); |
---|
| 188 | + |
---|
| 189 | + tab0.setName("Night"); |
---|
| 190 | + skyboxpanel.add(tab0); |
---|
| 191 | + |
---|
| 192 | + cGridBag row0 = new cGridBag(); |
---|
| 193 | + cGridBag row1 = new cGridBag(); |
---|
| 194 | + cGridBag row2 = new cGridBag(); |
---|
| 195 | + cGridBag row3 = new cGridBag(); |
---|
| 196 | + cGridBag row4 = new cGridBag(); |
---|
| 197 | + cGridBag row5 = new cGridBag(); |
---|
| 198 | + cGridBag row6 = new cGridBag(); |
---|
| 199 | + |
---|
| 200 | + AddSkyboxButton("night", "NightPath", row0); |
---|
| 201 | + AddSkyboxButton("night", "PondNight", row0); |
---|
| 202 | + AddSkyboxButton("night", "Powerlines", row0); |
---|
| 203 | + AddSkyboxButton("night", "SwedishRoyalCastle", row0); |
---|
| 204 | + |
---|
| 205 | + AddSkyboxButton("urban", "CNTower", row1); |
---|
| 206 | + AddSkyboxButton("bridge", "ArstaBridge", row1); |
---|
| 207 | + AddSkyboxButton("rocky", "Riddarfjarden", row1); |
---|
| 208 | + AddSkyboxButton("penguins", "sleepyhollow", row1); |
---|
| 209 | + |
---|
| 210 | + AddSkyboxButton("penguins", "kenon_star", row2); |
---|
| 211 | + AddSkyboxButton("persson", "corona", row2); |
---|
| 212 | + AddSkyboxButton("persson", "spaceskybox", row2); |
---|
| 213 | + AddSkyboxButton("indoors", "Vasa", row2); |
---|
| 214 | + |
---|
| 215 | + AddSkyboxButton("winter", "Backyard", row3); |
---|
| 216 | + AddSkyboxButton("winter", "Creek", row3); |
---|
| 217 | + AddSkyboxButton("winter", "FootballField3", row3); |
---|
| 218 | + AddSkyboxButton("winter", "Forest", row3); |
---|
| 219 | + |
---|
| 220 | + AddSkyboxButton("winter", "HornstullsStrand2", row4); |
---|
| 221 | + AddSkyboxButton("winter", "House", row4); |
---|
| 222 | + AddSkyboxButton("winter", "IceLake", row4); |
---|
| 223 | + AddSkyboxButton("winter", "IceRiver", row4); |
---|
| 224 | + |
---|
| 225 | + AddSkyboxButton("winter", "Park3", row5); |
---|
| 226 | + AddSkyboxButton("winter", "PondWinter", row5); |
---|
| 227 | + AddSkyboxButton("winter", "Tantolunden5", row5); |
---|
| 228 | + AddSkyboxButton("winter", "Vindelalven", row5); |
---|
| 229 | + |
---|
| 230 | + AddSkyboxButton("daz", "TheRock", row6); |
---|
| 231 | + AddSkyboxButton("daz", "TopOfTheWorld", row6); |
---|
| 232 | + AddSkyboxButton("daz", "Winter", row6); |
---|
| 233 | + AddSkyboxButton("mountain", "Ryfjallet", row6); |
---|
| 234 | + |
---|
| 235 | + tab0.add(row0); |
---|
| 236 | + tab0.add(row1); |
---|
| 237 | + tab0.add(row2); |
---|
| 238 | + tab0.add(row3); |
---|
| 239 | + tab0.add(row4); |
---|
| 240 | + tab0.add(row5); |
---|
| 241 | + tab0.add(row6); |
---|
| 242 | + |
---|
| 243 | + for (int i=5; --i>=0;) |
---|
| 244 | + { |
---|
| 245 | + //oe.toolboxPanel.Return(); |
---|
| 246 | + //tab0.add(new cGridBag()); |
---|
| 247 | + } |
---|
| 248 | + } |
---|
| 249 | + |
---|
| 250 | + public void AddSkyboxTab3(JTabbedPane skyboxpanel) |
---|
| 251 | + { |
---|
| 252 | + cGridBag tab0 = new cGridBag().setVertical(true); |
---|
| 253 | + |
---|
| 254 | + tab0.setName("Others"); |
---|
| 255 | + skyboxpanel.add(tab0); |
---|
| 256 | + |
---|
| 257 | + cGridBag row0 = new cGridBag(); |
---|
| 258 | + cGridBag row1 = new cGridBag(); |
---|
| 259 | + cGridBag row2 = new cGridBag(); |
---|
| 260 | + cGridBag row3 = new cGridBag(); |
---|
| 261 | + cGridBag row4 = new cGridBag(); |
---|
| 262 | + cGridBag row5 = new cGridBag(); |
---|
| 263 | + cGridBag row6 = new cGridBag(); |
---|
| 264 | + |
---|
| 265 | + AddSkyboxButton("mayhem", "afterrain", row0); |
---|
| 266 | + AddSkyboxButton("mayhem", "aqua4", row0); |
---|
| 267 | + AddSkyboxButton("mayhem", "aqua9", row0); |
---|
| 268 | + AddSkyboxButton("mayhem", "flame", row0); |
---|
| 269 | + |
---|
| 270 | + AddSkyboxButton("mayhem", "h2s", row1); |
---|
| 271 | + AddSkyboxButton("mayhem", "prehistoric", row1); |
---|
| 272 | + AddSkyboxButton("mayhem", "scorched", row1); |
---|
| 273 | + AddSkyboxButton("penguins", "desertdawn", row1); |
---|
| 274 | + |
---|
| 275 | + AddSkyboxButton("persson", "Citadella", row2); |
---|
| 276 | + AddSkyboxButton("persson", "Citadella2", row2); |
---|
| 277 | + AddSkyboxButton("persson", "clouds1", row2); |
---|
| 278 | + AddSkyboxButton("penguins", "wrath", row2); |
---|
| 279 | + |
---|
| 280 | + AddSkyboxButton("persson", "FishermansBastion", row3); |
---|
| 281 | + AddSkyboxButton("persson", "HeroesSquare", row3); |
---|
| 282 | + AddSkyboxButton("indoors", "DallasW", row3); |
---|
| 283 | + AddSkyboxButton("indoors", "MarriottMadisonWest", row3); |
---|
| 284 | + |
---|
| 285 | + AddSkyboxButton("persson", "LancellottiChapel", row4); |
---|
| 286 | + AddSkyboxButton("persson", "PereaBeach1", row4); |
---|
| 287 | + AddSkyboxButton("persson", "PereaBeach2", row4); |
---|
| 288 | + AddSkyboxButton("persson", "redeclipse", row4); |
---|
| 289 | + |
---|
| 290 | + AddSkyboxButton("daz", "Greenlands", row5); |
---|
| 291 | + AddSkyboxButton("daz", "Oasis", row5); |
---|
| 292 | + AddSkyboxButton("elyvisions", "arch3", row5); |
---|
| 293 | + AddSkyboxButton("elyvisions", "calm_sea", row5); |
---|
| 294 | + |
---|
| 295 | + AddSkyboxButton("elyvisions", "rainbow", row6); |
---|
| 296 | + AddSkyboxButton("elyvisions", "distant_sunset", row6); |
---|
| 297 | + AddSkyboxButton("elyvisions", "heaven", row6); |
---|
| 298 | + AddSkyboxButton("elyvisions", "hot", row6); |
---|
| 299 | + |
---|
| 300 | + tab0.add(row0); |
---|
| 301 | + tab0.add(row1); |
---|
| 302 | + tab0.add(row2); |
---|
| 303 | + tab0.add(row3); |
---|
| 304 | + tab0.add(row4); |
---|
| 305 | + tab0.add(row5); |
---|
| 306 | + tab0.add(row6); |
---|
| 307 | + |
---|
| 308 | + for (int i=5; --i>=0;) |
---|
| 309 | + { |
---|
| 310 | + //oe.toolboxPanel.Return(); |
---|
| 311 | + //tab0.add(new cGridBag()); |
---|
| 312 | + } |
---|
| 313 | + } |
---|
| 314 | + |
---|
| 315 | + public void CallBack(String[] path) |
---|
| 316 | + { |
---|
| 317 | + for (int i = 0; i < path.length; i++) |
---|
| 318 | + { |
---|
| 319 | + System.out.print(path[i] + "/"); |
---|
| 320 | + } |
---|
| 321 | + |
---|
| 322 | + System.out.println(); |
---|
| 323 | + } |
---|
| 324 | + |
---|
| 325 | + public void ChangeSkybox(String skybox) |
---|
| 326 | + { |
---|
| 327 | + //cameraView.envyoff = false; |
---|
| 328 | + group.skyboxname = skybox; |
---|
| 329 | + group.skyboxext = "jpg"; |
---|
| 330 | + cameraView.repaint(); |
---|
| 331 | + |
---|
| 332 | + Grafreed.ParseResources("textures", this); |
---|
| 333 | + } |
---|
| 334 | + |
---|
26 | 335 | //ObjEditor objEditor; |
---|
27 | 336 | public void closeUI2() |
---|
28 | 337 | { |
---|
.. | .. |
---|
60 | 369 | this.copy = this.group = group; |
---|
61 | 370 | //selectees = this.group.selectees; |
---|
62 | 371 | |
---|
63 | | - if (copy.versions == null) |
---|
| 372 | + if (copy.versionlist == null) |
---|
64 | 373 | { |
---|
65 | | - copy.versions = new byte[100][]; |
---|
| 374 | + copy.versionlist = new Object3D[100]; |
---|
66 | 375 | copy.versionindex = -1; |
---|
67 | 376 | } |
---|
68 | 377 | |
---|
.. | .. |
---|
80 | 389 | this.copy = this.group = copy; |
---|
81 | 390 | //selectees = this.group.selectees; |
---|
82 | 391 | |
---|
83 | | - if (copy.versions == null) |
---|
84 | | - { |
---|
85 | | - copy.versions = new byte[100][]; |
---|
86 | | - copy.versionindex = -1; |
---|
87 | | - } |
---|
88 | | - |
---|
89 | 392 | SetupMenu2(this); //objEditor); |
---|
90 | 393 | SetupUI2(objEditor); |
---|
91 | 394 | objEditor.SetupUI(true); |
---|
92 | 395 | SetupViews(objEditor); |
---|
93 | 396 | |
---|
94 | 397 | ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true); |
---|
| 398 | + |
---|
| 399 | + if (copy.versionlist == null) |
---|
| 400 | + { |
---|
| 401 | + copy.versionlist = new Object3D[100]; |
---|
| 402 | + copy.versionindex = -1; |
---|
| 403 | + |
---|
| 404 | + Save(true); |
---|
| 405 | + } |
---|
95 | 406 | } |
---|
96 | 407 | |
---|
97 | 408 | void CloneSelection(boolean supports) |
---|
.. | .. |
---|
526 | 837 | attachBumpItem.addActionListener(this); |
---|
527 | 838 | pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump")); |
---|
528 | 839 | pigmentBumpItem.addActionListener(this); |
---|
| 840 | + //embedTexturesItem |
---|
529 | 841 | detachPigmentItem = menu.add(new MenuItem("Detach Pigment")); |
---|
530 | 842 | detachPigmentItem.addActionListener(this); |
---|
531 | 843 | detachBumpItem = menu.add(new MenuItem("Detach Bump")); |
---|
532 | 844 | detachBumpItem.addActionListener(this); |
---|
| 845 | + embedTexturesItem = menu.add(new MenuItem("Embed Textures")); |
---|
| 846 | + embedTexturesItem.addActionListener(this); |
---|
| 847 | + deEmbedTexturesItem = menu.add(new MenuItem("De-embed Textures")); |
---|
| 848 | + deEmbedTexturesItem.addActionListener(this); |
---|
533 | 849 | menu.add("-"); |
---|
534 | 850 | sortbysizeItem = menu.add(new MenuItem("Sort by size")); |
---|
535 | 851 | sortbysizeItem.addActionListener(this); |
---|
.. | .. |
---|
601 | 917 | */ |
---|
602 | 918 | cGridBag copyOptionsPanel = new cGridBag(); |
---|
603 | 919 | |
---|
604 | | - copyOptionsPanel.preferredHeight = 1; |
---|
| 920 | + copyOptionsPanel.preferredHeight = 2; |
---|
605 | 921 | |
---|
606 | 922 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
607 | 923 | |
---|
.. | .. |
---|
628 | 944 | restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
629 | 945 | restoreCameraButton.addActionListener(this); |
---|
630 | 946 | |
---|
631 | | - copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
632 | | - saveButton.setToolTipText("New version"); |
---|
633 | | - saveButton.addActionListener(this); |
---|
| 947 | + copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 948 | + saveVersionButton.setToolTipText("Duplicate current version"); |
---|
| 949 | + saveVersionButton.addActionListener(this); |
---|
634 | 950 | |
---|
635 | | - copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
636 | | - undoButton.setToolTipText("Previous version"); |
---|
637 | | - undoButton.addActionListener(this); |
---|
638 | | - undoButton.setEnabled(false); |
---|
| 951 | + copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 952 | + deleteVersionButton.setToolTipText("Delete current version"); |
---|
| 953 | + deleteVersionButton.addActionListener(this); |
---|
| 954 | + |
---|
| 955 | + copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 956 | + previousVersionButton.setToolTipText("Previous version"); |
---|
| 957 | + previousVersionButton.addActionListener(this); |
---|
| 958 | + previousVersionButton.setEnabled(false); |
---|
639 | 959 | |
---|
640 | 960 | cGridBag updown = new cGridBag().setVertical(true); |
---|
641 | 961 | updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
642 | | - restoreButton.setToolTipText("Restore current"); |
---|
| 962 | + restoreButton.setToolTipText("Undo (restore current version)"); |
---|
643 | 963 | restoreButton.addActionListener(this); |
---|
644 | | - restoreButton.setEnabled(false); |
---|
| 964 | + //restoreButton.setEnabled(false); |
---|
645 | 965 | |
---|
646 | 966 | updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
647 | | - replaceButton.setToolTipText("Replace current"); |
---|
| 967 | + replaceButton.setToolTipText("Save (replace current version)"); |
---|
648 | 968 | replaceButton.addActionListener(this); |
---|
649 | | - replaceButton.setEnabled(false); |
---|
| 969 | + //replaceButton.setEnabled(false); |
---|
650 | 970 | |
---|
651 | 971 | copyOptionsPanel.add(updown); |
---|
652 | 972 | |
---|
653 | | - copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
654 | | - redoButton.setToolTipText("Next version"); |
---|
655 | | - redoButton.addActionListener(this); |
---|
656 | | - redoButton.setEnabled(false); |
---|
| 973 | + copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 974 | + nextVersionButton.setToolTipText("Next version"); |
---|
| 975 | + nextVersionButton.addActionListener(this); |
---|
| 976 | + nextVersionButton.setEnabled(false); |
---|
657 | 977 | |
---|
658 | 978 | oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
659 | 979 | liveCB.setToolTipText("Enable animation"); |
---|
.. | .. |
---|
681 | 1001 | oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
682 | 1002 | snapobjectButton.addActionListener(this); |
---|
683 | 1003 | snapobjectButton.setToolTipText("Snap Object"); |
---|
| 1004 | + |
---|
| 1005 | + oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1006 | + fourButton.addActionListener(this); |
---|
| 1007 | + fourButton.setToolTipText("Show control panel only"); |
---|
684 | 1008 | } |
---|
685 | 1009 | |
---|
686 | 1010 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
687 | 1011 | |
---|
688 | | - oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
689 | | - fourButton.addActionListener(this); |
---|
690 | | - fourButton.setToolTipText("Show left panel only"); |
---|
691 | | - |
---|
692 | | - oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
693 | | - twoButton.setToolTipText("Show right view only"); |
---|
| 1012 | + oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1013 | + twoButton.setToolTipText("Show 3D view only"); |
---|
694 | 1014 | twoButton.addActionListener(this); |
---|
695 | 1015 | this.fullscreenLayout = twoButton; |
---|
696 | 1016 | |
---|
697 | | - oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
698 | | - sixButton.setToolTipText("Show left and right"); |
---|
| 1017 | + oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1018 | + threeButton.setToolTipText("Show controls and 3D view"); |
---|
| 1019 | + threeButton.addActionListener(this); |
---|
| 1020 | + oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1021 | + sixButton.setToolTipText("Show 3D view and controls"); |
---|
699 | 1022 | sixButton.addActionListener(this); |
---|
700 | | -// oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
701 | | -// threeButton.setToolTipText("2-column layout right"); |
---|
702 | | -// threeButton.addActionListener(this); |
---|
703 | 1023 | // oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
704 | 1024 | // sevenButton.setToolTipText("3-column layout"); |
---|
705 | 1025 | // sevenButton.addActionListener(this); |
---|
.. | .. |
---|
715 | 1035 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
716 | 1036 | //clearButton.addActionListener(this); |
---|
717 | 1037 | |
---|
| 1038 | + cGridBag row1 = new cGridBag(); |
---|
| 1039 | + |
---|
718 | 1040 | // INSERT |
---|
719 | | - oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1041 | + row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
720 | 1042 | gridButton.setToolTipText("Create grid"); |
---|
721 | 1043 | gridButton.addActionListener(this); |
---|
722 | 1044 | |
---|
723 | | - oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1045 | + row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
724 | 1046 | boxButton.setToolTipText("Create box"); |
---|
725 | 1047 | boxButton.addActionListener(this); |
---|
726 | 1048 | |
---|
727 | | - oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1049 | + row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
728 | 1050 | sphereButton.setToolTipText("Create sphere"); |
---|
729 | 1051 | sphereButton.addActionListener(this); |
---|
730 | 1052 | |
---|
731 | | - oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1053 | + row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
732 | 1054 | coneButton.setToolTipText("Create cone"); |
---|
733 | 1055 | coneButton.addActionListener(this); |
---|
734 | 1056 | |
---|
735 | | - oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1057 | + row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
736 | 1058 | torusButton.setToolTipText("Create torus"); |
---|
737 | 1059 | torusButton.addActionListener(this); |
---|
738 | 1060 | |
---|
739 | | - oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1061 | + row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
740 | 1062 | superButton.setToolTipText("Create superellipsoid"); |
---|
741 | 1063 | superButton.addActionListener(this); |
---|
742 | 1064 | |
---|
.. | .. |
---|
747 | 1069 | kleinButton.addActionListener(this); |
---|
748 | 1070 | } |
---|
749 | 1071 | |
---|
750 | | - oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1072 | + row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
751 | 1073 | particlesButton.setToolTipText("Create particle system"); |
---|
752 | 1074 | particlesButton.addActionListener(this); |
---|
753 | 1075 | |
---|
754 | | - oe.toolboxPanel.Return(); |
---|
| 1076 | + oe.toolboxPanel.add(row1); |
---|
755 | 1077 | |
---|
756 | | - oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1078 | + cGridBag row2 = new cGridBag(); |
---|
| 1079 | + |
---|
| 1080 | + row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
757 | 1081 | groupButton.setToolTipText("Create group"); |
---|
758 | 1082 | groupButton.addActionListener(this); |
---|
759 | 1083 | |
---|
760 | | - oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1084 | + row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
761 | 1085 | compositeButton.setToolTipText("Create composite"); |
---|
762 | 1086 | compositeButton.addActionListener(this); |
---|
763 | 1087 | |
---|
764 | | - oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1088 | + row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
765 | 1089 | switchButton.setToolTipText("Create item switcher"); |
---|
766 | 1090 | switchButton.addActionListener(this); |
---|
767 | 1091 | |
---|
768 | | - oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1092 | + row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
769 | 1093 | loopButton.setToolTipText("Create loop"); |
---|
770 | 1094 | loopButton.addActionListener(this); |
---|
771 | 1095 | |
---|
772 | | - oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1096 | + row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
773 | 1097 | textureButton.setToolTipText("Create texture"); |
---|
774 | 1098 | textureButton.addActionListener(this); |
---|
775 | 1099 | |
---|
776 | | - oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1100 | + row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
777 | 1101 | overlayButton.setToolTipText("Create overlay"); |
---|
778 | 1102 | overlayButton.addActionListener(this); |
---|
779 | 1103 | |
---|
780 | | - oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1104 | + row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
781 | 1105 | lightButton.setToolTipText("Create light"); |
---|
782 | 1106 | lightButton.addActionListener(this); |
---|
783 | 1107 | |
---|
784 | | - for (int i=6; --i>=0;) |
---|
785 | | - { |
---|
786 | | - oe.toolboxPanel.Return(); |
---|
787 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
788 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
789 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
790 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
791 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
792 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
793 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
794 | | - } |
---|
| 1108 | + oe.toolboxPanel.add(row2); |
---|
| 1109 | + |
---|
| 1110 | + // ENVYMAPS |
---|
| 1111 | + cGridBag skyboxpane = new cGridBag(); |
---|
| 1112 | + skyboxpane.preferredHeight = 100; |
---|
| 1113 | + |
---|
| 1114 | + oe.skyboxPanel.add(skyboxpane); |
---|
| 1115 | + |
---|
| 1116 | + JTabbedPane skyboxpanel = new JTabbedPane(); |
---|
| 1117 | + skyboxpane.add(skyboxpanel); |
---|
| 1118 | + |
---|
| 1119 | + AddSkyboxTab0(skyboxpanel); |
---|
| 1120 | + AddSkyboxTab1(skyboxpanel); |
---|
| 1121 | + AddSkyboxTab2(skyboxpanel); |
---|
| 1122 | + AddSkyboxTab3(skyboxpanel); |
---|
795 | 1123 | |
---|
796 | 1124 | // EDIT panel |
---|
797 | 1125 | editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
799 | 1127 | editButton.addActionListener(this); |
---|
800 | 1128 | |
---|
801 | 1129 | editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
802 | | - uneditButton.setToolTipText("Remove selection controls"); |
---|
| 1130 | + uneditButton.setToolTipText("Unpin and remove selection controls"); |
---|
803 | 1131 | uneditButton.addActionListener(this); |
---|
804 | 1132 | |
---|
805 | 1133 | editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
806 | 1134 | allParamsButton.setToolTipText("Show all controle"); |
---|
807 | 1135 | allParamsButton.addActionListener(this); |
---|
808 | 1136 | |
---|
809 | | - editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1137 | + editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
810 | 1138 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
811 | 1139 | clearPanelButton.addActionListener(this); |
---|
812 | 1140 | |
---|
813 | | - editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
814 | | - unselectButton.setToolTipText("Unselect"); |
---|
815 | | - unselectButton.addActionListener(this); |
---|
| 1141 | + //editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1142 | + //unselectButton.setToolTipText("Unselect"); |
---|
| 1143 | + //unselectButton.addActionListener(this); |
---|
816 | 1144 | |
---|
817 | 1145 | editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
818 | 1146 | flashSelectionButton.setToolTipText("Highlight selection"); |
---|
.. | .. |
---|
851 | 1179 | versionSlider = (cNumberSlider)sliderPane.getComponent(1); |
---|
852 | 1180 | sliderPane.preferredHeight = 1; |
---|
853 | 1181 | |
---|
854 | | -// mainPanel.setDividerLocation(0.5); //1.0); |
---|
855 | | -// mainPanel.setResizeWeight(0.5); |
---|
| 1182 | +// mainPanel.setDividerLocation(0.1); //1.0); |
---|
| 1183 | + mainPanel.setResizeWeight(0.4); |
---|
856 | 1184 | |
---|
857 | 1185 | //jList.addListSelectionListener(this); |
---|
858 | 1186 | oe.jTree.addTreeSelectionListener(this); |
---|
.. | .. |
---|
860 | 1188 | //jTree.setEditable(true); |
---|
861 | 1189 | oe.jTree.setDragEnabled(true); |
---|
862 | 1190 | //jTree.setPreferredSize(new Dimension(10,10)); |
---|
863 | | - jSP.setPreferredSize(new Dimension(100,200)); |
---|
| 1191 | + //jSP.setPreferredSize(new Dimension(100,200)); |
---|
864 | 1192 | |
---|
865 | 1193 | oe.jTree.setCellRenderer(new cTreeModel.Renderer()); |
---|
866 | 1194 | |
---|
.. | .. |
---|
872 | 1200 | dgr.addDragGestureListener(this); |
---|
873 | 1201 | }catch(Exception e) {} |
---|
874 | 1202 | */ |
---|
875 | | - radio.layout = sixButton; // sevenButton; |
---|
| 1203 | + radio.layout = threeButton; // sixButton; |
---|
876 | 1204 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
877 | 1205 | } |
---|
878 | 1206 | |
---|
.. | .. |
---|
923 | 1251 | smoothCB.setToolTipText("Snapping delay"); |
---|
924 | 1252 | smoothCB.addItemListener(this); |
---|
925 | 1253 | |
---|
926 | | - panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
927 | | - slowCB.setToolTipText("Smooth interpolation"); |
---|
928 | | - slowCB.addItemListener(this); |
---|
| 1254 | +// panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
| 1255 | +// slowCB.setToolTipText("Smooth interpolation"); |
---|
| 1256 | +// slowCB.addItemListener(this); |
---|
| 1257 | + panel.add(minshaderCB = new cCheckBox("Min shader", Globals.MINSHADER)); //, constraints); |
---|
| 1258 | + minshaderCB.setToolTipText("Minimal fast shader"); |
---|
| 1259 | + minshaderCB.addItemListener(this); |
---|
929 | 1260 | |
---|
930 | 1261 | // constraints.gridy += 1; |
---|
931 | 1262 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
.. | .. |
---|
1014 | 1345 | } |
---|
1015 | 1346 | |
---|
1016 | 1347 | radioButton.SetObject(obj); |
---|
1017 | | - radioButton.layout = sixButton; // sevenButton; |
---|
| 1348 | + radioButton.layout = threeButton; // sixButton; |
---|
1018 | 1349 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
1019 | 1350 | radioButton.addActionListener(this); |
---|
1020 | 1351 | radioPanel.add(radioButton); |
---|
.. | .. |
---|
1039 | 1370 | cCheckBox localCB; |
---|
1040 | 1371 | cCheckBox crowdCB; |
---|
1041 | 1372 | cCheckBox smoothCB; |
---|
| 1373 | + cCheckBox minshaderCB; |
---|
| 1374 | + |
---|
1042 | 1375 | cToggleButton fastCB; |
---|
1043 | 1376 | cCheckBox slowCB; |
---|
1044 | 1377 | cCheckBox boxCB; |
---|
.. | .. |
---|
1109 | 1442 | { |
---|
1110 | 1443 | cameraView.ToggleInertia(); |
---|
1111 | 1444 | cameraView.repaint(); |
---|
| 1445 | + } |
---|
| 1446 | + else if(e.getSource() == minshaderCB) |
---|
| 1447 | + { |
---|
| 1448 | + Globals.MINSHADER ^= true; |
---|
| 1449 | + cameraView.programInitialized = false; |
---|
| 1450 | + cameraView.repaint(); |
---|
1112 | 1451 | } |
---|
1113 | 1452 | else if(e.getSource() == localCB) |
---|
1114 | 1453 | { |
---|
.. | .. |
---|
2132 | 2471 | { |
---|
2133 | 2472 | makeSomething(new Light()); |
---|
2134 | 2473 | } else |
---|
| 2474 | +// if (source == skybox1Button || |
---|
| 2475 | +// source == skybox2Button || |
---|
| 2476 | +// source == skybox3Button || |
---|
| 2477 | +// source == skybox4Button || |
---|
| 2478 | +// source == skybox5Button || |
---|
| 2479 | +// source == skybox6Button || |
---|
| 2480 | +// source == skybox7Button || |
---|
| 2481 | +// source == skybox11Button || |
---|
| 2482 | +// source == skybox12Button || |
---|
| 2483 | +// source == skybox13Button || |
---|
| 2484 | +// source == skybox14Button || |
---|
| 2485 | +// source == skybox15Button || |
---|
| 2486 | +// source == skybox16Button || |
---|
| 2487 | +// source == skybox17Button) |
---|
| 2488 | +// { |
---|
| 2489 | +// ChangeSkybox(source); |
---|
| 2490 | +// } else |
---|
2135 | 2491 | if (source == csgItem) |
---|
2136 | 2492 | { |
---|
2137 | 2493 | group(new CSG()); |
---|
.. | .. |
---|
2217 | 2573 | if (source == computeAOItem) |
---|
2218 | 2574 | { |
---|
2219 | 2575 | Globals.drawMode = CameraPane.OCCLUSION; |
---|
2220 | | - Globals.theRenderer.repaint(); |
---|
| 2576 | + cameraView.repaint(); |
---|
2221 | 2577 | } else |
---|
2222 | 2578 | if (source == recompileItem) |
---|
2223 | 2579 | { |
---|
.. | .. |
---|
2232 | 2588 | if (source == invariantsItem) |
---|
2233 | 2589 | { |
---|
2234 | 2590 | System.out.println("Invariants:"); |
---|
2235 | | - Grafreed.grafreeD.universe.invariants(); |
---|
| 2591 | + Grafreed.grafreed.universe.invariants(); |
---|
2236 | 2592 | } else |
---|
2237 | 2593 | if (source == memoryItem) |
---|
2238 | 2594 | { |
---|
.. | .. |
---|
2263 | 2619 | { |
---|
2264 | 2620 | ToggleFullScreen(); |
---|
2265 | 2621 | } else |
---|
2266 | | - if (source == undoButton) |
---|
| 2622 | + if (source == previousVersionButton) |
---|
2267 | 2623 | { |
---|
2268 | 2624 | // Go to previous version |
---|
2269 | 2625 | //if (!Undo()) |
---|
2270 | 2626 | //java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2271 | | - Undo(); |
---|
| 2627 | + PreviousVersion(); |
---|
2272 | 2628 | } else |
---|
2273 | 2629 | if (source == restoreButton) |
---|
2274 | 2630 | { |
---|
2275 | 2631 | // Restore current version |
---|
2276 | 2632 | Restore(); |
---|
| 2633 | + //restoreButton.setEnabled(false); |
---|
2277 | 2634 | } else |
---|
2278 | 2635 | if (source == replaceButton) |
---|
2279 | 2636 | { |
---|
2280 | 2637 | // Overwrite current version |
---|
2281 | 2638 | Replace(); |
---|
| 2639 | + //replaceButton.setEnabled(false); |
---|
2282 | 2640 | } else |
---|
2283 | | - if (source == redoButton) |
---|
| 2641 | + if (source == nextVersionButton) |
---|
2284 | 2642 | { |
---|
2285 | 2643 | // Go to next version |
---|
2286 | | - Redo(); |
---|
| 2644 | + NextVersion(); |
---|
2287 | 2645 | } else |
---|
2288 | | - if (source == saveButton) |
---|
| 2646 | + if (source == saveVersionButton) |
---|
2289 | 2647 | { |
---|
2290 | 2648 | // Save a new version |
---|
2291 | 2649 | if (!Save(true)) |
---|
2292 | 2650 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 2651 | + } else |
---|
| 2652 | + if (source == deleteVersionButton) |
---|
| 2653 | + { |
---|
| 2654 | + // Delete a new version |
---|
| 2655 | + DeleteVersion(); |
---|
2293 | 2656 | } else |
---|
2294 | 2657 | if (source == oneStepButton) |
---|
2295 | 2658 | { |
---|
.. | .. |
---|
2344 | 2707 | } else |
---|
2345 | 2708 | if (source == undoItem) |
---|
2346 | 2709 | { |
---|
2347 | | - Undo(); |
---|
| 2710 | + PreviousVersion(); |
---|
2348 | 2711 | } else |
---|
2349 | 2712 | if (source == redoItem) |
---|
2350 | 2713 | { |
---|
2351 | | - Redo(); |
---|
| 2714 | + NextVersion(); |
---|
2352 | 2715 | } else |
---|
2353 | 2716 | if (source == duplicateItem) |
---|
2354 | 2717 | { |
---|
.. | .. |
---|
3151 | 3514 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
3152 | 3515 | { |
---|
3153 | 3516 | obj = (Object3D)e.nextElement(); |
---|
3154 | | - obj.SetBumpTexture(null); |
---|
| 3517 | + obj.ResetBumpTexture(); |
---|
3155 | 3518 | } |
---|
3156 | 3519 | |
---|
3157 | 3520 | refreshContents(); |
---|
.. | .. |
---|
3165 | 3528 | obj.SetBumpTexture(obj.GetPigmentTexture()); |
---|
3166 | 3529 | } |
---|
3167 | 3530 | |
---|
| 3531 | + refreshContents(); |
---|
| 3532 | + } else |
---|
| 3533 | + if (source == embedTexturesItem) |
---|
| 3534 | + { |
---|
| 3535 | + Object3D obj; |
---|
| 3536 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3537 | + { |
---|
| 3538 | + obj = (Object3D)e.nextElement(); |
---|
| 3539 | + obj.EmbedTextures(true); |
---|
| 3540 | + } |
---|
| 3541 | + |
---|
| 3542 | + refreshContents(); |
---|
| 3543 | + } else |
---|
| 3544 | + if (source == deEmbedTexturesItem) |
---|
| 3545 | + { |
---|
| 3546 | + Object3D obj; |
---|
| 3547 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3548 | + { |
---|
| 3549 | + obj = (Object3D)e.nextElement(); |
---|
| 3550 | + obj.EmbedTextures(false); |
---|
| 3551 | + } |
---|
| 3552 | + |
---|
| 3553 | + CameraPane.texturepigment.clear(); |
---|
| 3554 | + CameraPane.texturebump.clear(); |
---|
| 3555 | + |
---|
3168 | 3556 | refreshContents(); |
---|
3169 | 3557 | } else |
---|
3170 | 3558 | if (source == flashSelectionButton) |
---|
.. | .. |
---|
3268 | 3656 | // centralPanel.setVisible(true); |
---|
3269 | 3657 | // XYZPanel.setVisible(true); |
---|
3270 | 3658 | bigThree.ClearUI(); |
---|
| 3659 | + bigThree.add(scenePanel); |
---|
3271 | 3660 | bigThree.add(centralPanel); |
---|
3272 | | - bigThree.add(XYZPanel); |
---|
3273 | 3661 | bigThree.FlushUI(); |
---|
3274 | 3662 | |
---|
3275 | 3663 | cameraView.requestFocusInWindow(); |
---|
.. | .. |
---|
3349 | 3737 | // centralPanel.setVisible(true); |
---|
3350 | 3738 | // XYZPanel.setVisible(false); |
---|
3351 | 3739 | bigThree.ClearUI(); |
---|
3352 | | - bigThree.add(scenePanel); |
---|
3353 | 3740 | bigThree.add(centralPanel); |
---|
| 3741 | + bigThree.add(scenePanel); |
---|
3354 | 3742 | bigThree.FlushUI(); |
---|
3355 | 3743 | |
---|
3356 | 3744 | cameraView.requestFocusInWindow(); |
---|
.. | .. |
---|
3456 | 3844 | { |
---|
3457 | 3845 | Object3D child = (Object3D)e.nextElement(); |
---|
3458 | 3846 | if(child.editWindow != null) |
---|
3459 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3460 | 3847 | child.pinned = false; |
---|
3461 | 3848 | child.CloseUI(); |
---|
3462 | 3849 | listUI.remove(child); |
---|
| 3850 | +// objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3463 | 3851 | |
---|
3464 | 3852 | //child.editWindow = null; // ??????????? |
---|
3465 | 3853 | } |
---|
.. | .. |
---|
3478 | 3866 | obj.CloseUI(); |
---|
3479 | 3867 | } |
---|
3480 | 3868 | listUI.clear(); |
---|
| 3869 | + SetPinStates(group.selection.size() > 0); |
---|
3481 | 3870 | refreshContents(true); |
---|
3482 | 3871 | } else |
---|
3483 | 3872 | if (source == allParamsButton) |
---|
.. | .. |
---|
3564 | 3953 | radio.layout.doClick(); |
---|
3565 | 3954 | |
---|
3566 | 3955 | ClearUnpinned(); |
---|
| 3956 | + |
---|
3567 | 3957 | //Grafreed.Assert(group != null); |
---|
3568 | 3958 | //Grafreed.Assert(group.selection != null); |
---|
3569 | 3959 | SetPinStates(group.selection == null || group.selection.size() > 0); |
---|
.. | .. |
---|
3580 | 3970 | } else if (event.getSource() == editCameraItem) |
---|
3581 | 3971 | { |
---|
3582 | 3972 | cameraView.ProtectCamera(); |
---|
| 3973 | + cameraView.requestFocusInWindow(); |
---|
3583 | 3974 | cameraView.repaint(); |
---|
3584 | 3975 | return; |
---|
3585 | 3976 | } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) |
---|
3586 | 3977 | { |
---|
3587 | 3978 | cameraView.RevertCamera(); |
---|
| 3979 | + cameraView.requestFocusInWindow(); |
---|
3588 | 3980 | cameraView.repaint(); |
---|
3589 | 3981 | return; |
---|
3590 | 3982 | // } else if (event.getSource() == textureButton) |
---|
.. | .. |
---|
4161 | 4553 | |
---|
4162 | 4554 | try |
---|
4163 | 4555 | { |
---|
4164 | | - texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 4556 | + texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres); |
---|
4165 | 4557 | } |
---|
4166 | 4558 | catch (Exception e) |
---|
4167 | 4559 | { |
---|
.. | .. |
---|
4717 | 5109 | |
---|
4718 | 5110 | freezemodel = false; |
---|
4719 | 5111 | } |
---|
4720 | | - |
---|
4721 | | - boolean flashIt = true; |
---|
4722 | | - |
---|
| 5112 | + |
---|
4723 | 5113 | public void valueChanged(TreeSelectionEvent e) |
---|
4724 | 5114 | //public boolean handleEvent(Event event) |
---|
4725 | 5115 | { |
---|
.. | .. |
---|
4792 | 5182 | { |
---|
4793 | 5183 | editButton.setEnabled(enabled); |
---|
4794 | 5184 | uneditButton.setEnabled(enabled); |
---|
4795 | | - unselectButton.setEnabled(enabled); |
---|
| 5185 | + //unselectButton.setEnabled(enabled); |
---|
4796 | 5186 | flashSelectionButton.setEnabled(enabled); |
---|
| 5187 | + |
---|
| 5188 | + clearPanelButton.setEnabled(!listUI.isEmpty()); |
---|
4797 | 5189 | } |
---|
4798 | 5190 | |
---|
4799 | 5191 | void refreshContents(boolean cp) |
---|
4800 | 5192 | { |
---|
4801 | | - if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info")) |
---|
| 5193 | + //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
4802 | 5194 | if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
4803 | 5195 | { |
---|
4804 | 5196 | objEditor.ClearInfo(); // .GetMaterial()); |
---|
.. | .. |
---|
5634 | 6026 | |
---|
5635 | 6027 | cButton restoreCameraButton; |
---|
5636 | 6028 | |
---|
5637 | | - cButton saveButton; |
---|
5638 | 6029 | cButton oneStepButton; |
---|
5639 | 6030 | |
---|
5640 | 6031 | cButton groupButton; |
---|
.. | .. |
---|
5643 | 6034 | cButton switchButton; |
---|
5644 | 6035 | cButton loopButton; |
---|
5645 | 6036 | cButton textureButton; |
---|
| 6037 | + |
---|
| 6038 | + cButton skybox1Button; |
---|
| 6039 | + cButton skybox2Button; |
---|
| 6040 | + cButton skybox3Button; |
---|
| 6041 | + cButton skybox4Button; |
---|
| 6042 | + cButton skybox5Button; |
---|
| 6043 | + cButton skybox6Button; |
---|
| 6044 | + cButton skybox7Button; |
---|
| 6045 | + |
---|
| 6046 | + cButton skybox11Button; |
---|
| 6047 | + cButton skybox12Button; |
---|
| 6048 | + cButton skybox13Button; |
---|
| 6049 | + cButton skybox14Button; |
---|
| 6050 | + cButton skybox15Button; |
---|
| 6051 | + cButton skybox16Button; |
---|
| 6052 | + cButton skybox17Button; |
---|
5646 | 6053 | |
---|
5647 | 6054 | cButton gridButton; |
---|
5648 | 6055 | cButton boxButton; |
---|
.. | .. |
---|
5791 | 6198 | private MenuItem attachBumpItem; |
---|
5792 | 6199 | private MenuItem detachBumpItem; |
---|
5793 | 6200 | private MenuItem pigmentBumpItem; |
---|
| 6201 | + private MenuItem embedTexturesItem; |
---|
| 6202 | + private MenuItem deEmbedTexturesItem; |
---|
5794 | 6203 | |
---|
5795 | 6204 | private MenuItem particleItem; |
---|
5796 | 6205 | private MenuItem ragdollItem; |
---|