.. | .. |
---|
23 | 23 | DragGestureListener, DragSourceListener, DropTargetListener, |
---|
24 | 24 | ItemListener // ListSelectionListener |
---|
25 | 25 | { |
---|
| 26 | + |
---|
| 27 | + public void AddSkyboxButton(String f, String s, cGridBag row) |
---|
| 28 | + { |
---|
| 29 | + cButton skyboxButton; |
---|
| 30 | + final String path = "cubemaps/" + f + "-skyboxes/" + s; |
---|
| 31 | + row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.NIMBUSLAF)); |
---|
| 32 | + //row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF)); |
---|
| 33 | + skyboxButton.setToolTipText(s); |
---|
| 34 | + skyboxButton.addActionListener(new ActionListener() |
---|
| 35 | + { |
---|
| 36 | + @Override |
---|
| 37 | + public void actionPerformed(ActionEvent e) |
---|
| 38 | + { |
---|
| 39 | + ChangeSkybox(path); |
---|
| 40 | + } |
---|
| 41 | + }); |
---|
| 42 | + } |
---|
| 43 | + |
---|
| 44 | + public void AddSkyboxTab0(JTabbedPane skyboxpanel) |
---|
| 45 | + { |
---|
| 46 | + cGridBag tab0 = new cGridBag().setVertical(true); |
---|
| 47 | + |
---|
| 48 | + tab0.setName("Urban"); |
---|
| 49 | + skyboxpanel.add(tab0); |
---|
| 50 | + |
---|
| 51 | + cGridBag row0 = new cGridBag(); |
---|
| 52 | + cGridBag row1 = new cGridBag(); |
---|
| 53 | + cGridBag row2 = new cGridBag(); |
---|
| 54 | + cGridBag row3 = new cGridBag(); |
---|
| 55 | + cGridBag row4 = new cGridBag(); |
---|
| 56 | + cGridBag row5 = new cGridBag(); |
---|
| 57 | + cGridBag row6 = new cGridBag(); |
---|
| 58 | + |
---|
| 59 | + AddSkyboxButton("default", "rgb", row0); |
---|
| 60 | + //AddSkyboxButton("default", "cornell", row0); |
---|
| 61 | + AddSkyboxButton("penguins", "dust", row0); |
---|
| 62 | + AddSkyboxButton("penguins", "tropic", row0); |
---|
| 63 | + AddSkyboxButton("default", "skycube", row0); |
---|
| 64 | + |
---|
| 65 | + AddSkyboxButton("default", "uffizi", row1); |
---|
| 66 | + AddSkyboxButton("bridge", "Bridge", row1); |
---|
| 67 | + AddSkyboxButton("bridge", "Bridge2", row1); |
---|
| 68 | + AddSkyboxButton("urban", "GamlaStan2", row1); |
---|
| 69 | + |
---|
| 70 | + AddSkyboxButton("urban", "Parliament", row2); |
---|
| 71 | + AddSkyboxButton("urban", "Roundabout", row2); |
---|
| 72 | + AddSkyboxButton("urban", "SaintLazarusChurch", row2); |
---|
| 73 | + AddSkyboxButton("urban", "SaintLazarusChurch2", row2); |
---|
| 74 | + |
---|
| 75 | + AddSkyboxButton("urban", "SaintLazarusChurch3", row3); |
---|
| 76 | + AddSkyboxButton("urban", "UnionSquare", row3); |
---|
| 77 | + AddSkyboxButton("urban", "Medborgarplatsen", row3); |
---|
| 78 | + AddSkyboxButton("park", "BerzeliiPark", row3); |
---|
| 79 | + |
---|
| 80 | + AddSkyboxButton("park", "Buddha", row4); |
---|
| 81 | + AddSkyboxButton("park", "CNTower2", row4); |
---|
| 82 | + AddSkyboxButton("park", "NiagaraFalls1", row4); |
---|
| 83 | + AddSkyboxButton("park", "NiagaraFalls3", row4); |
---|
| 84 | + |
---|
| 85 | + AddSkyboxButton("park", "Park", row5); |
---|
| 86 | + AddSkyboxButton("park", "Pond", row5); |
---|
| 87 | + AddSkyboxButton("park", "Skansen", row5); |
---|
| 88 | + AddSkyboxButton("park", "Skansen2", row5); |
---|
| 89 | + |
---|
| 90 | + AddSkyboxButton("park", "Skansen3", row6); |
---|
| 91 | + AddSkyboxButton("park", "Skansen4", row6); |
---|
| 92 | + AddSkyboxButton("park", "Skansen5", row6); |
---|
| 93 | + AddSkyboxButton("park", "Stairs", row6); |
---|
| 94 | + |
---|
| 95 | + tab0.add(row0); |
---|
| 96 | + tab0.add(row1); |
---|
| 97 | + tab0.add(row2); |
---|
| 98 | + tab0.add(row3); |
---|
| 99 | + tab0.add(row4); |
---|
| 100 | + tab0.add(row5); |
---|
| 101 | + tab0.add(row6); |
---|
| 102 | + |
---|
| 103 | + for (int i=5; --i>=0;) |
---|
| 104 | + { |
---|
| 105 | + //oe.toolboxPanel.Return(); |
---|
| 106 | + //tab0.add(new cGridBag()); |
---|
| 107 | + } |
---|
| 108 | + } |
---|
| 109 | + |
---|
| 110 | + public void AddSkyboxTab1(JTabbedPane skyboxpanel) |
---|
| 111 | + { |
---|
| 112 | + cGridBag tab0 = new cGridBag().setVertical(true); |
---|
| 113 | + |
---|
| 114 | + tab0.setName("Nature"); |
---|
| 115 | + skyboxpanel.add(tab0); |
---|
| 116 | + |
---|
| 117 | + cGridBag row0 = new cGridBag(); |
---|
| 118 | + cGridBag row1 = new cGridBag(); |
---|
| 119 | + cGridBag row2 = new cGridBag(); |
---|
| 120 | + cGridBag row3 = new cGridBag(); |
---|
| 121 | + cGridBag row4 = new cGridBag(); |
---|
| 122 | + cGridBag row5 = new cGridBag(); |
---|
| 123 | + cGridBag row6 = new cGridBag(); |
---|
| 124 | + |
---|
| 125 | + AddSkyboxButton("beach", "HeartInTheSand", row0); |
---|
| 126 | + AddSkyboxButton("beach", "LarnacaBeach", row0); |
---|
| 127 | + AddSkyboxButton("beach", "PalmTrees", row0); |
---|
| 128 | + AddSkyboxButton("beach", "Tenerife", row0); |
---|
| 129 | + |
---|
| 130 | + AddSkyboxButton("beach", "Tenerife2", row1); |
---|
| 131 | + AddSkyboxButton("beach", "Tenerife3", row1); |
---|
| 132 | + AddSkyboxButton("field", "FishPond", row1); |
---|
| 133 | + AddSkyboxButton("field", "Footballfield", row1); |
---|
| 134 | + |
---|
| 135 | + AddSkyboxButton("field", "Meadow", row2); |
---|
| 136 | + AddSkyboxButton("field", "Sorsele", row2); |
---|
| 137 | + AddSkyboxButton("field", "Sorsele2", row2); |
---|
| 138 | + AddSkyboxButton("field", "Sorsele3", row2); |
---|
| 139 | + |
---|
| 140 | + AddSkyboxButton("forest", "Brudslojan", row3); |
---|
| 141 | + AddSkyboxButton("forest", "Langholmen2", row3); |
---|
| 142 | + AddSkyboxButton("forest", "Plants", row3); |
---|
| 143 | + AddSkyboxButton("mountain", "Maskonaive", row3); |
---|
| 144 | + |
---|
| 145 | + AddSkyboxButton("mountain", "Maskonaive2", row4); |
---|
| 146 | + AddSkyboxButton("mountain", "Maskonaive3", row4); |
---|
| 147 | + AddSkyboxButton("mountain", "Ryfjallet", row4); |
---|
| 148 | + AddSkyboxButton("mountain", "Teide", row4); |
---|
| 149 | + AddSkyboxButton("park", "Tantolunden4", row4); |
---|
| 150 | + |
---|
| 151 | + AddSkyboxButton("penguins", "wrath", row5); |
---|
| 152 | + AddSkyboxButton("penguins", "yonder", row5); |
---|
| 153 | + AddSkyboxButton("rocky", "Langholmen", row5); |
---|
| 154 | + AddSkyboxButton("rocky", "Skinnarviksberget", row5); |
---|
| 155 | + AddSkyboxButton("rocky", "Tantolunden6", row5); |
---|
| 156 | + |
---|
| 157 | + AddSkyboxButton("default", "CloudyHills", row6); |
---|
| 158 | + AddSkyboxButton("daz", "Autumn", row6); |
---|
| 159 | + AddSkyboxButton("daz", "Greenlands", row6); |
---|
| 160 | + AddSkyboxButton("daz", "MountainTrail", row6); |
---|
| 161 | + AddSkyboxButton("daz", "Oasis", row6); |
---|
| 162 | + /* |
---|
| 163 | +Autumn |
---|
| 164 | +Greenlands |
---|
| 165 | +MountainTrail |
---|
| 166 | +Oasis |
---|
| 167 | +TheRock |
---|
| 168 | +TopOfTheWorld |
---|
| 169 | +Winter |
---|
| 170 | + */ |
---|
| 171 | + |
---|
| 172 | + tab0.add(row0); |
---|
| 173 | + tab0.add(row1); |
---|
| 174 | + tab0.add(row2); |
---|
| 175 | + tab0.add(row3); |
---|
| 176 | + tab0.add(row4); |
---|
| 177 | + tab0.add(row5); |
---|
| 178 | + tab0.add(row6); |
---|
| 179 | + |
---|
| 180 | + for (int i=5; --i>=0;) |
---|
| 181 | + { |
---|
| 182 | + //oe.toolboxPanel.Return(); |
---|
| 183 | + //tab0.add(new cGridBag()); |
---|
| 184 | + } |
---|
| 185 | + } |
---|
| 186 | + |
---|
| 187 | + public void AddSkyboxTab2(JTabbedPane skyboxpanel) |
---|
| 188 | + { |
---|
| 189 | + cGridBag tab0 = new cGridBag().setVertical(true); |
---|
| 190 | + |
---|
| 191 | + tab0.setName("Night"); |
---|
| 192 | + skyboxpanel.add(tab0); |
---|
| 193 | + |
---|
| 194 | + cGridBag row0 = new cGridBag(); |
---|
| 195 | + cGridBag row1 = new cGridBag(); |
---|
| 196 | + cGridBag row2 = new cGridBag(); |
---|
| 197 | + cGridBag row3 = new cGridBag(); |
---|
| 198 | + cGridBag row4 = new cGridBag(); |
---|
| 199 | + cGridBag row5 = new cGridBag(); |
---|
| 200 | + cGridBag row6 = new cGridBag(); |
---|
| 201 | + |
---|
| 202 | + AddSkyboxButton("night", "NightPath", row0); |
---|
| 203 | + AddSkyboxButton("night", "PondNight", row0); |
---|
| 204 | + AddSkyboxButton("night", "Powerlines", row0); |
---|
| 205 | + AddSkyboxButton("night", "SwedishRoyalCastle", row0); |
---|
| 206 | + |
---|
| 207 | + AddSkyboxButton("urban", "CNTower", row1); |
---|
| 208 | + AddSkyboxButton("bridge", "ArstaBridge", row1); |
---|
| 209 | + AddSkyboxButton("rocky", "Riddarfjarden", row1); |
---|
| 210 | + AddSkyboxButton("penguins", "sleepyhollow", row1); |
---|
| 211 | + |
---|
| 212 | + AddSkyboxButton("penguins", "kenon_star", row2); |
---|
| 213 | + AddSkyboxButton("indoors", "DallasW", row2); |
---|
| 214 | + AddSkyboxButton("indoors", "MarriottMadisonWest", row2); |
---|
| 215 | + AddSkyboxButton("indoors", "Vasa", row2); |
---|
| 216 | + |
---|
| 217 | + AddSkyboxButton("winter", "Backyard", row3); |
---|
| 218 | + AddSkyboxButton("winter", "Creek", row3); |
---|
| 219 | + AddSkyboxButton("winter", "FootballField3", row3); |
---|
| 220 | + AddSkyboxButton("winter", "Forest", row3); |
---|
| 221 | + |
---|
| 222 | + AddSkyboxButton("winter", "HornstullsStrand2", row4); |
---|
| 223 | + AddSkyboxButton("winter", "House", row4); |
---|
| 224 | + AddSkyboxButton("winter", "IceLake", row4); |
---|
| 225 | + AddSkyboxButton("winter", "IceRiver", row4); |
---|
| 226 | + |
---|
| 227 | + AddSkyboxButton("winter", "Park3", row5); |
---|
| 228 | + AddSkyboxButton("winter", "PondWinter", row5); |
---|
| 229 | + AddSkyboxButton("winter", "Tantolunden5", row5); |
---|
| 230 | + AddSkyboxButton("winter", "Vindelalven", row5); |
---|
| 231 | + |
---|
| 232 | + AddSkyboxButton("daz", "TheRock", row6); |
---|
| 233 | + AddSkyboxButton("daz", "TopOfTheWorld", row6); |
---|
| 234 | + AddSkyboxButton("daz", "Winter", row6); |
---|
| 235 | + AddSkyboxButton("penguins", "desertdawn", row6); |
---|
| 236 | + |
---|
| 237 | + tab0.add(row0); |
---|
| 238 | + tab0.add(row1); |
---|
| 239 | + tab0.add(row2); |
---|
| 240 | + tab0.add(row3); |
---|
| 241 | + tab0.add(row4); |
---|
| 242 | + tab0.add(row5); |
---|
| 243 | + tab0.add(row6); |
---|
| 244 | + |
---|
| 245 | + for (int i=5; --i>=0;) |
---|
| 246 | + { |
---|
| 247 | + //oe.toolboxPanel.Return(); |
---|
| 248 | + //tab0.add(new cGridBag()); |
---|
| 249 | + } |
---|
| 250 | + } |
---|
| 251 | + |
---|
| 252 | + public void ChangeSkybox(String name) |
---|
| 253 | + { |
---|
| 254 | + cameraView.envyoff = false; |
---|
| 255 | + cameraView.skyboxname = name; |
---|
| 256 | + cameraView.skyboxext = "jpg"; |
---|
| 257 | + cameraView.repaint(); |
---|
| 258 | + } |
---|
| 259 | + |
---|
26 | 260 | //ObjEditor objEditor; |
---|
27 | 261 | public void closeUI2() |
---|
28 | 262 | { |
---|
.. | .. |
---|
60 | 294 | this.copy = this.group = group; |
---|
61 | 295 | //selectees = this.group.selectees; |
---|
62 | 296 | |
---|
| 297 | + if (copy.versions == null) |
---|
| 298 | + { |
---|
| 299 | + copy.versions = new byte[100][]; |
---|
| 300 | + copy.versionindex = -1; |
---|
| 301 | + } |
---|
| 302 | + |
---|
63 | 303 | if(ui) |
---|
64 | 304 | SetupUI(objEditor); |
---|
65 | 305 | } |
---|
.. | .. |
---|
80 | 320 | SetupViews(objEditor); |
---|
81 | 321 | |
---|
82 | 322 | ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true); |
---|
| 323 | + |
---|
| 324 | + if (copy.versions == null) |
---|
| 325 | + { |
---|
| 326 | + copy.versions = new byte[100][]; |
---|
| 327 | + copy.versionindex = -1; |
---|
| 328 | + |
---|
| 329 | + Save(true); |
---|
| 330 | + } |
---|
83 | 331 | } |
---|
84 | 332 | |
---|
85 | 333 | void CloneSelection(boolean supports) |
---|
86 | 334 | { |
---|
| 335 | + if (Globals.REPLACEONMAKE) |
---|
| 336 | + Save(); |
---|
| 337 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 338 | + Globals.REPLACEONMAKE = false; |
---|
87 | 339 | // Object3D keep = GrafreeD.clipboard; |
---|
88 | 340 | //Object3D obj; |
---|
89 | 341 | for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
94 | 346 | |
---|
95 | 347 | makeSomething(clone, i==group.selection.size()-1); |
---|
96 | 348 | } |
---|
| 349 | + Globals.REPLACEONMAKE = keep; |
---|
97 | 350 | } |
---|
98 | 351 | |
---|
99 | 352 | void CloneClipboard(boolean supports) |
---|
.. | .. |
---|
189 | 442 | // pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
190 | 443 | // pasteExpandItem.addActionListener(this); |
---|
191 | 444 | menu.add("-"); |
---|
192 | | - clearItem = menu.add(new MenuItem("Clear")); |
---|
193 | | - clearItem.addActionListener(this); |
---|
| 445 | + deleteItem = menu.add(new MenuItem("Delete")); |
---|
| 446 | + deleteItem.addActionListener(this); |
---|
194 | 447 | |
---|
195 | 448 | if (Globals.ADVANCED) |
---|
196 | 449 | { |
---|
.. | .. |
---|
204 | 457 | //zBufferItem.addActionListener(this); |
---|
205 | 458 | //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
206 | 459 | //normalLensItem.addActionListener(this); |
---|
207 | | - cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint")); |
---|
208 | | - revertCameraItem.addActionListener(this); |
---|
| 460 | + cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint")); |
---|
| 461 | + restoreCameraItem.addActionListener(this); |
---|
209 | 462 | |
---|
210 | | - cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
211 | | - toggleFullScreenItem.addItemListener(this); |
---|
212 | | - toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
213 | | - cameraMenu.add("-"); |
---|
| 463 | +// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
| 464 | +// toggleFullScreenItem.addItemListener(this); |
---|
| 465 | +// toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
| 466 | +// cameraMenu.add("-"); |
---|
| 467 | +// |
---|
| 468 | +// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
| 469 | +// toggleTextureItem.addItemListener(this); |
---|
| 470 | +// toggleTextureItem.setState(CameraPane.textureon); |
---|
| 471 | +// |
---|
| 472 | +// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
| 473 | +// toggleSwitchItem.addItemListener(this); |
---|
| 474 | +// toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
214 | 475 | |
---|
215 | | - cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
216 | | - toggleTextureItem.addItemListener(this); |
---|
217 | | - toggleTextureItem.setState(CameraPane.textureon); |
---|
218 | | - |
---|
219 | | - cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
220 | | - toggleSwitchItem.addItemListener(this); |
---|
221 | | - toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
222 | | - |
---|
223 | | - cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
| 476 | + cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles")); |
---|
224 | 477 | toggleHandleItem.addItemListener(this); |
---|
225 | 478 | toggleHandleItem.setState(CameraPane.HANDLES); |
---|
226 | 479 | |
---|
.. | .. |
---|
275 | 528 | { |
---|
276 | 529 | oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
277 | 530 | //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
278 | | - //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
| 531 | + //cameraMenu.add(switchViewItem = new MenuItem("Reverse View")); |
---|
279 | 532 | editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
280 | 533 | oe.cameraMenu.add("-"); |
---|
281 | 534 | openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
.. | .. |
---|
283 | 536 | editLeafItem.addActionListener(this); |
---|
284 | 537 | lookAtItem.addActionListener(this); |
---|
285 | 538 | //lookFromItem.addActinoListener(this); |
---|
286 | | - //switchItem.addActionListener(this); |
---|
| 539 | + //switchViewItem.addActionListener(this); |
---|
287 | 540 | } |
---|
288 | 541 | |
---|
289 | 542 | oe.menuBar.add(menu = new Menu("Setting")); |
---|
.. | .. |
---|
328 | 581 | } |
---|
329 | 582 | |
---|
330 | 583 | oe.menuBar.add(menu = new Menu("Group")); |
---|
331 | | - grabItem = menu.add(new MenuItem("Grab")); |
---|
332 | | - grabItem.addActionListener(this); |
---|
| 584 | +// grabItem = menu.add(new MenuItem("Grab")); |
---|
| 585 | +// grabItem.addActionListener(this); |
---|
333 | 586 | backItem = menu.add(new MenuItem("Back")); |
---|
334 | 587 | backItem.addActionListener(this); |
---|
335 | 588 | frontItem = menu.add(new MenuItem("Front")); |
---|
336 | 589 | frontItem.addActionListener(this); |
---|
337 | | - compositeItem = menu.add(new MenuItem("Composite")); |
---|
338 | | - compositeItem.addActionListener(this); |
---|
| 590 | +// compositeItem = menu.add(new MenuItem("Composite")); |
---|
| 591 | +// compositeItem.addActionListener(this); |
---|
339 | 592 | |
---|
340 | 593 | if (Globals.ADVANCED) |
---|
341 | 594 | { |
---|
.. | .. |
---|
345 | 598 | ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
346 | 599 | ungroupItem.addActionListener(this); |
---|
347 | 600 | |
---|
348 | | - menu.add("-"); |
---|
349 | | - |
---|
350 | | - randomItem = menu.add(new MenuItem("Switch node")); |
---|
351 | | - randomItem.addActionListener(this); |
---|
| 601 | +// menu.add("-"); |
---|
| 602 | +// |
---|
| 603 | +// switchItem = menu.add(new MenuItem("Switch node")); |
---|
| 604 | +// switchItem.addActionListener(this); |
---|
352 | 605 | if (Globals.ADVANCED) |
---|
353 | 606 | { |
---|
354 | 607 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
.. | .. |
---|
365 | 618 | frameselectorItem.addActionListener(this); |
---|
366 | 619 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
367 | 620 | scriptNodeItem.addActionListener(this); |
---|
368 | | - cameraItem = menu.add(new MenuItem("Camera")); |
---|
369 | | - cameraItem.addActionListener(this); |
---|
370 | 621 | } |
---|
371 | 622 | |
---|
372 | 623 | oe.menuBar.add(menu = new Menu("Object")); |
---|
373 | | - textureItem = menu.add(new MenuItem("Texture")); |
---|
374 | | - textureItem.addActionListener(this); |
---|
| 624 | +// textureItem = menu.add(new MenuItem("Texture")); |
---|
| 625 | +// textureItem.addActionListener(this); |
---|
375 | 626 | billboardItem = menu.add(new MenuItem("Billboard")); |
---|
376 | 627 | billboardItem.addActionListener(this); |
---|
377 | 628 | csgItem = menu.add(new MenuItem("CSG")); |
---|
.. | .. |
---|
382 | 633 | shadowYItem.addActionListener(this); |
---|
383 | 634 | shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
384 | 635 | shadowZItem.addActionListener(this); |
---|
| 636 | + attributeItem = menu.add(new MenuItem("Attribute")); |
---|
| 637 | + attributeItem.addActionListener(this); |
---|
| 638 | + |
---|
385 | 639 | if (Globals.ADVANCED) |
---|
386 | 640 | { |
---|
387 | 641 | menu.add("-"); |
---|
388 | 642 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
389 | 643 | linkerItem.addActionListener(this); |
---|
390 | | - attributeItem = menu.add(new MenuItem("Attribute")); |
---|
391 | | - attributeItem.addActionListener(this); |
---|
392 | 644 | templateItem = menu.add(new MenuItem("Template")); |
---|
393 | 645 | templateItem.addActionListener(this); |
---|
394 | 646 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
.. | .. |
---|
417 | 669 | genNormalsMESHItem.addActionListener(this); |
---|
418 | 670 | if (Globals.ADVANCED) |
---|
419 | 671 | { |
---|
420 | | - genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
| 672 | + genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals")); |
---|
421 | 673 | genNormalsMINEItem.addActionListener(this); |
---|
422 | 674 | } |
---|
423 | 675 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
.. | .. |
---|
510 | 762 | attachBumpItem.addActionListener(this); |
---|
511 | 763 | pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump")); |
---|
512 | 764 | pigmentBumpItem.addActionListener(this); |
---|
| 765 | + //embedTexturesItem |
---|
513 | 766 | detachPigmentItem = menu.add(new MenuItem("Detach Pigment")); |
---|
514 | 767 | detachPigmentItem.addActionListener(this); |
---|
515 | 768 | detachBumpItem = menu.add(new MenuItem("Detach Bump")); |
---|
516 | 769 | detachBumpItem.addActionListener(this); |
---|
| 770 | + embedTexturesItem = menu.add(new MenuItem("Embed Textures")); |
---|
| 771 | + embedTexturesItem.addActionListener(this); |
---|
| 772 | + deEmbedTexturesItem = menu.add(new MenuItem("De-embed Textures")); |
---|
| 773 | + deEmbedTexturesItem.addActionListener(this); |
---|
517 | 774 | menu.add("-"); |
---|
518 | 775 | sortbysizeItem = menu.add(new MenuItem("Sort by size")); |
---|
519 | 776 | sortbysizeItem.addActionListener(this); |
---|
.. | .. |
---|
540 | 797 | buildToolsMenu(menu); |
---|
541 | 798 | } |
---|
542 | 799 | |
---|
| 800 | + |
---|
543 | 801 | void SetupUI2(ObjEditor oe) |
---|
544 | 802 | { |
---|
545 | 803 | // June 2019 |
---|
.. | .. |
---|
582 | 840 | oe.radioPanel.add(dummyButton); |
---|
583 | 841 | oe.buttonGroup.add(dummyButton); |
---|
584 | 842 | */ |
---|
| 843 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 844 | + |
---|
| 845 | + copyOptionsPanel.preferredHeight = 2; |
---|
| 846 | + |
---|
585 | 847 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
586 | 848 | |
---|
587 | 849 | //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
588 | 850 | //minButton.setToolTipText("Minimize window"); |
---|
589 | 851 | //minButton.addActionListener(this); |
---|
590 | 852 | |
---|
591 | | - oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
592 | | - maxButton.setToolTipText("Maximize window"); |
---|
593 | | - maxButton.addActionListener(this); |
---|
| 853 | + if (Globals.ADVANCED) |
---|
| 854 | + { |
---|
| 855 | + oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 856 | + maxButton.setToolTipText("Maximize window"); |
---|
| 857 | + maxButton.addActionListener(this); |
---|
| 858 | + } |
---|
594 | 859 | |
---|
595 | 860 | oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
596 | 861 | fullButton.setToolTipText("Full-screen window"); |
---|
597 | 862 | fullButton.addActionListener(this); |
---|
598 | 863 | |
---|
599 | | - oe.toolboxPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
600 | | - undoButton.setToolTipText("Undo changes"); |
---|
601 | | - undoButton.addActionListener(this); |
---|
| 864 | + oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 865 | + screenfitButton.setToolTipText("Screen fit"); |
---|
| 866 | + screenfitButton.addActionListener(this); |
---|
| 867 | + |
---|
| 868 | + oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 869 | + restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
| 870 | + restoreCameraButton.addActionListener(this); |
---|
602 | 871 | |
---|
603 | | - oe.toolboxPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
604 | | - redoButton.setToolTipText("Redo changes"); |
---|
605 | | - redoButton.addActionListener(this); |
---|
606 | | - |
---|
607 | | - oe.toolboxPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
608 | | - saveButton.setToolTipText("Save changes"); |
---|
| 872 | + copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 873 | + saveButton.setToolTipText("New version"); |
---|
609 | 874 | saveButton.addActionListener(this); |
---|
| 875 | + |
---|
| 876 | + copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 877 | + undoButton.setToolTipText("Previous version"); |
---|
| 878 | + undoButton.addActionListener(this); |
---|
| 879 | + undoButton.setEnabled(false); |
---|
610 | 880 | |
---|
611 | | - oe.toolboxPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 881 | + cGridBag updown = new cGridBag().setVertical(true); |
---|
| 882 | + updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 883 | + restoreButton.setToolTipText("Restore current"); |
---|
| 884 | + restoreButton.addActionListener(this); |
---|
| 885 | + restoreButton.setEnabled(false); |
---|
| 886 | + |
---|
| 887 | + updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 888 | + replaceButton.setToolTipText("Replace current"); |
---|
| 889 | + replaceButton.addActionListener(this); |
---|
| 890 | + replaceButton.setEnabled(false); |
---|
| 891 | + |
---|
| 892 | + copyOptionsPanel.add(updown); |
---|
| 893 | + |
---|
| 894 | + copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 895 | + redoButton.setToolTipText("Next version"); |
---|
| 896 | + redoButton.addActionListener(this); |
---|
| 897 | + redoButton.setEnabled(false); |
---|
| 898 | + |
---|
| 899 | + oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
612 | 900 | liveCB.setToolTipText("Enable animation"); |
---|
613 | 901 | liveCB.addItemListener(this); |
---|
614 | 902 | |
---|
615 | | - oe.toolboxPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 903 | + oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
616 | 904 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
617 | 905 | oneStepButton.addActionListener(this); |
---|
618 | 906 | |
---|
619 | | - oe.toolboxPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
| 907 | + oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
620 | 908 | fastCB.setToolTipText("Fast mode"); |
---|
621 | 909 | fastCB.addItemListener(this); |
---|
622 | 910 | |
---|
623 | | - oe.toolboxPanel.Return(); |
---|
| 911 | + //oe.toolboxPanel.Return(); |
---|
624 | 912 | |
---|
625 | | - oe.toolboxPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
626 | | - trackCB.setToolTipText("Enable tracking"); |
---|
627 | | - trackCB.addItemListener(this); |
---|
628 | | - |
---|
629 | | - oe.toolboxPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
630 | | - screenfitButton.setToolTipText("Screen fit"); |
---|
631 | | - screenfitButton.addActionListener(this); |
---|
| 913 | +// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 914 | +// trackCB.setToolTipText("Enable tracking"); |
---|
| 915 | +// trackCB.addItemListener(this); |
---|
632 | 916 | |
---|
633 | 917 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
634 | 918 | // screenfitpointButton.addActionListener(this); |
---|
.. | .. |
---|
638 | 922 | oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
639 | 923 | snapobjectButton.addActionListener(this); |
---|
640 | 924 | snapobjectButton.setToolTipText("Snap Object"); |
---|
| 925 | + |
---|
| 926 | + oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 927 | + fourButton.addActionListener(this); |
---|
| 928 | + fourButton.setToolTipText("Show control panel only"); |
---|
641 | 929 | } |
---|
642 | 930 | |
---|
643 | | - oe.toolboxPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
644 | | - flashSelectionButton.setToolTipText("Highlight selection"); |
---|
645 | | - flashSelectionButton.addActionListener(this); |
---|
646 | | - |
---|
647 | 931 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
648 | 932 | |
---|
649 | | - oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
650 | | - twoButton.setToolTipText("Show center view only"); |
---|
| 933 | + oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 934 | + twoButton.setToolTipText("Show 3D view only"); |
---|
651 | 935 | twoButton.addActionListener(this); |
---|
652 | 936 | this.fullscreenLayout = twoButton; |
---|
653 | 937 | |
---|
654 | | - oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
655 | | - fourButton.addActionListener(this); |
---|
656 | | - fourButton.setToolTipText("Show left panel only"); |
---|
657 | | - oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
658 | | - sixButton.setToolTipText("2-column layout left"); |
---|
659 | | - sixButton.addActionListener(this); |
---|
660 | | - oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
661 | | - threeButton.setToolTipText("2-column layout right"); |
---|
| 938 | + oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 939 | + threeButton.setToolTipText("Show controls and 3D view"); |
---|
662 | 940 | threeButton.addActionListener(this); |
---|
663 | | - oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
664 | | - sevenButton.setToolTipText("3-column layout"); |
---|
665 | | - sevenButton.addActionListener(this); |
---|
| 941 | + oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 942 | + sixButton.setToolTipText("Show 3D view and controls"); |
---|
| 943 | + sixButton.addActionListener(this); |
---|
| 944 | +// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 945 | +// sevenButton.setToolTipText("3-column layout"); |
---|
| 946 | +// sevenButton.addActionListener(this); |
---|
666 | 947 | // |
---|
667 | 948 | |
---|
668 | | - oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
669 | | - rootButton.setToolTipText("Edit selection in new tab"); |
---|
| 949 | + oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 950 | + rootButton.setToolTipText("Open selection in new tab"); |
---|
670 | 951 | rootButton.addActionListener(this); |
---|
671 | 952 | |
---|
672 | 953 | oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
675 | 956 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
676 | 957 | //clearButton.addActionListener(this); |
---|
677 | 958 | |
---|
| 959 | + cGridBag row1 = new cGridBag(); |
---|
| 960 | + |
---|
678 | 961 | // INSERT |
---|
679 | | - oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 962 | + row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
680 | 963 | gridButton.setToolTipText("Create grid"); |
---|
681 | 964 | gridButton.addActionListener(this); |
---|
682 | 965 | |
---|
683 | | - oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 966 | + row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
684 | 967 | boxButton.setToolTipText("Create box"); |
---|
685 | 968 | boxButton.addActionListener(this); |
---|
686 | 969 | |
---|
687 | | - oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 970 | + row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
688 | 971 | sphereButton.setToolTipText("Create sphere"); |
---|
689 | 972 | sphereButton.addActionListener(this); |
---|
690 | 973 | |
---|
691 | | - oe.toolboxPanel.Return(); |
---|
692 | | - |
---|
693 | | - oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 974 | + row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
694 | 975 | coneButton.setToolTipText("Create cone"); |
---|
695 | 976 | coneButton.addActionListener(this); |
---|
696 | 977 | |
---|
697 | | - oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 978 | + row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
698 | 979 | torusButton.setToolTipText("Create torus"); |
---|
699 | 980 | torusButton.addActionListener(this); |
---|
700 | 981 | |
---|
701 | | - oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 982 | + row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
702 | 983 | superButton.setToolTipText("Create superellipsoid"); |
---|
703 | 984 | superButton.addActionListener(this); |
---|
704 | 985 | |
---|
.. | .. |
---|
709 | 990 | kleinButton.addActionListener(this); |
---|
710 | 991 | } |
---|
711 | 992 | |
---|
712 | | - oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 993 | + row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
713 | 994 | particlesButton.setToolTipText("Create particle system"); |
---|
714 | 995 | particlesButton.addActionListener(this); |
---|
715 | 996 | |
---|
716 | | - oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 997 | + oe.toolboxPanel.add(row1); |
---|
| 998 | + |
---|
| 999 | + cGridBag row2 = new cGridBag(); |
---|
| 1000 | + |
---|
| 1001 | + row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1002 | + groupButton.setToolTipText("Create group"); |
---|
| 1003 | + groupButton.addActionListener(this); |
---|
| 1004 | + |
---|
| 1005 | + row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1006 | + compositeButton.setToolTipText("Create composite"); |
---|
| 1007 | + compositeButton.addActionListener(this); |
---|
| 1008 | + |
---|
| 1009 | + row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1010 | + switchButton.setToolTipText("Create item switcher"); |
---|
| 1011 | + switchButton.addActionListener(this); |
---|
| 1012 | + |
---|
| 1013 | + row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1014 | + loopButton.setToolTipText("Create loop"); |
---|
| 1015 | + loopButton.addActionListener(this); |
---|
| 1016 | + |
---|
| 1017 | + row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1018 | + textureButton.setToolTipText("Create texture"); |
---|
| 1019 | + textureButton.addActionListener(this); |
---|
| 1020 | + |
---|
| 1021 | + row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
717 | 1022 | overlayButton.setToolTipText("Create overlay"); |
---|
718 | 1023 | overlayButton.addActionListener(this); |
---|
719 | 1024 | |
---|
720 | | - oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1025 | + row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
721 | 1026 | lightButton.setToolTipText("Create light"); |
---|
722 | 1027 | lightButton.addActionListener(this); |
---|
723 | 1028 | |
---|
| 1029 | + oe.toolboxPanel.add(row2); |
---|
| 1030 | + |
---|
| 1031 | + // ENVYMAPS |
---|
| 1032 | + cGridBag skyboxpane = new cGridBag(); |
---|
| 1033 | + skyboxpane.preferredHeight = 100; |
---|
| 1034 | + |
---|
| 1035 | + oe.toolboxPanel.add(skyboxpane); |
---|
| 1036 | + |
---|
| 1037 | + JTabbedPane skyboxpanel = new JTabbedPane(); |
---|
| 1038 | + skyboxpane.add(skyboxpanel); |
---|
| 1039 | + |
---|
| 1040 | + AddSkyboxTab0(skyboxpanel); |
---|
| 1041 | + AddSkyboxTab1(skyboxpanel); |
---|
| 1042 | + AddSkyboxTab2(skyboxpanel); |
---|
| 1043 | + |
---|
724 | 1044 | // EDIT panel |
---|
725 | | - editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
726 | | - editButton.setToolTipText("Edit selection"); |
---|
| 1045 | + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1046 | + editButton.setToolTipText("Pin selection controls"); |
---|
727 | 1047 | editButton.addActionListener(this); |
---|
728 | 1048 | |
---|
729 | | - editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
730 | | - uneditButton.setToolTipText("Unedit selection"); |
---|
| 1049 | + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1050 | + uneditButton.setToolTipText("Remove selection controls"); |
---|
731 | 1051 | uneditButton.addActionListener(this); |
---|
732 | 1052 | |
---|
733 | 1053 | editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
734 | | - allParamsButton.setToolTipText("Edit all params"); |
---|
| 1054 | + allParamsButton.setToolTipText("Show all controle"); |
---|
735 | 1055 | allParamsButton.addActionListener(this); |
---|
736 | 1056 | |
---|
737 | 1057 | editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
742 | 1062 | unselectButton.setToolTipText("Unselect"); |
---|
743 | 1063 | unselectButton.addActionListener(this); |
---|
744 | 1064 | |
---|
| 1065 | + editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1066 | + flashSelectionButton.setToolTipText("Highlight selection"); |
---|
| 1067 | + flashSelectionButton.addActionListener(this); |
---|
| 1068 | + |
---|
745 | 1069 | editCommandsPanel.preferredHeight = 1; |
---|
746 | 1070 | |
---|
| 1071 | + SetPinStates(false); |
---|
747 | 1072 | // oe.treePanel.add(commandsPanel); |
---|
748 | 1073 | // oe.treePanel.Return(); |
---|
749 | 1074 | |
---|
.. | .. |
---|
768 | 1093 | oe.treePanel.add(jSPPanel); |
---|
769 | 1094 | oe.treePanel.Return(); |
---|
770 | 1095 | |
---|
771 | | - cGridBag copyOptionsPanel = new cGridBag(); |
---|
772 | | - |
---|
773 | | - copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
774 | | - colorCB.setToolTipText("Copy color when dropped"); |
---|
775 | | - colorCB.addItemListener(this); |
---|
776 | | - |
---|
777 | | - copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
778 | | - materialCB.setToolTipText("Copy material when dropped"); |
---|
779 | | - materialCB.addItemListener(this); |
---|
780 | | - |
---|
781 | | - copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
782 | | - textureCB.setToolTipText("Copy texture when dropped"); |
---|
783 | | - textureCB.addItemListener(this); |
---|
784 | | - |
---|
785 | | - copyOptionsPanel.preferredHeight = 1; |
---|
786 | 1096 | oe.treePanel.add(copyOptionsPanel); |
---|
787 | 1097 | oe.treePanel.Return(); |
---|
| 1098 | + cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); |
---|
| 1099 | + versionSlider = (cNumberSlider)sliderPane.getComponent(1); |
---|
| 1100 | + sliderPane.preferredHeight = 1; |
---|
788 | 1101 | |
---|
789 | | -// mainPanel.setDividerLocation(0.5); //1.0); |
---|
790 | | -// mainPanel.setResizeWeight(0.5); |
---|
| 1102 | +// mainPanel.setDividerLocation(0.1); //1.0); |
---|
| 1103 | + mainPanel.setResizeWeight(0.4); |
---|
791 | 1104 | |
---|
792 | 1105 | //jList.addListSelectionListener(this); |
---|
793 | 1106 | oe.jTree.addTreeSelectionListener(this); |
---|
.. | .. |
---|
795 | 1108 | //jTree.setEditable(true); |
---|
796 | 1109 | oe.jTree.setDragEnabled(true); |
---|
797 | 1110 | //jTree.setPreferredSize(new Dimension(10,10)); |
---|
798 | | - jSP.setPreferredSize(new Dimension(100,200)); |
---|
| 1111 | + //jSP.setPreferredSize(new Dimension(100,200)); |
---|
799 | 1112 | |
---|
800 | 1113 | oe.jTree.setCellRenderer(new cTreeModel.Renderer()); |
---|
801 | 1114 | |
---|
.. | .. |
---|
807 | 1120 | dgr.addDragGestureListener(this); |
---|
808 | 1121 | }catch(Exception e) {} |
---|
809 | 1122 | */ |
---|
810 | | - radio.layout = sevenButton; |
---|
| 1123 | + radio.layout = sixButton; // sevenButton; |
---|
811 | 1124 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
812 | 1125 | } |
---|
813 | 1126 | |
---|
814 | 1127 | void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
815 | 1128 | { |
---|
| 1129 | + panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 1130 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
| 1131 | + colorCB.addItemListener(this); |
---|
| 1132 | + |
---|
| 1133 | + panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 1134 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
| 1135 | + materialCB.addItemListener(this); |
---|
| 1136 | + |
---|
| 1137 | + panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 1138 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
| 1139 | + textureCB.addItemListener(this); |
---|
| 1140 | + |
---|
| 1141 | + panel.Return(); |
---|
| 1142 | + |
---|
816 | 1143 | panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
817 | 1144 | boxCB.setToolTipText("Display bounding boxes"); |
---|
818 | 1145 | boxCB.addItemListener(this); |
---|
819 | 1146 | |
---|
820 | 1147 | panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
821 | | - zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 1148 | + zoomBoxCB.setToolTipText("Display only for wheel"); |
---|
822 | 1149 | zoomBoxCB.addItemListener(this); |
---|
823 | 1150 | |
---|
824 | 1151 | if (true) // Globals.ADVANCED) |
---|
825 | 1152 | { |
---|
826 | | - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
827 | | - supportCB.setToolTipText("Enable rigging"); |
---|
828 | | - supportCB.addItemListener(this); |
---|
| 1153 | +// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 1154 | +// supportCB.setToolTipText("Enable rigging"); |
---|
| 1155 | +// supportCB.addItemListener(this); |
---|
| 1156 | + |
---|
| 1157 | + panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints); |
---|
| 1158 | + freezeCB.setToolTipText("Fast moving camera"); |
---|
| 1159 | + freezeCB.addItemListener(this); |
---|
829 | 1160 | |
---|
830 | 1161 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
831 | 1162 | // localCB.addItemListener(this); |
---|
832 | 1163 | |
---|
| 1164 | + panel.Return(); |
---|
| 1165 | + |
---|
833 | 1166 | panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
834 | 1167 | crowdCB.setToolTipText("Used for crowds"); |
---|
835 | 1168 | crowdCB.addItemListener(this); |
---|
.. | .. |
---|
846 | 1179 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
847 | 1180 | // speakerMocapCB.addItemListener(this); |
---|
848 | 1181 | |
---|
| 1182 | + panel.Return(); |
---|
| 1183 | + |
---|
849 | 1184 | if (false) |
---|
850 | 1185 | { |
---|
851 | 1186 | // handled in scripts |
---|
.. | .. |
---|
860 | 1195 | //constraints.gridy += 1; |
---|
861 | 1196 | panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
862 | 1197 | smoothfocusCB.addItemListener(this); |
---|
| 1198 | + panel.Return(); |
---|
863 | 1199 | } |
---|
864 | 1200 | |
---|
865 | 1201 | //constraints.gridx += 1; |
---|
866 | 1202 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
867 | 1203 | // debugCB.addItemListener(this); |
---|
868 | 1204 | |
---|
| 1205 | + panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 1206 | + trackCB.setToolTipText("Enable tracking target"); |
---|
| 1207 | + trackCB.addItemListener(this); |
---|
| 1208 | + |
---|
869 | 1209 | panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
870 | | - oeilCB.setToolTipText("Move camera when tracking target"); |
---|
| 1210 | + oeilCB.setToolTipText("Move camera when tracking"); |
---|
871 | 1211 | oeilCB.addItemListener(this); |
---|
872 | 1212 | |
---|
873 | 1213 | panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
874 | | - shadowCB.setToolTipText("Compute shadows when live"); |
---|
| 1214 | + shadowCB.setToolTipText("When live compute shadows"); |
---|
875 | 1215 | shadowCB.addItemListener(this); |
---|
876 | 1216 | |
---|
877 | | - panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); |
---|
878 | | - autosaveCB.setToolTipText("Auto-save on structure change"); |
---|
879 | | - autosaveCB.addItemListener(this); |
---|
| 1217 | + panel.Return(); |
---|
| 1218 | + panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints); |
---|
| 1219 | + toggleTextureCB.setToolTipText("Load textures"); |
---|
| 1220 | + toggleTextureCB.addItemListener(this); |
---|
| 1221 | + |
---|
| 1222 | + panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints); |
---|
| 1223 | + toggleSwitchCB.setToolTipText("Choose a single item"); |
---|
| 1224 | + toggleSwitchCB.addItemListener(this); |
---|
| 1225 | + |
---|
| 1226 | + panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints); |
---|
| 1227 | + autokeepCB.setToolTipText("On structure change"); |
---|
| 1228 | + autokeepCB.addItemListener(this); |
---|
880 | 1229 | |
---|
| 1230 | + panel.Return(); |
---|
881 | 1231 | if (Globals.ADVANCED) |
---|
882 | 1232 | { |
---|
883 | 1233 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
.. | .. |
---|
888 | 1238 | } |
---|
889 | 1239 | |
---|
890 | 1240 | cGridBag fill = new cGridBag(); |
---|
891 | | - |
---|
892 | 1241 | fill.preferredHeight = 200; |
---|
| 1242 | + cGridBag fill2 = new cGridBag(); |
---|
| 1243 | + fill2.preferredHeight = 200; |
---|
| 1244 | + cGridBag fill3 = new cGridBag(); |
---|
| 1245 | + fill3.preferredHeight = 200; |
---|
893 | 1246 | |
---|
894 | 1247 | panel.add(fill); |
---|
| 1248 | + panel.add(fill2); |
---|
| 1249 | + panel.add(fill3); |
---|
895 | 1250 | |
---|
896 | 1251 | } |
---|
897 | 1252 | |
---|
.. | .. |
---|
899 | 1254 | { |
---|
900 | 1255 | cRadio radioButton = new cRadio(obj.name); |
---|
901 | 1256 | |
---|
902 | | - // Patch to avoid bug with transparency. |
---|
| 1257 | + // June 2019. Patch to avoid bug with transparency. |
---|
903 | 1258 | radioButton.hadMaterial = obj.material != null; |
---|
904 | 1259 | if (!radioButton.hadMaterial) |
---|
905 | 1260 | { |
---|
.. | .. |
---|
907 | 1262 | } |
---|
908 | 1263 | |
---|
909 | 1264 | radioButton.SetObject(obj); |
---|
910 | | - radioButton.layout = sevenButton; |
---|
| 1265 | + radioButton.layout = sixButton; // sevenButton; |
---|
911 | 1266 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
912 | 1267 | radioButton.addActionListener(this); |
---|
913 | 1268 | radioPanel.add(radioButton); |
---|
.. | .. |
---|
936 | 1291 | cCheckBox slowCB; |
---|
937 | 1292 | cCheckBox boxCB; |
---|
938 | 1293 | cCheckBox zoomBoxCB; |
---|
939 | | - cToggleButton trackCB; |
---|
| 1294 | + cCheckBox freezeCB; |
---|
| 1295 | + //cToggleButton trackCB; |
---|
| 1296 | + cCheckBox trackCB; |
---|
940 | 1297 | cCheckBox smoothfocusCB; |
---|
941 | 1298 | // JCheckBox speakerMocapCB; |
---|
942 | 1299 | cCheckBox speakerCameraCB; |
---|
.. | .. |
---|
945 | 1302 | |
---|
946 | 1303 | cCheckBox oeilCB; |
---|
947 | 1304 | cCheckBox shadowCB; |
---|
948 | | - cCheckBox autosaveCB; |
---|
| 1305 | + cCheckBox autokeepCB; |
---|
949 | 1306 | cCheckBox lookAtCB; |
---|
950 | 1307 | |
---|
951 | 1308 | // static int COLOR = 1; |
---|
.. | .. |
---|
1053 | 1410 | { |
---|
1054 | 1411 | Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
1055 | 1412 | } |
---|
1056 | | - else if(e.getSource() == autosaveCB) |
---|
| 1413 | + else if(e.getSource() == freezeCB) |
---|
1057 | 1414 | { |
---|
1058 | | - Globals.SAVEONMAKE ^= true; |
---|
| 1415 | + Globals.FREEZEONMOVE ^= true; |
---|
| 1416 | + } |
---|
| 1417 | + else if(e.getSource() == autokeepCB) |
---|
| 1418 | + { |
---|
| 1419 | + Globals.REPLACEONMAKE ^= true; |
---|
1059 | 1420 | } |
---|
1060 | 1421 | else if(e.getSource() == lookAtCB) |
---|
1061 | 1422 | { |
---|
.. | .. |
---|
1137 | 1498 | } |
---|
1138 | 1499 | } |
---|
1139 | 1500 | |
---|
1140 | | - String string = (String) object; |
---|
1141 | | - |
---|
1142 | 1501 | System.out.println("Transfer = " + object + "; drop : " + target); |
---|
1143 | 1502 | // if( object instanceof java.io.File[]) |
---|
1144 | 1503 | // { |
---|
.. | .. |
---|
1146 | 1505 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
1147 | 1506 | // return; |
---|
1148 | 1507 | // } |
---|
| 1508 | + |
---|
| 1509 | + String string = object.toString(); |
---|
1149 | 1510 | |
---|
1150 | 1511 | // File path for Mac and Windows |
---|
1151 | 1512 | if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
.. | .. |
---|
1191 | 1552 | |
---|
1192 | 1553 | assert target == objEditor.jTree; |
---|
1193 | 1554 | TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y); |
---|
| 1555 | + Object3D destinationLeaf; |
---|
1194 | 1556 | try { |
---|
1195 | | - Object3D dummy = (Composite) destinationPath.getLastPathComponent(); |
---|
| 1557 | + destinationLeaf = (Composite) destinationPath.getLastPathComponent(); |
---|
1196 | 1558 | } catch (Exception e) { |
---|
1197 | 1559 | System.out.println("destinationPath : " + destinationPath); |
---|
1198 | 1560 | return; |
---|
1199 | 1561 | } |
---|
1200 | 1562 | |
---|
| 1563 | + for (int i=group.selection.size(); --i>=0;) |
---|
| 1564 | + { |
---|
| 1565 | + Object3D child = (Object3D)group.selection.elementAt(i); |
---|
| 1566 | + |
---|
| 1567 | + // Cannot move into itself |
---|
| 1568 | + if (child == destinationLeaf) |
---|
| 1569 | + return; |
---|
| 1570 | + } |
---|
| 1571 | + |
---|
1201 | 1572 | // june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
1202 | 1573 | // { |
---|
1203 | 1574 | loadClipboard(true); |
---|
.. | .. |
---|
1312 | 1683 | { |
---|
1313 | 1684 | //heightFieldItem = menu.add(new MenuItem("Height Field")); |
---|
1314 | 1685 | //heightFieldItem.addActionListener(this); |
---|
1315 | | - gridItem = menu.add(new MenuItem("Grid")); |
---|
1316 | | - gridItem.addActionListener(this); |
---|
1317 | | - rectoidItem = menu.add(new MenuItem("Box")); |
---|
1318 | | - rectoidItem.addActionListener(this); |
---|
1319 | | - ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
1320 | | - ellipsoidItem.addActionListener(this); |
---|
1321 | | - coneItem = menu.add(new MenuItem("Cone")); |
---|
1322 | | - coneItem.addActionListener(this); |
---|
1323 | | - torusItem = menu.add(new MenuItem("Torus")); |
---|
1324 | | - torusItem.addActionListener(this); |
---|
1325 | | - superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1326 | | - superItem.addActionListener(this); |
---|
| 1686 | +// gridItem = menu.add(new MenuItem("Grid")); |
---|
| 1687 | +// gridItem.addActionListener(this); |
---|
| 1688 | +// rectoidItem = menu.add(new MenuItem("Box")); |
---|
| 1689 | +// rectoidItem.addActionListener(this); |
---|
| 1690 | +// ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
| 1691 | +// ellipsoidItem.addActionListener(this); |
---|
| 1692 | +// coneItem = menu.add(new MenuItem("Cone")); |
---|
| 1693 | +// coneItem.addActionListener(this); |
---|
| 1694 | +// torusItem = menu.add(new MenuItem("Torus")); |
---|
| 1695 | +// torusItem.addActionListener(this); |
---|
| 1696 | +// superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
| 1697 | +// superItem.addActionListener(this); |
---|
| 1698 | + |
---|
| 1699 | + cameraItem = menu.add(new MenuItem("Camera")); |
---|
| 1700 | + cameraItem.addActionListener(this); |
---|
| 1701 | + |
---|
| 1702 | + if (!Globals.ADVANCED) |
---|
| 1703 | + { |
---|
1327 | 1704 | kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
1328 | 1705 | kleinItem.addActionListener(this); |
---|
1329 | | - particleItem = menu.add(new MenuItem("Particle system")); |
---|
1330 | | - particleItem.addActionListener(this); |
---|
| 1706 | + } |
---|
| 1707 | + |
---|
| 1708 | +// particleItem = menu.add(new MenuItem("Particle system")); |
---|
| 1709 | +// particleItem.addActionListener(this); |
---|
1331 | 1710 | if (Globals.ADVANCED) |
---|
1332 | 1711 | { |
---|
1333 | 1712 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
.. | .. |
---|
1353 | 1732 | } |
---|
1354 | 1733 | bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
1355 | 1734 | bezierItem.addActionListener(this); |
---|
1356 | | - overlayItem = menu.add(new MenuItem("Overlay")); |
---|
1357 | | - overlayItem.addActionListener(this); |
---|
1358 | | - lightItem = menu.add(new MenuItem("Light")); |
---|
1359 | | - lightItem.addActionListener(this); |
---|
| 1735 | +// overlayItem = menu.add(new MenuItem("Overlay")); |
---|
| 1736 | +// overlayItem.addActionListener(this); |
---|
| 1737 | +// lightItem = menu.add(new MenuItem("Light")); |
---|
| 1738 | +// lightItem.addActionListener(this); |
---|
1360 | 1739 | menu.add("-"); |
---|
1361 | 1740 | //superLoopItem = menu.add(new MenuItem("Super Loop")); |
---|
1362 | 1741 | //superLoopItem.addActionListener(this); |
---|
1363 | | - loopItem = menu.add(new MenuItem("Loop")); |
---|
1364 | | - loopItem.addActionListener(this); |
---|
| 1742 | +// loopItem = menu.add(new MenuItem("Loop")); |
---|
| 1743 | +// loopItem.addActionListener(this); |
---|
1365 | 1744 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1366 | 1745 | doubleItem.addActionListener(this); |
---|
1367 | 1746 | if (Globals.ADVANCED) |
---|
.. | .. |
---|
1377 | 1756 | animationItem.addItemListener(this); |
---|
1378 | 1757 | animationItem.setState(Globals.ANIMATION); |
---|
1379 | 1758 | |
---|
| 1759 | + menu.add(archiveItem = new MenuItem("Archive3D...")); |
---|
| 1760 | + archiveItem.addActionListener(this); |
---|
| 1761 | + |
---|
1380 | 1762 | menu.add("-"); |
---|
1381 | 1763 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1382 | 1764 | parseverticesItem.addActionListener(this); |
---|
.. | .. |
---|
1389 | 1771 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1390 | 1772 | reduce34MorphItem.addActionListener(this); |
---|
1391 | 1773 | menu.add("-"); |
---|
| 1774 | + menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
| 1775 | + memoryItem.addActionListener(this); |
---|
1392 | 1776 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1393 | 1777 | computeAOItem.addActionListener(this); |
---|
1394 | 1778 | |
---|
.. | .. |
---|
1397 | 1781 | mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1398 | 1782 | mirrorItem.addActionListener(this); |
---|
1399 | 1783 | menu.add("-"); |
---|
1400 | | - menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1401 | | - memoryItem.addActionListener(this); |
---|
1402 | 1784 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1403 | 1785 | analyzeItem.addActionListener(this); |
---|
1404 | 1786 | menu.add(dumpItem = new MenuItem("Print")); |
---|
.. | .. |
---|
1546 | 1928 | |
---|
1547 | 1929 | makeSomething(shadow); |
---|
1548 | 1930 | } |
---|
| 1931 | + |
---|
| 1932 | + private void ClearUnpinned() |
---|
| 1933 | + { |
---|
| 1934 | + //for (Object3D obj : listUI) |
---|
| 1935 | + for (int i=listUI.size(); --i>=0;) |
---|
| 1936 | + { |
---|
| 1937 | + Object3D obj = listUI.elementAt(i); |
---|
| 1938 | + if (!obj.pinned) |
---|
| 1939 | + { |
---|
| 1940 | + obj.CloseUI(); |
---|
| 1941 | + listUI.remove(i); |
---|
| 1942 | + } |
---|
| 1943 | + } |
---|
| 1944 | + } |
---|
| 1945 | + |
---|
| 1946 | + private void EditElement(Object3D elem, boolean newWindow) |
---|
| 1947 | + { |
---|
| 1948 | + // if (!(elem instanceof Composite)) |
---|
| 1949 | + // newWindow = false; |
---|
| 1950 | + listUI.add(elem); |
---|
| 1951 | + elem.openEditWindow(this, newWindow); //, false); |
---|
| 1952 | + System.out.println("edit : " + elem); |
---|
| 1953 | + elem.editWindow.refreshContents(true); // ? new |
---|
| 1954 | + } |
---|
1549 | 1955 | |
---|
1550 | 1956 | /** |
---|
1551 | 1957 | * applyExample |
---|
.. | .. |
---|
1790 | 2196 | { |
---|
1791 | 2197 | ScreenFit(); |
---|
1792 | 2198 | } else |
---|
1793 | | - if (source == switchItem) |
---|
| 2199 | + if (source == switchViewItem) |
---|
1794 | 2200 | { |
---|
1795 | 2201 | cVector v1 = new cVector(); |
---|
1796 | 2202 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1974 | 2380 | { |
---|
1975 | 2381 | makeSomething(new Light()); |
---|
1976 | 2382 | } else |
---|
| 2383 | +// if (source == skybox1Button || |
---|
| 2384 | +// source == skybox2Button || |
---|
| 2385 | +// source == skybox3Button || |
---|
| 2386 | +// source == skybox4Button || |
---|
| 2387 | +// source == skybox5Button || |
---|
| 2388 | +// source == skybox6Button || |
---|
| 2389 | +// source == skybox7Button || |
---|
| 2390 | +// source == skybox11Button || |
---|
| 2391 | +// source == skybox12Button || |
---|
| 2392 | +// source == skybox13Button || |
---|
| 2393 | +// source == skybox14Button || |
---|
| 2394 | +// source == skybox15Button || |
---|
| 2395 | +// source == skybox16Button || |
---|
| 2396 | +// source == skybox17Button) |
---|
| 2397 | +// { |
---|
| 2398 | +// ChangeSkybox(source); |
---|
| 2399 | +// } else |
---|
1977 | 2400 | if (source == csgItem) |
---|
1978 | 2401 | { |
---|
1979 | 2402 | group(new CSG()); |
---|
.. | .. |
---|
2020 | 2443 | |
---|
2021 | 2444 | group(g); |
---|
2022 | 2445 | } else |
---|
2023 | | - if (source == loopItem) |
---|
| 2446 | + if (source == loopItem || source == loopButton) |
---|
2024 | 2447 | { |
---|
2025 | 2448 | Composite csg = new GroupLeaf(); |
---|
2026 | 2449 | csg.count = 5; |
---|
2027 | 2450 | group(csg); |
---|
2028 | | - Composite child = new cGroup(); |
---|
| 2451 | + Composite child = new cGroup("Branch"); |
---|
2029 | 2452 | csg.addChild(child); |
---|
2030 | 2453 | child.addChild(csg); |
---|
2031 | 2454 | } else |
---|
2032 | 2455 | if (source == doubleItem) |
---|
2033 | 2456 | { |
---|
2034 | | - Composite csg = new GroupLeaf(); |
---|
| 2457 | + Composite csg = new GroupLeaf("Fork"); |
---|
2035 | 2458 | csg.count = 5; |
---|
2036 | 2459 | group(csg); |
---|
2037 | | - Composite child = new cGroup(); |
---|
| 2460 | + Composite child = new cGroup("Branch A"); |
---|
2038 | 2461 | csg.addChild(child); |
---|
2039 | 2462 | child.addChild(csg); |
---|
2040 | | - child = new cGroup(); |
---|
| 2463 | + child = new cGroup("Branch B"); |
---|
2041 | 2464 | csg.addChild(child); |
---|
2042 | 2465 | child.addChild(csg); |
---|
2043 | 2466 | } else |
---|
2044 | 2467 | if (source == tripleItem) |
---|
2045 | 2468 | { |
---|
2046 | | - Composite csg = new GroupLeaf(); |
---|
| 2469 | + Composite csg = new GroupLeaf("Trident"); |
---|
2047 | 2470 | csg.count = 4; |
---|
2048 | 2471 | group(csg); |
---|
2049 | 2472 | Composite child = new cGroup(); |
---|
.. | .. |
---|
2059 | 2482 | if (source == computeAOItem) |
---|
2060 | 2483 | { |
---|
2061 | 2484 | Globals.drawMode = CameraPane.OCCLUSION; |
---|
2062 | | - Globals.theRenderer.repaint(); |
---|
| 2485 | + cameraView.repaint(); |
---|
2063 | 2486 | } else |
---|
2064 | 2487 | if (source == recompileItem) |
---|
2065 | 2488 | { |
---|
.. | .. |
---|
2107 | 2530 | } else |
---|
2108 | 2531 | if (source == undoButton) |
---|
2109 | 2532 | { |
---|
| 2533 | + // Go to previous version |
---|
| 2534 | + //if (!Undo()) |
---|
| 2535 | + //java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2110 | 2536 | Undo(); |
---|
| 2537 | + } else |
---|
| 2538 | + if (source == restoreButton) |
---|
| 2539 | + { |
---|
| 2540 | + // Restore current version |
---|
| 2541 | + Restore(); |
---|
| 2542 | + } else |
---|
| 2543 | + if (source == replaceButton) |
---|
| 2544 | + { |
---|
| 2545 | + // Overwrite current version |
---|
| 2546 | + Replace(); |
---|
2111 | 2547 | } else |
---|
2112 | 2548 | if (source == redoButton) |
---|
2113 | 2549 | { |
---|
| 2550 | + // Go to next version |
---|
2114 | 2551 | Redo(); |
---|
2115 | 2552 | } else |
---|
2116 | 2553 | if (source == saveButton) |
---|
2117 | 2554 | { |
---|
2118 | | - Save(); |
---|
| 2555 | + // Save a new version |
---|
| 2556 | + if (!Save(true)) |
---|
| 2557 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2119 | 2558 | } else |
---|
2120 | 2559 | if (source == oneStepButton) |
---|
2121 | 2560 | { |
---|
.. | .. |
---|
2124 | 2563 | } else |
---|
2125 | 2564 | if (source == screenfitButton) |
---|
2126 | 2565 | { |
---|
2127 | | - //Reload(lastConverter, lastFilename, true); |
---|
2128 | 2566 | ScreenFit(); |
---|
2129 | 2567 | } else |
---|
2130 | 2568 | if (source == screenfitpointButton) |
---|
2131 | 2569 | { |
---|
2132 | | - //Reload(lastConverter, lastFilename, true); |
---|
2133 | 2570 | ScreenFitPoint(); |
---|
2134 | 2571 | } else |
---|
2135 | 2572 | if (source == snapobjectButton) |
---|
2136 | 2573 | { |
---|
2137 | | - //Reload(lastConverter, lastFilename, true); |
---|
2138 | 2574 | SnapObject(); |
---|
2139 | 2575 | } else |
---|
2140 | 2576 | // if (event.getSource() == recompileButton) |
---|
.. | .. |
---|
2498 | 2934 | { |
---|
2499 | 2935 | StepAll(); |
---|
2500 | 2936 | } else |
---|
2501 | | - if (source == clearItem) // || event.getSource() == clearButton) |
---|
| 2937 | + if (source == deleteItem) // || event.getSource() == clearButton) |
---|
2502 | 2938 | { |
---|
2503 | 2939 | //int indices[] = jList.getSelectedIndices(); |
---|
2504 | 2940 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
2510 | 2946 | { |
---|
2511 | 2947 | ClearSelection(true); |
---|
2512 | 2948 | } else |
---|
2513 | | - if (source == grabItem) |
---|
| 2949 | + if (source == grabItem || source == groupButton) |
---|
2514 | 2950 | { |
---|
2515 | | - group(new cGroup(), true); |
---|
| 2951 | + group(new cGroup(), false); // true); |
---|
2516 | 2952 | } else |
---|
2517 | 2953 | if (source == hideItem) |
---|
2518 | 2954 | { |
---|
.. | .. |
---|
2530 | 2966 | { |
---|
2531 | 2967 | makeSomething(new Camera()); |
---|
2532 | 2968 | } else |
---|
2533 | | - if (source == compositeItem) |
---|
| 2969 | + if (source == compositeItem || source == compositeButton) |
---|
2534 | 2970 | { |
---|
2535 | 2971 | group(new Composite()); |
---|
2536 | 2972 | } else |
---|
2537 | | - if (source == randomItem) |
---|
| 2973 | + if (source == switchItem || source == switchButton) |
---|
2538 | 2974 | { |
---|
2539 | 2975 | RandomNode random = new RandomNode(); |
---|
2540 | 2976 | group(random); |
---|
.. | .. |
---|
2636 | 3072 | { |
---|
2637 | 3073 | group(new cLinker()); |
---|
2638 | 3074 | } else |
---|
2639 | | - if (source == textureItem) |
---|
| 3075 | + if (source == textureItem || source == textureButton) |
---|
2640 | 3076 | { |
---|
2641 | 3077 | group(new TextureNode()); |
---|
2642 | 3078 | } else |
---|
.. | .. |
---|
2658 | 3094 | } else |
---|
2659 | 3095 | if (source == ungroupItem || source == ungroupButton) |
---|
2660 | 3096 | { |
---|
2661 | | - //ungroup(); |
---|
| 3097 | + boolean hasRoot = false; |
---|
| 3098 | + |
---|
2662 | 3099 | for (int i=0; i<group.selection.size(); i++) |
---|
2663 | 3100 | { |
---|
2664 | | - Ungroup(group.selection.get(i)); |
---|
| 3101 | + if (group.selection.get(i) == group) |
---|
| 3102 | + { |
---|
| 3103 | + hasRoot = true; |
---|
| 3104 | + break; |
---|
| 3105 | + } |
---|
2665 | 3106 | } |
---|
2666 | 3107 | |
---|
2667 | | - ClearSelection(false); |
---|
2668 | | - |
---|
2669 | | - refreshContents(); |
---|
| 3108 | + if (!hasRoot) |
---|
| 3109 | + { |
---|
| 3110 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 3111 | + { |
---|
| 3112 | + Ungroup(group.selection.get(i)); |
---|
| 3113 | + } |
---|
| 3114 | + |
---|
| 3115 | + ClearSelection(false); |
---|
| 3116 | + |
---|
| 3117 | + refreshContents(); |
---|
| 3118 | + } |
---|
2670 | 3119 | } else |
---|
2671 | 3120 | if (source == genUVItem) |
---|
2672 | 3121 | { |
---|
.. | .. |
---|
2967 | 3416 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2968 | 3417 | { |
---|
2969 | 3418 | obj = (Object3D)e.nextElement(); |
---|
2970 | | - obj.SetBumpTexture(null); |
---|
| 3419 | + obj.ResetBumpTexture(); |
---|
2971 | 3420 | } |
---|
2972 | 3421 | |
---|
2973 | 3422 | refreshContents(); |
---|
.. | .. |
---|
2981 | 3430 | obj.SetBumpTexture(obj.GetPigmentTexture()); |
---|
2982 | 3431 | } |
---|
2983 | 3432 | |
---|
| 3433 | + refreshContents(); |
---|
| 3434 | + } else |
---|
| 3435 | + if (source == embedTexturesItem) |
---|
| 3436 | + { |
---|
| 3437 | + Object3D obj; |
---|
| 3438 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3439 | + { |
---|
| 3440 | + obj = (Object3D)e.nextElement(); |
---|
| 3441 | + obj.EmbedTextures(true); |
---|
| 3442 | + } |
---|
| 3443 | + |
---|
| 3444 | + refreshContents(); |
---|
| 3445 | + } else |
---|
| 3446 | + if (source == deEmbedTexturesItem) |
---|
| 3447 | + { |
---|
| 3448 | + Object3D obj; |
---|
| 3449 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3450 | + { |
---|
| 3451 | + obj = (Object3D)e.nextElement(); |
---|
| 3452 | + obj.EmbedTextures(false); |
---|
| 3453 | + } |
---|
| 3454 | + |
---|
| 3455 | + CameraPane.texturepigment.clear(); |
---|
| 3456 | + CameraPane.texturebump.clear(); |
---|
| 3457 | + |
---|
2984 | 3458 | refreshContents(); |
---|
2985 | 3459 | } else |
---|
2986 | 3460 | if (source == flashSelectionButton) |
---|
.. | .. |
---|
3084 | 3558 | // centralPanel.setVisible(true); |
---|
3085 | 3559 | // XYZPanel.setVisible(true); |
---|
3086 | 3560 | bigThree.ClearUI(); |
---|
| 3561 | + bigThree.add(scenePanel); |
---|
3087 | 3562 | bigThree.add(centralPanel); |
---|
3088 | | - bigThree.add(XYZPanel); |
---|
3089 | 3563 | bigThree.FlushUI(); |
---|
3090 | 3564 | |
---|
3091 | 3565 | cameraView.requestFocusInWindow(); |
---|
.. | .. |
---|
3165 | 3639 | // centralPanel.setVisible(true); |
---|
3166 | 3640 | // XYZPanel.setVisible(false); |
---|
3167 | 3641 | bigThree.ClearUI(); |
---|
3168 | | - bigThree.add(scenePanel); |
---|
3169 | 3642 | bigThree.add(centralPanel); |
---|
| 3643 | + bigThree.add(scenePanel); |
---|
3170 | 3644 | bigThree.FlushUI(); |
---|
3171 | 3645 | |
---|
3172 | 3646 | cameraView.requestFocusInWindow(); |
---|
.. | .. |
---|
3258 | 3732 | } else |
---|
3259 | 3733 | if (source == editItem || source == editButton) |
---|
3260 | 3734 | { |
---|
| 3735 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3736 | + { |
---|
| 3737 | + Object3D child = (Object3D)e.nextElement(); |
---|
| 3738 | + child.pinned = true; |
---|
| 3739 | + } |
---|
| 3740 | + |
---|
3261 | 3741 | EditSelection(false); |
---|
3262 | 3742 | } else |
---|
3263 | 3743 | if (source == uneditButton) |
---|
.. | .. |
---|
3267 | 3747 | Object3D child = (Object3D)e.nextElement(); |
---|
3268 | 3748 | if(child.editWindow != null) |
---|
3269 | 3749 | objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3750 | + child.pinned = false; |
---|
3270 | 3751 | child.CloseUI(); |
---|
3271 | 3752 | listUI.remove(child); |
---|
3272 | 3753 | |
---|
.. | .. |
---|
3283 | 3764 | //copy.ClearUI(); |
---|
3284 | 3765 | for (Object3D obj : listUI) |
---|
3285 | 3766 | { |
---|
| 3767 | + obj.pinned = false; |
---|
3286 | 3768 | obj.CloseUI(); |
---|
3287 | 3769 | } |
---|
3288 | 3770 | listUI.clear(); |
---|
.. | .. |
---|
3292 | 3774 | { |
---|
3293 | 3775 | assert(copy == group); |
---|
3294 | 3776 | |
---|
3295 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 3777 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3296 | 3778 | |
---|
3297 | 3779 | for (Object3D obj : listUI) |
---|
3298 | 3780 | { |
---|
.. | .. |
---|
3341 | 3823 | } |
---|
3342 | 3824 | |
---|
3343 | 3825 | copy = group; |
---|
| 3826 | + |
---|
| 3827 | + SetUndoStates(); |
---|
| 3828 | + |
---|
3344 | 3829 | //Globals.theRenderer.object = group; |
---|
3345 | 3830 | if(!useclient) |
---|
3346 | 3831 | { |
---|
.. | .. |
---|
3367 | 3852 | currentLayout = sevenButton; |
---|
3368 | 3853 | */ |
---|
3369 | 3854 | radio.layout.doClick(); |
---|
| 3855 | + |
---|
| 3856 | + ClearUnpinned(); |
---|
| 3857 | + //Grafreed.Assert(group != null); |
---|
| 3858 | + //Grafreed.Assert(group.selection != null); |
---|
| 3859 | + SetPinStates(group.selection == null || group.selection.size() > 0); |
---|
| 3860 | + if (group.selection == null || group.selection.size() == 1) |
---|
| 3861 | + EditSelection(false); |
---|
3370 | 3862 | keepparent = group.parent; |
---|
3371 | 3863 | // PARENT = NULL or not??? |
---|
3372 | 3864 | //group.parent = null; // ROOT |
---|
.. | .. |
---|
3380 | 3872 | cameraView.ProtectCamera(); |
---|
3381 | 3873 | cameraView.repaint(); |
---|
3382 | 3874 | return; |
---|
3383 | | - } else if (event.getSource() == revertCameraItem) |
---|
| 3875 | + } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) |
---|
3384 | 3876 | { |
---|
3385 | 3877 | cameraView.RevertCamera(); |
---|
3386 | 3878 | cameraView.repaint(); |
---|
.. | .. |
---|
3959 | 4451 | |
---|
3960 | 4452 | try |
---|
3961 | 4453 | { |
---|
3962 | | - texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 4454 | + texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres); |
---|
3963 | 4455 | } |
---|
3964 | 4456 | catch (Exception e) |
---|
3965 | 4457 | { |
---|
.. | .. |
---|
4434 | 4926 | // } |
---|
4435 | 4927 | // } |
---|
4436 | 4928 | |
---|
4437 | | - static boolean allparams = true; |
---|
4438 | | - |
---|
4439 | | - static Vector<Object3D> listUI = new Vector<Object3D>(); |
---|
4440 | | - |
---|
4441 | 4929 | void EditSelection(boolean newWindow) |
---|
4442 | 4930 | { |
---|
| 4931 | + if (group.selection == null) |
---|
| 4932 | + { |
---|
| 4933 | + EditElement(group, newWindow); // ? new |
---|
| 4934 | + return; |
---|
| 4935 | + } |
---|
| 4936 | + |
---|
4443 | 4937 | // aConstraints.gridy = 0; |
---|
4444 | 4938 | for (int i=0; i<group.selection.size(); i++) |
---|
4445 | 4939 | { |
---|
.. | .. |
---|
4450 | 4944 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4451 | 4945 | if(elem != group || !newWindow) |
---|
4452 | 4946 | { |
---|
4453 | | - // if (!(elem instanceof Composite)) |
---|
4454 | | - // newWindow = false; |
---|
4455 | | - listUI.add(elem); |
---|
4456 | | - elem.openEditWindow(this, newWindow); //, false); |
---|
4457 | | - System.out.println("edit : " + elem); |
---|
4458 | | - elem.editWindow.refreshContents(true); // ? new |
---|
| 4947 | + EditElement(elem, newWindow); // ? new |
---|
4459 | 4948 | } |
---|
4460 | 4949 | } |
---|
4461 | 4950 | } |
---|
.. | .. |
---|
4530 | 5019 | //new Exception().printStackTrace(); |
---|
4531 | 5020 | |
---|
4532 | 5021 | freezemodel = true; |
---|
4533 | | - |
---|
| 5022 | + ClearUnpinned(); |
---|
| 5023 | + |
---|
4534 | 5024 | /**/ |
---|
4535 | 5025 | //switch (event.id) |
---|
4536 | 5026 | { |
---|
.. | .. |
---|
4563 | 5053 | if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera) |
---|
4564 | 5054 | // a camera |
---|
4565 | 5055 | { |
---|
4566 | | - if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) |
---|
| 5056 | + if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace |
---|
4567 | 5057 | { |
---|
4568 | 5058 | CameraPane.camerachangeframe = 0; // don't refuse it |
---|
4569 | 5059 | Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
.. | .. |
---|
4572 | 5062 | // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
4573 | 5063 | } |
---|
4574 | 5064 | |
---|
| 5065 | + if (tps != null && tps.length == 1) |
---|
| 5066 | + { |
---|
| 5067 | + EditSelection(false); |
---|
| 5068 | + } |
---|
| 5069 | + |
---|
| 5070 | + SetPinStates(tps != null && tps.length > 0); |
---|
| 5071 | + |
---|
4575 | 5072 | refreshContents(); |
---|
4576 | 5073 | //return true; |
---|
4577 | 5074 | } |
---|
.. | .. |
---|
4581 | 5078 | freezemodel = false; |
---|
4582 | 5079 | } |
---|
4583 | 5080 | |
---|
| 5081 | + void SetPinStates(boolean enabled) |
---|
| 5082 | + { |
---|
| 5083 | + editButton.setEnabled(enabled); |
---|
| 5084 | + uneditButton.setEnabled(enabled); |
---|
| 5085 | + unselectButton.setEnabled(enabled); |
---|
| 5086 | + flashSelectionButton.setEnabled(enabled); |
---|
| 5087 | + } |
---|
| 5088 | + |
---|
4584 | 5089 | void refreshContents(boolean cp) |
---|
4585 | 5090 | { |
---|
4586 | | - if (!Globals.MOUSEDRAGGED) |
---|
| 5091 | + if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
| 5092 | + if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
4587 | 5093 | { |
---|
4588 | 5094 | objEditor.ClearInfo(); // .GetMaterial()); |
---|
4589 | 5095 | |
---|
.. | .. |
---|
4682 | 5188 | |
---|
4683 | 5189 | if (cut) |
---|
4684 | 5190 | { |
---|
4685 | | - if (Globals.SAVEONMAKE) |
---|
4686 | | - Save(); |
---|
| 5191 | +// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save. |
---|
| 5192 | +// Save(); |
---|
4687 | 5193 | //int indices[] = jList.getSelectedIndices(); |
---|
4688 | 5194 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4689 | 5195 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4786 | 5292 | |
---|
4787 | 5293 | void paste(boolean expand) |
---|
4788 | 5294 | { |
---|
| 5295 | + if (Globals.REPLACEONMAKE) |
---|
| 5296 | + Save(); |
---|
| 5297 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5298 | + Globals.REPLACEONMAKE = false; |
---|
4789 | 5299 | // if (GrafreeD.clipboard == null) |
---|
4790 | 5300 | // return; |
---|
4791 | 5301 | boolean first = true; |
---|
.. | .. |
---|
4845 | 5355 | Grafreed.clipboard.get(0).parent = keepparent; |
---|
4846 | 5356 | } |
---|
4847 | 5357 | |
---|
| 5358 | + Globals.REPLACEONMAKE = keep; |
---|
4848 | 5359 | ResetModel(); |
---|
4849 | 5360 | refreshContents(); |
---|
4850 | 5361 | } |
---|
.. | .. |
---|
4980 | 5491 | |
---|
4981 | 5492 | void group(Object3D csg, boolean grab) |
---|
4982 | 5493 | { |
---|
| 5494 | + if (Globals.REPLACEONMAKE) |
---|
| 5495 | + Save(); |
---|
| 5496 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5497 | + Globals.REPLACEONMAKE = false; |
---|
4983 | 5498 | if (//false) // why?? |
---|
4984 | 5499 | !group.selection.isEmpty()) |
---|
4985 | 5500 | { |
---|
.. | .. |
---|
5093 | 5608 | //node.add(csg); |
---|
5094 | 5609 | //makeSomething(node); |
---|
5095 | 5610 | makeSomething(csg); |
---|
| 5611 | + Globals.REPLACEONMAKE = keep; |
---|
5096 | 5612 | } |
---|
5097 | 5613 | |
---|
5098 | 5614 | void Ungroup(Object3D g) |
---|
5099 | 5615 | { |
---|
| 5616 | + if (Globals.REPLACEONMAKE) |
---|
| 5617 | + Save(); |
---|
| 5618 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5619 | + Globals.REPLACEONMAKE = false; |
---|
5100 | 5620 | if (g instanceof HiddenObject) |
---|
5101 | 5621 | { |
---|
5102 | 5622 | HiddenObject h = (HiddenObject) g; |
---|
.. | .. |
---|
5113 | 5633 | objEditor.makeSomething(g.get(i), false); |
---|
5114 | 5634 | } |
---|
5115 | 5635 | } |
---|
| 5636 | + Globals.REPLACEONMAKE = keep; |
---|
5116 | 5637 | } |
---|
5117 | 5638 | |
---|
5118 | 5639 | void ungroup() |
---|
.. | .. |
---|
5401 | 5922 | cButton clearpanelButton; |
---|
5402 | 5923 | cButton unselectButton; |
---|
5403 | 5924 | |
---|
5404 | | - cButton minButton; |
---|
5405 | | - cButton maxButton; |
---|
5406 | | - cButton fullButton; |
---|
5407 | | - cButton undoButton; |
---|
5408 | | - cButton redoButton; |
---|
| 5925 | + cButton restoreCameraButton; |
---|
| 5926 | + |
---|
5409 | 5927 | cButton saveButton; |
---|
5410 | 5928 | cButton oneStepButton; |
---|
5411 | 5929 | |
---|
5412 | 5930 | cButton groupButton; |
---|
5413 | 5931 | cButton ungroupButton; |
---|
5414 | 5932 | cButton compositeButton; |
---|
| 5933 | + cButton switchButton; |
---|
| 5934 | + cButton loopButton; |
---|
| 5935 | + cButton textureButton; |
---|
| 5936 | + |
---|
| 5937 | + cButton skybox1Button; |
---|
| 5938 | + cButton skybox2Button; |
---|
| 5939 | + cButton skybox3Button; |
---|
| 5940 | + cButton skybox4Button; |
---|
| 5941 | + cButton skybox5Button; |
---|
| 5942 | + cButton skybox6Button; |
---|
| 5943 | + cButton skybox7Button; |
---|
| 5944 | + |
---|
| 5945 | + cButton skybox11Button; |
---|
| 5946 | + cButton skybox12Button; |
---|
| 5947 | + cButton skybox13Button; |
---|
| 5948 | + cButton skybox14Button; |
---|
| 5949 | + cButton skybox15Button; |
---|
| 5950 | + cButton skybox16Button; |
---|
| 5951 | + cButton skybox17Button; |
---|
5415 | 5952 | |
---|
5416 | 5953 | cButton gridButton; |
---|
5417 | 5954 | cButton boxButton; |
---|
.. | .. |
---|
5444 | 5981 | //JTree jTree; |
---|
5445 | 5982 | private MenuItem lookAtItem; |
---|
5446 | 5983 | private MenuItem lookFromItem; |
---|
5447 | | - private MenuItem switchItem; |
---|
| 5984 | + private MenuItem switchViewItem; |
---|
5448 | 5985 | private MenuItem cutItem; |
---|
5449 | 5986 | private MenuItem undoItem; |
---|
5450 | 5987 | private MenuItem redoItem; |
---|
.. | .. |
---|
5476 | 6013 | private MenuItem pasteLinkItem; |
---|
5477 | 6014 | private MenuItem pasteCloneItem; |
---|
5478 | 6015 | private MenuItem pasteExpandItem; |
---|
5479 | | - private MenuItem clearItem; |
---|
| 6016 | + private MenuItem deleteItem; |
---|
5480 | 6017 | private MenuItem clearAllItem; |
---|
5481 | 6018 | private MenuItem genUVItem; |
---|
5482 | 6019 | private MenuItem genNormalsMESHItem; |
---|
.. | .. |
---|
5536 | 6073 | private MenuItem frontItem; |
---|
5537 | 6074 | private MenuItem cameraItem; |
---|
5538 | 6075 | private MenuItem compositeItem; |
---|
5539 | | - private MenuItem randomItem; |
---|
| 6076 | + private MenuItem switchItem; |
---|
5540 | 6077 | private MenuItem physicsItem; |
---|
5541 | 6078 | private MenuItem frameselectorItem; |
---|
5542 | 6079 | private MenuItem scriptNodeItem; |
---|
.. | .. |
---|
5560 | 6097 | private MenuItem attachBumpItem; |
---|
5561 | 6098 | private MenuItem detachBumpItem; |
---|
5562 | 6099 | private MenuItem pigmentBumpItem; |
---|
| 6100 | + private MenuItem embedTexturesItem; |
---|
| 6101 | + private MenuItem deEmbedTexturesItem; |
---|
5563 | 6102 | |
---|
5564 | 6103 | private MenuItem particleItem; |
---|
5565 | 6104 | private MenuItem ragdollItem; |
---|
.. | .. |
---|
5610 | 6149 | |
---|
5611 | 6150 | Menu cameraMenu; |
---|
5612 | 6151 | MenuItem editCameraItem; |
---|
5613 | | - MenuItem revertCameraItem; |
---|
| 6152 | + MenuItem restoreCameraItem; |
---|
5614 | 6153 | } |
---|