.. | .. |
---|
83 | 83 | cButton GetButton(String name, boolean border) |
---|
84 | 84 | { |
---|
85 | 85 | ImageIcon icon = GetIcon(name); |
---|
86 | | - return new cButton(icon, border); |
---|
| 86 | + if (icon != null || name.contains("/")) |
---|
| 87 | + return new cButton(icon, border); |
---|
| 88 | + else |
---|
| 89 | + return new cButton(name, border); |
---|
87 | 90 | } |
---|
88 | 91 | |
---|
89 | 92 | cLabel GetLabel(String name, boolean border) |
---|
.. | .. |
---|
106 | 109 | |
---|
107 | 110 | static java.util.Hashtable<String, javax.swing.ImageIcon> icons = new java.util.Hashtable<String, javax.swing.ImageIcon>(); |
---|
108 | 111 | |
---|
109 | | - ImageIcon GetIcon(String name) |
---|
| 112 | + static ImageIcon GetIcon(String name) |
---|
110 | 113 | { |
---|
111 | 114 | javax.swing.ImageIcon iconCache = icons.get(name); |
---|
112 | 115 | if (iconCache != null) |
---|
.. | .. |
---|
116 | 119 | |
---|
117 | 120 | try |
---|
118 | 121 | { |
---|
119 | | - BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name)); |
---|
| 122 | + BufferedImage image = javax.imageio.ImageIO.read(ObjEditor.class.getClassLoader().getResourceAsStream(name)); |
---|
120 | 123 | |
---|
121 | 124 | // if (image.getWidth() > 48 && image.getHeight() > 48) |
---|
122 | 125 | // { |
---|
.. | .. |
---|
388 | 391 | //parent = p; |
---|
389 | 392 | |
---|
390 | 393 | GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(); |
---|
391 | | - System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow()); |
---|
| 394 | + if (Globals.DEBUG) |
---|
| 395 | + System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow()); |
---|
392 | 396 | //gd.setFullScreenWindow(this); |
---|
393 | 397 | //setResizable(false); |
---|
394 | 398 | //if (!isDisplayable()) |
---|
.. | .. |
---|
425 | 429 | |
---|
426 | 430 | static java.util.Vector<Object3D> listUI = new java.util.Vector<Object3D>(); |
---|
427 | 431 | |
---|
| 432 | + // This is to refresh the UI of the material panel. |
---|
| 433 | + boolean patchMaterial; |
---|
| 434 | + |
---|
428 | 435 | void SetupMenu() |
---|
429 | 436 | { |
---|
430 | 437 | frame.setMenuBar(menuBar = new MenuBar()); |
---|
.. | .. |
---|
950 | 957 | boolean temp = CameraPane.SWITCH; |
---|
951 | 958 | CameraPane.SWITCH = false; |
---|
952 | 959 | |
---|
953 | | - object.ExtractBigData(versiontable); |
---|
| 960 | + if (Grafreed.grafreed.universe.versiontable == null) |
---|
| 961 | + Grafreed.grafreed.universe.versiontable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
| 962 | + |
---|
| 963 | + object.ExtractBigData(Grafreed.grafreed.universe.versiontable); |
---|
954 | 964 | // if (copy == client) |
---|
955 | 965 | |
---|
956 | 966 | Object3D versions[] = object.versionlist; |
---|
| 967 | + java.util.Hashtable<java.util.UUID, Object3D> versiontable = object.versiontable; // if Grafreed.grafreed.universe |
---|
957 | 968 | object.versionlist = null; |
---|
| 969 | + object.versiontable = null; |
---|
| 970 | + |
---|
| 971 | + Object3D parent = object.parent; |
---|
| 972 | + object.parent = null; |
---|
958 | 973 | |
---|
959 | 974 | //byte[] compress = Compress(copy); |
---|
960 | 975 | Object3D compress = (Object3D)Grafreed.clone(object); |
---|
961 | 976 | |
---|
962 | | - object.versionlist = versions; |
---|
| 977 | + object.parent = parent; |
---|
963 | 978 | |
---|
964 | | - object.RestoreBigData(versiontable); |
---|
| 979 | + object.versionlist = versions; |
---|
| 980 | + object.versiontable = versiontable; // if Grafreed.grafreed.universe |
---|
| 981 | + |
---|
| 982 | + object.RestoreBigData(Grafreed.grafreed.universe.versiontable); |
---|
965 | 983 | |
---|
966 | 984 | CameraPane.SWITCH = temp; |
---|
967 | 985 | |
---|
.. | .. |
---|
1300 | 1318 | |
---|
1301 | 1319 | //if (copy.pinned) |
---|
1302 | 1320 | { |
---|
1303 | | - pinButton = GetToggleButton("icons/pin.png", !Grafreed.NIMBUSLAF); |
---|
| 1321 | + pinButton = GetToggleButton("icons/pin.png", !Globals.NIMBUSLAF); |
---|
1304 | 1322 | pinButton.setSelected(copy.pinned); |
---|
1305 | 1323 | cGridBag t = new cGridBag(); |
---|
1306 | 1324 | t.preferredWidth = 2; |
---|
.. | .. |
---|
1323 | 1341 | |
---|
1324 | 1342 | liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
1325 | 1343 | liveCB.setToolTipText("Animate object"); |
---|
| 1344 | + markCB = AddCheckBox(setupPanel, "Anim", copy.marked); |
---|
| 1345 | + markCB.setToolTipText("Set target transform"); |
---|
1326 | 1346 | selectableCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
1327 | 1347 | selectableCB.setToolTipText("Make object selectable"); |
---|
1328 | 1348 | // Return(); |
---|
1329 | 1349 | |
---|
1330 | 1350 | hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
1331 | 1351 | hideCB.setToolTipText("Hide object"); |
---|
1332 | | - markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
1333 | | - markCB.setToolTipText("As animation target transform"); |
---|
1334 | 1352 | |
---|
1335 | 1353 | ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false); |
---|
1336 | 1354 | |
---|
.. | .. |
---|
1532 | 1550 | |
---|
1533 | 1551 | if (cam == null || !(copy.get(0) instanceof cGroup)) |
---|
1534 | 1552 | { |
---|
| 1553 | + if (Globals.DEBUG) |
---|
1535 | 1554 | System.out.println("CREATE CAMERAS"); |
---|
1536 | 1555 | cams = new cTemplate(); |
---|
1537 | 1556 | cams.name = "Cameras"; |
---|
.. | .. |
---|
1613 | 1632 | //frontView.object = copy; |
---|
1614 | 1633 | //sideView.object = copy; |
---|
1615 | 1634 | |
---|
| 1635 | + transformPanel = new cGridBag().setVertical(true); |
---|
| 1636 | + |
---|
| 1637 | + cGridBag resetTransformPanel = new cGridBag(); |
---|
| 1638 | + |
---|
| 1639 | + resetTransformPanel.preferredHeight = 2; |
---|
| 1640 | + |
---|
| 1641 | + cButton resetTransform = GetButton("Reset all", !Globals.NIMBUSLAF); |
---|
| 1642 | + resetTransform.setToolTipText("Reset Translation, Rotation and Scale"); |
---|
| 1643 | + resetTransform.addMouseListener(new MouseAdapter() |
---|
| 1644 | + { |
---|
| 1645 | + public void mouseClicked(MouseEvent e) |
---|
| 1646 | + { |
---|
| 1647 | + ResetTransform(); |
---|
| 1648 | + } |
---|
| 1649 | + }); |
---|
| 1650 | + resetTransformPanel.add(resetTransform); |
---|
| 1651 | + |
---|
| 1652 | + resetTransform = GetButton("T only", !Globals.NIMBUSLAF); |
---|
| 1653 | + resetTransform.setToolTipText("Reset Translation only"); |
---|
| 1654 | + resetTransform.addMouseListener(new MouseAdapter() |
---|
| 1655 | + { |
---|
| 1656 | + public void mouseClicked(MouseEvent e) |
---|
| 1657 | + { |
---|
| 1658 | + ResetTransform(1); |
---|
| 1659 | + } |
---|
| 1660 | + }); |
---|
| 1661 | + resetTransformPanel.add(resetTransform); |
---|
| 1662 | + |
---|
| 1663 | + resetTransform = GetButton("RS only", !Globals.NIMBUSLAF); |
---|
| 1664 | + resetTransform.setToolTipText("Reset Rotation and Scale only"); |
---|
| 1665 | + resetTransform.addMouseListener(new MouseAdapter() |
---|
| 1666 | + { |
---|
| 1667 | + public void mouseClicked(MouseEvent e) |
---|
| 1668 | + { |
---|
| 1669 | + ResetTransform(2); |
---|
| 1670 | + } |
---|
| 1671 | + }); |
---|
| 1672 | + resetTransformPanel.add(resetTransform); |
---|
| 1673 | + |
---|
1616 | 1674 | XYZPanel = new cGridBag().setVertical(true); |
---|
1617 | 1675 | //XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
---|
1618 | 1676 | |
---|
.. | .. |
---|
1622 | 1680 | XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll); |
---|
1623 | 1681 | //XYZPanel.setName("XYZ"); |
---|
1624 | 1682 | |
---|
| 1683 | + transformPanel.add(resetTransformPanel); |
---|
| 1684 | + transformPanel.add(XYZPanel); |
---|
| 1685 | + |
---|
1625 | 1686 | /* |
---|
1626 | 1687 | gridPanel = new JPanel(); //new BorderLayout()); |
---|
1627 | 1688 | gridPanel.setLayout(new GridLayout(1, 2)); |
---|
.. | .. |
---|
1629 | 1690 | gridPanel.add(cameraView); |
---|
1630 | 1691 | gridPanel.add(XYZPanel); |
---|
1631 | 1692 | */ |
---|
1632 | | - gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, centralPanel, XYZPanel); //new BorderLayout()); |
---|
1633 | | - gridPanel.setContinuousLayout(true); |
---|
1634 | | - gridPanel.setOneTouchExpandable(true); |
---|
1635 | | - gridPanel.setDividerLocation(1.0); |
---|
1636 | | - gridPanel.setDividerSize(9); |
---|
1637 | | - gridPanel.setResizeWeight(0.85); |
---|
| 1693 | +// gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, centralPanel, XYZPanel); //new BorderLayout()); |
---|
| 1694 | +// gridPanel.setContinuousLayout(true); |
---|
| 1695 | +// gridPanel.setOneTouchExpandable(true); |
---|
| 1696 | +// gridPanel.setDividerLocation(1.0); |
---|
| 1697 | +// gridPanel.setDividerSize(9); |
---|
| 1698 | +// gridPanel.setResizeWeight(0.85); |
---|
1638 | 1699 | |
---|
1639 | 1700 | // aConstraints.weighty = 0; |
---|
1640 | 1701 | //System.out.println("THIS = " + this); |
---|
.. | .. |
---|
1657 | 1718 | |
---|
1658 | 1719 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
---|
1659 | 1720 | //tmp.setName("Edit"); |
---|
1660 | | - objectPanel.add(materialPanel); |
---|
1661 | | - objectPanel.setIconAt(0, GetIcon("icons/material.png")); |
---|
1662 | | - objectPanel.setToolTipTextAt(0, "Material"); |
---|
1663 | | - |
---|
1664 | 1721 | objectPanel.add(toolboxPanel); |
---|
1665 | | - objectPanel.setIconAt(1, GetIcon("icons/primitives.png")); |
---|
1666 | | - objectPanel.setToolTipTextAt(1, "Objects & textures"); |
---|
| 1722 | + objectPanel.setIconAt(0, GetIcon("icons/primitives.png")); |
---|
| 1723 | + objectPanel.setToolTipTextAt(0, "Objects & textures"); |
---|
1667 | 1724 | |
---|
| 1725 | + objectPanel.add(materialPanel); |
---|
| 1726 | + objectPanel.setIconAt(1, GetIcon("icons/material.png")); |
---|
| 1727 | + objectPanel.setToolTipTextAt(1, "Material"); |
---|
| 1728 | + |
---|
1668 | 1729 | objectPanel.add(skyboxPanel); |
---|
1669 | 1730 | objectPanel.setIconAt(2, GetIcon("icons/skybox.jpg")); |
---|
1670 | 1731 | objectPanel.setToolTipTextAt(2, "Backgrounds"); |
---|
.. | .. |
---|
1677 | 1738 | objectPanel.setIconAt(3, GetIcon("icons/write.png")); |
---|
1678 | 1739 | objectPanel.setToolTipTextAt(3, "Edit controls"); |
---|
1679 | 1740 | |
---|
1680 | | - objectPanel.add(XYZPanel); |
---|
| 1741 | + objectPanel.add(transformPanel); |
---|
1681 | 1742 | objectPanel.setIconAt(4, GetIcon("icons/XYZ.png")); |
---|
1682 | | - objectPanel.setToolTipTextAt(4, "XYZ/RGB transform"); |
---|
| 1743 | + objectPanel.setToolTipTextAt(4, "TRS transform"); |
---|
1683 | 1744 | |
---|
| 1745 | + patchMaterial = true; |
---|
| 1746 | + cameraView.patchMaterial = this; |
---|
| 1747 | + objectPanel.setSelectedIndex(1); |
---|
| 1748 | + |
---|
1684 | 1749 | /* |
---|
1685 | 1750 | aConstraints.gridx = 0; |
---|
1686 | 1751 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1700 | 1765 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1701 | 1766 | |
---|
1702 | 1767 | /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
1703 | | - scenePanel.preferredWidth = 5; |
---|
| 1768 | + scenePanel.preferredWidth = 6; |
---|
1704 | 1769 | |
---|
1705 | 1770 | JTabbedPane tabbedPane = new JTabbedPane(); |
---|
1706 | 1771 | tabbedPane.add(scrollpane); |
---|
.. | .. |
---|
1711 | 1776 | |
---|
1712 | 1777 | AddOptions(optionsPanel); //, aConstraints); |
---|
1713 | 1778 | |
---|
1714 | | - tabbedPane.add(optionsPanel); |
---|
1715 | | - |
---|
1716 | 1779 | tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
1717 | 1780 | |
---|
| 1781 | + tabbedPane.add(optionsPanel); |
---|
| 1782 | + |
---|
1718 | 1783 | scenePanel.add(tabbedPane); |
---|
1719 | 1784 | |
---|
1720 | | - //if (Globals.ADVANCED) |
---|
1721 | | -// tabbedPane.add(infoPanel); |
---|
1722 | | -// tabbedPane.setIconAt(3, GetIcon("icons/info.png")); |
---|
1723 | | -// tabbedPane.setToolTipTextAt(3, "Information"); |
---|
| 1785 | + cGridBag creditsPanel = new cGridBag().setVertical(true); |
---|
| 1786 | + creditsPanel.setName("Credits"); |
---|
1724 | 1787 | |
---|
| 1788 | + cLabel ogaLabel = new cLabel(" Most Skyboxes courtesy of OpenGameArt!", !Globals.NIMBUSLAF); |
---|
| 1789 | + creditsPanel.add(ogaLabel); |
---|
| 1790 | + |
---|
| 1791 | + cButton opengameartButton; |
---|
| 1792 | + creditsPanel.add(opengameartButton = GetButton("icons/sara-logo.png", !Globals.NIMBUSLAF)); |
---|
| 1793 | + opengameartButton.setToolTipText("https://opengameart.org"); |
---|
| 1794 | + |
---|
| 1795 | + opengameartButton.addMouseListener(new MouseAdapter() |
---|
| 1796 | + { |
---|
| 1797 | + public void mouseClicked(MouseEvent e) |
---|
| 1798 | + { |
---|
| 1799 | + try |
---|
| 1800 | + { |
---|
| 1801 | + Desktop.getDesktop().browse(new java.net.URI("https://opengameart.org/")); |
---|
| 1802 | + } catch (Exception e1) |
---|
| 1803 | +// } catch (java.io.IOException | java.net.URISyntaxException e1) |
---|
| 1804 | + { |
---|
| 1805 | + e1.printStackTrace(); |
---|
| 1806 | + } |
---|
| 1807 | + } |
---|
| 1808 | + }); |
---|
| 1809 | + |
---|
| 1810 | + for (int i=10; --i>=0;) |
---|
| 1811 | + { |
---|
| 1812 | + creditsPanel.add(new cGridBag()); |
---|
| 1813 | + } |
---|
| 1814 | + |
---|
| 1815 | + tabbedPane.add(creditsPanel); |
---|
| 1816 | + tabbedPane.setToolTipTextAt(3, "Credits"); |
---|
| 1817 | + |
---|
| 1818 | + if (Globals.ADVANCED) |
---|
| 1819 | + { |
---|
| 1820 | + tabbedPane.add(infoPanel); |
---|
| 1821 | + tabbedPane.setIconAt(4, GetIcon("icons/info.png")); |
---|
| 1822 | + tabbedPane.setToolTipTextAt(4, "Information"); |
---|
| 1823 | + } |
---|
| 1824 | + |
---|
1725 | 1825 | /* |
---|
1726 | 1826 | cTree jTree = new cTree(null); |
---|
1727 | 1827 | ToolTipManager.sharedInstance().registerComponent(jTree); |
---|
.. | .. |
---|
1742 | 1842 | jtp.add(tree); |
---|
1743 | 1843 | */ |
---|
1744 | 1844 | |
---|
1745 | | - bigPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, scenePanel, gridPanel); |
---|
1746 | | - bigPanel.setContinuousLayout(true); |
---|
1747 | | - bigPanel.setOneTouchExpandable(true); |
---|
1748 | | - bigPanel.setDividerLocation(0.8); |
---|
1749 | | - bigPanel.setDividerSize(15); |
---|
1750 | | - bigPanel.setResizeWeight(0.15); |
---|
1751 | | - bigPanel.setName("Scene"); |
---|
| 1845 | +// bigPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, scenePanel, gridPanel); |
---|
| 1846 | +// bigPanel.setContinuousLayout(true); |
---|
| 1847 | +// bigPanel.setOneTouchExpandable(true); |
---|
| 1848 | +// bigPanel.setDividerLocation(0.8); |
---|
| 1849 | +// bigPanel.setDividerSize(15); |
---|
| 1850 | +// bigPanel.setResizeWeight(0.15); |
---|
| 1851 | +// bigPanel.setName("Scene"); |
---|
1752 | 1852 | |
---|
1753 | 1853 | //bigPanel.setLayout(new BorderLayout()); |
---|
1754 | 1854 | //bigPanel.setSize(new Dimension(10,10)); |
---|
.. | .. |
---|
1832 | 1932 | |
---|
1833 | 1933 | cameraView.requestFocusInWindow(); |
---|
1834 | 1934 | |
---|
1835 | | - gridPanel.setDividerLocation(1.0); |
---|
| 1935 | +// gridPanel.setDividerLocation(1.0); |
---|
1836 | 1936 | |
---|
1837 | 1937 | frame.validate(); |
---|
1838 | 1938 | |
---|
.. | .. |
---|
1867 | 1967 | { |
---|
1868 | 1968 | cGridBag presetpanel = new cGridBag().setVertical(true); |
---|
1869 | 1969 | |
---|
1870 | | - cLabel skin = GetLabel("icons/shadericons/shadericon00000.png", !Grafreed.NIMBUSLAF); |
---|
| 1970 | + cLabel skin = GetLabel("icons/shadericons/shadericon00000.png", !Globals.NIMBUSLAF); |
---|
1871 | 1971 | skin.setToolTipText("Skin"); |
---|
1872 | 1972 | skin.addMouseListener(new MouseAdapter() |
---|
1873 | 1973 | { |
---|
.. | .. |
---|
1878 | 1978 | |
---|
1879 | 1979 | // Skin |
---|
1880 | 1980 | colorField.setFloat(material.color); |
---|
1881 | | - saturationField.setFloat(material.modulation); |
---|
| 1981 | + float saturation = material.modulation; |
---|
| 1982 | + |
---|
| 1983 | + if (!cameraView.Skinshader) |
---|
| 1984 | + { |
---|
| 1985 | + saturation /= 1.5; |
---|
| 1986 | + } |
---|
| 1987 | + |
---|
| 1988 | + saturationField.setFloat(saturation); |
---|
| 1989 | + |
---|
1882 | 1990 | subsurfaceField.setFloat(material.subsurface); |
---|
1883 | 1991 | selfshadowField.setFloat(material.diffuseness); |
---|
1884 | 1992 | diffusenessField.setFloat(material.factor); |
---|
.. | .. |
---|
1897 | 2005 | }); |
---|
1898 | 2006 | presetpanel.add(skin); |
---|
1899 | 2007 | |
---|
1900 | | - cLabel lambert = GetLabel("icons/shadericons/shadericon00002.png", !Grafreed.NIMBUSLAF); |
---|
| 2008 | + cLabel lambert = GetLabel("icons/shadericons/shadericon00002.png", !Globals.NIMBUSLAF); |
---|
1901 | 2009 | lambert.setToolTipText("Diffuse"); |
---|
1902 | 2010 | lambert.addMouseListener(new MouseAdapter() |
---|
1903 | 2011 | { |
---|
.. | .. |
---|
1915 | 2023 | }); |
---|
1916 | 2024 | presetpanel.add(lambert); |
---|
1917 | 2025 | |
---|
1918 | | - cLabel diffuse2 = GetLabel("icons/shadericons/shadericon00003.png", !Grafreed.NIMBUSLAF); |
---|
| 2026 | + cLabel diffuse2 = GetLabel("icons/shadericons/shadericon00003.png", !Globals.NIMBUSLAF); |
---|
1919 | 2027 | diffuse2.setToolTipText("Diffuse2"); |
---|
1920 | 2028 | diffuse2.addMouseListener(new MouseAdapter() |
---|
1921 | 2029 | { |
---|
.. | .. |
---|
1933 | 2041 | }); |
---|
1934 | 2042 | presetpanel.add(diffuse2); |
---|
1935 | 2043 | |
---|
1936 | | - cLabel diffusemoon = GetLabel("icons/shadericons/shadericon00004.png", !Grafreed.NIMBUSLAF); |
---|
| 2044 | + cLabel diffusemoon = GetLabel("icons/shadericons/shadericon00004.png", !Globals.NIMBUSLAF); |
---|
1937 | 2045 | diffusemoon.setToolTipText("Moon"); |
---|
1938 | 2046 | diffusemoon.addMouseListener(new MouseAdapter() |
---|
1939 | 2047 | { |
---|
.. | .. |
---|
1951 | 2059 | }); |
---|
1952 | 2060 | presetpanel.add(diffusemoon); |
---|
1953 | 2061 | |
---|
1954 | | - cLabel diffusemoon2 = GetLabel("icons/shadericons/shadericon00005.png", !Grafreed.NIMBUSLAF); |
---|
| 2062 | + cLabel diffusemoon2 = GetLabel("icons/shadericons/shadericon00005.png", !Globals.NIMBUSLAF); |
---|
1955 | 2063 | diffusemoon2.setToolTipText("Moon2"); |
---|
1956 | 2064 | diffusemoon2.addMouseListener(new MouseAdapter() |
---|
1957 | 2065 | { |
---|
.. | .. |
---|
1969 | 2077 | }); |
---|
1970 | 2078 | presetpanel.add(diffusemoon2); |
---|
1971 | 2079 | |
---|
1972 | | - cLabel diffusemoon3 = GetLabel("icons/shadericons/shadericon00006.png", !Grafreed.NIMBUSLAF); |
---|
| 2080 | + cLabel diffusemoon3 = GetLabel("icons/shadericons/shadericon00006.png", !Globals.NIMBUSLAF); |
---|
1973 | 2081 | diffusemoon3.setToolTipText("Moon3"); |
---|
1974 | 2082 | diffusemoon3.addMouseListener(new MouseAdapter() |
---|
1975 | 2083 | { |
---|
.. | .. |
---|
1987 | 2095 | }); |
---|
1988 | 2096 | presetpanel.add(diffusemoon3); |
---|
1989 | 2097 | |
---|
1990 | | - cLabel diffusesheen = GetLabel("icons/shadericons/shadericon00007.png", !Grafreed.NIMBUSLAF); |
---|
| 2098 | + cLabel diffusesheen = GetLabel("icons/shadericons/shadericon00007.png", !Globals.NIMBUSLAF); |
---|
1991 | 2099 | diffusesheen.setToolTipText("Sheen"); |
---|
1992 | 2100 | diffusesheen.addMouseListener(new MouseAdapter() |
---|
1993 | 2101 | { |
---|
.. | .. |
---|
2004 | 2112 | }); |
---|
2005 | 2113 | presetpanel.add(diffusesheen); |
---|
2006 | 2114 | |
---|
2007 | | - cLabel rough = GetLabel("icons/shadericons/shadericon00001.png", !Grafreed.NIMBUSLAF); |
---|
| 2115 | + cLabel rough = GetLabel("icons/shadericons/shadericon00001.png", !Globals.NIMBUSLAF); |
---|
2008 | 2116 | rough.setToolTipText("Rough metal"); |
---|
2009 | 2117 | rough.addMouseListener(new MouseAdapter() |
---|
2010 | 2118 | { |
---|
.. | .. |
---|
2022 | 2130 | }); |
---|
2023 | 2131 | presetpanel.add(rough); |
---|
2024 | 2132 | |
---|
2025 | | - cLabel rough2 = GetLabel("icons/shadericons/shadericon00013.png", !Grafreed.NIMBUSLAF); |
---|
| 2133 | + cLabel rough2 = GetLabel("icons/shadericons/shadericon00013.png", !Globals.NIMBUSLAF); |
---|
2026 | 2134 | rough2.setToolTipText("Medium metal"); |
---|
2027 | 2135 | rough2.addMouseListener(new MouseAdapter() |
---|
2028 | 2136 | { |
---|
.. | .. |
---|
2040 | 2148 | }); |
---|
2041 | 2149 | presetpanel.add(rough2); |
---|
2042 | 2150 | |
---|
2043 | | - cLabel shini0 = GetLabel("icons/shadericons/shadericon00014.png", !Grafreed.NIMBUSLAF); |
---|
| 2151 | + cLabel shini0 = GetLabel("icons/shadericons/shadericon00014.png", !Globals.NIMBUSLAF); |
---|
2044 | 2152 | shini0.setToolTipText("Shiny"); |
---|
2045 | 2153 | shini0.addMouseListener(new MouseAdapter() |
---|
2046 | 2154 | { |
---|
.. | .. |
---|
2058 | 2166 | }); |
---|
2059 | 2167 | presetpanel.add(shini0); |
---|
2060 | 2168 | |
---|
2061 | | - cLabel shini1 = GetLabel("icons/shadericons/shadericon00011.png", !Grafreed.NIMBUSLAF); |
---|
| 2169 | + cLabel shini1 = GetLabel("icons/shadericons/shadericon00011.png", !Globals.NIMBUSLAF); |
---|
2062 | 2170 | shini1.setToolTipText("Shiny2"); |
---|
2063 | 2171 | shini1.addMouseListener(new MouseAdapter() |
---|
2064 | 2172 | { |
---|
.. | .. |
---|
2076 | 2184 | }); |
---|
2077 | 2185 | presetpanel.add(shini1); |
---|
2078 | 2186 | |
---|
2079 | | - cLabel shini2 = GetLabel("icons/shadericons/shadericon00012.png", !Grafreed.NIMBUSLAF); |
---|
| 2187 | + cLabel shini2 = GetLabel("icons/shadericons/shadericon00012.png", !Globals.NIMBUSLAF); |
---|
2080 | 2188 | shini2.setToolTipText("Shiny3"); |
---|
2081 | 2189 | shini2.addMouseListener(new MouseAdapter() |
---|
2082 | 2190 | { |
---|
.. | .. |
---|
2094 | 2202 | }); |
---|
2095 | 2203 | presetpanel.add(shini2); |
---|
2096 | 2204 | |
---|
2097 | | - cLabel aniso = GetLabel("icons/shadericons/shadericon00008.png", !Grafreed.NIMBUSLAF); |
---|
| 2205 | + cLabel aniso = GetLabel("icons/shadericons/shadericon00008.png", !Globals.NIMBUSLAF); |
---|
2098 | 2206 | aniso.setToolTipText("AnisoU"); |
---|
2099 | 2207 | aniso.addMouseListener(new MouseAdapter() |
---|
2100 | 2208 | { |
---|
.. | .. |
---|
2112 | 2220 | }); |
---|
2113 | 2221 | presetpanel.add(aniso); |
---|
2114 | 2222 | |
---|
2115 | | - cLabel aniso2 = GetLabel("icons/shadericons/shadericon00009.png", !Grafreed.NIMBUSLAF); |
---|
| 2223 | + cLabel aniso2 = GetLabel("icons/shadericons/shadericon00009.png", !Globals.NIMBUSLAF); |
---|
2116 | 2224 | aniso2.setToolTipText("AnisoV"); |
---|
2117 | 2225 | aniso2.addMouseListener(new MouseAdapter() |
---|
2118 | 2226 | { |
---|
.. | .. |
---|
2130 | 2238 | }); |
---|
2131 | 2239 | presetpanel.add(aniso2); |
---|
2132 | 2240 | |
---|
2133 | | - cLabel aniso3 = GetLabel("icons/shadericons/shadericon00010.png", !Grafreed.NIMBUSLAF); |
---|
| 2241 | + cLabel aniso3 = GetLabel("icons/shadericons/shadericon00010.png", !Globals.NIMBUSLAF); |
---|
2134 | 2242 | aniso3.setToolTipText("AnisoUV"); |
---|
2135 | 2243 | aniso3.addMouseListener(new MouseAdapter() |
---|
2136 | 2244 | { |
---|
.. | .. |
---|
2148 | 2256 | }); |
---|
2149 | 2257 | presetpanel.add(aniso3); |
---|
2150 | 2258 | |
---|
2151 | | - cLabel velvet0 = GetLabel("icons/shadericons/shadericon00015.png", !Grafreed.NIMBUSLAF); |
---|
| 2259 | + cLabel velvet0 = GetLabel("icons/shadericons/shadericon00015.png", !Globals.NIMBUSLAF); |
---|
2152 | 2260 | velvet0.setToolTipText("Velvet"); |
---|
2153 | 2261 | velvet0.addMouseListener(new MouseAdapter() |
---|
2154 | 2262 | { |
---|
.. | .. |
---|
2170 | 2278 | }); |
---|
2171 | 2279 | presetpanel.add(velvet0); |
---|
2172 | 2280 | |
---|
2173 | | - cLabel bump0 = GetLabel("icons/shadericons/shadericon00016.png", !Grafreed.NIMBUSLAF); |
---|
| 2281 | + cLabel bump0 = GetLabel("icons/shadericons/shadericon00016.png", !Globals.NIMBUSLAF); |
---|
2174 | 2282 | bump0.setToolTipText("Bump texture"); |
---|
2175 | 2283 | bump0.addMouseListener(new MouseAdapter() |
---|
2176 | 2284 | { |
---|
.. | .. |
---|
2189 | 2297 | }); |
---|
2190 | 2298 | presetpanel.add(bump0); |
---|
2191 | 2299 | |
---|
2192 | | - cLabel borderShader = GetLabel("icons/shadericons/borderfade.jpg", !Grafreed.NIMBUSLAF); |
---|
| 2300 | + cLabel borderShader = GetLabel("icons/shadericons/borderfade.jpg", !Globals.NIMBUSLAF); |
---|
2193 | 2301 | borderShader.setToolTipText("Border fade"); |
---|
2194 | 2302 | borderShader.addMouseListener(new MouseAdapter() |
---|
2195 | 2303 | { |
---|
2196 | 2304 | public void mouseClicked(MouseEvent e) |
---|
2197 | 2305 | { |
---|
2198 | 2306 | borderfadeField.setFloat(0.5); |
---|
2199 | | - opacityField.setFloat(0.6); |
---|
| 2307 | + opacityField.setFloat(0.75); |
---|
2200 | 2308 | |
---|
2201 | 2309 | materialtouched = true; |
---|
2202 | 2310 | applySelf(); |
---|
.. | .. |
---|
2204 | 2312 | }); |
---|
2205 | 2313 | presetpanel.add(borderShader); |
---|
2206 | 2314 | |
---|
2207 | | - cLabel halo = GetLabel("icons/shadericons/shadericon00017.png", !Grafreed.NIMBUSLAF); |
---|
| 2315 | + cLabel halo = GetLabel("icons/shadericons/shadericon00017.png", !Globals.NIMBUSLAF); |
---|
2208 | 2316 | halo.setToolTipText("Halo"); |
---|
2209 | 2317 | halo.addMouseListener(new MouseAdapter() |
---|
2210 | 2318 | { |
---|
.. | .. |
---|
2221 | 2329 | }); |
---|
2222 | 2330 | presetpanel.add(halo); |
---|
2223 | 2331 | |
---|
2224 | | - cLabel candle = GetLabel("icons/shadericons/shadericon00018.png", !Grafreed.NIMBUSLAF); |
---|
| 2332 | + cLabel candle = GetLabel("icons/shadericons/shadericon00018.png", !Globals.NIMBUSLAF); |
---|
2225 | 2333 | candle.setToolTipText("Candle"); |
---|
2226 | 2334 | candle.addMouseListener(new MouseAdapter() |
---|
2227 | 2335 | { |
---|
.. | .. |
---|
2243 | 2351 | }); |
---|
2244 | 2352 | presetpanel.add(candle); |
---|
2245 | 2353 | |
---|
2246 | | - cLabel shadowShader = GetLabel("icons/shadericons/shadow.png", !Grafreed.NIMBUSLAF); |
---|
| 2354 | + cLabel shadowShader = GetLabel("icons/shadericons/shadow.png", !Globals.NIMBUSLAF); |
---|
2247 | 2355 | shadowShader.setToolTipText("Shadow"); |
---|
2248 | 2356 | shadowShader.addMouseListener(new MouseAdapter() |
---|
2249 | 2357 | { |
---|
.. | .. |
---|
2278 | 2386 | |
---|
2279 | 2387 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
2280 | 2388 | |
---|
2281 | | - editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 2389 | + editBar.add(createMaterialButton = new cButton("Create", !Globals.NIMBUSLAF)); // , aConstraints); |
---|
2282 | 2390 | createMaterialButton.setToolTipText("Create material"); |
---|
2283 | 2391 | |
---|
2284 | 2392 | /* |
---|
2285 | 2393 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
---|
2286 | 2394 | */ |
---|
2287 | 2395 | |
---|
2288 | | - editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 2396 | + editBar.add(clearMaterialButton = new cButton("Clear", !Globals.NIMBUSLAF)); // , aConstraints); |
---|
2289 | 2397 | clearMaterialButton.setToolTipText("Clear material"); |
---|
2290 | 2398 | |
---|
2291 | 2399 | if (Globals.ADVANCED) |
---|
2292 | 2400 | { |
---|
2293 | | - editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 2401 | + editBar.add(resetSlidersButton = new cButton("Reset", !Globals.NIMBUSLAF)); // , aConstraints); |
---|
2294 | 2402 | editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
2295 | 2403 | editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
2296 | 2404 | } |
---|
.. | .. |
---|
2311 | 2419 | |
---|
2312 | 2420 | cGridBag huepanel = new cGridBag(); |
---|
2313 | 2421 | cGridBag huelabel = new cGridBag(); |
---|
2314 | | - skin = GetLabel("icons/hue.png", false); |
---|
2315 | | - skin.fit = true; |
---|
2316 | | - huelabel.add(skin); |
---|
| 2422 | + cLabel hue = GetLabel("icons/hue.png", false); |
---|
| 2423 | + hue.fit = true; |
---|
| 2424 | + |
---|
| 2425 | + hue.addMouseListener(new MouseAdapter() |
---|
| 2426 | + { |
---|
| 2427 | + public void mousePressed(MouseEvent e) |
---|
| 2428 | + { |
---|
| 2429 | + int x = e.getX(); |
---|
| 2430 | + |
---|
| 2431 | + colorField.setFloat((double)x / ((cLabel)e.getSource()).getWidth()); |
---|
| 2432 | + } |
---|
| 2433 | + }); |
---|
| 2434 | + |
---|
| 2435 | + huelabel.add(hue); |
---|
2317 | 2436 | huelabel.preferredWidth = 20; |
---|
2318 | 2437 | huepanel.add(new cGridBag()); // Label |
---|
2319 | 2438 | huepanel.add(huelabel); // Field/slider |
---|
.. | .. |
---|
3900 | 4019 | //System.out.println("ObjEditor " + event); |
---|
3901 | 4020 | applySelf0(true); |
---|
3902 | 4021 | //parent.applySelf(); |
---|
3903 | | - objEditor.refreshContents(); |
---|
| 4022 | + // conflicts with requestFocus objEditor.refreshContents(); |
---|
3904 | 4023 | } else if (source == resetButton) |
---|
3905 | 4024 | { |
---|
3906 | 4025 | CameraPane.fullreset = true; |
---|
.. | .. |
---|
4080 | 4199 | |
---|
4081 | 4200 | void New() |
---|
4082 | 4201 | { |
---|
4083 | | - while (copy.Size() > 1) |
---|
| 4202 | + while (copy.Size() > 0) |
---|
4084 | 4203 | { |
---|
4085 | | - copy.remove(1); |
---|
| 4204 | + copy.remove(0); |
---|
4086 | 4205 | } |
---|
4087 | 4206 | |
---|
| 4207 | + copy.selection.clear(); |
---|
| 4208 | + |
---|
4088 | 4209 | ResetModel(); |
---|
| 4210 | + SetupViews(); |
---|
4089 | 4211 | objEditor.refreshContents(); |
---|
4090 | 4212 | } |
---|
4091 | 4213 | |
---|
.. | .. |
---|
4212 | 4334 | return true; |
---|
4213 | 4335 | } |
---|
4214 | 4336 | |
---|
4215 | | - java.util.Hashtable<java.util.UUID, Object3D> versiontable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
4216 | | - |
---|
4217 | 4337 | void DeleteVersion() |
---|
4218 | 4338 | { |
---|
4219 | 4339 | for (int i = copy.versionindex; i < copy.versionlist.length-1; i++) |
---|
.. | .. |
---|
4221 | 4341 | copy.versionlist[i] = copy.versionlist[i+1]; |
---|
4222 | 4342 | } |
---|
4223 | 4343 | |
---|
4224 | | - CopyChanged(); |
---|
| 4344 | + if (copy.versionlist[copy.versionindex] == null) |
---|
| 4345 | + copy.versionindex -= 1; |
---|
| 4346 | + |
---|
| 4347 | + if (copy.versionindex != -1) |
---|
| 4348 | + CopyChanged(); |
---|
4225 | 4349 | |
---|
4226 | 4350 | SetVersionStates(); |
---|
4227 | 4351 | } |
---|
.. | .. |
---|
4334 | 4458 | boolean temp = CameraPane.SWITCH; |
---|
4335 | 4459 | CameraPane.SWITCH = false; |
---|
4336 | 4460 | |
---|
4337 | | - copy.ExtractBigData(versiontable); |
---|
| 4461 | + copy.ExtractBigData(Grafreed.grafreed.universe.versiontable); |
---|
4338 | 4462 | |
---|
4339 | 4463 | copy.clear(); |
---|
4340 | 4464 | |
---|
.. | .. |
---|
4346 | 4470 | copy.add(obj.get(i)); |
---|
4347 | 4471 | } |
---|
4348 | 4472 | |
---|
4349 | | - copy.RestoreBigData(versiontable); |
---|
| 4473 | + copy.RestoreBigData(Grafreed.grafreed.universe.versiontable); |
---|
4350 | 4474 | |
---|
4351 | 4475 | CameraPane.SWITCH = temp; |
---|
4352 | 4476 | |
---|
.. | .. |
---|
4396 | 4520 | return count; |
---|
4397 | 4521 | } |
---|
4398 | 4522 | |
---|
| 4523 | + public cGridBag versionSliderPane; |
---|
| 4524 | + |
---|
4399 | 4525 | void SetVersionStates() |
---|
4400 | 4526 | { |
---|
4401 | 4527 | //if (true) |
---|
.. | .. |
---|
4403 | 4529 | |
---|
4404 | 4530 | //cRadio tab = GetCurrentTab(); |
---|
4405 | 4531 | |
---|
4406 | | - restoreButton.setEnabled(copy.versionindex != -1); |
---|
4407 | | - replaceButton.setEnabled(copy.versionindex != -1); |
---|
4408 | | - |
---|
4409 | | - previousVersionButton.setEnabled(copy.versionindex > 0); |
---|
4410 | | - nextVersionButton.setEnabled(copy.versionlist[copy.versionindex + 1] != null); |
---|
4411 | | - |
---|
4412 | | - deleteVersionButton.setEnabled(//copy.versionindex > 0 && |
---|
4413 | | - copy.versionlist[copy.versionindex + 1] != null); |
---|
4414 | | - |
---|
4415 | | - muteSlider = true; |
---|
4416 | | - versionSlider.setMinimum(0); |
---|
4417 | | - versionSlider.setMaximum(VersionCount() - 1); |
---|
4418 | | - versionSlider.setInteger(copy.versionindex); |
---|
4419 | | - versionSlider.setEnabled(copy.versionindex != -1); |
---|
4420 | | - muteSlider = false; |
---|
| 4532 | + if (copy.versionlist == null) |
---|
| 4533 | + { |
---|
| 4534 | + saveVersionButton.setEnabled(false); |
---|
| 4535 | + restoreButton.setEnabled(false); |
---|
| 4536 | + replaceButton.setEnabled(false); |
---|
| 4537 | + previousVersionButton.setEnabled(false); |
---|
| 4538 | + nextVersionButton.setEnabled(false); |
---|
| 4539 | + deleteVersionButton.setEnabled(false); |
---|
| 4540 | + versionSliderPane.setVisible(false); |
---|
| 4541 | + } |
---|
| 4542 | + else |
---|
| 4543 | + { |
---|
| 4544 | + restoreButton.setEnabled(copy.versionindex != -1); |
---|
| 4545 | + replaceButton.setEnabled(copy.versionindex != -1); |
---|
| 4546 | + |
---|
| 4547 | + previousVersionButton.setEnabled(copy.versionindex > 0); |
---|
| 4548 | + nextVersionButton.setEnabled(copy.versionlist[copy.versionindex + 1] != null); |
---|
| 4549 | + |
---|
| 4550 | + deleteVersionButton.setEnabled(copy.versionindex != -1); |
---|
| 4551 | + //copy.versionlist[copy.versionindex + 1] != null); |
---|
| 4552 | + |
---|
| 4553 | + muteSlider = true; |
---|
| 4554 | + versionSlider.setMinimum(0); |
---|
| 4555 | + versionSlider.setMaximum(VersionCount() - 1); |
---|
| 4556 | + versionSlider.setInteger(copy.versionindex); |
---|
| 4557 | + versionSlider.setEnabled(copy.versionindex != -1); |
---|
| 4558 | + muteSlider = false; |
---|
| 4559 | + |
---|
| 4560 | + versionSliderPane.setVisible(true); |
---|
| 4561 | + } |
---|
4421 | 4562 | } |
---|
4422 | 4563 | |
---|
4423 | 4564 | public boolean PreviousVersion() |
---|
.. | .. |
---|
4475 | 4616 | |
---|
4476 | 4617 | public boolean Replace() |
---|
4477 | 4618 | { |
---|
4478 | | - System.err.println("Replace"); |
---|
| 4619 | + //System.err.println("Replace"); |
---|
4479 | 4620 | |
---|
4480 | 4621 | //cRadio tab = GetCurrentTab(); |
---|
4481 | 4622 | |
---|
.. | .. |
---|
4702 | 4843 | // else |
---|
4703 | 4844 | // applySelf(true); |
---|
4704 | 4845 | // } |
---|
| 4846 | + |
---|
| 4847 | + boolean Equal(double a, double b) |
---|
| 4848 | + { |
---|
| 4849 | + return Math.abs(a - b) < 0.001; |
---|
| 4850 | + } |
---|
| 4851 | + |
---|
4705 | 4852 | void applySelf0(boolean name) |
---|
4706 | 4853 | { |
---|
4707 | 4854 | if (name) |
---|
.. | .. |
---|
4751 | 4898 | { |
---|
4752 | 4899 | cMaterial mat = copy.material; |
---|
4753 | 4900 | |
---|
4754 | | - colorField.SetToolTipValue((mat.color)); |
---|
4755 | | - saturationField.SetToolTipValue((mat.modulation)); |
---|
4756 | | - metalnessField.SetToolTipValue((mat.metalness)); |
---|
4757 | | - diffuseField.SetToolTipValue((mat.diffuse)); |
---|
4758 | | - specularField.SetToolTipValue((mat.specular)); |
---|
4759 | | - shininessField.SetToolTipValue((mat.shininess)); |
---|
4760 | | - shiftField.SetToolTipValue((mat.shift)); |
---|
4761 | | - ambientField.SetToolTipValue((mat.ambient)); |
---|
4762 | | - lightareaField.SetToolTipValue((mat.lightarea)); |
---|
4763 | | - diffusenessField.SetToolTipValue((mat.factor)); |
---|
4764 | | - velvetField.SetToolTipValue((mat.velvet)); |
---|
4765 | | - sheenField.SetToolTipValue((mat.sheen)); |
---|
4766 | | - subsurfaceField.SetToolTipValue((mat.subsurface)); |
---|
4767 | | - backlitField.SetToolTipValue((mat.bump)); |
---|
4768 | | - anisoField.SetToolTipValue((mat.aniso)); |
---|
4769 | | - anisoVField.SetToolTipValue((mat.anisoV)); |
---|
4770 | | - cameraField.SetToolTipValue((mat.cameralight)); |
---|
4771 | | - selfshadowField.SetToolTipValue((mat.diffuseness)); |
---|
4772 | | - shadowField.SetToolTipValue((mat.shadow)); |
---|
4773 | | - textureField.SetToolTipValue((mat.texture)); |
---|
4774 | | - opacityField.SetToolTipValue((mat.opacity)); |
---|
4775 | | - fakedepthField.SetToolTipValue((mat.fakedepth)); |
---|
4776 | | - shadowbiasField.SetToolTipValue((mat.shadowbias)); |
---|
| 4901 | + if (!Equal(colorField.getFloat(), mat.color)) |
---|
| 4902 | + colorField.SetToolTipValue((mat.color)); |
---|
| 4903 | + if (!Equal(saturationField.getFloat(), mat.modulation)) |
---|
| 4904 | + saturationField.SetToolTipValue((mat.modulation)); |
---|
| 4905 | + if (!Equal(metalnessField.getFloat(), mat.metalness)) |
---|
| 4906 | + metalnessField.SetToolTipValue((mat.metalness)); |
---|
| 4907 | + if (!Equal(diffuseField.getFloat(), mat.diffuse)) |
---|
| 4908 | + diffuseField.SetToolTipValue((mat.diffuse)); |
---|
| 4909 | + if (!Equal(specularField.getFloat(), mat.specular)) |
---|
| 4910 | + specularField.SetToolTipValue((mat.specular)); |
---|
| 4911 | + if (!Equal(shininessField.getFloat(), mat.shininess)) |
---|
| 4912 | + shininessField.SetToolTipValue((mat.shininess)); |
---|
| 4913 | + if (!Equal(shiftField.getFloat(), mat.shift)) |
---|
| 4914 | + shiftField.SetToolTipValue((mat.shift)); |
---|
| 4915 | + if (!Equal(ambientField.getFloat(), mat.ambient)) |
---|
| 4916 | + ambientField.SetToolTipValue((mat.ambient)); |
---|
| 4917 | + if (!Equal(lightareaField.getFloat(), mat.lightarea)) |
---|
| 4918 | + lightareaField.SetToolTipValue((mat.lightarea)); |
---|
| 4919 | + if (!Equal(diffusenessField.getFloat(), mat.factor)) |
---|
| 4920 | + diffusenessField.SetToolTipValue((mat.factor)); |
---|
| 4921 | + if (!Equal(velvetField.getFloat(), mat.velvet)) |
---|
| 4922 | + velvetField.SetToolTipValue((mat.velvet)); |
---|
| 4923 | + if (!Equal(sheenField.getFloat(), mat.sheen)) |
---|
| 4924 | + sheenField.SetToolTipValue((mat.sheen)); |
---|
| 4925 | + if (!Equal(subsurfaceField.getFloat(), mat.subsurface)) |
---|
| 4926 | + subsurfaceField.SetToolTipValue((mat.subsurface)); |
---|
| 4927 | + if (!Equal(backlitField.getFloat(), mat.bump)) |
---|
| 4928 | + backlitField.SetToolTipValue((mat.bump)); |
---|
| 4929 | + if (!Equal(anisoField.getFloat(), mat.aniso)) |
---|
| 4930 | + anisoField.SetToolTipValue((mat.aniso)); |
---|
| 4931 | + if (!Equal(anisoVField.getFloat(), mat.anisoV)) |
---|
| 4932 | + anisoVField.SetToolTipValue((mat.anisoV)); |
---|
| 4933 | + if (!Equal(cameraField.getFloat(), mat.cameralight)) |
---|
| 4934 | + cameraField.SetToolTipValue((mat.cameralight)); |
---|
| 4935 | + if (!Equal(selfshadowField.getFloat(), mat.diffuseness)) |
---|
| 4936 | + selfshadowField.SetToolTipValue((mat.diffuseness)); |
---|
| 4937 | + if (!Equal(shadowField.getFloat(), mat.shadow)) |
---|
| 4938 | + shadowField.SetToolTipValue((mat.shadow)); |
---|
| 4939 | + if (!Equal(textureField.getFloat(), mat.texture)) |
---|
| 4940 | + textureField.SetToolTipValue((mat.texture)); |
---|
| 4941 | + if (!Equal(opacityField.getFloat(), mat.opacity)) |
---|
| 4942 | + opacityField.SetToolTipValue((mat.opacity)); |
---|
| 4943 | + if (!Equal(fakedepthField.getFloat(), mat.fakedepth)) |
---|
| 4944 | + fakedepthField.SetToolTipValue((mat.fakedepth)); |
---|
| 4945 | + if (!Equal(shadowbiasField.getFloat(), mat.shadowbias)) |
---|
| 4946 | + shadowbiasField.SetToolTipValue((mat.shadowbias)); |
---|
4777 | 4947 | } |
---|
4778 | 4948 | |
---|
4779 | 4949 | if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null) |
---|
.. | .. |
---|
4808 | 4978 | |
---|
4809 | 4979 | public void stateChanged(ChangeEvent e) |
---|
4810 | 4980 | { |
---|
4811 | | - // assert(false); |
---|
| 4981 | + // assert(false); |
---|
4812 | 4982 | if (e.getSource() == versionSlider) |
---|
4813 | 4983 | { |
---|
4814 | 4984 | if (muteSlider) |
---|
.. | .. |
---|
5178 | 5348 | |
---|
5179 | 5349 | if (previousVersionButton != null && copy.versionlist != null) |
---|
5180 | 5350 | SetVersionStates(); |
---|
| 5351 | + |
---|
| 5352 | + cameraView.requestFocusInWindow(); |
---|
5181 | 5353 | } |
---|
5182 | 5354 | |
---|
5183 | 5355 | static TweenManager tweenManager = new TweenManager(); |
---|
.. | .. |
---|
5209 | 5381 | // group = (Composite) group.get(0); |
---|
5210 | 5382 | // } |
---|
5211 | 5383 | |
---|
5212 | | - System.out.println("makeSomething of " + thing); |
---|
| 5384 | + //System.out.println("makeSomething of " + thing); |
---|
5213 | 5385 | |
---|
5214 | 5386 | /* |
---|
5215 | 5387 | if (deselect && jList != null) |
---|
.. | .. |
---|
5563 | 5735 | |
---|
5564 | 5736 | copy.versionlist = readobj.versionlist; |
---|
5565 | 5737 | copy.versionindex = readobj.versionindex; |
---|
| 5738 | + copy.versiontable = readobj.versiontable; |
---|
5566 | 5739 | |
---|
5567 | 5740 | if (copy.versionlist == null) |
---|
5568 | 5741 | { |
---|
.. | .. |
---|
5918 | 6091 | boolean materialFlushed; |
---|
5919 | 6092 | Object3D latestObject; |
---|
5920 | 6093 | |
---|
| 6094 | + cGridBag transformPanel; |
---|
5921 | 6095 | cGridBag XYZPanel; |
---|
5922 | 6096 | |
---|
5923 | 6097 | JSplitPane gridPanel; |
---|