.. | .. |
---|
34 | 34 | iSendInfo |
---|
35 | 35 | //KeyListener |
---|
36 | 36 | { |
---|
| 37 | + public cToggleButton pinButton; |
---|
37 | 38 | boolean timeline; |
---|
38 | 39 | boolean wasFullScreen; |
---|
39 | 40 | |
---|
.. | .. |
---|
296 | 297 | client = inClient; |
---|
297 | 298 | copy = client; |
---|
298 | 299 | |
---|
299 | | - if (copy.versions == null) |
---|
| 300 | + if (copy.versionlist == null) |
---|
300 | 301 | { |
---|
301 | | - copy.versions = new Object3D[100]; |
---|
| 302 | + copy.versionlist = new Object3D[100]; |
---|
302 | 303 | copy.versionindex = -1; |
---|
303 | 304 | } |
---|
304 | 305 | |
---|
.. | .. |
---|
315 | 316 | client = inClient; |
---|
316 | 317 | copy = client; |
---|
317 | 318 | |
---|
318 | | - if (copy.versions == null) |
---|
| 319 | + if (copy.versionlist == null) |
---|
319 | 320 | { |
---|
320 | | - copy.versions = new Object3D[100]; |
---|
| 321 | + copy.versionlist = new Object3D[100]; |
---|
321 | 322 | copy.versionindex = -1; |
---|
322 | 323 | } |
---|
323 | 324 | |
---|
.. | .. |
---|
353 | 354 | copy = localCopy; |
---|
354 | 355 | copy.editWindow = this; |
---|
355 | 356 | |
---|
356 | | - if (copy.versions == null) |
---|
| 357 | + if (copy.versionlist == null) |
---|
357 | 358 | { |
---|
358 | 359 | // copy.versions = new byte[100][]; |
---|
359 | 360 | // copy.versionindex = -1; |
---|
.. | .. |
---|
467 | 468 | toolboxPanel = new cGridBag().setVertical(true); |
---|
468 | 469 | //toolboxPanel.setName("Toolbox"); |
---|
469 | 470 | |
---|
470 | | - materialPanel = new cGridBag().setVertical(true); |
---|
| 471 | + skyboxPanel = new cGridBag().setVertical(true); |
---|
| 472 | + |
---|
| 473 | + materialPanel = new cGridBag().setVertical(false); |
---|
471 | 474 | //materialPanel.setName("Material"); |
---|
472 | 475 | |
---|
473 | 476 | /*JTextPane*/ |
---|
.. | .. |
---|
848 | 851 | //frame.setVisible(true); |
---|
849 | 852 | } |
---|
850 | 853 | frame.validate(); |
---|
| 854 | + |
---|
| 855 | + cameraView.requestFocusInWindow(); |
---|
851 | 856 | } |
---|
852 | 857 | |
---|
853 | 858 | private Object3D CompressCopy() |
---|
.. | .. |
---|
858 | 863 | copy.ExtractBigData(versiontable); |
---|
859 | 864 | // if (copy == client) |
---|
860 | 865 | |
---|
861 | | - Object3D versions[] = copy.versions; |
---|
862 | | - copy.versions = null; |
---|
| 866 | + Object3D versions[] = copy.versionlist; |
---|
| 867 | + copy.versionlist = null; |
---|
863 | 868 | |
---|
864 | 869 | //byte[] compress = Compress(copy); |
---|
865 | 870 | Object3D compress = (Object3D)Grafreed.clone(copy); |
---|
866 | 871 | |
---|
867 | | - copy.versions = versions; |
---|
| 872 | + copy.versionlist = versions; |
---|
868 | 873 | |
---|
869 | 874 | copy.RestoreBigData(versiontable); |
---|
870 | 875 | |
---|
.. | .. |
---|
994 | 999 | { |
---|
995 | 1000 | SetupMaterial(materialPanel); |
---|
996 | 1001 | } |
---|
| 1002 | + |
---|
997 | 1003 | //SetupName(); |
---|
998 | 1004 | //SetupViews(); |
---|
999 | 1005 | } |
---|
.. | .. |
---|
1202 | 1208 | |
---|
1203 | 1209 | namePanel = new cGridBag(); |
---|
1204 | 1210 | |
---|
| 1211 | + //if (copy.pinned) |
---|
| 1212 | + { |
---|
| 1213 | + pinButton = GetToggleButton("icons/pin.png", !Grafreed.NIMBUSLAF); |
---|
| 1214 | + pinButton.setSelected(copy.pinned); |
---|
| 1215 | + cGridBag t = new cGridBag(); |
---|
| 1216 | + t.preferredWidth = 2; |
---|
| 1217 | + t.add(pinButton); |
---|
| 1218 | + namePanel.add(t); |
---|
| 1219 | + |
---|
| 1220 | + pinButton.addItemListener(this); |
---|
| 1221 | + } |
---|
| 1222 | + |
---|
1205 | 1223 | nameField = AddText(namePanel, copy.GetName()); |
---|
1206 | 1224 | namePanel.add(new JScrollPane(nameField, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER)); |
---|
1207 | 1225 | oe.ctrlPanel.add(namePanel); |
---|
.. | .. |
---|
1551 | 1569 | //tmp.setName("Edit"); |
---|
1552 | 1570 | objectPanel.add(materialPanel); |
---|
1553 | 1571 | objectPanel.setIconAt(0, GetIcon("icons/material.png")); |
---|
1554 | | - objectPanel.setToolTipTextAt(0, "Material panel"); |
---|
| 1572 | + objectPanel.setToolTipTextAt(0, "Material"); |
---|
1555 | 1573 | |
---|
| 1574 | + objectPanel.add(toolboxPanel); |
---|
| 1575 | + objectPanel.setIconAt(1, GetIcon("icons/primitives.png")); |
---|
| 1576 | + objectPanel.setToolTipTextAt(1, "Objects & textures"); |
---|
| 1577 | + |
---|
| 1578 | + objectPanel.add(skyboxPanel); |
---|
| 1579 | + objectPanel.setIconAt(2, GetIcon("icons/skybox.jpg")); |
---|
| 1580 | + objectPanel.setToolTipTextAt(2, "Backgrounds"); |
---|
| 1581 | + |
---|
1556 | 1582 | // JPanel north = new JPanel(new BorderLayout()); |
---|
1557 | 1583 | // north.setName("Edit"); |
---|
1558 | 1584 | // north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1559 | 1585 | // objectPanel.add(north); |
---|
1560 | 1586 | objectPanel.add(editPanel); |
---|
1561 | | - objectPanel.setIconAt(1, GetIcon("icons/write.png")); |
---|
1562 | | - objectPanel.setToolTipTextAt(1, "Edit panel"); |
---|
1563 | | - |
---|
1564 | | - //if (Globals.ADVANCED) |
---|
1565 | | - objectPanel.add(infoPanel); |
---|
1566 | | - objectPanel.setIconAt(2, GetIcon("icons/info.png")); |
---|
1567 | | - objectPanel.setToolTipTextAt(2, "Info panel"); |
---|
| 1587 | + objectPanel.setIconAt(3, GetIcon("icons/write.png")); |
---|
| 1588 | + objectPanel.setToolTipTextAt(3, "Edit controls"); |
---|
1568 | 1589 | |
---|
1569 | 1590 | objectPanel.add(XYZPanel); |
---|
1570 | | - objectPanel.setIconAt(3, GetIcon("icons/XYZ.png")); |
---|
1571 | | - objectPanel.setToolTipTextAt(3, "XYZ/RGB panel"); |
---|
| 1591 | + objectPanel.setIconAt(4, GetIcon("icons/XYZ.png")); |
---|
| 1592 | + objectPanel.setToolTipTextAt(4, "XYZ/RGB transform"); |
---|
1572 | 1593 | |
---|
1573 | | - objectPanel.add(toolboxPanel); |
---|
1574 | | - objectPanel.setIconAt(4, GetIcon("icons/primitives.png")); |
---|
1575 | | - objectPanel.setToolTipTextAt(4, "Objects/backgrounds panel"); |
---|
1576 | | - |
---|
1577 | 1594 | /* |
---|
1578 | 1595 | aConstraints.gridx = 0; |
---|
1579 | 1596 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1610 | 1627 | |
---|
1611 | 1628 | scenePanel.add(tabbedPane); |
---|
1612 | 1629 | |
---|
| 1630 | + //if (Globals.ADVANCED) |
---|
| 1631 | + tabbedPane.add(infoPanel); |
---|
| 1632 | + tabbedPane.setIconAt(3, GetIcon("icons/info.png")); |
---|
| 1633 | + tabbedPane.setToolTipTextAt(3, "Information"); |
---|
| 1634 | + |
---|
1613 | 1635 | /* |
---|
1614 | 1636 | cTree jTree = new cTree(null); |
---|
1615 | 1637 | ToolTipManager.sharedInstance().registerComponent(jTree); |
---|
.. | .. |
---|
1734 | 1756 | ctrlPanel.removeAll(); |
---|
1735 | 1757 | } |
---|
1736 | 1758 | |
---|
1737 | | - void SetupMaterial(cGridBag panel) |
---|
| 1759 | + void SetupMaterial(cGridBag materialpanel) |
---|
1738 | 1760 | { |
---|
1739 | | - /* |
---|
| 1761 | + cGridBag presetpanel = new cGridBag().setVertical(true); |
---|
| 1762 | + |
---|
| 1763 | + cLabel skin = GetLabel("icons/shadericons/shadericon00000.png", !Grafreed.NIMBUSLAF); |
---|
| 1764 | + skin.setToolTipText("Skin"); |
---|
| 1765 | + skin.addMouseListener(new MouseAdapter() |
---|
| 1766 | + { |
---|
| 1767 | + public void mouseClicked(MouseEvent e) |
---|
| 1768 | + { |
---|
| 1769 | + Object3D object = Grafreed.materials.versionlist[0].get(0); |
---|
| 1770 | + cMaterial material = object.material; |
---|
| 1771 | + |
---|
| 1772 | + // Skin |
---|
| 1773 | + colorField.setFloat(material.color); |
---|
| 1774 | + saturationField.setFloat(material.modulation); |
---|
| 1775 | + subsurfaceField.setFloat(material.subsurface); |
---|
| 1776 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1777 | + diffusenessField.setFloat(material.factor); |
---|
| 1778 | + shininessField.setFloat(material.shininess); |
---|
| 1779 | + shadowbiasField.setFloat(material.shadowbias); |
---|
| 1780 | + diffuseField.setFloat(material.diffuse); |
---|
| 1781 | + specularField.setFloat(material.specular); |
---|
| 1782 | + |
---|
| 1783 | + bumpField.setFloat(object.projectedVertices[0].x / 1000.0); |
---|
| 1784 | + noiseField.setFloat(object.projectedVertices[0].y / 1000.0); |
---|
| 1785 | + powerField.setFloat(object.projectedVertices[2].x / 1000.0); |
---|
| 1786 | + |
---|
| 1787 | + materialtouched = true; |
---|
| 1788 | + applySelf(); |
---|
| 1789 | + } |
---|
| 1790 | + }); |
---|
| 1791 | + presetpanel.add(skin); |
---|
| 1792 | + |
---|
| 1793 | + cLabel lambert = GetLabel("icons/shadericons/shadericon00002.png", !Grafreed.NIMBUSLAF); |
---|
| 1794 | + lambert.setToolTipText("Diffuse"); |
---|
| 1795 | + lambert.addMouseListener(new MouseAdapter() |
---|
| 1796 | + { |
---|
| 1797 | + public void mouseClicked(MouseEvent e) |
---|
| 1798 | + { |
---|
| 1799 | + Object3D object = Grafreed.materials.versionlist[2].get(0); |
---|
| 1800 | + cMaterial material = object.material; |
---|
| 1801 | + |
---|
| 1802 | + diffusenessField.setFloat(material.factor); |
---|
| 1803 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1804 | + |
---|
| 1805 | + materialtouched = true; |
---|
| 1806 | + applySelf(); |
---|
| 1807 | + } |
---|
| 1808 | + }); |
---|
| 1809 | + presetpanel.add(lambert); |
---|
| 1810 | + |
---|
| 1811 | + cLabel diffuse2 = GetLabel("icons/shadericons/shadericon00003.png", !Grafreed.NIMBUSLAF); |
---|
| 1812 | + diffuse2.setToolTipText("Diffuse2"); |
---|
| 1813 | + diffuse2.addMouseListener(new MouseAdapter() |
---|
| 1814 | + { |
---|
| 1815 | + public void mouseClicked(MouseEvent e) |
---|
| 1816 | + { |
---|
| 1817 | + Object3D object = Grafreed.materials.versionlist[3].get(0); |
---|
| 1818 | + cMaterial material = object.material; |
---|
| 1819 | + |
---|
| 1820 | + diffusenessField.setFloat(material.factor); |
---|
| 1821 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1822 | + |
---|
| 1823 | + materialtouched = true; |
---|
| 1824 | + applySelf(); |
---|
| 1825 | + } |
---|
| 1826 | + }); |
---|
| 1827 | + presetpanel.add(diffuse2); |
---|
| 1828 | + |
---|
| 1829 | + cLabel diffusemoon = GetLabel("icons/shadericons/shadericon00004.png", !Grafreed.NIMBUSLAF); |
---|
| 1830 | + diffusemoon.setToolTipText("Moon"); |
---|
| 1831 | + diffusemoon.addMouseListener(new MouseAdapter() |
---|
| 1832 | + { |
---|
| 1833 | + public void mouseClicked(MouseEvent e) |
---|
| 1834 | + { |
---|
| 1835 | + Object3D object = Grafreed.materials.versionlist[4].get(0); |
---|
| 1836 | + cMaterial material = object.material; |
---|
| 1837 | + |
---|
| 1838 | + diffusenessField.setFloat(material.factor); |
---|
| 1839 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1840 | + |
---|
| 1841 | + materialtouched = true; |
---|
| 1842 | + applySelf(); |
---|
| 1843 | + } |
---|
| 1844 | + }); |
---|
| 1845 | + presetpanel.add(diffusemoon); |
---|
| 1846 | + |
---|
| 1847 | + cLabel diffusemoon2 = GetLabel("icons/shadericons/shadericon00005.png", !Grafreed.NIMBUSLAF); |
---|
| 1848 | + diffusemoon2.setToolTipText("Moon2"); |
---|
| 1849 | + diffusemoon2.addMouseListener(new MouseAdapter() |
---|
| 1850 | + { |
---|
| 1851 | + public void mouseClicked(MouseEvent e) |
---|
| 1852 | + { |
---|
| 1853 | + Object3D object = Grafreed.materials.versionlist[5].get(0); |
---|
| 1854 | + cMaterial material = object.material; |
---|
| 1855 | + |
---|
| 1856 | + diffusenessField.setFloat(material.factor); |
---|
| 1857 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1858 | + |
---|
| 1859 | + materialtouched = true; |
---|
| 1860 | + applySelf(); |
---|
| 1861 | + } |
---|
| 1862 | + }); |
---|
| 1863 | + presetpanel.add(diffusemoon2); |
---|
| 1864 | + |
---|
| 1865 | + cLabel diffusemoon3 = GetLabel("icons/shadericons/shadericon00006.png", !Grafreed.NIMBUSLAF); |
---|
| 1866 | + diffusemoon3.setToolTipText("Moon3"); |
---|
| 1867 | + diffusemoon3.addMouseListener(new MouseAdapter() |
---|
| 1868 | + { |
---|
| 1869 | + public void mouseClicked(MouseEvent e) |
---|
| 1870 | + { |
---|
| 1871 | + Object3D object = Grafreed.materials.versionlist[6].get(0); |
---|
| 1872 | + cMaterial material = object.material; |
---|
| 1873 | + |
---|
| 1874 | + diffusenessField.setFloat(material.factor); |
---|
| 1875 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1876 | + |
---|
| 1877 | + materialtouched = true; |
---|
| 1878 | + applySelf(); |
---|
| 1879 | + } |
---|
| 1880 | + }); |
---|
| 1881 | + presetpanel.add(diffusemoon3); |
---|
| 1882 | + |
---|
| 1883 | + cLabel diffusesheen = GetLabel("icons/shadericons/shadericon00007.png", !Grafreed.NIMBUSLAF); |
---|
| 1884 | + diffusesheen.setToolTipText("Sheen"); |
---|
| 1885 | + diffusesheen.addMouseListener(new MouseAdapter() |
---|
| 1886 | + { |
---|
| 1887 | + public void mouseClicked(MouseEvent e) |
---|
| 1888 | + { |
---|
| 1889 | + Object3D object = Grafreed.materials.versionlist[7].get(0); |
---|
| 1890 | + cMaterial material = object.material; |
---|
| 1891 | + |
---|
| 1892 | + sheenField.setFloat(material.sheen); |
---|
| 1893 | + |
---|
| 1894 | + materialtouched = true; |
---|
| 1895 | + applySelf(); |
---|
| 1896 | + } |
---|
| 1897 | + }); |
---|
| 1898 | + presetpanel.add(diffusesheen); |
---|
| 1899 | + |
---|
| 1900 | + cLabel rough = GetLabel("icons/shadericons/shadericon00001.png", !Grafreed.NIMBUSLAF); |
---|
| 1901 | + rough.setToolTipText("Rough metal"); |
---|
| 1902 | + rough.addMouseListener(new MouseAdapter() |
---|
| 1903 | + { |
---|
| 1904 | + public void mouseClicked(MouseEvent e) |
---|
| 1905 | + { |
---|
| 1906 | + Object3D object = Grafreed.materials.versionlist[1].get(0); |
---|
| 1907 | + cMaterial material = object.material; |
---|
| 1908 | + |
---|
| 1909 | + shininessField.setFloat(material.shininess); |
---|
| 1910 | + velvetField.setFloat(material.velvet); |
---|
| 1911 | + |
---|
| 1912 | + materialtouched = true; |
---|
| 1913 | + applySelf(); |
---|
| 1914 | + } |
---|
| 1915 | + }); |
---|
| 1916 | + presetpanel.add(rough); |
---|
| 1917 | + |
---|
| 1918 | + cLabel rough2 = GetLabel("icons/shadericons/shadericon00013.png", !Grafreed.NIMBUSLAF); |
---|
| 1919 | + rough2.setToolTipText("Medium metal"); |
---|
| 1920 | + rough2.addMouseListener(new MouseAdapter() |
---|
| 1921 | + { |
---|
| 1922 | + public void mouseClicked(MouseEvent e) |
---|
| 1923 | + { |
---|
| 1924 | + Object3D object = Grafreed.materials.versionlist[13].get(0); |
---|
| 1925 | + cMaterial material = object.material; |
---|
| 1926 | + |
---|
| 1927 | + shininessField.setFloat(material.shininess); |
---|
| 1928 | + lightareaField.setFloat(material.lightarea); |
---|
| 1929 | + |
---|
| 1930 | + materialtouched = true; |
---|
| 1931 | + applySelf(); |
---|
| 1932 | + } |
---|
| 1933 | + }); |
---|
| 1934 | + presetpanel.add(rough2); |
---|
| 1935 | + |
---|
| 1936 | + cLabel shini0 = GetLabel("icons/shadericons/shadericon00014.png", !Grafreed.NIMBUSLAF); |
---|
| 1937 | + shini0.setToolTipText("Shiny"); |
---|
| 1938 | + shini0.addMouseListener(new MouseAdapter() |
---|
| 1939 | + { |
---|
| 1940 | + public void mouseClicked(MouseEvent e) |
---|
| 1941 | + { |
---|
| 1942 | + Object3D object = Grafreed.materials.versionlist[14].get(0); |
---|
| 1943 | + cMaterial material = object.material; |
---|
| 1944 | + |
---|
| 1945 | + shininessField.setFloat(material.shininess); |
---|
| 1946 | + lightareaField.setFloat(material.lightarea); |
---|
| 1947 | + |
---|
| 1948 | + materialtouched = true; |
---|
| 1949 | + applySelf(); |
---|
| 1950 | + } |
---|
| 1951 | + }); |
---|
| 1952 | + presetpanel.add(shini0); |
---|
| 1953 | + |
---|
| 1954 | + cLabel shini1 = GetLabel("icons/shadericons/shadericon00011.png", !Grafreed.NIMBUSLAF); |
---|
| 1955 | + shini1.setToolTipText("Shiny2"); |
---|
| 1956 | + shini1.addMouseListener(new MouseAdapter() |
---|
| 1957 | + { |
---|
| 1958 | + public void mouseClicked(MouseEvent e) |
---|
| 1959 | + { |
---|
| 1960 | + Object3D object = Grafreed.materials.versionlist[11].get(0); |
---|
| 1961 | + cMaterial material = object.material; |
---|
| 1962 | + |
---|
| 1963 | + shininessField.setFloat(material.shininess); |
---|
| 1964 | + lightareaField.setFloat(material.lightarea); |
---|
| 1965 | + |
---|
| 1966 | + materialtouched = true; |
---|
| 1967 | + applySelf(); |
---|
| 1968 | + } |
---|
| 1969 | + }); |
---|
| 1970 | + presetpanel.add(shini1); |
---|
| 1971 | + |
---|
| 1972 | + cLabel shini2 = GetLabel("icons/shadericons/shadericon00012.png", !Grafreed.NIMBUSLAF); |
---|
| 1973 | + shini2.setToolTipText("Shiny3"); |
---|
| 1974 | + shini2.addMouseListener(new MouseAdapter() |
---|
| 1975 | + { |
---|
| 1976 | + public void mouseClicked(MouseEvent e) |
---|
| 1977 | + { |
---|
| 1978 | + Object3D object = Grafreed.materials.versionlist[12].get(0); |
---|
| 1979 | + cMaterial material = object.material; |
---|
| 1980 | + |
---|
| 1981 | + shininessField.setFloat(material.shininess); |
---|
| 1982 | + lightareaField.setFloat(material.lightarea); |
---|
| 1983 | + |
---|
| 1984 | + materialtouched = true; |
---|
| 1985 | + applySelf(); |
---|
| 1986 | + } |
---|
| 1987 | + }); |
---|
| 1988 | + presetpanel.add(shini2); |
---|
| 1989 | + |
---|
| 1990 | + cLabel aniso = GetLabel("icons/shadericons/shadericon00008.png", !Grafreed.NIMBUSLAF); |
---|
| 1991 | + aniso.setToolTipText("AnisoU"); |
---|
| 1992 | + aniso.addMouseListener(new MouseAdapter() |
---|
| 1993 | + { |
---|
| 1994 | + public void mouseClicked(MouseEvent e) |
---|
| 1995 | + { |
---|
| 1996 | + Object3D object = Grafreed.materials.versionlist[8].get(0); |
---|
| 1997 | + cMaterial material = object.material; |
---|
| 1998 | + |
---|
| 1999 | + anisoField.setFloat(material.aniso); |
---|
| 2000 | + anisoVField.setFloat(material.anisoV); |
---|
| 2001 | + |
---|
| 2002 | + materialtouched = true; |
---|
| 2003 | + applySelf(); |
---|
| 2004 | + } |
---|
| 2005 | + }); |
---|
| 2006 | + presetpanel.add(aniso); |
---|
| 2007 | + |
---|
| 2008 | + cLabel aniso2 = GetLabel("icons/shadericons/shadericon00009.png", !Grafreed.NIMBUSLAF); |
---|
| 2009 | + aniso2.setToolTipText("AnisoV"); |
---|
| 2010 | + aniso2.addMouseListener(new MouseAdapter() |
---|
| 2011 | + { |
---|
| 2012 | + public void mouseClicked(MouseEvent e) |
---|
| 2013 | + { |
---|
| 2014 | + Object3D object = Grafreed.materials.versionlist[9].get(0); |
---|
| 2015 | + cMaterial material = object.material; |
---|
| 2016 | + |
---|
| 2017 | + anisoField.setFloat(material.aniso); |
---|
| 2018 | + anisoVField.setFloat(material.anisoV); |
---|
| 2019 | + |
---|
| 2020 | + materialtouched = true; |
---|
| 2021 | + applySelf(); |
---|
| 2022 | + } |
---|
| 2023 | + }); |
---|
| 2024 | + presetpanel.add(aniso2); |
---|
| 2025 | + |
---|
| 2026 | + cLabel aniso3 = GetLabel("icons/shadericons/shadericon00010.png", !Grafreed.NIMBUSLAF); |
---|
| 2027 | + aniso3.setToolTipText("AnisoUV"); |
---|
| 2028 | + aniso3.addMouseListener(new MouseAdapter() |
---|
| 2029 | + { |
---|
| 2030 | + public void mouseClicked(MouseEvent e) |
---|
| 2031 | + { |
---|
| 2032 | + Object3D object = Grafreed.materials.versionlist[10].get(0); |
---|
| 2033 | + cMaterial material = object.material; |
---|
| 2034 | + |
---|
| 2035 | + anisoField.setFloat(material.aniso); |
---|
| 2036 | + anisoVField.setFloat(material.anisoV); |
---|
| 2037 | + |
---|
| 2038 | + materialtouched = true; |
---|
| 2039 | + applySelf(); |
---|
| 2040 | + } |
---|
| 2041 | + }); |
---|
| 2042 | + presetpanel.add(aniso3); |
---|
| 2043 | + |
---|
| 2044 | + cLabel velvet0 = GetLabel("icons/shadericons/shadericon00015.png", !Grafreed.NIMBUSLAF); |
---|
| 2045 | + velvet0.setToolTipText("Velvet"); |
---|
| 2046 | + velvet0.addMouseListener(new MouseAdapter() |
---|
| 2047 | + { |
---|
| 2048 | + public void mouseClicked(MouseEvent e) |
---|
| 2049 | + { |
---|
| 2050 | + Object3D object = Grafreed.materials.versionlist[15].get(0); |
---|
| 2051 | + cMaterial material = object.material; |
---|
| 2052 | + |
---|
| 2053 | + diffusenessField.setFloat(material.factor); |
---|
| 2054 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 2055 | + sheenField.setFloat(material.sheen); |
---|
| 2056 | + shininessField.setFloat(material.shininess); |
---|
| 2057 | + velvetField.setFloat(material.velvet); |
---|
| 2058 | + shiftField.setFloat(material.shift); |
---|
| 2059 | + |
---|
| 2060 | + materialtouched = true; |
---|
| 2061 | + applySelf(); |
---|
| 2062 | + } |
---|
| 2063 | + }); |
---|
| 2064 | + presetpanel.add(velvet0); |
---|
| 2065 | + |
---|
| 2066 | + cLabel bump0 = GetLabel("icons/shadericons/shadericon00016.png", !Grafreed.NIMBUSLAF); |
---|
| 2067 | + bump0.setToolTipText("Bump texture"); |
---|
| 2068 | + bump0.addMouseListener(new MouseAdapter() |
---|
| 2069 | + { |
---|
| 2070 | + public void mouseClicked(MouseEvent e) |
---|
| 2071 | + { |
---|
| 2072 | + Object3D object = Grafreed.materials.versionlist[16].get(0); |
---|
| 2073 | + cMaterial material = object.material; |
---|
| 2074 | + |
---|
| 2075 | + bumpField.setFloat(object.projectedVertices[0].x / 1000.0); |
---|
| 2076 | + noiseField.setFloat(object.projectedVertices[0].y / 1000.0); |
---|
| 2077 | + powerField.setFloat(object.projectedVertices[2].x / 1000.0); |
---|
| 2078 | + |
---|
| 2079 | + materialtouched = true; |
---|
| 2080 | + applySelf(); |
---|
| 2081 | + } |
---|
| 2082 | + }); |
---|
| 2083 | + presetpanel.add(bump0); |
---|
| 2084 | + |
---|
| 2085 | + cLabel halo = GetLabel("icons/shadericons/shadericon00017.png", !Grafreed.NIMBUSLAF); |
---|
| 2086 | + halo.setToolTipText("Halo"); |
---|
| 2087 | + halo.addMouseListener(new MouseAdapter() |
---|
| 2088 | + { |
---|
| 2089 | + public void mouseClicked(MouseEvent e) |
---|
| 2090 | + { |
---|
| 2091 | + Object3D object = Grafreed.materials.versionlist[17].get(0); |
---|
| 2092 | + cMaterial material = object.material; |
---|
| 2093 | + |
---|
| 2094 | + opacityPowerField.setFloat(object.projectedVertices[2].y / 1000.0); |
---|
| 2095 | + |
---|
| 2096 | + materialtouched = true; |
---|
| 2097 | + applySelf(); |
---|
| 2098 | + } |
---|
| 2099 | + }); |
---|
| 2100 | + presetpanel.add(halo); |
---|
| 2101 | + |
---|
| 2102 | + cLabel candle = GetLabel("icons/shadericons/shadericon00018.png", !Grafreed.NIMBUSLAF); |
---|
| 2103 | + candle.setToolTipText("Candle"); |
---|
| 2104 | + candle.addMouseListener(new MouseAdapter() |
---|
| 2105 | + { |
---|
| 2106 | + public void mouseClicked(MouseEvent e) |
---|
| 2107 | + { |
---|
| 2108 | + Object3D object = Grafreed.materials.versionlist[18].get(0); |
---|
| 2109 | + cMaterial material = object.material; |
---|
| 2110 | + |
---|
| 2111 | + subsurfaceField.setFloat(material.subsurface); |
---|
| 2112 | + shadowbiasField.setFloat(material.shadowbias); |
---|
| 2113 | + ambientField.setFloat(material.ambient); |
---|
| 2114 | + specularField.setFloat(material.specular); |
---|
| 2115 | + lightareaField.setFloat(material.lightarea); |
---|
| 2116 | + shininessField.setFloat(material.shininess); |
---|
| 2117 | + |
---|
| 2118 | + materialtouched = true; |
---|
| 2119 | + applySelf(); |
---|
| 2120 | + } |
---|
| 2121 | + }); |
---|
| 2122 | + presetpanel.add(candle); |
---|
| 2123 | + |
---|
| 2124 | + cGridBag panel = new cGridBag().setVertical(true); |
---|
| 2125 | + |
---|
| 2126 | + presetpanel.preferredWidth = 1; |
---|
| 2127 | + |
---|
| 2128 | + materialpanel.add(presetpanel); |
---|
| 2129 | + materialpanel.add(panel); |
---|
| 2130 | + |
---|
| 2131 | + panel.preferredWidth = 8; |
---|
| 2132 | + |
---|
| 2133 | + /* |
---|
1740 | 2134 | ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints); |
---|
1741 | 2135 | materialLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1742 | | - */ |
---|
| 2136 | + */ |
---|
1743 | 2137 | |
---|
1744 | 2138 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
1745 | 2139 | |
---|
.. | .. |
---|
1776 | 2170 | |
---|
1777 | 2171 | cGridBag huepanel = new cGridBag(); |
---|
1778 | 2172 | cGridBag huelabel = new cGridBag(); |
---|
1779 | | - huelabel.add(GetLabel("icons/hue.png", false)); |
---|
| 2173 | + skin = GetLabel("icons/hue.png", false); |
---|
| 2174 | + skin.fit = true; |
---|
| 2175 | + huelabel.add(skin); |
---|
1780 | 2176 | huelabel.preferredWidth = 20; |
---|
1781 | 2177 | huepanel.add(new cGridBag()); // Label |
---|
1782 | 2178 | huepanel.add(huelabel); // Field/slider |
---|
.. | .. |
---|
1797 | 2193 | cGridBag modulation = new cGridBag(); |
---|
1798 | 2194 | modulation.add(modulationLabel = new JLabel("Saturation")); // , aConstraints); |
---|
1799 | 2195 | modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1800 | | - modulation.add(modulationField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
| 2196 | + modulation.add(saturationField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
1801 | 2197 | colorSection.add(modulation); |
---|
1802 | 2198 | |
---|
1803 | 2199 | cGridBag opacity = new cGridBag(); |
---|
.. | .. |
---|
2990 | 3386 | |
---|
2991 | 3387 | freezematerial = true; |
---|
2992 | 3388 | colorField.setFloat(mat.color); |
---|
2993 | | - modulationField.setFloat(mat.modulation); |
---|
| 3389 | + saturationField.setFloat(mat.modulation); |
---|
2994 | 3390 | metalnessField.setFloat(mat.metalness); |
---|
2995 | 3391 | diffuseField.setFloat(mat.diffuse); |
---|
2996 | 3392 | specularField.setFloat(mat.specular); |
---|
.. | .. |
---|
3197 | 3593 | public void itemStateChanged(ItemEvent event) |
---|
3198 | 3594 | { |
---|
3199 | 3595 | // System.out.println("Propagate = " + propagate); |
---|
| 3596 | + if (event.getSource() == pinButton) |
---|
| 3597 | + { |
---|
| 3598 | + copy.pinned ^= true; |
---|
| 3599 | + if (!copy.pinned && !copy.editWindow.copy.selection.contains(copy)) |
---|
| 3600 | + { |
---|
| 3601 | + ((GroupEditor)copy.editWindow).listUI.remove(copy); |
---|
| 3602 | + copy.CloseUI(); |
---|
| 3603 | + //copy.editWindow.refreshContents(); |
---|
| 3604 | + } |
---|
| 3605 | + } |
---|
| 3606 | + else |
---|
3200 | 3607 | if (event.getSource() == propagateToggle) |
---|
3201 | 3608 | { |
---|
3202 | 3609 | propagate ^= true; |
---|
.. | .. |
---|
3301 | 3708 | } else if (event.getSource() == liveCB) |
---|
3302 | 3709 | { |
---|
3303 | 3710 | copy.live ^= true; |
---|
| 3711 | + objEditor.refreshContents(true); // To show item colors |
---|
3304 | 3712 | return; |
---|
3305 | 3713 | } else if (event.getSource() == selectableCB) |
---|
3306 | 3714 | { |
---|
.. | .. |
---|
3310 | 3718 | { |
---|
3311 | 3719 | copy.hide ^= true; |
---|
3312 | 3720 | copy.Touch(); // display list issue |
---|
3313 | | - objEditor.refreshContents(); |
---|
| 3721 | + objEditor.refreshContents(true); // To show item colors |
---|
3314 | 3722 | return; |
---|
3315 | 3723 | } else if (event.getSource() == link2masterCB) |
---|
3316 | 3724 | { |
---|
.. | .. |
---|
3668 | 4076 | { |
---|
3669 | 4077 | //Save(true); |
---|
3670 | 4078 | Replace(); |
---|
| 4079 | + SetUndoStates(); |
---|
3671 | 4080 | } |
---|
3672 | 4081 | |
---|
3673 | 4082 | private boolean Equal(byte[] compress, byte[] name) |
---|
.. | .. |
---|
3688 | 4097 | |
---|
3689 | 4098 | java.util.Hashtable<java.util.UUID, Object3D> versiontable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
3690 | 4099 | |
---|
| 4100 | + void DeleteVersion() |
---|
| 4101 | + { |
---|
| 4102 | + for (int i = copy.versionindex; i < copy.versionlist.length-1; i++) |
---|
| 4103 | + { |
---|
| 4104 | + copy.versionlist[i] = copy.versionlist[i+1]; |
---|
| 4105 | + } |
---|
| 4106 | + |
---|
| 4107 | + CopyChanged(); |
---|
| 4108 | + |
---|
| 4109 | + SetUndoStates(); |
---|
| 4110 | + } |
---|
| 4111 | + |
---|
3691 | 4112 | public boolean Save(boolean user) |
---|
3692 | 4113 | { |
---|
3693 | 4114 | System.err.println("Save"); |
---|
| 4115 | + //Replace(); |
---|
3694 | 4116 | |
---|
3695 | 4117 | cRadio tab = GetCurrentTab(); |
---|
3696 | 4118 | |
---|
3697 | | - Object3D compress = CompressCopy(); // Saved version. No need for "Replace". |
---|
| 4119 | + Object3D compress = CompressCopy(); // Saved version. No need for "Replace"? |
---|
3698 | 4120 | |
---|
3699 | 4121 | boolean thesame = false; |
---|
3700 | 4122 | |
---|
.. | .. |
---|
3706 | 4128 | //EditorFrame.m_MainFrame.requestFocusInWindow(); |
---|
3707 | 4129 | if (!thesame) |
---|
3708 | 4130 | { |
---|
| 4131 | + for (int i = copy.versionlist.length; --i > copy.versionindex+1;) |
---|
| 4132 | + { |
---|
| 4133 | + copy.versionlist[i] = copy.versionlist[i-1]; |
---|
| 4134 | + } |
---|
| 4135 | + |
---|
3709 | 4136 | //tab.user[tab.versionindex] = user; |
---|
3710 | 4137 | //boolean increment = true; // tab.graphs[tab.versionindex] == null; |
---|
3711 | 4138 | |
---|
3712 | | - copy.versions[++copy.versionindex] = compress; |
---|
| 4139 | + copy.versionlist[++copy.versionindex] = compress; |
---|
3713 | 4140 | |
---|
3714 | 4141 | // if (increment) |
---|
3715 | 4142 | // tab.versionindex++; |
---|
.. | .. |
---|
3719 | 4146 | |
---|
3720 | 4147 | //assert(hashtable.isEmpty()); |
---|
3721 | 4148 | |
---|
3722 | | - for (int i = copy.versionindex+1; i < copy.versions.length; i++) |
---|
3723 | | - { |
---|
3724 | | - //tab.user[i] = false; |
---|
3725 | | - copy.versions[i] = null; |
---|
3726 | | - } |
---|
| 4149 | +// for (int i = copy.versionindex+1; i < copy.versionlist.length; i++) |
---|
| 4150 | +// { |
---|
| 4151 | +// //tab.user[i] = false; |
---|
| 4152 | +// copy.versionlist[i] = null; |
---|
| 4153 | +// } |
---|
3727 | 4154 | |
---|
3728 | 4155 | SetUndoStates(); |
---|
3729 | 4156 | |
---|
.. | .. |
---|
3748 | 4175 | |
---|
3749 | 4176 | return !thesame; |
---|
3750 | 4177 | } |
---|
3751 | | - |
---|
3752 | | - void CopyChanged(Object3D obj) |
---|
| 4178 | + |
---|
| 4179 | + boolean flashIt = true; |
---|
| 4180 | + |
---|
| 4181 | + void RefreshSelection() |
---|
3753 | 4182 | { |
---|
| 4183 | + Object3D selection = new Object3D(); |
---|
| 4184 | + |
---|
| 4185 | + for (int i = 0; i < copy.selection.size(); i++) |
---|
| 4186 | + { |
---|
| 4187 | + Object3D elem = copy.selection.elementAt(i); |
---|
| 4188 | + |
---|
| 4189 | + Object3D obj = copy.GetObject(elem.GetUUID()); |
---|
| 4190 | + |
---|
| 4191 | + if (obj == null) |
---|
| 4192 | + { |
---|
| 4193 | + copy.selection.remove(i--); |
---|
| 4194 | + } |
---|
| 4195 | + else |
---|
| 4196 | + { |
---|
| 4197 | + selection.add(obj); |
---|
| 4198 | + copy.selection.setElementAt(obj, i); |
---|
| 4199 | + } |
---|
| 4200 | + } |
---|
| 4201 | + |
---|
| 4202 | + flashIt = false; |
---|
| 4203 | + GetTree().clearSelection(); |
---|
| 4204 | + for (int i = 0; i < selection.size(); i++) |
---|
| 4205 | + GetTree().addSelectionPath(selection.elementAt(i).GetTreePath().GetTreePath()); |
---|
| 4206 | + flashIt = true; |
---|
| 4207 | + |
---|
| 4208 | + //refreshContents(false); |
---|
| 4209 | + } |
---|
| 4210 | + |
---|
| 4211 | + void CopyChanged() |
---|
| 4212 | + { |
---|
| 4213 | + Object3D obj = copy.versionlist[copy.versionindex]; |
---|
| 4214 | + |
---|
3754 | 4215 | SetUndoStates(); |
---|
3755 | 4216 | |
---|
3756 | 4217 | boolean temp = CameraPane.SWITCH; |
---|
.. | .. |
---|
3772 | 4233 | |
---|
3773 | 4234 | CameraPane.SWITCH = temp; |
---|
3774 | 4235 | |
---|
| 4236 | + RefreshSelection(); |
---|
3775 | 4237 | //assert(hashtable.isEmpty()); |
---|
3776 | 4238 | |
---|
3777 | 4239 | copy.Touch(); |
---|
.. | .. |
---|
3792 | 4254 | } |
---|
3793 | 4255 | } |
---|
3794 | 4256 | |
---|
3795 | | - refreshContents(); |
---|
| 4257 | + refreshContents(true); |
---|
3796 | 4258 | } |
---|
3797 | 4259 | |
---|
3798 | | - cButton undoButton; |
---|
| 4260 | + cButton previousVersionButton; |
---|
3799 | 4261 | cButton restoreButton; |
---|
3800 | 4262 | cButton replaceButton; |
---|
3801 | | - cButton redoButton; |
---|
| 4263 | + cButton nextVersionButton; |
---|
| 4264 | + cButton saveVersionButton; |
---|
| 4265 | + cButton deleteVersionButton; |
---|
3802 | 4266 | |
---|
3803 | 4267 | boolean muteSlider; |
---|
3804 | 4268 | |
---|
.. | .. |
---|
3806 | 4270 | { |
---|
3807 | 4271 | int count = 0; |
---|
3808 | 4272 | |
---|
3809 | | - for (int i = copy.versions.length; --i >= 0;) |
---|
| 4273 | + for (int i = copy.versionlist.length; --i >= 0;) |
---|
3810 | 4274 | { |
---|
3811 | | - if (copy.versions[i] != null) |
---|
| 4275 | + if (copy.versionlist[i] != null) |
---|
3812 | 4276 | count++; |
---|
3813 | 4277 | } |
---|
3814 | 4278 | |
---|
.. | .. |
---|
3819 | 4283 | { |
---|
3820 | 4284 | cRadio tab = GetCurrentTab(); |
---|
3821 | 4285 | |
---|
3822 | | - restoreButton.setEnabled(copy.versionindex != -1); |
---|
3823 | | - replaceButton.setEnabled(copy.versionindex != -1); |
---|
| 4286 | + restoreButton.setEnabled(true); // copy.versionindex != -1); |
---|
| 4287 | + replaceButton.setEnabled(true); // copy.versionindex != -1); |
---|
3824 | 4288 | |
---|
3825 | | - undoButton.setEnabled(copy.versionindex > 0); |
---|
3826 | | - redoButton.setEnabled(copy.versions[copy.versionindex + 1] != null); |
---|
| 4289 | + previousVersionButton.setEnabled(copy.versionindex > 0); |
---|
| 4290 | + nextVersionButton.setEnabled(copy.versionlist[copy.versionindex + 1] != null); |
---|
| 4291 | + |
---|
| 4292 | + deleteVersionButton.setEnabled(//copy.versionindex > 0 && |
---|
| 4293 | + copy.versionlist[copy.versionindex + 1] != null); |
---|
3827 | 4294 | |
---|
3828 | 4295 | muteSlider = true; |
---|
3829 | 4296 | versionSlider.setMaximum(VersionCount() - 1); |
---|
.. | .. |
---|
3831 | 4298 | muteSlider = false; |
---|
3832 | 4299 | } |
---|
3833 | 4300 | |
---|
3834 | | - public boolean Undo() |
---|
| 4301 | + public boolean PreviousVersion() |
---|
3835 | 4302 | { |
---|
3836 | 4303 | // Option? |
---|
3837 | 4304 | Replace(); |
---|
.. | .. |
---|
3861 | 4328 | |
---|
3862 | 4329 | copy.versionindex -= 1; |
---|
3863 | 4330 | |
---|
3864 | | - CopyChanged((Object3D)copy.versions[copy.versionindex]); |
---|
| 4331 | + CopyChanged(); |
---|
3865 | 4332 | |
---|
3866 | 4333 | return true; |
---|
3867 | 4334 | } |
---|
.. | .. |
---|
3872 | 4339 | |
---|
3873 | 4340 | cRadio tab = GetCurrentTab(); |
---|
3874 | 4341 | |
---|
3875 | | - if (copy.versionindex == -1 || copy.versions[copy.versionindex] == null) |
---|
| 4342 | + if (copy.versionindex == -1 || copy.versionlist[copy.versionindex] == null) |
---|
3876 | 4343 | { |
---|
3877 | 4344 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
3878 | 4345 | return false; |
---|
3879 | 4346 | } |
---|
3880 | 4347 | |
---|
3881 | 4348 | //CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex])); |
---|
3882 | | - CopyChanged(copy.versions[copy.versionindex]); |
---|
| 4349 | + CopyChanged(); |
---|
3883 | 4350 | |
---|
3884 | 4351 | return true; |
---|
3885 | 4352 | } |
---|
.. | .. |
---|
3890 | 4357 | |
---|
3891 | 4358 | cRadio tab = GetCurrentTab(); |
---|
3892 | 4359 | |
---|
3893 | | - if (copy.versionindex == -1 || copy.versions[copy.versionindex] == null) |
---|
| 4360 | + if (copy.versionindex == -1 || copy.versionlist[copy.versionindex] == null) |
---|
3894 | 4361 | { |
---|
3895 | 4362 | // No version yet. OK. java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
3896 | 4363 | return false; |
---|
3897 | 4364 | } |
---|
3898 | 4365 | |
---|
3899 | | - copy.versions[copy.versionindex] = CompressCopy(); |
---|
| 4366 | + copy.versionlist[copy.versionindex] = CompressCopy(); |
---|
3900 | 4367 | |
---|
3901 | 4368 | return true; |
---|
3902 | 4369 | } |
---|
3903 | 4370 | |
---|
3904 | | - public void Redo() |
---|
| 4371 | + public void NextVersion() |
---|
3905 | 4372 | { |
---|
3906 | 4373 | // Option? |
---|
3907 | 4374 | Replace(); |
---|
3908 | 4375 | |
---|
3909 | 4376 | cRadio tab = GetCurrentTab(); |
---|
3910 | 4377 | |
---|
3911 | | - if (copy.versions[copy.versionindex + 1] == null) |
---|
| 4378 | + if (copy.versionlist[copy.versionindex + 1] == null) |
---|
3912 | 4379 | { |
---|
3913 | 4380 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
3914 | 4381 | return; |
---|
.. | .. |
---|
3916 | 4383 | |
---|
3917 | 4384 | copy.versionindex += 1; |
---|
3918 | 4385 | |
---|
3919 | | - CopyChanged(copy.versions[copy.versionindex]); |
---|
| 4386 | + CopyChanged(); |
---|
3920 | 4387 | |
---|
3921 | 4388 | //if (!tab.user[tab.versionindex]) |
---|
3922 | 4389 | // tab.graphs[tab.versionindex] = null; |
---|
.. | .. |
---|
4130 | 4597 | //copy.material = new cMaterial(copy.GetMaterial()); |
---|
4131 | 4598 | |
---|
4132 | 4599 | current.color = (float) colorField.getFloat(); |
---|
4133 | | - current.modulation = (float) modulationField.getFloat(); |
---|
| 4600 | + current.modulation = (float) saturationField.getFloat(); |
---|
4134 | 4601 | current.metalness = (float) metalnessField.getFloat(); |
---|
4135 | 4602 | current.diffuse = (float) diffuseField.getFloat(); |
---|
4136 | 4603 | current.specular = (float) specularField.getFloat(); |
---|
.. | .. |
---|
4163 | 4630 | cMaterial mat = copy.material; |
---|
4164 | 4631 | |
---|
4165 | 4632 | colorField.SetToolTipValue((mat.color)); |
---|
4166 | | - modulationField.SetToolTipValue((mat.modulation)); |
---|
| 4633 | + saturationField.SetToolTipValue((mat.modulation)); |
---|
4167 | 4634 | metalnessField.SetToolTipValue((mat.metalness)); |
---|
4168 | 4635 | diffuseField.SetToolTipValue((mat.diffuse)); |
---|
4169 | 4636 | specularField.SetToolTipValue((mat.specular)); |
---|
.. | .. |
---|
4227 | 4694 | |
---|
4228 | 4695 | int version = versionSlider.getInteger(); |
---|
4229 | 4696 | |
---|
4230 | | - if (copy.versions[version] != null) |
---|
| 4697 | + if (copy.versionlist[version] != null) |
---|
4231 | 4698 | { |
---|
4232 | | - CopyChanged(copy.versions[copy.versionindex = version]); |
---|
| 4699 | + copy.versionindex = version; |
---|
| 4700 | + CopyChanged(); |
---|
4233 | 4701 | } |
---|
4234 | 4702 | |
---|
4235 | 4703 | return; |
---|
.. | .. |
---|
4269 | 4737 | { |
---|
4270 | 4738 | //System.out.println("stateChanged = " + this); |
---|
4271 | 4739 | materialtouched = true; |
---|
| 4740 | + |
---|
| 4741 | + if (e.getSource() == colorField && saturationField.getFloat() == 0.001) |
---|
| 4742 | + { |
---|
| 4743 | + saturationField.setFloat(1); |
---|
| 4744 | + } |
---|
| 4745 | + |
---|
4272 | 4746 | applySelf(); |
---|
4273 | 4747 | //System.out.println("this = " + this); |
---|
4274 | 4748 | //System.out.println("PARENT = " + parent); |
---|
.. | .. |
---|
4568 | 5042 | { |
---|
4569 | 5043 | if (GetTree() != null) |
---|
4570 | 5044 | { |
---|
| 5045 | + GetTree().revalidate(); |
---|
4571 | 5046 | GetTree().repaint(); |
---|
4572 | 5047 | } |
---|
4573 | 5048 | |
---|
.. | .. |
---|
4576 | 5051 | ctrlPanel.validate(); // ? new |
---|
4577 | 5052 | ctrlPanel.repaint(); |
---|
4578 | 5053 | } |
---|
| 5054 | + |
---|
| 5055 | + if (previousVersionButton != null && copy.versionlist != null) |
---|
| 5056 | + SetUndoStates(); |
---|
4579 | 5057 | } |
---|
4580 | 5058 | |
---|
4581 | 5059 | static TweenManager tweenManager = new TweenManager(); |
---|
.. | .. |
---|
4959 | 5437 | c.addChild(csg); |
---|
4960 | 5438 | } |
---|
4961 | 5439 | |
---|
4962 | | - copy.versions = readobj.versions; |
---|
| 5440 | + copy.versionlist = readobj.versionlist; |
---|
4963 | 5441 | copy.versionindex = readobj.versionindex; |
---|
4964 | 5442 | |
---|
4965 | | - if (copy.versions == null) |
---|
| 5443 | + if (copy.versionlist == null) |
---|
4966 | 5444 | { |
---|
4967 | | - copy.versions = new Object3D[100]; |
---|
| 5445 | + copy.versionlist = new Object3D[100]; |
---|
4968 | 5446 | copy.versionindex = -1; |
---|
4969 | 5447 | } |
---|
4970 | 5448 | |
---|
.. | .. |
---|
4980 | 5458 | { |
---|
4981 | 5459 | if (Grafreed.standAlone) |
---|
4982 | 5460 | { |
---|
4983 | | - FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); |
---|
| 5461 | + FileDialog browser = new FileDialog(frame, "Open", FileDialog.LOAD); |
---|
4984 | 5462 | browser.show(); |
---|
4985 | 5463 | String filename = browser.getFile(); |
---|
4986 | 5464 | if (filename != null && filename.length() > 0) |
---|
.. | .. |
---|
5299 | 5777 | ButtonGroup buttonGroup; |
---|
5300 | 5778 | |
---|
5301 | 5779 | cGridBag toolboxPanel; |
---|
| 5780 | + cGridBag skyboxPanel; |
---|
5302 | 5781 | cGridBag materialPanel; |
---|
5303 | 5782 | cGridBag ctrlPanel; |
---|
5304 | 5783 | |
---|
.. | .. |
---|
5372 | 5851 | JLabel colorLabel; |
---|
5373 | 5852 | cNumberSlider colorField; |
---|
5374 | 5853 | JLabel modulationLabel; |
---|
5375 | | - cNumberSlider modulationField; |
---|
| 5854 | + cNumberSlider saturationField; |
---|
5376 | 5855 | JLabel metalnessLabel; |
---|
5377 | 5856 | cNumberSlider metalnessField; |
---|
5378 | 5857 | JLabel diffuseLabel; |
---|