.. | .. |
---|
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 | { |
---|
.. | .. |
---|
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 | |
---|
.. | .. |
---|
683 | 984 | oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
684 | 985 | snapobjectButton.addActionListener(this); |
---|
685 | 986 | snapobjectButton.setToolTipText("Snap Object"); |
---|
| 987 | + |
---|
| 988 | + oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 989 | + fourButton.addActionListener(this); |
---|
| 990 | + fourButton.setToolTipText("Show control panel only"); |
---|
686 | 991 | } |
---|
687 | 992 | |
---|
688 | 993 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
689 | 994 | |
---|
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"); |
---|
| 995 | + oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 996 | + twoButton.setToolTipText("Show 3D view only"); |
---|
696 | 997 | twoButton.addActionListener(this); |
---|
697 | 998 | this.fullscreenLayout = twoButton; |
---|
698 | 999 | |
---|
699 | | - oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
700 | | - sixButton.setToolTipText("Show left and right"); |
---|
| 1000 | + oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1001 | + threeButton.setToolTipText("Show controls and 3D view"); |
---|
| 1002 | + threeButton.addActionListener(this); |
---|
| 1003 | + oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1004 | + sixButton.setToolTipText("Show 3D view and controls"); |
---|
701 | 1005 | 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 | 1006 | // oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
706 | 1007 | // sevenButton.setToolTipText("3-column layout"); |
---|
707 | 1008 | // sevenButton.addActionListener(this); |
---|
.. | .. |
---|
717 | 1018 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
718 | 1019 | //clearButton.addActionListener(this); |
---|
719 | 1020 | |
---|
| 1021 | + cGridBag row1 = new cGridBag(); |
---|
| 1022 | + |
---|
720 | 1023 | // INSERT |
---|
721 | | - oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1024 | + row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
722 | 1025 | gridButton.setToolTipText("Create grid"); |
---|
723 | 1026 | gridButton.addActionListener(this); |
---|
724 | 1027 | |
---|
725 | | - oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1028 | + row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
726 | 1029 | boxButton.setToolTipText("Create box"); |
---|
727 | 1030 | boxButton.addActionListener(this); |
---|
728 | 1031 | |
---|
729 | | - oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1032 | + row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
730 | 1033 | sphereButton.setToolTipText("Create sphere"); |
---|
731 | 1034 | sphereButton.addActionListener(this); |
---|
732 | 1035 | |
---|
733 | | - oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1036 | + row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
734 | 1037 | coneButton.setToolTipText("Create cone"); |
---|
735 | 1038 | coneButton.addActionListener(this); |
---|
736 | 1039 | |
---|
737 | | - oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1040 | + row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
738 | 1041 | torusButton.setToolTipText("Create torus"); |
---|
739 | 1042 | torusButton.addActionListener(this); |
---|
740 | 1043 | |
---|
741 | | - oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1044 | + row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
742 | 1045 | superButton.setToolTipText("Create superellipsoid"); |
---|
743 | 1046 | superButton.addActionListener(this); |
---|
744 | 1047 | |
---|
.. | .. |
---|
749 | 1052 | kleinButton.addActionListener(this); |
---|
750 | 1053 | } |
---|
751 | 1054 | |
---|
752 | | - oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1055 | + row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
753 | 1056 | particlesButton.setToolTipText("Create particle system"); |
---|
754 | 1057 | particlesButton.addActionListener(this); |
---|
755 | 1058 | |
---|
756 | | - oe.toolboxPanel.Return(); |
---|
| 1059 | + oe.toolboxPanel.add(row1); |
---|
757 | 1060 | |
---|
758 | | - oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1061 | + cGridBag row2 = new cGridBag(); |
---|
| 1062 | + |
---|
| 1063 | + row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
759 | 1064 | groupButton.setToolTipText("Create group"); |
---|
760 | 1065 | groupButton.addActionListener(this); |
---|
761 | 1066 | |
---|
762 | | - oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1067 | + row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
763 | 1068 | compositeButton.setToolTipText("Create composite"); |
---|
764 | 1069 | compositeButton.addActionListener(this); |
---|
765 | 1070 | |
---|
766 | | - oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1071 | + row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
767 | 1072 | switchButton.setToolTipText("Create item switcher"); |
---|
768 | 1073 | switchButton.addActionListener(this); |
---|
769 | 1074 | |
---|
770 | | - oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1075 | + row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
771 | 1076 | loopButton.setToolTipText("Create loop"); |
---|
772 | 1077 | loopButton.addActionListener(this); |
---|
773 | 1078 | |
---|
774 | | - oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1079 | + row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
775 | 1080 | textureButton.setToolTipText("Create texture"); |
---|
776 | 1081 | textureButton.addActionListener(this); |
---|
777 | 1082 | |
---|
778 | | - oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1083 | + row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
779 | 1084 | overlayButton.setToolTipText("Create overlay"); |
---|
780 | 1085 | overlayButton.addActionListener(this); |
---|
781 | 1086 | |
---|
782 | | - oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1087 | + row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
783 | 1088 | lightButton.setToolTipText("Create light"); |
---|
784 | 1089 | lightButton.addActionListener(this); |
---|
785 | 1090 | |
---|
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 | | - } |
---|
| 1091 | + oe.toolboxPanel.add(row2); |
---|
| 1092 | + |
---|
| 1093 | + // ENVYMAPS |
---|
| 1094 | + cGridBag skyboxpane = new cGridBag(); |
---|
| 1095 | + skyboxpane.preferredHeight = 100; |
---|
| 1096 | + |
---|
| 1097 | + oe.toolboxPanel.add(skyboxpane); |
---|
| 1098 | + |
---|
| 1099 | + JTabbedPane skyboxpanel = new JTabbedPane(); |
---|
| 1100 | + skyboxpane.add(skyboxpanel); |
---|
| 1101 | + |
---|
| 1102 | + AddSkyboxTab0(skyboxpanel); |
---|
| 1103 | + AddSkyboxTab1(skyboxpanel); |
---|
| 1104 | + AddSkyboxTab2(skyboxpanel); |
---|
| 1105 | + AddSkyboxTab3(skyboxpanel); |
---|
797 | 1106 | |
---|
798 | 1107 | // EDIT panel |
---|
799 | 1108 | editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
853 | 1162 | versionSlider = (cNumberSlider)sliderPane.getComponent(1); |
---|
854 | 1163 | sliderPane.preferredHeight = 1; |
---|
855 | 1164 | |
---|
856 | | -// mainPanel.setDividerLocation(0.5); //1.0); |
---|
857 | | -// mainPanel.setResizeWeight(0.5); |
---|
| 1165 | +// mainPanel.setDividerLocation(0.1); //1.0); |
---|
| 1166 | + mainPanel.setResizeWeight(0.4); |
---|
858 | 1167 | |
---|
859 | 1168 | //jList.addListSelectionListener(this); |
---|
860 | 1169 | oe.jTree.addTreeSelectionListener(this); |
---|
.. | .. |
---|
862 | 1171 | //jTree.setEditable(true); |
---|
863 | 1172 | oe.jTree.setDragEnabled(true); |
---|
864 | 1173 | //jTree.setPreferredSize(new Dimension(10,10)); |
---|
865 | | - jSP.setPreferredSize(new Dimension(100,200)); |
---|
| 1174 | + //jSP.setPreferredSize(new Dimension(100,200)); |
---|
866 | 1175 | |
---|
867 | 1176 | oe.jTree.setCellRenderer(new cTreeModel.Renderer()); |
---|
868 | 1177 | |
---|
.. | .. |
---|
925 | 1234 | smoothCB.setToolTipText("Snapping delay"); |
---|
926 | 1235 | smoothCB.addItemListener(this); |
---|
927 | 1236 | |
---|
928 | | - panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
929 | | - slowCB.setToolTipText("Smooth interpolation"); |
---|
930 | | - slowCB.addItemListener(this); |
---|
| 1237 | +// panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
| 1238 | +// slowCB.setToolTipText("Smooth interpolation"); |
---|
| 1239 | +// slowCB.addItemListener(this); |
---|
| 1240 | + panel.add(minshaderCB = new cCheckBox("Min shader", Globals.MINSHADER)); //, constraints); |
---|
| 1241 | + minshaderCB.setToolTipText("Minimal fast shader"); |
---|
| 1242 | + minshaderCB.addItemListener(this); |
---|
931 | 1243 | |
---|
932 | 1244 | // constraints.gridy += 1; |
---|
933 | 1245 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
.. | .. |
---|
1041 | 1353 | cCheckBox localCB; |
---|
1042 | 1354 | cCheckBox crowdCB; |
---|
1043 | 1355 | cCheckBox smoothCB; |
---|
| 1356 | + cCheckBox minshaderCB; |
---|
| 1357 | + |
---|
1044 | 1358 | cToggleButton fastCB; |
---|
1045 | 1359 | cCheckBox slowCB; |
---|
1046 | 1360 | cCheckBox boxCB; |
---|
.. | .. |
---|
1111 | 1425 | { |
---|
1112 | 1426 | cameraView.ToggleInertia(); |
---|
1113 | 1427 | cameraView.repaint(); |
---|
| 1428 | + } |
---|
| 1429 | + else if(e.getSource() == minshaderCB) |
---|
| 1430 | + { |
---|
| 1431 | + Globals.MINSHADER ^= true; |
---|
| 1432 | + cameraView.programInitialized = false; |
---|
| 1433 | + cameraView.repaint(); |
---|
1114 | 1434 | } |
---|
1115 | 1435 | else if(e.getSource() == localCB) |
---|
1116 | 1436 | { |
---|
.. | .. |
---|
2134 | 2454 | { |
---|
2135 | 2455 | makeSomething(new Light()); |
---|
2136 | 2456 | } else |
---|
| 2457 | +// if (source == skybox1Button || |
---|
| 2458 | +// source == skybox2Button || |
---|
| 2459 | +// source == skybox3Button || |
---|
| 2460 | +// source == skybox4Button || |
---|
| 2461 | +// source == skybox5Button || |
---|
| 2462 | +// source == skybox6Button || |
---|
| 2463 | +// source == skybox7Button || |
---|
| 2464 | +// source == skybox11Button || |
---|
| 2465 | +// source == skybox12Button || |
---|
| 2466 | +// source == skybox13Button || |
---|
| 2467 | +// source == skybox14Button || |
---|
| 2468 | +// source == skybox15Button || |
---|
| 2469 | +// source == skybox16Button || |
---|
| 2470 | +// source == skybox17Button) |
---|
| 2471 | +// { |
---|
| 2472 | +// ChangeSkybox(source); |
---|
| 2473 | +// } else |
---|
2137 | 2474 | if (source == csgItem) |
---|
2138 | 2475 | { |
---|
2139 | 2476 | group(new CSG()); |
---|
.. | .. |
---|
2219 | 2556 | if (source == computeAOItem) |
---|
2220 | 2557 | { |
---|
2221 | 2558 | Globals.drawMode = CameraPane.OCCLUSION; |
---|
2222 | | - Globals.theRenderer.repaint(); |
---|
| 2559 | + cameraView.repaint(); |
---|
2223 | 2560 | } else |
---|
2224 | 2561 | if (source == recompileItem) |
---|
2225 | 2562 | { |
---|
.. | .. |
---|
3153 | 3490 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
3154 | 3491 | { |
---|
3155 | 3492 | obj = (Object3D)e.nextElement(); |
---|
3156 | | - obj.SetBumpTexture(null); |
---|
| 3493 | + obj.ResetBumpTexture(); |
---|
3157 | 3494 | } |
---|
3158 | 3495 | |
---|
3159 | 3496 | refreshContents(); |
---|
.. | .. |
---|
3167 | 3504 | obj.SetBumpTexture(obj.GetPigmentTexture()); |
---|
3168 | 3505 | } |
---|
3169 | 3506 | |
---|
| 3507 | + refreshContents(); |
---|
| 3508 | + } else |
---|
| 3509 | + if (source == embedTexturesItem) |
---|
| 3510 | + { |
---|
| 3511 | + Object3D obj; |
---|
| 3512 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3513 | + { |
---|
| 3514 | + obj = (Object3D)e.nextElement(); |
---|
| 3515 | + obj.EmbedTextures(true); |
---|
| 3516 | + } |
---|
| 3517 | + |
---|
| 3518 | + refreshContents(); |
---|
| 3519 | + } else |
---|
| 3520 | + if (source == deEmbedTexturesItem) |
---|
| 3521 | + { |
---|
| 3522 | + Object3D obj; |
---|
| 3523 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3524 | + { |
---|
| 3525 | + obj = (Object3D)e.nextElement(); |
---|
| 3526 | + obj.EmbedTextures(false); |
---|
| 3527 | + } |
---|
| 3528 | + |
---|
| 3529 | + CameraPane.texturepigment.clear(); |
---|
| 3530 | + CameraPane.texturebump.clear(); |
---|
| 3531 | + |
---|
3170 | 3532 | refreshContents(); |
---|
3171 | 3533 | } else |
---|
3172 | 3534 | if (source == flashSelectionButton) |
---|
.. | .. |
---|
3270 | 3632 | // centralPanel.setVisible(true); |
---|
3271 | 3633 | // XYZPanel.setVisible(true); |
---|
3272 | 3634 | bigThree.ClearUI(); |
---|
| 3635 | + bigThree.add(scenePanel); |
---|
3273 | 3636 | bigThree.add(centralPanel); |
---|
3274 | | - bigThree.add(XYZPanel); |
---|
3275 | 3637 | bigThree.FlushUI(); |
---|
3276 | 3638 | |
---|
3277 | 3639 | cameraView.requestFocusInWindow(); |
---|
.. | .. |
---|
3351 | 3713 | // centralPanel.setVisible(true); |
---|
3352 | 3714 | // XYZPanel.setVisible(false); |
---|
3353 | 3715 | bigThree.ClearUI(); |
---|
3354 | | - bigThree.add(scenePanel); |
---|
3355 | 3716 | bigThree.add(centralPanel); |
---|
| 3717 | + bigThree.add(scenePanel); |
---|
3356 | 3718 | bigThree.FlushUI(); |
---|
3357 | 3719 | |
---|
3358 | 3720 | cameraView.requestFocusInWindow(); |
---|
.. | .. |
---|
4163 | 4525 | |
---|
4164 | 4526 | try |
---|
4165 | 4527 | { |
---|
4166 | | - texturedata = Globals.theRenderer.GetTextureData(tex.pigmenttexture, pigment, false, node.texres); |
---|
| 4528 | + texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres); |
---|
4167 | 4529 | } |
---|
4168 | 4530 | catch (Exception e) |
---|
4169 | 4531 | { |
---|
.. | .. |
---|
5646 | 6008 | cButton loopButton; |
---|
5647 | 6009 | cButton textureButton; |
---|
5648 | 6010 | |
---|
| 6011 | + cButton skybox1Button; |
---|
| 6012 | + cButton skybox2Button; |
---|
| 6013 | + cButton skybox3Button; |
---|
| 6014 | + cButton skybox4Button; |
---|
| 6015 | + cButton skybox5Button; |
---|
| 6016 | + cButton skybox6Button; |
---|
| 6017 | + cButton skybox7Button; |
---|
| 6018 | + |
---|
| 6019 | + cButton skybox11Button; |
---|
| 6020 | + cButton skybox12Button; |
---|
| 6021 | + cButton skybox13Button; |
---|
| 6022 | + cButton skybox14Button; |
---|
| 6023 | + cButton skybox15Button; |
---|
| 6024 | + cButton skybox16Button; |
---|
| 6025 | + cButton skybox17Button; |
---|
| 6026 | + |
---|
5649 | 6027 | cButton gridButton; |
---|
5650 | 6028 | cButton boxButton; |
---|
5651 | 6029 | cButton sphereButton; |
---|
.. | .. |
---|
5793 | 6171 | private MenuItem attachBumpItem; |
---|
5794 | 6172 | private MenuItem detachBumpItem; |
---|
5795 | 6173 | private MenuItem pigmentBumpItem; |
---|
| 6174 | + private MenuItem embedTexturesItem; |
---|
| 6175 | + private MenuItem deEmbedTexturesItem; |
---|
5796 | 6176 | |
---|
5797 | 6177 | private MenuItem particleItem; |
---|
5798 | 6178 | private MenuItem ragdollItem; |
---|