.. | .. |
---|
23 | 23 | DragGestureListener, DragSourceListener, DropTargetListener, |
---|
24 | 24 | ItemListener // ListSelectionListener |
---|
25 | 25 | { |
---|
| 26 | + |
---|
| 27 | + public void AddSkyboxButton(String f, String s, cGridBag row) |
---|
| 28 | + { |
---|
| 29 | + cButton skyboxButton; |
---|
| 30 | + final String path = "cubemaps/" + f + "-skyboxes/" + s; |
---|
| 31 | + row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.NIMBUSLAF)); |
---|
| 32 | + //row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF)); |
---|
| 33 | + skyboxButton.setToolTipText(s); |
---|
| 34 | + skyboxButton.addActionListener(new ActionListener() |
---|
| 35 | + { |
---|
| 36 | + @Override |
---|
| 37 | + public void actionPerformed(ActionEvent e) |
---|
| 38 | + { |
---|
| 39 | + ChangeSkybox(path); |
---|
| 40 | + } |
---|
| 41 | + }); |
---|
| 42 | + } |
---|
| 43 | + |
---|
| 44 | + public void AddSkyboxTab0(JTabbedPane skyboxpanel) |
---|
| 45 | + { |
---|
| 46 | + cGridBag tab0 = new cGridBag().setVertical(true); |
---|
| 47 | + |
---|
| 48 | + tab0.setName("Urban"); |
---|
| 49 | + skyboxpanel.add(tab0); |
---|
| 50 | + |
---|
| 51 | + cGridBag row0 = new cGridBag(); |
---|
| 52 | + cGridBag row1 = new cGridBag(); |
---|
| 53 | + cGridBag row2 = new cGridBag(); |
---|
| 54 | + cGridBag row3 = new cGridBag(); |
---|
| 55 | + cGridBag row4 = new cGridBag(); |
---|
| 56 | + cGridBag row5 = new cGridBag(); |
---|
| 57 | + cGridBag row6 = new cGridBag(); |
---|
| 58 | + |
---|
| 59 | + AddSkyboxButton("default", "rgb", row0); |
---|
| 60 | + //AddSkyboxButton("default", "cornell", row0); |
---|
| 61 | + AddSkyboxButton("penguins", "dust", row0); |
---|
| 62 | + AddSkyboxButton("penguins", "tropic", row0); |
---|
| 63 | + AddSkyboxButton("penguins", "yonder", row0); |
---|
| 64 | + |
---|
| 65 | + AddSkyboxButton("default", "uffizi", row1); |
---|
| 66 | + AddSkyboxButton("bridge", "Bridge", row1); |
---|
| 67 | + AddSkyboxButton("bridge", "Bridge2", row1); |
---|
| 68 | + AddSkyboxButton("urban", "GamlaStan2", row1); |
---|
| 69 | + |
---|
| 70 | + AddSkyboxButton("urban", "Parliament", row2); |
---|
| 71 | + AddSkyboxButton("urban", "Roundabout", row2); |
---|
| 72 | + AddSkyboxButton("urban", "SaintLazarusChurch", row2); |
---|
| 73 | + AddSkyboxButton("urban", "SaintLazarusChurch2", row2); |
---|
| 74 | + |
---|
| 75 | + AddSkyboxButton("urban", "SaintLazarusChurch3", row3); |
---|
| 76 | + AddSkyboxButton("urban", "UnionSquare", row3); |
---|
| 77 | + AddSkyboxButton("urban", "Medborgarplatsen", row3); |
---|
| 78 | + AddSkyboxButton("park", "BerzeliiPark", row3); |
---|
| 79 | + |
---|
| 80 | + AddSkyboxButton("park", "Buddha", row4); |
---|
| 81 | + AddSkyboxButton("park", "CNTower2", row4); |
---|
| 82 | + AddSkyboxButton("park", "NiagaraFalls1", row4); |
---|
| 83 | + AddSkyboxButton("park", "NiagaraFalls3", row4); |
---|
| 84 | + |
---|
| 85 | + AddSkyboxButton("park", "Park", row5); |
---|
| 86 | + AddSkyboxButton("park", "Pond", row5); |
---|
| 87 | + AddSkyboxButton("park", "Skansen", row5); |
---|
| 88 | + AddSkyboxButton("park", "Skansen2", row5); |
---|
| 89 | + |
---|
| 90 | + AddSkyboxButton("park", "Skansen3", row6); |
---|
| 91 | + AddSkyboxButton("park", "Skansen4", row6); |
---|
| 92 | + AddSkyboxButton("park", "Skansen5", row6); |
---|
| 93 | + AddSkyboxButton("persson", "VancouverConventionCentre", row6); |
---|
| 94 | + |
---|
| 95 | + tab0.add(row0); |
---|
| 96 | + tab0.add(row1); |
---|
| 97 | + tab0.add(row2); |
---|
| 98 | + tab0.add(row3); |
---|
| 99 | + tab0.add(row4); |
---|
| 100 | + tab0.add(row5); |
---|
| 101 | + tab0.add(row6); |
---|
| 102 | + |
---|
| 103 | + for (int i=5; --i>=0;) |
---|
| 104 | + { |
---|
| 105 | + //oe.toolboxPanel.Return(); |
---|
| 106 | + //tab0.add(new cGridBag()); |
---|
| 107 | + } |
---|
| 108 | + } |
---|
| 109 | + |
---|
| 110 | + public void AddSkyboxTab1(JTabbedPane skyboxpanel) |
---|
| 111 | + { |
---|
| 112 | + cGridBag tab0 = new cGridBag().setVertical(true); |
---|
| 113 | + |
---|
| 114 | + tab0.setName("Nature"); |
---|
| 115 | + skyboxpanel.add(tab0); |
---|
| 116 | + |
---|
| 117 | + cGridBag row0 = new cGridBag(); |
---|
| 118 | + cGridBag row1 = new cGridBag(); |
---|
| 119 | + cGridBag row2 = new cGridBag(); |
---|
| 120 | + cGridBag row3 = new cGridBag(); |
---|
| 121 | + cGridBag row4 = new cGridBag(); |
---|
| 122 | + cGridBag row5 = new cGridBag(); |
---|
| 123 | + cGridBag row6 = new cGridBag(); |
---|
| 124 | + |
---|
| 125 | + AddSkyboxButton("beach", "HeartInTheSand", row0); |
---|
| 126 | + AddSkyboxButton("beach", "LarnacaBeach", row0); |
---|
| 127 | + AddSkyboxButton("beach", "PalmTrees", row0); |
---|
| 128 | + AddSkyboxButton("beach", "Tenerife", row0); |
---|
| 129 | + |
---|
| 130 | + AddSkyboxButton("beach", "Tenerife2", row1); |
---|
| 131 | + AddSkyboxButton("beach", "Tenerife3", row1); |
---|
| 132 | + AddSkyboxButton("field", "FishPond", row1); |
---|
| 133 | + AddSkyboxButton("field", "Footballfield", row1); |
---|
| 134 | + |
---|
| 135 | + AddSkyboxButton("field", "Meadow", row2); |
---|
| 136 | + AddSkyboxButton("field", "Sorsele", row2); |
---|
| 137 | + AddSkyboxButton("field", "Sorsele2", row2); |
---|
| 138 | + AddSkyboxButton("field", "Sorsele3", row2); |
---|
| 139 | + |
---|
| 140 | + AddSkyboxButton("forest", "Brudslojan", row3); |
---|
| 141 | + AddSkyboxButton("forest", "Langholmen2", row3); |
---|
| 142 | + AddSkyboxButton("forest", "Plants", row3); |
---|
| 143 | + AddSkyboxButton("mountain", "Maskonaive", row3); |
---|
| 144 | + |
---|
| 145 | + AddSkyboxButton("mountain", "Maskonaive2", row4); |
---|
| 146 | + AddSkyboxButton("mountain", "Maskonaive3", row4); |
---|
| 147 | + AddSkyboxButton("mountain", "Teide", row4); |
---|
| 148 | + AddSkyboxButton("park", "Tantolunden4", row4); |
---|
| 149 | + |
---|
| 150 | + AddSkyboxButton("park", "Stairs", row5); |
---|
| 151 | + AddSkyboxButton("default", "skycube", row6); |
---|
| 152 | + AddSkyboxButton("rocky", "Langholmen", row5); |
---|
| 153 | + AddSkyboxButton("rocky", "Skinnarviksberget", row5); |
---|
| 154 | + |
---|
| 155 | + AddSkyboxButton("rocky", "Tantolunden6", row5); |
---|
| 156 | + AddSkyboxButton("default", "CloudyHills", row6); |
---|
| 157 | + AddSkyboxButton("daz", "Autumn", row6); |
---|
| 158 | + AddSkyboxButton("daz", "MountainTrail", row6); |
---|
| 159 | + /* |
---|
| 160 | +Autumn |
---|
| 161 | +Greenlands |
---|
| 162 | +MountainTrail |
---|
| 163 | +Oasis |
---|
| 164 | +TheRock |
---|
| 165 | +TopOfTheWorld |
---|
| 166 | +Winter |
---|
| 167 | + */ |
---|
| 168 | + |
---|
| 169 | + tab0.add(row0); |
---|
| 170 | + tab0.add(row1); |
---|
| 171 | + tab0.add(row2); |
---|
| 172 | + tab0.add(row3); |
---|
| 173 | + tab0.add(row4); |
---|
| 174 | + tab0.add(row5); |
---|
| 175 | + tab0.add(row6); |
---|
| 176 | + |
---|
| 177 | + for (int i=5; --i>=0;) |
---|
| 178 | + { |
---|
| 179 | + //oe.toolboxPanel.Return(); |
---|
| 180 | + //tab0.add(new cGridBag()); |
---|
| 181 | + } |
---|
| 182 | + } |
---|
| 183 | + |
---|
| 184 | + public void AddSkyboxTab2(JTabbedPane skyboxpanel) |
---|
| 185 | + { |
---|
| 186 | + cGridBag tab0 = new cGridBag().setVertical(true); |
---|
| 187 | + |
---|
| 188 | + tab0.setName("Night"); |
---|
| 189 | + skyboxpanel.add(tab0); |
---|
| 190 | + |
---|
| 191 | + cGridBag row0 = new cGridBag(); |
---|
| 192 | + cGridBag row1 = new cGridBag(); |
---|
| 193 | + cGridBag row2 = new cGridBag(); |
---|
| 194 | + cGridBag row3 = new cGridBag(); |
---|
| 195 | + cGridBag row4 = new cGridBag(); |
---|
| 196 | + cGridBag row5 = new cGridBag(); |
---|
| 197 | + cGridBag row6 = new cGridBag(); |
---|
| 198 | + |
---|
| 199 | + AddSkyboxButton("night", "NightPath", row0); |
---|
| 200 | + AddSkyboxButton("night", "PondNight", row0); |
---|
| 201 | + AddSkyboxButton("night", "Powerlines", row0); |
---|
| 202 | + AddSkyboxButton("night", "SwedishRoyalCastle", row0); |
---|
| 203 | + |
---|
| 204 | + AddSkyboxButton("urban", "CNTower", row1); |
---|
| 205 | + AddSkyboxButton("bridge", "ArstaBridge", row1); |
---|
| 206 | + AddSkyboxButton("rocky", "Riddarfjarden", row1); |
---|
| 207 | + AddSkyboxButton("penguins", "sleepyhollow", row1); |
---|
| 208 | + |
---|
| 209 | + AddSkyboxButton("penguins", "kenon_star", row2); |
---|
| 210 | + AddSkyboxButton("persson", "corona", row2); |
---|
| 211 | + AddSkyboxButton("persson", "spaceskybox", row2); |
---|
| 212 | + AddSkyboxButton("indoors", "Vasa", row2); |
---|
| 213 | + |
---|
| 214 | + AddSkyboxButton("winter", "Backyard", row3); |
---|
| 215 | + AddSkyboxButton("winter", "Creek", row3); |
---|
| 216 | + AddSkyboxButton("winter", "FootballField3", row3); |
---|
| 217 | + AddSkyboxButton("winter", "Forest", row3); |
---|
| 218 | + |
---|
| 219 | + AddSkyboxButton("winter", "HornstullsStrand2", row4); |
---|
| 220 | + AddSkyboxButton("winter", "House", row4); |
---|
| 221 | + AddSkyboxButton("winter", "IceLake", row4); |
---|
| 222 | + AddSkyboxButton("winter", "IceRiver", row4); |
---|
| 223 | + |
---|
| 224 | + AddSkyboxButton("winter", "Park3", row5); |
---|
| 225 | + AddSkyboxButton("winter", "PondWinter", row5); |
---|
| 226 | + AddSkyboxButton("winter", "Tantolunden5", row5); |
---|
| 227 | + AddSkyboxButton("winter", "Vindelalven", row5); |
---|
| 228 | + |
---|
| 229 | + AddSkyboxButton("daz", "TheRock", row6); |
---|
| 230 | + AddSkyboxButton("daz", "TopOfTheWorld", row6); |
---|
| 231 | + AddSkyboxButton("daz", "Winter", row6); |
---|
| 232 | + AddSkyboxButton("mountain", "Ryfjallet", row6); |
---|
| 233 | + |
---|
| 234 | + tab0.add(row0); |
---|
| 235 | + tab0.add(row1); |
---|
| 236 | + tab0.add(row2); |
---|
| 237 | + tab0.add(row3); |
---|
| 238 | + tab0.add(row4); |
---|
| 239 | + tab0.add(row5); |
---|
| 240 | + tab0.add(row6); |
---|
| 241 | + |
---|
| 242 | + for (int i=5; --i>=0;) |
---|
| 243 | + { |
---|
| 244 | + //oe.toolboxPanel.Return(); |
---|
| 245 | + //tab0.add(new cGridBag()); |
---|
| 246 | + } |
---|
| 247 | + } |
---|
| 248 | + |
---|
| 249 | + public void AddSkyboxTab3(JTabbedPane skyboxpanel) |
---|
| 250 | + { |
---|
| 251 | + cGridBag tab0 = new cGridBag().setVertical(true); |
---|
| 252 | + |
---|
| 253 | + tab0.setName("Others"); |
---|
| 254 | + skyboxpanel.add(tab0); |
---|
| 255 | + |
---|
| 256 | + cGridBag row0 = new cGridBag(); |
---|
| 257 | + cGridBag row1 = new cGridBag(); |
---|
| 258 | + cGridBag row2 = new cGridBag(); |
---|
| 259 | + cGridBag row3 = new cGridBag(); |
---|
| 260 | + cGridBag row4 = new cGridBag(); |
---|
| 261 | + cGridBag row5 = new cGridBag(); |
---|
| 262 | + cGridBag row6 = new cGridBag(); |
---|
| 263 | + |
---|
| 264 | + AddSkyboxButton("mayhem", "afterrain", row0); |
---|
| 265 | + AddSkyboxButton("mayhem", "aqua4", row0); |
---|
| 266 | + AddSkyboxButton("mayhem", "aqua9", row0); |
---|
| 267 | + AddSkyboxButton("mayhem", "flame", row0); |
---|
| 268 | + |
---|
| 269 | + AddSkyboxButton("mayhem", "h2s", row1); |
---|
| 270 | + AddSkyboxButton("mayhem", "prehistoric", row1); |
---|
| 271 | + AddSkyboxButton("mayhem", "scorched", row1); |
---|
| 272 | + AddSkyboxButton("penguins", "desertdawn", row1); |
---|
| 273 | + |
---|
| 274 | + AddSkyboxButton("persson", "Citadella", row2); |
---|
| 275 | + AddSkyboxButton("persson", "Citadella2", row2); |
---|
| 276 | + AddSkyboxButton("persson", "clouds1", row2); |
---|
| 277 | + AddSkyboxButton("penguins", "wrath", row2); |
---|
| 278 | + |
---|
| 279 | + AddSkyboxButton("persson", "FishermansBastion", row3); |
---|
| 280 | + AddSkyboxButton("persson", "HeroesSquare", row3); |
---|
| 281 | + AddSkyboxButton("indoors", "DallasW", row3); |
---|
| 282 | + AddSkyboxButton("indoors", "MarriottMadisonWest", row3); |
---|
| 283 | + |
---|
| 284 | + AddSkyboxButton("persson", "LancellottiChapel", row4); |
---|
| 285 | + AddSkyboxButton("persson", "PereaBeach1", row4); |
---|
| 286 | + AddSkyboxButton("persson", "PereaBeach2", row4); |
---|
| 287 | + AddSkyboxButton("persson", "redeclipse", row4); |
---|
| 288 | + |
---|
| 289 | + AddSkyboxButton("daz", "Greenlands", row5); |
---|
| 290 | + AddSkyboxButton("daz", "Oasis", row5); |
---|
| 291 | + AddSkyboxButton("elyvisions", "arch3", row5); |
---|
| 292 | + AddSkyboxButton("elyvisions", "calm_sea", row5); |
---|
| 293 | + |
---|
| 294 | + AddSkyboxButton("elyvisions", "rainbow", row6); |
---|
| 295 | + AddSkyboxButton("elyvisions", "distant_sunset", row6); |
---|
| 296 | + AddSkyboxButton("elyvisions", "heaven", row6); |
---|
| 297 | + AddSkyboxButton("elyvisions", "hot", row6); |
---|
| 298 | + |
---|
| 299 | + tab0.add(row0); |
---|
| 300 | + tab0.add(row1); |
---|
| 301 | + tab0.add(row2); |
---|
| 302 | + tab0.add(row3); |
---|
| 303 | + tab0.add(row4); |
---|
| 304 | + tab0.add(row5); |
---|
| 305 | + tab0.add(row6); |
---|
| 306 | + |
---|
| 307 | + for (int i=5; --i>=0;) |
---|
| 308 | + { |
---|
| 309 | + //oe.toolboxPanel.Return(); |
---|
| 310 | + //tab0.add(new cGridBag()); |
---|
| 311 | + } |
---|
| 312 | + } |
---|
| 313 | + |
---|
| 314 | + public void ChangeSkybox(String name) |
---|
| 315 | + { |
---|
| 316 | + //cameraView.envyoff = false; |
---|
| 317 | + group.skyboxname = name; |
---|
| 318 | + group.skyboxext = "jpg"; |
---|
| 319 | + cameraView.repaint(); |
---|
| 320 | + } |
---|
| 321 | + |
---|
26 | 322 | //ObjEditor objEditor; |
---|
27 | 323 | public void closeUI2() |
---|
28 | 324 | { |
---|
.. | .. |
---|
60 | 356 | this.copy = this.group = group; |
---|
61 | 357 | //selectees = this.group.selectees; |
---|
62 | 358 | |
---|
63 | | - if (copy.versions == null) |
---|
| 359 | + if (copy.versionlist == null) |
---|
64 | 360 | { |
---|
65 | | - copy.versions = new byte[100][]; |
---|
| 361 | + copy.versionlist = new Object3D[100]; |
---|
66 | 362 | copy.versionindex = -1; |
---|
67 | 363 | } |
---|
68 | 364 | |
---|
.. | .. |
---|
87 | 383 | |
---|
88 | 384 | ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true); |
---|
89 | 385 | |
---|
90 | | - if (copy.versions == null) |
---|
| 386 | + if (copy.versionlist == null) |
---|
91 | 387 | { |
---|
92 | | - copy.versions = new byte[100][]; |
---|
| 388 | + copy.versionlist = new Object3D[100]; |
---|
93 | 389 | copy.versionindex = -1; |
---|
94 | 390 | |
---|
95 | 391 | Save(true); |
---|
.. | .. |
---|
528 | 824 | attachBumpItem.addActionListener(this); |
---|
529 | 825 | pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump")); |
---|
530 | 826 | pigmentBumpItem.addActionListener(this); |
---|
| 827 | + //embedTexturesItem |
---|
531 | 828 | detachPigmentItem = menu.add(new MenuItem("Detach Pigment")); |
---|
532 | 829 | detachPigmentItem.addActionListener(this); |
---|
533 | 830 | detachBumpItem = menu.add(new MenuItem("Detach Bump")); |
---|
534 | 831 | detachBumpItem.addActionListener(this); |
---|
| 832 | + embedTexturesItem = menu.add(new MenuItem("Embed Textures")); |
---|
| 833 | + embedTexturesItem.addActionListener(this); |
---|
| 834 | + deEmbedTexturesItem = menu.add(new MenuItem("De-embed Textures")); |
---|
| 835 | + deEmbedTexturesItem.addActionListener(this); |
---|
535 | 836 | menu.add("-"); |
---|
536 | 837 | sortbysizeItem = menu.add(new MenuItem("Sort by size")); |
---|
537 | 838 | sortbysizeItem.addActionListener(this); |
---|
.. | .. |
---|
603 | 904 | */ |
---|
604 | 905 | cGridBag copyOptionsPanel = new cGridBag(); |
---|
605 | 906 | |
---|
606 | | - copyOptionsPanel.preferredHeight = 1; |
---|
| 907 | + copyOptionsPanel.preferredHeight = 2; |
---|
607 | 908 | |
---|
608 | 909 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
609 | 910 | |
---|
.. | .. |
---|
630 | 931 | restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
631 | 932 | restoreCameraButton.addActionListener(this); |
---|
632 | 933 | |
---|
633 | | - copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
634 | | - saveButton.setToolTipText("New version"); |
---|
635 | | - saveButton.addActionListener(this); |
---|
| 934 | + copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 935 | + saveVersionButton.setToolTipText("Duplicate current version"); |
---|
| 936 | + saveVersionButton.addActionListener(this); |
---|
636 | 937 | |
---|
637 | | - copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
638 | | - undoButton.setToolTipText("Previous version"); |
---|
639 | | - undoButton.addActionListener(this); |
---|
640 | | - undoButton.setEnabled(false); |
---|
| 938 | + copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 939 | + deleteVersionButton.setToolTipText("Delete current version"); |
---|
| 940 | + deleteVersionButton.addActionListener(this); |
---|
| 941 | + |
---|
| 942 | + copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 943 | + previousVersionButton.setToolTipText("Previous version"); |
---|
| 944 | + previousVersionButton.addActionListener(this); |
---|
| 945 | + previousVersionButton.setEnabled(false); |
---|
641 | 946 | |
---|
642 | 947 | cGridBag updown = new cGridBag().setVertical(true); |
---|
643 | 948 | updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
644 | | - restoreButton.setToolTipText("Restore current"); |
---|
| 949 | + restoreButton.setToolTipText("Undo (restore current version)"); |
---|
645 | 950 | restoreButton.addActionListener(this); |
---|
646 | | - restoreButton.setEnabled(false); |
---|
| 951 | + //restoreButton.setEnabled(false); |
---|
647 | 952 | |
---|
648 | 953 | updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
649 | | - replaceButton.setToolTipText("Replace current"); |
---|
| 954 | + replaceButton.setToolTipText("Save (replace current version)"); |
---|
650 | 955 | replaceButton.addActionListener(this); |
---|
651 | | - replaceButton.setEnabled(false); |
---|
| 956 | + //replaceButton.setEnabled(false); |
---|
652 | 957 | |
---|
653 | 958 | copyOptionsPanel.add(updown); |
---|
654 | 959 | |
---|
655 | | - copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
656 | | - redoButton.setToolTipText("Next version"); |
---|
657 | | - redoButton.addActionListener(this); |
---|
658 | | - redoButton.setEnabled(false); |
---|
| 960 | + copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 961 | + nextVersionButton.setToolTipText("Next version"); |
---|
| 962 | + nextVersionButton.addActionListener(this); |
---|
| 963 | + nextVersionButton.setEnabled(false); |
---|
659 | 964 | |
---|
660 | 965 | oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
661 | 966 | liveCB.setToolTipText("Enable animation"); |
---|
.. | .. |
---|
683 | 988 | oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
684 | 989 | snapobjectButton.addActionListener(this); |
---|
685 | 990 | snapobjectButton.setToolTipText("Snap Object"); |
---|
| 991 | + |
---|
| 992 | + oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 993 | + fourButton.addActionListener(this); |
---|
| 994 | + fourButton.setToolTipText("Show control panel only"); |
---|
686 | 995 | } |
---|
687 | 996 | |
---|
688 | 997 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
689 | 998 | |
---|
690 | | - oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
691 | | - fourButton.addActionListener(this); |
---|
692 | | - fourButton.setToolTipText("Show left panel only"); |
---|
693 | | - |
---|
694 | | - oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
695 | | - twoButton.setToolTipText("Show right view only"); |
---|
| 999 | + oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1000 | + twoButton.setToolTipText("Show 3D view only"); |
---|
696 | 1001 | twoButton.addActionListener(this); |
---|
697 | 1002 | this.fullscreenLayout = twoButton; |
---|
698 | 1003 | |
---|
699 | | - oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
700 | | - sixButton.setToolTipText("Show left and right"); |
---|
| 1004 | + oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1005 | + threeButton.setToolTipText("Show controls and 3D view"); |
---|
| 1006 | + threeButton.addActionListener(this); |
---|
| 1007 | + oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1008 | + sixButton.setToolTipText("Show 3D view and controls"); |
---|
701 | 1009 | sixButton.addActionListener(this); |
---|
702 | | -// oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
703 | | -// threeButton.setToolTipText("2-column layout right"); |
---|
704 | | -// threeButton.addActionListener(this); |
---|
705 | 1010 | // oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
706 | 1011 | // sevenButton.setToolTipText("3-column layout"); |
---|
707 | 1012 | // sevenButton.addActionListener(this); |
---|
.. | .. |
---|
717 | 1022 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
718 | 1023 | //clearButton.addActionListener(this); |
---|
719 | 1024 | |
---|
| 1025 | + cGridBag row1 = new cGridBag(); |
---|
| 1026 | + |
---|
720 | 1027 | // INSERT |
---|
721 | | - oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1028 | + row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
722 | 1029 | gridButton.setToolTipText("Create grid"); |
---|
723 | 1030 | gridButton.addActionListener(this); |
---|
724 | 1031 | |
---|
725 | | - oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1032 | + row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
726 | 1033 | boxButton.setToolTipText("Create box"); |
---|
727 | 1034 | boxButton.addActionListener(this); |
---|
728 | 1035 | |
---|
729 | | - oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1036 | + row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
730 | 1037 | sphereButton.setToolTipText("Create sphere"); |
---|
731 | 1038 | sphereButton.addActionListener(this); |
---|
732 | 1039 | |
---|
733 | | - oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1040 | + row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
734 | 1041 | coneButton.setToolTipText("Create cone"); |
---|
735 | 1042 | coneButton.addActionListener(this); |
---|
736 | 1043 | |
---|
737 | | - oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1044 | + row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
738 | 1045 | torusButton.setToolTipText("Create torus"); |
---|
739 | 1046 | torusButton.addActionListener(this); |
---|
740 | 1047 | |
---|
741 | | - oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1048 | + row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
742 | 1049 | superButton.setToolTipText("Create superellipsoid"); |
---|
743 | 1050 | superButton.addActionListener(this); |
---|
744 | 1051 | |
---|
.. | .. |
---|
749 | 1056 | kleinButton.addActionListener(this); |
---|
750 | 1057 | } |
---|
751 | 1058 | |
---|
752 | | - oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1059 | + row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
753 | 1060 | particlesButton.setToolTipText("Create particle system"); |
---|
754 | 1061 | particlesButton.addActionListener(this); |
---|
755 | 1062 | |
---|
756 | | - oe.toolboxPanel.Return(); |
---|
| 1063 | + oe.toolboxPanel.add(row1); |
---|
757 | 1064 | |
---|
758 | | - oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1065 | + cGridBag row2 = new cGridBag(); |
---|
| 1066 | + |
---|
| 1067 | + row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
759 | 1068 | groupButton.setToolTipText("Create group"); |
---|
760 | 1069 | groupButton.addActionListener(this); |
---|
761 | 1070 | |
---|
762 | | - oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1071 | + row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
763 | 1072 | compositeButton.setToolTipText("Create composite"); |
---|
764 | 1073 | compositeButton.addActionListener(this); |
---|
765 | 1074 | |
---|
766 | | - oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1075 | + row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
767 | 1076 | switchButton.setToolTipText("Create item switcher"); |
---|
768 | 1077 | switchButton.addActionListener(this); |
---|
769 | 1078 | |
---|
770 | | - oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1079 | + row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
771 | 1080 | loopButton.setToolTipText("Create loop"); |
---|
772 | 1081 | loopButton.addActionListener(this); |
---|
773 | 1082 | |
---|
774 | | - oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1083 | + row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
775 | 1084 | textureButton.setToolTipText("Create texture"); |
---|
776 | 1085 | textureButton.addActionListener(this); |
---|
777 | 1086 | |
---|
778 | | - oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1087 | + row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
779 | 1088 | overlayButton.setToolTipText("Create overlay"); |
---|
780 | 1089 | overlayButton.addActionListener(this); |
---|
781 | 1090 | |
---|
782 | | - oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1091 | + row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
783 | 1092 | lightButton.setToolTipText("Create light"); |
---|
784 | 1093 | lightButton.addActionListener(this); |
---|
785 | 1094 | |
---|
786 | | - for (int i=6; --i>=0;) |
---|
787 | | - { |
---|
788 | | - oe.toolboxPanel.Return(); |
---|
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 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
795 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
796 | | - } |
---|
| 1095 | + oe.toolboxPanel.add(row2); |
---|
| 1096 | + |
---|
| 1097 | + // ENVYMAPS |
---|
| 1098 | + cGridBag skyboxpane = new cGridBag(); |
---|
| 1099 | + skyboxpane.preferredHeight = 100; |
---|
| 1100 | + |
---|
| 1101 | + oe.toolboxPanel.add(skyboxpane); |
---|
| 1102 | + |
---|
| 1103 | + JTabbedPane skyboxpanel = new JTabbedPane(); |
---|
| 1104 | + skyboxpane.add(skyboxpanel); |
---|
| 1105 | + |
---|
| 1106 | + AddSkyboxTab0(skyboxpanel); |
---|
| 1107 | + AddSkyboxTab1(skyboxpanel); |
---|
| 1108 | + AddSkyboxTab2(skyboxpanel); |
---|
| 1109 | + AddSkyboxTab3(skyboxpanel); |
---|
797 | 1110 | |
---|
798 | 1111 | // EDIT panel |
---|
799 | 1112 | editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
801 | 1114 | editButton.addActionListener(this); |
---|
802 | 1115 | |
---|
803 | 1116 | editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
804 | | - uneditButton.setToolTipText("Remove selection controls"); |
---|
| 1117 | + uneditButton.setToolTipText("Unpin and remove selection controls"); |
---|
805 | 1118 | uneditButton.addActionListener(this); |
---|
806 | 1119 | |
---|
807 | 1120 | editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
808 | 1121 | allParamsButton.setToolTipText("Show all controle"); |
---|
809 | 1122 | allParamsButton.addActionListener(this); |
---|
810 | 1123 | |
---|
811 | | - editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1124 | + editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
812 | 1125 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
813 | 1126 | clearPanelButton.addActionListener(this); |
---|
814 | 1127 | |
---|
.. | .. |
---|
853 | 1166 | versionSlider = (cNumberSlider)sliderPane.getComponent(1); |
---|
854 | 1167 | sliderPane.preferredHeight = 1; |
---|
855 | 1168 | |
---|
856 | | -// mainPanel.setDividerLocation(0.5); //1.0); |
---|
857 | | -// mainPanel.setResizeWeight(0.5); |
---|
| 1169 | +// mainPanel.setDividerLocation(0.1); //1.0); |
---|
| 1170 | + mainPanel.setResizeWeight(0.4); |
---|
858 | 1171 | |
---|
859 | 1172 | //jList.addListSelectionListener(this); |
---|
860 | 1173 | oe.jTree.addTreeSelectionListener(this); |
---|
.. | .. |
---|
862 | 1175 | //jTree.setEditable(true); |
---|
863 | 1176 | oe.jTree.setDragEnabled(true); |
---|
864 | 1177 | //jTree.setPreferredSize(new Dimension(10,10)); |
---|
865 | | - jSP.setPreferredSize(new Dimension(100,200)); |
---|
| 1178 | + //jSP.setPreferredSize(new Dimension(100,200)); |
---|
866 | 1179 | |
---|
867 | 1180 | oe.jTree.setCellRenderer(new cTreeModel.Renderer()); |
---|
868 | 1181 | |
---|
.. | .. |
---|
874 | 1187 | dgr.addDragGestureListener(this); |
---|
875 | 1188 | }catch(Exception e) {} |
---|
876 | 1189 | */ |
---|
877 | | - radio.layout = sixButton; // sevenButton; |
---|
| 1190 | + radio.layout = threeButton; // sixButton; |
---|
878 | 1191 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
879 | 1192 | } |
---|
880 | 1193 | |
---|
.. | .. |
---|
925 | 1238 | smoothCB.setToolTipText("Snapping delay"); |
---|
926 | 1239 | smoothCB.addItemListener(this); |
---|
927 | 1240 | |
---|
928 | | - panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
929 | | - slowCB.setToolTipText("Smooth interpolation"); |
---|
930 | | - slowCB.addItemListener(this); |
---|
| 1241 | +// panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
| 1242 | +// slowCB.setToolTipText("Smooth interpolation"); |
---|
| 1243 | +// slowCB.addItemListener(this); |
---|
| 1244 | + panel.add(minshaderCB = new cCheckBox("Min shader", Globals.MINSHADER)); //, constraints); |
---|
| 1245 | + minshaderCB.setToolTipText("Minimal fast shader"); |
---|
| 1246 | + minshaderCB.addItemListener(this); |
---|
931 | 1247 | |
---|
932 | 1248 | // constraints.gridy += 1; |
---|
933 | 1249 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
.. | .. |
---|
1016 | 1332 | } |
---|
1017 | 1333 | |
---|
1018 | 1334 | radioButton.SetObject(obj); |
---|
1019 | | - radioButton.layout = sixButton; // sevenButton; |
---|
| 1335 | + radioButton.layout = threeButton; // sixButton; |
---|
1020 | 1336 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
1021 | 1337 | radioButton.addActionListener(this); |
---|
1022 | 1338 | radioPanel.add(radioButton); |
---|
.. | .. |
---|
1041 | 1357 | cCheckBox localCB; |
---|
1042 | 1358 | cCheckBox crowdCB; |
---|
1043 | 1359 | cCheckBox smoothCB; |
---|
| 1360 | + cCheckBox minshaderCB; |
---|
| 1361 | + |
---|
1044 | 1362 | cToggleButton fastCB; |
---|
1045 | 1363 | cCheckBox slowCB; |
---|
1046 | 1364 | cCheckBox boxCB; |
---|
.. | .. |
---|
1111 | 1429 | { |
---|
1112 | 1430 | cameraView.ToggleInertia(); |
---|
1113 | 1431 | cameraView.repaint(); |
---|
| 1432 | + } |
---|
| 1433 | + else if(e.getSource() == minshaderCB) |
---|
| 1434 | + { |
---|
| 1435 | + Globals.MINSHADER ^= true; |
---|
| 1436 | + cameraView.programInitialized = false; |
---|
| 1437 | + cameraView.repaint(); |
---|
1114 | 1438 | } |
---|
1115 | 1439 | else if(e.getSource() == localCB) |
---|
1116 | 1440 | { |
---|
.. | .. |
---|
2134 | 2458 | { |
---|
2135 | 2459 | makeSomething(new Light()); |
---|
2136 | 2460 | } else |
---|
| 2461 | +// if (source == skybox1Button || |
---|
| 2462 | +// source == skybox2Button || |
---|
| 2463 | +// source == skybox3Button || |
---|
| 2464 | +// source == skybox4Button || |
---|
| 2465 | +// source == skybox5Button || |
---|
| 2466 | +// source == skybox6Button || |
---|
| 2467 | +// source == skybox7Button || |
---|
| 2468 | +// source == skybox11Button || |
---|
| 2469 | +// source == skybox12Button || |
---|
| 2470 | +// source == skybox13Button || |
---|
| 2471 | +// source == skybox14Button || |
---|
| 2472 | +// source == skybox15Button || |
---|
| 2473 | +// source == skybox16Button || |
---|
| 2474 | +// source == skybox17Button) |
---|
| 2475 | +// { |
---|
| 2476 | +// ChangeSkybox(source); |
---|
| 2477 | +// } else |
---|
2137 | 2478 | if (source == csgItem) |
---|
2138 | 2479 | { |
---|
2139 | 2480 | group(new CSG()); |
---|
.. | .. |
---|
2219 | 2560 | if (source == computeAOItem) |
---|
2220 | 2561 | { |
---|
2221 | 2562 | Globals.drawMode = CameraPane.OCCLUSION; |
---|
2222 | | - Globals.theRenderer.repaint(); |
---|
| 2563 | + cameraView.repaint(); |
---|
2223 | 2564 | } else |
---|
2224 | 2565 | if (source == recompileItem) |
---|
2225 | 2566 | { |
---|
.. | .. |
---|
2234 | 2575 | if (source == invariantsItem) |
---|
2235 | 2576 | { |
---|
2236 | 2577 | System.out.println("Invariants:"); |
---|
2237 | | - Grafreed.grafreeD.universe.invariants(); |
---|
| 2578 | + Grafreed.grafreed.universe.invariants(); |
---|
2238 | 2579 | } else |
---|
2239 | 2580 | if (source == memoryItem) |
---|
2240 | 2581 | { |
---|
.. | .. |
---|
2265 | 2606 | { |
---|
2266 | 2607 | ToggleFullScreen(); |
---|
2267 | 2608 | } else |
---|
2268 | | - if (source == undoButton) |
---|
| 2609 | + if (source == previousVersionButton) |
---|
2269 | 2610 | { |
---|
2270 | 2611 | // Go to previous version |
---|
2271 | 2612 | //if (!Undo()) |
---|
2272 | 2613 | //java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2273 | | - Undo(); |
---|
| 2614 | + PreviousVersion(); |
---|
2274 | 2615 | } else |
---|
2275 | 2616 | if (source == restoreButton) |
---|
2276 | 2617 | { |
---|
2277 | 2618 | // Restore current version |
---|
2278 | 2619 | Restore(); |
---|
| 2620 | + //restoreButton.setEnabled(false); |
---|
2279 | 2621 | } else |
---|
2280 | 2622 | if (source == replaceButton) |
---|
2281 | 2623 | { |
---|
2282 | 2624 | // Overwrite current version |
---|
2283 | 2625 | Replace(); |
---|
| 2626 | + //replaceButton.setEnabled(false); |
---|
2284 | 2627 | } else |
---|
2285 | | - if (source == redoButton) |
---|
| 2628 | + if (source == nextVersionButton) |
---|
2286 | 2629 | { |
---|
2287 | 2630 | // Go to next version |
---|
2288 | | - Redo(); |
---|
| 2631 | + NextVersion(); |
---|
2289 | 2632 | } else |
---|
2290 | | - if (source == saveButton) |
---|
| 2633 | + if (source == saveVersionButton) |
---|
2291 | 2634 | { |
---|
2292 | 2635 | // Save a new version |
---|
2293 | 2636 | if (!Save(true)) |
---|
2294 | 2637 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 2638 | + } else |
---|
| 2639 | + if (source == deleteVersionButton) |
---|
| 2640 | + { |
---|
| 2641 | + // Delete a new version |
---|
| 2642 | + DeleteVersion(); |
---|
2295 | 2643 | } else |
---|
2296 | 2644 | if (source == oneStepButton) |
---|
2297 | 2645 | { |
---|
.. | .. |
---|
2346 | 2694 | } else |
---|
2347 | 2695 | if (source == undoItem) |
---|
2348 | 2696 | { |
---|
2349 | | - Undo(); |
---|
| 2697 | + PreviousVersion(); |
---|
2350 | 2698 | } else |
---|
2351 | 2699 | if (source == redoItem) |
---|
2352 | 2700 | { |
---|
2353 | | - Redo(); |
---|
| 2701 | + NextVersion(); |
---|
2354 | 2702 | } else |
---|
2355 | 2703 | if (source == duplicateItem) |
---|
2356 | 2704 | { |
---|
.. | .. |
---|
3153 | 3501 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
3154 | 3502 | { |
---|
3155 | 3503 | obj = (Object3D)e.nextElement(); |
---|
3156 | | - obj.SetBumpTexture(null); |
---|
| 3504 | + obj.ResetBumpTexture(); |
---|
3157 | 3505 | } |
---|
3158 | 3506 | |
---|
3159 | 3507 | refreshContents(); |
---|
.. | .. |
---|
3167 | 3515 | obj.SetBumpTexture(obj.GetPigmentTexture()); |
---|
3168 | 3516 | } |
---|
3169 | 3517 | |
---|
| 3518 | + refreshContents(); |
---|
| 3519 | + } else |
---|
| 3520 | + if (source == embedTexturesItem) |
---|
| 3521 | + { |
---|
| 3522 | + Object3D obj; |
---|
| 3523 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3524 | + { |
---|
| 3525 | + obj = (Object3D)e.nextElement(); |
---|
| 3526 | + obj.EmbedTextures(true); |
---|
| 3527 | + } |
---|
| 3528 | + |
---|
| 3529 | + refreshContents(); |
---|
| 3530 | + } else |
---|
| 3531 | + if (source == deEmbedTexturesItem) |
---|
| 3532 | + { |
---|
| 3533 | + Object3D obj; |
---|
| 3534 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3535 | + { |
---|
| 3536 | + obj = (Object3D)e.nextElement(); |
---|
| 3537 | + obj.EmbedTextures(false); |
---|
| 3538 | + } |
---|
| 3539 | + |
---|
| 3540 | + CameraPane.texturepigment.clear(); |
---|
| 3541 | + CameraPane.texturebump.clear(); |
---|
| 3542 | + |
---|
3170 | 3543 | refreshContents(); |
---|
3171 | 3544 | } else |
---|
3172 | 3545 | if (source == flashSelectionButton) |
---|
.. | .. |
---|
3270 | 3643 | // centralPanel.setVisible(true); |
---|
3271 | 3644 | // XYZPanel.setVisible(true); |
---|
3272 | 3645 | bigThree.ClearUI(); |
---|
| 3646 | + bigThree.add(scenePanel); |
---|
3273 | 3647 | bigThree.add(centralPanel); |
---|
3274 | | - bigThree.add(XYZPanel); |
---|
3275 | 3648 | bigThree.FlushUI(); |
---|
3276 | 3649 | |
---|
3277 | 3650 | cameraView.requestFocusInWindow(); |
---|
.. | .. |
---|
3351 | 3724 | // centralPanel.setVisible(true); |
---|
3352 | 3725 | // XYZPanel.setVisible(false); |
---|
3353 | 3726 | bigThree.ClearUI(); |
---|
3354 | | - bigThree.add(scenePanel); |
---|
3355 | 3727 | bigThree.add(centralPanel); |
---|
| 3728 | + bigThree.add(scenePanel); |
---|
3356 | 3729 | bigThree.FlushUI(); |
---|
3357 | 3730 | |
---|
3358 | 3731 | cameraView.requestFocusInWindow(); |
---|
.. | .. |
---|
3458 | 3831 | { |
---|
3459 | 3832 | Object3D child = (Object3D)e.nextElement(); |
---|
3460 | 3833 | if(child.editWindow != null) |
---|
3461 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3462 | 3834 | child.pinned = false; |
---|
3463 | 3835 | child.CloseUI(); |
---|
3464 | 3836 | listUI.remove(child); |
---|
| 3837 | +// objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3465 | 3838 | |
---|
3466 | 3839 | //child.editWindow = null; // ??????????? |
---|
3467 | 3840 | } |
---|
.. | .. |
---|
3480 | 3853 | obj.CloseUI(); |
---|
3481 | 3854 | } |
---|
3482 | 3855 | listUI.clear(); |
---|
| 3856 | + SetPinStates(group.selection.size() > 0); |
---|
3483 | 3857 | refreshContents(true); |
---|
3484 | 3858 | } else |
---|
3485 | 3859 | if (source == allParamsButton) |
---|
.. | .. |
---|
3566 | 3940 | radio.layout.doClick(); |
---|
3567 | 3941 | |
---|
3568 | 3942 | ClearUnpinned(); |
---|
| 3943 | + |
---|
3569 | 3944 | //Grafreed.Assert(group != null); |
---|
3570 | 3945 | //Grafreed.Assert(group.selection != null); |
---|
3571 | 3946 | SetPinStates(group.selection == null || group.selection.size() > 0); |
---|
.. | .. |
---|
3582 | 3957 | } else if (event.getSource() == editCameraItem) |
---|
3583 | 3958 | { |
---|
3584 | 3959 | cameraView.ProtectCamera(); |
---|
| 3960 | + cameraView.requestFocusInWindow(); |
---|
3585 | 3961 | cameraView.repaint(); |
---|
3586 | 3962 | return; |
---|
3587 | 3963 | } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) |
---|
3588 | 3964 | { |
---|
3589 | 3965 | cameraView.RevertCamera(); |
---|
| 3966 | + cameraView.requestFocusInWindow(); |
---|
3590 | 3967 | cameraView.repaint(); |
---|
3591 | 3968 | return; |
---|
3592 | 3969 | // } else if (event.getSource() == textureButton) |
---|
.. | .. |
---|
4163 | 4540 | |
---|
4164 | 4541 | try |
---|
4165 | 4542 | { |
---|
4166 | | - texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 4543 | + texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres); |
---|
4167 | 4544 | } |
---|
4168 | 4545 | catch (Exception e) |
---|
4169 | 4546 | { |
---|
.. | .. |
---|
4719 | 5096 | |
---|
4720 | 5097 | freezemodel = false; |
---|
4721 | 5098 | } |
---|
4722 | | - |
---|
4723 | | - boolean flashIt = true; |
---|
4724 | | - |
---|
| 5099 | + |
---|
4725 | 5100 | public void valueChanged(TreeSelectionEvent e) |
---|
4726 | 5101 | //public boolean handleEvent(Event event) |
---|
4727 | 5102 | { |
---|
.. | .. |
---|
4796 | 5171 | uneditButton.setEnabled(enabled); |
---|
4797 | 5172 | unselectButton.setEnabled(enabled); |
---|
4798 | 5173 | flashSelectionButton.setEnabled(enabled); |
---|
| 5174 | + |
---|
| 5175 | + clearPanelButton.setEnabled(!listUI.isEmpty()); |
---|
4799 | 5176 | } |
---|
4800 | 5177 | |
---|
4801 | 5178 | void refreshContents(boolean cp) |
---|
.. | .. |
---|
5636 | 6013 | |
---|
5637 | 6014 | cButton restoreCameraButton; |
---|
5638 | 6015 | |
---|
5639 | | - cButton saveButton; |
---|
5640 | 6016 | cButton oneStepButton; |
---|
5641 | 6017 | |
---|
5642 | 6018 | cButton groupButton; |
---|
.. | .. |
---|
5645 | 6021 | cButton switchButton; |
---|
5646 | 6022 | cButton loopButton; |
---|
5647 | 6023 | cButton textureButton; |
---|
| 6024 | + |
---|
| 6025 | + cButton skybox1Button; |
---|
| 6026 | + cButton skybox2Button; |
---|
| 6027 | + cButton skybox3Button; |
---|
| 6028 | + cButton skybox4Button; |
---|
| 6029 | + cButton skybox5Button; |
---|
| 6030 | + cButton skybox6Button; |
---|
| 6031 | + cButton skybox7Button; |
---|
| 6032 | + |
---|
| 6033 | + cButton skybox11Button; |
---|
| 6034 | + cButton skybox12Button; |
---|
| 6035 | + cButton skybox13Button; |
---|
| 6036 | + cButton skybox14Button; |
---|
| 6037 | + cButton skybox15Button; |
---|
| 6038 | + cButton skybox16Button; |
---|
| 6039 | + cButton skybox17Button; |
---|
5648 | 6040 | |
---|
5649 | 6041 | cButton gridButton; |
---|
5650 | 6042 | cButton boxButton; |
---|
.. | .. |
---|
5793 | 6185 | private MenuItem attachBumpItem; |
---|
5794 | 6186 | private MenuItem detachBumpItem; |
---|
5795 | 6187 | private MenuItem pigmentBumpItem; |
---|
| 6188 | + private MenuItem embedTexturesItem; |
---|
| 6189 | + private MenuItem deEmbedTexturesItem; |
---|
5796 | 6190 | |
---|
5797 | 6191 | private MenuItem particleItem; |
---|
5798 | 6192 | private MenuItem ragdollItem; |
---|