.. | .. |
---|
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 | + group.skyboxname = name; |
---|
| 256 | + group.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 | { |
---|
.. | .. |
---|
220 | 473 | // toggleSwitchItem.addItemListener(this); |
---|
221 | 474 | // toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
222 | 475 | |
---|
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 | |
---|
.. | .. |
---|
380 | 633 | shadowYItem.addActionListener(this); |
---|
381 | 634 | shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
382 | 635 | shadowZItem.addActionListener(this); |
---|
| 636 | + attributeItem = menu.add(new MenuItem("Attribute")); |
---|
| 637 | + attributeItem.addActionListener(this); |
---|
| 638 | + |
---|
383 | 639 | if (Globals.ADVANCED) |
---|
384 | 640 | { |
---|
385 | 641 | menu.add("-"); |
---|
386 | 642 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
387 | 643 | linkerItem.addActionListener(this); |
---|
388 | | - attributeItem = menu.add(new MenuItem("Attribute")); |
---|
389 | | - attributeItem.addActionListener(this); |
---|
390 | 644 | templateItem = menu.add(new MenuItem("Template")); |
---|
391 | 645 | templateItem.addActionListener(this); |
---|
392 | 646 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
.. | .. |
---|
415 | 669 | genNormalsMESHItem.addActionListener(this); |
---|
416 | 670 | if (Globals.ADVANCED) |
---|
417 | 671 | { |
---|
418 | | - genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
| 672 | + genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals")); |
---|
419 | 673 | genNormalsMINEItem.addActionListener(this); |
---|
420 | 674 | } |
---|
421 | 675 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
.. | .. |
---|
508 | 762 | attachBumpItem.addActionListener(this); |
---|
509 | 763 | pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump")); |
---|
510 | 764 | pigmentBumpItem.addActionListener(this); |
---|
| 765 | + //embedTexturesItem |
---|
511 | 766 | detachPigmentItem = menu.add(new MenuItem("Detach Pigment")); |
---|
512 | 767 | detachPigmentItem.addActionListener(this); |
---|
513 | 768 | detachBumpItem = menu.add(new MenuItem("Detach Bump")); |
---|
514 | 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); |
---|
515 | 774 | menu.add("-"); |
---|
516 | 775 | sortbysizeItem = menu.add(new MenuItem("Sort by size")); |
---|
517 | 776 | sortbysizeItem.addActionListener(this); |
---|
.. | .. |
---|
538 | 797 | buildToolsMenu(menu); |
---|
539 | 798 | } |
---|
540 | 799 | |
---|
| 800 | + |
---|
541 | 801 | void SetupUI2(ObjEditor oe) |
---|
542 | 802 | { |
---|
543 | 803 | // June 2019 |
---|
.. | .. |
---|
590 | 850 | //minButton.setToolTipText("Minimize window"); |
---|
591 | 851 | //minButton.addActionListener(this); |
---|
592 | 852 | |
---|
593 | | - oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
594 | | - maxButton.setToolTipText("Maximize window"); |
---|
595 | | - 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 | + } |
---|
596 | 859 | |
---|
597 | 860 | oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
598 | 861 | fullButton.setToolTipText("Full-screen window"); |
---|
599 | 862 | fullButton.addActionListener(this); |
---|
600 | 863 | |
---|
| 864 | + oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 865 | + screenfitButton.setToolTipText("Screen fit"); |
---|
| 866 | + screenfitButton.addActionListener(this); |
---|
| 867 | + |
---|
601 | 868 | oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
602 | 869 | restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
603 | 870 | restoreCameraButton.addActionListener(this); |
---|
604 | 871 | |
---|
| 872 | + copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 873 | + saveButton.setToolTipText("New version"); |
---|
| 874 | + saveButton.addActionListener(this); |
---|
| 875 | + |
---|
605 | 876 | copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
606 | | - undoButton.setToolTipText("Undo changes"); |
---|
| 877 | + undoButton.setToolTipText("Previous version"); |
---|
607 | 878 | undoButton.addActionListener(this); |
---|
608 | 879 | undoButton.setEnabled(false); |
---|
609 | 880 | |
---|
| 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 | + |
---|
610 | 894 | copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
611 | | - redoButton.setToolTipText("Redo changes"); |
---|
| 895 | + redoButton.setToolTipText("Next version"); |
---|
612 | 896 | redoButton.addActionListener(this); |
---|
613 | 897 | redoButton.setEnabled(false); |
---|
614 | 898 | |
---|
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); |
---|
| 899 | + oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
620 | 900 | liveCB.setToolTipText("Enable animation"); |
---|
621 | 901 | liveCB.addItemListener(this); |
---|
622 | 902 | |
---|
623 | | - copyOptionsPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 903 | + oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
624 | 904 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
625 | 905 | oneStepButton.addActionListener(this); |
---|
626 | 906 | |
---|
627 | | - copyOptionsPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
| 907 | + oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
628 | 908 | fastCB.setToolTipText("Fast mode"); |
---|
629 | 909 | fastCB.addItemListener(this); |
---|
630 | 910 | |
---|
631 | 911 | //oe.toolboxPanel.Return(); |
---|
632 | 912 | |
---|
633 | | - copyOptionsPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
634 | | - screenfitButton.setToolTipText("Screen fit"); |
---|
635 | | - screenfitButton.addActionListener(this); |
---|
636 | | - |
---|
637 | 913 | // copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
638 | 914 | // trackCB.setToolTipText("Enable tracking"); |
---|
639 | 915 | // trackCB.addItemListener(this); |
---|
.. | .. |
---|
646 | 922 | oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
647 | 923 | snapobjectButton.addActionListener(this); |
---|
648 | 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"); |
---|
649 | 929 | } |
---|
650 | 930 | |
---|
651 | 931 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
652 | 932 | |
---|
653 | | - oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
654 | | - 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"); |
---|
655 | 935 | twoButton.addActionListener(this); |
---|
656 | 936 | this.fullscreenLayout = twoButton; |
---|
657 | 937 | |
---|
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"); |
---|
| 938 | + oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 939 | + threeButton.setToolTipText("Show controls and 3D view"); |
---|
666 | 940 | threeButton.addActionListener(this); |
---|
667 | | - oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
668 | | - sevenButton.setToolTipText("3-column layout"); |
---|
669 | | - 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); |
---|
670 | 947 | // |
---|
671 | 948 | |
---|
672 | | - oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
673 | | - 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"); |
---|
674 | 951 | rootButton.addActionListener(this); |
---|
675 | 952 | |
---|
676 | 953 | oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
679 | 956 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
680 | 957 | //clearButton.addActionListener(this); |
---|
681 | 958 | |
---|
| 959 | + cGridBag row1 = new cGridBag(); |
---|
| 960 | + |
---|
682 | 961 | // INSERT |
---|
683 | | - oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 962 | + row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
684 | 963 | gridButton.setToolTipText("Create grid"); |
---|
685 | 964 | gridButton.addActionListener(this); |
---|
686 | 965 | |
---|
687 | | - oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 966 | + row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
688 | 967 | boxButton.setToolTipText("Create box"); |
---|
689 | 968 | boxButton.addActionListener(this); |
---|
690 | 969 | |
---|
691 | | - oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 970 | + row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
692 | 971 | sphereButton.setToolTipText("Create sphere"); |
---|
693 | 972 | sphereButton.addActionListener(this); |
---|
694 | 973 | |
---|
695 | | - oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 974 | + row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
696 | 975 | coneButton.setToolTipText("Create cone"); |
---|
697 | 976 | coneButton.addActionListener(this); |
---|
698 | 977 | |
---|
699 | | - oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 978 | + row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
700 | 979 | torusButton.setToolTipText("Create torus"); |
---|
701 | 980 | torusButton.addActionListener(this); |
---|
702 | 981 | |
---|
703 | | - oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 982 | + row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
704 | 983 | superButton.setToolTipText("Create superellipsoid"); |
---|
705 | 984 | superButton.addActionListener(this); |
---|
706 | 985 | |
---|
.. | .. |
---|
711 | 990 | kleinButton.addActionListener(this); |
---|
712 | 991 | } |
---|
713 | 992 | |
---|
714 | | - oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 993 | + row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
715 | 994 | particlesButton.setToolTipText("Create particle system"); |
---|
716 | 995 | particlesButton.addActionListener(this); |
---|
717 | 996 | |
---|
718 | | - oe.toolboxPanel.Return(); |
---|
| 997 | + oe.toolboxPanel.add(row1); |
---|
719 | 998 | |
---|
720 | | - oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 999 | + cGridBag row2 = new cGridBag(); |
---|
| 1000 | + |
---|
| 1001 | + row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
721 | 1002 | groupButton.setToolTipText("Create group"); |
---|
722 | 1003 | groupButton.addActionListener(this); |
---|
723 | 1004 | |
---|
724 | | - oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1005 | + row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
725 | 1006 | compositeButton.setToolTipText("Create composite"); |
---|
726 | 1007 | compositeButton.addActionListener(this); |
---|
727 | 1008 | |
---|
728 | | - oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
729 | | - switchButton.setToolTipText("Create switch"); |
---|
| 1009 | + row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1010 | + switchButton.setToolTipText("Create item switcher"); |
---|
730 | 1011 | switchButton.addActionListener(this); |
---|
731 | 1012 | |
---|
732 | | - oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1013 | + row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
733 | 1014 | loopButton.setToolTipText("Create loop"); |
---|
734 | 1015 | loopButton.addActionListener(this); |
---|
735 | 1016 | |
---|
736 | | - oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1017 | + row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
737 | 1018 | textureButton.setToolTipText("Create texture"); |
---|
738 | 1019 | textureButton.addActionListener(this); |
---|
739 | 1020 | |
---|
740 | | - oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1021 | + row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
741 | 1022 | overlayButton.setToolTipText("Create overlay"); |
---|
742 | 1023 | overlayButton.addActionListener(this); |
---|
743 | 1024 | |
---|
744 | | - 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); |
---|
745 | 1026 | lightButton.setToolTipText("Create light"); |
---|
746 | 1027 | lightButton.addActionListener(this); |
---|
747 | 1028 | |
---|
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 | | - } |
---|
| 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); |
---|
759 | 1043 | |
---|
760 | 1044 | // EDIT panel |
---|
761 | | - editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
762 | | - editButton.setToolTipText("Edit selection"); |
---|
| 1045 | + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1046 | + editButton.setToolTipText("Pin selection controls"); |
---|
763 | 1047 | editButton.addActionListener(this); |
---|
764 | 1048 | |
---|
765 | | - editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
766 | | - uneditButton.setToolTipText("Unedit selection"); |
---|
| 1049 | + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1050 | + uneditButton.setToolTipText("Remove selection controls"); |
---|
767 | 1051 | uneditButton.addActionListener(this); |
---|
768 | 1052 | |
---|
769 | 1053 | editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
770 | | - allParamsButton.setToolTipText("Edit all params"); |
---|
| 1054 | + allParamsButton.setToolTipText("Show all controle"); |
---|
771 | 1055 | allParamsButton.addActionListener(this); |
---|
772 | 1056 | |
---|
773 | 1057 | editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
784 | 1068 | |
---|
785 | 1069 | editCommandsPanel.preferredHeight = 1; |
---|
786 | 1070 | |
---|
| 1071 | + SetPinStates(false); |
---|
787 | 1072 | // oe.treePanel.add(commandsPanel); |
---|
788 | 1073 | // oe.treePanel.Return(); |
---|
789 | 1074 | |
---|
.. | .. |
---|
810 | 1095 | |
---|
811 | 1096 | oe.treePanel.add(copyOptionsPanel); |
---|
812 | 1097 | oe.treePanel.Return(); |
---|
| 1098 | + cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); |
---|
| 1099 | + versionSlider = (cNumberSlider)sliderPane.getComponent(1); |
---|
| 1100 | + sliderPane.preferredHeight = 1; |
---|
813 | 1101 | |
---|
814 | | -// mainPanel.setDividerLocation(0.5); //1.0); |
---|
815 | | -// mainPanel.setResizeWeight(0.5); |
---|
| 1102 | +// mainPanel.setDividerLocation(0.1); //1.0); |
---|
| 1103 | + mainPanel.setResizeWeight(0.4); |
---|
816 | 1104 | |
---|
817 | 1105 | //jList.addListSelectionListener(this); |
---|
818 | 1106 | oe.jTree.addTreeSelectionListener(this); |
---|
.. | .. |
---|
820 | 1108 | //jTree.setEditable(true); |
---|
821 | 1109 | oe.jTree.setDragEnabled(true); |
---|
822 | 1110 | //jTree.setPreferredSize(new Dimension(10,10)); |
---|
823 | | - jSP.setPreferredSize(new Dimension(100,200)); |
---|
| 1111 | + //jSP.setPreferredSize(new Dimension(100,200)); |
---|
824 | 1112 | |
---|
825 | 1113 | oe.jTree.setCellRenderer(new cTreeModel.Renderer()); |
---|
826 | 1114 | |
---|
.. | .. |
---|
832 | 1120 | dgr.addDragGestureListener(this); |
---|
833 | 1121 | }catch(Exception e) {} |
---|
834 | 1122 | */ |
---|
835 | | - radio.layout = sevenButton; |
---|
| 1123 | + radio.layout = sixButton; // sevenButton; |
---|
836 | 1124 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
837 | 1125 | } |
---|
838 | 1126 | |
---|
.. | .. |
---|
857 | 1145 | boxCB.addItemListener(this); |
---|
858 | 1146 | |
---|
859 | 1147 | panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
860 | | - zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 1148 | + zoomBoxCB.setToolTipText("Display only for wheel"); |
---|
861 | 1149 | zoomBoxCB.addItemListener(this); |
---|
862 | 1150 | |
---|
863 | 1151 | if (true) // Globals.ADVANCED) |
---|
864 | 1152 | { |
---|
865 | | - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
866 | | - supportCB.setToolTipText("Enable rigging"); |
---|
867 | | - 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); |
---|
868 | 1160 | |
---|
869 | 1161 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
870 | 1162 | // localCB.addItemListener(this); |
---|
.. | .. |
---|
919 | 1211 | oeilCB.addItemListener(this); |
---|
920 | 1212 | |
---|
921 | 1213 | panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
922 | | - shadowCB.setToolTipText("Compute shadows when live"); |
---|
| 1214 | + shadowCB.setToolTipText("When live compute shadows"); |
---|
923 | 1215 | shadowCB.addItemListener(this); |
---|
924 | 1216 | |
---|
925 | 1217 | panel.Return(); |
---|
.. | .. |
---|
928 | 1220 | toggleTextureCB.addItemListener(this); |
---|
929 | 1221 | |
---|
930 | 1222 | panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints); |
---|
931 | | - toggleSwitchCB.setToolTipText("Use switch"); |
---|
| 1223 | + toggleSwitchCB.setToolTipText("Choose a single item"); |
---|
932 | 1224 | toggleSwitchCB.addItemListener(this); |
---|
933 | 1225 | |
---|
934 | | - panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); |
---|
935 | | - autosaveCB.setToolTipText("Auto-save on structure change"); |
---|
936 | | - autosaveCB.addItemListener(this); |
---|
| 1226 | + panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints); |
---|
| 1227 | + autokeepCB.setToolTipText("On structure change"); |
---|
| 1228 | + autokeepCB.addItemListener(this); |
---|
937 | 1229 | |
---|
938 | 1230 | panel.Return(); |
---|
939 | 1231 | if (Globals.ADVANCED) |
---|
.. | .. |
---|
962 | 1254 | { |
---|
963 | 1255 | cRadio radioButton = new cRadio(obj.name); |
---|
964 | 1256 | |
---|
965 | | - // Patch to avoid bug with transparency. |
---|
| 1257 | + // June 2019. Patch to avoid bug with transparency. |
---|
966 | 1258 | radioButton.hadMaterial = obj.material != null; |
---|
967 | 1259 | if (!radioButton.hadMaterial) |
---|
968 | 1260 | { |
---|
.. | .. |
---|
970 | 1262 | } |
---|
971 | 1263 | |
---|
972 | 1264 | radioButton.SetObject(obj); |
---|
973 | | - radioButton.layout = sevenButton; |
---|
| 1265 | + radioButton.layout = sixButton; // sevenButton; |
---|
974 | 1266 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
975 | 1267 | radioButton.addActionListener(this); |
---|
976 | 1268 | radioPanel.add(radioButton); |
---|
.. | .. |
---|
999 | 1291 | cCheckBox slowCB; |
---|
1000 | 1292 | cCheckBox boxCB; |
---|
1001 | 1293 | cCheckBox zoomBoxCB; |
---|
| 1294 | + cCheckBox freezeCB; |
---|
1002 | 1295 | //cToggleButton trackCB; |
---|
1003 | 1296 | cCheckBox trackCB; |
---|
1004 | 1297 | cCheckBox smoothfocusCB; |
---|
.. | .. |
---|
1009 | 1302 | |
---|
1010 | 1303 | cCheckBox oeilCB; |
---|
1011 | 1304 | cCheckBox shadowCB; |
---|
1012 | | - cCheckBox autosaveCB; |
---|
| 1305 | + cCheckBox autokeepCB; |
---|
1013 | 1306 | cCheckBox lookAtCB; |
---|
1014 | 1307 | |
---|
1015 | 1308 | // static int COLOR = 1; |
---|
.. | .. |
---|
1117 | 1410 | { |
---|
1118 | 1411 | Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
1119 | 1412 | } |
---|
1120 | | - else if(e.getSource() == autosaveCB) |
---|
| 1413 | + else if(e.getSource() == freezeCB) |
---|
1121 | 1414 | { |
---|
1122 | | - Globals.SAVEONMAKE ^= true; |
---|
| 1415 | + Globals.FREEZEONMOVE ^= true; |
---|
| 1416 | + } |
---|
| 1417 | + else if(e.getSource() == autokeepCB) |
---|
| 1418 | + { |
---|
| 1419 | + Globals.REPLACEONMAKE ^= true; |
---|
1123 | 1420 | } |
---|
1124 | 1421 | else if(e.getSource() == lookAtCB) |
---|
1125 | 1422 | { |
---|
.. | .. |
---|
1201 | 1498 | } |
---|
1202 | 1499 | } |
---|
1203 | 1500 | |
---|
1204 | | - String string = (String) object; |
---|
1205 | | - |
---|
1206 | 1501 | System.out.println("Transfer = " + object + "; drop : " + target); |
---|
1207 | 1502 | // if( object instanceof java.io.File[]) |
---|
1208 | 1503 | // { |
---|
.. | .. |
---|
1210 | 1505 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
1211 | 1506 | // return; |
---|
1212 | 1507 | // } |
---|
| 1508 | + |
---|
| 1509 | + String string = object.toString(); |
---|
1213 | 1510 | |
---|
1214 | 1511 | // File path for Mac and Windows |
---|
1215 | 1512 | if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
.. | .. |
---|
1459 | 1756 | animationItem.addItemListener(this); |
---|
1460 | 1757 | animationItem.setState(Globals.ANIMATION); |
---|
1461 | 1758 | |
---|
| 1759 | + menu.add(archiveItem = new MenuItem("Archive3D...")); |
---|
| 1760 | + archiveItem.addActionListener(this); |
---|
| 1761 | + |
---|
1462 | 1762 | menu.add("-"); |
---|
1463 | 1763 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1464 | 1764 | parseverticesItem.addActionListener(this); |
---|
.. | .. |
---|
1471 | 1771 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1472 | 1772 | reduce34MorphItem.addActionListener(this); |
---|
1473 | 1773 | menu.add("-"); |
---|
| 1774 | + menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
| 1775 | + memoryItem.addActionListener(this); |
---|
1474 | 1776 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1475 | 1777 | computeAOItem.addActionListener(this); |
---|
1476 | 1778 | |
---|
.. | .. |
---|
1479 | 1781 | mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1480 | 1782 | mirrorItem.addActionListener(this); |
---|
1481 | 1783 | menu.add("-"); |
---|
1482 | | - menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1483 | | - memoryItem.addActionListener(this); |
---|
1484 | 1784 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1485 | 1785 | analyzeItem.addActionListener(this); |
---|
1486 | 1786 | menu.add(dumpItem = new MenuItem("Print")); |
---|
.. | .. |
---|
1628 | 1928 | |
---|
1629 | 1929 | makeSomething(shadow); |
---|
1630 | 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 | + } |
---|
1631 | 1955 | |
---|
1632 | 1956 | /** |
---|
1633 | 1957 | * applyExample |
---|
.. | .. |
---|
2056 | 2380 | { |
---|
2057 | 2381 | makeSomething(new Light()); |
---|
2058 | 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 |
---|
2059 | 2400 | if (source == csgItem) |
---|
2060 | 2401 | { |
---|
2061 | 2402 | group(new CSG()); |
---|
.. | .. |
---|
2107 | 2448 | Composite csg = new GroupLeaf(); |
---|
2108 | 2449 | csg.count = 5; |
---|
2109 | 2450 | group(csg); |
---|
2110 | | - Composite child = new cGroup(); |
---|
| 2451 | + Composite child = new cGroup("Branch"); |
---|
2111 | 2452 | csg.addChild(child); |
---|
2112 | 2453 | child.addChild(csg); |
---|
2113 | 2454 | } else |
---|
2114 | 2455 | if (source == doubleItem) |
---|
2115 | 2456 | { |
---|
2116 | | - Composite csg = new GroupLeaf(); |
---|
| 2457 | + Composite csg = new GroupLeaf("Fork"); |
---|
2117 | 2458 | csg.count = 5; |
---|
2118 | 2459 | group(csg); |
---|
2119 | | - Composite child = new cGroup(); |
---|
| 2460 | + Composite child = new cGroup("Branch A"); |
---|
2120 | 2461 | csg.addChild(child); |
---|
2121 | 2462 | child.addChild(csg); |
---|
2122 | | - child = new cGroup(); |
---|
| 2463 | + child = new cGroup("Branch B"); |
---|
2123 | 2464 | csg.addChild(child); |
---|
2124 | 2465 | child.addChild(csg); |
---|
2125 | 2466 | } else |
---|
2126 | 2467 | if (source == tripleItem) |
---|
2127 | 2468 | { |
---|
2128 | | - Composite csg = new GroupLeaf(); |
---|
| 2469 | + Composite csg = new GroupLeaf("Trident"); |
---|
2129 | 2470 | csg.count = 4; |
---|
2130 | 2471 | group(csg); |
---|
2131 | 2472 | Composite child = new cGroup(); |
---|
.. | .. |
---|
2141 | 2482 | if (source == computeAOItem) |
---|
2142 | 2483 | { |
---|
2143 | 2484 | Globals.drawMode = CameraPane.OCCLUSION; |
---|
2144 | | - Globals.theRenderer.repaint(); |
---|
| 2485 | + cameraView.repaint(); |
---|
2145 | 2486 | } else |
---|
2146 | 2487 | if (source == recompileItem) |
---|
2147 | 2488 | { |
---|
.. | .. |
---|
2189 | 2530 | } else |
---|
2190 | 2531 | if (source == undoButton) |
---|
2191 | 2532 | { |
---|
| 2533 | + // Go to previous version |
---|
| 2534 | + //if (!Undo()) |
---|
| 2535 | + //java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2192 | 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(); |
---|
2193 | 2547 | } else |
---|
2194 | 2548 | if (source == redoButton) |
---|
2195 | 2549 | { |
---|
| 2550 | + // Go to next version |
---|
2196 | 2551 | Redo(); |
---|
2197 | 2552 | } else |
---|
2198 | 2553 | if (source == saveButton) |
---|
2199 | 2554 | { |
---|
2200 | | - Save(); |
---|
| 2555 | + // Save a new version |
---|
| 2556 | + if (!Save(true)) |
---|
| 2557 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2201 | 2558 | } else |
---|
2202 | 2559 | if (source == oneStepButton) |
---|
2203 | 2560 | { |
---|
.. | .. |
---|
2206 | 2563 | } else |
---|
2207 | 2564 | if (source == screenfitButton) |
---|
2208 | 2565 | { |
---|
2209 | | - //Reload(lastConverter, lastFilename, true); |
---|
2210 | 2566 | ScreenFit(); |
---|
2211 | 2567 | } else |
---|
2212 | 2568 | if (source == screenfitpointButton) |
---|
2213 | 2569 | { |
---|
2214 | | - //Reload(lastConverter, lastFilename, true); |
---|
2215 | 2570 | ScreenFitPoint(); |
---|
2216 | 2571 | } else |
---|
2217 | 2572 | if (source == snapobjectButton) |
---|
2218 | 2573 | { |
---|
2219 | | - //Reload(lastConverter, lastFilename, true); |
---|
2220 | 2574 | SnapObject(); |
---|
2221 | 2575 | } else |
---|
2222 | 2576 | // if (event.getSource() == recompileButton) |
---|
.. | .. |
---|
2580 | 2934 | { |
---|
2581 | 2935 | StepAll(); |
---|
2582 | 2936 | } else |
---|
2583 | | - if (source == clearItem) // || event.getSource() == clearButton) |
---|
| 2937 | + if (source == deleteItem) // || event.getSource() == clearButton) |
---|
2584 | 2938 | { |
---|
2585 | 2939 | //int indices[] = jList.getSelectedIndices(); |
---|
2586 | 2940 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
2740 | 3094 | } else |
---|
2741 | 3095 | if (source == ungroupItem || source == ungroupButton) |
---|
2742 | 3096 | { |
---|
2743 | | - //ungroup(); |
---|
| 3097 | + boolean hasRoot = false; |
---|
| 3098 | + |
---|
2744 | 3099 | for (int i=0; i<group.selection.size(); i++) |
---|
2745 | 3100 | { |
---|
2746 | | - Ungroup(group.selection.get(i)); |
---|
| 3101 | + if (group.selection.get(i) == group) |
---|
| 3102 | + { |
---|
| 3103 | + hasRoot = true; |
---|
| 3104 | + break; |
---|
| 3105 | + } |
---|
2747 | 3106 | } |
---|
2748 | 3107 | |
---|
2749 | | - ClearSelection(false); |
---|
2750 | | - |
---|
2751 | | - 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 | + } |
---|
2752 | 3119 | } else |
---|
2753 | 3120 | if (source == genUVItem) |
---|
2754 | 3121 | { |
---|
.. | .. |
---|
3049 | 3416 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
3050 | 3417 | { |
---|
3051 | 3418 | obj = (Object3D)e.nextElement(); |
---|
3052 | | - obj.SetBumpTexture(null); |
---|
| 3419 | + obj.ResetBumpTexture(); |
---|
3053 | 3420 | } |
---|
3054 | 3421 | |
---|
3055 | 3422 | refreshContents(); |
---|
.. | .. |
---|
3063 | 3430 | obj.SetBumpTexture(obj.GetPigmentTexture()); |
---|
3064 | 3431 | } |
---|
3065 | 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 | + |
---|
3066 | 3458 | refreshContents(); |
---|
3067 | 3459 | } else |
---|
3068 | 3460 | if (source == flashSelectionButton) |
---|
.. | .. |
---|
3166 | 3558 | // centralPanel.setVisible(true); |
---|
3167 | 3559 | // XYZPanel.setVisible(true); |
---|
3168 | 3560 | bigThree.ClearUI(); |
---|
| 3561 | + bigThree.add(scenePanel); |
---|
3169 | 3562 | bigThree.add(centralPanel); |
---|
3170 | | - bigThree.add(XYZPanel); |
---|
3171 | 3563 | bigThree.FlushUI(); |
---|
3172 | 3564 | |
---|
3173 | 3565 | cameraView.requestFocusInWindow(); |
---|
.. | .. |
---|
3247 | 3639 | // centralPanel.setVisible(true); |
---|
3248 | 3640 | // XYZPanel.setVisible(false); |
---|
3249 | 3641 | bigThree.ClearUI(); |
---|
3250 | | - bigThree.add(scenePanel); |
---|
3251 | 3642 | bigThree.add(centralPanel); |
---|
| 3643 | + bigThree.add(scenePanel); |
---|
3252 | 3644 | bigThree.FlushUI(); |
---|
3253 | 3645 | |
---|
3254 | 3646 | cameraView.requestFocusInWindow(); |
---|
.. | .. |
---|
3372 | 3764 | //copy.ClearUI(); |
---|
3373 | 3765 | for (Object3D obj : listUI) |
---|
3374 | 3766 | { |
---|
3375 | | - obj.pinned = true; |
---|
| 3767 | + obj.pinned = false; |
---|
3376 | 3768 | obj.CloseUI(); |
---|
3377 | 3769 | } |
---|
3378 | 3770 | listUI.clear(); |
---|
.. | .. |
---|
3431 | 3823 | } |
---|
3432 | 3824 | |
---|
3433 | 3825 | copy = group; |
---|
| 3826 | + |
---|
| 3827 | + SetUndoStates(); |
---|
| 3828 | + |
---|
3434 | 3829 | //Globals.theRenderer.object = group; |
---|
3435 | 3830 | if(!useclient) |
---|
3436 | 3831 | { |
---|
.. | .. |
---|
3457 | 3852 | currentLayout = sevenButton; |
---|
3458 | 3853 | */ |
---|
3459 | 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); |
---|
3460 | 3862 | keepparent = group.parent; |
---|
3461 | 3863 | // PARENT = NULL or not??? |
---|
3462 | 3864 | //group.parent = null; // ROOT |
---|
.. | .. |
---|
4049 | 4451 | |
---|
4050 | 4452 | try |
---|
4051 | 4453 | { |
---|
4052 | | - texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 4454 | + texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres); |
---|
4053 | 4455 | } |
---|
4054 | 4456 | catch (Exception e) |
---|
4055 | 4457 | { |
---|
.. | .. |
---|
4526 | 4928 | |
---|
4527 | 4929 | void EditSelection(boolean newWindow) |
---|
4528 | 4930 | { |
---|
| 4931 | + if (group.selection == null) |
---|
| 4932 | + { |
---|
| 4933 | + EditElement(group, newWindow); // ? new |
---|
| 4934 | + return; |
---|
| 4935 | + } |
---|
| 4936 | + |
---|
4529 | 4937 | // aConstraints.gridy = 0; |
---|
4530 | 4938 | for (int i=0; i<group.selection.size(); i++) |
---|
4531 | 4939 | { |
---|
.. | .. |
---|
4536 | 4944 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4537 | 4945 | if(elem != group || !newWindow) |
---|
4538 | 4946 | { |
---|
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 |
---|
| 4947 | + EditElement(elem, newWindow); // ? new |
---|
4545 | 4948 | } |
---|
4546 | 4949 | } |
---|
4547 | 4950 | } |
---|
.. | .. |
---|
4616 | 5019 | //new Exception().printStackTrace(); |
---|
4617 | 5020 | |
---|
4618 | 5021 | 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 | | - } |
---|
| 5022 | + ClearUnpinned(); |
---|
4630 | 5023 | |
---|
4631 | 5024 | /**/ |
---|
4632 | 5025 | //switch (event.id) |
---|
.. | .. |
---|
4689 | 5082 | { |
---|
4690 | 5083 | editButton.setEnabled(enabled); |
---|
4691 | 5084 | uneditButton.setEnabled(enabled); |
---|
| 5085 | + unselectButton.setEnabled(enabled); |
---|
| 5086 | + flashSelectionButton.setEnabled(enabled); |
---|
4692 | 5087 | } |
---|
4693 | 5088 | |
---|
4694 | 5089 | void refreshContents(boolean cp) |
---|
4695 | 5090 | { |
---|
4696 | | - if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info")) |
---|
4697 | | - if (!Globals.MOUSEDRAGGED) // && !Globals.TIMERRUNNING) |
---|
| 5091 | + if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
| 5092 | + if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
4698 | 5093 | { |
---|
4699 | 5094 | objEditor.ClearInfo(); // .GetMaterial()); |
---|
4700 | 5095 | |
---|
.. | .. |
---|
4793 | 5188 | |
---|
4794 | 5189 | if (cut) |
---|
4795 | 5190 | { |
---|
4796 | | - if (Globals.SAVEONMAKE) |
---|
4797 | | - Save(); |
---|
| 5191 | +// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save. |
---|
| 5192 | +// Save(); |
---|
4798 | 5193 | //int indices[] = jList.getSelectedIndices(); |
---|
4799 | 5194 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4800 | 5195 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4897 | 5292 | |
---|
4898 | 5293 | void paste(boolean expand) |
---|
4899 | 5294 | { |
---|
| 5295 | + if (Globals.REPLACEONMAKE) |
---|
| 5296 | + Save(); |
---|
| 5297 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5298 | + Globals.REPLACEONMAKE = false; |
---|
4900 | 5299 | // if (GrafreeD.clipboard == null) |
---|
4901 | 5300 | // return; |
---|
4902 | 5301 | boolean first = true; |
---|
.. | .. |
---|
4956 | 5355 | Grafreed.clipboard.get(0).parent = keepparent; |
---|
4957 | 5356 | } |
---|
4958 | 5357 | |
---|
| 5358 | + Globals.REPLACEONMAKE = keep; |
---|
4959 | 5359 | ResetModel(); |
---|
4960 | 5360 | refreshContents(); |
---|
4961 | 5361 | } |
---|
.. | .. |
---|
5091 | 5491 | |
---|
5092 | 5492 | void group(Object3D csg, boolean grab) |
---|
5093 | 5493 | { |
---|
| 5494 | + if (Globals.REPLACEONMAKE) |
---|
| 5495 | + Save(); |
---|
| 5496 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5497 | + Globals.REPLACEONMAKE = false; |
---|
5094 | 5498 | if (//false) // why?? |
---|
5095 | 5499 | !group.selection.isEmpty()) |
---|
5096 | 5500 | { |
---|
.. | .. |
---|
5204 | 5608 | //node.add(csg); |
---|
5205 | 5609 | //makeSomething(node); |
---|
5206 | 5610 | makeSomething(csg); |
---|
| 5611 | + Globals.REPLACEONMAKE = keep; |
---|
5207 | 5612 | } |
---|
5208 | 5613 | |
---|
5209 | 5614 | void Ungroup(Object3D g) |
---|
5210 | 5615 | { |
---|
| 5616 | + if (Globals.REPLACEONMAKE) |
---|
| 5617 | + Save(); |
---|
| 5618 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5619 | + Globals.REPLACEONMAKE = false; |
---|
5211 | 5620 | if (g instanceof HiddenObject) |
---|
5212 | 5621 | { |
---|
5213 | 5622 | HiddenObject h = (HiddenObject) g; |
---|
.. | .. |
---|
5224 | 5633 | objEditor.makeSomething(g.get(i), false); |
---|
5225 | 5634 | } |
---|
5226 | 5635 | } |
---|
| 5636 | + Globals.REPLACEONMAKE = keep; |
---|
5227 | 5637 | } |
---|
5228 | 5638 | |
---|
5229 | 5639 | void ungroup() |
---|
.. | .. |
---|
5514 | 5924 | |
---|
5515 | 5925 | cButton restoreCameraButton; |
---|
5516 | 5926 | |
---|
5517 | | - cButton minButton; |
---|
5518 | | - cButton maxButton; |
---|
5519 | | - cButton fullButton; |
---|
5520 | 5927 | cButton saveButton; |
---|
5521 | 5928 | cButton oneStepButton; |
---|
5522 | 5929 | |
---|
.. | .. |
---|
5526 | 5933 | cButton switchButton; |
---|
5527 | 5934 | cButton loopButton; |
---|
5528 | 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; |
---|
5529 | 5952 | |
---|
5530 | 5953 | cButton gridButton; |
---|
5531 | 5954 | cButton boxButton; |
---|
.. | .. |
---|
5590 | 6013 | private MenuItem pasteLinkItem; |
---|
5591 | 6014 | private MenuItem pasteCloneItem; |
---|
5592 | 6015 | private MenuItem pasteExpandItem; |
---|
5593 | | - private MenuItem clearItem; |
---|
| 6016 | + private MenuItem deleteItem; |
---|
5594 | 6017 | private MenuItem clearAllItem; |
---|
5595 | 6018 | private MenuItem genUVItem; |
---|
5596 | 6019 | private MenuItem genNormalsMESHItem; |
---|
.. | .. |
---|
5674 | 6097 | private MenuItem attachBumpItem; |
---|
5675 | 6098 | private MenuItem detachBumpItem; |
---|
5676 | 6099 | private MenuItem pigmentBumpItem; |
---|
| 6100 | + private MenuItem embedTexturesItem; |
---|
| 6101 | + private MenuItem deEmbedTexturesItem; |
---|
5677 | 6102 | |
---|
5678 | 6103 | private MenuItem particleItem; |
---|
5679 | 6104 | private MenuItem ragdollItem; |
---|