.. | .. |
---|
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 + "/" + s + ".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("default", "uffizi", row0); |
---|
| 62 | + AddSkyboxButton("default", "CloudyHills", row0); |
---|
| 63 | + |
---|
| 64 | + AddSkyboxButton("default", "skycube", row1); |
---|
| 65 | + AddSkyboxButton("bridge", "Bridge", row1); |
---|
| 66 | + AddSkyboxButton("bridge", "Bridge2", row1); |
---|
| 67 | + AddSkyboxButton("urban", "GamlaStan2", row1); |
---|
| 68 | + |
---|
| 69 | + AddSkyboxButton("urban", "Parliament", row2); |
---|
| 70 | + AddSkyboxButton("urban", "Roundabout", row2); |
---|
| 71 | + AddSkyboxButton("urban", "SaintLazarusChurch", row2); |
---|
| 72 | + AddSkyboxButton("urban", "SaintLazarusChurch2", row2); |
---|
| 73 | + |
---|
| 74 | + AddSkyboxButton("urban", "SaintLazarusChurch3", row3); |
---|
| 75 | + AddSkyboxButton("urban", "UnionSquare", row3); |
---|
| 76 | + AddSkyboxButton("park", "BerzeliiPark", row3); |
---|
| 77 | + AddSkyboxButton("park", "Buddha", row3); |
---|
| 78 | + |
---|
| 79 | + AddSkyboxButton("park", "CNTower2", row4); |
---|
| 80 | + AddSkyboxButton("park", "NiagaraFalls1", row4); |
---|
| 81 | + AddSkyboxButton("park", "NiagaraFalls3", row4); |
---|
| 82 | + AddSkyboxButton("park", "Park", row4); |
---|
| 83 | + |
---|
| 84 | + AddSkyboxButton("park", "Pond", row5); |
---|
| 85 | + AddSkyboxButton("park", "Skansen", row5); |
---|
| 86 | + AddSkyboxButton("park", "Skansen2", row5); |
---|
| 87 | + AddSkyboxButton("park", "Skansen3", row5); |
---|
| 88 | + |
---|
| 89 | + AddSkyboxButton("park", "Skansen4", row6); |
---|
| 90 | + AddSkyboxButton("park", "Skansen5", row6); |
---|
| 91 | + AddSkyboxButton("park", "Stairs", row6); |
---|
| 92 | + AddSkyboxButton("park", "Tantolunden4", row6); |
---|
| 93 | + |
---|
| 94 | + tab0.add(row0); |
---|
| 95 | + tab0.add(row1); |
---|
| 96 | + tab0.add(row2); |
---|
| 97 | + tab0.add(row3); |
---|
| 98 | + tab0.add(row4); |
---|
| 99 | + tab0.add(row5); |
---|
| 100 | + tab0.add(row6); |
---|
| 101 | + |
---|
| 102 | + for (int i=5; --i>=0;) |
---|
| 103 | + { |
---|
| 104 | + //oe.toolboxPanel.Return(); |
---|
| 105 | + //tab0.add(new cGridBag()); |
---|
| 106 | + } |
---|
| 107 | + } |
---|
| 108 | + |
---|
| 109 | + public void AddSkyboxTab1(JTabbedPane skyboxpanel) |
---|
| 110 | + { |
---|
| 111 | + cGridBag tab0 = new cGridBag().setVertical(true); |
---|
| 112 | + |
---|
| 113 | + tab0.setName("Nature"); |
---|
| 114 | + skyboxpanel.add(tab0); |
---|
| 115 | + |
---|
| 116 | + cGridBag row0 = new cGridBag(); |
---|
| 117 | + cGridBag row1 = new cGridBag(); |
---|
| 118 | + cGridBag row2 = new cGridBag(); |
---|
| 119 | + cGridBag row3 = new cGridBag(); |
---|
| 120 | + cGridBag row4 = new cGridBag(); |
---|
| 121 | + cGridBag row5 = new cGridBag(); |
---|
| 122 | + cGridBag row6 = new cGridBag(); |
---|
| 123 | + |
---|
| 124 | + AddSkyboxButton("beach", "HeartInTheSand", row0); |
---|
| 125 | + AddSkyboxButton("beach", "LarnacaBeach", row0); |
---|
| 126 | + AddSkyboxButton("beach", "PalmTrees", row0); |
---|
| 127 | + AddSkyboxButton("beach", "Tenerife", row0); |
---|
| 128 | + |
---|
| 129 | + AddSkyboxButton("beach", "Tenerife2", row1); |
---|
| 130 | + AddSkyboxButton("beach", "Tenerife3", row1); |
---|
| 131 | + AddSkyboxButton("field", "FishPond", row1); |
---|
| 132 | + AddSkyboxButton("field", "Footballfield", row1); |
---|
| 133 | + |
---|
| 134 | + AddSkyboxButton("field", "Meadow", row2); |
---|
| 135 | + AddSkyboxButton("field", "Sorsele", row2); |
---|
| 136 | + AddSkyboxButton("field", "Sorsele2", row2); |
---|
| 137 | + AddSkyboxButton("field", "Sorsele3", row2); |
---|
| 138 | + |
---|
| 139 | + AddSkyboxButton("forest", "Brudslojan", row3); |
---|
| 140 | + AddSkyboxButton("forest", "Langholmen2", row3); |
---|
| 141 | + AddSkyboxButton("forest", "Plants", row3); |
---|
| 142 | + AddSkyboxButton("mountain", "Maskonaive", row3); |
---|
| 143 | + AddSkyboxButton("mountain", "Maskonaive2", row4); |
---|
| 144 | + |
---|
| 145 | + AddSkyboxButton("mountain", "Maskonaive3", row4); |
---|
| 146 | + AddSkyboxButton("mountain", "Ryfjallet", row4); |
---|
| 147 | + AddSkyboxButton("mountain", "Teide", row4); |
---|
| 148 | + |
---|
| 149 | + AddSkyboxButton("rocky", "Langholmen", row5); |
---|
| 150 | + AddSkyboxButton("rocky", "Riddarfjarden", row5); |
---|
| 151 | + AddSkyboxButton("rocky", "Skinnarviksberget", row5); |
---|
| 152 | + AddSkyboxButton("rocky", "Tantolunden6", row5); |
---|
| 153 | + /* |
---|
| 154 | +Kastellholmen |
---|
| 155 | +Langholmen |
---|
| 156 | +Riddarfjarden |
---|
| 157 | +Skinnarviksberget |
---|
| 158 | +Tanto |
---|
| 159 | +Tantolunden2 |
---|
| 160 | +Tantolunden6 |
---|
| 161 | + */ |
---|
| 162 | + |
---|
| 163 | + tab0.add(row0); |
---|
| 164 | + tab0.add(row1); |
---|
| 165 | + tab0.add(row2); |
---|
| 166 | + tab0.add(row3); |
---|
| 167 | + tab0.add(row4); |
---|
| 168 | + tab0.add(row5); |
---|
| 169 | + tab0.add(row6); |
---|
| 170 | + |
---|
| 171 | + for (int i=5; --i>=0;) |
---|
| 172 | + { |
---|
| 173 | + //oe.toolboxPanel.Return(); |
---|
| 174 | + //tab0.add(new cGridBag()); |
---|
| 175 | + } |
---|
| 176 | + } |
---|
| 177 | + |
---|
| 178 | + public void AddSkyboxTab2(JTabbedPane skyboxpanel) |
---|
| 179 | + { |
---|
| 180 | + cGridBag tab0 = new cGridBag().setVertical(true); |
---|
| 181 | + |
---|
| 182 | + tab0.setName("Night"); |
---|
| 183 | + skyboxpanel.add(tab0); |
---|
| 184 | + |
---|
| 185 | + cGridBag row0 = new cGridBag(); |
---|
| 186 | + cGridBag row1 = new cGridBag(); |
---|
| 187 | + cGridBag row2 = new cGridBag(); |
---|
| 188 | + cGridBag row3 = new cGridBag(); |
---|
| 189 | + cGridBag row4 = new cGridBag(); |
---|
| 190 | + cGridBag row5 = new cGridBag(); |
---|
| 191 | + cGridBag row6 = new cGridBag(); |
---|
| 192 | + |
---|
| 193 | + AddSkyboxButton("night", "NightPath", row0); |
---|
| 194 | + AddSkyboxButton("night", "PondNight", row0); |
---|
| 195 | + AddSkyboxButton("night", "Powerlines", row0); |
---|
| 196 | + AddSkyboxButton("night", "SwedishRoyalCastle", row0); |
---|
| 197 | + |
---|
| 198 | + AddSkyboxButton("urban", "CNTower", row1); |
---|
| 199 | + AddSkyboxButton("bridge", "ArstaBridge", row1); |
---|
| 200 | + AddSkyboxButton("indoors", "DallasW", row1); |
---|
| 201 | + AddSkyboxButton("indoors", "MarriottMadisonWest", row1); |
---|
| 202 | + |
---|
| 203 | + AddSkyboxButton("indoors", "Vasa", row2); |
---|
| 204 | + AddSkyboxButton("winter", "Backyard", row2); |
---|
| 205 | + AddSkyboxButton("winter", "Creek", row2); |
---|
| 206 | + AddSkyboxButton("winter", "FootballField3", row2); |
---|
| 207 | + |
---|
| 208 | + AddSkyboxButton("winter", "Forest", row3); |
---|
| 209 | + AddSkyboxButton("winter", "HornstullsStrand2", row3); |
---|
| 210 | + AddSkyboxButton("winter", "House", row3); |
---|
| 211 | + AddSkyboxButton("winter", "IceLake", row3); |
---|
| 212 | + |
---|
| 213 | + AddSkyboxButton("winter", "IceRiver", row4); |
---|
| 214 | + AddSkyboxButton("winter", "Park3", row4); |
---|
| 215 | + AddSkyboxButton("winter", "PondWinter", row4); |
---|
| 216 | + |
---|
| 217 | + AddSkyboxButton("winter", "Tantolunden5", row5); |
---|
| 218 | + AddSkyboxButton("winter", "Vindelalven", row5); |
---|
| 219 | + /* |
---|
| 220 | +Backyard |
---|
| 221 | +Creek |
---|
| 222 | +FootballField3 |
---|
| 223 | +Forest |
---|
| 224 | +HornstullsStrand2 |
---|
| 225 | +House |
---|
| 226 | +IceLake |
---|
| 227 | +IceRiver |
---|
| 228 | +Park3 |
---|
| 229 | +PondWinter |
---|
| 230 | +Tantolunden5 |
---|
| 231 | +Vindelalven * |
---|
| 232 | + */ |
---|
| 233 | + |
---|
| 234 | + tab0.add(row0); |
---|
| 235 | + tab0.add(row1); |
---|
| 236 | + tab0.add(row2); |
---|
| 237 | + tab0.add(row3); |
---|
| 238 | + tab0.add(row4); |
---|
| 239 | + tab0.add(row5); |
---|
| 240 | + tab0.add(row6); |
---|
| 241 | + |
---|
| 242 | + for (int i=5; --i>=0;) |
---|
| 243 | + { |
---|
| 244 | + //oe.toolboxPanel.Return(); |
---|
| 245 | + //tab0.add(new cGridBag()); |
---|
| 246 | + } |
---|
| 247 | + } |
---|
| 248 | + |
---|
| 249 | + public void ChangeSkybox(String name) |
---|
| 250 | + { |
---|
| 251 | + cameraView.envyoff = false; |
---|
| 252 | + cameraView.skyboxname = name; |
---|
| 253 | + cameraView.skyboxext = "jpg"; |
---|
| 254 | + cameraView.repaint(); |
---|
| 255 | + } |
---|
| 256 | + |
---|
26 | 257 | //ObjEditor objEditor; |
---|
27 | 258 | public void closeUI2() |
---|
28 | 259 | { |
---|
.. | .. |
---|
60 | 291 | this.copy = this.group = group; |
---|
61 | 292 | //selectees = this.group.selectees; |
---|
62 | 293 | |
---|
| 294 | + if (copy.versions == null) |
---|
| 295 | + { |
---|
| 296 | + copy.versions = new byte[100][]; |
---|
| 297 | + copy.versionindex = -1; |
---|
| 298 | + } |
---|
| 299 | + |
---|
63 | 300 | if(ui) |
---|
64 | 301 | SetupUI(objEditor); |
---|
65 | 302 | } |
---|
.. | .. |
---|
80 | 317 | SetupViews(objEditor); |
---|
81 | 318 | |
---|
82 | 319 | ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true); |
---|
| 320 | + |
---|
| 321 | + if (copy.versions == null) |
---|
| 322 | + { |
---|
| 323 | + copy.versions = new byte[100][]; |
---|
| 324 | + copy.versionindex = -1; |
---|
| 325 | + |
---|
| 326 | + Save(true); |
---|
| 327 | + } |
---|
83 | 328 | } |
---|
84 | 329 | |
---|
85 | 330 | void CloneSelection(boolean supports) |
---|
86 | 331 | { |
---|
| 332 | + if (Globals.REPLACEONMAKE) |
---|
| 333 | + Save(); |
---|
| 334 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 335 | + Globals.REPLACEONMAKE = false; |
---|
87 | 336 | // Object3D keep = GrafreeD.clipboard; |
---|
88 | 337 | //Object3D obj; |
---|
89 | 338 | for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
94 | 343 | |
---|
95 | 344 | makeSomething(clone, i==group.selection.size()-1); |
---|
96 | 345 | } |
---|
| 346 | + Globals.REPLACEONMAKE = keep; |
---|
97 | 347 | } |
---|
98 | 348 | |
---|
99 | 349 | void CloneClipboard(boolean supports) |
---|
.. | .. |
---|
189 | 439 | // pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
190 | 440 | // pasteExpandItem.addActionListener(this); |
---|
191 | 441 | menu.add("-"); |
---|
192 | | - clearItem = menu.add(new MenuItem("Clear")); |
---|
193 | | - clearItem.addActionListener(this); |
---|
| 442 | + deleteItem = menu.add(new MenuItem("Delete")); |
---|
| 443 | + deleteItem.addActionListener(this); |
---|
194 | 444 | |
---|
195 | 445 | if (Globals.ADVANCED) |
---|
196 | 446 | { |
---|
.. | .. |
---|
220 | 470 | // toggleSwitchItem.addItemListener(this); |
---|
221 | 471 | // toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
222 | 472 | |
---|
223 | | - cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
| 473 | + cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles")); |
---|
224 | 474 | toggleHandleItem.addItemListener(this); |
---|
225 | 475 | toggleHandleItem.setState(CameraPane.HANDLES); |
---|
226 | 476 | |
---|
.. | .. |
---|
380 | 630 | shadowYItem.addActionListener(this); |
---|
381 | 631 | shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
382 | 632 | shadowZItem.addActionListener(this); |
---|
| 633 | + attributeItem = menu.add(new MenuItem("Attribute")); |
---|
| 634 | + attributeItem.addActionListener(this); |
---|
| 635 | + |
---|
383 | 636 | if (Globals.ADVANCED) |
---|
384 | 637 | { |
---|
385 | 638 | menu.add("-"); |
---|
386 | 639 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
387 | 640 | linkerItem.addActionListener(this); |
---|
388 | | - attributeItem = menu.add(new MenuItem("Attribute")); |
---|
389 | | - attributeItem.addActionListener(this); |
---|
390 | 641 | templateItem = menu.add(new MenuItem("Template")); |
---|
391 | 642 | templateItem.addActionListener(this); |
---|
392 | 643 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
.. | .. |
---|
415 | 666 | genNormalsMESHItem.addActionListener(this); |
---|
416 | 667 | if (Globals.ADVANCED) |
---|
417 | 668 | { |
---|
418 | | - genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
| 669 | + genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals")); |
---|
419 | 670 | genNormalsMINEItem.addActionListener(this); |
---|
420 | 671 | } |
---|
421 | 672 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
.. | .. |
---|
508 | 759 | attachBumpItem.addActionListener(this); |
---|
509 | 760 | pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump")); |
---|
510 | 761 | pigmentBumpItem.addActionListener(this); |
---|
| 762 | + //embedTexturesItem |
---|
511 | 763 | detachPigmentItem = menu.add(new MenuItem("Detach Pigment")); |
---|
512 | 764 | detachPigmentItem.addActionListener(this); |
---|
513 | 765 | detachBumpItem = menu.add(new MenuItem("Detach Bump")); |
---|
514 | 766 | detachBumpItem.addActionListener(this); |
---|
| 767 | + embedTexturesItem = menu.add(new MenuItem("Embed Textures")); |
---|
| 768 | + embedTexturesItem.addActionListener(this); |
---|
| 769 | + deEmbedTexturesItem = menu.add(new MenuItem("De-embed Textures")); |
---|
| 770 | + deEmbedTexturesItem.addActionListener(this); |
---|
515 | 771 | menu.add("-"); |
---|
516 | 772 | sortbysizeItem = menu.add(new MenuItem("Sort by size")); |
---|
517 | 773 | sortbysizeItem.addActionListener(this); |
---|
.. | .. |
---|
538 | 794 | buildToolsMenu(menu); |
---|
539 | 795 | } |
---|
540 | 796 | |
---|
| 797 | + |
---|
541 | 798 | void SetupUI2(ObjEditor oe) |
---|
542 | 799 | { |
---|
543 | 800 | // June 2019 |
---|
.. | .. |
---|
590 | 847 | //minButton.setToolTipText("Minimize window"); |
---|
591 | 848 | //minButton.addActionListener(this); |
---|
592 | 849 | |
---|
593 | | - oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
594 | | - maxButton.setToolTipText("Maximize window"); |
---|
595 | | - maxButton.addActionListener(this); |
---|
| 850 | + if (Globals.ADVANCED) |
---|
| 851 | + { |
---|
| 852 | + oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 853 | + maxButton.setToolTipText("Maximize window"); |
---|
| 854 | + maxButton.addActionListener(this); |
---|
| 855 | + } |
---|
596 | 856 | |
---|
597 | 857 | oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
598 | 858 | fullButton.setToolTipText("Full-screen window"); |
---|
599 | 859 | fullButton.addActionListener(this); |
---|
600 | 860 | |
---|
| 861 | + oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 862 | + screenfitButton.setToolTipText("Screen fit"); |
---|
| 863 | + screenfitButton.addActionListener(this); |
---|
| 864 | + |
---|
601 | 865 | oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
602 | 866 | restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
603 | 867 | restoreCameraButton.addActionListener(this); |
---|
604 | 868 | |
---|
| 869 | + copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 870 | + saveButton.setToolTipText("New version"); |
---|
| 871 | + saveButton.addActionListener(this); |
---|
| 872 | + |
---|
605 | 873 | copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
606 | | - undoButton.setToolTipText("Undo changes"); |
---|
| 874 | + undoButton.setToolTipText("Previous version"); |
---|
607 | 875 | undoButton.addActionListener(this); |
---|
608 | 876 | undoButton.setEnabled(false); |
---|
609 | 877 | |
---|
| 878 | + cGridBag updown = new cGridBag().setVertical(true); |
---|
| 879 | + updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 880 | + restoreButton.setToolTipText("Restore current"); |
---|
| 881 | + restoreButton.addActionListener(this); |
---|
| 882 | + restoreButton.setEnabled(false); |
---|
| 883 | + |
---|
| 884 | + updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 885 | + replaceButton.setToolTipText("Replace current"); |
---|
| 886 | + replaceButton.addActionListener(this); |
---|
| 887 | + replaceButton.setEnabled(false); |
---|
| 888 | + |
---|
| 889 | + copyOptionsPanel.add(updown); |
---|
| 890 | + |
---|
610 | 891 | copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
611 | | - redoButton.setToolTipText("Redo changes"); |
---|
| 892 | + redoButton.setToolTipText("Next version"); |
---|
612 | 893 | redoButton.addActionListener(this); |
---|
613 | 894 | redoButton.setEnabled(false); |
---|
614 | 895 | |
---|
615 | | - copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
616 | | - saveButton.setToolTipText("Save changes"); |
---|
617 | | - saveButton.addActionListener(this); |
---|
618 | | - |
---|
619 | | - copyOptionsPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 896 | + oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
620 | 897 | liveCB.setToolTipText("Enable animation"); |
---|
621 | 898 | liveCB.addItemListener(this); |
---|
622 | 899 | |
---|
623 | | - copyOptionsPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 900 | + oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
624 | 901 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
625 | 902 | oneStepButton.addActionListener(this); |
---|
626 | 903 | |
---|
627 | | - copyOptionsPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
| 904 | + oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
628 | 905 | fastCB.setToolTipText("Fast mode"); |
---|
629 | 906 | fastCB.addItemListener(this); |
---|
630 | 907 | |
---|
631 | 908 | //oe.toolboxPanel.Return(); |
---|
632 | 909 | |
---|
633 | | - copyOptionsPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
634 | | - screenfitButton.setToolTipText("Screen fit"); |
---|
635 | | - screenfitButton.addActionListener(this); |
---|
636 | | - |
---|
637 | 910 | // copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
638 | 911 | // trackCB.setToolTipText("Enable tracking"); |
---|
639 | 912 | // trackCB.addItemListener(this); |
---|
.. | .. |
---|
646 | 919 | oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
647 | 920 | snapobjectButton.addActionListener(this); |
---|
648 | 921 | snapobjectButton.setToolTipText("Snap Object"); |
---|
| 922 | + |
---|
| 923 | + oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 924 | + fourButton.addActionListener(this); |
---|
| 925 | + fourButton.setToolTipText("Show control panel only"); |
---|
649 | 926 | } |
---|
650 | 927 | |
---|
651 | 928 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
652 | 929 | |
---|
653 | | - oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
654 | | - twoButton.setToolTipText("Show center view only"); |
---|
| 930 | + oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 931 | + twoButton.setToolTipText("Show 3D view only"); |
---|
655 | 932 | twoButton.addActionListener(this); |
---|
656 | 933 | this.fullscreenLayout = twoButton; |
---|
657 | 934 | |
---|
658 | | - oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
659 | | - fourButton.addActionListener(this); |
---|
660 | | - fourButton.setToolTipText("Show left panel only"); |
---|
661 | | - oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
662 | | - sixButton.setToolTipText("2-column layout left"); |
---|
663 | | - sixButton.addActionListener(this); |
---|
664 | | - oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
665 | | - threeButton.setToolTipText("2-column layout right"); |
---|
| 935 | + oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 936 | + threeButton.setToolTipText("Show controls and 3D view"); |
---|
666 | 937 | threeButton.addActionListener(this); |
---|
667 | | - oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
668 | | - sevenButton.setToolTipText("3-column layout"); |
---|
669 | | - sevenButton.addActionListener(this); |
---|
| 938 | + oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 939 | + sixButton.setToolTipText("Show 3D view and controls"); |
---|
| 940 | + sixButton.addActionListener(this); |
---|
| 941 | +// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 942 | +// sevenButton.setToolTipText("3-column layout"); |
---|
| 943 | +// sevenButton.addActionListener(this); |
---|
670 | 944 | // |
---|
671 | 945 | |
---|
672 | | - oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
673 | | - rootButton.setToolTipText("Edit selection in new tab"); |
---|
| 946 | + oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 947 | + rootButton.setToolTipText("Open selection in new tab"); |
---|
674 | 948 | rootButton.addActionListener(this); |
---|
675 | 949 | |
---|
676 | 950 | oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
679 | 953 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
680 | 954 | //clearButton.addActionListener(this); |
---|
681 | 955 | |
---|
| 956 | + cGridBag row1 = new cGridBag(); |
---|
| 957 | + |
---|
682 | 958 | // INSERT |
---|
683 | | - oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 959 | + row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
684 | 960 | gridButton.setToolTipText("Create grid"); |
---|
685 | 961 | gridButton.addActionListener(this); |
---|
686 | 962 | |
---|
687 | | - oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 963 | + row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
688 | 964 | boxButton.setToolTipText("Create box"); |
---|
689 | 965 | boxButton.addActionListener(this); |
---|
690 | 966 | |
---|
691 | | - oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 967 | + row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
692 | 968 | sphereButton.setToolTipText("Create sphere"); |
---|
693 | 969 | sphereButton.addActionListener(this); |
---|
694 | 970 | |
---|
695 | | - oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 971 | + row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
696 | 972 | coneButton.setToolTipText("Create cone"); |
---|
697 | 973 | coneButton.addActionListener(this); |
---|
698 | 974 | |
---|
699 | | - oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 975 | + row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
700 | 976 | torusButton.setToolTipText("Create torus"); |
---|
701 | 977 | torusButton.addActionListener(this); |
---|
702 | 978 | |
---|
703 | | - oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 979 | + row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
704 | 980 | superButton.setToolTipText("Create superellipsoid"); |
---|
705 | 981 | superButton.addActionListener(this); |
---|
706 | 982 | |
---|
.. | .. |
---|
711 | 987 | kleinButton.addActionListener(this); |
---|
712 | 988 | } |
---|
713 | 989 | |
---|
714 | | - oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 990 | + row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
715 | 991 | particlesButton.setToolTipText("Create particle system"); |
---|
716 | 992 | particlesButton.addActionListener(this); |
---|
717 | 993 | |
---|
718 | | - oe.toolboxPanel.Return(); |
---|
| 994 | + oe.toolboxPanel.add(row1); |
---|
719 | 995 | |
---|
720 | | - oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 996 | + cGridBag row2 = new cGridBag(); |
---|
| 997 | + |
---|
| 998 | + row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
721 | 999 | groupButton.setToolTipText("Create group"); |
---|
722 | 1000 | groupButton.addActionListener(this); |
---|
723 | 1001 | |
---|
724 | | - oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1002 | + row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
725 | 1003 | compositeButton.setToolTipText("Create composite"); |
---|
726 | 1004 | compositeButton.addActionListener(this); |
---|
727 | 1005 | |
---|
728 | | - oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
729 | | - switchButton.setToolTipText("Create switch"); |
---|
| 1006 | + row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1007 | + switchButton.setToolTipText("Create item switcher"); |
---|
730 | 1008 | switchButton.addActionListener(this); |
---|
731 | 1009 | |
---|
732 | | - oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1010 | + row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
733 | 1011 | loopButton.setToolTipText("Create loop"); |
---|
734 | 1012 | loopButton.addActionListener(this); |
---|
735 | 1013 | |
---|
736 | | - oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1014 | + row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
737 | 1015 | textureButton.setToolTipText("Create texture"); |
---|
738 | 1016 | textureButton.addActionListener(this); |
---|
739 | 1017 | |
---|
740 | | - oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1018 | + row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
741 | 1019 | overlayButton.setToolTipText("Create overlay"); |
---|
742 | 1020 | overlayButton.addActionListener(this); |
---|
743 | 1021 | |
---|
744 | | - oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1022 | + row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
745 | 1023 | lightButton.setToolTipText("Create light"); |
---|
746 | 1024 | lightButton.addActionListener(this); |
---|
747 | 1025 | |
---|
748 | | - for (int i=6; --i>=0;) |
---|
749 | | - { |
---|
750 | | - oe.toolboxPanel.Return(); |
---|
751 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
752 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
753 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
754 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
755 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
756 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
757 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
758 | | - } |
---|
| 1026 | + oe.toolboxPanel.add(row2); |
---|
| 1027 | + |
---|
| 1028 | + // ENVYMAPS |
---|
| 1029 | + cGridBag skyboxpane = new cGridBag(); |
---|
| 1030 | + skyboxpane.preferredHeight = 100; |
---|
| 1031 | + |
---|
| 1032 | + oe.toolboxPanel.add(skyboxpane); |
---|
| 1033 | + |
---|
| 1034 | + JTabbedPane skyboxpanel = new JTabbedPane(); |
---|
| 1035 | + skyboxpane.add(skyboxpanel); |
---|
| 1036 | + |
---|
| 1037 | + AddSkyboxTab0(skyboxpanel); |
---|
| 1038 | + AddSkyboxTab1(skyboxpanel); |
---|
| 1039 | + AddSkyboxTab2(skyboxpanel); |
---|
759 | 1040 | |
---|
760 | 1041 | // EDIT panel |
---|
761 | | - editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
762 | | - editButton.setToolTipText("Edit selection"); |
---|
| 1042 | + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1043 | + editButton.setToolTipText("Pin selection controls"); |
---|
763 | 1044 | editButton.addActionListener(this); |
---|
764 | 1045 | |
---|
765 | | - editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
766 | | - uneditButton.setToolTipText("Unedit selection"); |
---|
| 1046 | + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1047 | + uneditButton.setToolTipText("Remove selection controls"); |
---|
767 | 1048 | uneditButton.addActionListener(this); |
---|
768 | 1049 | |
---|
769 | 1050 | editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
770 | | - allParamsButton.setToolTipText("Edit all params"); |
---|
| 1051 | + allParamsButton.setToolTipText("Show all controle"); |
---|
771 | 1052 | allParamsButton.addActionListener(this); |
---|
772 | 1053 | |
---|
773 | 1054 | editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
784 | 1065 | |
---|
785 | 1066 | editCommandsPanel.preferredHeight = 1; |
---|
786 | 1067 | |
---|
| 1068 | + SetPinStates(false); |
---|
787 | 1069 | // oe.treePanel.add(commandsPanel); |
---|
788 | 1070 | // oe.treePanel.Return(); |
---|
789 | 1071 | |
---|
.. | .. |
---|
810 | 1092 | |
---|
811 | 1093 | oe.treePanel.add(copyOptionsPanel); |
---|
812 | 1094 | oe.treePanel.Return(); |
---|
| 1095 | + cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); |
---|
| 1096 | + versionSlider = (cNumberSlider)sliderPane.getComponent(1); |
---|
| 1097 | + sliderPane.preferredHeight = 1; |
---|
813 | 1098 | |
---|
814 | | -// mainPanel.setDividerLocation(0.5); //1.0); |
---|
815 | | -// mainPanel.setResizeWeight(0.5); |
---|
| 1099 | +// mainPanel.setDividerLocation(0.1); //1.0); |
---|
| 1100 | + mainPanel.setResizeWeight(0.4); |
---|
816 | 1101 | |
---|
817 | 1102 | //jList.addListSelectionListener(this); |
---|
818 | 1103 | oe.jTree.addTreeSelectionListener(this); |
---|
.. | .. |
---|
820 | 1105 | //jTree.setEditable(true); |
---|
821 | 1106 | oe.jTree.setDragEnabled(true); |
---|
822 | 1107 | //jTree.setPreferredSize(new Dimension(10,10)); |
---|
823 | | - jSP.setPreferredSize(new Dimension(100,200)); |
---|
| 1108 | + //jSP.setPreferredSize(new Dimension(100,200)); |
---|
824 | 1109 | |
---|
825 | 1110 | oe.jTree.setCellRenderer(new cTreeModel.Renderer()); |
---|
826 | 1111 | |
---|
.. | .. |
---|
832 | 1117 | dgr.addDragGestureListener(this); |
---|
833 | 1118 | }catch(Exception e) {} |
---|
834 | 1119 | */ |
---|
835 | | - radio.layout = sevenButton; |
---|
| 1120 | + radio.layout = sixButton; // sevenButton; |
---|
836 | 1121 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
837 | 1122 | } |
---|
838 | 1123 | |
---|
.. | .. |
---|
857 | 1142 | boxCB.addItemListener(this); |
---|
858 | 1143 | |
---|
859 | 1144 | panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
860 | | - zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 1145 | + zoomBoxCB.setToolTipText("Display only for wheel"); |
---|
861 | 1146 | zoomBoxCB.addItemListener(this); |
---|
862 | 1147 | |
---|
863 | 1148 | if (true) // Globals.ADVANCED) |
---|
864 | 1149 | { |
---|
865 | | - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
866 | | - supportCB.setToolTipText("Enable rigging"); |
---|
867 | | - supportCB.addItemListener(this); |
---|
| 1150 | +// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 1151 | +// supportCB.setToolTipText("Enable rigging"); |
---|
| 1152 | +// supportCB.addItemListener(this); |
---|
| 1153 | + |
---|
| 1154 | + panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints); |
---|
| 1155 | + freezeCB.setToolTipText("Fast moving camera"); |
---|
| 1156 | + freezeCB.addItemListener(this); |
---|
868 | 1157 | |
---|
869 | 1158 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
870 | 1159 | // localCB.addItemListener(this); |
---|
.. | .. |
---|
919 | 1208 | oeilCB.addItemListener(this); |
---|
920 | 1209 | |
---|
921 | 1210 | panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
922 | | - shadowCB.setToolTipText("Compute shadows when live"); |
---|
| 1211 | + shadowCB.setToolTipText("When live compute shadows"); |
---|
923 | 1212 | shadowCB.addItemListener(this); |
---|
924 | 1213 | |
---|
925 | 1214 | panel.Return(); |
---|
.. | .. |
---|
928 | 1217 | toggleTextureCB.addItemListener(this); |
---|
929 | 1218 | |
---|
930 | 1219 | panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints); |
---|
931 | | - toggleSwitchCB.setToolTipText("Use switch"); |
---|
| 1220 | + toggleSwitchCB.setToolTipText("Choose a single item"); |
---|
932 | 1221 | toggleSwitchCB.addItemListener(this); |
---|
933 | 1222 | |
---|
934 | | - panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); |
---|
935 | | - autosaveCB.setToolTipText("Auto-save on structure change"); |
---|
936 | | - autosaveCB.addItemListener(this); |
---|
| 1223 | + panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints); |
---|
| 1224 | + autokeepCB.setToolTipText("On structure change"); |
---|
| 1225 | + autokeepCB.addItemListener(this); |
---|
937 | 1226 | |
---|
938 | 1227 | panel.Return(); |
---|
939 | 1228 | if (Globals.ADVANCED) |
---|
.. | .. |
---|
962 | 1251 | { |
---|
963 | 1252 | cRadio radioButton = new cRadio(obj.name); |
---|
964 | 1253 | |
---|
965 | | - // Patch to avoid bug with transparency. |
---|
| 1254 | + // June 2019. Patch to avoid bug with transparency. |
---|
966 | 1255 | radioButton.hadMaterial = obj.material != null; |
---|
967 | 1256 | if (!radioButton.hadMaterial) |
---|
968 | 1257 | { |
---|
.. | .. |
---|
970 | 1259 | } |
---|
971 | 1260 | |
---|
972 | 1261 | radioButton.SetObject(obj); |
---|
973 | | - radioButton.layout = sevenButton; |
---|
| 1262 | + radioButton.layout = sixButton; // sevenButton; |
---|
974 | 1263 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
975 | 1264 | radioButton.addActionListener(this); |
---|
976 | 1265 | radioPanel.add(radioButton); |
---|
.. | .. |
---|
999 | 1288 | cCheckBox slowCB; |
---|
1000 | 1289 | cCheckBox boxCB; |
---|
1001 | 1290 | cCheckBox zoomBoxCB; |
---|
| 1291 | + cCheckBox freezeCB; |
---|
1002 | 1292 | //cToggleButton trackCB; |
---|
1003 | 1293 | cCheckBox trackCB; |
---|
1004 | 1294 | cCheckBox smoothfocusCB; |
---|
.. | .. |
---|
1009 | 1299 | |
---|
1010 | 1300 | cCheckBox oeilCB; |
---|
1011 | 1301 | cCheckBox shadowCB; |
---|
1012 | | - cCheckBox autosaveCB; |
---|
| 1302 | + cCheckBox autokeepCB; |
---|
1013 | 1303 | cCheckBox lookAtCB; |
---|
1014 | 1304 | |
---|
1015 | 1305 | // static int COLOR = 1; |
---|
.. | .. |
---|
1117 | 1407 | { |
---|
1118 | 1408 | Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
1119 | 1409 | } |
---|
1120 | | - else if(e.getSource() == autosaveCB) |
---|
| 1410 | + else if(e.getSource() == freezeCB) |
---|
1121 | 1411 | { |
---|
1122 | | - Globals.SAVEONMAKE ^= true; |
---|
| 1412 | + Globals.FREEZEONMOVE ^= true; |
---|
| 1413 | + } |
---|
| 1414 | + else if(e.getSource() == autokeepCB) |
---|
| 1415 | + { |
---|
| 1416 | + Globals.REPLACEONMAKE ^= true; |
---|
1123 | 1417 | } |
---|
1124 | 1418 | else if(e.getSource() == lookAtCB) |
---|
1125 | 1419 | { |
---|
.. | .. |
---|
1201 | 1495 | } |
---|
1202 | 1496 | } |
---|
1203 | 1497 | |
---|
1204 | | - String string = (String) object; |
---|
1205 | | - |
---|
1206 | 1498 | System.out.println("Transfer = " + object + "; drop : " + target); |
---|
1207 | 1499 | // if( object instanceof java.io.File[]) |
---|
1208 | 1500 | // { |
---|
.. | .. |
---|
1210 | 1502 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
1211 | 1503 | // return; |
---|
1212 | 1504 | // } |
---|
| 1505 | + |
---|
| 1506 | + String string = object.toString(); |
---|
1213 | 1507 | |
---|
1214 | 1508 | // File path for Mac and Windows |
---|
1215 | 1509 | if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
.. | .. |
---|
1459 | 1753 | animationItem.addItemListener(this); |
---|
1460 | 1754 | animationItem.setState(Globals.ANIMATION); |
---|
1461 | 1755 | |
---|
| 1756 | + menu.add(archiveItem = new MenuItem("Archive3D...")); |
---|
| 1757 | + archiveItem.addActionListener(this); |
---|
| 1758 | + |
---|
1462 | 1759 | menu.add("-"); |
---|
1463 | 1760 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1464 | 1761 | parseverticesItem.addActionListener(this); |
---|
.. | .. |
---|
1471 | 1768 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1472 | 1769 | reduce34MorphItem.addActionListener(this); |
---|
1473 | 1770 | menu.add("-"); |
---|
| 1771 | + menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
| 1772 | + memoryItem.addActionListener(this); |
---|
1474 | 1773 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1475 | 1774 | computeAOItem.addActionListener(this); |
---|
1476 | 1775 | |
---|
.. | .. |
---|
1479 | 1778 | mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1480 | 1779 | mirrorItem.addActionListener(this); |
---|
1481 | 1780 | menu.add("-"); |
---|
1482 | | - menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1483 | | - memoryItem.addActionListener(this); |
---|
1484 | 1781 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1485 | 1782 | analyzeItem.addActionListener(this); |
---|
1486 | 1783 | menu.add(dumpItem = new MenuItem("Print")); |
---|
.. | .. |
---|
1628 | 1925 | |
---|
1629 | 1926 | makeSomething(shadow); |
---|
1630 | 1927 | } |
---|
| 1928 | + |
---|
| 1929 | + private void ClearUnpinned() |
---|
| 1930 | + { |
---|
| 1931 | + //for (Object3D obj : listUI) |
---|
| 1932 | + for (int i=listUI.size(); --i>=0;) |
---|
| 1933 | + { |
---|
| 1934 | + Object3D obj = listUI.elementAt(i); |
---|
| 1935 | + if (!obj.pinned) |
---|
| 1936 | + { |
---|
| 1937 | + obj.CloseUI(); |
---|
| 1938 | + listUI.remove(i); |
---|
| 1939 | + } |
---|
| 1940 | + } |
---|
| 1941 | + } |
---|
| 1942 | + |
---|
| 1943 | + private void EditElement(Object3D elem, boolean newWindow) |
---|
| 1944 | + { |
---|
| 1945 | + // if (!(elem instanceof Composite)) |
---|
| 1946 | + // newWindow = false; |
---|
| 1947 | + listUI.add(elem); |
---|
| 1948 | + elem.openEditWindow(this, newWindow); //, false); |
---|
| 1949 | + System.out.println("edit : " + elem); |
---|
| 1950 | + elem.editWindow.refreshContents(true); // ? new |
---|
| 1951 | + } |
---|
1631 | 1952 | |
---|
1632 | 1953 | /** |
---|
1633 | 1954 | * applyExample |
---|
.. | .. |
---|
2056 | 2377 | { |
---|
2057 | 2378 | makeSomething(new Light()); |
---|
2058 | 2379 | } else |
---|
| 2380 | +// if (source == skybox1Button || |
---|
| 2381 | +// source == skybox2Button || |
---|
| 2382 | +// source == skybox3Button || |
---|
| 2383 | +// source == skybox4Button || |
---|
| 2384 | +// source == skybox5Button || |
---|
| 2385 | +// source == skybox6Button || |
---|
| 2386 | +// source == skybox7Button || |
---|
| 2387 | +// source == skybox11Button || |
---|
| 2388 | +// source == skybox12Button || |
---|
| 2389 | +// source == skybox13Button || |
---|
| 2390 | +// source == skybox14Button || |
---|
| 2391 | +// source == skybox15Button || |
---|
| 2392 | +// source == skybox16Button || |
---|
| 2393 | +// source == skybox17Button) |
---|
| 2394 | +// { |
---|
| 2395 | +// ChangeSkybox(source); |
---|
| 2396 | +// } else |
---|
2059 | 2397 | if (source == csgItem) |
---|
2060 | 2398 | { |
---|
2061 | 2399 | group(new CSG()); |
---|
.. | .. |
---|
2107 | 2445 | Composite csg = new GroupLeaf(); |
---|
2108 | 2446 | csg.count = 5; |
---|
2109 | 2447 | group(csg); |
---|
2110 | | - Composite child = new cGroup(); |
---|
| 2448 | + Composite child = new cGroup("Branch"); |
---|
2111 | 2449 | csg.addChild(child); |
---|
2112 | 2450 | child.addChild(csg); |
---|
2113 | 2451 | } else |
---|
2114 | 2452 | if (source == doubleItem) |
---|
2115 | 2453 | { |
---|
2116 | | - Composite csg = new GroupLeaf(); |
---|
| 2454 | + Composite csg = new GroupLeaf("Fork"); |
---|
2117 | 2455 | csg.count = 5; |
---|
2118 | 2456 | group(csg); |
---|
2119 | | - Composite child = new cGroup(); |
---|
| 2457 | + Composite child = new cGroup("Branch A"); |
---|
2120 | 2458 | csg.addChild(child); |
---|
2121 | 2459 | child.addChild(csg); |
---|
2122 | | - child = new cGroup(); |
---|
| 2460 | + child = new cGroup("Branch B"); |
---|
2123 | 2461 | csg.addChild(child); |
---|
2124 | 2462 | child.addChild(csg); |
---|
2125 | 2463 | } else |
---|
2126 | 2464 | if (source == tripleItem) |
---|
2127 | 2465 | { |
---|
2128 | | - Composite csg = new GroupLeaf(); |
---|
| 2466 | + Composite csg = new GroupLeaf("Trident"); |
---|
2129 | 2467 | csg.count = 4; |
---|
2130 | 2468 | group(csg); |
---|
2131 | 2469 | Composite child = new cGroup(); |
---|
.. | .. |
---|
2141 | 2479 | if (source == computeAOItem) |
---|
2142 | 2480 | { |
---|
2143 | 2481 | Globals.drawMode = CameraPane.OCCLUSION; |
---|
2144 | | - Globals.theRenderer.repaint(); |
---|
| 2482 | + cameraView.repaint(); |
---|
2145 | 2483 | } else |
---|
2146 | 2484 | if (source == recompileItem) |
---|
2147 | 2485 | { |
---|
.. | .. |
---|
2189 | 2527 | } else |
---|
2190 | 2528 | if (source == undoButton) |
---|
2191 | 2529 | { |
---|
| 2530 | + // Go to previous version |
---|
| 2531 | + //if (!Undo()) |
---|
| 2532 | + //java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2192 | 2533 | Undo(); |
---|
| 2534 | + } else |
---|
| 2535 | + if (source == restoreButton) |
---|
| 2536 | + { |
---|
| 2537 | + // Restore current version |
---|
| 2538 | + Restore(); |
---|
| 2539 | + } else |
---|
| 2540 | + if (source == replaceButton) |
---|
| 2541 | + { |
---|
| 2542 | + // Overwrite current version |
---|
| 2543 | + Replace(); |
---|
2193 | 2544 | } else |
---|
2194 | 2545 | if (source == redoButton) |
---|
2195 | 2546 | { |
---|
| 2547 | + // Go to next version |
---|
2196 | 2548 | Redo(); |
---|
2197 | 2549 | } else |
---|
2198 | 2550 | if (source == saveButton) |
---|
2199 | 2551 | { |
---|
2200 | | - Save(); |
---|
| 2552 | + // Save a new version |
---|
| 2553 | + if (!Save(true)) |
---|
| 2554 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2201 | 2555 | } else |
---|
2202 | 2556 | if (source == oneStepButton) |
---|
2203 | 2557 | { |
---|
.. | .. |
---|
2206 | 2560 | } else |
---|
2207 | 2561 | if (source == screenfitButton) |
---|
2208 | 2562 | { |
---|
2209 | | - //Reload(lastConverter, lastFilename, true); |
---|
2210 | 2563 | ScreenFit(); |
---|
2211 | 2564 | } else |
---|
2212 | 2565 | if (source == screenfitpointButton) |
---|
2213 | 2566 | { |
---|
2214 | | - //Reload(lastConverter, lastFilename, true); |
---|
2215 | 2567 | ScreenFitPoint(); |
---|
2216 | 2568 | } else |
---|
2217 | 2569 | if (source == snapobjectButton) |
---|
2218 | 2570 | { |
---|
2219 | | - //Reload(lastConverter, lastFilename, true); |
---|
2220 | 2571 | SnapObject(); |
---|
2221 | 2572 | } else |
---|
2222 | 2573 | // if (event.getSource() == recompileButton) |
---|
.. | .. |
---|
2580 | 2931 | { |
---|
2581 | 2932 | StepAll(); |
---|
2582 | 2933 | } else |
---|
2583 | | - if (source == clearItem) // || event.getSource() == clearButton) |
---|
| 2934 | + if (source == deleteItem) // || event.getSource() == clearButton) |
---|
2584 | 2935 | { |
---|
2585 | 2936 | //int indices[] = jList.getSelectedIndices(); |
---|
2586 | 2937 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
2740 | 3091 | } else |
---|
2741 | 3092 | if (source == ungroupItem || source == ungroupButton) |
---|
2742 | 3093 | { |
---|
2743 | | - //ungroup(); |
---|
| 3094 | + boolean hasRoot = false; |
---|
| 3095 | + |
---|
2744 | 3096 | for (int i=0; i<group.selection.size(); i++) |
---|
2745 | 3097 | { |
---|
2746 | | - Ungroup(group.selection.get(i)); |
---|
| 3098 | + if (group.selection.get(i) == group) |
---|
| 3099 | + { |
---|
| 3100 | + hasRoot = true; |
---|
| 3101 | + break; |
---|
| 3102 | + } |
---|
2747 | 3103 | } |
---|
2748 | 3104 | |
---|
2749 | | - ClearSelection(false); |
---|
2750 | | - |
---|
2751 | | - refreshContents(); |
---|
| 3105 | + if (!hasRoot) |
---|
| 3106 | + { |
---|
| 3107 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 3108 | + { |
---|
| 3109 | + Ungroup(group.selection.get(i)); |
---|
| 3110 | + } |
---|
| 3111 | + |
---|
| 3112 | + ClearSelection(false); |
---|
| 3113 | + |
---|
| 3114 | + refreshContents(); |
---|
| 3115 | + } |
---|
2752 | 3116 | } else |
---|
2753 | 3117 | if (source == genUVItem) |
---|
2754 | 3118 | { |
---|
.. | .. |
---|
3049 | 3413 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
3050 | 3414 | { |
---|
3051 | 3415 | obj = (Object3D)e.nextElement(); |
---|
3052 | | - obj.SetBumpTexture(null); |
---|
| 3416 | + obj.ResetBumpTexture(); |
---|
3053 | 3417 | } |
---|
3054 | 3418 | |
---|
3055 | 3419 | refreshContents(); |
---|
.. | .. |
---|
3063 | 3427 | obj.SetBumpTexture(obj.GetPigmentTexture()); |
---|
3064 | 3428 | } |
---|
3065 | 3429 | |
---|
| 3430 | + refreshContents(); |
---|
| 3431 | + } else |
---|
| 3432 | + if (source == embedTexturesItem) |
---|
| 3433 | + { |
---|
| 3434 | + Object3D obj; |
---|
| 3435 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3436 | + { |
---|
| 3437 | + obj = (Object3D)e.nextElement(); |
---|
| 3438 | + obj.EmbedTextures(true); |
---|
| 3439 | + } |
---|
| 3440 | + |
---|
| 3441 | + refreshContents(); |
---|
| 3442 | + } else |
---|
| 3443 | + if (source == deEmbedTexturesItem) |
---|
| 3444 | + { |
---|
| 3445 | + Object3D obj; |
---|
| 3446 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3447 | + { |
---|
| 3448 | + obj = (Object3D)e.nextElement(); |
---|
| 3449 | + obj.EmbedTextures(false); |
---|
| 3450 | + } |
---|
| 3451 | + |
---|
| 3452 | + CameraPane.texturepigment.clear(); |
---|
| 3453 | + CameraPane.texturebump.clear(); |
---|
| 3454 | + |
---|
3066 | 3455 | refreshContents(); |
---|
3067 | 3456 | } else |
---|
3068 | 3457 | if (source == flashSelectionButton) |
---|
.. | .. |
---|
3166 | 3555 | // centralPanel.setVisible(true); |
---|
3167 | 3556 | // XYZPanel.setVisible(true); |
---|
3168 | 3557 | bigThree.ClearUI(); |
---|
| 3558 | + bigThree.add(scenePanel); |
---|
3169 | 3559 | bigThree.add(centralPanel); |
---|
3170 | | - bigThree.add(XYZPanel); |
---|
3171 | 3560 | bigThree.FlushUI(); |
---|
3172 | 3561 | |
---|
3173 | 3562 | cameraView.requestFocusInWindow(); |
---|
.. | .. |
---|
3247 | 3636 | // centralPanel.setVisible(true); |
---|
3248 | 3637 | // XYZPanel.setVisible(false); |
---|
3249 | 3638 | bigThree.ClearUI(); |
---|
3250 | | - bigThree.add(scenePanel); |
---|
3251 | 3639 | bigThree.add(centralPanel); |
---|
| 3640 | + bigThree.add(scenePanel); |
---|
3252 | 3641 | bigThree.FlushUI(); |
---|
3253 | 3642 | |
---|
3254 | 3643 | cameraView.requestFocusInWindow(); |
---|
.. | .. |
---|
3372 | 3761 | //copy.ClearUI(); |
---|
3373 | 3762 | for (Object3D obj : listUI) |
---|
3374 | 3763 | { |
---|
3375 | | - obj.pinned = true; |
---|
| 3764 | + obj.pinned = false; |
---|
3376 | 3765 | obj.CloseUI(); |
---|
3377 | 3766 | } |
---|
3378 | 3767 | listUI.clear(); |
---|
.. | .. |
---|
3431 | 3820 | } |
---|
3432 | 3821 | |
---|
3433 | 3822 | copy = group; |
---|
| 3823 | + |
---|
| 3824 | + SetUndoStates(); |
---|
| 3825 | + |
---|
3434 | 3826 | //Globals.theRenderer.object = group; |
---|
3435 | 3827 | if(!useclient) |
---|
3436 | 3828 | { |
---|
.. | .. |
---|
3457 | 3849 | currentLayout = sevenButton; |
---|
3458 | 3850 | */ |
---|
3459 | 3851 | radio.layout.doClick(); |
---|
| 3852 | + |
---|
| 3853 | + ClearUnpinned(); |
---|
| 3854 | + //Grafreed.Assert(group != null); |
---|
| 3855 | + //Grafreed.Assert(group.selection != null); |
---|
| 3856 | + SetPinStates(group.selection == null || group.selection.size() > 0); |
---|
| 3857 | + if (group.selection == null || group.selection.size() == 1) |
---|
| 3858 | + EditSelection(false); |
---|
3460 | 3859 | keepparent = group.parent; |
---|
3461 | 3860 | // PARENT = NULL or not??? |
---|
3462 | 3861 | //group.parent = null; // ROOT |
---|
.. | .. |
---|
4049 | 4448 | |
---|
4050 | 4449 | try |
---|
4051 | 4450 | { |
---|
4052 | | - texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 4451 | + texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres); |
---|
4053 | 4452 | } |
---|
4054 | 4453 | catch (Exception e) |
---|
4055 | 4454 | { |
---|
.. | .. |
---|
4526 | 4925 | |
---|
4527 | 4926 | void EditSelection(boolean newWindow) |
---|
4528 | 4927 | { |
---|
| 4928 | + if (group.selection == null) |
---|
| 4929 | + { |
---|
| 4930 | + EditElement(group, newWindow); // ? new |
---|
| 4931 | + return; |
---|
| 4932 | + } |
---|
| 4933 | + |
---|
4529 | 4934 | // aConstraints.gridy = 0; |
---|
4530 | 4935 | for (int i=0; i<group.selection.size(); i++) |
---|
4531 | 4936 | { |
---|
.. | .. |
---|
4536 | 4941 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4537 | 4942 | if(elem != group || !newWindow) |
---|
4538 | 4943 | { |
---|
4539 | | - // if (!(elem instanceof Composite)) |
---|
4540 | | - // newWindow = false; |
---|
4541 | | - listUI.add(elem); |
---|
4542 | | - elem.openEditWindow(this, newWindow); //, false); |
---|
4543 | | - System.out.println("edit : " + elem); |
---|
4544 | | - elem.editWindow.refreshContents(true); // ? new |
---|
| 4944 | + EditElement(elem, newWindow); // ? new |
---|
4545 | 4945 | } |
---|
4546 | 4946 | } |
---|
4547 | 4947 | } |
---|
.. | .. |
---|
4616 | 5016 | //new Exception().printStackTrace(); |
---|
4617 | 5017 | |
---|
4618 | 5018 | freezemodel = true; |
---|
4619 | | - |
---|
4620 | | - //for (Object3D obj : listUI) |
---|
4621 | | - for (int i=listUI.size(); --i>=0;) |
---|
4622 | | - { |
---|
4623 | | - Object3D obj = listUI.elementAt(i); |
---|
4624 | | - if (!obj.pinned) |
---|
4625 | | - { |
---|
4626 | | - obj.CloseUI(); |
---|
4627 | | - listUI.remove(i); |
---|
4628 | | - } |
---|
4629 | | - } |
---|
| 5019 | + ClearUnpinned(); |
---|
4630 | 5020 | |
---|
4631 | 5021 | /**/ |
---|
4632 | 5022 | //switch (event.id) |
---|
.. | .. |
---|
4689 | 5079 | { |
---|
4690 | 5080 | editButton.setEnabled(enabled); |
---|
4691 | 5081 | uneditButton.setEnabled(enabled); |
---|
| 5082 | + unselectButton.setEnabled(enabled); |
---|
| 5083 | + flashSelectionButton.setEnabled(enabled); |
---|
4692 | 5084 | } |
---|
4693 | 5085 | |
---|
4694 | 5086 | void refreshContents(boolean cp) |
---|
4695 | 5087 | { |
---|
4696 | | - if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info")) |
---|
4697 | | - if (!Globals.MOUSEDRAGGED) // && !Globals.TIMERRUNNING) |
---|
| 5088 | + if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
| 5089 | + if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
4698 | 5090 | { |
---|
4699 | 5091 | objEditor.ClearInfo(); // .GetMaterial()); |
---|
4700 | 5092 | |
---|
.. | .. |
---|
4793 | 5185 | |
---|
4794 | 5186 | if (cut) |
---|
4795 | 5187 | { |
---|
4796 | | - if (Globals.SAVEONMAKE) |
---|
4797 | | - Save(); |
---|
| 5188 | +// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save. |
---|
| 5189 | +// Save(); |
---|
4798 | 5190 | //int indices[] = jList.getSelectedIndices(); |
---|
4799 | 5191 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4800 | 5192 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4897 | 5289 | |
---|
4898 | 5290 | void paste(boolean expand) |
---|
4899 | 5291 | { |
---|
| 5292 | + if (Globals.REPLACEONMAKE) |
---|
| 5293 | + Save(); |
---|
| 5294 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5295 | + Globals.REPLACEONMAKE = false; |
---|
4900 | 5296 | // if (GrafreeD.clipboard == null) |
---|
4901 | 5297 | // return; |
---|
4902 | 5298 | boolean first = true; |
---|
.. | .. |
---|
4956 | 5352 | Grafreed.clipboard.get(0).parent = keepparent; |
---|
4957 | 5353 | } |
---|
4958 | 5354 | |
---|
| 5355 | + Globals.REPLACEONMAKE = keep; |
---|
4959 | 5356 | ResetModel(); |
---|
4960 | 5357 | refreshContents(); |
---|
4961 | 5358 | } |
---|
.. | .. |
---|
5091 | 5488 | |
---|
5092 | 5489 | void group(Object3D csg, boolean grab) |
---|
5093 | 5490 | { |
---|
| 5491 | + if (Globals.REPLACEONMAKE) |
---|
| 5492 | + Save(); |
---|
| 5493 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5494 | + Globals.REPLACEONMAKE = false; |
---|
5094 | 5495 | if (//false) // why?? |
---|
5095 | 5496 | !group.selection.isEmpty()) |
---|
5096 | 5497 | { |
---|
.. | .. |
---|
5204 | 5605 | //node.add(csg); |
---|
5205 | 5606 | //makeSomething(node); |
---|
5206 | 5607 | makeSomething(csg); |
---|
| 5608 | + Globals.REPLACEONMAKE = keep; |
---|
5207 | 5609 | } |
---|
5208 | 5610 | |
---|
5209 | 5611 | void Ungroup(Object3D g) |
---|
5210 | 5612 | { |
---|
| 5613 | + if (Globals.REPLACEONMAKE) |
---|
| 5614 | + Save(); |
---|
| 5615 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5616 | + Globals.REPLACEONMAKE = false; |
---|
5211 | 5617 | if (g instanceof HiddenObject) |
---|
5212 | 5618 | { |
---|
5213 | 5619 | HiddenObject h = (HiddenObject) g; |
---|
.. | .. |
---|
5224 | 5630 | objEditor.makeSomething(g.get(i), false); |
---|
5225 | 5631 | } |
---|
5226 | 5632 | } |
---|
| 5633 | + Globals.REPLACEONMAKE = keep; |
---|
5227 | 5634 | } |
---|
5228 | 5635 | |
---|
5229 | 5636 | void ungroup() |
---|
.. | .. |
---|
5514 | 5921 | |
---|
5515 | 5922 | cButton restoreCameraButton; |
---|
5516 | 5923 | |
---|
5517 | | - cButton minButton; |
---|
5518 | | - cButton maxButton; |
---|
5519 | | - cButton fullButton; |
---|
5520 | 5924 | cButton saveButton; |
---|
5521 | 5925 | cButton oneStepButton; |
---|
5522 | 5926 | |
---|
.. | .. |
---|
5526 | 5930 | cButton switchButton; |
---|
5527 | 5931 | cButton loopButton; |
---|
5528 | 5932 | cButton textureButton; |
---|
| 5933 | + |
---|
| 5934 | + cButton skybox1Button; |
---|
| 5935 | + cButton skybox2Button; |
---|
| 5936 | + cButton skybox3Button; |
---|
| 5937 | + cButton skybox4Button; |
---|
| 5938 | + cButton skybox5Button; |
---|
| 5939 | + cButton skybox6Button; |
---|
| 5940 | + cButton skybox7Button; |
---|
| 5941 | + |
---|
| 5942 | + cButton skybox11Button; |
---|
| 5943 | + cButton skybox12Button; |
---|
| 5944 | + cButton skybox13Button; |
---|
| 5945 | + cButton skybox14Button; |
---|
| 5946 | + cButton skybox15Button; |
---|
| 5947 | + cButton skybox16Button; |
---|
| 5948 | + cButton skybox17Button; |
---|
5529 | 5949 | |
---|
5530 | 5950 | cButton gridButton; |
---|
5531 | 5951 | cButton boxButton; |
---|
.. | .. |
---|
5590 | 6010 | private MenuItem pasteLinkItem; |
---|
5591 | 6011 | private MenuItem pasteCloneItem; |
---|
5592 | 6012 | private MenuItem pasteExpandItem; |
---|
5593 | | - private MenuItem clearItem; |
---|
| 6013 | + private MenuItem deleteItem; |
---|
5594 | 6014 | private MenuItem clearAllItem; |
---|
5595 | 6015 | private MenuItem genUVItem; |
---|
5596 | 6016 | private MenuItem genNormalsMESHItem; |
---|
.. | .. |
---|
5674 | 6094 | private MenuItem attachBumpItem; |
---|
5675 | 6095 | private MenuItem detachBumpItem; |
---|
5676 | 6096 | private MenuItem pigmentBumpItem; |
---|
| 6097 | + private MenuItem embedTexturesItem; |
---|
| 6098 | + private MenuItem deEmbedTexturesItem; |
---|
5677 | 6099 | |
---|
5678 | 6100 | private MenuItem particleItem; |
---|
5679 | 6101 | private MenuItem ragdollItem; |
---|