.. | .. |
---|
31 | 31 | final String path = "cubemaps/" + f + "-skyboxes/" + s; |
---|
32 | 32 | row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.NIMBUSLAF)); |
---|
33 | 33 | //row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF)); |
---|
34 | | - skyboxButton.setToolTipText(s); |
---|
| 34 | + skyboxButton.setToolTipText(s.equals("") ? "No background" : s); |
---|
35 | 35 | skyboxButton.addActionListener(new ActionListener() |
---|
36 | 36 | { |
---|
37 | 37 | @Override |
---|
.. | .. |
---|
73 | 73 | cGridBag row5 = new cGridBag(); |
---|
74 | 74 | cGridBag row6 = new cGridBag(); |
---|
75 | 75 | |
---|
76 | | - AddSkyboxButton("default", "rgb", row0); |
---|
| 76 | + AddSkyboxButton("default", "", row0); |
---|
77 | 77 | //AddSkyboxButton("default", "cornell", row0); |
---|
78 | 78 | AddSkyboxButton("penguins", "dust", row0); |
---|
79 | 79 | AddSkyboxButton("penguins", "tropic", row0); |
---|
.. | .. |
---|
330 | 330 | |
---|
331 | 331 | public void ChangeSkybox(String skybox) |
---|
332 | 332 | { |
---|
333 | | - //cameraView.envyoff = false; |
---|
334 | | - group.skyboxname = skybox; |
---|
335 | | - group.skyboxext = "jpg"; |
---|
336 | | - cameraView.repaint(); |
---|
| 333 | + if (skybox.endsWith("/")) |
---|
| 334 | + { |
---|
| 335 | + group.skyboxname = null; |
---|
| 336 | + group.skyboxext = null; |
---|
| 337 | + cameraView.repaint(); |
---|
| 338 | + } |
---|
| 339 | + else |
---|
| 340 | + { |
---|
| 341 | + //cameraView.envyoff = false; |
---|
| 342 | + group.skyboxname = skybox; |
---|
| 343 | + group.skyboxext = "jpg"; |
---|
| 344 | + cameraView.repaint(); |
---|
| 345 | + } |
---|
337 | 346 | } |
---|
338 | 347 | |
---|
339 | 348 | public void CreateSkyboxPanel(cGridBag skyboxPanel) |
---|
.. | .. |
---|
410 | 419 | { |
---|
411 | 420 | copy.versionlist = new Object3D[100]; |
---|
412 | 421 | copy.versionindex = -1; |
---|
| 422 | + |
---|
| 423 | + Save(true); |
---|
413 | 424 | } |
---|
414 | 425 | |
---|
415 | 426 | if(ui) |
---|
.. | .. |
---|
641 | 652 | oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
642 | 653 | //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
643 | 654 | //cameraMenu.add(switchViewItem = new MenuItem("Reverse View")); |
---|
644 | | - editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
645 | 655 | oe.cameraMenu.add("-"); |
---|
646 | 656 | openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
647 | 657 | openWindowItem.addActionListener(this); |
---|
648 | | - editLeafItem.addActionListener(this); |
---|
649 | 658 | lookAtItem.addActionListener(this); |
---|
650 | 659 | //lookFromItem.addActinoListener(this); |
---|
651 | 660 | //switchViewItem.addActionListener(this); |
---|
.. | .. |
---|
893 | 902 | shareGeometriesItem.addActionListener(this); |
---|
894 | 903 | mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries")); |
---|
895 | 904 | mergeGeometriesItem.addActionListener(this); |
---|
| 905 | + menu.add("-"); |
---|
| 906 | + editLeafItem = menu.add(new MenuItem("Edit leaf...")); |
---|
| 907 | + editLeafItem.addActionListener(this); |
---|
896 | 908 | if (Globals.ADVANCED) |
---|
897 | 909 | { |
---|
898 | 910 | // Pretty much the same as duplicate and clone. |
---|
.. | .. |
---|
1026 | 1038 | |
---|
1027 | 1039 | if (Globals.ADVANCED) |
---|
1028 | 1040 | { |
---|
1029 | | - oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1030 | | - maxButton.setToolTipText("Maximize window"); |
---|
1031 | | - maxButton.addActionListener(this); |
---|
| 1041 | +// oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1042 | +// maxButton.setToolTipText("Maximize window"); |
---|
| 1043 | +// maxButton.addActionListener(this); |
---|
1032 | 1044 | } |
---|
1033 | 1045 | |
---|
1034 | | - cButton gcButton; |
---|
1035 | | - |
---|
1036 | | - oe.toolbarPanel.add(gcButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1037 | | - gcButton.setToolTipText("Garbage collect"); |
---|
1038 | | - gcButton.addActionListener(new ActionListener() |
---|
1039 | | - { |
---|
1040 | | - public void actionPerformed(ActionEvent e) |
---|
1041 | | - { |
---|
1042 | | - System.gc(); |
---|
1043 | | - } |
---|
1044 | | - }); |
---|
| 1046 | +// cButton gcButton; |
---|
| 1047 | +// |
---|
| 1048 | +// oe.toolbarPanel.add(gcButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1049 | +// gcButton.setToolTipText("Garbage collect"); |
---|
| 1050 | +// gcButton.addActionListener(new ActionListener() |
---|
| 1051 | +// { |
---|
| 1052 | +// public void actionPerformed(ActionEvent e) |
---|
| 1053 | +// { |
---|
| 1054 | +// System.gc(); |
---|
| 1055 | +// } |
---|
| 1056 | +// }); |
---|
1045 | 1057 | |
---|
1046 | 1058 | oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1047 | 1059 | collapseButton.setToolTipText("Collapse toolbar"); |
---|
.. | .. |
---|
1162 | 1174 | |
---|
1163 | 1175 | // INSERT |
---|
1164 | 1176 | row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1165 | | - gridButton.setToolTipText("Create grid"); |
---|
| 1177 | + gridButton.setToolTipText("Create ground"); |
---|
1166 | 1178 | gridButton.addActionListener(this); |
---|
1167 | 1179 | |
---|
1168 | 1180 | row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
1454 | 1466 | |
---|
1455 | 1467 | void EditObject(Object3D obj) |
---|
1456 | 1468 | { |
---|
| 1469 | + assert(obj instanceof Composite); |
---|
| 1470 | + |
---|
| 1471 | +// if (obj.versionlist == null) |
---|
| 1472 | +// { |
---|
| 1473 | +// obj.versionlist = new Object3D[100]; |
---|
| 1474 | +// obj.versionindex = -1; |
---|
| 1475 | +// } |
---|
| 1476 | + |
---|
1457 | 1477 | cRadio radioButton = new cRadio(obj.name); |
---|
1458 | 1478 | |
---|
1459 | 1479 | // June 2019. Patch to avoid bug with transparency. |
---|
.. | .. |
---|
3892 | 3912 | } else |
---|
3893 | 3913 | if (source == rootButton) |
---|
3894 | 3914 | { |
---|
| 3915 | + Replace(); |
---|
3895 | 3916 | Object3D obj; |
---|
3896 | 3917 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
3897 | 3918 | { |
---|
.. | .. |
---|
4028 | 4049 | |
---|
4029 | 4050 | copy = group; |
---|
4030 | 4051 | |
---|
4031 | | - SetUndoStates(); |
---|
4032 | | - |
---|
4033 | 4052 | //Globals.theRenderer.object = group; |
---|
4034 | 4053 | if(!useclient) |
---|
4035 | 4054 | { |
---|
.. | .. |
---|
4057 | 4076 | */ |
---|
4058 | 4077 | radio.layout.doClick(); |
---|
4059 | 4078 | |
---|
| 4079 | + assert(copy instanceof Composite); |
---|
| 4080 | + |
---|
| 4081 | + if (copy.versionlist == null) |
---|
| 4082 | + { |
---|
| 4083 | + copy.versionlist = new Object3D[100]; |
---|
| 4084 | + copy.versionindex = -1; |
---|
| 4085 | + |
---|
| 4086 | + Save(true); |
---|
| 4087 | + } |
---|
| 4088 | + |
---|
| 4089 | + SetVersionStates(); |
---|
| 4090 | + |
---|
4060 | 4091 | ClearUnpinned(); |
---|
4061 | 4092 | |
---|
4062 | 4093 | //Grafreed.Assert(group != null); |
---|
.. | .. |
---|
5291 | 5322 | flashSelectionButton.setEnabled(enabled); |
---|
5292 | 5323 | |
---|
5293 | 5324 | clearPanelButton.setEnabled(!listUI.isEmpty()); |
---|
| 5325 | + |
---|
| 5326 | + boolean allComposites = true; |
---|
| 5327 | + |
---|
| 5328 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 5329 | + { |
---|
| 5330 | + if (!(e.nextElement() instanceof Composite)) |
---|
| 5331 | + { |
---|
| 5332 | + allComposites = false; |
---|
| 5333 | + break; |
---|
| 5334 | + } |
---|
| 5335 | + } |
---|
| 5336 | + |
---|
| 5337 | + rootButton.setEnabled(allComposites); |
---|
5294 | 5338 | } |
---|
5295 | 5339 | |
---|
5296 | 5340 | void refreshContents(boolean cp) |
---|