CameraPane.java | ●●●●● patch | view | raw | blame | history | |
Cone.java | ●●●●● patch | view | raw | blame | history | |
Globals.java | ●●●●● patch | view | raw | blame | history | |
GroupEditor.java | ●●●●● patch | view | raw | blame | history | |
GroupLeaf.java | ●●●●● patch | view | raw | blame | history | |
ObjEditor.java | ●●●●● patch | view | raw | blame | history | |
RandomEditor.java | ●●●●● patch | view | raw | blame | history | |
RandomNode.java | ●●●●● patch | view | raw | blame | history | |
Torus.java | ●●●●● patch | view | raw | blame | history | |
cButton.java | ●●●●● patch | view | raw | blame | history |
CameraPane.java
.. .. @@ -13375,9 +13375,10 @@ 13375 13375 "DP3 " + dest + ".z," + "normals," + "eye;" + 13376 13376 "MAX " + dest + ".w," + dest + ".z," + "eps.x;" + 13377 13377 //"MOV " + dest + ".w," + "normal.z;" + 13378 - "MUL " + dest + ".z," + "params2.w," + dest + ".x;" +13379 - "MUL " + dest + ".z," + dest + ".z," + dest + ".x;" +13380 - //"MOV " + dest + ".z," + "params2.w;" +13378 +// "MUL " + dest + ".z," + "params2.w," + dest + ".x;" + // PRETTY HEURISTIC FOR VELVET13379 +// "MUL " + dest + ".z," + dest + ".z," + dest + ".x;" +13380 +13381 + "MOV " + dest + ".z," + "params2.w;" + // EXACT13381 13382 "POW " + dest + ".w," + dest + ".w," + dest + ".z;" + 13382 13383 "RCP " + dest + ".w," + dest + ".w;" + 13383 13384 //"RSQ " + dest + ".w," + dest + ".w;" + .. .. @@ -15119,9 +15120,9 @@ 15119 15120 case '_': 15120 15121 kompactbit = 5; 15121 15122 break; 15122 - case '+':15123 - kompactbit = 6;15124 - break;15123 +// case '+':15124 +// kompactbit = 6;15125 +// break;15125 15126 case ' ': 15126 15127 ObjEditor.theFrame.ToggleFullScreen(); 15127 15128 repaint(); .. .. @@ -15170,8 +15171,8 @@ 15170 15171 case DELETE: 15171 15172 ClearSelection(); 15172 15173 break; 15173 - /*15174 15174 case '+': 15175 + /*15175 15176 //fontsize += 1; 15176 15177 bbzoom *= 2; 15177 15178 repaint(); Cone.java
.. .. @@ -2,6 +2,7 @@ 2 2 3 3 class Cone extends Biparam implements java.io.Serializable 4 4 { 5 + static final long serialVersionUID = -679715043452968126L;5 6 6 7 Cone() 7 8 { Globals.java
.. .. @@ -16,7 +16,7 @@ 16 16 public static boolean TIMERRUNNING = false; 17 17 18 18 // Hold on calculation when moving camera 19 - public static boolean FREEZEONMOVE = false; // true;19 + public static boolean FREEZEONMOVE = false;20 20 21 21 static boolean CROWD = false; 22 22 static public int drawMode = iCameraPane.DEFAULT; // WARNING GroupEditor.java
.. .. @@ -220,7 +220,7 @@ 220 220 // toggleSwitchItem.addItemListener(this); 221 221 // toggleSwitchItem.setState(CameraPane.SWITCH); 222 222 223 - cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));223 + cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles"));224 224 toggleHandleItem.addItemListener(this); 225 225 toggleHandleItem.setState(CameraPane.HANDLES); 226 226 .. .. @@ -582,7 +582,7 @@ 582 582 */ 583 583 cGridBag copyOptionsPanel = new cGridBag(); 584 584 585 - copyOptionsPanel.preferredHeight = 2;585 + copyOptionsPanel.preferredHeight = 1;586 586 587 587 //this.AddOptions(oe.toolbarPanel, oe.aConstraints); 588 588 .. .. @@ -726,7 +726,7 @@ 726 726 compositeButton.addActionListener(this); 727 727 728 728 oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); 729 - switchButton.setToolTipText("Create switch");729 + switchButton.setToolTipText("Create item switcher");730 730 switchButton.addActionListener(this); 731 731 732 732 oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); .. .. @@ -863,9 +863,13 @@ 863 863 864 864 if (true) // Globals.ADVANCED) 865 865 { 866 - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);867 - supportCB.setToolTipText("Enable rigging");868 - supportCB.addItemListener(this);866 +// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);867 +// supportCB.setToolTipText("Enable rigging");868 +// supportCB.addItemListener(this);869 +870 + panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints);871 + freezeCB.setToolTipText("Fast moving camera");872 + freezeCB.addItemListener(this);869 873 870 874 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); 871 875 // localCB.addItemListener(this); .. .. @@ -929,7 +933,7 @@ 929 933 toggleTextureCB.addItemListener(this); 930 934 931 935 panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints); 932 - toggleSwitchCB.setToolTipText("Use switch");936 + toggleSwitchCB.setToolTipText("Choose a single item");933 937 toggleSwitchCB.addItemListener(this); 934 938 935 939 panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); .. .. @@ -1000,6 +1004,7 @@ 1000 1004 cCheckBox slowCB; 1001 1005 cCheckBox boxCB; 1002 1006 cCheckBox zoomBoxCB; 1007 + cCheckBox freezeCB;1003 1008 //cToggleButton trackCB; 1004 1009 cCheckBox trackCB; 1005 1010 cCheckBox smoothfocusCB; .. .. @@ -1117,6 +1122,10 @@ 1117 1122 else if(e.getSource() == shadowCB) 1118 1123 { 1119 1124 Globals.COMPUTESHADOWWHENLIVE ^= true; 1125 + }1126 + else if(e.getSource() == freezeCB)1127 + {1128 + Globals.FREEZEONMOVE ^= true;1120 1129 } 1121 1130 else if(e.getSource() == autosaveCB) 1122 1131 { .. .. @@ -2122,25 +2131,25 @@ 2122 2131 Composite csg = new GroupLeaf(); 2123 2132 csg.count = 5; 2124 2133 group(csg); 2125 - Composite child = new cGroup();2134 + Composite child = new cGroup("Branch");2126 2135 csg.addChild(child); 2127 2136 child.addChild(csg); 2128 2137 } else 2129 2138 if (source == doubleItem) 2130 2139 { 2131 - Composite csg = new GroupLeaf();2140 + Composite csg = new GroupLeaf("Fork");2132 2141 csg.count = 5; 2133 2142 group(csg); 2134 - Composite child = new cGroup();2143 + Composite child = new cGroup("Branch A");2135 2144 csg.addChild(child); 2136 2145 child.addChild(csg); 2137 - child = new cGroup();2146 + child = new cGroup("Branch B");2138 2147 csg.addChild(child); 2139 2148 child.addChild(csg); 2140 2149 } else 2141 2150 if (source == tripleItem) 2142 2151 { 2143 - Composite csg = new GroupLeaf();2152 + Composite csg = new GroupLeaf("Trident");2144 2153 csg.count = 4; 2145 2154 group(csg); 2146 2155 Composite child = new cGroup(); .. .. @@ -2755,15 +2764,28 @@ 2755 2764 } else 2756 2765 if (source == ungroupItem || source == ungroupButton) 2757 2766 { 2758 - //ungroup();2767 + boolean hasRoot = false;2768 +2759 2769 for (int i=0; i<group.selection.size(); i++) 2760 2770 { 2761 - Ungroup(group.selection.get(i));2771 + if (group.selection.get(i) == group)2772 + {2773 + hasRoot = true;2774 + break;2775 + }2762 2776 } 2763 2777 2764 - ClearSelection(false);2765 -2766 - refreshContents();2778 + if (!hasRoot)2779 + {2780 + for (int i=0; i<group.selection.size(); i++)2781 + {2782 + Ungroup(group.selection.get(i));2783 + }2784 +2785 + ClearSelection(false);2786 +2787 + refreshContents();2788 + }2767 2789 } else 2768 2790 if (source == genUVItem) 2769 2791 { .. .. @@ -5526,9 +5548,6 @@ 5526 5548 5527 5549 cButton restoreCameraButton; 5528 5550 5529 - cButton minButton;5530 - cButton maxButton;5531 - cButton fullButton;5532 5551 cButton saveButton; 5533 5552 cButton oneStepButton; 5534 5553 GroupLeaf.java
.. .. @@ -14,7 +14,12 @@ 14 14 15 15 GroupLeaf() 16 16 { 17 - super("GroupLeaf");17 + this("Loop");18 + }19 +20 + GroupLeaf(String name)21 + {22 + super(name);18 23 19 24 addChild(new cGroup("Leaf")); 20 25 } ObjEditor.java
.. .. @@ -449,7 +449,7 @@ 449 449 // TEXTAREA infoarea.setLineWrap(true); 450 450 // TEXTAREA infoarea.setWrapStyleWord(true); 451 451 infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); 452 - infoPanel.setPreferredSize(new Dimension(50, 200));452 + //infoPanel.setPreferredSize(new Dimension(50, 200));453 453 infoPanel.setName("Info"); 454 454 //infoPanel.setLayout(new BorderLayout()); 455 455 //infoPanel.add(createTextPane()); .. .. @@ -721,10 +721,19 @@ 721 721 void Minimize() 722 722 { 723 723 frame.setState(Frame.ICONIFIED); 724 + frame.validate();724 725 } 725 726 727 +// artifactURI=null, type=0, property=${file.reference.jfxrt.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@6767876f, broken=false, additional={}728 +// artifactURI=null, type=0, property=${file.reference.mac-ui.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@16bdc817, broken=false, additional={}729 +// artifactURI=null, type=0, property=${file.reference.classes.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@9daa9c17, broken=false, additional={}726 730 void Maximize() 727 731 { 732 + if (CameraPane.FULLSCREEN)733 + {734 + ToggleFullScreen();735 + }736 +728 737 if (maximized) 729 738 { 730 739 frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); .. .. @@ -739,7 +748,13 @@ 739 748 } 740 749 741 750 maximized ^= true; 751 +752 + frame.validate();742 753 } 754 +755 + cButton minButton;756 + cButton maxButton;757 + cButton fullButton;743 758 744 759 void ToggleFullScreen() 745 760 { .. .. @@ -748,6 +763,8 @@ 748 763 if (!CameraPane.FULLSCREEN) 749 764 { 750 765 device.setFullScreenWindow(null); 766 + frame.validate();767 +751 768 //frame.setVisible(false); 752 769 // frame.removeNotify(); 753 770 // frame.setUndecorated(false); .. .. @@ -773,6 +790,7 @@ 773 790 // frame.getToolkit().getScreenSize().height); 774 791 //frame.setVisible(false); 775 792 device.setFullScreenWindow(frame); 793 + frame.validate();776 794 // frame.removeNotify(); 777 795 // frame.setUndecorated(true); 778 796 // frame.addNotify(); .. .. @@ -785,6 +803,7 @@ 785 803 radio.layout.doClick(); 786 804 //frame.setVisible(true); 787 805 } 806 + frame.validate();788 807 } 789 808 790 809 private JTextPane createTextPane() .. .. @@ -1117,7 +1136,7 @@ 1117 1136 namePanel = new cGridBag(); 1118 1137 1119 1138 nameField = AddText(namePanel, copy.GetName()); 1120 - namePanel.add(nameField);1139 + namePanel.add(new JScrollPane(nameField, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER));1121 1140 oe.ctrlPanel.add(namePanel); 1122 1141 1123 1142 oe.ctrlPanel.Return(); .. .. @@ -1142,7 +1161,7 @@ 1142 1161 rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind); 1143 1162 rewindCB.setToolTipText("Rewind animation"); 1144 1163 1145 - randomCB = AddCheckBox(setupPanel2, "Rand", copy.random);1164 + randomCB = AddCheckBox(setupPanel2, "Random", copy.random);1146 1165 randomCB.setToolTipText("Randomly Rewind (or Go back and forth)"); 1147 1166 1148 1167 if (Globals.ADVANCED) .. .. @@ -1686,24 +1705,6 @@ 1686 1705 texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); 1687 1706 colorSection.add(texture); 1688 1707 1689 - cGridBag anisoU = new cGridBag();1690 - anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints);1691 - anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING);1692 - anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);1693 - colorSection.add(anisoU);1694 -1695 - cGridBag anisoV = new cGridBag();1696 - anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints);1697 - anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING);1698 - anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);1699 - colorSection.add(anisoV);1700 -1701 - cGridBag shadowbias = new cGridBag();1702 - shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints);1703 - shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING);1704 - shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);1705 - colorSection.add(shadowbias);1706 -1707 1708 panel.add(new JSeparator()); 1708 1709 1709 1710 panel.add(colorSection); .. .. @@ -1753,6 +1754,12 @@ 1753 1754 fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING); 1754 1755 fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); 1755 1756 diffuseSection.add(fakedepth); 1757 +1758 + cGridBag shadowbias = new cGridBag();1759 + shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints);1760 + shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING);1761 + shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);1762 + diffuseSection.add(shadowbias);1756 1763 1757 1764 panel.add(new JSeparator()); 1758 1765 .. .. @@ -1804,6 +1811,18 @@ 1804 1811 // aConstraints.gridy += 1; 1805 1812 // aConstraints.gridwidth = 1; 1806 1813 1814 + cGridBag anisoU = new cGridBag();1815 + anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints);1816 + anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING);1817 + anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);1818 + specularSection.add(anisoU);1819 +1820 + cGridBag anisoV = new cGridBag();1821 + anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints);1822 + anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING);1823 + anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);1824 + specularSection.add(anisoV);1825 +1807 1826 1808 1827 panel.add(new JSeparator()); 1809 1828 .. .. @@ -1811,35 +1830,35 @@ 1811 1830 1812 1831 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); 1813 1832 1814 - cGridBag globalSection = new cGridBag().setVertical(true);1833 + //cGridBag globalSection = new cGridBag().setVertical(true);1815 1834 1816 1835 cGridBag camera = new cGridBag(); 1817 1836 camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints); 1818 1837 cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); 1819 1838 camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); 1820 - globalSection.add(camera);1839 + colorSection.add(camera);1821 1840 1822 1841 cGridBag ambient = new cGridBag(); 1823 1842 ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints); 1824 1843 ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); 1825 1844 ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); 1826 - globalSection.add(ambient);1845 + colorSection.add(ambient);1827 1846 1828 1847 cGridBag backlit = new cGridBag(); 1829 1848 backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints); 1830 1849 backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); 1831 1850 backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); 1832 - globalSection.add(backlit);1851 + colorSection.add(backlit);1833 1852 1834 1853 cGridBag opacity = new cGridBag(); 1835 1854 opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints); 1836 1855 opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); 1837 1856 opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); 1838 - globalSection.add(opacity);1857 + colorSection.add(opacity);1839 1858 1840 - panel.add(new JSeparator());1859 + //panel.add(new JSeparator());1841 1860 1842 - panel.add(globalSection);1861 + //panel.add(globalSection);1843 1862 1844 1863 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); 1845 1864 .. .. @@ -3538,8 +3557,10 @@ 3538 3557 3539 3558 copy.ExtractBigData(hashtable); 3540 3559 3560 + byte[] compress = Compress(copy);3561 +3541 3562 //EditorFrame.m_MainFrame.requestFocusInWindow(); 3542 - tab.graphs[tab.undoindex++] = Compress(copy);3563 + tab.graphs[tab.undoindex++] = compress;3543 3564 3544 3565 copy.RestoreBigData(hashtable); 3545 3566 RandomEditor.java
.. .. @@ -60,7 +60,7 @@ 60 60 void SetupUI2(ObjEditor oe) 61 61 { 62 62 super.SetupUI2(oe); 63 - childPanel = AddSlider(oe.ctrlPanel, "Child: ", 0, switchnode.Size()-1, switchnode.rnd);63 + childPanel = AddSlider(oe.ctrlPanel, "Item: ", 0, switchnode.Size()-1, switchnode.rnd);64 64 65 65 childField = (cNumberSlider)childPanel.getComponent(1); 66 66 oe.ctrlPanel.Return(); RandomNode.java
.. .. @@ -5,7 +5,7 @@ 5 5 6 6 RandomNode() 7 7 { 8 - this("Random");8 + this("Switch");9 9 } 10 10 11 11 RandomNode(String name) Torus.java
.. .. @@ -2,6 +2,8 @@ 2 2 3 3 class Torus extends Biparam implements java.io.Serializable 4 4 { 5 + static final long serialVersionUID = -7637054329820073252L;6 +5 7 Torus() 6 8 { 7 9 inPnt = new cVector(); cButton.java
.. .. @@ -12,7 +12,7 @@ 12 12 { 13 13 super(name); 14 14 15 - setMargin(new java.awt.Insets(1, -8, 1, -8));15 + setMargin(new java.awt.Insets(1, -1, 1, -1));16 16 17 17 if (border) 18 18 setBorder(new javax.swing.border.EtchedBorder()); .. .. @@ -26,7 +26,7 @@ 26 26 { 27 27 super(icon); 28 28 29 - setMargin(new java.awt.Insets(-1, -8, -1, -8));29 + setMargin(new java.awt.Insets(-1, -1, -1, -1));30 30 31 31 //result = new JButton( icon ); 32 32 //result.setBorderPainted( false );