.. | .. |
---|
4 | 4 | |
---|
5 | 5 | import java.awt.*; |
---|
6 | 6 | import java.awt.event.*; |
---|
| 7 | +import java.awt.image.BufferedImage; |
---|
7 | 8 | import javax.swing.*; |
---|
8 | 9 | import javax.swing.event.*; |
---|
9 | 10 | import javax.swing.text.*; |
---|
.. | .. |
---|
13 | 14 | import javax.swing.plaf.metal.MetalLookAndFeel; |
---|
14 | 15 | //import javax.swing.plaf.ColorUIResource; |
---|
15 | 16 | //import javax.swing.plaf.metal.DefaultMetalTheme; |
---|
| 17 | + |
---|
| 18 | +import javax.swing.plaf.basic.BasicSplitPaneDivider; |
---|
| 19 | +import javax.swing.plaf.basic.BasicSplitPaneUI; |
---|
16 | 20 | |
---|
17 | 21 | //import javax.media.opengl.GLCanvas; |
---|
18 | 22 | |
---|
.. | .. |
---|
30 | 34 | iSendInfo |
---|
31 | 35 | //KeyListener |
---|
32 | 36 | { |
---|
| 37 | + public cToggleButton pinButton; |
---|
33 | 38 | boolean timeline; |
---|
34 | 39 | boolean wasFullScreen; |
---|
35 | 40 | |
---|
36 | 41 | GroupEditor callee; |
---|
37 | 42 | JFrame frame; |
---|
| 43 | + |
---|
| 44 | + static ObjEditor theFrame; |
---|
| 45 | + |
---|
| 46 | + public cGridBag GetSeparator() |
---|
| 47 | + { |
---|
| 48 | + cGridBag separator = new cGridBag(); |
---|
| 49 | + separator.add(new JSeparator()); |
---|
| 50 | + separator.preferredHeight = 5; |
---|
| 51 | + return separator; |
---|
| 52 | + } |
---|
| 53 | + |
---|
| 54 | + cButton GetButton(String name, boolean border) |
---|
| 55 | + { |
---|
| 56 | + ImageIcon icon = GetIcon(name); |
---|
| 57 | + return new cButton(icon, border); |
---|
| 58 | + } |
---|
| 59 | + |
---|
| 60 | + cLabel GetLabel(String name, boolean border) |
---|
| 61 | + { |
---|
| 62 | + //ImageIcon icon = GetIcon(name); |
---|
| 63 | + return new cLabel(GetImage(name), border); |
---|
| 64 | + } |
---|
| 65 | + |
---|
| 66 | + cToggleButton GetToggleButton(String name, boolean border) |
---|
| 67 | + { |
---|
| 68 | + ImageIcon icon = GetIcon(name); |
---|
| 69 | + return new cToggleButton(icon, border); |
---|
| 70 | + } |
---|
| 71 | + |
---|
| 72 | + cCheckBox GetCheckBox(String name, boolean border) |
---|
| 73 | + { |
---|
| 74 | + ImageIcon icon = GetIcon(name); |
---|
| 75 | + return new cCheckBox(icon, border); |
---|
| 76 | + } |
---|
| 77 | + |
---|
| 78 | + ImageIcon GetIcon(String name) |
---|
| 79 | + { |
---|
| 80 | + try |
---|
| 81 | + { |
---|
| 82 | + BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name)); |
---|
| 83 | + |
---|
| 84 | +// if (image.getWidth() > 48 && image.getHeight() > 48) |
---|
| 85 | +// { |
---|
| 86 | +// BufferedImage resized = new BufferedImage(48, 48, image.getType()); |
---|
| 87 | +// Graphics2D g = resized.createGraphics(); |
---|
| 88 | +// g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); |
---|
| 89 | +// //g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
---|
| 90 | +// g.drawImage(image, 0, 0, 48, 48, 0, 0, image.getWidth(), image.getHeight(), null); |
---|
| 91 | +// g.dispose(); |
---|
| 92 | +// |
---|
| 93 | +// image = resized; |
---|
| 94 | +// } |
---|
| 95 | + |
---|
| 96 | + javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image); |
---|
| 97 | + return icon; |
---|
| 98 | + } |
---|
| 99 | + catch (Exception e) |
---|
| 100 | + { |
---|
| 101 | + return null; |
---|
| 102 | + } |
---|
| 103 | + } |
---|
| 104 | + |
---|
| 105 | + BufferedImage GetImage(String name) |
---|
| 106 | + { |
---|
| 107 | + try |
---|
| 108 | + { |
---|
| 109 | + BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name)); |
---|
| 110 | + |
---|
| 111 | + return image; |
---|
| 112 | + } |
---|
| 113 | + catch (Exception e) |
---|
| 114 | + { |
---|
| 115 | + return null; |
---|
| 116 | + } |
---|
| 117 | + } |
---|
38 | 118 | |
---|
39 | 119 | // SCRIPT |
---|
40 | 120 | |
---|
.. | .. |
---|
145 | 225 | |
---|
146 | 226 | objEditor.ctrlPanel.remove(namePanel); |
---|
147 | 227 | |
---|
148 | | - if (!GroupEditor.allparams) |
---|
| 228 | + if (!allparams) |
---|
149 | 229 | return; |
---|
150 | 230 | |
---|
151 | 231 | // objEditor.ctrlPanel.remove(liveCB); |
---|
.. | .. |
---|
168 | 248 | // objEditor.ctrlPanel.remove(remarkButton); |
---|
169 | 249 | |
---|
170 | 250 | objEditor.ctrlPanel.remove(setupPanel); |
---|
171 | | - objEditor.ctrlPanel.remove(commandsPanel); |
---|
| 251 | + objEditor.ctrlPanel.remove(setupPanel2); |
---|
| 252 | + objEditor.ctrlPanel.remove(objectCommandsPanel); |
---|
172 | 253 | objEditor.ctrlPanel.remove(pushPanel); |
---|
173 | 254 | //objEditor.ctrlPanel.remove(fillPanel); |
---|
174 | 255 | |
---|
.. | .. |
---|
216 | 297 | client = inClient; |
---|
217 | 298 | copy = client; |
---|
218 | 299 | |
---|
| 300 | + if (copy.versionlist == null) |
---|
| 301 | + { |
---|
| 302 | + copy.versionlist = new Object3D[100]; |
---|
| 303 | + copy.versionindex = -1; |
---|
| 304 | + } |
---|
| 305 | + |
---|
219 | 306 | // "this" is not called: SetupUI2(objEditor); |
---|
220 | 307 | } |
---|
221 | 308 | |
---|
.. | .. |
---|
229 | 316 | client = inClient; |
---|
230 | 317 | copy = client; |
---|
231 | 318 | |
---|
| 319 | + if (copy.versionlist == null) |
---|
| 320 | + { |
---|
| 321 | + copy.versionlist = new Object3D[100]; |
---|
| 322 | + copy.versionindex = -1; |
---|
| 323 | + } |
---|
| 324 | + |
---|
232 | 325 | SetupUI2(callee.GetEditor()); |
---|
233 | 326 | } |
---|
234 | 327 | |
---|
.. | .. |
---|
243 | 336 | //localCopy.parent = null; |
---|
244 | 337 | |
---|
245 | 338 | frame = new JFrame(); |
---|
| 339 | + frame.setUndecorated(false); |
---|
246 | 340 | objEditor = this; |
---|
247 | 341 | this.callee = callee; |
---|
248 | 342 | |
---|
.. | .. |
---|
260 | 354 | copy = localCopy; |
---|
261 | 355 | copy.editWindow = this; |
---|
262 | 356 | |
---|
| 357 | + if (copy.versionlist == null) |
---|
| 358 | + { |
---|
| 359 | +// copy.versions = new byte[100][]; |
---|
| 360 | +// copy.versionindex = -1; |
---|
| 361 | + } |
---|
| 362 | + |
---|
263 | 363 | SetupMenu(); |
---|
264 | 364 | |
---|
265 | 365 | //SetupName(objEditor); // new |
---|
.. | .. |
---|
273 | 373 | return frame.action(event, obj); |
---|
274 | 374 | } |
---|
275 | 375 | |
---|
| 376 | + // Cannot work without static |
---|
| 377 | + static boolean allparams = true; |
---|
| 378 | + |
---|
| 379 | + static java.util.Vector<Object3D> listUI = new java.util.Vector<Object3D>(); |
---|
| 380 | + |
---|
276 | 381 | void SetupMenu() |
---|
277 | 382 | { |
---|
278 | 383 | frame.setMenuBar(menuBar = new MenuBar()); |
---|
279 | 384 | menuBar.add(fileMenu = new Menu("File")); |
---|
280 | 385 | fileMenu.add(newItem = new MenuItem("New")); |
---|
281 | | - fileMenu.add(loadItem = new MenuItem("Load...")); |
---|
| 386 | + fileMenu.add(openItem = new MenuItem("Open...")); |
---|
282 | 387 | |
---|
283 | 388 | //oe.menuBar.add(menu = new Menu("Include")); |
---|
284 | 389 | Menu menu = new Menu("Import"); |
---|
.. | .. |
---|
310 | 415 | } |
---|
311 | 416 | |
---|
312 | 417 | newItem.addActionListener(this); |
---|
313 | | - loadItem.addActionListener(this); |
---|
| 418 | + openItem.addActionListener(this); |
---|
314 | 419 | saveItem.addActionListener(this); |
---|
315 | 420 | saveAsItem.addActionListener(this); |
---|
316 | 421 | exportAsItem.addActionListener(this); |
---|
.. | .. |
---|
319 | 424 | closeItem.addActionListener(this); |
---|
320 | 425 | |
---|
321 | 426 | objectPanel = new JTabbedPane(); |
---|
| 427 | + |
---|
| 428 | + ChangeListener changeListener = new ChangeListener() |
---|
| 429 | + { |
---|
| 430 | + public void stateChanged(ChangeEvent changeEvent) |
---|
| 431 | + { |
---|
| 432 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Material") && !materialFlushed) |
---|
| 433 | +// { |
---|
| 434 | +// if (latestObject != null) |
---|
| 435 | +// { |
---|
| 436 | +// refreshContents(true); |
---|
| 437 | +// SetMaterial(latestObject); |
---|
| 438 | +// } |
---|
| 439 | +// |
---|
| 440 | +// materialFlushed = true; |
---|
| 441 | +// } |
---|
| 442 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Edit")) |
---|
| 443 | +// { |
---|
| 444 | +// if (listUI.size() == 0) |
---|
| 445 | +// EditSelection(false); |
---|
| 446 | +// } |
---|
| 447 | + |
---|
| 448 | + refreshContents(false); // To refresh Info tab |
---|
| 449 | + } |
---|
| 450 | + }; |
---|
| 451 | + objectPanel.addChangeListener(changeListener); |
---|
| 452 | + |
---|
322 | 453 | toolbarPanel = new JPanel(); |
---|
323 | 454 | toolbarPanel.setName("Toolbar"); |
---|
| 455 | + |
---|
324 | 456 | treePanel = new cGridBag(); |
---|
325 | 457 | treePanel.setName("Tree"); |
---|
| 458 | + |
---|
| 459 | + editPanel = new cGridBag().setVertical(true); |
---|
| 460 | + //editPanel.setName("Edit"); |
---|
| 461 | + |
---|
326 | 462 | ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
---|
327 | | - ctrlPanel.setName("Edit"); |
---|
328 | | - materialPanel = new cGridBag().setVertical(true); |
---|
329 | | - materialPanel.setName("Material"); |
---|
| 463 | + |
---|
| 464 | + editCommandsPanel = new cGridBag(); |
---|
| 465 | + editPanel.add(editCommandsPanel); |
---|
| 466 | + editPanel.add(ctrlPanel); |
---|
| 467 | + |
---|
| 468 | + toolboxPanel = new cGridBag().setVertical(true); |
---|
| 469 | + //toolboxPanel.setName("Toolbox"); |
---|
| 470 | + |
---|
| 471 | + skyboxPanel = new cGridBag().setVertical(true); |
---|
| 472 | + |
---|
| 473 | + materialPanel = new cGridBag().setVertical(false); |
---|
| 474 | + //materialPanel.setName("Material"); |
---|
| 475 | + |
---|
330 | 476 | /*JTextPane*/ |
---|
331 | 477 | infoarea = createTextPane(); |
---|
332 | 478 | doc = infoarea.getStyledDocument(); |
---|
333 | 479 | |
---|
334 | 480 | infoarea.setEditable(true); |
---|
335 | 481 | SetText(); |
---|
| 482 | + |
---|
336 | 483 | // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f)); |
---|
337 | 484 | // infoarea.setOpaque(false); |
---|
338 | 485 | // //infoarea.setForeground(textcolor); |
---|
339 | 486 | // TEXTAREA infoarea.setLineWrap(true); |
---|
340 | 487 | // TEXTAREA infoarea.setWrapStyleWord(true); |
---|
341 | 488 | infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); |
---|
342 | | - infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
343 | | - infoPanel.setName("Info"); |
---|
| 489 | + infoPanel.setPreferredSize(new Dimension(1, 1)); |
---|
| 490 | + //infoPanel.setName("Info"); |
---|
344 | 491 | //infoPanel.setLayout(new BorderLayout()); |
---|
345 | 492 | //infoPanel.add(createTextPane()); |
---|
346 | 493 | |
---|
.. | .. |
---|
351 | 498 | mainPanel.setDividerSize(9); |
---|
352 | 499 | mainPanel.setDividerLocation(0.5); //1.0); |
---|
353 | 500 | mainPanel.setResizeWeight(0.5); |
---|
354 | | - |
---|
| 501 | + |
---|
| 502 | +//mainPanel.setDividerSize((int) (mainPanel.getDividerSize() * 1.5)); |
---|
| 503 | + BasicSplitPaneDivider divider = ( (BasicSplitPaneUI) mainPanel.getUI()).getDivider(); |
---|
| 504 | + divider.setDividerSize(15); |
---|
| 505 | + divider.setBorder(BorderFactory.createTitledBorder(divider.getBorder(), "Custom border title -- gets rid of the one-touch arrows!")); |
---|
| 506 | + |
---|
| 507 | + mainPanel.setUI(new BasicSplitPaneUI()); |
---|
| 508 | + |
---|
355 | 509 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
---|
356 | 510 | //mainPanel.setLayout(new GridBagLayout()); |
---|
357 | 511 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
.. | .. |
---|
419 | 573 | e.printStackTrace(); |
---|
420 | 574 | } |
---|
421 | 575 | |
---|
422 | | - String selection = infoarea.getText(); |
---|
423 | | - java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection); |
---|
424 | | - java.awt.datatransfer.Clipboard clipboard = |
---|
425 | | - Toolkit.getDefaultToolkit().getSystemClipboard(); |
---|
| 576 | +// String selection = infoarea.getText(); |
---|
| 577 | +// java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection); |
---|
| 578 | +// java.awt.datatransfer.Clipboard clipboard = |
---|
| 579 | +// Toolkit.getDefaultToolkit().getSystemClipboard(); |
---|
426 | 580 | //clipboard.setContents(data, data); |
---|
427 | 581 | } |
---|
428 | 582 | |
---|
.. | .. |
---|
582 | 736 | } |
---|
583 | 737 | } |
---|
584 | 738 | |
---|
| 739 | +//static GraphicsDevice device = GraphicsEnvironment |
---|
| 740 | +// .getLocalGraphicsEnvironment().getScreenDevices()[0]; |
---|
| 741 | + |
---|
| 742 | + Rectangle keeprect; |
---|
| 743 | + cRadio radio; |
---|
| 744 | + |
---|
| 745 | +cButton keepButton; |
---|
| 746 | + cButton twoButton; // Full 3D |
---|
| 747 | + cButton sixButton; |
---|
| 748 | + cButton threeButton; |
---|
| 749 | + cButton sevenButton; |
---|
| 750 | + cButton fourButton; // full panel |
---|
| 751 | + cButton oneButton; // full XYZ |
---|
| 752 | + //cButton currentLayout; |
---|
| 753 | + |
---|
| 754 | + boolean maximized; |
---|
| 755 | + |
---|
| 756 | + cButton fullscreenLayout; |
---|
| 757 | + cButton expandedLayout; |
---|
| 758 | + |
---|
| 759 | + void Minimize() |
---|
| 760 | + { |
---|
| 761 | + frame.setState(Frame.ICONIFIED); |
---|
| 762 | + frame.validate(); |
---|
| 763 | + } |
---|
| 764 | + |
---|
| 765 | +// artifactURI=null, type=0, property=${file.reference.jfxrt.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@6767876f, broken=false, additional={} |
---|
| 766 | +// artifactURI=null, type=0, property=${file.reference.mac-ui.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@16bdc817, broken=false, additional={} |
---|
| 767 | +// artifactURI=null, type=0, property=${file.reference.classes.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@9daa9c17, broken=false, additional={} |
---|
| 768 | + void Maximize() |
---|
| 769 | + { |
---|
| 770 | + if (CameraPane.FULLSCREEN) |
---|
| 771 | + { |
---|
| 772 | + ToggleFullScreen(); |
---|
| 773 | + } |
---|
| 774 | + |
---|
| 775 | + if (maximized) |
---|
| 776 | + { |
---|
| 777 | + frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); |
---|
| 778 | + } |
---|
| 779 | + else |
---|
| 780 | + { |
---|
| 781 | + keeprect = frame.getBounds(); |
---|
| 782 | +// Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); |
---|
| 783 | +// Dimension rect2 = frame.getToolkit().getScreenSize(); |
---|
| 784 | +// frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height); |
---|
| 785 | +// frame.setState(Frame.MAXIMIZED_BOTH); |
---|
| 786 | + frame.setBounds(frame.getGraphicsConfiguration().getBounds()); |
---|
| 787 | + } |
---|
| 788 | + |
---|
| 789 | + maximized ^= true; |
---|
| 790 | + |
---|
| 791 | + frame.validate(); |
---|
| 792 | + } |
---|
| 793 | + |
---|
| 794 | + cButton minButton; |
---|
| 795 | + cButton maxButton; |
---|
| 796 | + cButton fullButton; |
---|
| 797 | + cButton collapseButton; |
---|
| 798 | + cButton maximize3DButton; |
---|
| 799 | + |
---|
585 | 800 | void ToggleFullScreen() |
---|
586 | 801 | { |
---|
587 | | - if (CameraPane.FULLSCREEN) |
---|
| 802 | + GraphicsDevice device = frame.getGraphicsConfiguration().getDevice(); |
---|
| 803 | + |
---|
| 804 | + cameraView.ToggleFullScreen(); |
---|
| 805 | + |
---|
| 806 | + if (!CameraPane.FULLSCREEN) |
---|
588 | 807 | { |
---|
589 | | - frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
590 | | - framePanel.add(bigThree); |
---|
591 | | - frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 808 | + device.setFullScreenWindow(null); |
---|
| 809 | + frame.dispose(); |
---|
| 810 | + frame.setUndecorated(false); |
---|
| 811 | + frame.validate(); |
---|
| 812 | + frame.setVisible(true); |
---|
| 813 | + |
---|
| 814 | + //frame.setVisible(false); |
---|
| 815 | +// frame.removeNotify(); |
---|
| 816 | +// frame.setUndecorated(false); |
---|
| 817 | +// frame.addNotify(); |
---|
| 818 | + //frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); |
---|
| 819 | + |
---|
| 820 | +// X frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
| 821 | +// X framePanel.add(bigThree); |
---|
| 822 | +// X frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 823 | +// framePanel.setDividerLocation(46); // icons are 24x24 |
---|
| 824 | + |
---|
| 825 | + //frame.setVisible(true); |
---|
| 826 | +// radio.layout = keepButton; |
---|
| 827 | + //theFrame = null; |
---|
| 828 | + keepButton = null; |
---|
| 829 | +// radio.layout.doClick(); |
---|
| 830 | + |
---|
592 | 831 | } else |
---|
593 | 832 | { |
---|
594 | | - frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
595 | | - framePanel.remove(bigThree); |
---|
596 | | - frame.getContentPane().add(/*"Center",*/bigThree); |
---|
| 833 | + keepButton = radio.layout; |
---|
| 834 | + //keeprect = frame.getBounds(); |
---|
| 835 | +// frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width, |
---|
| 836 | +// frame.getToolkit().getScreenSize().height); |
---|
| 837 | + //frame.setVisible(false); |
---|
| 838 | + |
---|
| 839 | + frame.dispose(); |
---|
| 840 | + frame.setUndecorated(true); |
---|
| 841 | + device.setFullScreenWindow(frame); |
---|
| 842 | + frame.validate(); |
---|
| 843 | + frame.setVisible(true); |
---|
| 844 | +// frame.removeNotify(); |
---|
| 845 | +// frame.setUndecorated(true); |
---|
| 846 | +// frame.addNotify(); |
---|
| 847 | +// X frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
| 848 | +// X framePanel.remove(bigThree); |
---|
| 849 | +// X frame.getContentPane().add(/*"Center",*/bigThree); |
---|
| 850 | +// framePanel.setDividerLocation(0); |
---|
| 851 | + |
---|
| 852 | +// radio.layout = fullscreenLayout; |
---|
| 853 | +// radio.layout.doClick(); |
---|
| 854 | + //frame.setVisible(true); |
---|
597 | 855 | } |
---|
598 | | - cameraView.ToggleFullScreen(); |
---|
| 856 | + frame.validate(); |
---|
| 857 | + |
---|
| 858 | + cameraView.requestFocusInWindow(); |
---|
599 | 859 | } |
---|
| 860 | + |
---|
| 861 | + void CollapseToolbar() |
---|
| 862 | + { |
---|
| 863 | + framePanel.setDividerLocation(0); |
---|
| 864 | + //frame.validate(); |
---|
| 865 | + |
---|
| 866 | + cameraView.requestFocusInWindow(); |
---|
| 867 | + } |
---|
| 868 | + |
---|
| 869 | + private Object3D Duplicate(Object3D object) |
---|
| 870 | + { |
---|
| 871 | + boolean temp = CameraPane.SWITCH; |
---|
| 872 | + CameraPane.SWITCH = false; |
---|
| 873 | + |
---|
| 874 | + object.ExtractBigData(versiontable); |
---|
| 875 | + // if (copy == client) |
---|
| 876 | + |
---|
| 877 | + Object3D versions[] = object.versionlist; |
---|
| 878 | + object.versionlist = null; |
---|
| 879 | + |
---|
| 880 | + //byte[] compress = Compress(copy); |
---|
| 881 | + Object3D compress = (Object3D)Grafreed.clone(object); |
---|
| 882 | + |
---|
| 883 | + object.versionlist = versions; |
---|
| 884 | + |
---|
| 885 | + object.RestoreBigData(versiontable); |
---|
| 886 | + |
---|
| 887 | + CameraPane.SWITCH = temp; |
---|
| 888 | + |
---|
| 889 | + return compress; |
---|
| 890 | + } |
---|
600 | 891 | |
---|
601 | 892 | private JTextPane createTextPane() |
---|
602 | 893 | { |
---|
.. | .. |
---|
719 | 1010 | { |
---|
720 | 1011 | SetupMaterial(materialPanel); |
---|
721 | 1012 | } |
---|
| 1013 | + |
---|
722 | 1014 | //SetupName(); |
---|
723 | 1015 | //SetupViews(); |
---|
724 | 1016 | } |
---|
.. | .. |
---|
728 | 1020 | // NumberSlider vDivsField; |
---|
729 | 1021 | // JCheckBox endcaps; |
---|
730 | 1022 | JCheckBox liveCB; |
---|
731 | | - JCheckBox selectCB; |
---|
| 1023 | + JCheckBox selectableCB; |
---|
732 | 1024 | JCheckBox hideCB; |
---|
733 | 1025 | JCheckBox link2masterCB; |
---|
734 | 1026 | JCheckBox markCB; |
---|
.. | .. |
---|
736 | 1028 | JCheckBox speedupCB; |
---|
737 | 1029 | JCheckBox rewindCB; |
---|
738 | 1030 | JCheckBox flipVCB; |
---|
| 1031 | + |
---|
| 1032 | + cCheckBox toggleTextureCB; |
---|
| 1033 | + cCheckBox toggleSwitchCB; |
---|
| 1034 | + |
---|
739 | 1035 | JComboBox texresMenu; |
---|
| 1036 | + |
---|
740 | 1037 | JButton resetButton; |
---|
741 | 1038 | JButton stepButton; |
---|
742 | 1039 | JButton stepAllButton; |
---|
.. | .. |
---|
745 | 1042 | JButton fasterButton; |
---|
746 | 1043 | JButton remarkButton; |
---|
747 | 1044 | |
---|
| 1045 | + cGridBag editPanel; |
---|
| 1046 | + cGridBag editCommandsPanel; |
---|
| 1047 | + |
---|
748 | 1048 | cGridBag namePanel; |
---|
749 | 1049 | cGridBag setupPanel; |
---|
750 | | - cGridBag commandsPanel; |
---|
| 1050 | + cGridBag setupPanel2; |
---|
| 1051 | + cGridBag objectCommandsPanel; |
---|
751 | 1052 | cGridBag pushPanel; |
---|
752 | 1053 | cGridBag fillPanel; |
---|
753 | 1054 | |
---|
.. | .. |
---|
918 | 1219 | |
---|
919 | 1220 | namePanel = new cGridBag(); |
---|
920 | 1221 | |
---|
| 1222 | + //if (copy.pinned) |
---|
| 1223 | + { |
---|
| 1224 | + pinButton = GetToggleButton("icons/pin.png", !Grafreed.NIMBUSLAF); |
---|
| 1225 | + pinButton.setSelected(copy.pinned); |
---|
| 1226 | + cGridBag t = new cGridBag(); |
---|
| 1227 | + t.preferredWidth = 2; |
---|
| 1228 | + t.add(pinButton); |
---|
| 1229 | + namePanel.add(t); |
---|
| 1230 | + |
---|
| 1231 | + pinButton.addItemListener(this); |
---|
| 1232 | + } |
---|
| 1233 | + |
---|
921 | 1234 | nameField = AddText(namePanel, copy.GetName()); |
---|
922 | | - namePanel.add(nameField); |
---|
| 1235 | + namePanel.add(new JScrollPane(nameField, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER)); |
---|
923 | 1236 | oe.ctrlPanel.add(namePanel); |
---|
924 | 1237 | |
---|
925 | 1238 | oe.ctrlPanel.Return(); |
---|
926 | 1239 | |
---|
927 | | - if (!GroupEditor.allparams) |
---|
| 1240 | + if (!allparams) |
---|
928 | 1241 | return; |
---|
929 | 1242 | |
---|
930 | 1243 | setupPanel = new cGridBag().setVertical(false); |
---|
931 | 1244 | |
---|
932 | 1245 | liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
933 | 1246 | liveCB.setToolTipText("Animate object"); |
---|
934 | | - selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
935 | | - selectCB.setToolTipText("Make object selectable"); |
---|
| 1247 | + selectableCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
| 1248 | + selectableCB.setToolTipText("Make object selectable"); |
---|
936 | 1249 | // Return(); |
---|
| 1250 | + |
---|
937 | 1251 | hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
938 | 1252 | hideCB.setToolTipText("Hide object"); |
---|
939 | 1253 | markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
940 | | - markCB.setToolTipText("Set the animation target transform"); |
---|
| 1254 | + markCB.setToolTipText("As animation target transform"); |
---|
941 | 1255 | |
---|
942 | | - rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind); |
---|
| 1256 | + ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false); |
---|
| 1257 | + |
---|
| 1258 | + setupPanel2 = new cGridBag().setVertical(false); |
---|
| 1259 | + |
---|
| 1260 | + rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind); |
---|
943 | 1261 | rewindCB.setToolTipText("Rewind animation"); |
---|
944 | 1262 | |
---|
945 | | - randomCB = AddCheckBox(setupPanel, "Random", copy.random); |
---|
946 | | - randomCB.setToolTipText("Option for switch node"); |
---|
| 1263 | + randomCB = AddCheckBox(setupPanel2, "Random", copy.random); |
---|
| 1264 | + randomCB.setToolTipText("Randomly Rewind (or Go back and forth)"); |
---|
947 | 1265 | |
---|
| 1266 | + link2masterCB = AddCheckBox(setupPanel2, "Support", copy.link2master); |
---|
| 1267 | + link2masterCB.setToolTipText("Attach to support"); |
---|
| 1268 | + |
---|
948 | 1269 | if (Globals.ADVANCED) |
---|
949 | 1270 | { |
---|
950 | | - link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master); |
---|
951 | | - link2masterCB.setToolTipText("Attach to support"); |
---|
952 | | - speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup); |
---|
| 1271 | + speedupCB = AddCheckBox(setupPanel2, "Speed", copy.speedup); |
---|
953 | 1272 | speedupCB.setToolTipText("Option motion capture"); |
---|
954 | 1273 | } |
---|
955 | 1274 | |
---|
956 | 1275 | oe.ctrlPanel.add(setupPanel); |
---|
957 | 1276 | oe.ctrlPanel.Return(); |
---|
| 1277 | + oe.ctrlPanel.add(setupPanel2); |
---|
| 1278 | + oe.ctrlPanel.Return(); |
---|
958 | 1279 | |
---|
959 | | - commandsPanel = new cGridBag().setVertical(false); |
---|
| 1280 | + objectCommandsPanel = new cGridBag().setVertical(false); |
---|
960 | 1281 | |
---|
961 | | - resetButton = AddButton(commandsPanel, "Reset"); |
---|
| 1282 | + resetButton = AddButton(objectCommandsPanel, "Reset"); |
---|
962 | 1283 | resetButton.setToolTipText("Jump to frame zero"); |
---|
963 | | - stepButton = AddButton(commandsPanel, "Step"); |
---|
| 1284 | + stepButton = AddButton(objectCommandsPanel, "Step"); |
---|
964 | 1285 | stepButton.setToolTipText("Step one frame"); |
---|
965 | 1286 | // resetAllButton = AddButton(oe, "Reset All"); |
---|
966 | 1287 | // stepAllButton = AddButton(oe, "Step All"); |
---|
967 | 1288 | // Return(); |
---|
968 | | - slowerButton = AddButton(commandsPanel, "Slow"); |
---|
| 1289 | + slowerButton = AddButton(objectCommandsPanel, "Slow"); |
---|
969 | 1290 | slowerButton.setToolTipText("Decrease animation speed"); |
---|
970 | | - fasterButton = AddButton(commandsPanel, "Fast"); |
---|
| 1291 | + fasterButton = AddButton(objectCommandsPanel, "Fast"); |
---|
971 | 1292 | fasterButton.setToolTipText("Increase animation speed"); |
---|
972 | | - remarkButton = AddButton(commandsPanel, "Remark"); |
---|
| 1293 | + remarkButton = AddButton(objectCommandsPanel, "Remark"); |
---|
973 | 1294 | remarkButton.setToolTipText("Set the current transform as the target"); |
---|
974 | 1295 | |
---|
975 | | - oe.ctrlPanel.add(commandsPanel); |
---|
| 1296 | + oe.ctrlPanel.add(objectCommandsPanel); |
---|
976 | 1297 | oe.ctrlPanel.Return(); |
---|
977 | 1298 | |
---|
978 | 1299 | pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons |
---|
.. | .. |
---|
1178 | 1499 | //worldPanel.setName("World"); |
---|
1179 | 1500 | centralPanel = new cGridBag(); |
---|
1180 | 1501 | centralPanel.preferredWidth = 20; |
---|
1181 | | - timelinePanel = new JPanel(new BorderLayout()); |
---|
1182 | | - timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
| 1502 | + |
---|
| 1503 | + if (Globals.ADVANCED) |
---|
| 1504 | + { |
---|
| 1505 | + timelinePanel = new JPanel(new BorderLayout()); |
---|
| 1506 | + timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
1183 | 1507 | |
---|
1184 | 1508 | cameraPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, cameraView, timelinePanel); |
---|
1185 | 1509 | cameraPanel.setContinuousLayout(true); |
---|
.. | .. |
---|
1188 | 1512 | // cameraPanel.setDividerSize(9); |
---|
1189 | 1513 | cameraPanel.setResizeWeight(1.0); |
---|
1190 | 1514 | |
---|
| 1515 | + } |
---|
| 1516 | + |
---|
1191 | 1517 | centralPanel.add(cameraView); |
---|
| 1518 | + centralPanel.setFocusable(true); |
---|
1192 | 1519 | //frame.setJMenuBar(timelineMenubar); |
---|
1193 | 1520 | //centralPanel.add(timelinePanel); |
---|
1194 | 1521 | |
---|
.. | .. |
---|
1214 | 1541 | XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
---|
1215 | 1542 | XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll); |
---|
1216 | 1543 | XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll); |
---|
| 1544 | + //XYZPanel.setName("XYZ"); |
---|
1217 | 1545 | |
---|
1218 | 1546 | /* |
---|
1219 | 1547 | gridPanel = new JPanel(); //new BorderLayout()); |
---|
.. | .. |
---|
1251 | 1579 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
---|
1252 | 1580 | //tmp.setName("Edit"); |
---|
1253 | 1581 | objectPanel.add(materialPanel); |
---|
| 1582 | + objectPanel.setIconAt(0, GetIcon("icons/material.png")); |
---|
| 1583 | + objectPanel.setToolTipTextAt(0, "Material"); |
---|
| 1584 | + |
---|
| 1585 | + objectPanel.add(toolboxPanel); |
---|
| 1586 | + objectPanel.setIconAt(1, GetIcon("icons/primitives.png")); |
---|
| 1587 | + objectPanel.setToolTipTextAt(1, "Objects & textures"); |
---|
| 1588 | + |
---|
| 1589 | + objectPanel.add(skyboxPanel); |
---|
| 1590 | + objectPanel.setIconAt(2, GetIcon("icons/skybox.jpg")); |
---|
| 1591 | + objectPanel.setToolTipTextAt(2, "Backgrounds"); |
---|
| 1592 | + |
---|
1254 | 1593 | // JPanel north = new JPanel(new BorderLayout()); |
---|
1255 | 1594 | // north.setName("Edit"); |
---|
1256 | 1595 | // north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1257 | 1596 | // objectPanel.add(north); |
---|
1258 | | - objectPanel.add(ctrlPanel); |
---|
1259 | | - objectPanel.add(infoPanel); |
---|
1260 | | - |
---|
| 1597 | + objectPanel.add(editPanel); |
---|
| 1598 | + objectPanel.setIconAt(3, GetIcon("icons/write.png")); |
---|
| 1599 | + objectPanel.setToolTipTextAt(3, "Edit controls"); |
---|
| 1600 | + |
---|
| 1601 | + objectPanel.add(XYZPanel); |
---|
| 1602 | + objectPanel.setIconAt(4, GetIcon("icons/XYZ.png")); |
---|
| 1603 | + objectPanel.setToolTipTextAt(4, "XYZ/RGB transform"); |
---|
| 1604 | + |
---|
1261 | 1605 | /* |
---|
1262 | 1606 | aConstraints.gridx = 0; |
---|
1263 | 1607 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1265 | 1609 | aConstraints.gridy += 1; |
---|
1266 | 1610 | aConstraints.gridwidth = 1; |
---|
1267 | 1611 | mainPanel.add(objectPanel, aConstraints); |
---|
1268 | | - */ |
---|
| 1612 | + */ |
---|
1269 | 1613 | |
---|
1270 | 1614 | scrollpane = new JScrollPane(mainPanel, ScrollPaneConstants.// VERTICAL_SCROLLBAR_ALWAYS, |
---|
1271 | 1615 | VERTICAL_SCROLLBAR_AS_NEEDED, |
---|
.. | .. |
---|
1277 | 1621 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1278 | 1622 | |
---|
1279 | 1623 | /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
1280 | | - scenePanel.preferredWidth = 6; |
---|
| 1624 | + scenePanel.preferredWidth = 5; |
---|
1281 | 1625 | |
---|
1282 | 1626 | JTabbedPane tabbedPane = new JTabbedPane(); |
---|
1283 | 1627 | tabbedPane.add(scrollpane); |
---|
1284 | 1628 | |
---|
1285 | | - tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
1286 | | - |
---|
1287 | | - optionsPanel = new cGridBag().setVertical(true); |
---|
| 1629 | + optionsPanel = new cGridBag().setVertical(false); |
---|
1288 | 1630 | |
---|
1289 | 1631 | optionsPanel.setName("Options"); |
---|
1290 | 1632 | |
---|
.. | .. |
---|
1292 | 1634 | |
---|
1293 | 1635 | tabbedPane.add(optionsPanel); |
---|
1294 | 1636 | |
---|
| 1637 | + tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
| 1638 | + |
---|
1295 | 1639 | scenePanel.add(tabbedPane); |
---|
1296 | 1640 | |
---|
| 1641 | + //if (Globals.ADVANCED) |
---|
| 1642 | + tabbedPane.add(infoPanel); |
---|
| 1643 | + tabbedPane.setIconAt(3, GetIcon("icons/info.png")); |
---|
| 1644 | + tabbedPane.setToolTipTextAt(3, "Information"); |
---|
| 1645 | + |
---|
1297 | 1646 | /* |
---|
1298 | 1647 | cTree jTree = new cTree(null); |
---|
1299 | 1648 | ToolTipManager.sharedInstance().registerComponent(jTree); |
---|
.. | .. |
---|
1355 | 1704 | bigThree = new cGridBag(); |
---|
1356 | 1705 | bigThree.addComponent(scenePanel); |
---|
1357 | 1706 | bigThree.addComponent(centralPanel); |
---|
1358 | | - bigThree.addComponent(XYZPanel); |
---|
| 1707 | + //bigThree.addComponent(XYZPanel); |
---|
1359 | 1708 | |
---|
1360 | 1709 | // // SIDE EFFECT!!! |
---|
1361 | 1710 | // aConstraints.gridx = 0; |
---|
.. | .. |
---|
1364 | 1713 | // aConstraints.gridheight = 1; |
---|
1365 | 1714 | |
---|
1366 | 1715 | framePanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, toolbarPanel, bigThree); |
---|
1367 | | - framePanel.setContinuousLayout(true); |
---|
1368 | | - framePanel.setOneTouchExpandable(true); |
---|
1369 | | - framePanel.setDividerLocation(0.8); |
---|
| 1716 | + |
---|
| 1717 | + framePanel.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, |
---|
| 1718 | + new java.beans.PropertyChangeListener() |
---|
| 1719 | + { |
---|
| 1720 | + public void propertyChange(java.beans.PropertyChangeEvent pce) |
---|
| 1721 | + { |
---|
| 1722 | + if ((Integer)pce.getOldValue() == 1) |
---|
| 1723 | + { |
---|
| 1724 | + if (radio.layout != expandedLayout) |
---|
| 1725 | + { |
---|
| 1726 | + radio.layout = expandedLayout; |
---|
| 1727 | + radio.layout.doClick(); |
---|
| 1728 | + } |
---|
| 1729 | + } |
---|
| 1730 | + } |
---|
| 1731 | + }); |
---|
| 1732 | + |
---|
| 1733 | + framePanel.setContinuousLayout(false); |
---|
| 1734 | + framePanel.setOneTouchExpandable(false); |
---|
| 1735 | + //.setDividerLocation(0.8); |
---|
1370 | 1736 | //framePanel.setDividerSize(15); |
---|
1371 | 1737 | //framePanel.setResizeWeight(0.15); |
---|
1372 | 1738 | framePanel.setName("Frame"); |
---|
.. | .. |
---|
1384 | 1750 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
1385 | 1751 | |
---|
1386 | 1752 | frame.setSize(1280, 860); |
---|
1387 | | - frame.setVisible(true); |
---|
1388 | | - |
---|
| 1753 | + |
---|
| 1754 | + cameraView.requestFocusInWindow(); |
---|
| 1755 | + |
---|
1389 | 1756 | gridPanel.setDividerLocation(1.0); |
---|
| 1757 | + |
---|
| 1758 | + frame.validate(); |
---|
| 1759 | + |
---|
| 1760 | + frame.setVisible(true); |
---|
1390 | 1761 | |
---|
1391 | 1762 | frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); |
---|
1392 | 1763 | frame.addWindowListener(new WindowAdapter() |
---|
1393 | 1764 | { |
---|
1394 | | - |
---|
1395 | 1765 | public void windowClosing(WindowEvent e) |
---|
1396 | 1766 | { |
---|
1397 | 1767 | Close(); |
---|
.. | .. |
---|
1414 | 1784 | ctrlPanel.removeAll(); |
---|
1415 | 1785 | } |
---|
1416 | 1786 | |
---|
1417 | | - void SetupMaterial(cGridBag panel) |
---|
| 1787 | + void SetupMaterial(cGridBag materialpanel) |
---|
1418 | 1788 | { |
---|
1419 | | - /* |
---|
| 1789 | + cGridBag presetpanel = new cGridBag().setVertical(true); |
---|
| 1790 | + |
---|
| 1791 | + cLabel skin = GetLabel("icons/shadericons/shadericon00000.png", !Grafreed.NIMBUSLAF); |
---|
| 1792 | + skin.setToolTipText("Skin"); |
---|
| 1793 | + skin.addMouseListener(new MouseAdapter() |
---|
| 1794 | + { |
---|
| 1795 | + public void mouseClicked(MouseEvent e) |
---|
| 1796 | + { |
---|
| 1797 | + Object3D object = Grafreed.materials.versionlist[0].get(0); |
---|
| 1798 | + cMaterial material = object.material; |
---|
| 1799 | + |
---|
| 1800 | + // Skin |
---|
| 1801 | + colorField.setFloat(material.color); |
---|
| 1802 | + saturationField.setFloat(material.modulation); |
---|
| 1803 | + subsurfaceField.setFloat(material.subsurface); |
---|
| 1804 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1805 | + diffusenessField.setFloat(material.factor); |
---|
| 1806 | + shininessField.setFloat(material.shininess); |
---|
| 1807 | + shadowbiasField.setFloat(material.shadowbias); |
---|
| 1808 | + diffuseField.setFloat(material.diffuse); |
---|
| 1809 | + specularField.setFloat(material.specular); |
---|
| 1810 | + |
---|
| 1811 | + bumpField.setFloat(object.projectedVertices[0].x / 1000.0); |
---|
| 1812 | + noiseField.setFloat(object.projectedVertices[0].y / 1000.0); |
---|
| 1813 | + powerField.setFloat(object.projectedVertices[2].x / 1000.0); |
---|
| 1814 | + |
---|
| 1815 | + materialtouched = true; |
---|
| 1816 | + applySelf(); |
---|
| 1817 | + } |
---|
| 1818 | + }); |
---|
| 1819 | + presetpanel.add(skin); |
---|
| 1820 | + |
---|
| 1821 | + cLabel lambert = GetLabel("icons/shadericons/shadericon00002.png", !Grafreed.NIMBUSLAF); |
---|
| 1822 | + lambert.setToolTipText("Diffuse"); |
---|
| 1823 | + lambert.addMouseListener(new MouseAdapter() |
---|
| 1824 | + { |
---|
| 1825 | + public void mouseClicked(MouseEvent e) |
---|
| 1826 | + { |
---|
| 1827 | + Object3D object = Grafreed.materials.versionlist[2].get(0); |
---|
| 1828 | + cMaterial material = object.material; |
---|
| 1829 | + |
---|
| 1830 | + diffusenessField.setFloat(material.factor); |
---|
| 1831 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1832 | + |
---|
| 1833 | + materialtouched = true; |
---|
| 1834 | + applySelf(); |
---|
| 1835 | + } |
---|
| 1836 | + }); |
---|
| 1837 | + presetpanel.add(lambert); |
---|
| 1838 | + |
---|
| 1839 | + cLabel diffuse2 = GetLabel("icons/shadericons/shadericon00003.png", !Grafreed.NIMBUSLAF); |
---|
| 1840 | + diffuse2.setToolTipText("Diffuse2"); |
---|
| 1841 | + diffuse2.addMouseListener(new MouseAdapter() |
---|
| 1842 | + { |
---|
| 1843 | + public void mouseClicked(MouseEvent e) |
---|
| 1844 | + { |
---|
| 1845 | + Object3D object = Grafreed.materials.versionlist[3].get(0); |
---|
| 1846 | + cMaterial material = object.material; |
---|
| 1847 | + |
---|
| 1848 | + diffusenessField.setFloat(material.factor); |
---|
| 1849 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1850 | + |
---|
| 1851 | + materialtouched = true; |
---|
| 1852 | + applySelf(); |
---|
| 1853 | + } |
---|
| 1854 | + }); |
---|
| 1855 | + presetpanel.add(diffuse2); |
---|
| 1856 | + |
---|
| 1857 | + cLabel diffusemoon = GetLabel("icons/shadericons/shadericon00004.png", !Grafreed.NIMBUSLAF); |
---|
| 1858 | + diffusemoon.setToolTipText("Moon"); |
---|
| 1859 | + diffusemoon.addMouseListener(new MouseAdapter() |
---|
| 1860 | + { |
---|
| 1861 | + public void mouseClicked(MouseEvent e) |
---|
| 1862 | + { |
---|
| 1863 | + Object3D object = Grafreed.materials.versionlist[4].get(0); |
---|
| 1864 | + cMaterial material = object.material; |
---|
| 1865 | + |
---|
| 1866 | + diffusenessField.setFloat(material.factor); |
---|
| 1867 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1868 | + |
---|
| 1869 | + materialtouched = true; |
---|
| 1870 | + applySelf(); |
---|
| 1871 | + } |
---|
| 1872 | + }); |
---|
| 1873 | + presetpanel.add(diffusemoon); |
---|
| 1874 | + |
---|
| 1875 | + cLabel diffusemoon2 = GetLabel("icons/shadericons/shadericon00005.png", !Grafreed.NIMBUSLAF); |
---|
| 1876 | + diffusemoon2.setToolTipText("Moon2"); |
---|
| 1877 | + diffusemoon2.addMouseListener(new MouseAdapter() |
---|
| 1878 | + { |
---|
| 1879 | + public void mouseClicked(MouseEvent e) |
---|
| 1880 | + { |
---|
| 1881 | + Object3D object = Grafreed.materials.versionlist[5].get(0); |
---|
| 1882 | + cMaterial material = object.material; |
---|
| 1883 | + |
---|
| 1884 | + diffusenessField.setFloat(material.factor); |
---|
| 1885 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1886 | + |
---|
| 1887 | + materialtouched = true; |
---|
| 1888 | + applySelf(); |
---|
| 1889 | + } |
---|
| 1890 | + }); |
---|
| 1891 | + presetpanel.add(diffusemoon2); |
---|
| 1892 | + |
---|
| 1893 | + cLabel diffusemoon3 = GetLabel("icons/shadericons/shadericon00006.png", !Grafreed.NIMBUSLAF); |
---|
| 1894 | + diffusemoon3.setToolTipText("Moon3"); |
---|
| 1895 | + diffusemoon3.addMouseListener(new MouseAdapter() |
---|
| 1896 | + { |
---|
| 1897 | + public void mouseClicked(MouseEvent e) |
---|
| 1898 | + { |
---|
| 1899 | + Object3D object = Grafreed.materials.versionlist[6].get(0); |
---|
| 1900 | + cMaterial material = object.material; |
---|
| 1901 | + |
---|
| 1902 | + diffusenessField.setFloat(material.factor); |
---|
| 1903 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1904 | + |
---|
| 1905 | + materialtouched = true; |
---|
| 1906 | + applySelf(); |
---|
| 1907 | + } |
---|
| 1908 | + }); |
---|
| 1909 | + presetpanel.add(diffusemoon3); |
---|
| 1910 | + |
---|
| 1911 | + cLabel diffusesheen = GetLabel("icons/shadericons/shadericon00007.png", !Grafreed.NIMBUSLAF); |
---|
| 1912 | + diffusesheen.setToolTipText("Sheen"); |
---|
| 1913 | + diffusesheen.addMouseListener(new MouseAdapter() |
---|
| 1914 | + { |
---|
| 1915 | + public void mouseClicked(MouseEvent e) |
---|
| 1916 | + { |
---|
| 1917 | + Object3D object = Grafreed.materials.versionlist[7].get(0); |
---|
| 1918 | + cMaterial material = object.material; |
---|
| 1919 | + |
---|
| 1920 | + sheenField.setFloat(material.sheen); |
---|
| 1921 | + |
---|
| 1922 | + materialtouched = true; |
---|
| 1923 | + applySelf(); |
---|
| 1924 | + } |
---|
| 1925 | + }); |
---|
| 1926 | + presetpanel.add(diffusesheen); |
---|
| 1927 | + |
---|
| 1928 | + cLabel rough = GetLabel("icons/shadericons/shadericon00001.png", !Grafreed.NIMBUSLAF); |
---|
| 1929 | + rough.setToolTipText("Rough metal"); |
---|
| 1930 | + rough.addMouseListener(new MouseAdapter() |
---|
| 1931 | + { |
---|
| 1932 | + public void mouseClicked(MouseEvent e) |
---|
| 1933 | + { |
---|
| 1934 | + Object3D object = Grafreed.materials.versionlist[1].get(0); |
---|
| 1935 | + cMaterial material = object.material; |
---|
| 1936 | + |
---|
| 1937 | + shininessField.setFloat(material.shininess); |
---|
| 1938 | + velvetField.setFloat(material.velvet); |
---|
| 1939 | + |
---|
| 1940 | + materialtouched = true; |
---|
| 1941 | + applySelf(); |
---|
| 1942 | + } |
---|
| 1943 | + }); |
---|
| 1944 | + presetpanel.add(rough); |
---|
| 1945 | + |
---|
| 1946 | + cLabel rough2 = GetLabel("icons/shadericons/shadericon00013.png", !Grafreed.NIMBUSLAF); |
---|
| 1947 | + rough2.setToolTipText("Medium metal"); |
---|
| 1948 | + rough2.addMouseListener(new MouseAdapter() |
---|
| 1949 | + { |
---|
| 1950 | + public void mouseClicked(MouseEvent e) |
---|
| 1951 | + { |
---|
| 1952 | + Object3D object = Grafreed.materials.versionlist[13].get(0); |
---|
| 1953 | + cMaterial material = object.material; |
---|
| 1954 | + |
---|
| 1955 | + shininessField.setFloat(material.shininess); |
---|
| 1956 | + lightareaField.setFloat(material.lightarea); |
---|
| 1957 | + |
---|
| 1958 | + materialtouched = true; |
---|
| 1959 | + applySelf(); |
---|
| 1960 | + } |
---|
| 1961 | + }); |
---|
| 1962 | + presetpanel.add(rough2); |
---|
| 1963 | + |
---|
| 1964 | + cLabel shini0 = GetLabel("icons/shadericons/shadericon00014.png", !Grafreed.NIMBUSLAF); |
---|
| 1965 | + shini0.setToolTipText("Shiny"); |
---|
| 1966 | + shini0.addMouseListener(new MouseAdapter() |
---|
| 1967 | + { |
---|
| 1968 | + public void mouseClicked(MouseEvent e) |
---|
| 1969 | + { |
---|
| 1970 | + Object3D object = Grafreed.materials.versionlist[14].get(0); |
---|
| 1971 | + cMaterial material = object.material; |
---|
| 1972 | + |
---|
| 1973 | + shininessField.setFloat(material.shininess); |
---|
| 1974 | + lightareaField.setFloat(material.lightarea); |
---|
| 1975 | + |
---|
| 1976 | + materialtouched = true; |
---|
| 1977 | + applySelf(); |
---|
| 1978 | + } |
---|
| 1979 | + }); |
---|
| 1980 | + presetpanel.add(shini0); |
---|
| 1981 | + |
---|
| 1982 | + cLabel shini1 = GetLabel("icons/shadericons/shadericon00011.png", !Grafreed.NIMBUSLAF); |
---|
| 1983 | + shini1.setToolTipText("Shiny2"); |
---|
| 1984 | + shini1.addMouseListener(new MouseAdapter() |
---|
| 1985 | + { |
---|
| 1986 | + public void mouseClicked(MouseEvent e) |
---|
| 1987 | + { |
---|
| 1988 | + Object3D object = Grafreed.materials.versionlist[11].get(0); |
---|
| 1989 | + cMaterial material = object.material; |
---|
| 1990 | + |
---|
| 1991 | + shininessField.setFloat(material.shininess); |
---|
| 1992 | + lightareaField.setFloat(material.lightarea); |
---|
| 1993 | + |
---|
| 1994 | + materialtouched = true; |
---|
| 1995 | + applySelf(); |
---|
| 1996 | + } |
---|
| 1997 | + }); |
---|
| 1998 | + presetpanel.add(shini1); |
---|
| 1999 | + |
---|
| 2000 | + cLabel shini2 = GetLabel("icons/shadericons/shadericon00012.png", !Grafreed.NIMBUSLAF); |
---|
| 2001 | + shini2.setToolTipText("Shiny3"); |
---|
| 2002 | + shini2.addMouseListener(new MouseAdapter() |
---|
| 2003 | + { |
---|
| 2004 | + public void mouseClicked(MouseEvent e) |
---|
| 2005 | + { |
---|
| 2006 | + Object3D object = Grafreed.materials.versionlist[12].get(0); |
---|
| 2007 | + cMaterial material = object.material; |
---|
| 2008 | + |
---|
| 2009 | + shininessField.setFloat(material.shininess); |
---|
| 2010 | + lightareaField.setFloat(material.lightarea); |
---|
| 2011 | + |
---|
| 2012 | + materialtouched = true; |
---|
| 2013 | + applySelf(); |
---|
| 2014 | + } |
---|
| 2015 | + }); |
---|
| 2016 | + presetpanel.add(shini2); |
---|
| 2017 | + |
---|
| 2018 | + cLabel aniso = GetLabel("icons/shadericons/shadericon00008.png", !Grafreed.NIMBUSLAF); |
---|
| 2019 | + aniso.setToolTipText("AnisoU"); |
---|
| 2020 | + aniso.addMouseListener(new MouseAdapter() |
---|
| 2021 | + { |
---|
| 2022 | + public void mouseClicked(MouseEvent e) |
---|
| 2023 | + { |
---|
| 2024 | + Object3D object = Grafreed.materials.versionlist[8].get(0); |
---|
| 2025 | + cMaterial material = object.material; |
---|
| 2026 | + |
---|
| 2027 | + anisoField.setFloat(material.aniso); |
---|
| 2028 | + anisoVField.setFloat(material.anisoV); |
---|
| 2029 | + |
---|
| 2030 | + materialtouched = true; |
---|
| 2031 | + applySelf(); |
---|
| 2032 | + } |
---|
| 2033 | + }); |
---|
| 2034 | + presetpanel.add(aniso); |
---|
| 2035 | + |
---|
| 2036 | + cLabel aniso2 = GetLabel("icons/shadericons/shadericon00009.png", !Grafreed.NIMBUSLAF); |
---|
| 2037 | + aniso2.setToolTipText("AnisoV"); |
---|
| 2038 | + aniso2.addMouseListener(new MouseAdapter() |
---|
| 2039 | + { |
---|
| 2040 | + public void mouseClicked(MouseEvent e) |
---|
| 2041 | + { |
---|
| 2042 | + Object3D object = Grafreed.materials.versionlist[9].get(0); |
---|
| 2043 | + cMaterial material = object.material; |
---|
| 2044 | + |
---|
| 2045 | + anisoField.setFloat(material.aniso); |
---|
| 2046 | + anisoVField.setFloat(material.anisoV); |
---|
| 2047 | + |
---|
| 2048 | + materialtouched = true; |
---|
| 2049 | + applySelf(); |
---|
| 2050 | + } |
---|
| 2051 | + }); |
---|
| 2052 | + presetpanel.add(aniso2); |
---|
| 2053 | + |
---|
| 2054 | + cLabel aniso3 = GetLabel("icons/shadericons/shadericon00010.png", !Grafreed.NIMBUSLAF); |
---|
| 2055 | + aniso3.setToolTipText("AnisoUV"); |
---|
| 2056 | + aniso3.addMouseListener(new MouseAdapter() |
---|
| 2057 | + { |
---|
| 2058 | + public void mouseClicked(MouseEvent e) |
---|
| 2059 | + { |
---|
| 2060 | + Object3D object = Grafreed.materials.versionlist[10].get(0); |
---|
| 2061 | + cMaterial material = object.material; |
---|
| 2062 | + |
---|
| 2063 | + anisoField.setFloat(material.aniso); |
---|
| 2064 | + anisoVField.setFloat(material.anisoV); |
---|
| 2065 | + |
---|
| 2066 | + materialtouched = true; |
---|
| 2067 | + applySelf(); |
---|
| 2068 | + } |
---|
| 2069 | + }); |
---|
| 2070 | + presetpanel.add(aniso3); |
---|
| 2071 | + |
---|
| 2072 | + cLabel velvet0 = GetLabel("icons/shadericons/shadericon00015.png", !Grafreed.NIMBUSLAF); |
---|
| 2073 | + velvet0.setToolTipText("Velvet"); |
---|
| 2074 | + velvet0.addMouseListener(new MouseAdapter() |
---|
| 2075 | + { |
---|
| 2076 | + public void mouseClicked(MouseEvent e) |
---|
| 2077 | + { |
---|
| 2078 | + Object3D object = Grafreed.materials.versionlist[15].get(0); |
---|
| 2079 | + cMaterial material = object.material; |
---|
| 2080 | + |
---|
| 2081 | + diffusenessField.setFloat(material.factor); |
---|
| 2082 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 2083 | + sheenField.setFloat(material.sheen); |
---|
| 2084 | + shininessField.setFloat(material.shininess); |
---|
| 2085 | + velvetField.setFloat(material.velvet); |
---|
| 2086 | + shiftField.setFloat(material.shift); |
---|
| 2087 | + |
---|
| 2088 | + materialtouched = true; |
---|
| 2089 | + applySelf(); |
---|
| 2090 | + } |
---|
| 2091 | + }); |
---|
| 2092 | + presetpanel.add(velvet0); |
---|
| 2093 | + |
---|
| 2094 | + cLabel bump0 = GetLabel("icons/shadericons/shadericon00016.png", !Grafreed.NIMBUSLAF); |
---|
| 2095 | + bump0.setToolTipText("Bump texture"); |
---|
| 2096 | + bump0.addMouseListener(new MouseAdapter() |
---|
| 2097 | + { |
---|
| 2098 | + public void mouseClicked(MouseEvent e) |
---|
| 2099 | + { |
---|
| 2100 | + Object3D object = Grafreed.materials.versionlist[16].get(0); |
---|
| 2101 | + cMaterial material = object.material; |
---|
| 2102 | + |
---|
| 2103 | + bumpField.setFloat(object.projectedVertices[0].x / 1000.0); |
---|
| 2104 | + noiseField.setFloat(object.projectedVertices[0].y / 1000.0); |
---|
| 2105 | + powerField.setFloat(object.projectedVertices[2].x / 1000.0); |
---|
| 2106 | + |
---|
| 2107 | + materialtouched = true; |
---|
| 2108 | + applySelf(); |
---|
| 2109 | + } |
---|
| 2110 | + }); |
---|
| 2111 | + presetpanel.add(bump0); |
---|
| 2112 | + |
---|
| 2113 | + cLabel halo = GetLabel("icons/shadericons/shadericon00017.png", !Grafreed.NIMBUSLAF); |
---|
| 2114 | + halo.setToolTipText("Halo"); |
---|
| 2115 | + halo.addMouseListener(new MouseAdapter() |
---|
| 2116 | + { |
---|
| 2117 | + public void mouseClicked(MouseEvent e) |
---|
| 2118 | + { |
---|
| 2119 | + Object3D object = Grafreed.materials.versionlist[17].get(0); |
---|
| 2120 | + cMaterial material = object.material; |
---|
| 2121 | + |
---|
| 2122 | + opacityPowerField.setFloat(object.projectedVertices[2].y / 1000.0); |
---|
| 2123 | + |
---|
| 2124 | + materialtouched = true; |
---|
| 2125 | + applySelf(); |
---|
| 2126 | + } |
---|
| 2127 | + }); |
---|
| 2128 | + presetpanel.add(halo); |
---|
| 2129 | + |
---|
| 2130 | + cLabel candle = GetLabel("icons/shadericons/shadericon00018.png", !Grafreed.NIMBUSLAF); |
---|
| 2131 | + candle.setToolTipText("Candle"); |
---|
| 2132 | + candle.addMouseListener(new MouseAdapter() |
---|
| 2133 | + { |
---|
| 2134 | + public void mouseClicked(MouseEvent e) |
---|
| 2135 | + { |
---|
| 2136 | + Object3D object = Grafreed.materials.versionlist[18].get(0); |
---|
| 2137 | + cMaterial material = object.material; |
---|
| 2138 | + |
---|
| 2139 | + subsurfaceField.setFloat(material.subsurface); |
---|
| 2140 | + shadowbiasField.setFloat(material.shadowbias); |
---|
| 2141 | + ambientField.setFloat(material.ambient); |
---|
| 2142 | + specularField.setFloat(material.specular); |
---|
| 2143 | + lightareaField.setFloat(material.lightarea); |
---|
| 2144 | + shininessField.setFloat(material.shininess); |
---|
| 2145 | + |
---|
| 2146 | + materialtouched = true; |
---|
| 2147 | + applySelf(); |
---|
| 2148 | + } |
---|
| 2149 | + }); |
---|
| 2150 | + presetpanel.add(candle); |
---|
| 2151 | + |
---|
| 2152 | + cLabel shadowShader = GetLabel("icons/shadericons/shadow.png", !Grafreed.NIMBUSLAF); |
---|
| 2153 | + shadowShader.setToolTipText("Shadow"); |
---|
| 2154 | + shadowShader.addMouseListener(new MouseAdapter() |
---|
| 2155 | + { |
---|
| 2156 | + public void mouseClicked(MouseEvent e) |
---|
| 2157 | + { |
---|
| 2158 | + diffuseField.setFloat(0.001); |
---|
| 2159 | + ambientField.setFloat(0.001); |
---|
| 2160 | + cameraField.setFloat(0.001); |
---|
| 2161 | + specularField.setFloat(0.001); |
---|
| 2162 | + fakedepthField.setFloat(0.001); |
---|
| 2163 | + opacityField.setFloat(0.6); |
---|
| 2164 | + |
---|
| 2165 | + materialtouched = true; |
---|
| 2166 | + applySelf(); |
---|
| 2167 | + } |
---|
| 2168 | + }); |
---|
| 2169 | + presetpanel.add(shadowShader); |
---|
| 2170 | + |
---|
| 2171 | + cGridBag panel = new cGridBag().setVertical(true); |
---|
| 2172 | + |
---|
| 2173 | + presetpanel.preferredWidth = 1; |
---|
| 2174 | + |
---|
| 2175 | + materialpanel.add(presetpanel); |
---|
| 2176 | + materialpanel.add(panel); |
---|
| 2177 | + |
---|
| 2178 | + panel.preferredWidth = 8; |
---|
| 2179 | + |
---|
| 2180 | + /* |
---|
1420 | 2181 | ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints); |
---|
1421 | 2182 | materialLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1422 | | - */ |
---|
| 2183 | + */ |
---|
1423 | 2184 | |
---|
1424 | 2185 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
1425 | 2186 | |
---|
.. | .. |
---|
1453 | 2214 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1454 | 2215 | |
---|
1455 | 2216 | cGridBag colorSection = new cGridBag().setVertical(true); |
---|
| 2217 | + |
---|
| 2218 | + cGridBag huepanel = new cGridBag(); |
---|
| 2219 | + cGridBag huelabel = new cGridBag(); |
---|
| 2220 | + skin = GetLabel("icons/hue.png", false); |
---|
| 2221 | + skin.fit = true; |
---|
| 2222 | + huelabel.add(skin); |
---|
| 2223 | + huelabel.preferredWidth = 20; |
---|
| 2224 | + huepanel.add(new cGridBag()); // Label |
---|
| 2225 | + huepanel.add(huelabel); // Field/slider |
---|
| 2226 | + |
---|
| 2227 | + huepanel.preferredHeight = 7; |
---|
| 2228 | + |
---|
| 2229 | + colorSection.add(huepanel); |
---|
1456 | 2230 | |
---|
1457 | 2231 | cGridBag color = new cGridBag(); |
---|
1458 | | - color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints); |
---|
1459 | | - colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1460 | | - color.add(colorField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 2232 | + |
---|
| 2233 | + color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints); |
---|
| 2234 | + colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2235 | + color.add(colorField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
| 2236 | + |
---|
1461 | 2237 | //colorField.preferredWidth = 200; |
---|
1462 | 2238 | colorSection.add(color); |
---|
1463 | 2239 | |
---|
1464 | 2240 | cGridBag modulation = new cGridBag(); |
---|
1465 | 2241 | modulation.add(modulationLabel = new JLabel("Saturation")); // , aConstraints); |
---|
1466 | 2242 | modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1467 | | - modulation.add(modulationField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 2243 | + modulation.add(saturationField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
1468 | 2244 | colorSection.add(modulation); |
---|
1469 | 2245 | |
---|
| 2246 | + cGridBag opacity = new cGridBag(); |
---|
| 2247 | + opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints); |
---|
| 2248 | + opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2249 | + opacity.add(opacityField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
| 2250 | + colorSection.add(opacity); |
---|
| 2251 | + |
---|
| 2252 | + colorSection.add(GetSeparator()); |
---|
| 2253 | + |
---|
1470 | 2254 | cGridBag texture = new cGridBag(); |
---|
1471 | 2255 | texture.add(textureLabel = new JLabel("Texture")); // , aConstraints); |
---|
1472 | 2256 | textureLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1473 | 2257 | texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1474 | 2258 | colorSection.add(texture); |
---|
1475 | 2259 | |
---|
1476 | | - cGridBag anisoU = new cGridBag(); |
---|
1477 | | - anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); |
---|
1478 | | - anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1479 | | - anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1480 | | - colorSection.add(anisoU); |
---|
1481 | | - |
---|
1482 | | - cGridBag anisoV = new cGridBag(); |
---|
1483 | | - anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); |
---|
1484 | | - anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1485 | | - anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1486 | | - colorSection.add(anisoV); |
---|
1487 | | - |
---|
1488 | | - cGridBag shadowbias = new cGridBag(); |
---|
1489 | | - shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); |
---|
1490 | | - shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1491 | | - shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1492 | | - colorSection.add(shadowbias); |
---|
1493 | | - |
---|
1494 | | - panel.add(new JSeparator()); |
---|
| 2260 | + panel.add(GetSeparator()); |
---|
1495 | 2261 | |
---|
1496 | 2262 | panel.add(colorSection); |
---|
1497 | 2263 | |
---|
.. | .. |
---|
1541 | 2307 | fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1542 | 2308 | diffuseSection.add(fakedepth); |
---|
1543 | 2309 | |
---|
1544 | | - panel.add(new JSeparator()); |
---|
| 2310 | + cGridBag shadowbias = new cGridBag(); |
---|
| 2311 | + shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); |
---|
| 2312 | + shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2313 | + shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 2314 | + diffuseSection.add(shadowbias); |
---|
| 2315 | + |
---|
| 2316 | + panel.add(GetSeparator()); |
---|
1545 | 2317 | |
---|
1546 | 2318 | panel.add(diffuseSection); |
---|
1547 | 2319 | |
---|
.. | .. |
---|
1591 | 2363 | // aConstraints.gridy += 1; |
---|
1592 | 2364 | // aConstraints.gridwidth = 1; |
---|
1593 | 2365 | |
---|
| 2366 | + cGridBag anisoU = new cGridBag(); |
---|
| 2367 | + anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); |
---|
| 2368 | + anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2369 | + anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 2370 | + specularSection.add(anisoU); |
---|
1594 | 2371 | |
---|
1595 | | - panel.add(new JSeparator()); |
---|
| 2372 | + cGridBag anisoV = new cGridBag(); |
---|
| 2373 | + anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); |
---|
| 2374 | + anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2375 | + anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 2376 | + specularSection.add(anisoV); |
---|
| 2377 | + |
---|
| 2378 | + |
---|
| 2379 | + panel.add(GetSeparator()); |
---|
1596 | 2380 | |
---|
1597 | 2381 | panel.add(specularSection); |
---|
1598 | 2382 | |
---|
1599 | 2383 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1600 | 2384 | |
---|
1601 | | - cGridBag globalSection = new cGridBag().setVertical(true); |
---|
| 2385 | + //cGridBag globalSection = new cGridBag().setVertical(true); |
---|
1602 | 2386 | |
---|
1603 | 2387 | cGridBag camera = new cGridBag(); |
---|
1604 | 2388 | camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints); |
---|
1605 | 2389 | cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1606 | 2390 | camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1607 | | - globalSection.add(camera); |
---|
| 2391 | + colorSection.add(camera); |
---|
1608 | 2392 | |
---|
1609 | 2393 | cGridBag ambient = new cGridBag(); |
---|
1610 | 2394 | ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints); |
---|
1611 | 2395 | ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1612 | 2396 | ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1613 | | - globalSection.add(ambient); |
---|
| 2397 | + colorSection.add(ambient); |
---|
1614 | 2398 | |
---|
1615 | 2399 | cGridBag backlit = new cGridBag(); |
---|
1616 | 2400 | backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints); |
---|
1617 | 2401 | backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1618 | 2402 | backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1619 | | - globalSection.add(backlit); |
---|
| 2403 | + colorSection.add(backlit); |
---|
1620 | 2404 | |
---|
1621 | | - cGridBag opacity = new cGridBag(); |
---|
1622 | | - opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints); |
---|
1623 | | - opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1624 | | - opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1625 | | - globalSection.add(opacity); |
---|
1626 | | - |
---|
1627 | | - panel.add(new JSeparator()); |
---|
| 2405 | + //panel.add(new JSeparator()); |
---|
1628 | 2406 | |
---|
1629 | | - panel.add(globalSection); |
---|
| 2407 | + //panel.add(globalSection); |
---|
1630 | 2408 | |
---|
1631 | 2409 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1632 | 2410 | |
---|
.. | .. |
---|
1668 | 2446 | opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints); |
---|
1669 | 2447 | textureSection.add(opacityPower); |
---|
1670 | 2448 | |
---|
1671 | | - panel.add(new JSeparator()); |
---|
| 2449 | + panel.add(GetSeparator()); |
---|
1672 | 2450 | |
---|
1673 | 2451 | panel.add(textureSection); |
---|
1674 | 2452 | |
---|
.. | .. |
---|
1733 | 2511 | // 3D models |
---|
1734 | 2512 | if (filename.endsWith(".3ds") || filename.endsWith(".3DS")) |
---|
1735 | 2513 | { |
---|
1736 | | - lastConverter = new com.jmex.model.converters.MaxToJme(); |
---|
1737 | | - LoadFile(filename, lastConverter); |
---|
| 2514 | + //lastConverter = new com.jmex.model.converters.MaxToJme(); |
---|
| 2515 | + //LoadFile(filename, lastConverter); |
---|
| 2516 | + LoadObjFile(filename); // New 3ds loader |
---|
1738 | 2517 | continue; |
---|
1739 | 2518 | } |
---|
1740 | 2519 | if (filename.endsWith(".dae") || filename.endsWith(".DAE")) |
---|
.. | .. |
---|
2072 | 2851 | |
---|
2073 | 2852 | void LoadObjFile(String fullname) |
---|
2074 | 2853 | { |
---|
2075 | | - /* |
---|
| 2854 | + System.out.println("Loading " + fullname); |
---|
| 2855 | + /**/ |
---|
2076 | 2856 | //lastFilename = fullname; |
---|
2077 | 2857 | if(loadObjThread == null) |
---|
2078 | 2858 | { |
---|
2079 | | - loadObjThread = new LoadOBJThread(); |
---|
2080 | | - loadObjThread.start(); |
---|
| 2859 | + loadObjThread = new LoadOBJThread(); |
---|
| 2860 | + loadObjThread.start(); |
---|
2081 | 2861 | } |
---|
2082 | 2862 | |
---|
2083 | 2863 | loadObjThread.add(fullname); |
---|
2084 | | - */ |
---|
| 2864 | + /**/ |
---|
2085 | 2865 | |
---|
2086 | | - System.out.println("Loading " + fullname); |
---|
2087 | | - makeSomething(new FileObject(fullname, true), true); |
---|
| 2866 | + //makeSomething(new FileObject(fullname, true), true); |
---|
2088 | 2867 | } |
---|
2089 | 2868 | |
---|
2090 | 2869 | void LoadGFDFile(String fullname) |
---|
.. | .. |
---|
2460 | 3239 | LA.matXRotate(((Object3D) group.get(group.size() - 1)).toParent, -Math.PI / 2); |
---|
2461 | 3240 | LA.matXRotate(((Object3D) group.get(group.size() - 1)).fromParent, Math.PI / 2); |
---|
2462 | 3241 | } |
---|
| 3242 | + |
---|
2463 | 3243 | //cJME.count++; |
---|
2464 | 3244 | //cJME.count %= 12; |
---|
2465 | 3245 | if (gc) |
---|
.. | .. |
---|
2643 | 3423 | } |
---|
2644 | 3424 | } |
---|
2645 | 3425 | } |
---|
| 3426 | + |
---|
2646 | 3427 | cFileSystemPane FSPane; |
---|
2647 | 3428 | |
---|
2648 | 3429 | void SetMaterial(cMaterial mat, Object3D.cVector2[] others) |
---|
.. | .. |
---|
2652 | 3433 | |
---|
2653 | 3434 | freezematerial = true; |
---|
2654 | 3435 | colorField.setFloat(mat.color); |
---|
2655 | | - modulationField.setFloat(mat.modulation); |
---|
| 3436 | + saturationField.setFloat(mat.modulation); |
---|
2656 | 3437 | metalnessField.setFloat(mat.metalness); |
---|
2657 | 3438 | diffuseField.setFloat(mat.diffuse); |
---|
2658 | 3439 | specularField.setFloat(mat.specular); |
---|
.. | .. |
---|
2696 | 3477 | } |
---|
2697 | 3478 | } |
---|
2698 | 3479 | } |
---|
| 3480 | + |
---|
2699 | 3481 | freezematerial = false; |
---|
2700 | 3482 | } |
---|
2701 | 3483 | |
---|
2702 | 3484 | void SetMaterial(Object3D object) |
---|
2703 | 3485 | { |
---|
| 3486 | + latestObject = object; |
---|
| 3487 | + |
---|
2704 | 3488 | cMaterial mat = object.material; |
---|
2705 | 3489 | |
---|
2706 | 3490 | if (mat == null) |
---|
.. | .. |
---|
2812 | 3596 | // } |
---|
2813 | 3597 | |
---|
2814 | 3598 | /**/ |
---|
2815 | | - if (deselect) |
---|
| 3599 | + if (deselect || child == null) |
---|
2816 | 3600 | { |
---|
2817 | 3601 | //group.deselectAll(); |
---|
2818 | 3602 | //freeze = true; |
---|
2819 | 3603 | GetTree().clearSelection(); |
---|
2820 | 3604 | //freeze = false; |
---|
| 3605 | + |
---|
| 3606 | + if (child == null) |
---|
| 3607 | + { |
---|
| 3608 | + return; |
---|
| 3609 | + } |
---|
2821 | 3610 | } |
---|
2822 | 3611 | |
---|
2823 | 3612 | //group.addSelectee(child); |
---|
.. | .. |
---|
2851 | 3640 | public void itemStateChanged(ItemEvent event) |
---|
2852 | 3641 | { |
---|
2853 | 3642 | // System.out.println("Propagate = " + propagate); |
---|
| 3643 | + if (event.getSource() == pinButton) |
---|
| 3644 | + { |
---|
| 3645 | + copy.pinned ^= true; |
---|
| 3646 | + if (!copy.pinned && !copy.editWindow.copy.selection.contains(copy)) |
---|
| 3647 | + { |
---|
| 3648 | + ((GroupEditor)copy.editWindow).listUI.remove(copy); |
---|
| 3649 | + copy.CloseUI(); |
---|
| 3650 | + //copy.editWindow.refreshContents(); |
---|
| 3651 | + } |
---|
| 3652 | + } |
---|
| 3653 | + else |
---|
2854 | 3654 | if (event.getSource() == propagateToggle) |
---|
2855 | 3655 | { |
---|
2856 | 3656 | propagate ^= true; |
---|
.. | .. |
---|
2886 | 3686 | cameraView.ToggleDL(); |
---|
2887 | 3687 | cameraView.repaint(); |
---|
2888 | 3688 | return; |
---|
2889 | | - } else if (event.getSource() == toggleTextureItem) |
---|
| 3689 | + } else if (event.getSource() == toggleTextureItem || event.getSource() == toggleTextureCB) |
---|
2890 | 3690 | { |
---|
2891 | 3691 | cameraView.ToggleTexture(); |
---|
2892 | 3692 | // june 2013 copy.HardTouch(); |
---|
.. | .. |
---|
2925 | 3725 | frame.validate(); |
---|
2926 | 3726 | |
---|
2927 | 3727 | return; |
---|
2928 | | - } else if (event.getSource() == toggleSwitchItem) |
---|
| 3728 | + } else if (event.getSource() == toggleSwitchItem || event.getSource() == toggleSwitchCB) |
---|
2929 | 3729 | { |
---|
2930 | | - cameraView.ToggleRandom(); |
---|
| 3730 | + cameraView.ToggleSwitch(); |
---|
2931 | 3731 | cameraView.repaint(); |
---|
2932 | 3732 | return; |
---|
2933 | 3733 | } else if (event.getSource() == toggleHandleItem) |
---|
.. | .. |
---|
2955 | 3755 | } else if (event.getSource() == liveCB) |
---|
2956 | 3756 | { |
---|
2957 | 3757 | copy.live ^= true; |
---|
| 3758 | + objEditor.refreshContents(true); // To show item colors |
---|
2958 | 3759 | return; |
---|
2959 | | - } else if (event.getSource() == selectCB) |
---|
| 3760 | + } else if (event.getSource() == selectableCB) |
---|
2960 | 3761 | { |
---|
2961 | 3762 | copy.dontselect ^= true; |
---|
2962 | 3763 | return; |
---|
.. | .. |
---|
2964 | 3765 | { |
---|
2965 | 3766 | copy.hide ^= true; |
---|
2966 | 3767 | copy.Touch(); // display list issue |
---|
2967 | | - objEditor.refreshContents(); |
---|
| 3768 | + objEditor.refreshContents(true); // To show item colors |
---|
2968 | 3769 | return; |
---|
2969 | 3770 | } else if (event.getSource() == link2masterCB) |
---|
2970 | 3771 | { |
---|
.. | .. |
---|
3141 | 3942 | { |
---|
3142 | 3943 | Close(); |
---|
3143 | 3944 | //return true; |
---|
3144 | | - } else if (source == loadItem) |
---|
| 3945 | + } else if (source == openItem) |
---|
3145 | 3946 | { |
---|
3146 | | - load(); |
---|
| 3947 | + Open(); |
---|
3147 | 3948 | //return true; |
---|
3148 | 3949 | } else if (source == newItem) |
---|
3149 | 3950 | { |
---|
.. | .. |
---|
3168 | 3969 | { |
---|
3169 | 3970 | generatePOV(); |
---|
3170 | 3971 | //return true; |
---|
| 3972 | + } else if (event.getSource() == archiveItem) |
---|
| 3973 | + { |
---|
| 3974 | + cTools.Archive(frame); |
---|
| 3975 | + return; |
---|
3171 | 3976 | } else if (source == zBufferItem) |
---|
3172 | 3977 | { |
---|
3173 | 3978 | try |
---|
.. | .. |
---|
3214 | 4019 | objEditor.refreshContents(); |
---|
3215 | 4020 | } |
---|
3216 | 4021 | |
---|
| 4022 | + static public byte[] Compress(Object3D o) |
---|
| 4023 | + { |
---|
| 4024 | + // Slower to actually compress. |
---|
| 4025 | + try |
---|
| 4026 | + { |
---|
| 4027 | + ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
| 4028 | +// java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos); |
---|
| 4029 | + ObjectOutputStream out = new ObjectOutputStream(baos); //zstream); |
---|
| 4030 | + |
---|
| 4031 | + Object3D parent = o.parent; |
---|
| 4032 | + o.parent = null; |
---|
| 4033 | + |
---|
| 4034 | + out.writeObject(o); |
---|
| 4035 | + |
---|
| 4036 | + o.parent = parent; |
---|
| 4037 | + |
---|
| 4038 | + out.flush(); |
---|
| 4039 | + |
---|
| 4040 | + baos //zstream |
---|
| 4041 | + .close(); |
---|
| 4042 | + out.close(); |
---|
| 4043 | + |
---|
| 4044 | + byte[] bytes = baos.toByteArray(); |
---|
| 4045 | + |
---|
| 4046 | + System.out.println("save #bytes = " + bytes.length); |
---|
| 4047 | + return bytes; |
---|
| 4048 | + } catch (Exception e) |
---|
| 4049 | + { |
---|
| 4050 | + System.err.println(e); |
---|
| 4051 | + return null; |
---|
| 4052 | + } |
---|
| 4053 | + } |
---|
| 4054 | + |
---|
| 4055 | + static public Object Uncompress(byte[] bytes) |
---|
| 4056 | + { |
---|
| 4057 | + System.out.println("restore #bytes = " + bytes.length); |
---|
| 4058 | + try |
---|
| 4059 | + { |
---|
| 4060 | + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
| 4061 | + //java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais); |
---|
| 4062 | + ObjectInputStream in = new ObjectInputStream(bais); // istream); |
---|
| 4063 | + Object obj = in.readObject(); |
---|
| 4064 | + |
---|
| 4065 | + bais //istream |
---|
| 4066 | + .close(); |
---|
| 4067 | + in.close(); |
---|
| 4068 | + |
---|
| 4069 | + return obj; |
---|
| 4070 | + } catch (Exception e) |
---|
| 4071 | + { |
---|
| 4072 | + System.err.println(e); |
---|
| 4073 | + return null; |
---|
| 4074 | + } |
---|
| 4075 | + } |
---|
| 4076 | + |
---|
3217 | 4077 | static public Object clone(Object o) |
---|
3218 | 4078 | { |
---|
3219 | 4079 | try |
---|
.. | .. |
---|
3222 | 4082 | ObjectOutputStream out = new ObjectOutputStream(baos); |
---|
3223 | 4083 | |
---|
3224 | 4084 | out.writeObject(o); |
---|
| 4085 | + |
---|
| 4086 | + out.flush(); |
---|
| 4087 | + out.close(); |
---|
| 4088 | + |
---|
| 4089 | + byte[] bytes = baos.toByteArray(); |
---|
| 4090 | + |
---|
| 4091 | + System.out.println("clone = " + bytes.length); |
---|
3225 | 4092 | |
---|
3226 | | - ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); |
---|
| 4093 | + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
3227 | 4094 | ObjectInputStream in = new ObjectInputStream(bais); |
---|
3228 | 4095 | Object obj = in.readObject(); |
---|
3229 | 4096 | in.close(); |
---|
3230 | | - out.close(); |
---|
| 4097 | + |
---|
3231 | 4098 | return obj; |
---|
3232 | 4099 | } catch (Exception e) |
---|
3233 | 4100 | { |
---|
.. | .. |
---|
3242 | 4109 | for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
3243 | 4110 | { |
---|
3244 | 4111 | ab = (cRadio)e.nextElement(); |
---|
3245 | | - if(ab.GetObject() == client) |
---|
| 4112 | + if(ab.GetObject() == copy) |
---|
3246 | 4113 | { |
---|
3247 | 4114 | return ab; |
---|
3248 | 4115 | } |
---|
.. | .. |
---|
3251 | 4118 | return null; |
---|
3252 | 4119 | } |
---|
3253 | 4120 | |
---|
| 4121 | + |
---|
3254 | 4122 | public void Save() |
---|
3255 | 4123 | { |
---|
| 4124 | + //Save(true); |
---|
| 4125 | + Replace(); |
---|
| 4126 | + SetUndoStates(); |
---|
| 4127 | + } |
---|
| 4128 | + |
---|
| 4129 | + private boolean Equal(byte[] compress, byte[] name) |
---|
| 4130 | + { |
---|
| 4131 | + if (compress.length != name.length) |
---|
| 4132 | + { |
---|
| 4133 | + return false; |
---|
| 4134 | + } |
---|
| 4135 | + |
---|
| 4136 | + for (int i=compress.length; --i>=0;) |
---|
| 4137 | + { |
---|
| 4138 | + if (compress[i] != name[i]) |
---|
| 4139 | + return false; |
---|
| 4140 | + } |
---|
| 4141 | + |
---|
| 4142 | + return true; |
---|
| 4143 | + } |
---|
| 4144 | + |
---|
| 4145 | + java.util.Hashtable<java.util.UUID, Object3D> versiontable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
| 4146 | + |
---|
| 4147 | + void DeleteVersion() |
---|
| 4148 | + { |
---|
| 4149 | + for (int i = copy.versionindex; i < copy.versionlist.length-1; i++) |
---|
| 4150 | + { |
---|
| 4151 | + copy.versionlist[i] = copy.versionlist[i+1]; |
---|
| 4152 | + } |
---|
| 4153 | + |
---|
| 4154 | + CopyChanged(); |
---|
| 4155 | + |
---|
| 4156 | + SetUndoStates(); |
---|
| 4157 | + } |
---|
| 4158 | + |
---|
| 4159 | + public boolean Save(boolean user) |
---|
| 4160 | + { |
---|
| 4161 | + System.err.println("Save"); |
---|
| 4162 | + Replace(); |
---|
| 4163 | + |
---|
3256 | 4164 | cRadio tab = GetCurrentTab(); |
---|
3257 | 4165 | |
---|
| 4166 | + Object3D compress = Duplicate(copy); // Saved version. No need for "Replace"? |
---|
| 4167 | + |
---|
| 4168 | + boolean thesame = false; |
---|
| 4169 | + |
---|
| 4170 | +// if (copy.versionindex > 0 && copy.versions[copy.versionindex-1] != null && Equal(compress, copy.versions[copy.versionindex-1])) |
---|
| 4171 | +// { |
---|
| 4172 | +// thesame = true; |
---|
| 4173 | +// } |
---|
| 4174 | + |
---|
3258 | 4175 | //EditorFrame.m_MainFrame.requestFocusInWindow(); |
---|
3259 | | - tab.graphs[tab.undoindex++] = (Object3D)clone(copy); |
---|
3260 | | - |
---|
3261 | | - for (int i = tab.undoindex; i < tab.graphs.length; i++) |
---|
| 4176 | + if (!thesame) |
---|
3262 | 4177 | { |
---|
3263 | | - tab.graphs[i] = null; |
---|
| 4178 | + for (int i = copy.versionlist.length; --i > copy.versionindex+1;) |
---|
| 4179 | + { |
---|
| 4180 | + copy.versionlist[i] = copy.versionlist[i-1]; |
---|
| 4181 | + } |
---|
| 4182 | + |
---|
| 4183 | + //tab.user[tab.versionindex] = user; |
---|
| 4184 | + //boolean increment = true; // tab.graphs[tab.versionindex] == null; |
---|
| 4185 | + |
---|
| 4186 | + copy.versionlist[++copy.versionindex] = compress; |
---|
| 4187 | + |
---|
| 4188 | + // if (increment) |
---|
| 4189 | + // tab.versionindex++; |
---|
3264 | 4190 | } |
---|
3265 | 4191 | |
---|
| 4192 | + //copy.RestoreBigData(versiontable); |
---|
| 4193 | + |
---|
| 4194 | + //assert(hashtable.isEmpty()); |
---|
| 4195 | + |
---|
| 4196 | +// for (int i = copy.versionindex+1; i < copy.versionlist.length; i++) |
---|
| 4197 | +// { |
---|
| 4198 | +// //tab.user[i] = false; |
---|
| 4199 | +// copy.versionlist[i] = null; |
---|
| 4200 | +// } |
---|
| 4201 | + |
---|
| 4202 | + SetUndoStates(); |
---|
| 4203 | + |
---|
3266 | 4204 | // test save |
---|
3267 | 4205 | if (false) |
---|
3268 | 4206 | { |
---|
3269 | 4207 | try |
---|
3270 | 4208 | { |
---|
3271 | | - FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex); |
---|
| 4209 | + FileOutputStream ostream = new FileOutputStream("save" + copy.versionindex); |
---|
3272 | 4210 | ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
3273 | 4211 | |
---|
3274 | 4212 | p.writeObject(copy); |
---|
.. | .. |
---|
3281 | 4219 | e.printStackTrace(); |
---|
3282 | 4220 | } |
---|
3283 | 4221 | } |
---|
| 4222 | + |
---|
| 4223 | + return !thesame; |
---|
| 4224 | + } |
---|
| 4225 | + |
---|
| 4226 | + boolean flashIt = true; |
---|
| 4227 | + |
---|
| 4228 | + void RefreshSelection() |
---|
| 4229 | + { |
---|
| 4230 | + Object3D selection = new Object3D(); |
---|
| 4231 | + |
---|
| 4232 | + for (int i = 0; i < copy.selection.size(); i++) |
---|
| 4233 | + { |
---|
| 4234 | + Object3D elem = copy.selection.elementAt(i); |
---|
| 4235 | + |
---|
| 4236 | + Object3D obj = copy.GetObject(elem.GetUUID()); |
---|
| 4237 | + |
---|
| 4238 | + if (obj == null) |
---|
| 4239 | + { |
---|
| 4240 | + copy.selection.remove(i--); |
---|
| 4241 | + } |
---|
| 4242 | + else |
---|
| 4243 | + { |
---|
| 4244 | + selection.add(obj); |
---|
| 4245 | + copy.selection.setElementAt(obj, i); |
---|
| 4246 | + } |
---|
| 4247 | + } |
---|
| 4248 | + |
---|
| 4249 | + flashIt = false; |
---|
| 4250 | + GetTree().clearSelection(); |
---|
| 4251 | + for (int i = 0; i < selection.size(); i++) |
---|
| 4252 | + GetTree().addSelectionPath(selection.elementAt(i).GetTreePath().GetTreePath()); |
---|
| 4253 | + flashIt = true; |
---|
| 4254 | + |
---|
| 4255 | + //refreshContents(false); |
---|
3284 | 4256 | } |
---|
3285 | 4257 | |
---|
3286 | | - void CopyChanged(Object3D obj) |
---|
| 4258 | + void CopyChanged() |
---|
3287 | 4259 | { |
---|
| 4260 | + Object3D obj = (Object3D)Grafreed.clone(copy.versionlist[copy.versionindex]); |
---|
| 4261 | + |
---|
| 4262 | + SetUndoStates(); |
---|
| 4263 | + |
---|
| 4264 | + boolean temp = CameraPane.SWITCH; |
---|
| 4265 | + CameraPane.SWITCH = false; |
---|
| 4266 | + |
---|
| 4267 | + copy.ExtractBigData(versiontable); |
---|
| 4268 | + |
---|
3288 | 4269 | copy.clear(); |
---|
3289 | 4270 | |
---|
| 4271 | + copy.skyboxname = obj.skyboxname; |
---|
| 4272 | + copy.skyboxext = obj.skyboxext; |
---|
| 4273 | + |
---|
3290 | 4274 | for (int i=0; i<obj.Size(); i++) |
---|
3291 | 4275 | { |
---|
3292 | 4276 | copy.add(obj.get(i)); |
---|
3293 | 4277 | } |
---|
| 4278 | + |
---|
| 4279 | + copy.RestoreBigData(versiontable); |
---|
| 4280 | + |
---|
| 4281 | + CameraPane.SWITCH = temp; |
---|
| 4282 | + |
---|
| 4283 | + RefreshSelection(); |
---|
| 4284 | + //assert(hashtable.isEmpty()); |
---|
3294 | 4285 | |
---|
3295 | 4286 | copy.Touch(); |
---|
3296 | 4287 | |
---|
.. | .. |
---|
3310 | 4301 | } |
---|
3311 | 4302 | } |
---|
3312 | 4303 | |
---|
3313 | | - refreshContents(); |
---|
| 4304 | + refreshContents(true); |
---|
3314 | 4305 | } |
---|
3315 | 4306 | |
---|
3316 | | - public void Undo() |
---|
| 4307 | + cButton previousVersionButton; |
---|
| 4308 | + cButton restoreButton; |
---|
| 4309 | + cButton replaceButton; |
---|
| 4310 | + cButton nextVersionButton; |
---|
| 4311 | + cButton saveVersionButton; |
---|
| 4312 | + cButton deleteVersionButton; |
---|
| 4313 | + |
---|
| 4314 | + boolean muteSlider; |
---|
| 4315 | + |
---|
| 4316 | + int VersionCount() |
---|
| 4317 | + { |
---|
| 4318 | + int count = 0; |
---|
| 4319 | + |
---|
| 4320 | + for (int i = copy.versionlist.length; --i >= 0;) |
---|
| 4321 | + { |
---|
| 4322 | + if (copy.versionlist[i] != null) |
---|
| 4323 | + count++; |
---|
| 4324 | + } |
---|
| 4325 | + |
---|
| 4326 | + return count; |
---|
| 4327 | + } |
---|
| 4328 | + |
---|
| 4329 | + void SetUndoStates() |
---|
3317 | 4330 | { |
---|
3318 | 4331 | cRadio tab = GetCurrentTab(); |
---|
3319 | 4332 | |
---|
3320 | | - if (tab.undoindex == 0) |
---|
| 4333 | + restoreButton.setEnabled(true); // copy.versionindex != -1); |
---|
| 4334 | + replaceButton.setEnabled(true); // copy.versionindex != -1); |
---|
| 4335 | + |
---|
| 4336 | + previousVersionButton.setEnabled(copy.versionindex > 0); |
---|
| 4337 | + nextVersionButton.setEnabled(copy.versionlist[copy.versionindex + 1] != null); |
---|
| 4338 | + |
---|
| 4339 | + deleteVersionButton.setEnabled(//copy.versionindex > 0 && |
---|
| 4340 | + copy.versionlist[copy.versionindex + 1] != null); |
---|
| 4341 | + |
---|
| 4342 | + muteSlider = true; |
---|
| 4343 | + versionSlider.setMaximum(VersionCount() - 1); |
---|
| 4344 | + versionSlider.setInteger(copy.versionindex); |
---|
| 4345 | + muteSlider = false; |
---|
| 4346 | + } |
---|
| 4347 | + |
---|
| 4348 | + public boolean PreviousVersion() |
---|
| 4349 | + { |
---|
| 4350 | + // Option? |
---|
| 4351 | + Replace(); |
---|
| 4352 | + |
---|
| 4353 | + System.err.println("Undo"); |
---|
| 4354 | + |
---|
| 4355 | + cRadio tab = GetCurrentTab(); |
---|
| 4356 | + |
---|
| 4357 | + if (copy.versionindex == 0) |
---|
3321 | 4358 | { |
---|
3322 | 4359 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
3323 | | - return; |
---|
| 4360 | + return false; |
---|
3324 | 4361 | } |
---|
3325 | 4362 | |
---|
3326 | | - if (tab.graphs[tab.undoindex] == null) |
---|
3327 | | - { |
---|
3328 | | - Save(); |
---|
3329 | | - tab.undoindex -= 1; |
---|
3330 | | - } |
---|
| 4363 | +// if (tab.graphs[tab.versionindex] == null) // || !tab.user[tab.versionindex]) |
---|
| 4364 | +// { |
---|
| 4365 | +// if (Save(false)) |
---|
| 4366 | +// tab.versionindex -= 1; |
---|
| 4367 | +// else |
---|
| 4368 | +// { |
---|
| 4369 | +// if (tab.versionindex <= 0) |
---|
| 4370 | +// return false; |
---|
| 4371 | +// else |
---|
| 4372 | +// tab.versionindex -= 1; |
---|
| 4373 | +// } |
---|
| 4374 | +// } |
---|
3331 | 4375 | |
---|
3332 | | - tab.undoindex -= 1; |
---|
| 4376 | + copy.versionindex -= 1; |
---|
3333 | 4377 | |
---|
3334 | | - CopyChanged(tab.graphs[tab.undoindex]); |
---|
| 4378 | + CopyChanged(); |
---|
| 4379 | + |
---|
| 4380 | + return true; |
---|
3335 | 4381 | } |
---|
3336 | 4382 | |
---|
3337 | | - public void Redo() |
---|
| 4383 | + public boolean Restore() |
---|
3338 | 4384 | { |
---|
| 4385 | + System.err.println("Restore"); |
---|
| 4386 | + |
---|
3339 | 4387 | cRadio tab = GetCurrentTab(); |
---|
3340 | 4388 | |
---|
3341 | | - if (tab.graphs[tab.undoindex + 1] == null) |
---|
| 4389 | + if (copy.versionindex == -1 || copy.versionlist[copy.versionindex] == null) |
---|
| 4390 | + { |
---|
| 4391 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 4392 | + return false; |
---|
| 4393 | + } |
---|
| 4394 | + |
---|
| 4395 | + //CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex])); |
---|
| 4396 | + CopyChanged(); |
---|
| 4397 | + |
---|
| 4398 | + return true; |
---|
| 4399 | + } |
---|
| 4400 | + |
---|
| 4401 | + public boolean Replace() |
---|
| 4402 | + { |
---|
| 4403 | + System.err.println("Replace"); |
---|
| 4404 | + |
---|
| 4405 | + cRadio tab = GetCurrentTab(); |
---|
| 4406 | + |
---|
| 4407 | + if (copy.versionindex == -1 || copy.versionlist[copy.versionindex] == null) |
---|
| 4408 | + { |
---|
| 4409 | + // No version yet. OK. java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 4410 | + return false; |
---|
| 4411 | + } |
---|
| 4412 | + |
---|
| 4413 | + copy.versionlist[copy.versionindex] = Duplicate(copy); |
---|
| 4414 | + |
---|
| 4415 | + return true; |
---|
| 4416 | + } |
---|
| 4417 | + |
---|
| 4418 | + public void NextVersion() |
---|
| 4419 | + { |
---|
| 4420 | + // Option? |
---|
| 4421 | + Replace(); |
---|
| 4422 | + |
---|
| 4423 | + cRadio tab = GetCurrentTab(); |
---|
| 4424 | + |
---|
| 4425 | + if (copy.versionlist[copy.versionindex + 1] == null) |
---|
3342 | 4426 | { |
---|
3343 | 4427 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
3344 | 4428 | return; |
---|
3345 | 4429 | } |
---|
3346 | 4430 | |
---|
3347 | | - tab.undoindex += 1; |
---|
| 4431 | + copy.versionindex += 1; |
---|
3348 | 4432 | |
---|
3349 | | - CopyChanged(tab.graphs[tab.undoindex]); |
---|
| 4433 | + CopyChanged(); |
---|
| 4434 | + |
---|
| 4435 | + //if (!tab.user[tab.versionindex]) |
---|
| 4436 | + // tab.graphs[tab.versionindex] = null; |
---|
3350 | 4437 | } |
---|
3351 | 4438 | |
---|
3352 | 4439 | void ImportGFD() |
---|
.. | .. |
---|
3498 | 4585 | assert false; |
---|
3499 | 4586 | } |
---|
3500 | 4587 | |
---|
3501 | | - void EditSelection() |
---|
| 4588 | + void EditSelection(boolean newWindow) |
---|
3502 | 4589 | { |
---|
3503 | 4590 | } |
---|
3504 | 4591 | |
---|
.. | .. |
---|
3557 | 4644 | //copy.material = new cMaterial(copy.GetMaterial()); |
---|
3558 | 4645 | |
---|
3559 | 4646 | current.color = (float) colorField.getFloat(); |
---|
3560 | | - current.modulation = (float) modulationField.getFloat(); |
---|
| 4647 | + current.modulation = (float) saturationField.getFloat(); |
---|
3561 | 4648 | current.metalness = (float) metalnessField.getFloat(); |
---|
3562 | 4649 | current.diffuse = (float) diffuseField.getFloat(); |
---|
3563 | 4650 | current.specular = (float) specularField.getFloat(); |
---|
.. | .. |
---|
3590 | 4677 | cMaterial mat = copy.material; |
---|
3591 | 4678 | |
---|
3592 | 4679 | colorField.SetToolTipValue((mat.color)); |
---|
3593 | | - modulationField.SetToolTipValue((mat.modulation)); |
---|
| 4680 | + saturationField.SetToolTipValue((mat.modulation)); |
---|
3594 | 4681 | metalnessField.SetToolTipValue((mat.metalness)); |
---|
3595 | 4682 | diffuseField.SetToolTipValue((mat.diffuse)); |
---|
3596 | 4683 | specularField.SetToolTipValue((mat.specular)); |
---|
.. | .. |
---|
3642 | 4729 | //copy.Touch(); |
---|
3643 | 4730 | } |
---|
3644 | 4731 | |
---|
| 4732 | + cNumberSlider versionSlider; |
---|
| 4733 | + |
---|
3645 | 4734 | public void stateChanged(ChangeEvent e) |
---|
3646 | 4735 | { |
---|
3647 | 4736 | // assert(false); |
---|
| 4737 | + if (e.getSource() == versionSlider) |
---|
| 4738 | + { |
---|
| 4739 | + if (muteSlider) |
---|
| 4740 | + return; |
---|
| 4741 | + |
---|
| 4742 | + int version = versionSlider.getInteger(); |
---|
| 4743 | + |
---|
| 4744 | + if (copy.versionlist[version] != null) |
---|
| 4745 | + { |
---|
| 4746 | + copy.versionindex = version; |
---|
| 4747 | + CopyChanged(); |
---|
| 4748 | + } |
---|
| 4749 | + |
---|
| 4750 | + return; |
---|
| 4751 | + } |
---|
3648 | 4752 | |
---|
3649 | 4753 | if (freezematerial) |
---|
3650 | 4754 | { |
---|
.. | .. |
---|
3680 | 4784 | { |
---|
3681 | 4785 | //System.out.println("stateChanged = " + this); |
---|
3682 | 4786 | materialtouched = true; |
---|
| 4787 | + |
---|
| 4788 | + if (Globals.AUTOSATURATE && e.getSource() == colorField && saturationField.getFloat() == 0.001) |
---|
| 4789 | + { |
---|
| 4790 | + saturationField.setFloat(1); |
---|
| 4791 | + } |
---|
| 4792 | + |
---|
3683 | 4793 | applySelf(); |
---|
3684 | 4794 | //System.out.println("this = " + this); |
---|
3685 | 4795 | //System.out.println("PARENT = " + parent); |
---|
.. | .. |
---|
3979 | 5089 | { |
---|
3980 | 5090 | if (GetTree() != null) |
---|
3981 | 5091 | { |
---|
| 5092 | + GetTree().revalidate(); |
---|
3982 | 5093 | GetTree().repaint(); |
---|
3983 | 5094 | } |
---|
3984 | 5095 | |
---|
.. | .. |
---|
3987 | 5098 | ctrlPanel.validate(); // ? new |
---|
3988 | 5099 | ctrlPanel.repaint(); |
---|
3989 | 5100 | } |
---|
| 5101 | + |
---|
| 5102 | + if (previousVersionButton != null && copy.versionlist != null) |
---|
| 5103 | + SetUndoStates(); |
---|
3990 | 5104 | } |
---|
3991 | 5105 | |
---|
3992 | 5106 | static TweenManager tweenManager = new TweenManager(); |
---|
3993 | 5107 | |
---|
3994 | 5108 | void makeSomething(Object3D thing, boolean resetmodel) // deselect) |
---|
3995 | 5109 | { |
---|
3996 | | - Save(); |
---|
| 5110 | + if (Globals.REPLACEONMAKE) // && resetmodel) |
---|
| 5111 | + Save(); |
---|
3997 | 5112 | //Tween.set(thing, 0).target(1).start(tweenManager); |
---|
3998 | 5113 | //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager); |
---|
3999 | 5114 | // if (thing instanceof GenericJointDemo) |
---|
.. | .. |
---|
4080 | 5195 | { |
---|
4081 | 5196 | ResetModel(); |
---|
4082 | 5197 | Select(thing.GetTreePath(), true, false); // unselect... false); |
---|
| 5198 | + |
---|
| 5199 | + if (thing.Size() == 0) |
---|
| 5200 | + { |
---|
| 5201 | + //EditSelection(false); |
---|
| 5202 | + } |
---|
| 5203 | + |
---|
4083 | 5204 | refreshContents(); |
---|
4084 | 5205 | } |
---|
4085 | 5206 | |
---|
.. | .. |
---|
4217 | 5338 | |
---|
4218 | 5339 | try |
---|
4219 | 5340 | { |
---|
| 5341 | + // Try compressed version first. |
---|
4220 | 5342 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
4221 | 5343 | java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream); |
---|
4222 | 5344 | java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream); |
---|
.. | .. |
---|
4227 | 5349 | readobj.ResetDisplayList(); |
---|
4228 | 5350 | } catch (Exception e) |
---|
4229 | 5351 | { |
---|
4230 | | - //e.printStackTrace(); |
---|
| 5352 | + if (!e.toString().contains("GZIP")) |
---|
| 5353 | + e.printStackTrace(); |
---|
| 5354 | + |
---|
4231 | 5355 | try |
---|
4232 | 5356 | { |
---|
4233 | 5357 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
.. | .. |
---|
4286 | 5410 | |
---|
4287 | 5411 | void LoadIt(Object obj) |
---|
4288 | 5412 | { |
---|
| 5413 | + if (obj == null) |
---|
| 5414 | + { |
---|
| 5415 | + // Invalid file |
---|
| 5416 | + return; |
---|
| 5417 | + } |
---|
| 5418 | + |
---|
4289 | 5419 | System.out.println("Loaded " + obj); |
---|
4290 | 5420 | //new Exception().printStackTrace(); |
---|
4291 | 5421 | Object3D readobj = (Object3D) obj; |
---|
.. | .. |
---|
4295 | 5425 | |
---|
4296 | 5426 | if (readobj != null) |
---|
4297 | 5427 | { |
---|
| 5428 | + //if (Globals.SAVEONMAKE) // A new object cannot share meshes |
---|
| 5429 | + // Save(); |
---|
4298 | 5430 | try |
---|
4299 | 5431 | { |
---|
4300 | 5432 | //readobj.deepCopySelf(copy); |
---|
4301 | 5433 | copy.clear(); // june 2014 |
---|
| 5434 | + copy.skyboxname = readobj.skyboxname; |
---|
| 5435 | + copy.skyboxext = readobj.skyboxext; |
---|
4302 | 5436 | for (int i = 0; i < readobj.size(); i++) |
---|
4303 | 5437 | { |
---|
4304 | 5438 | Object3D child = readobj.get(i); // reserve(i); |
---|
.. | .. |
---|
4339 | 5473 | } |
---|
4340 | 5474 | } catch (ClassCastException e) |
---|
4341 | 5475 | { |
---|
| 5476 | + e.printStackTrace(); |
---|
4342 | 5477 | assert (false); |
---|
4343 | 5478 | Composite c = (Composite) copy; |
---|
4344 | 5479 | c.children.clear(); |
---|
.. | .. |
---|
4349 | 5484 | c.addChild(csg); |
---|
4350 | 5485 | } |
---|
4351 | 5486 | |
---|
| 5487 | + copy.versionlist = readobj.versionlist; |
---|
| 5488 | + copy.versionindex = readobj.versionindex; |
---|
| 5489 | + |
---|
| 5490 | + if (copy.versionlist == null) |
---|
| 5491 | + { |
---|
| 5492 | + copy.versionlist = new Object3D[100]; |
---|
| 5493 | + copy.versionindex = -1; |
---|
| 5494 | + } |
---|
| 5495 | + |
---|
| 5496 | + //? SetUndoStates(); |
---|
| 5497 | + |
---|
4352 | 5498 | ResetModel(); |
---|
4353 | 5499 | copy.HardTouch(); // recompile? |
---|
4354 | 5500 | refreshContents(); |
---|
4355 | 5501 | } |
---|
4356 | 5502 | } |
---|
4357 | 5503 | |
---|
4358 | | - void load() // throws ClassNotFoundException |
---|
| 5504 | + void Open() // throws ClassNotFoundException |
---|
4359 | 5505 | { |
---|
4360 | 5506 | if (Grafreed.standAlone) |
---|
4361 | 5507 | { |
---|
4362 | | - FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); |
---|
| 5508 | + FileDialog browser = new FileDialog(frame, "Open", FileDialog.LOAD); |
---|
4363 | 5509 | browser.show(); |
---|
4364 | 5510 | String filename = browser.getFile(); |
---|
4365 | 5511 | if (filename != null && filename.length() > 0) |
---|
.. | .. |
---|
4458 | 5604 | //ps.print(buffer.toString()); |
---|
4459 | 5605 | } catch (IOException e) |
---|
4460 | 5606 | { |
---|
| 5607 | + e.printStackTrace(); |
---|
4461 | 5608 | } |
---|
4462 | 5609 | } |
---|
4463 | 5610 | |
---|
.. | .. |
---|
4472 | 5619 | String filename = browser.getFile(); |
---|
4473 | 5620 | if (filename != null && filename.length() > 0) |
---|
4474 | 5621 | { |
---|
| 5622 | + if (!filename.endsWith(".gfd")) |
---|
| 5623 | + filename += ".gfd"; |
---|
4475 | 5624 | lastname = browser.getDirectory() + filename; |
---|
4476 | 5625 | save(); |
---|
4477 | 5626 | } |
---|
.. | .. |
---|
4638 | 5787 | MenuBar menuBar; |
---|
4639 | 5788 | Menu fileMenu; |
---|
4640 | 5789 | MenuItem newItem; |
---|
4641 | | - MenuItem loadItem; |
---|
| 5790 | + MenuItem openItem; |
---|
4642 | 5791 | MenuItem saveItem; |
---|
4643 | 5792 | MenuItem saveAsItem; |
---|
4644 | 5793 | MenuItem exportAsItem; |
---|
.. | .. |
---|
4661 | 5810 | CheckboxMenuItem toggleSwitchItem; |
---|
4662 | 5811 | CheckboxMenuItem toggleRootItem; |
---|
4663 | 5812 | CheckboxMenuItem animationItem; |
---|
| 5813 | + MenuItem archiveItem; |
---|
4664 | 5814 | CheckboxMenuItem toggleHandleItem; |
---|
4665 | 5815 | CheckboxMenuItem togglePaintItem; |
---|
4666 | 5816 | JSplitPane mainPanel; |
---|
4667 | 5817 | JScrollPane scrollpane; |
---|
| 5818 | + |
---|
4668 | 5819 | JPanel toolbarPanel; |
---|
| 5820 | + |
---|
4669 | 5821 | cGridBag treePanel; |
---|
| 5822 | + |
---|
4670 | 5823 | JPanel radioPanel; |
---|
4671 | 5824 | ButtonGroup buttonGroup; |
---|
4672 | | - cGridBag ctrlPanel; |
---|
| 5825 | + |
---|
| 5826 | + cGridBag toolboxPanel; |
---|
| 5827 | + cGridBag skyboxPanel; |
---|
4673 | 5828 | cGridBag materialPanel; |
---|
| 5829 | + cGridBag ctrlPanel; |
---|
| 5830 | + |
---|
4674 | 5831 | JScrollPane infoPanel; |
---|
| 5832 | + |
---|
4675 | 5833 | cGridBag optionsPanel; |
---|
| 5834 | + |
---|
4676 | 5835 | JTabbedPane objectPanel; |
---|
| 5836 | + boolean materialFlushed; |
---|
| 5837 | + Object3D latestObject; |
---|
| 5838 | + |
---|
4677 | 5839 | cGridBag XYZPanel; |
---|
| 5840 | + |
---|
4678 | 5841 | JSplitPane gridPanel; |
---|
4679 | 5842 | JSplitPane bigPanel; |
---|
| 5843 | + |
---|
4680 | 5844 | cGridBag bigThree; |
---|
4681 | 5845 | cGridBag scenePanel; |
---|
4682 | 5846 | cGridBag centralPanel; |
---|
.. | .. |
---|
4734 | 5898 | JLabel colorLabel; |
---|
4735 | 5899 | cNumberSlider colorField; |
---|
4736 | 5900 | JLabel modulationLabel; |
---|
4737 | | - cNumberSlider modulationField; |
---|
| 5901 | + cNumberSlider saturationField; |
---|
4738 | 5902 | JLabel metalnessLabel; |
---|
4739 | 5903 | cNumberSlider metalnessField; |
---|
4740 | 5904 | JLabel diffuseLabel; |
---|
.. | .. |
---|
4765 | 5929 | cNumberSlider anisoField; |
---|
4766 | 5930 | JLabel anisoVLabel; |
---|
4767 | 5931 | cNumberSlider anisoVField; |
---|
| 5932 | + |
---|
4768 | 5933 | JLabel cameraLabel; |
---|
4769 | 5934 | cNumberSlider cameraField; |
---|
4770 | 5935 | JLabel selfshadowLabel; |
---|
.. | .. |
---|
4779 | 5944 | cNumberSlider fakedepthField; |
---|
4780 | 5945 | JLabel shadowbiasLabel; |
---|
4781 | 5946 | cNumberSlider shadowbiasField; |
---|
| 5947 | + |
---|
4782 | 5948 | JLabel bumpLabel; |
---|
4783 | 5949 | cNumberSlider bumpField; |
---|
4784 | 5950 | JLabel noiseLabel; |
---|
.. | .. |
---|
4791 | 5957 | cNumberSlider fogField; |
---|
4792 | 5958 | JLabel opacityPowerLabel; |
---|
4793 | 5959 | cNumberSlider opacityPowerField; |
---|
4794 | | - JTree jTree; |
---|
| 5960 | + cTree jTree; |
---|
4795 | 5961 | //ObjectUI parent; |
---|
4796 | 5962 | |
---|
4797 | 5963 | cNumberSlider normalpushField; |
---|