.. | .. |
---|
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 | |
---|
| 372 | + if (copy.versionlist == null) |
---|
| 373 | + { |
---|
| 374 | + copy.versionlist = new Object3D[100]; |
---|
| 375 | + copy.versionindex = -1; |
---|
| 376 | + } |
---|
| 377 | + |
---|
63 | 378 | if(ui) |
---|
64 | 379 | SetupUI(objEditor); |
---|
65 | 380 | } |
---|
.. | .. |
---|
74 | 389 | this.copy = this.group = copy; |
---|
75 | 390 | //selectees = this.group.selectees; |
---|
76 | 391 | |
---|
77 | | - SetupMenu2(objEditor); |
---|
| 392 | + SetupMenu2(this); //objEditor); |
---|
78 | 393 | SetupUI2(objEditor); |
---|
79 | 394 | objEditor.SetupUI(true); |
---|
80 | 395 | SetupViews(objEditor); |
---|
81 | 396 | |
---|
82 | 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 | + } |
---|
83 | 406 | } |
---|
84 | 407 | |
---|
85 | 408 | void CloneSelection(boolean supports) |
---|
86 | 409 | { |
---|
| 410 | + if (Globals.REPLACEONMAKE) |
---|
| 411 | + Save(); |
---|
| 412 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 413 | + Globals.REPLACEONMAKE = false; |
---|
87 | 414 | // Object3D keep = GrafreeD.clipboard; |
---|
88 | 415 | //Object3D obj; |
---|
89 | 416 | for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
94 | 421 | |
---|
95 | 422 | makeSomething(clone, i==group.selection.size()-1); |
---|
96 | 423 | } |
---|
| 424 | + Globals.REPLACEONMAKE = keep; |
---|
97 | 425 | } |
---|
98 | 426 | |
---|
99 | 427 | void CloneClipboard(boolean supports) |
---|
100 | 428 | { |
---|
101 | | - assert(GrafreeD.clipboard.parent == null); |
---|
102 | | - Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
103 | | - GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
104 | | - if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
105 | | - makeSomething(CloneObject(GrafreeD.clipboard.get(0), false)); |
---|
| 429 | + assert(Grafreed.clipboard.parent == null); |
---|
| 430 | + Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent; |
---|
| 431 | + Grafreed.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 432 | + if (LA.isIdentity(Grafreed.clipboard.toParent)) |
---|
| 433 | + makeSomething(CloneObject(Grafreed.clipboard.get(0), false)); |
---|
106 | 434 | else |
---|
107 | | - makeSomething(CloneObject(GrafreeD.clipboard, false)); |
---|
108 | | - GrafreeD.clipboard.get(0).parent = keepparent; |
---|
| 435 | + makeSomething(CloneObject(Grafreed.clipboard, false)); |
---|
| 436 | + Grafreed.clipboard.get(0).parent = keepparent; |
---|
109 | 437 | } |
---|
110 | 438 | |
---|
111 | 439 | static Object3D CloneObject(Object3D obj, boolean supports) |
---|
.. | .. |
---|
119 | 447 | // obj.support = null; |
---|
120 | 448 | if (!supports) |
---|
121 | 449 | obj.SaveSupports(); |
---|
122 | | - Object3D clone = (Object3D)GrafreeD.clone(obj); |
---|
| 450 | + Object3D clone = (Object3D)Grafreed.clone(obj); |
---|
123 | 451 | obj.parent = parent; |
---|
124 | 452 | // obj.support = support; |
---|
125 | 453 | // clone.support = support; // aout 2013 |
---|
.. | .. |
---|
148 | 476 | |
---|
149 | 477 | //JTextField nameField; |
---|
150 | 478 | |
---|
151 | | - void SetupMenu2(ObjEditor oe) |
---|
| 479 | + void SetupMenu2(GroupEditor oe) |
---|
152 | 480 | { |
---|
153 | | - oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
154 | | - //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
155 | | - //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
156 | | - editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
157 | | - oe.cameraMenu.add("-"); |
---|
158 | | - openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
159 | | - openWindowItem.addActionListener(this); |
---|
160 | | - editLeafItem.addActionListener(this); |
---|
161 | | - lookAtItem.addActionListener(this); |
---|
162 | | - //lookFromItem.addActinoListener(this); |
---|
163 | | - //switchItem.addActionListener(this); |
---|
| 481 | + oe.jTree = new cTree(); |
---|
| 482 | + |
---|
164 | 483 | Menu menu; |
---|
165 | 484 | oe.menuBar.add(menu = new Menu("Edit")); |
---|
166 | 485 | //editItem = menu.add(new MenuItem("Edit")); |
---|
167 | 486 | //editItem.addActionListener(this); |
---|
168 | | - duplicateItem = menu.add(new MenuItem("Duplicate")); |
---|
| 487 | + |
---|
| 488 | +// undoItem = menu.add(new MenuItem("Undo")); |
---|
| 489 | +// undoItem.addActionListener(this); |
---|
| 490 | +// redoItem = menu.add(new MenuItem("Redo")); |
---|
| 491 | +// redoItem.addActionListener(this); |
---|
| 492 | +// menu.add("-"); |
---|
| 493 | + duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate")); |
---|
169 | 494 | duplicateItem.addActionListener(this); |
---|
170 | | - menu.add("-"); |
---|
171 | 495 | cloneItem = menu.add(new MenuItem("Clone")); |
---|
172 | 496 | cloneItem.addActionListener(this); |
---|
| 497 | + if (Globals.ADVANCED) |
---|
| 498 | + { |
---|
173 | 499 | cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
174 | 500 | cloneSupportItem.addActionListener(this); |
---|
| 501 | + } |
---|
175 | 502 | menu.add("-"); |
---|
176 | 503 | cutItem = menu.add(new MenuItem("Cut")); |
---|
177 | 504 | cutItem.addActionListener(this); |
---|
.. | .. |
---|
179 | 506 | copyItem.addActionListener(this); |
---|
180 | 507 | pasteItem = menu.add(new MenuItem("Paste")); |
---|
181 | 508 | pasteItem.addActionListener(this); |
---|
| 509 | + |
---|
| 510 | + menu.add("-"); |
---|
| 511 | + pasteIntoItem = menu.add(new MenuItem("Paste into")); |
---|
| 512 | + pasteIntoItem.addActionListener(this); |
---|
182 | 513 | pasteLinkItem = menu.add(new MenuItem("Paste link")); |
---|
183 | 514 | pasteLinkItem.addActionListener(this); |
---|
184 | 515 | pasteCloneItem = menu.add(new MenuItem("Paste clone")); |
---|
185 | 516 | pasteCloneItem.addActionListener(this); |
---|
186 | 517 | // pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
187 | 518 | // pasteExpandItem.addActionListener(this); |
---|
188 | | - clearItem = menu.add(new MenuItem("Clear")); |
---|
189 | | - clearItem.addActionListener(this); |
---|
| 519 | + menu.add("-"); |
---|
| 520 | + deleteItem = menu.add(new MenuItem("Delete")); |
---|
| 521 | + deleteItem.addActionListener(this); |
---|
| 522 | + |
---|
| 523 | + if (Globals.ADVANCED) |
---|
| 524 | + { |
---|
| 525 | + // Deletes the cameras... |
---|
190 | 526 | clearAllItem = menu.add(new MenuItem("Clear All")); |
---|
191 | 527 | clearAllItem.addActionListener(this); |
---|
| 528 | + } |
---|
| 529 | + |
---|
| 530 | + menuBar.add(cameraMenu = new Menu("View")); |
---|
| 531 | + //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer")); |
---|
| 532 | + //zBufferItem.addActionListener(this); |
---|
| 533 | + //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
| 534 | + //normalLensItem.addActionListener(this); |
---|
| 535 | + cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint")); |
---|
| 536 | + restoreCameraItem.addActionListener(this); |
---|
| 537 | + |
---|
| 538 | +// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
| 539 | +// toggleFullScreenItem.addItemListener(this); |
---|
| 540 | +// toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
| 541 | +// cameraMenu.add("-"); |
---|
| 542 | +// |
---|
| 543 | +// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
| 544 | +// toggleTextureItem.addItemListener(this); |
---|
| 545 | +// toggleTextureItem.setState(CameraPane.textureon); |
---|
| 546 | +// |
---|
| 547 | +// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
| 548 | +// toggleSwitchItem.addItemListener(this); |
---|
| 549 | +// toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
| 550 | + |
---|
| 551 | + cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles")); |
---|
| 552 | + toggleHandleItem.addItemListener(this); |
---|
| 553 | + toggleHandleItem.setState(CameraPane.HANDLES); |
---|
| 554 | + |
---|
| 555 | + cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
| 556 | + togglePaintItem.addItemListener(this); |
---|
| 557 | + togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
| 558 | + |
---|
| 559 | + if (Globals.ADVANCED) |
---|
| 560 | + { |
---|
| 561 | + cameraMenu.add("-"); |
---|
| 562 | + cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
| 563 | + toggleLiveItem.addItemListener(this); |
---|
| 564 | + toggleLiveItem.setState(Globals.isLIVE()); |
---|
192 | 565 | |
---|
| 566 | + cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
| 567 | + stepItem.addActionListener(this); |
---|
| 568 | + // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
| 569 | + // toggleDLItem.addItemListener(this); |
---|
| 570 | + // toggleDLItem.setState(false); |
---|
| 571 | + |
---|
| 572 | + cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
| 573 | + toggleRenderItem.addItemListener(this); |
---|
| 574 | + toggleRenderItem.setState(!CameraPane.frozen); |
---|
| 575 | + |
---|
| 576 | + cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
| 577 | + toggleDebugItem.addItemListener(this); |
---|
| 578 | + toggleDebugItem.setState(Globals.DEBUG); |
---|
| 579 | + |
---|
| 580 | + cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
| 581 | + toggleFrustumItem.addItemListener(this); |
---|
| 582 | + toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
| 583 | + |
---|
| 584 | + cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
| 585 | + toggleFootContactItem.addItemListener(this); |
---|
| 586 | + toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
| 587 | + |
---|
| 588 | + cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
| 589 | + toggleTimelineItem.addItemListener(this); |
---|
| 590 | + } |
---|
| 591 | + |
---|
| 592 | +// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
| 593 | +// toggleRootItem.addItemListener(this); |
---|
| 594 | +// toggleRootItem.setState(false); |
---|
| 595 | +// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation")); |
---|
| 596 | +// animationItem.addItemListener(this); |
---|
| 597 | +// animationItem.setState(CameraPane.ANIMATION); |
---|
| 598 | + cameraMenu.add("-"); |
---|
| 599 | + cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint")); |
---|
| 600 | + editCameraItem.addActionListener(this); |
---|
| 601 | + |
---|
| 602 | + if (Globals.ADVANCED) |
---|
| 603 | + { |
---|
| 604 | + oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
| 605 | + //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
| 606 | + //cameraMenu.add(switchViewItem = new MenuItem("Reverse View")); |
---|
| 607 | + editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
| 608 | + oe.cameraMenu.add("-"); |
---|
| 609 | + openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
| 610 | + openWindowItem.addActionListener(this); |
---|
| 611 | + editLeafItem.addActionListener(this); |
---|
| 612 | + lookAtItem.addActionListener(this); |
---|
| 613 | + //lookFromItem.addActinoListener(this); |
---|
| 614 | + //switchViewItem.addActionListener(this); |
---|
| 615 | + } |
---|
| 616 | + |
---|
193 | 617 | oe.menuBar.add(menu = new Menu("Setting")); |
---|
194 | | - resetMeshItem = menu.add(new MenuItem("Reset All")); |
---|
195 | | - resetMeshItem.addActionListener(this); |
---|
196 | | - stepAllItem = menu.add(new MenuItem("Step All")); |
---|
197 | | - stepAllItem.addActionListener(this); |
---|
| 618 | + if (Globals.ADVANCED) |
---|
| 619 | + { |
---|
198 | 620 | revertMeshItem = menu.add(new MenuItem("Revert Meshes")); |
---|
199 | 621 | revertMeshItem.addActionListener(this); |
---|
200 | 622 | resetreferencesItem = menu.add(new MenuItem("Reset Mesh References")); |
---|
201 | 623 | resetreferencesItem.addActionListener(this); |
---|
202 | 624 | menu.add("-"); |
---|
| 625 | + } |
---|
203 | 626 | overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry")); |
---|
204 | 627 | overwriteGeoItem.addActionListener(this); |
---|
205 | 628 | overwriteMatItem = menu.add(new MenuItem("Overwrite Material")); |
---|
.. | .. |
---|
211 | 634 | overwriteUVItem = menu.add(new MenuItem("Overwrite UV")); |
---|
212 | 635 | overwriteUVItem.addActionListener(this); |
---|
213 | 636 | menu.add("-"); |
---|
| 637 | + if (Globals.ADVANCED) |
---|
| 638 | + { |
---|
214 | 639 | generateMeshItem = menu.add(new MenuItem("Generate Meshes")); |
---|
215 | 640 | generateMeshItem.addActionListener(this); |
---|
216 | 641 | poseMeshItem = menu.add(new MenuItem("Set Pose Meshes")); |
---|
217 | 642 | poseMeshItem.addActionListener(this); |
---|
218 | 643 | menu.add("-"); |
---|
| 644 | + } |
---|
219 | 645 | resetsupportItem = menu.add(new MenuItem("Reset support")); |
---|
220 | 646 | resetsupportItem.addActionListener(this); |
---|
221 | 647 | linkverticesItem = menu.add(new MenuItem("Link to Support")); |
---|
222 | 648 | linkverticesItem.addActionListener(this); |
---|
223 | 649 | relinkverticesItem = menu.add(new MenuItem("Re-link to Support")); |
---|
224 | 650 | relinkverticesItem.addActionListener(this); |
---|
| 651 | + |
---|
| 652 | + if (Globals.ADVANCED) |
---|
| 653 | + { |
---|
225 | 654 | setMasterItem = menu.add(new MenuItem("Set Master Mesh")); |
---|
226 | 655 | setMasterItem.addActionListener(this); |
---|
| 656 | + } |
---|
227 | 657 | |
---|
228 | 658 | oe.menuBar.add(menu = new Menu("Group")); |
---|
229 | | - grabItem = menu.add(new MenuItem("Grab")); |
---|
230 | | - grabItem.addActionListener(this); |
---|
| 659 | +// grabItem = menu.add(new MenuItem("Grab")); |
---|
| 660 | +// grabItem.addActionListener(this); |
---|
231 | 661 | backItem = menu.add(new MenuItem("Back")); |
---|
232 | 662 | backItem.addActionListener(this); |
---|
233 | 663 | frontItem = menu.add(new MenuItem("Front")); |
---|
234 | 664 | frontItem.addActionListener(this); |
---|
235 | | - compositeItem = menu.add(new MenuItem("Composite")); |
---|
236 | | - compositeItem.addActionListener(this); |
---|
237 | | - hideItem = menu.add(new MenuItem("Hide")); |
---|
| 665 | +// compositeItem = menu.add(new MenuItem("Composite")); |
---|
| 666 | +// compositeItem.addActionListener(this); |
---|
| 667 | + |
---|
| 668 | + if (Globals.ADVANCED) |
---|
| 669 | + { |
---|
| 670 | + hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
238 | 671 | hideItem.addActionListener(this); |
---|
| 672 | + } |
---|
239 | 673 | ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
240 | 674 | ungroupItem.addActionListener(this); |
---|
241 | | - menu.add("-"); |
---|
242 | | - randomItem = menu.add(new MenuItem("Random")); |
---|
243 | | - randomItem.addActionListener(this); |
---|
244 | | - physicsItem = menu.add(new MenuItem("Physics")); |
---|
245 | | - physicsItem.addActionListener(this); |
---|
246 | | - frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
247 | | - frameselectorItem.addActionListener(this); |
---|
| 675 | + |
---|
| 676 | +// menu.add("-"); |
---|
| 677 | +// |
---|
| 678 | +// switchItem = menu.add(new MenuItem("Switch node")); |
---|
| 679 | +// switchItem.addActionListener(this); |
---|
| 680 | + if (Globals.ADVANCED) |
---|
| 681 | + { |
---|
248 | 682 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
249 | 683 | switchGeoItem.addActionListener(this); |
---|
250 | 684 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
251 | 685 | switchTransfoItem.addActionListener(this); |
---|
252 | | - morphItem = menu.add(new MenuItem("Morph")); |
---|
| 686 | + morphItem = menu.add(new MenuItem("Morph Group")); |
---|
253 | 687 | morphItem.addActionListener(this); |
---|
| 688 | + |
---|
| 689 | + menu.add("-"); |
---|
| 690 | + physicsItem = menu.add(new MenuItem("Physics")); |
---|
| 691 | + physicsItem.addActionListener(this); |
---|
| 692 | + frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
| 693 | + frameselectorItem.addActionListener(this); |
---|
254 | 694 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
255 | 695 | scriptNodeItem.addActionListener(this); |
---|
256 | | - cameraItem = menu.add(new MenuItem("Camera")); |
---|
257 | | - cameraItem.addActionListener(this); |
---|
| 696 | + } |
---|
258 | 697 | |
---|
259 | 698 | oe.menuBar.add(menu = new Menu("Object")); |
---|
260 | | - textureItem = menu.add(new MenuItem("Texture")); |
---|
261 | | - textureItem.addActionListener(this); |
---|
| 699 | +// textureItem = menu.add(new MenuItem("Texture")); |
---|
| 700 | +// textureItem.addActionListener(this); |
---|
262 | 701 | billboardItem = menu.add(new MenuItem("Billboard")); |
---|
263 | 702 | billboardItem.addActionListener(this); |
---|
264 | 703 | csgItem = menu.add(new MenuItem("CSG")); |
---|
265 | 704 | csgItem.addActionListener(this); |
---|
266 | | - shadowXItem = menu.add(new MenuItem("Shadow X")); |
---|
| 705 | + shadowXItem = menu.add(new MenuItem("Shadow Red")); |
---|
267 | 706 | shadowXItem.addActionListener(this); |
---|
268 | | - shadowYItem = menu.add(new MenuItem("Shadow Y")); |
---|
| 707 | + shadowYItem = menu.add(new MenuItem("Shadow Green")); |
---|
269 | 708 | shadowYItem.addActionListener(this); |
---|
270 | | - shadowZItem = menu.add(new MenuItem("Shadow Z")); |
---|
| 709 | + shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
271 | 710 | shadowZItem.addActionListener(this); |
---|
| 711 | + attributeItem = menu.add(new MenuItem("Attribute")); |
---|
| 712 | + attributeItem.addActionListener(this); |
---|
| 713 | + |
---|
| 714 | + if (Globals.ADVANCED) |
---|
| 715 | + { |
---|
| 716 | + menu.add("-"); |
---|
272 | 717 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
273 | 718 | linkerItem.addActionListener(this); |
---|
274 | 719 | templateItem = menu.add(new MenuItem("Template")); |
---|
275 | 720 | templateItem.addActionListener(this); |
---|
276 | | - attributeItem = menu.add(new MenuItem("Attribute")); |
---|
277 | | - attributeItem.addActionListener(this); |
---|
278 | 721 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
279 | 722 | pointflowItem.addActionListener(this); |
---|
| 723 | + } |
---|
280 | 724 | menu.add("-"); |
---|
281 | 725 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
282 | 726 | resetTransformItem.addActionListener(this); |
---|
283 | 727 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
284 | 728 | resetCentroidItem.addActionListener(this); |
---|
285 | | - transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
286 | | - transformgeometryItem.addActionListener(this); |
---|
| 729 | + resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY")); |
---|
| 730 | + resetCentroidXZItem.addActionListener(this); |
---|
| 731 | + transformGeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
| 732 | + transformGeometryItem.addActionListener(this); |
---|
| 733 | + transformChildrenItem = menu.add(new MenuItem("Transform Children")); |
---|
| 734 | + transformChildrenItem.addActionListener(this); |
---|
287 | 735 | |
---|
288 | 736 | oe.menuBar.add(menu = new Menu("Geometry")); |
---|
289 | 737 | genUVItem = menu.add(new MenuItem("Generate UV")); |
---|
.. | .. |
---|
294 | 742 | genNormalsCADItem.addActionListener(this); |
---|
295 | 743 | genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals")); |
---|
296 | 744 | genNormalsMESHItem.addActionListener(this); |
---|
297 | | - genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
| 745 | + if (Globals.ADVANCED) |
---|
| 746 | + { |
---|
| 747 | + genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals")); |
---|
298 | 748 | genNormalsMINEItem.addActionListener(this); |
---|
| 749 | + } |
---|
299 | 750 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
300 | 751 | stripifyItem.addActionListener(this); |
---|
301 | 752 | unstripifyItem = menu.add(new MenuItem("Unstripify")); |
---|
.. | .. |
---|
317 | 768 | reduce34MeshItem.addActionListener(this); |
---|
318 | 769 | increaseMeshItem = menu.add(new MenuItem("Increase mesh")); |
---|
319 | 770 | increaseMeshItem.addActionListener(this); |
---|
320 | | - smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
321 | | - smoothMeshItem.addActionListener(this); |
---|
322 | 771 | clipMeshItem = menu.add(new MenuItem("Clip mesh")); |
---|
323 | 772 | clipMeshItem.addActionListener(this); |
---|
| 773 | + |
---|
| 774 | + if (Globals.ADVANCED) |
---|
| 775 | + { |
---|
| 776 | + smoothMeshItem = menu.add(new MenuItem("Smooth mesh")); |
---|
| 777 | + smoothMeshItem.addActionListener(this); |
---|
| 778 | + } |
---|
324 | 779 | |
---|
325 | 780 | oe.menuBar.add(menu = new Menu("Attributes")); |
---|
326 | 781 | clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
327 | 782 | clearMaterialsItem.addActionListener(this); |
---|
| 783 | + resetAllItem = menu.add(new MenuItem("Reset All")); |
---|
| 784 | + resetAllItem.addActionListener(this); |
---|
| 785 | + stepAllItem = menu.add(new MenuItem("Step All")); |
---|
| 786 | + stepAllItem.addActionListener(this); |
---|
328 | 787 | menu.add("-"); |
---|
329 | 788 | liveleavesItem = menu.add(new MenuItem("Live Leaves")); |
---|
330 | 789 | liveleavesItem.addActionListener(this); |
---|
331 | 790 | unliveleavesItem = menu.add(new MenuItem("Unlive Leaves")); |
---|
332 | 791 | unliveleavesItem.addActionListener(this); |
---|
| 792 | + if (Globals.ADVANCED) |
---|
| 793 | + { |
---|
333 | 794 | supportleavesItem = menu.add(new MenuItem("Support Leaves")); |
---|
334 | 795 | supportleavesItem.addActionListener(this); |
---|
335 | 796 | unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves")); |
---|
336 | 797 | unsupportleavesItem.addActionListener(this); |
---|
| 798 | + } |
---|
337 | 799 | hideleavesItem = menu.add(new MenuItem("Hide Leaves")); |
---|
338 | 800 | hideleavesItem.addActionListener(this); |
---|
339 | 801 | showleavesItem = menu.add(new MenuItem("Show Leaves")); |
---|
.. | .. |
---|
342 | 804 | markleavesItem.addActionListener(this); |
---|
343 | 805 | unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves")); |
---|
344 | 806 | unmarkleavesItem.addActionListener(this); |
---|
| 807 | + rewindleavesItem = menu.add(new MenuItem("Rewind Leaves")); |
---|
| 808 | + rewindleavesItem.addActionListener(this); |
---|
| 809 | + unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves")); |
---|
| 810 | + unrewindleavesItem.addActionListener(this); |
---|
| 811 | + randomleavesItem = menu.add(new MenuItem("Random Leaves")); |
---|
| 812 | + randomleavesItem.addActionListener(this); |
---|
| 813 | + unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves")); |
---|
| 814 | + unrandomleavesItem.addActionListener(this); |
---|
345 | 815 | menu.add("-"); |
---|
346 | 816 | flipVItem = menu.add(new MenuItem("Flip V")); |
---|
347 | 817 | flipVItem.addActionListener(this); |
---|
.. | .. |
---|
367 | 837 | attachBumpItem.addActionListener(this); |
---|
368 | 838 | pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump")); |
---|
369 | 839 | pigmentBumpItem.addActionListener(this); |
---|
| 840 | + //embedTexturesItem |
---|
370 | 841 | detachPigmentItem = menu.add(new MenuItem("Detach Pigment")); |
---|
371 | 842 | detachPigmentItem.addActionListener(this); |
---|
372 | 843 | detachBumpItem = menu.add(new MenuItem("Detach Bump")); |
---|
373 | 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); |
---|
374 | 849 | menu.add("-"); |
---|
375 | 850 | sortbysizeItem = menu.add(new MenuItem("Sort by size")); |
---|
376 | 851 | sortbysizeItem.addActionListener(this); |
---|
377 | 852 | sortbynameItem = menu.add(new MenuItem("Sort by name")); |
---|
378 | 853 | sortbynameItem.addActionListener(this); |
---|
379 | 854 | menu.add("-"); |
---|
| 855 | + shareGeometriesItem = menu.add(new MenuItem("Share Geometries")); |
---|
| 856 | + shareGeometriesItem.addActionListener(this); |
---|
| 857 | + mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries")); |
---|
| 858 | + mergeGeometriesItem.addActionListener(this); |
---|
| 859 | + if (Globals.ADVANCED) |
---|
| 860 | + { |
---|
| 861 | + // Pretty much the same as duplicate and clone. |
---|
380 | 862 | extractGeometriesItem = menu.add(new MenuItem("Link Geometry")); |
---|
381 | 863 | extractGeometriesItem.addActionListener(this); |
---|
382 | 864 | cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry")); |
---|
383 | 865 | cloneGeometriesItem.addActionListener(this); |
---|
384 | | - shareGeometriesItem = menu.add(new MenuItem("Share Geometry")); |
---|
385 | | - shareGeometriesItem.addActionListener(this); |
---|
386 | | - mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry")); |
---|
387 | | - mergeGeometriesItem.addActionListener(this); |
---|
| 866 | + } |
---|
388 | 867 | |
---|
389 | 868 | oe.menuBar.add(menu = new Menu("Insert")); |
---|
390 | 869 | buildCreateMenu(menu); |
---|
391 | 870 | |
---|
392 | | - |
---|
393 | | - oe.menuBar.add(menu = new Menu("Include")); |
---|
394 | | - importGFDItem = menu.add(new MenuItem("GrafreeD Object...")); |
---|
395 | | - importGFDItem.addActionListener(this); |
---|
396 | | - importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object...")); |
---|
397 | | - importVRMLX3DItem.addActionListener(this); |
---|
398 | | - importOBJItem = menu.add(new MenuItem("OBJ Object...")); |
---|
399 | | - importOBJItem.addActionListener(this); |
---|
400 | | - import3DSItem = menu.add(new MenuItem("3DS Object...")); |
---|
401 | | - import3DSItem.addActionListener(this); |
---|
402 | | - |
---|
403 | 871 | oe.menuBar.add(menu = new Menu("Tools")); |
---|
404 | 872 | buildToolsMenu(menu); |
---|
405 | 873 | } |
---|
406 | 874 | |
---|
| 875 | + |
---|
407 | 876 | void SetupUI2(ObjEditor oe) |
---|
408 | 877 | { |
---|
| 878 | + // June 2019 |
---|
| 879 | + if (oe == null) |
---|
| 880 | + { |
---|
| 881 | + //super.SetupUI2(this); |
---|
| 882 | + //return; |
---|
| 883 | + } |
---|
| 884 | + |
---|
| 885 | + if (copy != group) |
---|
| 886 | + { |
---|
| 887 | + //super.SetupUI2(this); |
---|
| 888 | + } |
---|
| 889 | + |
---|
409 | 890 | //new Exception().printStackTrace(); |
---|
410 | 891 | |
---|
411 | 892 | oe.radioPanel = new JPanel(new GridBagLayout()); |
---|
.. | .. |
---|
434 | 915 | oe.radioPanel.add(dummyButton); |
---|
435 | 916 | oe.buttonGroup.add(dummyButton); |
---|
436 | 917 | */ |
---|
| 918 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 919 | + |
---|
| 920 | + copyOptionsPanel.preferredHeight = 2; |
---|
| 921 | + |
---|
437 | 922 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
438 | 923 | |
---|
439 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
440 | | - liveCB.setToolTipText("Enabled animation"); |
---|
441 | | - liveCB.addItemListener(this); |
---|
442 | | - |
---|
443 | | - oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
444 | | - trackCB.setToolTipText("Enable tracking"); |
---|
445 | | - trackCB.addItemListener(this); |
---|
446 | | - |
---|
447 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 924 | + //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 925 | + //minButton.setToolTipText("Minimize window"); |
---|
| 926 | + //minButton.addActionListener(this); |
---|
| 927 | + |
---|
| 928 | + if (Globals.ADVANCED) |
---|
| 929 | + { |
---|
| 930 | + oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 931 | + maxButton.setToolTipText("Maximize window"); |
---|
| 932 | + maxButton.addActionListener(this); |
---|
| 933 | + } |
---|
| 934 | + |
---|
| 935 | + oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 936 | + fullButton.setToolTipText("Full-screen window"); |
---|
| 937 | + fullButton.addActionListener(this); |
---|
| 938 | + |
---|
| 939 | + oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
448 | 940 | screenfitButton.setToolTipText("Screen fit"); |
---|
449 | 941 | screenfitButton.addActionListener(this); |
---|
450 | 942 | |
---|
| 943 | + oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 944 | + restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
| 945 | + restoreCameraButton.addActionListener(this); |
---|
| 946 | + |
---|
| 947 | + copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 948 | + saveVersionButton.setToolTipText("Duplicate current version"); |
---|
| 949 | + saveVersionButton.addActionListener(this); |
---|
| 950 | + |
---|
| 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); |
---|
| 959 | + |
---|
| 960 | + cGridBag updown = new cGridBag().setVertical(true); |
---|
| 961 | + updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 962 | + restoreButton.setToolTipText("Undo (restore current version)"); |
---|
| 963 | + restoreButton.addActionListener(this); |
---|
| 964 | + //restoreButton.setEnabled(false); |
---|
| 965 | + |
---|
| 966 | + updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 967 | + replaceButton.setToolTipText("Save (replace current version)"); |
---|
| 968 | + replaceButton.addActionListener(this); |
---|
| 969 | + //replaceButton.setEnabled(false); |
---|
| 970 | + |
---|
| 971 | + copyOptionsPanel.add(updown); |
---|
| 972 | + |
---|
| 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); |
---|
| 977 | + |
---|
| 978 | + oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 979 | + liveCB.setToolTipText("Enable animation"); |
---|
| 980 | + liveCB.addItemListener(this); |
---|
| 981 | + |
---|
| 982 | + oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 983 | + oneStepButton.setToolTipText("Animate one step forward"); |
---|
| 984 | + oneStepButton.addActionListener(this); |
---|
| 985 | + |
---|
| 986 | + oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
| 987 | + fastCB.setToolTipText("Fast mode"); |
---|
| 988 | + fastCB.addItemListener(this); |
---|
| 989 | + |
---|
| 990 | + //oe.toolboxPanel.Return(); |
---|
| 991 | + |
---|
| 992 | +// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 993 | +// trackCB.setToolTipText("Enable tracking"); |
---|
| 994 | +// trackCB.addItemListener(this); |
---|
| 995 | + |
---|
451 | 996 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
452 | 997 | // screenfitpointButton.addActionListener(this); |
---|
453 | | -// oe.aConstraints.gridx += 1; |
---|
454 | | - oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
455 | | - snapobjectButton.addActionListener(this); |
---|
456 | | - snapobjectButton.setToolTipText("Snap Object"); |
---|
457 | | - oe.aConstraints.gridx += 1; |
---|
458 | 998 | |
---|
459 | | - //aConstraints.gridx = 0; |
---|
460 | | - //aConstraints.gridy += 1; |
---|
461 | | - oe.aConstraints.weighty = 0; |
---|
462 | | - oe.aConstraints.gridwidth = 1; |
---|
463 | | - |
---|
464 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
465 | | - flashSelectionButton.setToolTipText("Show selection"); |
---|
466 | | - flashSelectionButton.addActionListener(this); |
---|
467 | | - |
---|
468 | | - oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
469 | | - |
---|
470 | | - oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
471 | | - twoButton.setToolTipText("Show center view only"); |
---|
472 | | - twoButton.addActionListener(this); |
---|
473 | | - oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 999 | + if (Globals.ADVANCED) |
---|
| 1000 | + { |
---|
| 1001 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1002 | + snapobjectButton.addActionListener(this); |
---|
| 1003 | + snapobjectButton.setToolTipText("Snap Object"); |
---|
| 1004 | + |
---|
| 1005 | + oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
474 | 1006 | fourButton.addActionListener(this); |
---|
475 | | - fourButton.setToolTipText("Show left panel only"); |
---|
476 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
477 | | - sixButton.setToolTipText("2-column layout left"); |
---|
478 | | - sixButton.addActionListener(this); |
---|
479 | | - oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
480 | | - threeButton.setToolTipText("2-column layout right"); |
---|
| 1007 | + fourButton.setToolTipText("Show control panel only"); |
---|
| 1008 | + } |
---|
| 1009 | + |
---|
| 1010 | + //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
| 1011 | + |
---|
| 1012 | + oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1013 | + twoButton.setToolTipText("Show 3D view only"); |
---|
| 1014 | + twoButton.addActionListener(this); |
---|
| 1015 | + this.fullscreenLayout = twoButton; |
---|
| 1016 | + |
---|
| 1017 | + oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1018 | + threeButton.setToolTipText("Show controls and 3D view"); |
---|
481 | 1019 | threeButton.addActionListener(this); |
---|
482 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
483 | | - sevenButton.setToolTipText("3-column layout"); |
---|
484 | | - sevenButton.addActionListener(this); |
---|
| 1020 | + oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1021 | + sixButton.setToolTipText("Show 3D view and controls"); |
---|
| 1022 | + sixButton.addActionListener(this); |
---|
| 1023 | +// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1024 | +// sevenButton.setToolTipText("3-column layout"); |
---|
| 1025 | +// sevenButton.addActionListener(this); |
---|
485 | 1026 | // |
---|
486 | 1027 | |
---|
487 | | - oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
488 | | - rootButton.setToolTipText("Edit selection in new tab"); |
---|
| 1028 | + oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1029 | + rootButton.setToolTipText("Open selection in new tab"); |
---|
489 | 1030 | rootButton.addActionListener(this); |
---|
490 | 1031 | |
---|
491 | | - oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1032 | + oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
492 | 1033 | closeButton.setToolTipText("Close tab"); |
---|
493 | 1034 | closeButton.addActionListener(this); |
---|
494 | 1035 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
495 | 1036 | //clearButton.addActionListener(this); |
---|
496 | | - |
---|
497 | | - cGridBag commandsPanel = new cGridBag(); |
---|
| 1037 | + |
---|
| 1038 | + cGridBag row1 = new cGridBag(); |
---|
498 | 1039 | |
---|
499 | | - commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
500 | | - editButton.setToolTipText("Edit selection"); |
---|
| 1040 | + // INSERT |
---|
| 1041 | + row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1042 | + gridButton.setToolTipText("Create grid"); |
---|
| 1043 | + gridButton.addActionListener(this); |
---|
| 1044 | + |
---|
| 1045 | + row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1046 | + boxButton.setToolTipText("Create box"); |
---|
| 1047 | + boxButton.addActionListener(this); |
---|
| 1048 | + |
---|
| 1049 | + row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1050 | + sphereButton.setToolTipText("Create sphere"); |
---|
| 1051 | + sphereButton.addActionListener(this); |
---|
| 1052 | + |
---|
| 1053 | + row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1054 | + coneButton.setToolTipText("Create cone"); |
---|
| 1055 | + coneButton.addActionListener(this); |
---|
| 1056 | + |
---|
| 1057 | + row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1058 | + torusButton.setToolTipText("Create torus"); |
---|
| 1059 | + torusButton.addActionListener(this); |
---|
| 1060 | + |
---|
| 1061 | + row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1062 | + superButton.setToolTipText("Create superellipsoid"); |
---|
| 1063 | + superButton.addActionListener(this); |
---|
| 1064 | + |
---|
| 1065 | + if (Globals.ADVANCED) |
---|
| 1066 | + { |
---|
| 1067 | + oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1068 | + kleinButton.setToolTipText("Create Klein bottle"); |
---|
| 1069 | + kleinButton.addActionListener(this); |
---|
| 1070 | + } |
---|
| 1071 | + |
---|
| 1072 | + row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1073 | + particlesButton.setToolTipText("Create particle system"); |
---|
| 1074 | + particlesButton.addActionListener(this); |
---|
| 1075 | + |
---|
| 1076 | + oe.toolboxPanel.add(row1); |
---|
| 1077 | + |
---|
| 1078 | + cGridBag row2 = new cGridBag(); |
---|
| 1079 | + |
---|
| 1080 | + row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1081 | + groupButton.setToolTipText("Create group"); |
---|
| 1082 | + groupButton.addActionListener(this); |
---|
| 1083 | + |
---|
| 1084 | + row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1085 | + compositeButton.setToolTipText("Create composite"); |
---|
| 1086 | + compositeButton.addActionListener(this); |
---|
| 1087 | + |
---|
| 1088 | + row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1089 | + switchButton.setToolTipText("Create item switcher"); |
---|
| 1090 | + switchButton.addActionListener(this); |
---|
| 1091 | + |
---|
| 1092 | + row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1093 | + loopButton.setToolTipText("Create loop"); |
---|
| 1094 | + loopButton.addActionListener(this); |
---|
| 1095 | + |
---|
| 1096 | + row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1097 | + textureButton.setToolTipText("Create texture"); |
---|
| 1098 | + textureButton.addActionListener(this); |
---|
| 1099 | + |
---|
| 1100 | + row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1101 | + overlayButton.setToolTipText("Create overlay"); |
---|
| 1102 | + overlayButton.addActionListener(this); |
---|
| 1103 | + |
---|
| 1104 | + row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1105 | + lightButton.setToolTipText("Create light"); |
---|
| 1106 | + lightButton.addActionListener(this); |
---|
| 1107 | + |
---|
| 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); |
---|
| 1123 | + |
---|
| 1124 | + // EDIT panel |
---|
| 1125 | + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1126 | + editButton.setToolTipText("Pin selection controls"); |
---|
501 | 1127 | editButton.addActionListener(this); |
---|
502 | 1128 | |
---|
503 | | - commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
504 | | - uneditButton.setToolTipText("Unedit selection"); |
---|
| 1129 | + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1130 | + uneditButton.setToolTipText("Unpin and remove selection controls"); |
---|
505 | 1131 | uneditButton.addActionListener(this); |
---|
506 | 1132 | |
---|
507 | | - commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1133 | + editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 1134 | + allParamsButton.setToolTipText("Show all controle"); |
---|
| 1135 | + allParamsButton.addActionListener(this); |
---|
| 1136 | + |
---|
| 1137 | + editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
508 | 1138 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
509 | 1139 | clearPanelButton.addActionListener(this); |
---|
510 | 1140 | |
---|
511 | | - commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
512 | | - allParamsButton.setToolTipText("All params??"); |
---|
513 | | - allParamsButton.addActionListener(this); |
---|
| 1141 | + //editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1142 | + //unselectButton.setToolTipText("Unselect"); |
---|
| 1143 | + //unselectButton.addActionListener(this); |
---|
514 | 1144 | |
---|
515 | | - commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
516 | | - unselectButton.setToolTipText("Unselect"); |
---|
517 | | - unselectButton.addActionListener(this); |
---|
518 | | - |
---|
519 | | - commandsPanel.preferredHeight = 1; |
---|
| 1145 | + editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1146 | + flashSelectionButton.setToolTipText("Highlight selection"); |
---|
| 1147 | + flashSelectionButton.addActionListener(this); |
---|
520 | 1148 | |
---|
521 | | - oe.treePanel.add(commandsPanel); |
---|
522 | | - oe.treePanel.Return(); |
---|
| 1149 | + editCommandsPanel.preferredHeight = 1; |
---|
| 1150 | + |
---|
| 1151 | + SetPinStates(false); |
---|
| 1152 | +// oe.treePanel.add(commandsPanel); |
---|
| 1153 | +// oe.treePanel.Return(); |
---|
523 | 1154 | |
---|
524 | 1155 | // oe.aConstraints.gridx += 1; |
---|
525 | 1156 | // oe.aConstraints.weighty = 0; |
---|
.. | .. |
---|
536 | 1167 | |
---|
537 | 1168 | JScrollPane jSP; |
---|
538 | 1169 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
539 | | - jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
| 1170 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints); |
---|
540 | 1171 | ResetModel(); |
---|
541 | 1172 | |
---|
542 | 1173 | oe.treePanel.add(jSPPanel); |
---|
543 | 1174 | oe.treePanel.Return(); |
---|
544 | 1175 | |
---|
545 | | - cGridBag copyOptionsPanel = new cGridBag(); |
---|
546 | | - |
---|
547 | | - copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
548 | | - colorCB.setToolTipText("Copy color when dropped"); |
---|
549 | | - colorCB.addItemListener(this); |
---|
550 | | - |
---|
551 | | - copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
552 | | - materialCB.setToolTipText("Copy material when dropped"); |
---|
553 | | - materialCB.addItemListener(this); |
---|
554 | | - |
---|
555 | | - copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
556 | | - textureCB.setToolTipText("Copy texture when dropped"); |
---|
557 | | - textureCB.addItemListener(this); |
---|
558 | | - |
---|
559 | | - copyOptionsPanel.preferredHeight = 1; |
---|
560 | 1176 | oe.treePanel.add(copyOptionsPanel); |
---|
561 | 1177 | oe.treePanel.Return(); |
---|
| 1178 | + cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); |
---|
| 1179 | + versionSlider = (cNumberSlider)sliderPane.getComponent(1); |
---|
| 1180 | + sliderPane.preferredHeight = 1; |
---|
562 | 1181 | |
---|
563 | | -// mainPanel.setDividerLocation(0.5); //1.0); |
---|
564 | | -// mainPanel.setResizeWeight(0.5); |
---|
| 1182 | +// mainPanel.setDividerLocation(0.1); //1.0); |
---|
| 1183 | + mainPanel.setResizeWeight(0.4); |
---|
565 | 1184 | |
---|
566 | 1185 | //jList.addListSelectionListener(this); |
---|
567 | 1186 | oe.jTree.addTreeSelectionListener(this); |
---|
.. | .. |
---|
569 | 1188 | //jTree.setEditable(true); |
---|
570 | 1189 | oe.jTree.setDragEnabled(true); |
---|
571 | 1190 | //jTree.setPreferredSize(new Dimension(10,10)); |
---|
572 | | - jSP.setPreferredSize(new Dimension(100,200)); |
---|
| 1191 | + //jSP.setPreferredSize(new Dimension(100,200)); |
---|
573 | 1192 | |
---|
574 | 1193 | oe.jTree.setCellRenderer(new cTreeModel.Renderer()); |
---|
575 | 1194 | |
---|
.. | .. |
---|
581 | 1200 | dgr.addDragGestureListener(this); |
---|
582 | 1201 | }catch(Exception e) {} |
---|
583 | 1202 | */ |
---|
584 | | - radio.layout = sevenButton; |
---|
| 1203 | + radio.layout = threeButton; // sixButton; |
---|
585 | 1204 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
586 | 1205 | } |
---|
587 | 1206 | |
---|
588 | 1207 | void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
589 | 1208 | { |
---|
590 | | - //constraints.gridx = 0; |
---|
591 | | - //constraints.gridy = 0; |
---|
592 | | - panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
593 | | - fastCB.setToolTipText("Fast mode"); |
---|
594 | | - fastCB.addItemListener(this); |
---|
595 | | - //constraints.gridy += 1; |
---|
596 | | - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
597 | | - supportCB.setToolTipText("Enabled rigging"); |
---|
598 | | - supportCB.addItemListener(this); |
---|
| 1209 | + panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 1210 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
| 1211 | + colorCB.addItemListener(this); |
---|
599 | 1212 | |
---|
600 | | - // constraints.gridy += 1; |
---|
| 1213 | + panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 1214 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
| 1215 | + materialCB.addItemListener(this); |
---|
| 1216 | + |
---|
| 1217 | + panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 1218 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
| 1219 | + textureCB.addItemListener(this); |
---|
| 1220 | + |
---|
| 1221 | + panel.Return(); |
---|
| 1222 | + |
---|
| 1223 | + panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
| 1224 | + boxCB.setToolTipText("Display bounding boxes"); |
---|
| 1225 | + boxCB.addItemListener(this); |
---|
| 1226 | + |
---|
| 1227 | + panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
| 1228 | + zoomBoxCB.setToolTipText("Display only for wheel"); |
---|
| 1229 | + zoomBoxCB.addItemListener(this); |
---|
| 1230 | + |
---|
| 1231 | + if (true) // Globals.ADVANCED) |
---|
| 1232 | + { |
---|
| 1233 | +// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 1234 | +// supportCB.setToolTipText("Enable rigging"); |
---|
| 1235 | +// supportCB.addItemListener(this); |
---|
| 1236 | + |
---|
| 1237 | + panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints); |
---|
| 1238 | + freezeCB.setToolTipText("Fast moving camera"); |
---|
| 1239 | + freezeCB.addItemListener(this); |
---|
| 1240 | + |
---|
601 | 1241 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
602 | 1242 | // localCB.addItemListener(this); |
---|
603 | 1243 | |
---|
604 | | - //constraints.gridy += 1; |
---|
| 1244 | + panel.Return(); |
---|
| 1245 | + |
---|
605 | 1246 | panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
606 | 1247 | crowdCB.setToolTipText("Used for crowds"); |
---|
607 | 1248 | crowdCB.addItemListener(this); |
---|
608 | 1249 | |
---|
609 | | - //constraints.gridy += 1; |
---|
610 | 1250 | panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
611 | 1251 | smoothCB.setToolTipText("Snapping delay"); |
---|
612 | 1252 | smoothCB.addItemListener(this); |
---|
613 | 1253 | |
---|
614 | | - //constraints.gridy += 1; |
---|
615 | | - panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
616 | | - slowCB.setToolTipText("Smooth interpolation"); |
---|
617 | | - slowCB.addItemListener(this); |
---|
618 | | - //constraints.gridy += 1; |
---|
619 | | - panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
620 | | - boxCB.setToolTipText("Display bounding boxes"); |
---|
621 | | - boxCB.addItemListener(this); |
---|
622 | | - //constraints.gridy += 1; |
---|
623 | | - panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
624 | | - zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
625 | | - zoomBoxCB.addItemListener(this); |
---|
626 | | - |
---|
| 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); |
---|
| 1260 | + |
---|
627 | 1261 | // constraints.gridy += 1; |
---|
628 | 1262 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
629 | 1263 | // speakerMocapCB.addItemListener(this); |
---|
630 | 1264 | |
---|
| 1265 | + panel.Return(); |
---|
| 1266 | + |
---|
631 | 1267 | if (false) |
---|
632 | 1268 | { |
---|
633 | 1269 | // handled in scripts |
---|
.. | .. |
---|
642 | 1278 | //constraints.gridy += 1; |
---|
643 | 1279 | panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
644 | 1280 | smoothfocusCB.addItemListener(this); |
---|
| 1281 | + panel.Return(); |
---|
645 | 1282 | } |
---|
646 | 1283 | |
---|
647 | 1284 | //constraints.gridx += 1; |
---|
648 | 1285 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
649 | 1286 | // debugCB.addItemListener(this); |
---|
650 | 1287 | |
---|
651 | | - //constraints.gridy += 1; |
---|
| 1288 | + panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 1289 | + trackCB.setToolTipText("Enable tracking target"); |
---|
| 1290 | + trackCB.addItemListener(this); |
---|
| 1291 | + |
---|
652 | 1292 | panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
| 1293 | + oeilCB.setToolTipText("Move camera when tracking"); |
---|
653 | 1294 | oeilCB.addItemListener(this); |
---|
654 | 1295 | |
---|
655 | | - //constraints.gridy += 1; |
---|
| 1296 | + panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
| 1297 | + shadowCB.setToolTipText("When live compute shadows"); |
---|
| 1298 | + shadowCB.addItemListener(this); |
---|
| 1299 | + |
---|
| 1300 | + panel.Return(); |
---|
| 1301 | + panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints); |
---|
| 1302 | + toggleTextureCB.setToolTipText("Load textures"); |
---|
| 1303 | + toggleTextureCB.addItemListener(this); |
---|
| 1304 | + |
---|
| 1305 | + panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints); |
---|
| 1306 | + toggleSwitchCB.setToolTipText("Choose a single item"); |
---|
| 1307 | + toggleSwitchCB.addItemListener(this); |
---|
| 1308 | + |
---|
| 1309 | + panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints); |
---|
| 1310 | + autokeepCB.setToolTipText("On structure change"); |
---|
| 1311 | + autokeepCB.addItemListener(this); |
---|
| 1312 | + |
---|
| 1313 | + panel.Return(); |
---|
| 1314 | + if (Globals.ADVANCED) |
---|
| 1315 | + { |
---|
656 | 1316 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
657 | 1317 | lookAtCB.setToolTipText("Look-at target"); |
---|
658 | 1318 | lookAtCB.addItemListener(this); |
---|
| 1319 | + } |
---|
| 1320 | + |
---|
| 1321 | + } |
---|
659 | 1322 | |
---|
660 | 1323 | cGridBag fill = new cGridBag(); |
---|
661 | | - |
---|
662 | 1324 | fill.preferredHeight = 200; |
---|
| 1325 | + cGridBag fill2 = new cGridBag(); |
---|
| 1326 | + fill2.preferredHeight = 200; |
---|
| 1327 | + cGridBag fill3 = new cGridBag(); |
---|
| 1328 | + fill3.preferredHeight = 200; |
---|
663 | 1329 | |
---|
664 | 1330 | panel.add(fill); |
---|
| 1331 | + panel.add(fill2); |
---|
| 1332 | + panel.add(fill3); |
---|
665 | 1333 | |
---|
666 | 1334 | } |
---|
667 | 1335 | |
---|
668 | 1336 | void EditObject(Object3D obj) |
---|
669 | 1337 | { |
---|
670 | 1338 | cRadio radioButton = new cRadio(obj.name); |
---|
| 1339 | + |
---|
| 1340 | + // June 2019. Patch to avoid bug with transparency. |
---|
| 1341 | + radioButton.hadMaterial = obj.material != null; |
---|
| 1342 | + if (!radioButton.hadMaterial) |
---|
| 1343 | + { |
---|
| 1344 | + obj.material = new cMaterial(); |
---|
| 1345 | + } |
---|
| 1346 | + |
---|
671 | 1347 | radioButton.SetObject(obj); |
---|
672 | | - radioButton.layout = sevenButton; |
---|
| 1348 | + radioButton.layout = threeButton; // sixButton; |
---|
673 | 1349 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
674 | 1350 | radioButton.addActionListener(this); |
---|
675 | 1351 | radioPanel.add(radioButton); |
---|
676 | 1352 | buttonGroup.add(radioButton); |
---|
677 | 1353 | radioButton.doClick(); |
---|
678 | 1354 | } |
---|
| 1355 | + |
---|
679 | 1356 | void SetupViews(ObjEditor oe) |
---|
680 | 1357 | { |
---|
| 1358 | + theFrame = this; |
---|
| 1359 | + |
---|
681 | 1360 | oe.SetupViews(); |
---|
682 | 1361 | |
---|
683 | 1362 | System.out.println("SetupViews"); |
---|
.. | .. |
---|
686 | 1365 | /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this); |
---|
687 | 1366 | } |
---|
688 | 1367 | |
---|
689 | | - JCheckBox liveCB; |
---|
690 | | - JCheckBox supportCB; |
---|
691 | | - JCheckBox localCB; |
---|
692 | | - JCheckBox crowdCB; |
---|
693 | | - JCheckBox smoothCB; |
---|
694 | | - JCheckBox fastCB; |
---|
695 | | - JCheckBox slowCB; |
---|
696 | | - JCheckBox boxCB; |
---|
697 | | - JCheckBox zoomBoxCB; |
---|
698 | | - JCheckBox trackCB; |
---|
699 | | - JCheckBox smoothfocusCB; |
---|
| 1368 | + cToggleButton liveCB; |
---|
| 1369 | + cCheckBox supportCB; |
---|
| 1370 | + cCheckBox localCB; |
---|
| 1371 | + cCheckBox crowdCB; |
---|
| 1372 | + cCheckBox smoothCB; |
---|
| 1373 | + cCheckBox minshaderCB; |
---|
| 1374 | + |
---|
| 1375 | + cToggleButton fastCB; |
---|
| 1376 | + cCheckBox slowCB; |
---|
| 1377 | + cCheckBox boxCB; |
---|
| 1378 | + cCheckBox zoomBoxCB; |
---|
| 1379 | + cCheckBox freezeCB; |
---|
| 1380 | + //cToggleButton trackCB; |
---|
| 1381 | + cCheckBox trackCB; |
---|
| 1382 | + cCheckBox smoothfocusCB; |
---|
700 | 1383 | // JCheckBox speakerMocapCB; |
---|
701 | | - JCheckBox speakerCameraCB; |
---|
702 | | - JCheckBox speakerFocusCB; |
---|
703 | | - JCheckBox debugCB; |
---|
704 | | - JCheckBox oeilCB; |
---|
705 | | - JCheckBox lookAtCB; |
---|
| 1384 | + cCheckBox speakerCameraCB; |
---|
| 1385 | + cCheckBox speakerFocusCB; |
---|
| 1386 | + cCheckBox debugCB; |
---|
| 1387 | + |
---|
| 1388 | + cCheckBox oeilCB; |
---|
| 1389 | + cCheckBox shadowCB; |
---|
| 1390 | + cCheckBox autokeepCB; |
---|
| 1391 | + cCheckBox lookAtCB; |
---|
706 | 1392 | |
---|
707 | 1393 | // static int COLOR = 1; |
---|
708 | 1394 | // static int MATERIAL = 2; |
---|
.. | .. |
---|
710 | 1396 | |
---|
711 | 1397 | int dropAttributes = Object3D.COLOR | Object3D.MATERIAL; |
---|
712 | 1398 | |
---|
713 | | - JCheckBox colorCB; |
---|
714 | | - JCheckBox materialCB; |
---|
715 | | - JCheckBox textureCB; |
---|
| 1399 | + cCheckBox colorCB; |
---|
| 1400 | + cCheckBox materialCB; |
---|
| 1401 | + cCheckBox textureCB; |
---|
716 | 1402 | |
---|
717 | 1403 | public void itemStateChanged(ItemEvent e) |
---|
718 | 1404 | { |
---|
.. | .. |
---|
740 | 1426 | } else if(e.getSource() == liveCB) |
---|
741 | 1427 | { |
---|
742 | 1428 | cameraView.ToggleLive(); |
---|
| 1429 | + refreshContents(false); |
---|
743 | 1430 | } |
---|
744 | 1431 | else if(e.getSource() == supportCB) |
---|
745 | 1432 | { |
---|
.. | .. |
---|
755 | 1442 | { |
---|
756 | 1443 | cameraView.ToggleInertia(); |
---|
757 | 1444 | cameraView.repaint(); |
---|
| 1445 | + } |
---|
| 1446 | + else if(e.getSource() == minshaderCB) |
---|
| 1447 | + { |
---|
| 1448 | + Globals.MINSHADER ^= true; |
---|
| 1449 | + cameraView.programInitialized = false; |
---|
| 1450 | + cameraView.repaint(); |
---|
758 | 1451 | } |
---|
759 | 1452 | else if(e.getSource() == localCB) |
---|
760 | 1453 | { |
---|
.. | .. |
---|
804 | 1497 | { |
---|
805 | 1498 | cameraView.ToggleOeil(); |
---|
806 | 1499 | } |
---|
| 1500 | + else if(e.getSource() == shadowCB) |
---|
| 1501 | + { |
---|
| 1502 | + Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
| 1503 | + } |
---|
| 1504 | + else if(e.getSource() == freezeCB) |
---|
| 1505 | + { |
---|
| 1506 | + Globals.FREEZEONMOVE ^= true; |
---|
| 1507 | + } |
---|
| 1508 | + else if(e.getSource() == autokeepCB) |
---|
| 1509 | + { |
---|
| 1510 | + Globals.REPLACEONMAKE ^= true; |
---|
| 1511 | + } |
---|
807 | 1512 | else if(e.getSource() == lookAtCB) |
---|
808 | 1513 | { |
---|
809 | 1514 | cameraView.ToggleLookAt(); |
---|
.. | .. |
---|
820 | 1525 | |
---|
821 | 1526 | /**/ |
---|
822 | 1527 | //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this); |
---|
823 | | - TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1528 | + //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1529 | + TreePath path = objEditor.jTree.getSelectionPath(); |
---|
824 | 1530 | if ((path == null) || (path.getPathCount() <= 1)) { |
---|
825 | 1531 | // We can't move the root node or an empty selection |
---|
826 | 1532 | return; |
---|
.. | .. |
---|
883 | 1589 | } |
---|
884 | 1590 | } |
---|
885 | 1591 | |
---|
886 | | - String string = (String) object; |
---|
887 | | - |
---|
888 | 1592 | System.out.println("Transfer = " + object + "; drop : " + target); |
---|
889 | 1593 | // if( object instanceof java.io.File[]) |
---|
890 | 1594 | // { |
---|
.. | .. |
---|
892 | 1596 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
893 | 1597 | // return; |
---|
894 | 1598 | // } |
---|
895 | | - if (string.charAt(0) == '/') |
---|
| 1599 | + |
---|
| 1600 | + String string = object.toString(); |
---|
| 1601 | + |
---|
| 1602 | + // File path for Mac and Windows |
---|
| 1603 | + if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
896 | 1604 | { |
---|
897 | 1605 | // file(s) |
---|
898 | 1606 | String[] names = string.split("\n"); |
---|
.. | .. |
---|
919 | 1627 | |
---|
920 | 1628 | flashIt = false; |
---|
921 | 1629 | CameraPane pane = (CameraPane) target; |
---|
922 | | - pane.clickStart(objEditor.location.x, objEditor.location.y, 0); |
---|
| 1630 | + pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0); |
---|
923 | 1631 | pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true); |
---|
924 | 1632 | |
---|
925 | 1633 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
935 | 1643 | |
---|
936 | 1644 | assert target == objEditor.jTree; |
---|
937 | 1645 | TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y); |
---|
| 1646 | + Object3D destinationLeaf; |
---|
938 | 1647 | try { |
---|
939 | | - Object3D dummy = (Composite) destinationPath.getLastPathComponent(); |
---|
| 1648 | + destinationLeaf = (Composite) destinationPath.getLastPathComponent(); |
---|
940 | 1649 | } catch (Exception e) { |
---|
941 | 1650 | System.out.println("destinationPath : " + destinationPath); |
---|
942 | 1651 | return; |
---|
943 | 1652 | } |
---|
944 | 1653 | |
---|
945 | | - if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1654 | + for (int i=group.selection.size(); --i>=0;) |
---|
946 | 1655 | { |
---|
| 1656 | + Object3D child = (Object3D)group.selection.elementAt(i); |
---|
| 1657 | + |
---|
| 1658 | + // Cannot move into itself |
---|
| 1659 | + if (child == destinationLeaf) |
---|
| 1660 | + return; |
---|
| 1661 | + } |
---|
| 1662 | + |
---|
| 1663 | +// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1664 | +// { |
---|
947 | 1665 | loadClipboard(true); |
---|
948 | 1666 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
949 | | - pasteInto(false); |
---|
950 | | - } else { |
---|
951 | | - loadClipboard(false); |
---|
952 | | - objEditor.jTree.setSelectionPath(destinationPath); |
---|
953 | | - pasteInto(false); // true); // ??? |
---|
954 | | - } |
---|
| 1667 | + pasteInto(false, false); |
---|
| 1668 | +// } else { |
---|
| 1669 | +// loadClipboard(false); |
---|
| 1670 | +// objEditor.jTree.setSelectionPath(destinationPath); |
---|
| 1671 | +// pasteInto(false, false); // true); // ??? |
---|
| 1672 | +// } |
---|
955 | 1673 | } |
---|
956 | 1674 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
957 | 1675 | // Called if the user has modified the current drop gesture |
---|
.. | .. |
---|
1056 | 1774 | { |
---|
1057 | 1775 | //heightFieldItem = menu.add(new MenuItem("Height Field")); |
---|
1058 | 1776 | //heightFieldItem.addActionListener(this); |
---|
1059 | | - gridItem = menu.add(new MenuItem("Grid")); |
---|
1060 | | - gridItem.addActionListener(this); |
---|
1061 | | - rectoidItem = menu.add(new MenuItem("Box")); |
---|
1062 | | - rectoidItem.addActionListener(this); |
---|
1063 | | - ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
1064 | | - ellipsoidItem.addActionListener(this); |
---|
1065 | | - coneItem = menu.add(new MenuItem("Cone")); |
---|
1066 | | - coneItem.addActionListener(this); |
---|
1067 | | - torusItem = menu.add(new MenuItem("Torus")); |
---|
1068 | | - torusItem.addActionListener(this); |
---|
1069 | | - superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1070 | | - superItem.addActionListener(this); |
---|
| 1777 | +// gridItem = menu.add(new MenuItem("Grid")); |
---|
| 1778 | +// gridItem.addActionListener(this); |
---|
| 1779 | +// rectoidItem = menu.add(new MenuItem("Box")); |
---|
| 1780 | +// rectoidItem.addActionListener(this); |
---|
| 1781 | +// ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
| 1782 | +// ellipsoidItem.addActionListener(this); |
---|
| 1783 | +// coneItem = menu.add(new MenuItem("Cone")); |
---|
| 1784 | +// coneItem.addActionListener(this); |
---|
| 1785 | +// torusItem = menu.add(new MenuItem("Torus")); |
---|
| 1786 | +// torusItem.addActionListener(this); |
---|
| 1787 | +// superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
| 1788 | +// superItem.addActionListener(this); |
---|
| 1789 | + |
---|
| 1790 | + cameraItem = menu.add(new MenuItem("Camera")); |
---|
| 1791 | + cameraItem.addActionListener(this); |
---|
| 1792 | + |
---|
| 1793 | + if (!Globals.ADVANCED) |
---|
| 1794 | + { |
---|
1071 | 1795 | kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
1072 | 1796 | kleinItem.addActionListener(this); |
---|
1073 | | - particleItem = menu.add(new MenuItem("Particle system")); |
---|
1074 | | - particleItem.addActionListener(this); |
---|
| 1797 | + } |
---|
| 1798 | + |
---|
| 1799 | +// particleItem = menu.add(new MenuItem("Particle system")); |
---|
| 1800 | +// particleItem.addActionListener(this); |
---|
| 1801 | + if (Globals.ADVANCED) |
---|
| 1802 | + { |
---|
1075 | 1803 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
1076 | 1804 | ragdollItem.addActionListener(this); |
---|
1077 | 1805 | ragdoll2Item = menu.add(new MenuItem("Rag Fall")); |
---|
1078 | 1806 | ragdoll2Item.addActionListener(this); |
---|
| 1807 | + } |
---|
1079 | 1808 | menu.add("-"); |
---|
1080 | | - meshItem = menu.add(new MenuItem("Mesh")); |
---|
| 1809 | + meshItem = menu.add(new MenuItem("Dynamic Mesh")); |
---|
1081 | 1810 | meshItem.addActionListener(this); |
---|
1082 | 1811 | // meshGroupItem = menu.add(new MenuItem("Mesh Group")); |
---|
1083 | 1812 | // meshGroupItem.addActionListener(this); |
---|
| 1813 | + if (Globals.ADVANCED) |
---|
| 1814 | + { |
---|
1084 | 1815 | springItem = menu.add(new MenuItem("Spring")); |
---|
1085 | 1816 | springItem.addActionListener(this); |
---|
1086 | 1817 | flagItem = menu.add(new MenuItem("Flag")); |
---|
1087 | 1818 | flagItem.addActionListener(this); |
---|
1088 | | - bezierItem = menu.add(new MenuItem("Patch")); |
---|
1089 | | - bezierItem.addActionListener(this); |
---|
1090 | | - checkerItem = menu.add(new MenuItem("Checker")); |
---|
1091 | | - checkerItem.addActionListener(this); |
---|
1092 | 1819 | blobItem = menu.add(new MenuItem("Blob")); |
---|
1093 | 1820 | blobItem.addActionListener(this); |
---|
1094 | 1821 | latheItem = menu.add(new MenuItem("Lathe")); |
---|
1095 | 1822 | latheItem.addActionListener(this); |
---|
1096 | | - lightItem = menu.add(new MenuItem("Light")); |
---|
1097 | | - lightItem.addActionListener(this); |
---|
| 1823 | + } |
---|
| 1824 | + bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
| 1825 | + bezierItem.addActionListener(this); |
---|
| 1826 | +// overlayItem = menu.add(new MenuItem("Overlay")); |
---|
| 1827 | +// overlayItem.addActionListener(this); |
---|
| 1828 | +// lightItem = menu.add(new MenuItem("Light")); |
---|
| 1829 | +// lightItem.addActionListener(this); |
---|
1098 | 1830 | menu.add("-"); |
---|
1099 | 1831 | //superLoopItem = menu.add(new MenuItem("Super Loop")); |
---|
1100 | 1832 | //superLoopItem.addActionListener(this); |
---|
1101 | | - loopItem = menu.add(new MenuItem("Loop")); |
---|
1102 | | - loopItem.addActionListener(this); |
---|
| 1833 | +// loopItem = menu.add(new MenuItem("Loop")); |
---|
| 1834 | +// loopItem.addActionListener(this); |
---|
1103 | 1835 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1104 | 1836 | doubleItem.addActionListener(this); |
---|
| 1837 | + if (Globals.ADVANCED) |
---|
| 1838 | + { |
---|
1105 | 1839 | tripleItem = menu.add(new MenuItem("Trident")); |
---|
1106 | 1840 | tripleItem.addActionListener(this); |
---|
| 1841 | + } |
---|
1107 | 1842 | } |
---|
1108 | 1843 | |
---|
1109 | 1844 | void buildToolsMenu(Menu menu) |
---|
1110 | 1845 | { |
---|
1111 | 1846 | menu.add(animationItem = new CheckboxMenuItem("Animation...")); |
---|
1112 | 1847 | animationItem.addItemListener(this); |
---|
1113 | | - animationItem.setState(CameraPane.ANIMATION); |
---|
| 1848 | + animationItem.setState(Globals.ANIMATION); |
---|
| 1849 | + |
---|
| 1850 | + menu.add(archiveItem = new MenuItem("Archive3D...")); |
---|
| 1851 | + archiveItem.addActionListener(this); |
---|
1114 | 1852 | |
---|
1115 | 1853 | menu.add("-"); |
---|
1116 | 1854 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1117 | 1855 | parseverticesItem.addActionListener(this); |
---|
1118 | 1856 | textureFieldItem = menu.add(new MenuItem("Texture Field")); |
---|
1119 | 1857 | textureFieldItem.addActionListener(this); |
---|
1120 | | - alignItem = menu.add(new MenuItem("Align")); |
---|
| 1858 | + alignItem = menu.add(new MenuItem("Align Objects")); |
---|
1121 | 1859 | alignItem.addActionListener(this); |
---|
1122 | | - mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1123 | | - mirrorItem.addActionListener(this); |
---|
1124 | 1860 | reduceMorphItem = menu.add(new MenuItem("Reduce Morphs")); |
---|
1125 | 1861 | reduceMorphItem.addActionListener(this); |
---|
1126 | 1862 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1127 | 1863 | reduce34MorphItem.addActionListener(this); |
---|
1128 | | - |
---|
1129 | | - menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1130 | | - computeAOItem.addActionListener(this); |
---|
1131 | 1864 | menu.add("-"); |
---|
1132 | | - |
---|
1133 | 1865 | menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1134 | 1866 | memoryItem.addActionListener(this); |
---|
| 1867 | + menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
| 1868 | + computeAOItem.addActionListener(this); |
---|
| 1869 | + |
---|
| 1870 | + if (Globals.ADVANCED) |
---|
| 1871 | + { |
---|
| 1872 | + mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
| 1873 | + mirrorItem.addActionListener(this); |
---|
| 1874 | + menu.add("-"); |
---|
1135 | 1875 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1136 | 1876 | analyzeItem.addActionListener(this); |
---|
1137 | | - menu.add(dumpItem = new MenuItem("Dump")); |
---|
| 1877 | + menu.add(dumpItem = new MenuItem("Print")); |
---|
1138 | 1878 | dumpItem.addActionListener(this); |
---|
1139 | 1879 | // menu.add(pathItem = new MenuItem("From-to path")); |
---|
1140 | 1880 | // pathItem.addActionListener(this); |
---|
.. | .. |
---|
1152 | 1892 | menu.add("-"); |
---|
1153 | 1893 | menu.add(editScriptItem = new MenuItem("Edit Script...")); |
---|
1154 | 1894 | editScriptItem.addActionListener(this); |
---|
| 1895 | + } |
---|
1155 | 1896 | } |
---|
1156 | 1897 | |
---|
1157 | 1898 | void ScreenFit() |
---|
.. | .. |
---|
1274 | 2015 | shadow.material = new cMaterial(obj.material); |
---|
1275 | 2016 | shadow.material.diffuse = 0.0001f; |
---|
1276 | 2017 | shadow.material.specular = 0.0001f; |
---|
| 2018 | + //shadow.projectedVertices[1].x = 300; |
---|
1277 | 2019 | |
---|
1278 | 2020 | makeSomething(shadow); |
---|
1279 | 2021 | } |
---|
| 2022 | + |
---|
| 2023 | + private void ClearUnpinned() |
---|
| 2024 | + { |
---|
| 2025 | + //for (Object3D obj : listUI) |
---|
| 2026 | + for (int i=listUI.size(); --i>=0;) |
---|
| 2027 | + { |
---|
| 2028 | + Object3D obj = listUI.elementAt(i); |
---|
| 2029 | + if (!obj.pinned) |
---|
| 2030 | + { |
---|
| 2031 | + obj.CloseUI(); |
---|
| 2032 | + listUI.remove(i); |
---|
| 2033 | + } |
---|
| 2034 | + } |
---|
| 2035 | + } |
---|
| 2036 | + |
---|
| 2037 | + private void EditElement(Object3D elem, boolean newWindow) |
---|
| 2038 | + { |
---|
| 2039 | + // if (!(elem instanceof Composite)) |
---|
| 2040 | + // newWindow = false; |
---|
| 2041 | + listUI.add(elem); |
---|
| 2042 | + elem.openEditWindow(this, newWindow); //, false); |
---|
| 2043 | + System.out.println("edit : " + elem); |
---|
| 2044 | + elem.editWindow.refreshContents(true); // ? new |
---|
| 2045 | + } |
---|
1280 | 2046 | |
---|
1281 | 2047 | /** |
---|
1282 | 2048 | * applyExample |
---|
.. | .. |
---|
1480 | 2246 | |
---|
1481 | 2247 | void Overwrite(int mask) |
---|
1482 | 2248 | { |
---|
1483 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 2249 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
1484 | 2250 | { |
---|
1485 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2251 | + Object3D content = Grafreed.clipboard.get(0); |
---|
1486 | 2252 | |
---|
1487 | 2253 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1488 | 2254 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1521 | 2287 | { |
---|
1522 | 2288 | ScreenFit(); |
---|
1523 | 2289 | } else |
---|
1524 | | - if (source == switchItem) |
---|
| 2290 | + if (source == switchViewItem) |
---|
1525 | 2291 | { |
---|
1526 | 2292 | cVector v1 = new cVector(); |
---|
1527 | 2293 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1530 | 2296 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1531 | 2297 | objEditor.cameraView.repaint(); |
---|
1532 | 2298 | } else |
---|
1533 | | - if (source == rectoidItem) |
---|
| 2299 | + if (source == rectoidItem || source == boxButton) |
---|
1534 | 2300 | { |
---|
1535 | 2301 | makeSomething(new Box()); |
---|
1536 | 2302 | } else |
---|
1537 | | - if (source == particleItem) |
---|
| 2303 | + if (source == particleItem || source == particlesButton) |
---|
1538 | 2304 | { |
---|
1539 | 2305 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1540 | 2306 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1613 | 2379 | |
---|
1614 | 2380 | makeSomething(obj); |
---|
1615 | 2381 | } else |
---|
1616 | | - if (source == gridItem) |
---|
| 2382 | + if (source == gridItem || source == gridButton) |
---|
1617 | 2383 | { |
---|
1618 | 2384 | makeSomething(new Grid()); |
---|
1619 | 2385 | } else |
---|
1620 | | - if (source == ellipsoidItem) |
---|
| 2386 | + if (source == ellipsoidItem || source == sphereButton) |
---|
1621 | 2387 | { |
---|
1622 | 2388 | makeSomething(new Sphere()); |
---|
1623 | 2389 | } else |
---|
1624 | | - if (source == coneItem) |
---|
| 2390 | + if (source == coneItem || source == coneButton) |
---|
1625 | 2391 | { |
---|
1626 | 2392 | makeSomething(new Cone()); |
---|
1627 | 2393 | } else |
---|
1628 | | - if (source == torusItem) |
---|
| 2394 | + if (source == torusItem || source == torusButton) |
---|
1629 | 2395 | { |
---|
1630 | 2396 | makeSomething(new Torus()); |
---|
1631 | 2397 | } else |
---|
1632 | | - if (source == superItem) |
---|
| 2398 | + if (source == superItem || source == superButton) |
---|
1633 | 2399 | { |
---|
1634 | 2400 | makeSomething(new Superellipsoid()); |
---|
1635 | 2401 | } else |
---|
1636 | | - if (source == kleinItem) |
---|
| 2402 | + if (source == kleinItem || source == kleinButton) |
---|
1637 | 2403 | { |
---|
1638 | 2404 | makeSomething(new Klein()); |
---|
1639 | 2405 | } else |
---|
.. | .. |
---|
1653 | 2419 | { |
---|
1654 | 2420 | makeSomething(new BezierSurface()); |
---|
1655 | 2421 | } else |
---|
1656 | | - if (source == checkerItem) |
---|
| 2422 | + if (source == overlayItem || source == overlayButton) |
---|
1657 | 2423 | { |
---|
1658 | 2424 | /* |
---|
1659 | 2425 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1701 | 2467 | s.setup(); |
---|
1702 | 2468 | makeSomething(s); |
---|
1703 | 2469 | } else |
---|
1704 | | - if (source == lightItem) |
---|
| 2470 | + if (source == lightItem || source == lightButton) |
---|
1705 | 2471 | { |
---|
1706 | 2472 | makeSomething(new Light()); |
---|
1707 | 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 |
---|
1708 | 2491 | if (source == csgItem) |
---|
1709 | 2492 | { |
---|
1710 | 2493 | group(new CSG()); |
---|
.. | .. |
---|
1751 | 2534 | |
---|
1752 | 2535 | group(g); |
---|
1753 | 2536 | } else |
---|
1754 | | - if (source == loopItem) |
---|
| 2537 | + if (source == loopItem || source == loopButton) |
---|
1755 | 2538 | { |
---|
1756 | 2539 | Composite csg = new GroupLeaf(); |
---|
1757 | 2540 | csg.count = 5; |
---|
1758 | 2541 | group(csg); |
---|
1759 | | - Composite child = new cGroup(); |
---|
| 2542 | + Composite child = new cGroup("Branch"); |
---|
1760 | 2543 | csg.addChild(child); |
---|
1761 | 2544 | child.addChild(csg); |
---|
1762 | 2545 | } else |
---|
1763 | 2546 | if (source == doubleItem) |
---|
1764 | 2547 | { |
---|
1765 | | - Composite csg = new GroupLeaf(); |
---|
| 2548 | + Composite csg = new GroupLeaf("Fork"); |
---|
1766 | 2549 | csg.count = 5; |
---|
1767 | 2550 | group(csg); |
---|
1768 | | - Composite child = new cGroup(); |
---|
| 2551 | + Composite child = new cGroup("Branch A"); |
---|
1769 | 2552 | csg.addChild(child); |
---|
1770 | 2553 | child.addChild(csg); |
---|
1771 | | - child = new cGroup(); |
---|
| 2554 | + child = new cGroup("Branch B"); |
---|
1772 | 2555 | csg.addChild(child); |
---|
1773 | 2556 | child.addChild(csg); |
---|
1774 | 2557 | } else |
---|
1775 | 2558 | if (source == tripleItem) |
---|
1776 | 2559 | { |
---|
1777 | | - Composite csg = new GroupLeaf(); |
---|
| 2560 | + Composite csg = new GroupLeaf("Trident"); |
---|
1778 | 2561 | csg.count = 4; |
---|
1779 | 2562 | group(csg); |
---|
1780 | 2563 | Composite child = new cGroup(); |
---|
.. | .. |
---|
1787 | 2570 | csg.addChild(child); |
---|
1788 | 2571 | child.addChild(csg); |
---|
1789 | 2572 | } else |
---|
1790 | | - |
---|
1791 | | - if (source == importGFDItem) |
---|
1792 | | - { |
---|
1793 | | - ImportGFD(); |
---|
1794 | | - } else |
---|
1795 | | - if (source == importVRMLX3DItem) |
---|
1796 | | - { |
---|
1797 | | - ImportVRMLX3D(); |
---|
1798 | | - } else |
---|
1799 | | - if (source == import3DSItem) |
---|
1800 | | - { |
---|
1801 | | - objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
1802 | | - } else |
---|
1803 | | - if (source == importOBJItem) |
---|
1804 | | - { |
---|
1805 | | - objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
1806 | | - } else |
---|
1807 | 2573 | if (source == computeAOItem) |
---|
1808 | 2574 | { |
---|
1809 | 2575 | Globals.drawMode = CameraPane.OCCLUSION; |
---|
1810 | | - Globals.theRenderer.repaint(); |
---|
| 2576 | + cameraView.repaint(); |
---|
1811 | 2577 | } else |
---|
1812 | 2578 | if (source == recompileItem) |
---|
1813 | 2579 | { |
---|
.. | .. |
---|
1822 | 2588 | if (source == invariantsItem) |
---|
1823 | 2589 | { |
---|
1824 | 2590 | System.out.println("Invariants:"); |
---|
1825 | | - GrafreeD.grafreeD.universe.invariants(); |
---|
| 2591 | + Grafreed.grafreed.universe.invariants(); |
---|
1826 | 2592 | } else |
---|
1827 | 2593 | if (source == memoryItem) |
---|
1828 | 2594 | { |
---|
.. | .. |
---|
1841 | 2607 | { |
---|
1842 | 2608 | DumpObject(); |
---|
1843 | 2609 | } else |
---|
| 2610 | + if (source == minButton) |
---|
| 2611 | + { |
---|
| 2612 | + Minimize(); |
---|
| 2613 | + } else |
---|
| 2614 | + if (source == maxButton) |
---|
| 2615 | + { |
---|
| 2616 | + Maximize(); |
---|
| 2617 | + } else |
---|
| 2618 | + if (source == fullButton) |
---|
| 2619 | + { |
---|
| 2620 | + ToggleFullScreen(); |
---|
| 2621 | + } else |
---|
| 2622 | + if (source == previousVersionButton) |
---|
| 2623 | + { |
---|
| 2624 | + // Go to previous version |
---|
| 2625 | + //if (!Undo()) |
---|
| 2626 | + //java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 2627 | + PreviousVersion(); |
---|
| 2628 | + } else |
---|
| 2629 | + if (source == restoreButton) |
---|
| 2630 | + { |
---|
| 2631 | + // Restore current version |
---|
| 2632 | + Restore(); |
---|
| 2633 | + //restoreButton.setEnabled(false); |
---|
| 2634 | + } else |
---|
| 2635 | + if (source == replaceButton) |
---|
| 2636 | + { |
---|
| 2637 | + // Overwrite current version |
---|
| 2638 | + Replace(); |
---|
| 2639 | + //replaceButton.setEnabled(false); |
---|
| 2640 | + } else |
---|
| 2641 | + if (source == nextVersionButton) |
---|
| 2642 | + { |
---|
| 2643 | + // Go to next version |
---|
| 2644 | + NextVersion(); |
---|
| 2645 | + } else |
---|
| 2646 | + if (source == saveVersionButton) |
---|
| 2647 | + { |
---|
| 2648 | + // Save a new version |
---|
| 2649 | + if (!Save(true)) |
---|
| 2650 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 2651 | + } else |
---|
| 2652 | + if (source == deleteVersionButton) |
---|
| 2653 | + { |
---|
| 2654 | + // Delete a new version |
---|
| 2655 | + DeleteVersion(); |
---|
| 2656 | + } else |
---|
| 2657 | + if (source == oneStepButton) |
---|
| 2658 | + { |
---|
| 2659 | + Globals.ONESTEP = true; |
---|
| 2660 | + cameraView.repaint(); |
---|
| 2661 | + } else |
---|
1844 | 2662 | if (source == screenfitButton) |
---|
1845 | 2663 | { |
---|
1846 | | - //Reload(lastConverter, lastFilename, true); |
---|
1847 | 2664 | ScreenFit(); |
---|
1848 | 2665 | } else |
---|
1849 | 2666 | if (source == screenfitpointButton) |
---|
1850 | 2667 | { |
---|
1851 | | - //Reload(lastConverter, lastFilename, true); |
---|
1852 | 2668 | ScreenFitPoint(); |
---|
1853 | 2669 | } else |
---|
1854 | 2670 | if (source == snapobjectButton) |
---|
1855 | 2671 | { |
---|
1856 | | - //Reload(lastConverter, lastFilename, true); |
---|
1857 | 2672 | SnapObject(); |
---|
1858 | 2673 | } else |
---|
1859 | 2674 | // if (event.getSource() == recompileButton) |
---|
.. | .. |
---|
1890 | 2705 | { |
---|
1891 | 2706 | loadClipboard(true); |
---|
1892 | 2707 | } else |
---|
| 2708 | + if (source == undoItem) |
---|
| 2709 | + { |
---|
| 2710 | + PreviousVersion(); |
---|
| 2711 | + } else |
---|
| 2712 | + if (source == redoItem) |
---|
| 2713 | + { |
---|
| 2714 | + NextVersion(); |
---|
| 2715 | + } else |
---|
1893 | 2716 | if (source == duplicateItem) |
---|
1894 | 2717 | { |
---|
1895 | | - Object3D keep = GrafreeD.clipboard; |
---|
| 2718 | + Object3D keep = Grafreed.clipboard; |
---|
1896 | 2719 | loadClipboard(false); |
---|
1897 | 2720 | paste(false); |
---|
1898 | | - GrafreeD.clipboard = keep; |
---|
| 2721 | + Grafreed.clipboard = keep; |
---|
1899 | 2722 | } else |
---|
1900 | 2723 | if (source == cloneItem) |
---|
1901 | 2724 | { |
---|
.. | .. |
---|
1913 | 2736 | { |
---|
1914 | 2737 | paste(false); |
---|
1915 | 2738 | } else |
---|
| 2739 | + if (source == pasteIntoItem) |
---|
| 2740 | + { |
---|
| 2741 | + pasteInto(true, false); |
---|
| 2742 | + } else |
---|
1916 | 2743 | if (source == pasteLinkItem) |
---|
1917 | 2744 | { |
---|
1918 | | - pasteInto(false); |
---|
| 2745 | + pasteInto(false, false); |
---|
1919 | 2746 | } else |
---|
1920 | 2747 | if (source == pasteCloneItem) |
---|
1921 | 2748 | { |
---|
1922 | | - pasteInto(true); |
---|
| 2749 | + pasteInto(true, true); |
---|
1923 | 2750 | } else |
---|
1924 | 2751 | if (source == pasteExpandItem) |
---|
1925 | 2752 | { |
---|
.. | .. |
---|
2111 | 2938 | // group.selection.get(0).setMasterThis(content); // should be identity |
---|
2112 | 2939 | // refreshContents(); |
---|
2113 | 2940 | // } |
---|
2114 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 2941 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
2115 | 2942 | { |
---|
2116 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2943 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2117 | 2944 | |
---|
2118 | 2945 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2119 | 2946 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2121 | 2948 | Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2122 | 2949 | for (int i=0; i<group.selection.size(); i++) |
---|
2123 | 2950 | { |
---|
2124 | | - boolean random = CameraPane.RANDOM; |
---|
2125 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2951 | + boolean random = CameraPane.SWITCH; |
---|
| 2952 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2126 | 2953 | group.selection.get(i).linkVerticesThis(content); |
---|
2127 | 2954 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2128 | | - CameraPane.RANDOM = random; |
---|
| 2955 | + CameraPane.SWITCH = random; |
---|
2129 | 2956 | } |
---|
2130 | 2957 | Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2131 | 2958 | refreshContents(); |
---|
.. | .. |
---|
2135 | 2962 | { |
---|
2136 | 2963 | for (int i=0; i<group.selection.size(); i++) |
---|
2137 | 2964 | { |
---|
2138 | | - boolean random = CameraPane.RANDOM; |
---|
2139 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2965 | + boolean random = CameraPane.SWITCH; |
---|
| 2966 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2140 | 2967 | group.selection.get(i).linkVerticesThis(null); |
---|
2141 | | - CameraPane.RANDOM = random; |
---|
| 2968 | + CameraPane.SWITCH = random; |
---|
2142 | 2969 | } |
---|
2143 | 2970 | |
---|
2144 | 2971 | refreshContents(); |
---|
2145 | 2972 | } else |
---|
2146 | 2973 | if (source == relinkverticesItem) |
---|
2147 | 2974 | { |
---|
2148 | | - boolean random = CameraPane.RANDOM; |
---|
2149 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2975 | + boolean random = CameraPane.SWITCH; |
---|
| 2976 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
2150 | 2977 | group.selection.RelinkToSupport(); |
---|
2151 | | - CameraPane.RANDOM = random; |
---|
| 2978 | + CameraPane.SWITCH = random; |
---|
2152 | 2979 | |
---|
2153 | 2980 | refreshContents(); |
---|
2154 | 2981 | } else |
---|
.. | .. |
---|
2163 | 2990 | } else |
---|
2164 | 2991 | if (source == setMasterItem) |
---|
2165 | 2992 | { |
---|
2166 | | - if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
| 2993 | + if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1) |
---|
2167 | 2994 | { |
---|
2168 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2995 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2169 | 2996 | |
---|
2170 | 2997 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2171 | 2998 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2178 | 3005 | { |
---|
2179 | 3006 | if (group.selection.size() == 1) |
---|
2180 | 3007 | { |
---|
2181 | | - if (GrafreeD.clipboard.size() == 1) |
---|
| 3008 | + if (Grafreed.clipboard.size() == 1) |
---|
2182 | 3009 | { |
---|
2183 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 3010 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2184 | 3011 | |
---|
2185 | 3012 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2186 | 3013 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2197 | 3024 | { |
---|
2198 | 3025 | RevertMeshes(); |
---|
2199 | 3026 | } else |
---|
2200 | | - if (source == resetMeshItem) |
---|
| 3027 | + if (source == resetAllItem) |
---|
2201 | 3028 | { |
---|
2202 | 3029 | ResetAll(); |
---|
2203 | 3030 | } else |
---|
.. | .. |
---|
2205 | 3032 | { |
---|
2206 | 3033 | StepAll(); |
---|
2207 | 3034 | } else |
---|
2208 | | - if (source == clearItem) // || event.getSource() == clearButton) |
---|
| 3035 | + if (source == deleteItem) // || event.getSource() == clearButton) |
---|
2209 | 3036 | { |
---|
2210 | 3037 | //int indices[] = jList.getSelectedIndices(); |
---|
2211 | 3038 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
2217 | 3044 | { |
---|
2218 | 3045 | ClearSelection(true); |
---|
2219 | 3046 | } else |
---|
2220 | | - if (source == grabItem) |
---|
| 3047 | + if (source == grabItem || source == groupButton) |
---|
2221 | 3048 | { |
---|
2222 | | - group(new cGroup(), true); |
---|
| 3049 | + group(new cGroup(), false); // true); |
---|
2223 | 3050 | } else |
---|
2224 | 3051 | if (source == hideItem) |
---|
2225 | 3052 | { |
---|
.. | .. |
---|
2237 | 3064 | { |
---|
2238 | 3065 | makeSomething(new Camera()); |
---|
2239 | 3066 | } else |
---|
2240 | | - if (source == compositeItem) |
---|
| 3067 | + if (source == compositeItem || source == compositeButton) |
---|
2241 | 3068 | { |
---|
2242 | 3069 | group(new Composite()); |
---|
2243 | 3070 | } else |
---|
2244 | | - if (source == randomItem) |
---|
| 3071 | + if (source == switchItem || source == switchButton) |
---|
2245 | 3072 | { |
---|
2246 | 3073 | RandomNode random = new RandomNode(); |
---|
2247 | 3074 | group(random); |
---|
2248 | 3075 | if (random.size() > 0) |
---|
2249 | | - random.name = random.get(0).name + "Rnd"; |
---|
| 3076 | + random.name = random.get(0).name + "Switch"; |
---|
2250 | 3077 | } else |
---|
2251 | 3078 | if (source == physicsItem) |
---|
2252 | 3079 | { |
---|
.. | .. |
---|
2343 | 3170 | { |
---|
2344 | 3171 | group(new cLinker()); |
---|
2345 | 3172 | } else |
---|
2346 | | - if (source == textureItem) |
---|
| 3173 | + if (source == textureItem || source == textureButton) |
---|
2347 | 3174 | { |
---|
2348 | 3175 | group(new TextureNode()); |
---|
2349 | 3176 | } else |
---|
.. | .. |
---|
2363 | 3190 | { |
---|
2364 | 3191 | CastShadow(2); |
---|
2365 | 3192 | } else |
---|
2366 | | - if (source == ungroupItem) |
---|
| 3193 | + if (source == ungroupItem || source == ungroupButton) |
---|
2367 | 3194 | { |
---|
2368 | | - //ungroup(); |
---|
| 3195 | + boolean hasRoot = false; |
---|
| 3196 | + |
---|
2369 | 3197 | for (int i=0; i<group.selection.size(); i++) |
---|
2370 | 3198 | { |
---|
2371 | | - Ungroup(group.selection.get(i)); |
---|
| 3199 | + if (group.selection.get(i) == group) |
---|
| 3200 | + { |
---|
| 3201 | + hasRoot = true; |
---|
| 3202 | + break; |
---|
| 3203 | + } |
---|
2372 | 3204 | } |
---|
2373 | 3205 | |
---|
2374 | | - ClearSelection(false); |
---|
2375 | | - |
---|
2376 | | - refreshContents(); |
---|
| 3206 | + if (!hasRoot) |
---|
| 3207 | + { |
---|
| 3208 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 3209 | + { |
---|
| 3210 | + Ungroup(group.selection.get(i)); |
---|
| 3211 | + } |
---|
| 3212 | + |
---|
| 3213 | + ClearSelection(false); |
---|
| 3214 | + |
---|
| 3215 | + refreshContents(); |
---|
| 3216 | + } |
---|
2377 | 3217 | } else |
---|
2378 | 3218 | if (source == genUVItem) |
---|
2379 | 3219 | { |
---|
.. | .. |
---|
2385 | 3225 | } else |
---|
2386 | 3226 | if (source == genNormalsMESHItem) |
---|
2387 | 3227 | { |
---|
2388 | | - GenNormals(true); // TODO |
---|
| 3228 | + GenNormalsMESH(); |
---|
2389 | 3229 | } else |
---|
2390 | 3230 | if (source == genNormalsORGANItem) |
---|
2391 | 3231 | { |
---|
.. | .. |
---|
2450 | 3290 | if (source == unmarkleavesItem) |
---|
2451 | 3291 | { |
---|
2452 | 3292 | MarkLeaves(false); |
---|
| 3293 | + } else |
---|
| 3294 | + if (source == rewindleavesItem) |
---|
| 3295 | + { |
---|
| 3296 | + RewindLeaves(true); |
---|
| 3297 | + } else |
---|
| 3298 | + if (source == unrewindleavesItem) |
---|
| 3299 | + { |
---|
| 3300 | + RewindLeaves(false); |
---|
| 3301 | + } else |
---|
| 3302 | + if (source == randomleavesItem) |
---|
| 3303 | + { |
---|
| 3304 | + RandomLeaves(true); |
---|
| 3305 | + } else |
---|
| 3306 | + if (source == unrandomleavesItem) |
---|
| 3307 | + { |
---|
| 3308 | + RandomLeaves(false); |
---|
2453 | 3309 | } else |
---|
2454 | 3310 | if (source == flipVItem) |
---|
2455 | 3311 | { |
---|
.. | .. |
---|
2535 | 3391 | { |
---|
2536 | 3392 | SmoothMesh(); |
---|
2537 | 3393 | } else |
---|
2538 | | - if (source == transformgeometryItem) |
---|
| 3394 | + if (source == transformGeometryItem) |
---|
2539 | 3395 | { |
---|
2540 | 3396 | TransformGeometry(); |
---|
| 3397 | + } else |
---|
| 3398 | + if (source == transformChildrenItem) |
---|
| 3399 | + { |
---|
| 3400 | + TransformChildren(); |
---|
2541 | 3401 | } else |
---|
2542 | 3402 | if (source == resetTransformItem) |
---|
2543 | 3403 | { |
---|
.. | .. |
---|
2545 | 3405 | } else |
---|
2546 | 3406 | if (source == resetCentroidItem) |
---|
2547 | 3407 | { |
---|
2548 | | - ResetCentroid(); |
---|
| 3408 | + ResetCentroid(true); |
---|
| 3409 | + } else |
---|
| 3410 | + if (source == resetCentroidXZItem) |
---|
| 3411 | + { |
---|
| 3412 | + ResetCentroid(false); |
---|
2549 | 3413 | } else |
---|
2550 | 3414 | if (source == resetParentItem) |
---|
2551 | 3415 | { |
---|
.. | .. |
---|
2650 | 3514 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2651 | 3515 | { |
---|
2652 | 3516 | obj = (Object3D)e.nextElement(); |
---|
2653 | | - obj.SetBumpTexture(null); |
---|
| 3517 | + obj.ResetBumpTexture(); |
---|
2654 | 3518 | } |
---|
2655 | 3519 | |
---|
2656 | 3520 | refreshContents(); |
---|
.. | .. |
---|
2666 | 3530 | |
---|
2667 | 3531 | refreshContents(); |
---|
2668 | 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 | + |
---|
| 3556 | + refreshContents(); |
---|
| 3557 | + } else |
---|
2669 | 3558 | if (source == flashSelectionButton) |
---|
2670 | 3559 | { |
---|
2671 | 3560 | CameraPane.flash = true; |
---|
.. | .. |
---|
2677 | 3566 | if (source == twoButton) |
---|
2678 | 3567 | { |
---|
2679 | 3568 | radio.layout = twoButton; |
---|
| 3569 | + |
---|
| 3570 | + if (CameraPane.FULLSCREEN) |
---|
| 3571 | + fullscreenLayout = radio.layout; |
---|
| 3572 | + |
---|
2680 | 3573 | // bug |
---|
2681 | 3574 | //gridPanel.setDividerLocation(1.0); |
---|
2682 | 3575 | //bigPanel.setDividerLocation(0.0); |
---|
.. | .. |
---|
2709 | 3602 | bigThree.ClearUI(); |
---|
2710 | 3603 | bigThree.add(centralPanel); |
---|
2711 | 3604 | bigThree.FlushUI(); |
---|
| 3605 | + |
---|
| 3606 | + cameraView.requestFocusInWindow(); |
---|
| 3607 | + |
---|
| 3608 | +// refreshContents(true); |
---|
| 3609 | +// |
---|
| 3610 | +// try |
---|
| 3611 | +// { |
---|
| 3612 | +// java.awt.Robot bot = new java.awt.Robot(); |
---|
| 3613 | +// int mask = InputEvent.BUTTON1_MASK; |
---|
| 3614 | +// bot.mouseMove(100, 100); |
---|
| 3615 | +// bot.mousePress(mask); |
---|
| 3616 | +// bot.mouseRelease(mask); |
---|
| 3617 | +// } |
---|
| 3618 | +// catch (Exception e) |
---|
| 3619 | +// { |
---|
| 3620 | +// |
---|
| 3621 | +// } |
---|
| 3622 | + |
---|
2712 | 3623 | } else |
---|
2713 | 3624 | if (source == threeButton) |
---|
2714 | 3625 | { |
---|
2715 | 3626 | radio.layout = threeButton; |
---|
| 3627 | + |
---|
| 3628 | + if (CameraPane.FULLSCREEN) |
---|
| 3629 | + fullscreenLayout = radio.layout; |
---|
2716 | 3630 | |
---|
2717 | 3631 | // bigThree.remove(scenePanel); |
---|
2718 | 3632 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2742 | 3656 | // centralPanel.setVisible(true); |
---|
2743 | 3657 | // XYZPanel.setVisible(true); |
---|
2744 | 3658 | bigThree.ClearUI(); |
---|
| 3659 | + bigThree.add(scenePanel); |
---|
2745 | 3660 | bigThree.add(centralPanel); |
---|
2746 | | - bigThree.add(XYZPanel); |
---|
2747 | 3661 | bigThree.FlushUI(); |
---|
| 3662 | + |
---|
| 3663 | + cameraView.requestFocusInWindow(); |
---|
2748 | 3664 | } else |
---|
2749 | 3665 | if (source == fourButton) |
---|
2750 | 3666 | { |
---|
2751 | 3667 | radio.layout = fourButton; |
---|
| 3668 | + |
---|
| 3669 | + if (CameraPane.FULLSCREEN) |
---|
| 3670 | + fullscreenLayout = radio.layout; |
---|
2752 | 3671 | |
---|
2753 | 3672 | // bigThree.remove(scenePanel); |
---|
2754 | 3673 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2780 | 3699 | bigThree.ClearUI(); |
---|
2781 | 3700 | bigThree.add(scenePanel); |
---|
2782 | 3701 | bigThree.FlushUI(); |
---|
| 3702 | + |
---|
| 3703 | + cameraView.requestFocusInWindow(); |
---|
2783 | 3704 | } else |
---|
2784 | 3705 | if (source == sixButton) |
---|
2785 | 3706 | { |
---|
2786 | 3707 | radio.layout = sixButton; |
---|
| 3708 | + |
---|
| 3709 | + if (CameraPane.FULLSCREEN) |
---|
| 3710 | + fullscreenLayout = radio.layout; |
---|
2787 | 3711 | |
---|
2788 | 3712 | // bigThree.remove(scenePanel); |
---|
2789 | 3713 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2813 | 3737 | // centralPanel.setVisible(true); |
---|
2814 | 3738 | // XYZPanel.setVisible(false); |
---|
2815 | 3739 | bigThree.ClearUI(); |
---|
2816 | | - bigThree.add(scenePanel); |
---|
2817 | 3740 | bigThree.add(centralPanel); |
---|
| 3741 | + bigThree.add(scenePanel); |
---|
2818 | 3742 | bigThree.FlushUI(); |
---|
| 3743 | + |
---|
| 3744 | + cameraView.requestFocusInWindow(); |
---|
2819 | 3745 | } else |
---|
2820 | 3746 | if (source == sevenButton) |
---|
2821 | 3747 | { |
---|
2822 | 3748 | radio.layout = sevenButton; |
---|
| 3749 | + |
---|
| 3750 | + if (CameraPane.FULLSCREEN) |
---|
| 3751 | + fullscreenLayout = radio.layout; |
---|
2823 | 3752 | |
---|
2824 | 3753 | // bigThree.remove(scenePanel); |
---|
2825 | 3754 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
2853 | 3782 | bigThree.add(centralPanel); |
---|
2854 | 3783 | bigThree.add(XYZPanel); |
---|
2855 | 3784 | bigThree.FlushUI(); |
---|
| 3785 | + |
---|
| 3786 | + cameraView.requestFocusInWindow(); |
---|
2856 | 3787 | } else |
---|
2857 | 3788 | if (source == rootButton) |
---|
2858 | 3789 | { |
---|
.. | .. |
---|
2864 | 3795 | EditObject(obj); |
---|
2865 | 3796 | } |
---|
2866 | 3797 | |
---|
| 3798 | + cameraView.requestFocusInWindow(); |
---|
2867 | 3799 | refreshContents(true); |
---|
2868 | 3800 | } else |
---|
2869 | 3801 | if (source == closeButton) |
---|
.. | .. |
---|
2873 | 3805 | for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
2874 | 3806 | { |
---|
2875 | 3807 | ab = (cRadio)e.nextElement(); |
---|
2876 | | - if(ab.getModel().isSelected() && ab.GetObject() != client) |
---|
| 3808 | + if (ab.getModel().isSelected() && ab.GetObject() != client) |
---|
2877 | 3809 | { |
---|
| 3810 | + // Patch to avoid bug with transparency. |
---|
| 3811 | + if (!ab.hadMaterial) |
---|
| 3812 | + { |
---|
| 3813 | + ab.object.material = null; |
---|
| 3814 | + } |
---|
| 3815 | + |
---|
2878 | 3816 | buttonGroup.remove(ab); |
---|
2879 | 3817 | radioPanel.remove(ab); |
---|
2880 | 3818 | |
---|
2881 | | - ab.GetObject().editWindow = null; |
---|
| 3819 | + //ab.GetObject().editWindow = null; |
---|
| 3820 | + ab.GetObject().manipWindow = null; |
---|
2882 | 3821 | // ab.GetObject().objectUI = null; // ????????? |
---|
2883 | 3822 | |
---|
2884 | 3823 | ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick(); |
---|
2885 | 3824 | break; |
---|
2886 | 3825 | } |
---|
2887 | 3826 | } |
---|
| 3827 | + |
---|
| 3828 | + cameraView.requestFocusInWindow(); |
---|
2888 | 3829 | refreshContents(true); |
---|
2889 | 3830 | } else |
---|
2890 | 3831 | if (source == editItem || source == editButton) |
---|
2891 | 3832 | { |
---|
| 3833 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3834 | + { |
---|
| 3835 | + Object3D child = (Object3D)e.nextElement(); |
---|
| 3836 | + child.pinned = true; |
---|
| 3837 | + } |
---|
| 3838 | + |
---|
2892 | 3839 | EditSelection(false); |
---|
2893 | 3840 | } else |
---|
2894 | 3841 | if (source == uneditButton) |
---|
.. | .. |
---|
2897 | 3844 | { |
---|
2898 | 3845 | Object3D child = (Object3D)e.nextElement(); |
---|
2899 | 3846 | if(child.editWindow != null) |
---|
2900 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3847 | + child.pinned = false; |
---|
2901 | 3848 | child.CloseUI(); |
---|
2902 | 3849 | listUI.remove(child); |
---|
| 3850 | +// objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
2903 | 3851 | |
---|
2904 | | - child.editWindow = null; // ??????????? |
---|
| 3852 | + //child.editWindow = null; // ??????????? |
---|
2905 | 3853 | } |
---|
2906 | | - objEditor.ctrlPanel.validate(); |
---|
| 3854 | + objEditor.ctrlPanel.FlushUI(); |
---|
2907 | 3855 | //objEditor.jTree.clearSelection(); |
---|
2908 | 3856 | //objEditor.ResetSliders(); |
---|
2909 | 3857 | refreshContents(true); |
---|
.. | .. |
---|
2914 | 3862 | //copy.ClearUI(); |
---|
2915 | 3863 | for (Object3D obj : listUI) |
---|
2916 | 3864 | { |
---|
| 3865 | + obj.pinned = false; |
---|
2917 | 3866 | obj.CloseUI(); |
---|
2918 | 3867 | } |
---|
2919 | 3868 | listUI.clear(); |
---|
| 3869 | + SetPinStates(group.selection.size() > 0); |
---|
2920 | 3870 | refreshContents(true); |
---|
2921 | 3871 | } else |
---|
2922 | 3872 | if (source == allParamsButton) |
---|
2923 | 3873 | { |
---|
2924 | 3874 | assert(copy == group); |
---|
2925 | 3875 | |
---|
2926 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3876 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
2927 | 3877 | |
---|
2928 | 3878 | for (Object3D obj : listUI) |
---|
2929 | 3879 | { |
---|
.. | .. |
---|
2972 | 3922 | } |
---|
2973 | 3923 | |
---|
2974 | 3924 | copy = group; |
---|
| 3925 | + |
---|
| 3926 | + SetUndoStates(); |
---|
| 3927 | + |
---|
2975 | 3928 | //Globals.theRenderer.object = group; |
---|
2976 | 3929 | if(!useclient) |
---|
2977 | 3930 | { |
---|
.. | .. |
---|
2987 | 3940 | frontView.object = group; |
---|
2988 | 3941 | sideView.object = group; |
---|
2989 | 3942 | } |
---|
2990 | | - group.editWindow = this; |
---|
| 3943 | + |
---|
| 3944 | +// fix "+" issue |
---|
| 3945 | + //group.editWindow = this; |
---|
| 3946 | + group.manipWindow = this; |
---|
| 3947 | + |
---|
2991 | 3948 | /* |
---|
2992 | 3949 | currentLayout = radio.layout; |
---|
2993 | 3950 | if (currentLayout == null) |
---|
2994 | 3951 | currentLayout = sevenButton; |
---|
2995 | 3952 | */ |
---|
2996 | 3953 | radio.layout.doClick(); |
---|
| 3954 | + |
---|
| 3955 | + ClearUnpinned(); |
---|
| 3956 | + |
---|
| 3957 | + //Grafreed.Assert(group != null); |
---|
| 3958 | + //Grafreed.Assert(group.selection != null); |
---|
| 3959 | + SetPinStates(group.selection == null || group.selection.size() > 0); |
---|
| 3960 | + if (group.selection == null || group.selection.size() == 1) |
---|
| 3961 | + EditSelection(false); |
---|
2997 | 3962 | keepparent = group.parent; |
---|
2998 | 3963 | // PARENT = NULL or not??? |
---|
2999 | 3964 | //group.parent = null; // ROOT |
---|
3000 | 3965 | //group.attributes = -1; |
---|
3001 | 3966 | ResetModel(); |
---|
| 3967 | + |
---|
| 3968 | + cameraView.requestFocusInWindow(); |
---|
3002 | 3969 | refreshContents(true); |
---|
3003 | | - } |
---|
| 3970 | + } else if (event.getSource() == editCameraItem) |
---|
| 3971 | + { |
---|
| 3972 | + cameraView.ProtectCamera(); |
---|
| 3973 | + cameraView.requestFocusInWindow(); |
---|
| 3974 | + cameraView.repaint(); |
---|
| 3975 | + return; |
---|
| 3976 | + } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) |
---|
| 3977 | + { |
---|
| 3978 | + cameraView.RevertCamera(); |
---|
| 3979 | + cameraView.requestFocusInWindow(); |
---|
| 3980 | + cameraView.repaint(); |
---|
| 3981 | + return; |
---|
| 3982 | + // } else if (event.getSource() == textureButton) |
---|
| 3983 | + // { |
---|
| 3984 | + // return; // true; |
---|
| 3985 | + } |
---|
3004 | 3986 | else |
---|
3005 | 3987 | { |
---|
3006 | 3988 | //return super.action(event, arg); |
---|
.. | .. |
---|
3009 | 3991 | } |
---|
3010 | 3992 | |
---|
3011 | 3993 | boolean useclient = false; |
---|
3012 | | - cRadio radio; |
---|
3013 | 3994 | |
---|
3014 | 3995 | void ToggleRoot() |
---|
3015 | 3996 | { |
---|
.. | .. |
---|
3061 | 4042 | refreshContents(); |
---|
3062 | 4043 | } |
---|
3063 | 4044 | |
---|
| 4045 | + void TransformChildren() |
---|
| 4046 | + { |
---|
| 4047 | + Object3D obj; |
---|
| 4048 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 4049 | + { |
---|
| 4050 | + obj = (Object3D)e.nextElement(); |
---|
| 4051 | + obj.KeepTextureMatrices(); |
---|
| 4052 | + obj.TransformChildren(); |
---|
| 4053 | + obj.RestoreTextureMatrices(); |
---|
| 4054 | + |
---|
| 4055 | +// if (obj.parent == null) |
---|
| 4056 | +// { |
---|
| 4057 | +// System.out.println("NULL PARENT!"); |
---|
| 4058 | +// new Exception().printStackTrace(); |
---|
| 4059 | +// } |
---|
| 4060 | +// else |
---|
| 4061 | +// TouchTransform(obj); |
---|
| 4062 | +// //obj.parent.Touch(); |
---|
| 4063 | + } |
---|
| 4064 | + |
---|
| 4065 | + refreshContents(); |
---|
| 4066 | + } |
---|
3064 | 4067 | |
---|
3065 | 4068 | void ResetTransform() |
---|
3066 | 4069 | { |
---|
.. | .. |
---|
3173 | 4176 | refreshContents(); |
---|
3174 | 4177 | } |
---|
3175 | 4178 | |
---|
3176 | | - void ResetCentroid() |
---|
| 4179 | + void ResetCentroid(boolean full) |
---|
3177 | 4180 | { |
---|
3178 | 4181 | Object3D obj; |
---|
3179 | 4182 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
3188 | 4191 | LA.matIdentity(Object3D.mat); |
---|
3189 | 4192 | obj.getBounds(minima, maxima, false); |
---|
3190 | 4193 | Object3D.mat[3][0] = -(minima.x + maxima.x)/2; |
---|
3191 | | - Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
| 4194 | + if (full) |
---|
| 4195 | + Object3D.mat[3][1] = -(minima.y + maxima.y)/2; |
---|
3192 | 4196 | Object3D.mat[3][2] = -(minima.z + maxima.z)/2; |
---|
3193 | 4197 | obj.TransformMesh(Object3D.mat); |
---|
| 4198 | + |
---|
3194 | 4199 | Object3D.mat[3][0] = (minima.x + maxima.x)/2; |
---|
3195 | | - Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
| 4200 | + if (full) |
---|
| 4201 | + Object3D.mat[3][1] = (minima.y + maxima.y)/2; |
---|
3196 | 4202 | Object3D.mat[3][2] = (minima.z + maxima.z)/2; |
---|
| 4203 | + |
---|
3197 | 4204 | LA.matConcat(Object3D.mat, obj.toParent, obj.toParent); |
---|
3198 | 4205 | //Object3D.mat[3][0] = -Object3D.mat[3][0]; |
---|
3199 | 4206 | //Object3D.mat[3][1] = -Object3D.mat[3][1]; |
---|
.. | .. |
---|
3222 | 4229 | |
---|
3223 | 4230 | int size = obj.MemorySize(); |
---|
3224 | 4231 | |
---|
3225 | | - System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 4232 | + //System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 4233 | + System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)"); |
---|
3226 | 4234 | } |
---|
3227 | 4235 | } |
---|
3228 | 4236 | catch (Exception e) |
---|
.. | .. |
---|
3259 | 4267 | obj = (Object3D)e.nextElement(); |
---|
3260 | 4268 | |
---|
3261 | 4269 | System.out.println("Object is: " + obj); |
---|
3262 | | - GrafreeD.AnalyzeObject(obj); |
---|
| 4270 | + Grafreed.AnalyzeObject(obj); |
---|
3263 | 4271 | System.out.println("Boundary rep: " + obj.bRep); |
---|
3264 | | - GrafreeD.AnalyzeObject(obj.bRep); |
---|
| 4272 | + Grafreed.AnalyzeObject(obj.bRep); |
---|
3265 | 4273 | |
---|
3266 | 4274 | // System.err.println((size/1024) + " KB is the size of " + obj); |
---|
3267 | 4275 | } |
---|
.. | .. |
---|
3303 | 4311 | void GenNormals(boolean crease) |
---|
3304 | 4312 | { |
---|
3305 | 4313 | group.GenNormalsS(crease); |
---|
| 4314 | + |
---|
| 4315 | + refreshContents(); |
---|
| 4316 | + } |
---|
| 4317 | + |
---|
| 4318 | + void GenNormalsMESH() |
---|
| 4319 | + { |
---|
| 4320 | + group.GenNormalsMeshS(); |
---|
3306 | 4321 | |
---|
3307 | 4322 | refreshContents(); |
---|
3308 | 4323 | } |
---|
.. | .. |
---|
3475 | 4490 | |
---|
3476 | 4491 | void ParseVertices() |
---|
3477 | 4492 | { |
---|
3478 | | - boolean epsequal = GrafreeD.epsequal; |
---|
3479 | | - GrafreeD.epsequal = true; |
---|
| 4493 | + boolean epsequal = Grafreed.epsequal; |
---|
| 4494 | + Grafreed.epsequal = true; |
---|
3480 | 4495 | |
---|
3481 | 4496 | for (int i=0; i<group.selection.size(); i++) |
---|
3482 | 4497 | { |
---|
.. | .. |
---|
3501 | 4516 | LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3502 | 4517 | LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3503 | 4518 | |
---|
3504 | | - g.add(GrafreeD.clipboard); |
---|
| 4519 | + g.add(Grafreed.clipboard); |
---|
3505 | 4520 | |
---|
3506 | 4521 | buffer.add(g); |
---|
3507 | 4522 | } |
---|
.. | .. |
---|
3516 | 4531 | makeSomething(buffer, i==group.selection.size()-1); |
---|
3517 | 4532 | } |
---|
3518 | 4533 | |
---|
3519 | | - GrafreeD.epsequal = epsequal; |
---|
| 4534 | + Grafreed.epsequal = epsequal; |
---|
3520 | 4535 | |
---|
3521 | 4536 | refreshContents(); |
---|
3522 | 4537 | } |
---|
.. | .. |
---|
3534 | 4549 | String pigment = Object3D.GetPigment(tex); |
---|
3535 | 4550 | //String bump = Object3D.GetBump(tex); |
---|
3536 | 4551 | |
---|
3537 | | - com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 4552 | + com.sun.opengl.util.texture.TextureData texturedata = null; |
---|
| 4553 | + |
---|
| 4554 | + try |
---|
| 4555 | + { |
---|
| 4556 | + texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres); |
---|
| 4557 | + } |
---|
| 4558 | + catch (Exception e) |
---|
| 4559 | + { |
---|
| 4560 | + System.err.println("FAIL: " + node); |
---|
| 4561 | + } |
---|
3538 | 4562 | |
---|
3539 | 4563 | double s = v.s; |
---|
3540 | 4564 | |
---|
.. | .. |
---|
3622 | 4646 | |
---|
3623 | 4647 | SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY); |
---|
3624 | 4648 | |
---|
3625 | | - boolean random = CameraPane.RANDOM; |
---|
3626 | | - CameraPane.RANDOM = false; // parse all random nodes |
---|
| 4649 | + boolean random = CameraPane.SWITCH; |
---|
| 4650 | + CameraPane.SWITCH = false; // parse all random nodes |
---|
3627 | 4651 | lowres.linkVerticesThis(null); |
---|
3628 | 4652 | lowres.linkVerticesThis(sn); |
---|
3629 | | - CameraPane.RANDOM = random; |
---|
| 4653 | + CameraPane.SWITCH = random; |
---|
3630 | 4654 | |
---|
3631 | 4655 | System.err.flush(); |
---|
3632 | 4656 | |
---|
.. | .. |
---|
3666 | 4690 | return; |
---|
3667 | 4691 | |
---|
3668 | 4692 | Object3D poses = group.selection.get(0); |
---|
3669 | | - Object3D ref = GrafreeD.clipboard.get(0); |
---|
| 4693 | + Object3D ref = Grafreed.clipboard.get(0); |
---|
3670 | 4694 | |
---|
3671 | 4695 | Object3D newgroup = new Object3D("Po:" + poses.name); |
---|
3672 | 4696 | |
---|
.. | .. |
---|
3860 | 4884 | |
---|
3861 | 4885 | void ClipMesh() |
---|
3862 | 4886 | { |
---|
3863 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 4887 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
3864 | 4888 | { |
---|
3865 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 4889 | + Object3D content = Grafreed.clipboard.get(0); |
---|
3866 | 4890 | |
---|
3867 | 4891 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
3868 | 4892 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
3871 | 4895 | // { |
---|
3872 | 4896 | // group.selection.get(i).ClipMesh(GrafreeD.clipboard); |
---|
3873 | 4897 | // } |
---|
3874 | | - group.selection.ClipMesh(GrafreeD.clipboard); |
---|
| 4898 | + group.selection.ClipMesh(Grafreed.clipboard); |
---|
3875 | 4899 | } |
---|
3876 | 4900 | // group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3877 | 4901 | System.out.println("DONE."); |
---|
.. | .. |
---|
3918 | 4942 | void MarkLeaves(boolean hide) |
---|
3919 | 4943 | { |
---|
3920 | 4944 | group.selection.MarkLeaves(hide); |
---|
| 4945 | + refreshContents(); |
---|
| 4946 | + } |
---|
| 4947 | + |
---|
| 4948 | + void RewindLeaves(boolean hide) |
---|
| 4949 | + { |
---|
| 4950 | + group.selection.RewindLeaves(hide); |
---|
| 4951 | + refreshContents(); |
---|
| 4952 | + } |
---|
| 4953 | + |
---|
| 4954 | + void RandomLeaves(boolean hide) |
---|
| 4955 | + { |
---|
| 4956 | + group.selection.RandomLeaves(hide); |
---|
3921 | 4957 | refreshContents(); |
---|
3922 | 4958 | } |
---|
3923 | 4959 | |
---|
.. | .. |
---|
3992 | 5028 | // } |
---|
3993 | 5029 | // } |
---|
3994 | 5030 | |
---|
3995 | | - static boolean allparams = true; |
---|
3996 | | - |
---|
3997 | | - static Vector<Object3D> listUI = new Vector<Object3D>(); |
---|
3998 | | - |
---|
3999 | 5031 | void EditSelection(boolean newWindow) |
---|
4000 | 5032 | { |
---|
| 5033 | + if (group.selection == null) |
---|
| 5034 | + { |
---|
| 5035 | + EditElement(group, newWindow); // ? new |
---|
| 5036 | + return; |
---|
| 5037 | + } |
---|
| 5038 | + |
---|
4001 | 5039 | // aConstraints.gridy = 0; |
---|
4002 | 5040 | for (int i=0; i<group.selection.size(); i++) |
---|
4003 | 5041 | { |
---|
4004 | 5042 | //System.out.println("edit : " + objectPanel.indexOfTab("Material")); |
---|
4005 | 5043 | //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false); |
---|
4006 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 5044 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
4007 | 5045 | |
---|
4008 | 5046 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4009 | | - if(elem != group) |
---|
| 5047 | + if(elem != group || !newWindow) |
---|
4010 | 5048 | { |
---|
4011 | | - // if (!(elem instanceof Composite)) |
---|
4012 | | - // newWindow = false; |
---|
4013 | | - listUI.add(elem); |
---|
4014 | | - elem.openEditWindow(this, newWindow); //, false); |
---|
4015 | | - System.out.println("edit : " + elem); |
---|
4016 | | - elem.editWindow.refreshContents(true); // ? new |
---|
| 5049 | + EditElement(elem, newWindow); // ? new |
---|
4017 | 5050 | } |
---|
4018 | 5051 | } |
---|
4019 | 5052 | } |
---|
.. | .. |
---|
4076 | 5109 | |
---|
4077 | 5110 | freezemodel = false; |
---|
4078 | 5111 | } |
---|
4079 | | - |
---|
4080 | | - boolean flashIt = true; |
---|
4081 | | - |
---|
| 5112 | + |
---|
4082 | 5113 | public void valueChanged(TreeSelectionEvent e) |
---|
4083 | 5114 | //public boolean handleEvent(Event event) |
---|
4084 | 5115 | { |
---|
.. | .. |
---|
4088 | 5119 | //new Exception().printStackTrace(); |
---|
4089 | 5120 | |
---|
4090 | 5121 | freezemodel = true; |
---|
4091 | | - |
---|
| 5122 | + ClearUnpinned(); |
---|
| 5123 | + |
---|
4092 | 5124 | /**/ |
---|
4093 | 5125 | //switch (event.id) |
---|
4094 | 5126 | { |
---|
.. | .. |
---|
4096 | 5128 | //case 702: // Event.LIST_DESELECT |
---|
4097 | 5129 | group.deselectAll(); |
---|
4098 | 5130 | TreePath tps[] = objEditor.jTree.getSelectionPaths(); |
---|
4099 | | - objEditor.ClearInfo(); // .GetMaterial()); |
---|
4100 | 5131 | if (tps != null) |
---|
4101 | 5132 | { |
---|
4102 | 5133 | for (int i=0; i < tps.length; i++) |
---|
.. | .. |
---|
4105 | 5136 | |
---|
4106 | 5137 | //if (child.parent != null) |
---|
4107 | 5138 | //child.parent.addSelectee(child); |
---|
| 5139 | + objEditor.SetMaterial(child); |
---|
4108 | 5140 | group.addSelectee(child); |
---|
4109 | | - objEditor.SetMaterial(child); // .GetMaterial()); |
---|
4110 | | - objEditor.AddInfo(child, this, true); // .GetMaterial()); |
---|
4111 | | - System.err.println("info : " + child.GetPath()); |
---|
4112 | 5141 | } |
---|
4113 | 5142 | } |
---|
4114 | 5143 | // else |
---|
.. | .. |
---|
4118 | 5147 | // System.err.println("info : " + group.GetPath()); |
---|
4119 | 5148 | // } |
---|
4120 | 5149 | |
---|
4121 | | - objEditor.SetText(); // jan 2014 |
---|
4122 | | - |
---|
4123 | | - if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
| 5150 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera)) |
---|
4124 | 5151 | CameraPane.flash = true; |
---|
4125 | 5152 | |
---|
4126 | | - if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera) |
---|
| 5153 | + if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera) |
---|
4127 | 5154 | // a camera |
---|
4128 | 5155 | { |
---|
4129 | | - CameraPane.camerachangeframe = 0; // don't refuse it |
---|
4130 | | - Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 5156 | + if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace |
---|
| 5157 | + { |
---|
| 5158 | + CameraPane.camerachangeframe = 0; // don't refuse it |
---|
| 5159 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 5160 | + } |
---|
4131 | 5161 | // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
4132 | 5162 | // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
4133 | 5163 | } |
---|
4134 | 5164 | |
---|
| 5165 | + if (tps != null && tps.length == 1) |
---|
| 5166 | + { |
---|
| 5167 | + EditSelection(false); |
---|
| 5168 | + } |
---|
| 5169 | + |
---|
| 5170 | + SetPinStates(tps != null && tps.length > 0); |
---|
| 5171 | + |
---|
4135 | 5172 | refreshContents(); |
---|
4136 | 5173 | //return true; |
---|
4137 | 5174 | } |
---|
.. | .. |
---|
4140 | 5177 | |
---|
4141 | 5178 | freezemodel = false; |
---|
4142 | 5179 | } |
---|
| 5180 | + |
---|
| 5181 | + void SetPinStates(boolean enabled) |
---|
| 5182 | + { |
---|
| 5183 | + editButton.setEnabled(enabled); |
---|
| 5184 | + uneditButton.setEnabled(enabled); |
---|
| 5185 | + //unselectButton.setEnabled(enabled); |
---|
| 5186 | + flashSelectionButton.setEnabled(enabled); |
---|
| 5187 | + |
---|
| 5188 | + clearPanelButton.setEnabled(!listUI.isEmpty()); |
---|
| 5189 | + } |
---|
| 5190 | + |
---|
| 5191 | + void refreshContents(boolean cp) |
---|
| 5192 | + { |
---|
| 5193 | + //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
| 5194 | + if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
| 5195 | + { |
---|
| 5196 | + objEditor.ClearInfo(); // .GetMaterial()); |
---|
| 5197 | + |
---|
| 5198 | + for (int i=0; i < group.selection.Size(); i++) |
---|
| 5199 | + { |
---|
| 5200 | + Object3D child = (Object3D) group.selection.get(i); |
---|
| 5201 | + |
---|
| 5202 | + objEditor.AddInfo(child, this, true); |
---|
| 5203 | + System.err.println("info : " + child.GetPath()); |
---|
| 5204 | + } |
---|
| 5205 | + |
---|
| 5206 | + objEditor.SetText(); // jan 2014 |
---|
| 5207 | + } |
---|
| 5208 | + |
---|
| 5209 | + super.refreshContents(cp); |
---|
| 5210 | + } |
---|
4143 | 5211 | |
---|
4144 | 5212 | void linkSomething(Object3D thing) |
---|
4145 | 5213 | { |
---|
.. | .. |
---|
4211 | 5279 | { |
---|
4212 | 5280 | if (group.selection.isEmpty()) |
---|
4213 | 5281 | return; |
---|
4214 | | - GrafreeD.clipboardIsTempGroup = false; |
---|
| 5282 | + |
---|
| 5283 | + Grafreed.clipboardIsTempGroup = false; |
---|
4215 | 5284 | Composite tGroup = null; |
---|
4216 | 5285 | if (group.selection.size() > 0) // 1) |
---|
4217 | 5286 | { |
---|
4218 | 5287 | tGroup = new cGroup(); |
---|
4219 | | - GrafreeD.clipboardIsTempGroup = true; |
---|
| 5288 | + Grafreed.clipboardIsTempGroup = true; |
---|
4220 | 5289 | } |
---|
4221 | 5290 | |
---|
4222 | 5291 | if (cut) |
---|
4223 | 5292 | { |
---|
| 5293 | +// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save. |
---|
| 5294 | +// Save(); |
---|
4224 | 5295 | //int indices[] = jList.getSelectedIndices(); |
---|
4225 | 5296 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4226 | 5297 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4256 | 5327 | //System.out.println("cut " + child); |
---|
4257 | 5328 | //System.out.println("parent = " + child.parent); |
---|
4258 | 5329 | // tmp.addChild(child); |
---|
4259 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 5330 | + if (Grafreed.clipboardIsTempGroup) |
---|
4260 | 5331 | tGroup.add/*Child*/(tmp); |
---|
4261 | 5332 | else |
---|
4262 | | - GrafreeD.clipboard = tmp; |
---|
| 5333 | + Grafreed.clipboard = tmp; |
---|
4263 | 5334 | } |
---|
4264 | 5335 | else |
---|
4265 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 5336 | + if (Grafreed.clipboardIsTempGroup) |
---|
4266 | 5337 | tGroup.add/*Child*/(child); |
---|
4267 | 5338 | else |
---|
4268 | | - GrafreeD.clipboard = child; |
---|
| 5339 | + Grafreed.clipboard = child; |
---|
4269 | 5340 | } |
---|
4270 | 5341 | |
---|
4271 | 5342 | //ResetModel(); |
---|
.. | .. |
---|
4297 | 5368 | //System.out.println("cut " + elem); |
---|
4298 | 5369 | //System.out.println("parent = " + elem.parent); |
---|
4299 | 5370 | // tmp.addChild(elem); |
---|
4300 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 5371 | + if (Grafreed.clipboardIsTempGroup) |
---|
4301 | 5372 | tGroup.add/*Child*/(tmp); |
---|
4302 | 5373 | else |
---|
4303 | | - GrafreeD.clipboard = tmp; |
---|
| 5374 | + Grafreed.clipboard = tmp; |
---|
4304 | 5375 | } |
---|
4305 | 5376 | else |
---|
4306 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 5377 | + if (Grafreed.clipboardIsTempGroup) |
---|
4307 | 5378 | tGroup.add/*Child*/(child); |
---|
4308 | 5379 | else |
---|
4309 | | - GrafreeD.clipboard = child; |
---|
| 5380 | + Grafreed.clipboard = child; |
---|
4310 | 5381 | } |
---|
4311 | 5382 | |
---|
4312 | 5383 | } |
---|
4313 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
4314 | | - GrafreeD.clipboard = tGroup; |
---|
| 5384 | + |
---|
| 5385 | + if (Grafreed.clipboardIsTempGroup) |
---|
| 5386 | + Grafreed.clipboard = tGroup; |
---|
| 5387 | + |
---|
4315 | 5388 | if (cut) |
---|
4316 | 5389 | { |
---|
4317 | 5390 | ResetModel(); |
---|
.. | .. |
---|
4321 | 5394 | |
---|
4322 | 5395 | void paste(boolean expand) |
---|
4323 | 5396 | { |
---|
| 5397 | + if (Globals.REPLACEONMAKE) |
---|
| 5398 | + Save(); |
---|
| 5399 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5400 | + Globals.REPLACEONMAKE = false; |
---|
4324 | 5401 | // if (GrafreeD.clipboard == null) |
---|
4325 | 5402 | // return; |
---|
4326 | 5403 | boolean first = true; |
---|
4327 | 5404 | |
---|
4328 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 5405 | + if (Grafreed.clipboardIsTempGroup) |
---|
4329 | 5406 | { |
---|
4330 | 5407 | Composite temp; |
---|
4331 | 5408 | |
---|
.. | .. |
---|
4336 | 5413 | temp = (Composite)Applet3D.clipboard.deepCopy(); |
---|
4337 | 5414 | */ |
---|
4338 | 5415 | Object3D elem; |
---|
4339 | | - for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
| 5416 | + for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
4340 | 5417 | { |
---|
4341 | 5418 | Object3D child = (Object3D)e.nextElement(); |
---|
4342 | 5419 | |
---|
.. | .. |
---|
4370 | 5447 | //Object3D cb = Applet3D.clipboard; |
---|
4371 | 5448 | //temp.addChild(cb); |
---|
4372 | 5449 | //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0)); |
---|
4373 | | - assert(GrafreeD.clipboard.parent == null); |
---|
4374 | | - Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
4375 | | - GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
4376 | | - if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
4377 | | - makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy()); |
---|
| 5450 | + assert(Grafreed.clipboard.parent == null); |
---|
| 5451 | + Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent; |
---|
| 5452 | + Grafreed.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 5453 | + if (LA.isIdentity(Grafreed.clipboard.toParent)) |
---|
| 5454 | + makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy()); |
---|
4378 | 5455 | else |
---|
4379 | | - makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy()); |
---|
4380 | | - GrafreeD.clipboard.get(0).parent = keepparent; |
---|
| 5456 | + makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy()); |
---|
| 5457 | + Grafreed.clipboard.get(0).parent = keepparent; |
---|
4381 | 5458 | } |
---|
4382 | 5459 | |
---|
| 5460 | + Globals.REPLACEONMAKE = keep; |
---|
4383 | 5461 | ResetModel(); |
---|
4384 | 5462 | refreshContents(); |
---|
4385 | 5463 | } |
---|
4386 | 5464 | |
---|
4387 | | - void pasteInto(boolean copyit) |
---|
| 5465 | + void pasteInto(boolean copyit, boolean clone) |
---|
4388 | 5466 | { |
---|
4389 | 5467 | // if (GrafreeD.clipboard == null) |
---|
4390 | 5468 | // return; |
---|
.. | .. |
---|
4413 | 5491 | if (copyit) |
---|
4414 | 5492 | { |
---|
4415 | 5493 | // paste(false); |
---|
4416 | | - CloneClipboard(false); // sept 2014 |
---|
| 5494 | + if (clone) |
---|
| 5495 | + { |
---|
| 5496 | + CloneClipboard(false); // sept 2014 |
---|
| 5497 | + } |
---|
| 5498 | + else |
---|
| 5499 | + { |
---|
| 5500 | + paste(false); |
---|
| 5501 | + } |
---|
4417 | 5502 | } |
---|
4418 | 5503 | else |
---|
4419 | 5504 | { |
---|
4420 | 5505 | boolean first = true; |
---|
4421 | 5506 | |
---|
4422 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 5507 | + if (Grafreed.clipboardIsTempGroup) |
---|
4423 | 5508 | { |
---|
4424 | | - Composite temp = (Composite)GrafreeD.clipboard; |
---|
| 5509 | + Composite temp = (Composite)Grafreed.clipboard; |
---|
4425 | 5510 | Object3D copy; |
---|
4426 | 5511 | for (Enumeration e = temp.children.elements(); e.hasMoreElements();) |
---|
4427 | 5512 | { |
---|
.. | .. |
---|
4431 | 5516 | } |
---|
4432 | 5517 | } else |
---|
4433 | 5518 | { |
---|
4434 | | - linkSomething(GrafreeD.clipboard); //.get(0)); |
---|
| 5519 | + linkSomething(Grafreed.clipboard); //.get(0)); |
---|
4435 | 5520 | } |
---|
4436 | 5521 | } |
---|
4437 | 5522 | } |
---|
.. | .. |
---|
4508 | 5593 | |
---|
4509 | 5594 | void group(Object3D csg, boolean grab) |
---|
4510 | 5595 | { |
---|
| 5596 | + if (Globals.REPLACEONMAKE) |
---|
| 5597 | + Save(); |
---|
| 5598 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5599 | + Globals.REPLACEONMAKE = false; |
---|
4511 | 5600 | if (//false) // why?? |
---|
4512 | 5601 | !group.selection.isEmpty()) |
---|
4513 | 5602 | { |
---|
.. | .. |
---|
4621 | 5710 | //node.add(csg); |
---|
4622 | 5711 | //makeSomething(node); |
---|
4623 | 5712 | makeSomething(csg); |
---|
| 5713 | + Globals.REPLACEONMAKE = keep; |
---|
4624 | 5714 | } |
---|
4625 | 5715 | |
---|
4626 | 5716 | void Ungroup(Object3D g) |
---|
4627 | 5717 | { |
---|
| 5718 | + if (Globals.REPLACEONMAKE) |
---|
| 5719 | + Save(); |
---|
| 5720 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5721 | + Globals.REPLACEONMAKE = false; |
---|
4628 | 5722 | if (g instanceof HiddenObject) |
---|
4629 | 5723 | { |
---|
4630 | 5724 | HiddenObject h = (HiddenObject) g; |
---|
.. | .. |
---|
4641 | 5735 | objEditor.makeSomething(g.get(i), false); |
---|
4642 | 5736 | } |
---|
4643 | 5737 | } |
---|
| 5738 | + Globals.REPLACEONMAKE = keep; |
---|
4644 | 5739 | } |
---|
4645 | 5740 | |
---|
4646 | 5741 | void ungroup() |
---|
.. | .. |
---|
4836 | 5931 | } |
---|
4837 | 5932 | */ |
---|
4838 | 5933 | |
---|
4839 | | - void ImportGFD() |
---|
4840 | | - { |
---|
4841 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
4842 | | - browser.show(); |
---|
4843 | | - String filename = browser.getFile(); |
---|
4844 | | - if (filename != null && filename.length() > 0) |
---|
4845 | | - { |
---|
4846 | | - String fullname = browser.getDirectory() + filename; |
---|
4847 | | - |
---|
4848 | | - //Object3D readobj = |
---|
4849 | | - objEditor.ReadGFD(fullname, objEditor); |
---|
4850 | | - //makeSomething(readobj); |
---|
4851 | | - } |
---|
4852 | | - } |
---|
4853 | | - |
---|
4854 | 5934 | /* |
---|
4855 | 5935 | public void Callback(Object obj) |
---|
4856 | 5936 | { |
---|
.. | .. |
---|
4874 | 5954 | } |
---|
4875 | 5955 | */ |
---|
4876 | 5956 | |
---|
4877 | | - void ImportVRMLX3D() |
---|
4878 | | - { |
---|
4879 | | - if (GrafreeD.standAlone) |
---|
4880 | | - { |
---|
4881 | | - /**/ |
---|
4882 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
4883 | | - browser.show(); |
---|
4884 | | - String filename = browser.getFile(); |
---|
4885 | | - if (filename != null && filename.length() > 0) |
---|
4886 | | - { |
---|
4887 | | - String fullname = browser.getDirectory() + filename; |
---|
4888 | | - LoadVRMLX3D(fullname); |
---|
4889 | | - } |
---|
4890 | | - /**/ |
---|
4891 | | - } |
---|
4892 | | - } |
---|
4893 | | - |
---|
4894 | 5957 | String GetFile(String dialogName) |
---|
4895 | 5958 | { |
---|
4896 | | - if (GrafreeD.standAlone) |
---|
| 5959 | + if (Grafreed.standAlone) |
---|
4897 | 5960 | { |
---|
4898 | 5961 | FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD); |
---|
4899 | 5962 | browser.show(); |
---|
.. | .. |
---|
4957 | 6020 | cButton flashSelectionButton; |
---|
4958 | 6021 | cButton editButton; |
---|
4959 | 6022 | cButton uneditButton; |
---|
| 6023 | + JCheckBox allParamsButton; |
---|
4960 | 6024 | cButton clearpanelButton; |
---|
4961 | | - cButton allParamsButton; |
---|
4962 | 6025 | cButton unselectButton; |
---|
4963 | 6026 | |
---|
| 6027 | + cButton restoreCameraButton; |
---|
| 6028 | + |
---|
| 6029 | + cButton oneStepButton; |
---|
| 6030 | + |
---|
| 6031 | + cButton groupButton; |
---|
| 6032 | + cButton ungroupButton; |
---|
| 6033 | + cButton compositeButton; |
---|
| 6034 | + cButton switchButton; |
---|
| 6035 | + cButton loopButton; |
---|
| 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; |
---|
| 6053 | + |
---|
| 6054 | + cButton gridButton; |
---|
| 6055 | + cButton boxButton; |
---|
| 6056 | + cButton sphereButton; |
---|
| 6057 | + cButton coneButton; |
---|
| 6058 | + cButton torusButton; |
---|
| 6059 | + cButton superButton; |
---|
| 6060 | + cButton kleinButton; |
---|
| 6061 | + cButton particlesButton; |
---|
| 6062 | + cButton overlayButton; |
---|
| 6063 | + cButton lightButton; |
---|
| 6064 | + |
---|
4964 | 6065 | cButton screenfitButton; |
---|
4965 | 6066 | cButton screenfitpointButton; |
---|
4966 | 6067 | cButton snapobjectButton; |
---|
.. | .. |
---|
4972 | 6073 | |
---|
4973 | 6074 | cButton setsupportButton; |
---|
4974 | 6075 | |
---|
4975 | | - cButton twoButton; |
---|
4976 | | - cButton sixButton; |
---|
4977 | | - cButton threeButton; |
---|
4978 | | - cButton sevenButton; |
---|
4979 | | - cButton fourButton; // full panel |
---|
4980 | | - cButton oneButton; // full XYZ |
---|
4981 | | - //cButton currentLayout; |
---|
4982 | | - |
---|
4983 | 6076 | // |
---|
4984 | 6077 | //Composite |
---|
4985 | 6078 | Object3D // to do !! |
---|
.. | .. |
---|
4989 | 6082 | //JTree jTree; |
---|
4990 | 6083 | private MenuItem lookAtItem; |
---|
4991 | 6084 | private MenuItem lookFromItem; |
---|
4992 | | - private MenuItem switchItem; |
---|
| 6085 | + private MenuItem switchViewItem; |
---|
4993 | 6086 | private MenuItem cutItem; |
---|
4994 | | - private MenuItem duplicateItem; |
---|
| 6087 | + private MenuItem undoItem; |
---|
| 6088 | + private MenuItem redoItem; |
---|
| 6089 | + private JMenuItem duplicateItem; |
---|
4995 | 6090 | private MenuItem cloneItem; |
---|
4996 | 6091 | private MenuItem cloneSupportItem; |
---|
4997 | 6092 | private MenuItem overwriteGeoItem; |
---|
.. | .. |
---|
5004 | 6099 | private MenuItem linkverticesItem; |
---|
5005 | 6100 | private MenuItem relinkverticesItem; |
---|
5006 | 6101 | private MenuItem setMasterItem; |
---|
5007 | | - private MenuItem resetMeshItem; |
---|
| 6102 | + private MenuItem resetAllItem; |
---|
5008 | 6103 | private MenuItem stepAllItem; |
---|
5009 | 6104 | private MenuItem revertMeshItem; |
---|
5010 | 6105 | private MenuItem poseMeshItem; |
---|
.. | .. |
---|
5015 | 6110 | private MenuItem mergeGeometriesItem; |
---|
5016 | 6111 | private MenuItem copyItem; |
---|
5017 | 6112 | private MenuItem pasteItem; |
---|
| 6113 | + private MenuItem pasteIntoItem; |
---|
5018 | 6114 | private MenuItem pasteLinkItem; |
---|
5019 | 6115 | private MenuItem pasteCloneItem; |
---|
5020 | 6116 | private MenuItem pasteExpandItem; |
---|
5021 | | - private MenuItem clearItem; |
---|
| 6117 | + private MenuItem deleteItem; |
---|
5022 | 6118 | private MenuItem clearAllItem; |
---|
5023 | 6119 | private MenuItem genUVItem; |
---|
5024 | 6120 | private MenuItem genNormalsMESHItem; |
---|
.. | .. |
---|
5053 | 6149 | private MenuItem showleavesItem; |
---|
5054 | 6150 | private MenuItem markleavesItem; |
---|
5055 | 6151 | private MenuItem unmarkleavesItem; |
---|
| 6152 | + private MenuItem rewindleavesItem; |
---|
| 6153 | + private MenuItem unrewindleavesItem; |
---|
| 6154 | + private MenuItem randomleavesItem; |
---|
| 6155 | + private MenuItem unrandomleavesItem; |
---|
5056 | 6156 | |
---|
5057 | 6157 | private MenuItem flipVItem; |
---|
5058 | 6158 | private MenuItem unflipVItem; |
---|
.. | .. |
---|
5064 | 6164 | private MenuItem panoTexturesItem; |
---|
5065 | 6165 | |
---|
5066 | 6166 | private MenuItem resetCentroidItem; |
---|
5067 | | - private MenuItem transformgeometryItem; |
---|
| 6167 | + private MenuItem resetCentroidXZItem; |
---|
5068 | 6168 | private MenuItem resetTransformItem; |
---|
| 6169 | + private MenuItem transformGeometryItem; |
---|
| 6170 | + private MenuItem transformChildrenItem; |
---|
5069 | 6171 | private MenuItem hideItem; |
---|
5070 | 6172 | private MenuItem grabItem; |
---|
5071 | 6173 | private MenuItem backItem; |
---|
5072 | 6174 | private MenuItem frontItem; |
---|
5073 | 6175 | private MenuItem cameraItem; |
---|
5074 | 6176 | private MenuItem compositeItem; |
---|
5075 | | - private MenuItem randomItem; |
---|
| 6177 | + private MenuItem switchItem; |
---|
5076 | 6178 | private MenuItem physicsItem; |
---|
5077 | 6179 | private MenuItem frameselectorItem; |
---|
5078 | 6180 | private MenuItem scriptNodeItem; |
---|
.. | .. |
---|
5096 | 6198 | private MenuItem attachBumpItem; |
---|
5097 | 6199 | private MenuItem detachBumpItem; |
---|
5098 | 6200 | private MenuItem pigmentBumpItem; |
---|
| 6201 | + private MenuItem embedTexturesItem; |
---|
| 6202 | + private MenuItem deEmbedTexturesItem; |
---|
5099 | 6203 | |
---|
5100 | 6204 | private MenuItem particleItem; |
---|
5101 | 6205 | private MenuItem ragdollItem; |
---|
.. | .. |
---|
5112 | 6216 | private MenuItem blobItem; |
---|
5113 | 6217 | private MenuItem latheItem; |
---|
5114 | 6218 | private MenuItem bezierItem; |
---|
5115 | | - private MenuItem checkerItem; |
---|
| 6219 | + private MenuItem overlayItem; |
---|
5116 | 6220 | private MenuItem meshItem; |
---|
5117 | 6221 | // private MenuItem meshGroupItem; |
---|
5118 | 6222 | private MenuItem springItem; |
---|
.. | .. |
---|
5134 | 6238 | private MenuItem doubleItem; |
---|
5135 | 6239 | private MenuItem tripleItem; |
---|
5136 | 6240 | |
---|
5137 | | - private MenuItem importGFDItem; |
---|
5138 | | - private MenuItem importVRMLX3DItem; |
---|
5139 | | - private MenuItem import3DSItem; |
---|
5140 | | - private MenuItem importOBJItem; |
---|
5141 | | - |
---|
5142 | 6241 | private MenuItem computeAOItem; |
---|
5143 | 6242 | private MenuItem recompileItem; |
---|
5144 | 6243 | private MenuItem editScriptItem; |
---|
.. | .. |
---|
5148 | 6247 | private MenuItem analyzeItem; |
---|
5149 | 6248 | private MenuItem dumpItem; |
---|
5150 | 6249 | //boolean freezemodel = false; |
---|
| 6250 | + |
---|
| 6251 | + Menu cameraMenu; |
---|
| 6252 | + MenuItem editCameraItem; |
---|
| 6253 | + MenuItem restoreCameraItem; |
---|
5151 | 6254 | } |
---|