.. | .. |
---|
43 | 43 | |
---|
44 | 44 | static ObjEditor theFrame; |
---|
45 | 45 | |
---|
| 46 | + public void AllocProjectedVertices(Object3D object) |
---|
| 47 | + { |
---|
| 48 | + assert (object.projectedVertices != null); |
---|
| 49 | + |
---|
| 50 | + if (object.projectedVertices.length <= 2) |
---|
| 51 | + { |
---|
| 52 | + // Side effect... |
---|
| 53 | + Object3D.cVector2[] keep = object.projectedVertices; |
---|
| 54 | + object.projectedVertices = new Object3D.cVector2[3]; |
---|
| 55 | + for (int i = 0; i < 3; i++) |
---|
| 56 | + { |
---|
| 57 | + if (i < keep.length) |
---|
| 58 | + { |
---|
| 59 | + object.projectedVertices[i] = keep[i]; |
---|
| 60 | + } else |
---|
| 61 | + { |
---|
| 62 | + object.projectedVertices[i] = new Object3D.cVector2(); |
---|
| 63 | + } |
---|
| 64 | + /* |
---|
| 65 | + if(keep.length == 0) |
---|
| 66 | + object.projectedVertices[0] = new Object3D.cVector2(); |
---|
| 67 | + else |
---|
| 68 | + object.projectedVertices[0] = keep[0]; |
---|
| 69 | + object.projectedVertices[1] = new Object3D.cVector2(); |
---|
| 70 | + */ |
---|
| 71 | + } |
---|
| 72 | + } |
---|
| 73 | + } |
---|
| 74 | + |
---|
46 | 75 | public cGridBag GetSeparator() |
---|
47 | 76 | { |
---|
48 | 77 | cGridBag separator = new cGridBag(); |
---|
.. | .. |
---|
77 | 106 | |
---|
78 | 107 | static java.util.Hashtable<String, javax.swing.ImageIcon> icons = new java.util.Hashtable<String, javax.swing.ImageIcon>(); |
---|
79 | 108 | |
---|
80 | | - ImageIcon GetIcon(String name) |
---|
| 109 | + static ImageIcon GetIcon(String name) |
---|
81 | 110 | { |
---|
82 | 111 | javax.swing.ImageIcon iconCache = icons.get(name); |
---|
83 | 112 | if (iconCache != null) |
---|
.. | .. |
---|
87 | 116 | |
---|
88 | 117 | try |
---|
89 | 118 | { |
---|
90 | | - BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name)); |
---|
| 119 | + BufferedImage image = javax.imageio.ImageIO.read(ObjEditor.class.getClassLoader().getResourceAsStream(name)); |
---|
91 | 120 | |
---|
92 | 121 | // if (image.getWidth() > 48 && image.getHeight() > 48) |
---|
93 | 122 | // { |
---|
.. | .. |
---|
359 | 388 | //parent = p; |
---|
360 | 389 | |
---|
361 | 390 | GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(); |
---|
362 | | - System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow()); |
---|
| 391 | + if (Globals.DEBUG) |
---|
| 392 | + System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow()); |
---|
363 | 393 | //gd.setFullScreenWindow(this); |
---|
364 | 394 | //setResizable(false); |
---|
365 | 395 | //if (!isDisplayable()) |
---|
.. | .. |
---|
396 | 426 | |
---|
397 | 427 | static java.util.Vector<Object3D> listUI = new java.util.Vector<Object3D>(); |
---|
398 | 428 | |
---|
| 429 | + // This is to refresh the UI of the material panel. |
---|
| 430 | + boolean patchMaterial; |
---|
| 431 | + |
---|
399 | 432 | void SetupMenu() |
---|
400 | 433 | { |
---|
401 | 434 | frame.setMenuBar(menuBar = new MenuBar()); |
---|
.. | .. |
---|
921 | 954 | boolean temp = CameraPane.SWITCH; |
---|
922 | 955 | CameraPane.SWITCH = false; |
---|
923 | 956 | |
---|
924 | | - object.ExtractBigData(versiontable); |
---|
| 957 | + if (Grafreed.grafreed.universe.versiontable == null) |
---|
| 958 | + Grafreed.grafreed.universe.versiontable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
| 959 | + |
---|
| 960 | + object.ExtractBigData(Grafreed.grafreed.universe.versiontable); |
---|
925 | 961 | // if (copy == client) |
---|
926 | 962 | |
---|
927 | 963 | Object3D versions[] = object.versionlist; |
---|
| 964 | + java.util.Hashtable<java.util.UUID, Object3D> versiontable = object.versiontable; // if Grafreed.grafreed.universe |
---|
928 | 965 | object.versionlist = null; |
---|
| 966 | + object.versiontable = null; |
---|
929 | 967 | |
---|
930 | 968 | //byte[] compress = Compress(copy); |
---|
931 | 969 | Object3D compress = (Object3D)Grafreed.clone(object); |
---|
932 | 970 | |
---|
933 | 971 | object.versionlist = versions; |
---|
| 972 | + object.versiontable = versiontable; // if Grafreed.grafreed.universe |
---|
934 | 973 | |
---|
935 | | - object.RestoreBigData(versiontable); |
---|
| 974 | + object.RestoreBigData(Grafreed.grafreed.universe.versiontable); |
---|
936 | 975 | |
---|
937 | 976 | CameraPane.SWITCH = temp; |
---|
938 | 977 | |
---|
.. | .. |
---|
1294 | 1333 | |
---|
1295 | 1334 | liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
1296 | 1335 | liveCB.setToolTipText("Animate object"); |
---|
| 1336 | + markCB = AddCheckBox(setupPanel, "Anim", copy.marked); |
---|
| 1337 | + markCB.setToolTipText("Set target transform"); |
---|
1297 | 1338 | selectableCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
1298 | 1339 | selectableCB.setToolTipText("Make object selectable"); |
---|
1299 | 1340 | // Return(); |
---|
1300 | 1341 | |
---|
1301 | 1342 | hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
1302 | 1343 | hideCB.setToolTipText("Hide object"); |
---|
1303 | | - markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
1304 | | - markCB.setToolTipText("As animation target transform"); |
---|
1305 | 1344 | |
---|
1306 | 1345 | ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false); |
---|
1307 | 1346 | |
---|
.. | .. |
---|
1503 | 1542 | |
---|
1504 | 1543 | if (cam == null || !(copy.get(0) instanceof cGroup)) |
---|
1505 | 1544 | { |
---|
| 1545 | + if (Globals.DEBUG) |
---|
1506 | 1546 | System.out.println("CREATE CAMERAS"); |
---|
1507 | 1547 | cams = new cTemplate(); |
---|
1508 | 1548 | cams.name = "Cameras"; |
---|
.. | .. |
---|
1628 | 1668 | |
---|
1629 | 1669 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
---|
1630 | 1670 | //tmp.setName("Edit"); |
---|
1631 | | - objectPanel.add(materialPanel); |
---|
1632 | | - objectPanel.setIconAt(0, GetIcon("icons/material.png")); |
---|
1633 | | - objectPanel.setToolTipTextAt(0, "Material"); |
---|
1634 | | - |
---|
1635 | 1671 | objectPanel.add(toolboxPanel); |
---|
1636 | | - objectPanel.setIconAt(1, GetIcon("icons/primitives.png")); |
---|
1637 | | - objectPanel.setToolTipTextAt(1, "Objects & textures"); |
---|
| 1672 | + objectPanel.setIconAt(0, GetIcon("icons/primitives.png")); |
---|
| 1673 | + objectPanel.setToolTipTextAt(0, "Objects & textures"); |
---|
1638 | 1674 | |
---|
| 1675 | + objectPanel.add(materialPanel); |
---|
| 1676 | + objectPanel.setIconAt(1, GetIcon("icons/material.png")); |
---|
| 1677 | + objectPanel.setToolTipTextAt(1, "Material"); |
---|
| 1678 | + |
---|
1639 | 1679 | objectPanel.add(skyboxPanel); |
---|
1640 | 1680 | objectPanel.setIconAt(2, GetIcon("icons/skybox.jpg")); |
---|
1641 | 1681 | objectPanel.setToolTipTextAt(2, "Backgrounds"); |
---|
.. | .. |
---|
1652 | 1692 | objectPanel.setIconAt(4, GetIcon("icons/XYZ.png")); |
---|
1653 | 1693 | objectPanel.setToolTipTextAt(4, "XYZ/RGB transform"); |
---|
1654 | 1694 | |
---|
| 1695 | + patchMaterial = true; |
---|
| 1696 | + cameraView.patchMaterial = this; |
---|
| 1697 | + objectPanel.setSelectedIndex(1); |
---|
| 1698 | + |
---|
1655 | 1699 | /* |
---|
1656 | 1700 | aConstraints.gridx = 0; |
---|
1657 | 1701 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1671 | 1715 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1672 | 1716 | |
---|
1673 | 1717 | /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
1674 | | - scenePanel.preferredWidth = 5; |
---|
| 1718 | + scenePanel.preferredWidth = 6; |
---|
1675 | 1719 | |
---|
1676 | 1720 | JTabbedPane tabbedPane = new JTabbedPane(); |
---|
1677 | 1721 | tabbedPane.add(scrollpane); |
---|
.. | .. |
---|
1789 | 1833 | |
---|
1790 | 1834 | frame.getContentPane().setLayout(new BorderLayout()); |
---|
1791 | 1835 | /**/ |
---|
1792 | | - JTabbedPane worldPane = new JTabbedPane(); |
---|
| 1836 | + //JTabbedPane worldPane = new JTabbedPane(); |
---|
1793 | 1837 | //worldPane.add(bigPanel); |
---|
1794 | 1838 | //worldPane.add(worldPanel); |
---|
1795 | 1839 | /**/ |
---|
.. | .. |
---|
1849 | 1893 | |
---|
1850 | 1894 | // Skin |
---|
1851 | 1895 | colorField.setFloat(material.color); |
---|
1852 | | - saturationField.setFloat(material.modulation); |
---|
| 1896 | + float saturation = material.modulation; |
---|
| 1897 | + |
---|
| 1898 | + if (!cameraView.Skinshader) |
---|
| 1899 | + { |
---|
| 1900 | + saturation /= 1.5; |
---|
| 1901 | + } |
---|
| 1902 | + |
---|
| 1903 | + saturationField.setFloat(saturation); |
---|
| 1904 | + |
---|
1853 | 1905 | subsurfaceField.setFloat(material.subsurface); |
---|
1854 | 1906 | selfshadowField.setFloat(material.diffuseness); |
---|
1855 | 1907 | diffusenessField.setFloat(material.factor); |
---|
.. | .. |
---|
2160 | 2212 | }); |
---|
2161 | 2213 | presetpanel.add(bump0); |
---|
2162 | 2214 | |
---|
| 2215 | + cLabel borderShader = GetLabel("icons/shadericons/borderfade.jpg", !Grafreed.NIMBUSLAF); |
---|
| 2216 | + borderShader.setToolTipText("Border fade"); |
---|
| 2217 | + borderShader.addMouseListener(new MouseAdapter() |
---|
| 2218 | + { |
---|
| 2219 | + public void mouseClicked(MouseEvent e) |
---|
| 2220 | + { |
---|
| 2221 | + borderfadeField.setFloat(0.5); |
---|
| 2222 | + opacityField.setFloat(0.75); |
---|
| 2223 | + |
---|
| 2224 | + materialtouched = true; |
---|
| 2225 | + applySelf(); |
---|
| 2226 | + } |
---|
| 2227 | + }); |
---|
| 2228 | + presetpanel.add(borderShader); |
---|
| 2229 | + |
---|
2163 | 2230 | cLabel halo = GetLabel("icons/shadericons/shadericon00017.png", !Grafreed.NIMBUSLAF); |
---|
2164 | 2231 | halo.setToolTipText("Halo"); |
---|
2165 | 2232 | halo.addMouseListener(new MouseAdapter() |
---|
.. | .. |
---|
2267 | 2334 | |
---|
2268 | 2335 | cGridBag huepanel = new cGridBag(); |
---|
2269 | 2336 | cGridBag huelabel = new cGridBag(); |
---|
2270 | | - skin = GetLabel("icons/hue.png", false); |
---|
2271 | | - skin.fit = true; |
---|
2272 | | - huelabel.add(skin); |
---|
| 2337 | + cLabel hue = GetLabel("icons/hue.png", false); |
---|
| 2338 | + hue.fit = true; |
---|
| 2339 | + |
---|
| 2340 | + hue.addMouseListener(new MouseAdapter() |
---|
| 2341 | + { |
---|
| 2342 | + public void mousePressed(MouseEvent e) |
---|
| 2343 | + { |
---|
| 2344 | + int x = e.getX(); |
---|
| 2345 | + |
---|
| 2346 | + colorField.setFloat((double)x / ((cLabel)e.getSource()).getWidth()); |
---|
| 2347 | + } |
---|
| 2348 | + }); |
---|
| 2349 | + |
---|
| 2350 | + huelabel.add(hue); |
---|
2273 | 2351 | huelabel.preferredWidth = 20; |
---|
2274 | 2352 | huepanel.add(new cGridBag()); // Label |
---|
2275 | 2353 | huepanel.add(huelabel); // Field/slider |
---|
.. | .. |
---|
3545 | 3623 | |
---|
3546 | 3624 | if (multiplyToggle != null) |
---|
3547 | 3625 | multiplyToggle.setSelected(mat.multiply); |
---|
3548 | | - |
---|
3549 | | - assert (object.projectedVertices != null); |
---|
3550 | | - |
---|
3551 | | - if (object.projectedVertices.length <= 2) |
---|
3552 | | - { |
---|
3553 | | - // Side effect... |
---|
3554 | | - Object3D.cVector2[] keep = object.projectedVertices; |
---|
3555 | | - object.projectedVertices = new Object3D.cVector2[3]; |
---|
3556 | | - for (int i = 0; i < 3; i++) |
---|
3557 | | - { |
---|
3558 | | - if (i < keep.length) |
---|
3559 | | - { |
---|
3560 | | - object.projectedVertices[i] = keep[i]; |
---|
3561 | | - } else |
---|
3562 | | - { |
---|
3563 | | - object.projectedVertices[i] = new Object3D.cVector2(); |
---|
3564 | | - } |
---|
3565 | | - /* |
---|
3566 | | - if(keep.length == 0) |
---|
3567 | | - object.projectedVertices[0] = new Object3D.cVector2(); |
---|
3568 | | - else |
---|
3569 | | - object.projectedVertices[0] = keep[0]; |
---|
3570 | | - object.projectedVertices[1] = new Object3D.cVector2(); |
---|
3571 | | - */ |
---|
3572 | | - } |
---|
3573 | | - } |
---|
| 3626 | + |
---|
| 3627 | + AllocProjectedVertices(object); |
---|
3574 | 3628 | |
---|
3575 | 3629 | SetMaterial(mat, object.projectedVertices); |
---|
3576 | 3630 | } |
---|
.. | .. |
---|
3880 | 3934 | //System.out.println("ObjEditor " + event); |
---|
3881 | 3935 | applySelf0(true); |
---|
3882 | 3936 | //parent.applySelf(); |
---|
3883 | | - objEditor.refreshContents(); |
---|
| 3937 | + // conflicts with requestFocus objEditor.refreshContents(); |
---|
3884 | 3938 | } else if (source == resetButton) |
---|
3885 | 3939 | { |
---|
3886 | 3940 | CameraPane.fullreset = true; |
---|
.. | .. |
---|
4192 | 4246 | return true; |
---|
4193 | 4247 | } |
---|
4194 | 4248 | |
---|
4195 | | - java.util.Hashtable<java.util.UUID, Object3D> versiontable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
4196 | | - |
---|
4197 | 4249 | void DeleteVersion() |
---|
4198 | 4250 | { |
---|
4199 | 4251 | for (int i = copy.versionindex; i < copy.versionlist.length-1; i++) |
---|
.. | .. |
---|
4201 | 4253 | copy.versionlist[i] = copy.versionlist[i+1]; |
---|
4202 | 4254 | } |
---|
4203 | 4255 | |
---|
4204 | | - CopyChanged(); |
---|
| 4256 | + if (copy.versionlist[copy.versionindex] == null) |
---|
| 4257 | + copy.versionindex -= 1; |
---|
| 4258 | + |
---|
| 4259 | + if (copy.versionindex != -1) |
---|
| 4260 | + CopyChanged(); |
---|
4205 | 4261 | |
---|
4206 | 4262 | SetVersionStates(); |
---|
4207 | 4263 | } |
---|
.. | .. |
---|
4314 | 4370 | boolean temp = CameraPane.SWITCH; |
---|
4315 | 4371 | CameraPane.SWITCH = false; |
---|
4316 | 4372 | |
---|
4317 | | - copy.ExtractBigData(versiontable); |
---|
| 4373 | + copy.ExtractBigData(Grafreed.grafreed.universe.versiontable); |
---|
4318 | 4374 | |
---|
4319 | 4375 | copy.clear(); |
---|
4320 | 4376 | |
---|
.. | .. |
---|
4326 | 4382 | copy.add(obj.get(i)); |
---|
4327 | 4383 | } |
---|
4328 | 4384 | |
---|
4329 | | - copy.RestoreBigData(versiontable); |
---|
| 4385 | + copy.RestoreBigData(Grafreed.grafreed.universe.versiontable); |
---|
4330 | 4386 | |
---|
4331 | 4387 | CameraPane.SWITCH = temp; |
---|
4332 | 4388 | |
---|
.. | .. |
---|
4389 | 4445 | previousVersionButton.setEnabled(copy.versionindex > 0); |
---|
4390 | 4446 | nextVersionButton.setEnabled(copy.versionlist[copy.versionindex + 1] != null); |
---|
4391 | 4447 | |
---|
4392 | | - deleteVersionButton.setEnabled(//copy.versionindex > 0 && |
---|
4393 | | - copy.versionlist[copy.versionindex + 1] != null); |
---|
| 4448 | + deleteVersionButton.setEnabled(copy.versionindex != -1); |
---|
| 4449 | + //copy.versionlist[copy.versionindex + 1] != null); |
---|
4394 | 4450 | |
---|
4395 | 4451 | muteSlider = true; |
---|
4396 | 4452 | versionSlider.setMinimum(0); |
---|
.. | .. |
---|
4455 | 4511 | |
---|
4456 | 4512 | public boolean Replace() |
---|
4457 | 4513 | { |
---|
4458 | | - System.err.println("Replace"); |
---|
| 4514 | + //System.err.println("Replace"); |
---|
4459 | 4515 | |
---|
4460 | 4516 | //cRadio tab = GetCurrentTab(); |
---|
4461 | 4517 | |
---|
.. | .. |
---|
4682 | 4738 | // else |
---|
4683 | 4739 | // applySelf(true); |
---|
4684 | 4740 | // } |
---|
| 4741 | + |
---|
| 4742 | + boolean Equal(double a, double b) |
---|
| 4743 | + { |
---|
| 4744 | + return Math.abs(a - b) < 0.001; |
---|
| 4745 | + } |
---|
| 4746 | + |
---|
4685 | 4747 | void applySelf0(boolean name) |
---|
4686 | 4748 | { |
---|
4687 | 4749 | if (name) |
---|
.. | .. |
---|
4731 | 4793 | { |
---|
4732 | 4794 | cMaterial mat = copy.material; |
---|
4733 | 4795 | |
---|
4734 | | - colorField.SetToolTipValue((mat.color)); |
---|
4735 | | - saturationField.SetToolTipValue((mat.modulation)); |
---|
4736 | | - metalnessField.SetToolTipValue((mat.metalness)); |
---|
4737 | | - diffuseField.SetToolTipValue((mat.diffuse)); |
---|
4738 | | - specularField.SetToolTipValue((mat.specular)); |
---|
4739 | | - shininessField.SetToolTipValue((mat.shininess)); |
---|
4740 | | - shiftField.SetToolTipValue((mat.shift)); |
---|
4741 | | - ambientField.SetToolTipValue((mat.ambient)); |
---|
4742 | | - lightareaField.SetToolTipValue((mat.lightarea)); |
---|
4743 | | - diffusenessField.SetToolTipValue((mat.factor)); |
---|
4744 | | - velvetField.SetToolTipValue((mat.velvet)); |
---|
4745 | | - sheenField.SetToolTipValue((mat.sheen)); |
---|
4746 | | - subsurfaceField.SetToolTipValue((mat.subsurface)); |
---|
4747 | | - backlitField.SetToolTipValue((mat.bump)); |
---|
4748 | | - anisoField.SetToolTipValue((mat.aniso)); |
---|
4749 | | - anisoVField.SetToolTipValue((mat.anisoV)); |
---|
4750 | | - cameraField.SetToolTipValue((mat.cameralight)); |
---|
4751 | | - selfshadowField.SetToolTipValue((mat.diffuseness)); |
---|
4752 | | - shadowField.SetToolTipValue((mat.shadow)); |
---|
4753 | | - textureField.SetToolTipValue((mat.texture)); |
---|
4754 | | - opacityField.SetToolTipValue((mat.opacity)); |
---|
4755 | | - fakedepthField.SetToolTipValue((mat.fakedepth)); |
---|
4756 | | - shadowbiasField.SetToolTipValue((mat.shadowbias)); |
---|
| 4796 | + if (!Equal(colorField.getFloat(), mat.color)) |
---|
| 4797 | + colorField.SetToolTipValue((mat.color)); |
---|
| 4798 | + if (!Equal(saturationField.getFloat(), mat.modulation)) |
---|
| 4799 | + saturationField.SetToolTipValue((mat.modulation)); |
---|
| 4800 | + if (!Equal(metalnessField.getFloat(), mat.metalness)) |
---|
| 4801 | + metalnessField.SetToolTipValue((mat.metalness)); |
---|
| 4802 | + if (!Equal(diffuseField.getFloat(), mat.diffuse)) |
---|
| 4803 | + diffuseField.SetToolTipValue((mat.diffuse)); |
---|
| 4804 | + if (!Equal(specularField.getFloat(), mat.specular)) |
---|
| 4805 | + specularField.SetToolTipValue((mat.specular)); |
---|
| 4806 | + if (!Equal(shininessField.getFloat(), mat.shininess)) |
---|
| 4807 | + shininessField.SetToolTipValue((mat.shininess)); |
---|
| 4808 | + if (!Equal(shiftField.getFloat(), mat.shift)) |
---|
| 4809 | + shiftField.SetToolTipValue((mat.shift)); |
---|
| 4810 | + if (!Equal(ambientField.getFloat(), mat.ambient)) |
---|
| 4811 | + ambientField.SetToolTipValue((mat.ambient)); |
---|
| 4812 | + if (!Equal(lightareaField.getFloat(), mat.lightarea)) |
---|
| 4813 | + lightareaField.SetToolTipValue((mat.lightarea)); |
---|
| 4814 | + if (!Equal(diffusenessField.getFloat(), mat.factor)) |
---|
| 4815 | + diffusenessField.SetToolTipValue((mat.factor)); |
---|
| 4816 | + if (!Equal(velvetField.getFloat(), mat.velvet)) |
---|
| 4817 | + velvetField.SetToolTipValue((mat.velvet)); |
---|
| 4818 | + if (!Equal(sheenField.getFloat(), mat.sheen)) |
---|
| 4819 | + sheenField.SetToolTipValue((mat.sheen)); |
---|
| 4820 | + if (!Equal(subsurfaceField.getFloat(), mat.subsurface)) |
---|
| 4821 | + subsurfaceField.SetToolTipValue((mat.subsurface)); |
---|
| 4822 | + if (!Equal(backlitField.getFloat(), mat.bump)) |
---|
| 4823 | + backlitField.SetToolTipValue((mat.bump)); |
---|
| 4824 | + if (!Equal(anisoField.getFloat(), mat.aniso)) |
---|
| 4825 | + anisoField.SetToolTipValue((mat.aniso)); |
---|
| 4826 | + if (!Equal(anisoVField.getFloat(), mat.anisoV)) |
---|
| 4827 | + anisoVField.SetToolTipValue((mat.anisoV)); |
---|
| 4828 | + if (!Equal(cameraField.getFloat(), mat.cameralight)) |
---|
| 4829 | + cameraField.SetToolTipValue((mat.cameralight)); |
---|
| 4830 | + if (!Equal(selfshadowField.getFloat(), mat.diffuseness)) |
---|
| 4831 | + selfshadowField.SetToolTipValue((mat.diffuseness)); |
---|
| 4832 | + if (!Equal(shadowField.getFloat(), mat.shadow)) |
---|
| 4833 | + shadowField.SetToolTipValue((mat.shadow)); |
---|
| 4834 | + if (!Equal(textureField.getFloat(), mat.texture)) |
---|
| 4835 | + textureField.SetToolTipValue((mat.texture)); |
---|
| 4836 | + if (!Equal(opacityField.getFloat(), mat.opacity)) |
---|
| 4837 | + opacityField.SetToolTipValue((mat.opacity)); |
---|
| 4838 | + if (!Equal(fakedepthField.getFloat(), mat.fakedepth)) |
---|
| 4839 | + fakedepthField.SetToolTipValue((mat.fakedepth)); |
---|
| 4840 | + if (!Equal(shadowbiasField.getFloat(), mat.shadowbias)) |
---|
| 4841 | + shadowbiasField.SetToolTipValue((mat.shadowbias)); |
---|
4757 | 4842 | } |
---|
4758 | 4843 | |
---|
4759 | 4844 | if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null) |
---|
.. | .. |
---|
5158 | 5243 | |
---|
5159 | 5244 | if (previousVersionButton != null && copy.versionlist != null) |
---|
5160 | 5245 | SetVersionStates(); |
---|
| 5246 | + |
---|
| 5247 | + cameraView.requestFocusInWindow(); |
---|
5161 | 5248 | } |
---|
5162 | 5249 | |
---|
5163 | 5250 | static TweenManager tweenManager = new TweenManager(); |
---|
.. | .. |
---|
5189 | 5276 | // group = (Composite) group.get(0); |
---|
5190 | 5277 | // } |
---|
5191 | 5278 | |
---|
5192 | | - System.out.println("makeSomething of " + thing); |
---|
| 5279 | + //System.out.println("makeSomething of " + thing); |
---|
5193 | 5280 | |
---|
5194 | 5281 | /* |
---|
5195 | 5282 | if (deselect && jList != null) |
---|
.. | .. |
---|
5543 | 5630 | |
---|
5544 | 5631 | copy.versionlist = readobj.versionlist; |
---|
5545 | 5632 | copy.versionindex = readobj.versionindex; |
---|
| 5633 | + copy.versiontable = readobj.versiontable; |
---|
5546 | 5634 | |
---|
5547 | 5635 | if (copy.versionlist == null) |
---|
5548 | 5636 | { |
---|
.. | .. |
---|
5550 | 5638 | copy.versionlist = new Object3D[100]; |
---|
5551 | 5639 | copy.versionindex = -1; |
---|
5552 | 5640 | |
---|
5553 | | - Save(true); |
---|
| 5641 | + //Save(true); |
---|
5554 | 5642 | } |
---|
5555 | 5643 | |
---|
5556 | 5644 | //? SetUndoStates(); |
---|