.. | .. |
---|
34 | 34 | iSendInfo |
---|
35 | 35 | //KeyListener |
---|
36 | 36 | { |
---|
| 37 | + public cToggleButton pinButton; |
---|
37 | 38 | boolean timeline; |
---|
38 | 39 | boolean wasFullScreen; |
---|
39 | 40 | |
---|
.. | .. |
---|
41 | 42 | JFrame frame; |
---|
42 | 43 | |
---|
43 | 44 | static ObjEditor theFrame; |
---|
| 45 | + |
---|
| 46 | + public cGridBag GetSeparator() |
---|
| 47 | + { |
---|
| 48 | + cGridBag separator = new cGridBag(); |
---|
| 49 | + separator.add(new JSeparator()); |
---|
| 50 | + separator.preferredHeight = 5; |
---|
| 51 | + return separator; |
---|
| 52 | + } |
---|
44 | 53 | |
---|
45 | 54 | cButton GetButton(String name, boolean border) |
---|
46 | 55 | { |
---|
47 | 56 | ImageIcon icon = GetIcon(name); |
---|
48 | 57 | return new cButton(icon, border); |
---|
| 58 | + } |
---|
| 59 | + |
---|
| 60 | + cLabel GetLabel(String name, boolean border) |
---|
| 61 | + { |
---|
| 62 | + //ImageIcon icon = GetIcon(name); |
---|
| 63 | + return new cLabel(GetImage(name), border); |
---|
49 | 64 | } |
---|
50 | 65 | |
---|
51 | 66 | cToggleButton GetToggleButton(String name, boolean border) |
---|
.. | .. |
---|
60 | 75 | return new cCheckBox(icon, border); |
---|
61 | 76 | } |
---|
62 | 77 | |
---|
63 | | - private ImageIcon GetIcon(String name) |
---|
| 78 | + ImageIcon GetIcon(String name) |
---|
64 | 79 | { |
---|
65 | 80 | try |
---|
66 | 81 | { |
---|
67 | 82 | BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name)); |
---|
68 | 83 | |
---|
69 | | - if (image.getWidth() != 24 && image.getHeight() != 24) |
---|
70 | | - { |
---|
71 | | - BufferedImage resized = new BufferedImage(24, 24, image.getType()); |
---|
72 | | - Graphics2D g = resized.createGraphics(); |
---|
73 | | - g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); |
---|
74 | | - //g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
---|
75 | | - g.drawImage(image, 0, 0, 24, 24, 0, 0, image.getWidth(), image.getHeight(), null); |
---|
76 | | - g.dispose(); |
---|
77 | | - |
---|
78 | | - image = resized; |
---|
79 | | - } |
---|
| 84 | +// if (image.getWidth() > 48 && image.getHeight() > 48) |
---|
| 85 | +// { |
---|
| 86 | +// BufferedImage resized = new BufferedImage(48, 48, image.getType()); |
---|
| 87 | +// Graphics2D g = resized.createGraphics(); |
---|
| 88 | +// g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); |
---|
| 89 | +// //g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
---|
| 90 | +// g.drawImage(image, 0, 0, 48, 48, 0, 0, image.getWidth(), image.getHeight(), null); |
---|
| 91 | +// g.dispose(); |
---|
| 92 | +// |
---|
| 93 | +// image = resized; |
---|
| 94 | +// } |
---|
80 | 95 | |
---|
81 | 96 | javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image); |
---|
82 | 97 | return icon; |
---|
| 98 | + } |
---|
| 99 | + catch (Exception e) |
---|
| 100 | + { |
---|
| 101 | + return null; |
---|
| 102 | + } |
---|
| 103 | + } |
---|
| 104 | + |
---|
| 105 | + BufferedImage GetImage(String name) |
---|
| 106 | + { |
---|
| 107 | + try |
---|
| 108 | + { |
---|
| 109 | + BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name)); |
---|
| 110 | + |
---|
| 111 | + return image; |
---|
83 | 112 | } |
---|
84 | 113 | catch (Exception e) |
---|
85 | 114 | { |
---|
.. | .. |
---|
268 | 297 | client = inClient; |
---|
269 | 298 | copy = client; |
---|
270 | 299 | |
---|
271 | | - if (copy.versions == null) |
---|
272 | | - { |
---|
273 | | - copy.versions = new byte[100][]; |
---|
274 | | - copy.versionindex = -1; |
---|
275 | | - } |
---|
| 300 | +// if (copy.versionlist == null) |
---|
| 301 | +// { |
---|
| 302 | +// copy.versionlist = new Object3D[100]; |
---|
| 303 | +// copy.versionindex = -1; |
---|
| 304 | +// |
---|
| 305 | +// callee.Save(true); |
---|
| 306 | +// } |
---|
276 | 307 | |
---|
277 | 308 | // "this" is not called: SetupUI2(objEditor); |
---|
278 | 309 | } |
---|
.. | .. |
---|
287 | 318 | client = inClient; |
---|
288 | 319 | copy = client; |
---|
289 | 320 | |
---|
290 | | - if (copy.versions == null) |
---|
| 321 | + if (copy.versionlist == null) |
---|
291 | 322 | { |
---|
292 | | - copy.versions = new byte[100][]; |
---|
| 323 | + copy.versionlist = new Object3D[100]; |
---|
293 | 324 | copy.versionindex = -1; |
---|
| 325 | + |
---|
| 326 | +// Save(true); |
---|
294 | 327 | } |
---|
295 | 328 | |
---|
296 | 329 | SetupUI2(callee.GetEditor()); |
---|
.. | .. |
---|
325 | 358 | copy = localCopy; |
---|
326 | 359 | copy.editWindow = this; |
---|
327 | 360 | |
---|
328 | | - if (copy.versions == null) |
---|
329 | | - { |
---|
330 | | -// copy.versions = new byte[100][]; |
---|
| 361 | +// if (copy.versionlist == null) |
---|
| 362 | +// { |
---|
| 363 | +// copy.versionlist = new Object3D[100]; |
---|
331 | 364 | // copy.versionindex = -1; |
---|
332 | | - } |
---|
| 365 | +// |
---|
| 366 | +// Save(true); |
---|
| 367 | +// } |
---|
333 | 368 | |
---|
334 | 369 | SetupMenu(); |
---|
335 | 370 | |
---|
.. | .. |
---|
416 | 451 | // EditSelection(false); |
---|
417 | 452 | // } |
---|
418 | 453 | |
---|
419 | | - refreshContents(false); // To refresh Info tab |
---|
| 454 | +// refreshContents(false); // To refresh Info tab |
---|
420 | 455 | } |
---|
421 | 456 | }; |
---|
422 | 457 | objectPanel.addChangeListener(changeListener); |
---|
.. | .. |
---|
436 | 471 | editPanel.add(editCommandsPanel); |
---|
437 | 472 | editPanel.add(ctrlPanel); |
---|
438 | 473 | |
---|
439 | | - toolboxPanel = new cGridBag().setVertical(false); |
---|
| 474 | + toolboxPanel = new cGridBag().setVertical(true); |
---|
440 | 475 | //toolboxPanel.setName("Toolbox"); |
---|
441 | 476 | |
---|
442 | | - materialPanel = new cGridBag().setVertical(true); |
---|
| 477 | + skyboxPanel = new cGridBag().setVertical(true); |
---|
| 478 | + |
---|
| 479 | + materialPanel = new cGridBag().setVertical(false); |
---|
443 | 480 | //materialPanel.setName("Material"); |
---|
444 | 481 | |
---|
445 | 482 | /*JTextPane*/ |
---|
.. | .. |
---|
723 | 760 | boolean maximized; |
---|
724 | 761 | |
---|
725 | 762 | cButton fullscreenLayout; |
---|
| 763 | + cButton expandedLayout; |
---|
726 | 764 | |
---|
727 | 765 | void Minimize() |
---|
728 | 766 | { |
---|
.. | .. |
---|
762 | 800 | cButton minButton; |
---|
763 | 801 | cButton maxButton; |
---|
764 | 802 | cButton fullButton; |
---|
| 803 | + cButton collapseButton; |
---|
| 804 | + cButton maximize3DButton; |
---|
765 | 805 | |
---|
766 | 806 | void ToggleFullScreen() |
---|
767 | 807 | { |
---|
768 | | -GraphicsDevice device = frame.getGraphicsConfiguration().getDevice(); |
---|
| 808 | + GraphicsDevice device = frame.getGraphicsConfiguration().getDevice(); |
---|
769 | 809 | |
---|
770 | 810 | cameraView.ToggleFullScreen(); |
---|
771 | 811 | |
---|
.. | .. |
---|
786 | 826 | // X frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
787 | 827 | // X framePanel.add(bigThree); |
---|
788 | 828 | // X frame.getContentPane().add(/*"Center",*/framePanel); |
---|
789 | | - framePanel.setDividerLocation(46); |
---|
| 829 | +// framePanel.setDividerLocation(46); // icons are 24x24 |
---|
790 | 830 | |
---|
791 | 831 | //frame.setVisible(true); |
---|
792 | | - radio.layout = keepButton; |
---|
| 832 | +// radio.layout = keepButton; |
---|
793 | 833 | //theFrame = null; |
---|
794 | 834 | keepButton = null; |
---|
795 | | - radio.layout.doClick(); |
---|
| 835 | +// radio.layout.doClick(); |
---|
796 | 836 | |
---|
797 | 837 | } else |
---|
798 | 838 | { |
---|
.. | .. |
---|
813 | 853 | // X frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
814 | 854 | // X framePanel.remove(bigThree); |
---|
815 | 855 | // X frame.getContentPane().add(/*"Center",*/bigThree); |
---|
816 | | - framePanel.setDividerLocation(0); |
---|
| 856 | +// framePanel.setDividerLocation(0); |
---|
817 | 857 | |
---|
818 | | - radio.layout = fullscreenLayout; |
---|
819 | | - radio.layout.doClick(); |
---|
| 858 | +// radio.layout = fullscreenLayout; |
---|
| 859 | +// radio.layout.doClick(); |
---|
820 | 860 | //frame.setVisible(true); |
---|
821 | 861 | } |
---|
822 | 862 | frame.validate(); |
---|
| 863 | + |
---|
| 864 | + cameraView.requestFocusInWindow(); |
---|
823 | 865 | } |
---|
824 | 866 | |
---|
825 | | - private byte[] CompressCopy() |
---|
| 867 | + void CollapseToolbar() |
---|
| 868 | + { |
---|
| 869 | + framePanel.setDividerLocation(0); |
---|
| 870 | + //frame.validate(); |
---|
| 871 | + |
---|
| 872 | + cameraView.requestFocusInWindow(); |
---|
| 873 | + } |
---|
| 874 | + |
---|
| 875 | + private Object3D Duplicate(Object3D object) |
---|
826 | 876 | { |
---|
827 | 877 | boolean temp = CameraPane.SWITCH; |
---|
828 | 878 | CameraPane.SWITCH = false; |
---|
829 | 879 | |
---|
830 | | - copy.ExtractBigData(versiontable); |
---|
| 880 | + object.ExtractBigData(versiontable); |
---|
831 | 881 | // if (copy == client) |
---|
832 | 882 | |
---|
833 | | - byte[] versions[] = copy.versions; |
---|
834 | | - copy.versions = null; |
---|
| 883 | + Object3D versions[] = object.versionlist; |
---|
| 884 | + object.versionlist = null; |
---|
835 | 885 | |
---|
836 | | - byte[] compress = Compress(copy); |
---|
| 886 | + //byte[] compress = Compress(copy); |
---|
| 887 | + Object3D compress = (Object3D)Grafreed.clone(object); |
---|
837 | 888 | |
---|
838 | | - copy.versions = versions; |
---|
| 889 | + object.versionlist = versions; |
---|
839 | 890 | |
---|
840 | | - copy.RestoreBigData(versiontable); |
---|
| 891 | + object.RestoreBigData(versiontable); |
---|
841 | 892 | |
---|
842 | 893 | CameraPane.SWITCH = temp; |
---|
843 | 894 | |
---|
.. | .. |
---|
965 | 1016 | { |
---|
966 | 1017 | SetupMaterial(materialPanel); |
---|
967 | 1018 | } |
---|
| 1019 | + |
---|
968 | 1020 | //SetupName(); |
---|
969 | 1021 | //SetupViews(); |
---|
970 | 1022 | } |
---|
.. | .. |
---|
1173 | 1225 | |
---|
1174 | 1226 | namePanel = new cGridBag(); |
---|
1175 | 1227 | |
---|
| 1228 | + //if (copy.pinned) |
---|
| 1229 | + { |
---|
| 1230 | + pinButton = GetToggleButton("icons/pin.png", !Grafreed.NIMBUSLAF); |
---|
| 1231 | + pinButton.setSelected(copy.pinned); |
---|
| 1232 | + cGridBag t = new cGridBag(); |
---|
| 1233 | + t.preferredWidth = 2; |
---|
| 1234 | + t.add(pinButton); |
---|
| 1235 | + namePanel.add(t); |
---|
| 1236 | + |
---|
| 1237 | + pinButton.addItemListener(this); |
---|
| 1238 | + } |
---|
| 1239 | + |
---|
1176 | 1240 | nameField = AddText(namePanel, copy.GetName()); |
---|
1177 | 1241 | namePanel.add(new JScrollPane(nameField, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER)); |
---|
1178 | 1242 | oe.ctrlPanel.add(namePanel); |
---|
.. | .. |
---|
1194 | 1258 | hideCB.setToolTipText("Hide object"); |
---|
1195 | 1259 | markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
1196 | 1260 | markCB.setToolTipText("As animation target transform"); |
---|
| 1261 | + |
---|
| 1262 | + ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false); |
---|
1197 | 1263 | |
---|
1198 | 1264 | setupPanel2 = new cGridBag().setVertical(false); |
---|
1199 | 1265 | |
---|
.. | .. |
---|
1520 | 1586 | //tmp.setName("Edit"); |
---|
1521 | 1587 | objectPanel.add(materialPanel); |
---|
1522 | 1588 | objectPanel.setIconAt(0, GetIcon("icons/material.png")); |
---|
| 1589 | + objectPanel.setToolTipTextAt(0, "Material"); |
---|
| 1590 | + |
---|
| 1591 | + objectPanel.add(toolboxPanel); |
---|
| 1592 | + objectPanel.setIconAt(1, GetIcon("icons/primitives.png")); |
---|
| 1593 | + objectPanel.setToolTipTextAt(1, "Objects & textures"); |
---|
| 1594 | + |
---|
| 1595 | + objectPanel.add(skyboxPanel); |
---|
| 1596 | + objectPanel.setIconAt(2, GetIcon("icons/skybox.jpg")); |
---|
| 1597 | + objectPanel.setToolTipTextAt(2, "Backgrounds"); |
---|
| 1598 | + |
---|
1523 | 1599 | // JPanel north = new JPanel(new BorderLayout()); |
---|
1524 | 1600 | // north.setName("Edit"); |
---|
1525 | 1601 | // north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1526 | 1602 | // objectPanel.add(north); |
---|
1527 | 1603 | objectPanel.add(editPanel); |
---|
1528 | | - objectPanel.setIconAt(1, GetIcon("icons/write.png")); |
---|
1529 | | - |
---|
1530 | | - //if (Globals.ADVANCED) |
---|
1531 | | - objectPanel.add(infoPanel); |
---|
1532 | | - objectPanel.setIconAt(2, GetIcon("icons/info.png")); |
---|
| 1604 | + objectPanel.setIconAt(3, GetIcon("icons/write.png")); |
---|
| 1605 | + objectPanel.setToolTipTextAt(3, "Edit controls"); |
---|
1533 | 1606 | |
---|
1534 | 1607 | objectPanel.add(XYZPanel); |
---|
1535 | | - objectPanel.setIconAt(3, GetIcon("icons/XYZ.png")); |
---|
| 1608 | + objectPanel.setIconAt(4, GetIcon("icons/XYZ.png")); |
---|
| 1609 | + objectPanel.setToolTipTextAt(4, "XYZ/RGB transform"); |
---|
1536 | 1610 | |
---|
1537 | | - objectPanel.add(toolboxPanel); |
---|
1538 | | - objectPanel.setIconAt(4, GetIcon("icons/primitives.png")); |
---|
1539 | | - |
---|
1540 | 1611 | /* |
---|
1541 | 1612 | aConstraints.gridx = 0; |
---|
1542 | 1613 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1573 | 1644 | |
---|
1574 | 1645 | scenePanel.add(tabbedPane); |
---|
1575 | 1646 | |
---|
| 1647 | + //if (Globals.ADVANCED) |
---|
| 1648 | + tabbedPane.add(infoPanel); |
---|
| 1649 | + tabbedPane.setIconAt(3, GetIcon("icons/info.png")); |
---|
| 1650 | + tabbedPane.setToolTipTextAt(3, "Information"); |
---|
| 1651 | + |
---|
1576 | 1652 | /* |
---|
1577 | 1653 | cTree jTree = new cTree(null); |
---|
1578 | 1654 | ToolTipManager.sharedInstance().registerComponent(jTree); |
---|
.. | .. |
---|
1632 | 1708 | /**/ |
---|
1633 | 1709 | |
---|
1634 | 1710 | bigThree = new cGridBag(); |
---|
1635 | | - bigThree.addComponent(centralPanel); |
---|
1636 | 1711 | bigThree.addComponent(scenePanel); |
---|
| 1712 | + bigThree.addComponent(centralPanel); |
---|
1637 | 1713 | //bigThree.addComponent(XYZPanel); |
---|
1638 | 1714 | |
---|
1639 | 1715 | // // SIDE EFFECT!!! |
---|
.. | .. |
---|
1643 | 1719 | // aConstraints.gridheight = 1; |
---|
1644 | 1720 | |
---|
1645 | 1721 | framePanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, toolbarPanel, bigThree); |
---|
| 1722 | + |
---|
| 1723 | + framePanel.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, |
---|
| 1724 | + new java.beans.PropertyChangeListener() |
---|
| 1725 | + { |
---|
| 1726 | + public void propertyChange(java.beans.PropertyChangeEvent pce) |
---|
| 1727 | + { |
---|
| 1728 | + if ((Integer)pce.getOldValue() == 1) |
---|
| 1729 | + { |
---|
| 1730 | + if (radio.layout != expandedLayout) |
---|
| 1731 | + { |
---|
| 1732 | + radio.layout = expandedLayout; |
---|
| 1733 | + radio.layout.doClick(); |
---|
| 1734 | + } |
---|
| 1735 | + } |
---|
| 1736 | + } |
---|
| 1737 | + }); |
---|
| 1738 | + |
---|
1646 | 1739 | framePanel.setContinuousLayout(false); |
---|
1647 | 1740 | framePanel.setOneTouchExpandable(false); |
---|
1648 | 1741 | //.setDividerLocation(0.8); |
---|
.. | .. |
---|
1675 | 1768 | frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); |
---|
1676 | 1769 | frame.addWindowListener(new WindowAdapter() |
---|
1677 | 1770 | { |
---|
1678 | | - |
---|
1679 | 1771 | public void windowClosing(WindowEvent e) |
---|
1680 | 1772 | { |
---|
1681 | 1773 | Close(); |
---|
.. | .. |
---|
1698 | 1790 | ctrlPanel.removeAll(); |
---|
1699 | 1791 | } |
---|
1700 | 1792 | |
---|
1701 | | - void SetupMaterial(cGridBag panel) |
---|
| 1793 | + void SetupMaterial(cGridBag materialpanel) |
---|
1702 | 1794 | { |
---|
1703 | | - /* |
---|
| 1795 | + cGridBag presetpanel = new cGridBag().setVertical(true); |
---|
| 1796 | + |
---|
| 1797 | + cLabel skin = GetLabel("icons/shadericons/shadericon00000.png", !Grafreed.NIMBUSLAF); |
---|
| 1798 | + skin.setToolTipText("Skin"); |
---|
| 1799 | + skin.addMouseListener(new MouseAdapter() |
---|
| 1800 | + { |
---|
| 1801 | + public void mouseClicked(MouseEvent e) |
---|
| 1802 | + { |
---|
| 1803 | + Object3D object = Grafreed.materials.versionlist[0].get(0); |
---|
| 1804 | + cMaterial material = object.material; |
---|
| 1805 | + |
---|
| 1806 | + // Skin |
---|
| 1807 | + colorField.setFloat(material.color); |
---|
| 1808 | + saturationField.setFloat(material.modulation); |
---|
| 1809 | + subsurfaceField.setFloat(material.subsurface); |
---|
| 1810 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1811 | + diffusenessField.setFloat(material.factor); |
---|
| 1812 | + shininessField.setFloat(material.shininess); |
---|
| 1813 | + shadowbiasField.setFloat(material.shadowbias); |
---|
| 1814 | + diffuseField.setFloat(material.diffuse); |
---|
| 1815 | + specularField.setFloat(material.specular); |
---|
| 1816 | + |
---|
| 1817 | + bumpField.setFloat(object.projectedVertices[0].x / 1000.0); |
---|
| 1818 | + noiseField.setFloat(object.projectedVertices[0].y / 1000.0); |
---|
| 1819 | + powerField.setFloat(object.projectedVertices[2].x / 1000.0); |
---|
| 1820 | + |
---|
| 1821 | + materialtouched = true; |
---|
| 1822 | + applySelf(); |
---|
| 1823 | + } |
---|
| 1824 | + }); |
---|
| 1825 | + presetpanel.add(skin); |
---|
| 1826 | + |
---|
| 1827 | + cLabel lambert = GetLabel("icons/shadericons/shadericon00002.png", !Grafreed.NIMBUSLAF); |
---|
| 1828 | + lambert.setToolTipText("Diffuse"); |
---|
| 1829 | + lambert.addMouseListener(new MouseAdapter() |
---|
| 1830 | + { |
---|
| 1831 | + public void mouseClicked(MouseEvent e) |
---|
| 1832 | + { |
---|
| 1833 | + Object3D object = Grafreed.materials.versionlist[2].get(0); |
---|
| 1834 | + cMaterial material = object.material; |
---|
| 1835 | + |
---|
| 1836 | + diffusenessField.setFloat(material.factor); |
---|
| 1837 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1838 | + |
---|
| 1839 | + materialtouched = true; |
---|
| 1840 | + applySelf(); |
---|
| 1841 | + } |
---|
| 1842 | + }); |
---|
| 1843 | + presetpanel.add(lambert); |
---|
| 1844 | + |
---|
| 1845 | + cLabel diffuse2 = GetLabel("icons/shadericons/shadericon00003.png", !Grafreed.NIMBUSLAF); |
---|
| 1846 | + diffuse2.setToolTipText("Diffuse2"); |
---|
| 1847 | + diffuse2.addMouseListener(new MouseAdapter() |
---|
| 1848 | + { |
---|
| 1849 | + public void mouseClicked(MouseEvent e) |
---|
| 1850 | + { |
---|
| 1851 | + Object3D object = Grafreed.materials.versionlist[3].get(0); |
---|
| 1852 | + cMaterial material = object.material; |
---|
| 1853 | + |
---|
| 1854 | + diffusenessField.setFloat(material.factor); |
---|
| 1855 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1856 | + |
---|
| 1857 | + materialtouched = true; |
---|
| 1858 | + applySelf(); |
---|
| 1859 | + } |
---|
| 1860 | + }); |
---|
| 1861 | + presetpanel.add(diffuse2); |
---|
| 1862 | + |
---|
| 1863 | + cLabel diffusemoon = GetLabel("icons/shadericons/shadericon00004.png", !Grafreed.NIMBUSLAF); |
---|
| 1864 | + diffusemoon.setToolTipText("Moon"); |
---|
| 1865 | + diffusemoon.addMouseListener(new MouseAdapter() |
---|
| 1866 | + { |
---|
| 1867 | + public void mouseClicked(MouseEvent e) |
---|
| 1868 | + { |
---|
| 1869 | + Object3D object = Grafreed.materials.versionlist[4].get(0); |
---|
| 1870 | + cMaterial material = object.material; |
---|
| 1871 | + |
---|
| 1872 | + diffusenessField.setFloat(material.factor); |
---|
| 1873 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1874 | + |
---|
| 1875 | + materialtouched = true; |
---|
| 1876 | + applySelf(); |
---|
| 1877 | + } |
---|
| 1878 | + }); |
---|
| 1879 | + presetpanel.add(diffusemoon); |
---|
| 1880 | + |
---|
| 1881 | + cLabel diffusemoon2 = GetLabel("icons/shadericons/shadericon00005.png", !Grafreed.NIMBUSLAF); |
---|
| 1882 | + diffusemoon2.setToolTipText("Moon2"); |
---|
| 1883 | + diffusemoon2.addMouseListener(new MouseAdapter() |
---|
| 1884 | + { |
---|
| 1885 | + public void mouseClicked(MouseEvent e) |
---|
| 1886 | + { |
---|
| 1887 | + Object3D object = Grafreed.materials.versionlist[5].get(0); |
---|
| 1888 | + cMaterial material = object.material; |
---|
| 1889 | + |
---|
| 1890 | + diffusenessField.setFloat(material.factor); |
---|
| 1891 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1892 | + |
---|
| 1893 | + materialtouched = true; |
---|
| 1894 | + applySelf(); |
---|
| 1895 | + } |
---|
| 1896 | + }); |
---|
| 1897 | + presetpanel.add(diffusemoon2); |
---|
| 1898 | + |
---|
| 1899 | + cLabel diffusemoon3 = GetLabel("icons/shadericons/shadericon00006.png", !Grafreed.NIMBUSLAF); |
---|
| 1900 | + diffusemoon3.setToolTipText("Moon3"); |
---|
| 1901 | + diffusemoon3.addMouseListener(new MouseAdapter() |
---|
| 1902 | + { |
---|
| 1903 | + public void mouseClicked(MouseEvent e) |
---|
| 1904 | + { |
---|
| 1905 | + Object3D object = Grafreed.materials.versionlist[6].get(0); |
---|
| 1906 | + cMaterial material = object.material; |
---|
| 1907 | + |
---|
| 1908 | + diffusenessField.setFloat(material.factor); |
---|
| 1909 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1910 | + |
---|
| 1911 | + materialtouched = true; |
---|
| 1912 | + applySelf(); |
---|
| 1913 | + } |
---|
| 1914 | + }); |
---|
| 1915 | + presetpanel.add(diffusemoon3); |
---|
| 1916 | + |
---|
| 1917 | + cLabel diffusesheen = GetLabel("icons/shadericons/shadericon00007.png", !Grafreed.NIMBUSLAF); |
---|
| 1918 | + diffusesheen.setToolTipText("Sheen"); |
---|
| 1919 | + diffusesheen.addMouseListener(new MouseAdapter() |
---|
| 1920 | + { |
---|
| 1921 | + public void mouseClicked(MouseEvent e) |
---|
| 1922 | + { |
---|
| 1923 | + Object3D object = Grafreed.materials.versionlist[7].get(0); |
---|
| 1924 | + cMaterial material = object.material; |
---|
| 1925 | + |
---|
| 1926 | + sheenField.setFloat(material.sheen); |
---|
| 1927 | + |
---|
| 1928 | + materialtouched = true; |
---|
| 1929 | + applySelf(); |
---|
| 1930 | + } |
---|
| 1931 | + }); |
---|
| 1932 | + presetpanel.add(diffusesheen); |
---|
| 1933 | + |
---|
| 1934 | + cLabel rough = GetLabel("icons/shadericons/shadericon00001.png", !Grafreed.NIMBUSLAF); |
---|
| 1935 | + rough.setToolTipText("Rough metal"); |
---|
| 1936 | + rough.addMouseListener(new MouseAdapter() |
---|
| 1937 | + { |
---|
| 1938 | + public void mouseClicked(MouseEvent e) |
---|
| 1939 | + { |
---|
| 1940 | + Object3D object = Grafreed.materials.versionlist[1].get(0); |
---|
| 1941 | + cMaterial material = object.material; |
---|
| 1942 | + |
---|
| 1943 | + shininessField.setFloat(material.shininess); |
---|
| 1944 | + velvetField.setFloat(material.velvet); |
---|
| 1945 | + |
---|
| 1946 | + materialtouched = true; |
---|
| 1947 | + applySelf(); |
---|
| 1948 | + } |
---|
| 1949 | + }); |
---|
| 1950 | + presetpanel.add(rough); |
---|
| 1951 | + |
---|
| 1952 | + cLabel rough2 = GetLabel("icons/shadericons/shadericon00013.png", !Grafreed.NIMBUSLAF); |
---|
| 1953 | + rough2.setToolTipText("Medium metal"); |
---|
| 1954 | + rough2.addMouseListener(new MouseAdapter() |
---|
| 1955 | + { |
---|
| 1956 | + public void mouseClicked(MouseEvent e) |
---|
| 1957 | + { |
---|
| 1958 | + Object3D object = Grafreed.materials.versionlist[13].get(0); |
---|
| 1959 | + cMaterial material = object.material; |
---|
| 1960 | + |
---|
| 1961 | + shininessField.setFloat(material.shininess); |
---|
| 1962 | + lightareaField.setFloat(material.lightarea); |
---|
| 1963 | + |
---|
| 1964 | + materialtouched = true; |
---|
| 1965 | + applySelf(); |
---|
| 1966 | + } |
---|
| 1967 | + }); |
---|
| 1968 | + presetpanel.add(rough2); |
---|
| 1969 | + |
---|
| 1970 | + cLabel shini0 = GetLabel("icons/shadericons/shadericon00014.png", !Grafreed.NIMBUSLAF); |
---|
| 1971 | + shini0.setToolTipText("Shiny"); |
---|
| 1972 | + shini0.addMouseListener(new MouseAdapter() |
---|
| 1973 | + { |
---|
| 1974 | + public void mouseClicked(MouseEvent e) |
---|
| 1975 | + { |
---|
| 1976 | + Object3D object = Grafreed.materials.versionlist[14].get(0); |
---|
| 1977 | + cMaterial material = object.material; |
---|
| 1978 | + |
---|
| 1979 | + shininessField.setFloat(material.shininess); |
---|
| 1980 | + lightareaField.setFloat(material.lightarea); |
---|
| 1981 | + |
---|
| 1982 | + materialtouched = true; |
---|
| 1983 | + applySelf(); |
---|
| 1984 | + } |
---|
| 1985 | + }); |
---|
| 1986 | + presetpanel.add(shini0); |
---|
| 1987 | + |
---|
| 1988 | + cLabel shini1 = GetLabel("icons/shadericons/shadericon00011.png", !Grafreed.NIMBUSLAF); |
---|
| 1989 | + shini1.setToolTipText("Shiny2"); |
---|
| 1990 | + shini1.addMouseListener(new MouseAdapter() |
---|
| 1991 | + { |
---|
| 1992 | + public void mouseClicked(MouseEvent e) |
---|
| 1993 | + { |
---|
| 1994 | + Object3D object = Grafreed.materials.versionlist[11].get(0); |
---|
| 1995 | + cMaterial material = object.material; |
---|
| 1996 | + |
---|
| 1997 | + shininessField.setFloat(material.shininess); |
---|
| 1998 | + lightareaField.setFloat(material.lightarea); |
---|
| 1999 | + |
---|
| 2000 | + materialtouched = true; |
---|
| 2001 | + applySelf(); |
---|
| 2002 | + } |
---|
| 2003 | + }); |
---|
| 2004 | + presetpanel.add(shini1); |
---|
| 2005 | + |
---|
| 2006 | + cLabel shini2 = GetLabel("icons/shadericons/shadericon00012.png", !Grafreed.NIMBUSLAF); |
---|
| 2007 | + shini2.setToolTipText("Shiny3"); |
---|
| 2008 | + shini2.addMouseListener(new MouseAdapter() |
---|
| 2009 | + { |
---|
| 2010 | + public void mouseClicked(MouseEvent e) |
---|
| 2011 | + { |
---|
| 2012 | + Object3D object = Grafreed.materials.versionlist[12].get(0); |
---|
| 2013 | + cMaterial material = object.material; |
---|
| 2014 | + |
---|
| 2015 | + shininessField.setFloat(material.shininess); |
---|
| 2016 | + lightareaField.setFloat(material.lightarea); |
---|
| 2017 | + |
---|
| 2018 | + materialtouched = true; |
---|
| 2019 | + applySelf(); |
---|
| 2020 | + } |
---|
| 2021 | + }); |
---|
| 2022 | + presetpanel.add(shini2); |
---|
| 2023 | + |
---|
| 2024 | + cLabel aniso = GetLabel("icons/shadericons/shadericon00008.png", !Grafreed.NIMBUSLAF); |
---|
| 2025 | + aniso.setToolTipText("AnisoU"); |
---|
| 2026 | + aniso.addMouseListener(new MouseAdapter() |
---|
| 2027 | + { |
---|
| 2028 | + public void mouseClicked(MouseEvent e) |
---|
| 2029 | + { |
---|
| 2030 | + Object3D object = Grafreed.materials.versionlist[8].get(0); |
---|
| 2031 | + cMaterial material = object.material; |
---|
| 2032 | + |
---|
| 2033 | + anisoField.setFloat(material.aniso); |
---|
| 2034 | + anisoVField.setFloat(material.anisoV); |
---|
| 2035 | + |
---|
| 2036 | + materialtouched = true; |
---|
| 2037 | + applySelf(); |
---|
| 2038 | + } |
---|
| 2039 | + }); |
---|
| 2040 | + presetpanel.add(aniso); |
---|
| 2041 | + |
---|
| 2042 | + cLabel aniso2 = GetLabel("icons/shadericons/shadericon00009.png", !Grafreed.NIMBUSLAF); |
---|
| 2043 | + aniso2.setToolTipText("AnisoV"); |
---|
| 2044 | + aniso2.addMouseListener(new MouseAdapter() |
---|
| 2045 | + { |
---|
| 2046 | + public void mouseClicked(MouseEvent e) |
---|
| 2047 | + { |
---|
| 2048 | + Object3D object = Grafreed.materials.versionlist[9].get(0); |
---|
| 2049 | + cMaterial material = object.material; |
---|
| 2050 | + |
---|
| 2051 | + anisoField.setFloat(material.aniso); |
---|
| 2052 | + anisoVField.setFloat(material.anisoV); |
---|
| 2053 | + |
---|
| 2054 | + materialtouched = true; |
---|
| 2055 | + applySelf(); |
---|
| 2056 | + } |
---|
| 2057 | + }); |
---|
| 2058 | + presetpanel.add(aniso2); |
---|
| 2059 | + |
---|
| 2060 | + cLabel aniso3 = GetLabel("icons/shadericons/shadericon00010.png", !Grafreed.NIMBUSLAF); |
---|
| 2061 | + aniso3.setToolTipText("AnisoUV"); |
---|
| 2062 | + aniso3.addMouseListener(new MouseAdapter() |
---|
| 2063 | + { |
---|
| 2064 | + public void mouseClicked(MouseEvent e) |
---|
| 2065 | + { |
---|
| 2066 | + Object3D object = Grafreed.materials.versionlist[10].get(0); |
---|
| 2067 | + cMaterial material = object.material; |
---|
| 2068 | + |
---|
| 2069 | + anisoField.setFloat(material.aniso); |
---|
| 2070 | + anisoVField.setFloat(material.anisoV); |
---|
| 2071 | + |
---|
| 2072 | + materialtouched = true; |
---|
| 2073 | + applySelf(); |
---|
| 2074 | + } |
---|
| 2075 | + }); |
---|
| 2076 | + presetpanel.add(aniso3); |
---|
| 2077 | + |
---|
| 2078 | + cLabel velvet0 = GetLabel("icons/shadericons/shadericon00015.png", !Grafreed.NIMBUSLAF); |
---|
| 2079 | + velvet0.setToolTipText("Velvet"); |
---|
| 2080 | + velvet0.addMouseListener(new MouseAdapter() |
---|
| 2081 | + { |
---|
| 2082 | + public void mouseClicked(MouseEvent e) |
---|
| 2083 | + { |
---|
| 2084 | + Object3D object = Grafreed.materials.versionlist[15].get(0); |
---|
| 2085 | + cMaterial material = object.material; |
---|
| 2086 | + |
---|
| 2087 | + diffusenessField.setFloat(material.factor); |
---|
| 2088 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 2089 | + sheenField.setFloat(material.sheen); |
---|
| 2090 | + shininessField.setFloat(material.shininess); |
---|
| 2091 | + velvetField.setFloat(material.velvet); |
---|
| 2092 | + shiftField.setFloat(material.shift); |
---|
| 2093 | + |
---|
| 2094 | + materialtouched = true; |
---|
| 2095 | + applySelf(); |
---|
| 2096 | + } |
---|
| 2097 | + }); |
---|
| 2098 | + presetpanel.add(velvet0); |
---|
| 2099 | + |
---|
| 2100 | + cLabel bump0 = GetLabel("icons/shadericons/shadericon00016.png", !Grafreed.NIMBUSLAF); |
---|
| 2101 | + bump0.setToolTipText("Bump texture"); |
---|
| 2102 | + bump0.addMouseListener(new MouseAdapter() |
---|
| 2103 | + { |
---|
| 2104 | + public void mouseClicked(MouseEvent e) |
---|
| 2105 | + { |
---|
| 2106 | + Object3D object = Grafreed.materials.versionlist[16].get(0); |
---|
| 2107 | + cMaterial material = object.material; |
---|
| 2108 | + |
---|
| 2109 | + bumpField.setFloat(object.projectedVertices[0].x / 1000.0); |
---|
| 2110 | + noiseField.setFloat(object.projectedVertices[0].y / 1000.0); |
---|
| 2111 | + powerField.setFloat(object.projectedVertices[2].x / 1000.0); |
---|
| 2112 | + |
---|
| 2113 | + materialtouched = true; |
---|
| 2114 | + applySelf(); |
---|
| 2115 | + } |
---|
| 2116 | + }); |
---|
| 2117 | + presetpanel.add(bump0); |
---|
| 2118 | + |
---|
| 2119 | + cLabel halo = GetLabel("icons/shadericons/shadericon00017.png", !Grafreed.NIMBUSLAF); |
---|
| 2120 | + halo.setToolTipText("Halo"); |
---|
| 2121 | + halo.addMouseListener(new MouseAdapter() |
---|
| 2122 | + { |
---|
| 2123 | + public void mouseClicked(MouseEvent e) |
---|
| 2124 | + { |
---|
| 2125 | + Object3D object = Grafreed.materials.versionlist[17].get(0); |
---|
| 2126 | + cMaterial material = object.material; |
---|
| 2127 | + |
---|
| 2128 | + opacityPowerField.setFloat(object.projectedVertices[2].y / 1000.0); |
---|
| 2129 | + |
---|
| 2130 | + materialtouched = true; |
---|
| 2131 | + applySelf(); |
---|
| 2132 | + } |
---|
| 2133 | + }); |
---|
| 2134 | + presetpanel.add(halo); |
---|
| 2135 | + |
---|
| 2136 | + cLabel candle = GetLabel("icons/shadericons/shadericon00018.png", !Grafreed.NIMBUSLAF); |
---|
| 2137 | + candle.setToolTipText("Candle"); |
---|
| 2138 | + candle.addMouseListener(new MouseAdapter() |
---|
| 2139 | + { |
---|
| 2140 | + public void mouseClicked(MouseEvent e) |
---|
| 2141 | + { |
---|
| 2142 | + Object3D object = Grafreed.materials.versionlist[18].get(0); |
---|
| 2143 | + cMaterial material = object.material; |
---|
| 2144 | + |
---|
| 2145 | + subsurfaceField.setFloat(material.subsurface); |
---|
| 2146 | + shadowbiasField.setFloat(material.shadowbias); |
---|
| 2147 | + ambientField.setFloat(material.ambient); |
---|
| 2148 | + specularField.setFloat(material.specular); |
---|
| 2149 | + lightareaField.setFloat(material.lightarea); |
---|
| 2150 | + shininessField.setFloat(material.shininess); |
---|
| 2151 | + |
---|
| 2152 | + materialtouched = true; |
---|
| 2153 | + applySelf(); |
---|
| 2154 | + } |
---|
| 2155 | + }); |
---|
| 2156 | + presetpanel.add(candle); |
---|
| 2157 | + |
---|
| 2158 | + cLabel shadowShader = GetLabel("icons/shadericons/shadow.png", !Grafreed.NIMBUSLAF); |
---|
| 2159 | + shadowShader.setToolTipText("Shadow"); |
---|
| 2160 | + shadowShader.addMouseListener(new MouseAdapter() |
---|
| 2161 | + { |
---|
| 2162 | + public void mouseClicked(MouseEvent e) |
---|
| 2163 | + { |
---|
| 2164 | + diffuseField.setFloat(0.001); |
---|
| 2165 | + ambientField.setFloat(0.001); |
---|
| 2166 | + cameraField.setFloat(0.001); |
---|
| 2167 | + specularField.setFloat(0.001); |
---|
| 2168 | + fakedepthField.setFloat(0.001); |
---|
| 2169 | + opacityField.setFloat(0.6); |
---|
| 2170 | + |
---|
| 2171 | + materialtouched = true; |
---|
| 2172 | + applySelf(); |
---|
| 2173 | + } |
---|
| 2174 | + }); |
---|
| 2175 | + presetpanel.add(shadowShader); |
---|
| 2176 | + |
---|
| 2177 | + cGridBag panel = new cGridBag().setVertical(true); |
---|
| 2178 | + |
---|
| 2179 | + presetpanel.preferredWidth = 1; |
---|
| 2180 | + |
---|
| 2181 | + materialpanel.add(presetpanel); |
---|
| 2182 | + materialpanel.add(panel); |
---|
| 2183 | + |
---|
| 2184 | + panel.preferredWidth = 8; |
---|
| 2185 | + |
---|
| 2186 | + /* |
---|
1704 | 2187 | ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints); |
---|
1705 | 2188 | materialLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1706 | | - */ |
---|
| 2189 | + */ |
---|
1707 | 2190 | |
---|
1708 | 2191 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
1709 | 2192 | |
---|
.. | .. |
---|
1737 | 2220 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1738 | 2221 | |
---|
1739 | 2222 | cGridBag colorSection = new cGridBag().setVertical(true); |
---|
| 2223 | + |
---|
| 2224 | + cGridBag huepanel = new cGridBag(); |
---|
| 2225 | + cGridBag huelabel = new cGridBag(); |
---|
| 2226 | + skin = GetLabel("icons/hue.png", false); |
---|
| 2227 | + skin.fit = true; |
---|
| 2228 | + huelabel.add(skin); |
---|
| 2229 | + huelabel.preferredWidth = 20; |
---|
| 2230 | + huepanel.add(new cGridBag()); // Label |
---|
| 2231 | + huepanel.add(huelabel); // Field/slider |
---|
| 2232 | + |
---|
| 2233 | + huepanel.preferredHeight = 7; |
---|
| 2234 | + |
---|
| 2235 | + colorSection.add(huepanel); |
---|
1740 | 2236 | |
---|
1741 | 2237 | cGridBag color = new cGridBag(); |
---|
1742 | | - color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints); |
---|
1743 | | - colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1744 | | - color.add(colorField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 2238 | + |
---|
| 2239 | + color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints); |
---|
| 2240 | + colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2241 | + color.add(colorField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
| 2242 | + |
---|
1745 | 2243 | //colorField.preferredWidth = 200; |
---|
1746 | 2244 | colorSection.add(color); |
---|
1747 | 2245 | |
---|
1748 | 2246 | cGridBag modulation = new cGridBag(); |
---|
1749 | 2247 | modulation.add(modulationLabel = new JLabel("Saturation")); // , aConstraints); |
---|
1750 | 2248 | modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1751 | | - modulation.add(modulationField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 2249 | + modulation.add(saturationField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
1752 | 2250 | colorSection.add(modulation); |
---|
1753 | 2251 | |
---|
| 2252 | + cGridBag opacity = new cGridBag(); |
---|
| 2253 | + opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints); |
---|
| 2254 | + opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2255 | + opacity.add(opacityField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
| 2256 | + colorSection.add(opacity); |
---|
| 2257 | + |
---|
| 2258 | + colorSection.add(GetSeparator()); |
---|
| 2259 | + |
---|
1754 | 2260 | cGridBag texture = new cGridBag(); |
---|
1755 | 2261 | texture.add(textureLabel = new JLabel("Texture")); // , aConstraints); |
---|
1756 | 2262 | textureLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1757 | 2263 | texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1758 | 2264 | colorSection.add(texture); |
---|
1759 | 2265 | |
---|
1760 | | - panel.add(new JSeparator()); |
---|
| 2266 | + panel.add(GetSeparator()); |
---|
1761 | 2267 | |
---|
1762 | 2268 | panel.add(colorSection); |
---|
1763 | 2269 | |
---|
.. | .. |
---|
1813 | 2319 | shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1814 | 2320 | diffuseSection.add(shadowbias); |
---|
1815 | 2321 | |
---|
1816 | | - panel.add(new JSeparator()); |
---|
| 2322 | + panel.add(GetSeparator()); |
---|
1817 | 2323 | |
---|
1818 | 2324 | panel.add(diffuseSection); |
---|
1819 | 2325 | |
---|
.. | .. |
---|
1876 | 2382 | specularSection.add(anisoV); |
---|
1877 | 2383 | |
---|
1878 | 2384 | |
---|
1879 | | - panel.add(new JSeparator()); |
---|
| 2385 | + panel.add(GetSeparator()); |
---|
1880 | 2386 | |
---|
1881 | 2387 | panel.add(specularSection); |
---|
1882 | 2388 | |
---|
.. | .. |
---|
1901 | 2407 | backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1902 | 2408 | backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1903 | 2409 | colorSection.add(backlit); |
---|
1904 | | - |
---|
1905 | | - cGridBag opacity = new cGridBag(); |
---|
1906 | | - opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints); |
---|
1907 | | - opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1908 | | - opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1909 | | - colorSection.add(opacity); |
---|
1910 | 2410 | |
---|
1911 | 2411 | //panel.add(new JSeparator()); |
---|
1912 | 2412 | |
---|
.. | .. |
---|
1952 | 2452 | opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints); |
---|
1953 | 2453 | textureSection.add(opacityPower); |
---|
1954 | 2454 | |
---|
1955 | | - panel.add(new JSeparator()); |
---|
| 2455 | + panel.add(GetSeparator()); |
---|
1956 | 2456 | |
---|
1957 | 2457 | panel.add(textureSection); |
---|
1958 | 2458 | |
---|
.. | .. |
---|
2939 | 3439 | |
---|
2940 | 3440 | freezematerial = true; |
---|
2941 | 3441 | colorField.setFloat(mat.color); |
---|
2942 | | - modulationField.setFloat(mat.modulation); |
---|
| 3442 | + saturationField.setFloat(mat.modulation); |
---|
2943 | 3443 | metalnessField.setFloat(mat.metalness); |
---|
2944 | 3444 | diffuseField.setFloat(mat.diffuse); |
---|
2945 | 3445 | specularField.setFloat(mat.specular); |
---|
.. | .. |
---|
3146 | 3646 | public void itemStateChanged(ItemEvent event) |
---|
3147 | 3647 | { |
---|
3148 | 3648 | // System.out.println("Propagate = " + propagate); |
---|
| 3649 | + if (event.getSource() == pinButton) |
---|
| 3650 | + { |
---|
| 3651 | + copy.pinned ^= true; |
---|
| 3652 | + if (!copy.pinned && !copy.editWindow.copy.selection.contains(copy)) |
---|
| 3653 | + { |
---|
| 3654 | + ((GroupEditor)copy.editWindow).listUI.remove(copy); |
---|
| 3655 | + copy.CloseUI(); |
---|
| 3656 | + //copy.editWindow.refreshContents(); |
---|
| 3657 | + } |
---|
| 3658 | + } |
---|
| 3659 | + else |
---|
3149 | 3660 | if (event.getSource() == propagateToggle) |
---|
3150 | 3661 | { |
---|
3151 | 3662 | propagate ^= true; |
---|
.. | .. |
---|
3250 | 3761 | } else if (event.getSource() == liveCB) |
---|
3251 | 3762 | { |
---|
3252 | 3763 | copy.live ^= true; |
---|
| 3764 | + objEditor.refreshContents(true); // To show item colors |
---|
3253 | 3765 | return; |
---|
3254 | 3766 | } else if (event.getSource() == selectableCB) |
---|
3255 | 3767 | { |
---|
.. | .. |
---|
3259 | 3771 | { |
---|
3260 | 3772 | copy.hide ^= true; |
---|
3261 | 3773 | copy.Touch(); // display list issue |
---|
3262 | | - objEditor.refreshContents(); |
---|
| 3774 | + objEditor.refreshContents(true); // To show item colors |
---|
3263 | 3775 | return; |
---|
3264 | 3776 | } else if (event.getSource() == link2masterCB) |
---|
3265 | 3777 | { |
---|
.. | .. |
---|
3515 | 4027 | |
---|
3516 | 4028 | static public byte[] Compress(Object3D o) |
---|
3517 | 4029 | { |
---|
| 4030 | + // Slower to actually compress. |
---|
3518 | 4031 | try |
---|
3519 | 4032 | { |
---|
3520 | 4033 | ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
.. | .. |
---|
3616 | 4129 | { |
---|
3617 | 4130 | //Save(true); |
---|
3618 | 4131 | Replace(); |
---|
| 4132 | + SetVersionStates(); |
---|
3619 | 4133 | } |
---|
3620 | 4134 | |
---|
3621 | 4135 | private boolean Equal(byte[] compress, byte[] name) |
---|
.. | .. |
---|
3636 | 4150 | |
---|
3637 | 4151 | java.util.Hashtable<java.util.UUID, Object3D> versiontable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
3638 | 4152 | |
---|
| 4153 | + void DeleteVersion() |
---|
| 4154 | + { |
---|
| 4155 | + for (int i = copy.versionindex; i < copy.versionlist.length-1; i++) |
---|
| 4156 | + { |
---|
| 4157 | + copy.versionlist[i] = copy.versionlist[i+1]; |
---|
| 4158 | + } |
---|
| 4159 | + |
---|
| 4160 | + CopyChanged(); |
---|
| 4161 | + |
---|
| 4162 | + SetVersionStates(); |
---|
| 4163 | + } |
---|
| 4164 | + |
---|
3639 | 4165 | public boolean Save(boolean user) |
---|
3640 | 4166 | { |
---|
3641 | 4167 | System.err.println("Save"); |
---|
| 4168 | + Replace(); |
---|
3642 | 4169 | |
---|
3643 | | - cRadio tab = GetCurrentTab(); |
---|
| 4170 | + //cRadio tab = GetCurrentTab(); |
---|
3644 | 4171 | |
---|
3645 | | - byte[] compress = CompressCopy(); |
---|
| 4172 | + Object3D compress = Duplicate(copy); // Saved version. No need for "Replace"? |
---|
3646 | 4173 | |
---|
3647 | 4174 | boolean thesame = false; |
---|
3648 | 4175 | |
---|
3649 | | - // Quick heuristic using length. Works only when stream is compressed. |
---|
3650 | | - if (copy.versionindex > 0 && copy.versions[copy.versionindex-1] != null && Equal(compress, copy.versions[copy.versionindex-1])) |
---|
3651 | | - { |
---|
3652 | | - thesame = true; |
---|
3653 | | - } |
---|
| 4176 | +// if (copy.versionindex > 0 && copy.versions[copy.versionindex-1] != null && Equal(compress, copy.versions[copy.versionindex-1])) |
---|
| 4177 | +// { |
---|
| 4178 | +// thesame = true; |
---|
| 4179 | +// } |
---|
3654 | 4180 | |
---|
3655 | 4181 | //EditorFrame.m_MainFrame.requestFocusInWindow(); |
---|
3656 | 4182 | if (!thesame) |
---|
3657 | 4183 | { |
---|
| 4184 | + for (int i = copy.versionlist.length; --i > copy.versionindex+1;) |
---|
| 4185 | + { |
---|
| 4186 | + copy.versionlist[i] = copy.versionlist[i-1]; |
---|
| 4187 | + } |
---|
| 4188 | + |
---|
3658 | 4189 | //tab.user[tab.versionindex] = user; |
---|
3659 | 4190 | //boolean increment = true; // tab.graphs[tab.versionindex] == null; |
---|
3660 | 4191 | |
---|
3661 | | - copy.versions[++copy.versionindex] = compress; |
---|
| 4192 | + copy.versionlist[++copy.versionindex] = compress; |
---|
3662 | 4193 | |
---|
3663 | 4194 | // if (increment) |
---|
3664 | 4195 | // tab.versionindex++; |
---|
.. | .. |
---|
3668 | 4199 | |
---|
3669 | 4200 | //assert(hashtable.isEmpty()); |
---|
3670 | 4201 | |
---|
3671 | | - for (int i = copy.versionindex+1; i < copy.versions.length; i++) |
---|
3672 | | - { |
---|
3673 | | - //tab.user[i] = false; |
---|
3674 | | - copy.versions[i] = null; |
---|
3675 | | - } |
---|
| 4202 | +// for (int i = copy.versionindex+1; i < copy.versionlist.length; i++) |
---|
| 4203 | +// { |
---|
| 4204 | +// //tab.user[i] = false; |
---|
| 4205 | +// copy.versionlist[i] = null; |
---|
| 4206 | +// } |
---|
3676 | 4207 | |
---|
3677 | | - SetUndoStates(); |
---|
| 4208 | + SetVersionStates(); |
---|
3678 | 4209 | |
---|
3679 | 4210 | // test save |
---|
3680 | 4211 | if (false) |
---|
.. | .. |
---|
3697 | 4228 | |
---|
3698 | 4229 | return !thesame; |
---|
3699 | 4230 | } |
---|
3700 | | - |
---|
3701 | | - void CopyChanged(Object3D obj) |
---|
| 4231 | + |
---|
| 4232 | + boolean flashIt = true; |
---|
| 4233 | + |
---|
| 4234 | + void RefreshSelection() |
---|
3702 | 4235 | { |
---|
3703 | | - SetUndoStates(); |
---|
| 4236 | + Object3D selection = new Object3D(); |
---|
| 4237 | + |
---|
| 4238 | + for (int i = 0; i < copy.selection.size(); i++) |
---|
| 4239 | + { |
---|
| 4240 | + Object3D elem = copy.selection.elementAt(i); |
---|
| 4241 | + |
---|
| 4242 | + Object3D obj = copy.GetObject(elem.GetUUID()); |
---|
| 4243 | + |
---|
| 4244 | + if (obj == null) |
---|
| 4245 | + { |
---|
| 4246 | + copy.selection.remove(i--); |
---|
| 4247 | + } |
---|
| 4248 | + else |
---|
| 4249 | + { |
---|
| 4250 | + selection.add(obj); |
---|
| 4251 | + copy.selection.setElementAt(obj, i); |
---|
| 4252 | + } |
---|
| 4253 | + } |
---|
| 4254 | + |
---|
| 4255 | + flashIt = false; |
---|
| 4256 | + GetTree().clearSelection(); |
---|
| 4257 | + for (int i = 0; i < selection.size(); i++) |
---|
| 4258 | + GetTree().addSelectionPath(selection.elementAt(i).GetTreePath().GetTreePath()); |
---|
| 4259 | + flashIt = true; |
---|
| 4260 | + |
---|
| 4261 | + //refreshContents(false); |
---|
| 4262 | + } |
---|
| 4263 | + |
---|
| 4264 | + void CopyChanged() |
---|
| 4265 | + { |
---|
| 4266 | + Object3D obj = (Object3D)Grafreed.clone(copy.versionlist[copy.versionindex]); |
---|
| 4267 | + |
---|
| 4268 | + SetVersionStates(); |
---|
3704 | 4269 | |
---|
3705 | 4270 | boolean temp = CameraPane.SWITCH; |
---|
3706 | 4271 | CameraPane.SWITCH = false; |
---|
.. | .. |
---|
3709 | 4274 | |
---|
3710 | 4275 | copy.clear(); |
---|
3711 | 4276 | |
---|
| 4277 | + copy.skyboxname = obj.skyboxname; |
---|
| 4278 | + copy.skyboxext = obj.skyboxext; |
---|
| 4279 | + |
---|
3712 | 4280 | for (int i=0; i<obj.Size(); i++) |
---|
3713 | 4281 | { |
---|
3714 | 4282 | copy.add(obj.get(i)); |
---|
.. | .. |
---|
3718 | 4286 | |
---|
3719 | 4287 | CameraPane.SWITCH = temp; |
---|
3720 | 4288 | |
---|
| 4289 | + RefreshSelection(); |
---|
3721 | 4290 | //assert(hashtable.isEmpty()); |
---|
3722 | 4291 | |
---|
3723 | 4292 | copy.Touch(); |
---|
.. | .. |
---|
3738 | 4307 | } |
---|
3739 | 4308 | } |
---|
3740 | 4309 | |
---|
3741 | | - refreshContents(); |
---|
| 4310 | + refreshContents(true); |
---|
3742 | 4311 | } |
---|
3743 | 4312 | |
---|
3744 | | - cButton undoButton; |
---|
| 4313 | + cButton previousVersionButton; |
---|
3745 | 4314 | cButton restoreButton; |
---|
3746 | 4315 | cButton replaceButton; |
---|
3747 | | - cButton redoButton; |
---|
| 4316 | + cButton nextVersionButton; |
---|
| 4317 | + cButton saveVersionButton; |
---|
| 4318 | + cButton deleteVersionButton; |
---|
3748 | 4319 | |
---|
3749 | 4320 | boolean muteSlider; |
---|
3750 | 4321 | |
---|
.. | .. |
---|
3752 | 4323 | { |
---|
3753 | 4324 | int count = 0; |
---|
3754 | 4325 | |
---|
3755 | | - for (int i = copy.versions.length; --i >= 0;) |
---|
| 4326 | + for (int i = copy.versionlist.length; --i >= 0;) |
---|
3756 | 4327 | { |
---|
3757 | | - if (copy.versions[i] != null) |
---|
| 4328 | + if (copy.versionlist[i] != null) |
---|
3758 | 4329 | count++; |
---|
3759 | 4330 | } |
---|
3760 | 4331 | |
---|
3761 | 4332 | return count; |
---|
3762 | 4333 | } |
---|
3763 | 4334 | |
---|
3764 | | - void SetUndoStates() |
---|
| 4335 | + void SetVersionStates() |
---|
3765 | 4336 | { |
---|
3766 | | - cRadio tab = GetCurrentTab(); |
---|
| 4337 | + //if (true) |
---|
| 4338 | + // return; |
---|
| 4339 | + |
---|
| 4340 | + //cRadio tab = GetCurrentTab(); |
---|
3767 | 4341 | |
---|
3768 | 4342 | restoreButton.setEnabled(copy.versionindex != -1); |
---|
3769 | 4343 | replaceButton.setEnabled(copy.versionindex != -1); |
---|
3770 | 4344 | |
---|
3771 | | - undoButton.setEnabled(copy.versionindex > 0); |
---|
3772 | | - redoButton.setEnabled(copy.versions[copy.versionindex + 1] != null); |
---|
| 4345 | + previousVersionButton.setEnabled(copy.versionindex > 0); |
---|
| 4346 | + nextVersionButton.setEnabled(copy.versionlist[copy.versionindex + 1] != null); |
---|
| 4347 | + |
---|
| 4348 | + deleteVersionButton.setEnabled(//copy.versionindex > 0 && |
---|
| 4349 | + copy.versionlist[copy.versionindex + 1] != null); |
---|
3773 | 4350 | |
---|
3774 | 4351 | muteSlider = true; |
---|
| 4352 | + versionSlider.setMinimum(0); |
---|
3775 | 4353 | versionSlider.setMaximum(VersionCount() - 1); |
---|
3776 | 4354 | versionSlider.setInteger(copy.versionindex); |
---|
| 4355 | + versionSlider.setEnabled(copy.versionindex != -1); |
---|
3777 | 4356 | muteSlider = false; |
---|
3778 | 4357 | } |
---|
3779 | 4358 | |
---|
3780 | | - public boolean Undo() |
---|
| 4359 | + public boolean PreviousVersion() |
---|
3781 | 4360 | { |
---|
3782 | 4361 | // Option? |
---|
3783 | 4362 | Replace(); |
---|
3784 | 4363 | |
---|
3785 | 4364 | System.err.println("Undo"); |
---|
3786 | 4365 | |
---|
3787 | | - cRadio tab = GetCurrentTab(); |
---|
| 4366 | + //cRadio tab = GetCurrentTab(); |
---|
3788 | 4367 | |
---|
3789 | 4368 | if (copy.versionindex == 0) |
---|
3790 | 4369 | { |
---|
.. | .. |
---|
3807 | 4386 | |
---|
3808 | 4387 | copy.versionindex -= 1; |
---|
3809 | 4388 | |
---|
3810 | | - CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex])); |
---|
| 4389 | + CopyChanged(); |
---|
3811 | 4390 | |
---|
3812 | 4391 | return true; |
---|
3813 | 4392 | } |
---|
.. | .. |
---|
3816 | 4395 | { |
---|
3817 | 4396 | System.err.println("Restore"); |
---|
3818 | 4397 | |
---|
3819 | | - cRadio tab = GetCurrentTab(); |
---|
| 4398 | + //cRadio tab = GetCurrentTab(); |
---|
3820 | 4399 | |
---|
3821 | | - if (copy.versionindex == -1 || copy.versions[copy.versionindex] == null) |
---|
| 4400 | + if (copy.versionindex == -1 || copy.versionlist[copy.versionindex] == null) |
---|
3822 | 4401 | { |
---|
3823 | 4402 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
3824 | 4403 | return false; |
---|
3825 | 4404 | } |
---|
3826 | 4405 | |
---|
3827 | | - CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex])); |
---|
| 4406 | + //CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex])); |
---|
| 4407 | + CopyChanged(); |
---|
3828 | 4408 | |
---|
3829 | 4409 | return true; |
---|
3830 | 4410 | } |
---|
.. | .. |
---|
3833 | 4413 | { |
---|
3834 | 4414 | System.err.println("Replace"); |
---|
3835 | 4415 | |
---|
3836 | | - cRadio tab = GetCurrentTab(); |
---|
| 4416 | + //cRadio tab = GetCurrentTab(); |
---|
3837 | 4417 | |
---|
3838 | | - if (copy.versionindex == -1 || copy.versions[copy.versionindex] == null) |
---|
| 4418 | + if (copy.versionindex == -1 || copy.versionlist[copy.versionindex] == null) |
---|
3839 | 4419 | { |
---|
3840 | 4420 | // No version yet. OK. java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
3841 | 4421 | return false; |
---|
3842 | 4422 | } |
---|
3843 | 4423 | |
---|
3844 | | - copy.versions[copy.versionindex] = CompressCopy(); |
---|
| 4424 | + copy.versionlist[copy.versionindex] = Duplicate(copy); |
---|
3845 | 4425 | |
---|
3846 | 4426 | return true; |
---|
3847 | 4427 | } |
---|
3848 | 4428 | |
---|
3849 | | - public void Redo() |
---|
| 4429 | + public void NextVersion() |
---|
3850 | 4430 | { |
---|
3851 | 4431 | // Option? |
---|
3852 | 4432 | Replace(); |
---|
3853 | 4433 | |
---|
3854 | | - cRadio tab = GetCurrentTab(); |
---|
| 4434 | + //cRadio tab = GetCurrentTab(); |
---|
3855 | 4435 | |
---|
3856 | | - if (copy.versions[copy.versionindex + 1] == null) |
---|
| 4436 | + if (copy.versionlist[copy.versionindex + 1] == null) |
---|
3857 | 4437 | { |
---|
3858 | 4438 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
3859 | 4439 | return; |
---|
.. | .. |
---|
3861 | 4441 | |
---|
3862 | 4442 | copy.versionindex += 1; |
---|
3863 | 4443 | |
---|
3864 | | - CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex])); |
---|
| 4444 | + CopyChanged(); |
---|
3865 | 4445 | |
---|
3866 | 4446 | //if (!tab.user[tab.versionindex]) |
---|
3867 | 4447 | // tab.graphs[tab.versionindex] = null; |
---|
.. | .. |
---|
4075 | 4655 | //copy.material = new cMaterial(copy.GetMaterial()); |
---|
4076 | 4656 | |
---|
4077 | 4657 | current.color = (float) colorField.getFloat(); |
---|
4078 | | - current.modulation = (float) modulationField.getFloat(); |
---|
| 4658 | + current.modulation = (float) saturationField.getFloat(); |
---|
4079 | 4659 | current.metalness = (float) metalnessField.getFloat(); |
---|
4080 | 4660 | current.diffuse = (float) diffuseField.getFloat(); |
---|
4081 | 4661 | current.specular = (float) specularField.getFloat(); |
---|
.. | .. |
---|
4108 | 4688 | cMaterial mat = copy.material; |
---|
4109 | 4689 | |
---|
4110 | 4690 | colorField.SetToolTipValue((mat.color)); |
---|
4111 | | - modulationField.SetToolTipValue((mat.modulation)); |
---|
| 4691 | + saturationField.SetToolTipValue((mat.modulation)); |
---|
4112 | 4692 | metalnessField.SetToolTipValue((mat.metalness)); |
---|
4113 | 4693 | diffuseField.SetToolTipValue((mat.diffuse)); |
---|
4114 | 4694 | specularField.SetToolTipValue((mat.specular)); |
---|
.. | .. |
---|
4172 | 4752 | |
---|
4173 | 4753 | int version = versionSlider.getInteger(); |
---|
4174 | 4754 | |
---|
4175 | | - if (copy.versions[version] != null) |
---|
| 4755 | + if (version != -1 && copy.versionlist[version] != null) |
---|
4176 | 4756 | { |
---|
4177 | | - CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex = version])); |
---|
| 4757 | + copy.versionindex = version; |
---|
| 4758 | + CopyChanged(); |
---|
4178 | 4759 | } |
---|
4179 | 4760 | |
---|
4180 | 4761 | return; |
---|
.. | .. |
---|
4214 | 4795 | { |
---|
4215 | 4796 | //System.out.println("stateChanged = " + this); |
---|
4216 | 4797 | materialtouched = true; |
---|
| 4798 | + |
---|
| 4799 | + if (Globals.AUTOSATURATE && e.getSource() == colorField && saturationField.getFloat() == 0.001) |
---|
| 4800 | + { |
---|
| 4801 | + saturationField.setFloat(1); |
---|
| 4802 | + } |
---|
| 4803 | + |
---|
4217 | 4804 | applySelf(); |
---|
4218 | 4805 | //System.out.println("this = " + this); |
---|
4219 | 4806 | //System.out.println("PARENT = " + parent); |
---|
.. | .. |
---|
4513 | 5100 | { |
---|
4514 | 5101 | if (GetTree() != null) |
---|
4515 | 5102 | { |
---|
| 5103 | + GetTree().revalidate(); |
---|
4516 | 5104 | GetTree().repaint(); |
---|
4517 | 5105 | } |
---|
4518 | 5106 | |
---|
.. | .. |
---|
4521 | 5109 | ctrlPanel.validate(); // ? new |
---|
4522 | 5110 | ctrlPanel.repaint(); |
---|
4523 | 5111 | } |
---|
| 5112 | + |
---|
| 5113 | + if (previousVersionButton != null && copy.versionlist != null) |
---|
| 5114 | + SetVersionStates(); |
---|
4524 | 5115 | } |
---|
4525 | 5116 | |
---|
4526 | 5117 | static TweenManager tweenManager = new TweenManager(); |
---|
.. | .. |
---|
4851 | 5442 | { |
---|
4852 | 5443 | //readobj.deepCopySelf(copy); |
---|
4853 | 5444 | copy.clear(); // june 2014 |
---|
| 5445 | + copy.skyboxname = readobj.skyboxname; |
---|
| 5446 | + copy.skyboxext = readobj.skyboxext; |
---|
4854 | 5447 | for (int i = 0; i < readobj.size(); i++) |
---|
4855 | 5448 | { |
---|
4856 | 5449 | Object3D child = readobj.get(i); // reserve(i); |
---|
.. | .. |
---|
4902 | 5495 | c.addChild(csg); |
---|
4903 | 5496 | } |
---|
4904 | 5497 | |
---|
4905 | | - copy.versions = readobj.versions; |
---|
| 5498 | + copy.versionlist = readobj.versionlist; |
---|
4906 | 5499 | copy.versionindex = readobj.versionindex; |
---|
4907 | 5500 | |
---|
4908 | | - if (copy.versions == null) |
---|
| 5501 | + if (copy.versionlist == null) |
---|
4909 | 5502 | { |
---|
4910 | | - copy.versions = new byte[100][]; |
---|
| 5503 | + // Backward compatibility |
---|
| 5504 | + copy.versionlist = new Object3D[100]; |
---|
4911 | 5505 | copy.versionindex = -1; |
---|
| 5506 | + |
---|
| 5507 | + Save(true); |
---|
4912 | 5508 | } |
---|
4913 | 5509 | |
---|
4914 | 5510 | //? SetUndoStates(); |
---|
.. | .. |
---|
4923 | 5519 | { |
---|
4924 | 5520 | if (Grafreed.standAlone) |
---|
4925 | 5521 | { |
---|
4926 | | - FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); |
---|
| 5522 | + FileDialog browser = new FileDialog(frame, "Open", FileDialog.LOAD); |
---|
4927 | 5523 | browser.show(); |
---|
4928 | 5524 | String filename = browser.getFile(); |
---|
4929 | 5525 | if (filename != null && filename.length() > 0) |
---|
.. | .. |
---|
5000 | 5596 | |
---|
5001 | 5597 | void save() |
---|
5002 | 5598 | { |
---|
| 5599 | + Replace(); |
---|
| 5600 | + |
---|
5003 | 5601 | if (lastname == null) |
---|
5004 | 5602 | { |
---|
5005 | 5603 | return; |
---|
.. | .. |
---|
5242 | 5840 | ButtonGroup buttonGroup; |
---|
5243 | 5841 | |
---|
5244 | 5842 | cGridBag toolboxPanel; |
---|
| 5843 | + cGridBag skyboxPanel; |
---|
5245 | 5844 | cGridBag materialPanel; |
---|
5246 | 5845 | cGridBag ctrlPanel; |
---|
5247 | 5846 | |
---|
.. | .. |
---|
5315 | 5914 | JLabel colorLabel; |
---|
5316 | 5915 | cNumberSlider colorField; |
---|
5317 | 5916 | JLabel modulationLabel; |
---|
5318 | | - cNumberSlider modulationField; |
---|
| 5917 | + cNumberSlider saturationField; |
---|
5319 | 5918 | JLabel metalnessLabel; |
---|
5320 | 5919 | cNumberSlider metalnessField; |
---|
5321 | 5920 | JLabel diffuseLabel; |
---|
.. | .. |
---|
5346 | 5945 | cNumberSlider anisoField; |
---|
5347 | 5946 | JLabel anisoVLabel; |
---|
5348 | 5947 | cNumberSlider anisoVField; |
---|
| 5948 | + |
---|
5349 | 5949 | JLabel cameraLabel; |
---|
5350 | 5950 | cNumberSlider cameraField; |
---|
5351 | 5951 | JLabel selfshadowLabel; |
---|
.. | .. |
---|
5360 | 5960 | cNumberSlider fakedepthField; |
---|
5361 | 5961 | JLabel shadowbiasLabel; |
---|
5362 | 5962 | cNumberSlider shadowbiasField; |
---|
| 5963 | + |
---|
5363 | 5964 | JLabel bumpLabel; |
---|
5364 | 5965 | cNumberSlider bumpField; |
---|
5365 | 5966 | JLabel noiseLabel; |
---|