.. | .. |
---|
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 | +// callee.Save(true); |
---|
| 306 | +// } |
---|
| 307 | + |
---|
219 | 308 | // "this" is not called: SetupUI2(objEditor); |
---|
220 | 309 | } |
---|
221 | 310 | |
---|
.. | .. |
---|
229 | 318 | client = inClient; |
---|
230 | 319 | copy = client; |
---|
231 | 320 | |
---|
| 321 | + if (copy.versionlist == null) |
---|
| 322 | + { |
---|
| 323 | + copy.versionlist = new Object3D[100]; |
---|
| 324 | + copy.versionindex = -1; |
---|
| 325 | + |
---|
| 326 | +// Save(true); |
---|
| 327 | + } |
---|
| 328 | + |
---|
232 | 329 | SetupUI2(callee.GetEditor()); |
---|
233 | 330 | } |
---|
234 | 331 | |
---|
.. | .. |
---|
243 | 340 | //localCopy.parent = null; |
---|
244 | 341 | |
---|
245 | 342 | frame = new JFrame(); |
---|
| 343 | + frame.setUndecorated(false); |
---|
246 | 344 | objEditor = this; |
---|
247 | 345 | this.callee = callee; |
---|
248 | 346 | |
---|
.. | .. |
---|
260 | 358 | copy = localCopy; |
---|
261 | 359 | copy.editWindow = this; |
---|
262 | 360 | |
---|
| 361 | +// if (copy.versionlist == null) |
---|
| 362 | +// { |
---|
| 363 | +// copy.versionlist = new Object3D[100]; |
---|
| 364 | +// copy.versionindex = -1; |
---|
| 365 | +// |
---|
| 366 | +// Save(true); |
---|
| 367 | +// } |
---|
| 368 | + |
---|
263 | 369 | SetupMenu(); |
---|
264 | 370 | |
---|
265 | 371 | //SetupName(objEditor); // new |
---|
.. | .. |
---|
273 | 379 | return frame.action(event, obj); |
---|
274 | 380 | } |
---|
275 | 381 | |
---|
| 382 | + // Cannot work without static |
---|
| 383 | + static boolean allparams = true; |
---|
| 384 | + |
---|
| 385 | + static java.util.Vector<Object3D> listUI = new java.util.Vector<Object3D>(); |
---|
| 386 | + |
---|
276 | 387 | void SetupMenu() |
---|
277 | 388 | { |
---|
278 | 389 | frame.setMenuBar(menuBar = new MenuBar()); |
---|
279 | 390 | menuBar.add(fileMenu = new Menu("File")); |
---|
280 | 391 | fileMenu.add(newItem = new MenuItem("New")); |
---|
281 | | - fileMenu.add(loadItem = new MenuItem("Load...")); |
---|
| 392 | + fileMenu.add(openItem = new MenuItem("Open...")); |
---|
282 | 393 | |
---|
283 | 394 | //oe.menuBar.add(menu = new Menu("Include")); |
---|
284 | 395 | Menu menu = new Menu("Import"); |
---|
.. | .. |
---|
310 | 421 | } |
---|
311 | 422 | |
---|
312 | 423 | newItem.addActionListener(this); |
---|
313 | | - loadItem.addActionListener(this); |
---|
| 424 | + openItem.addActionListener(this); |
---|
314 | 425 | saveItem.addActionListener(this); |
---|
315 | 426 | saveAsItem.addActionListener(this); |
---|
316 | 427 | exportAsItem.addActionListener(this); |
---|
.. | .. |
---|
319 | 430 | closeItem.addActionListener(this); |
---|
320 | 431 | |
---|
321 | 432 | objectPanel = new JTabbedPane(); |
---|
| 433 | + |
---|
| 434 | + ChangeListener changeListener = new ChangeListener() |
---|
| 435 | + { |
---|
| 436 | + public void stateChanged(ChangeEvent changeEvent) |
---|
| 437 | + { |
---|
| 438 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Material") && !materialFlushed) |
---|
| 439 | +// { |
---|
| 440 | +// if (latestObject != null) |
---|
| 441 | +// { |
---|
| 442 | +// refreshContents(true); |
---|
| 443 | +// SetMaterial(latestObject); |
---|
| 444 | +// } |
---|
| 445 | +// |
---|
| 446 | +// materialFlushed = true; |
---|
| 447 | +// } |
---|
| 448 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Edit")) |
---|
| 449 | +// { |
---|
| 450 | +// if (listUI.size() == 0) |
---|
| 451 | +// EditSelection(false); |
---|
| 452 | +// } |
---|
| 453 | + |
---|
| 454 | +// refreshContents(false); // To refresh Info tab |
---|
| 455 | + } |
---|
| 456 | + }; |
---|
| 457 | + objectPanel.addChangeListener(changeListener); |
---|
| 458 | + |
---|
322 | 459 | toolbarPanel = new JPanel(); |
---|
323 | 460 | toolbarPanel.setName("Toolbar"); |
---|
| 461 | + |
---|
324 | 462 | treePanel = new cGridBag(); |
---|
325 | 463 | treePanel.setName("Tree"); |
---|
| 464 | + |
---|
| 465 | + editPanel = new cGridBag().setVertical(true); |
---|
| 466 | + //editPanel.setName("Edit"); |
---|
| 467 | + |
---|
326 | 468 | ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
---|
327 | | - ctrlPanel.setName("Edit"); |
---|
328 | | - materialPanel = new cGridBag().setVertical(true); |
---|
329 | | - materialPanel.setName("Material"); |
---|
| 469 | + |
---|
| 470 | + editCommandsPanel = new cGridBag(); |
---|
| 471 | + editPanel.add(editCommandsPanel); |
---|
| 472 | + editPanel.add(ctrlPanel); |
---|
| 473 | + |
---|
| 474 | + toolboxPanel = new cGridBag().setVertical(true); |
---|
| 475 | + //toolboxPanel.setName("Toolbox"); |
---|
| 476 | + |
---|
| 477 | + skyboxPanel = new cGridBag().setVertical(true); |
---|
| 478 | + |
---|
| 479 | + materialPanel = new cGridBag().setVertical(false); |
---|
| 480 | + //materialPanel.setName("Material"); |
---|
| 481 | + |
---|
330 | 482 | /*JTextPane*/ |
---|
331 | 483 | infoarea = createTextPane(); |
---|
332 | 484 | doc = infoarea.getStyledDocument(); |
---|
333 | 485 | |
---|
334 | 486 | infoarea.setEditable(true); |
---|
335 | 487 | SetText(); |
---|
| 488 | + |
---|
336 | 489 | // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f)); |
---|
337 | 490 | // infoarea.setOpaque(false); |
---|
338 | 491 | // //infoarea.setForeground(textcolor); |
---|
339 | 492 | // TEXTAREA infoarea.setLineWrap(true); |
---|
340 | 493 | // TEXTAREA infoarea.setWrapStyleWord(true); |
---|
341 | 494 | 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"); |
---|
| 495 | + infoPanel.setPreferredSize(new Dimension(1, 1)); |
---|
| 496 | + //infoPanel.setName("Info"); |
---|
344 | 497 | //infoPanel.setLayout(new BorderLayout()); |
---|
345 | 498 | //infoPanel.add(createTextPane()); |
---|
346 | 499 | |
---|
.. | .. |
---|
351 | 504 | mainPanel.setDividerSize(9); |
---|
352 | 505 | mainPanel.setDividerLocation(0.5); //1.0); |
---|
353 | 506 | mainPanel.setResizeWeight(0.5); |
---|
354 | | - |
---|
| 507 | + |
---|
| 508 | +//mainPanel.setDividerSize((int) (mainPanel.getDividerSize() * 1.5)); |
---|
| 509 | + BasicSplitPaneDivider divider = ( (BasicSplitPaneUI) mainPanel.getUI()).getDivider(); |
---|
| 510 | + divider.setDividerSize(15); |
---|
| 511 | + divider.setBorder(BorderFactory.createTitledBorder(divider.getBorder(), "Custom border title -- gets rid of the one-touch arrows!")); |
---|
| 512 | + |
---|
| 513 | + mainPanel.setUI(new BasicSplitPaneUI()); |
---|
| 514 | + |
---|
355 | 515 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
---|
356 | 516 | //mainPanel.setLayout(new GridBagLayout()); |
---|
357 | 517 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
.. | .. |
---|
419 | 579 | e.printStackTrace(); |
---|
420 | 580 | } |
---|
421 | 581 | |
---|
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(); |
---|
| 582 | +// String selection = infoarea.getText(); |
---|
| 583 | +// java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection); |
---|
| 584 | +// java.awt.datatransfer.Clipboard clipboard = |
---|
| 585 | +// Toolkit.getDefaultToolkit().getSystemClipboard(); |
---|
426 | 586 | //clipboard.setContents(data, data); |
---|
427 | 587 | } |
---|
428 | 588 | |
---|
.. | .. |
---|
582 | 742 | } |
---|
583 | 743 | } |
---|
584 | 744 | |
---|
| 745 | +//static GraphicsDevice device = GraphicsEnvironment |
---|
| 746 | +// .getLocalGraphicsEnvironment().getScreenDevices()[0]; |
---|
| 747 | + |
---|
| 748 | + Rectangle keeprect; |
---|
| 749 | + cRadio radio; |
---|
| 750 | + |
---|
| 751 | +cButton keepButton; |
---|
| 752 | + cButton twoButton; // Full 3D |
---|
| 753 | + cButton sixButton; |
---|
| 754 | + cButton threeButton; |
---|
| 755 | + cButton sevenButton; |
---|
| 756 | + cButton fourButton; // full panel |
---|
| 757 | + cButton oneButton; // full XYZ |
---|
| 758 | + //cButton currentLayout; |
---|
| 759 | + |
---|
| 760 | + boolean maximized; |
---|
| 761 | + |
---|
| 762 | + cButton fullscreenLayout; |
---|
| 763 | + cButton expandedLayout; |
---|
| 764 | + |
---|
| 765 | + void Minimize() |
---|
| 766 | + { |
---|
| 767 | + frame.setState(Frame.ICONIFIED); |
---|
| 768 | + frame.validate(); |
---|
| 769 | + } |
---|
| 770 | + |
---|
| 771 | +// artifactURI=null, type=0, property=${file.reference.jfxrt.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@6767876f, broken=false, additional={} |
---|
| 772 | +// artifactURI=null, type=0, property=${file.reference.mac-ui.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@16bdc817, broken=false, additional={} |
---|
| 773 | +// artifactURI=null, type=0, property=${file.reference.classes.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@9daa9c17, broken=false, additional={} |
---|
| 774 | + void Maximize() |
---|
| 775 | + { |
---|
| 776 | + if (CameraPane.FULLSCREEN) |
---|
| 777 | + { |
---|
| 778 | + ToggleFullScreen(); |
---|
| 779 | + } |
---|
| 780 | + |
---|
| 781 | + if (maximized) |
---|
| 782 | + { |
---|
| 783 | + frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); |
---|
| 784 | + } |
---|
| 785 | + else |
---|
| 786 | + { |
---|
| 787 | + keeprect = frame.getBounds(); |
---|
| 788 | +// Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); |
---|
| 789 | +// Dimension rect2 = frame.getToolkit().getScreenSize(); |
---|
| 790 | +// frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height); |
---|
| 791 | +// frame.setState(Frame.MAXIMIZED_BOTH); |
---|
| 792 | + frame.setBounds(frame.getGraphicsConfiguration().getBounds()); |
---|
| 793 | + } |
---|
| 794 | + |
---|
| 795 | + maximized ^= true; |
---|
| 796 | + |
---|
| 797 | + frame.validate(); |
---|
| 798 | + } |
---|
| 799 | + |
---|
| 800 | + cButton minButton; |
---|
| 801 | + cButton maxButton; |
---|
| 802 | + cButton fullButton; |
---|
| 803 | + cButton collapseButton; |
---|
| 804 | + cButton maximize3DButton; |
---|
| 805 | + |
---|
585 | 806 | void ToggleFullScreen() |
---|
586 | 807 | { |
---|
587 | | - if (CameraPane.FULLSCREEN) |
---|
| 808 | + GraphicsDevice device = frame.getGraphicsConfiguration().getDevice(); |
---|
| 809 | + |
---|
| 810 | + cameraView.ToggleFullScreen(); |
---|
| 811 | + |
---|
| 812 | + if (!CameraPane.FULLSCREEN) |
---|
588 | 813 | { |
---|
589 | | - frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
590 | | - framePanel.add(bigThree); |
---|
591 | | - frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 814 | + device.setFullScreenWindow(null); |
---|
| 815 | + frame.dispose(); |
---|
| 816 | + frame.setUndecorated(false); |
---|
| 817 | + frame.validate(); |
---|
| 818 | + frame.setVisible(true); |
---|
| 819 | + |
---|
| 820 | + //frame.setVisible(false); |
---|
| 821 | +// frame.removeNotify(); |
---|
| 822 | +// frame.setUndecorated(false); |
---|
| 823 | +// frame.addNotify(); |
---|
| 824 | + //frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); |
---|
| 825 | + |
---|
| 826 | +// X frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
| 827 | +// X framePanel.add(bigThree); |
---|
| 828 | +// X frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 829 | +// framePanel.setDividerLocation(46); // icons are 24x24 |
---|
| 830 | + |
---|
| 831 | + //frame.setVisible(true); |
---|
| 832 | +// radio.layout = keepButton; |
---|
| 833 | + //theFrame = null; |
---|
| 834 | + keepButton = null; |
---|
| 835 | +// radio.layout.doClick(); |
---|
| 836 | + |
---|
592 | 837 | } else |
---|
593 | 838 | { |
---|
594 | | - frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
595 | | - framePanel.remove(bigThree); |
---|
596 | | - frame.getContentPane().add(/*"Center",*/bigThree); |
---|
| 839 | + keepButton = radio.layout; |
---|
| 840 | + //keeprect = frame.getBounds(); |
---|
| 841 | +// frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width, |
---|
| 842 | +// frame.getToolkit().getScreenSize().height); |
---|
| 843 | + //frame.setVisible(false); |
---|
| 844 | + |
---|
| 845 | + frame.dispose(); |
---|
| 846 | + frame.setUndecorated(true); |
---|
| 847 | + device.setFullScreenWindow(frame); |
---|
| 848 | + frame.validate(); |
---|
| 849 | + frame.setVisible(true); |
---|
| 850 | +// frame.removeNotify(); |
---|
| 851 | +// frame.setUndecorated(true); |
---|
| 852 | +// frame.addNotify(); |
---|
| 853 | +// X frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
| 854 | +// X framePanel.remove(bigThree); |
---|
| 855 | +// X frame.getContentPane().add(/*"Center",*/bigThree); |
---|
| 856 | +// framePanel.setDividerLocation(0); |
---|
| 857 | + |
---|
| 858 | +// radio.layout = fullscreenLayout; |
---|
| 859 | +// radio.layout.doClick(); |
---|
| 860 | + //frame.setVisible(true); |
---|
597 | 861 | } |
---|
598 | | - cameraView.ToggleFullScreen(); |
---|
| 862 | + frame.validate(); |
---|
| 863 | + |
---|
| 864 | + cameraView.requestFocusInWindow(); |
---|
599 | 865 | } |
---|
| 866 | + |
---|
| 867 | + void CollapseToolbar() |
---|
| 868 | + { |
---|
| 869 | + framePanel.setDividerLocation(0); |
---|
| 870 | + //frame.validate(); |
---|
| 871 | + |
---|
| 872 | + cameraView.requestFocusInWindow(); |
---|
| 873 | + } |
---|
| 874 | + |
---|
| 875 | + private Object3D Duplicate(Object3D object) |
---|
| 876 | + { |
---|
| 877 | + boolean temp = CameraPane.SWITCH; |
---|
| 878 | + CameraPane.SWITCH = false; |
---|
| 879 | + |
---|
| 880 | + object.ExtractBigData(versiontable); |
---|
| 881 | + // if (copy == client) |
---|
| 882 | + |
---|
| 883 | + Object3D versions[] = object.versionlist; |
---|
| 884 | + object.versionlist = null; |
---|
| 885 | + |
---|
| 886 | + //byte[] compress = Compress(copy); |
---|
| 887 | + Object3D compress = (Object3D)Grafreed.clone(object); |
---|
| 888 | + |
---|
| 889 | + object.versionlist = versions; |
---|
| 890 | + |
---|
| 891 | + object.RestoreBigData(versiontable); |
---|
| 892 | + |
---|
| 893 | + CameraPane.SWITCH = temp; |
---|
| 894 | + |
---|
| 895 | + return compress; |
---|
| 896 | + } |
---|
600 | 897 | |
---|
601 | 898 | private JTextPane createTextPane() |
---|
602 | 899 | { |
---|
.. | .. |
---|
719 | 1016 | { |
---|
720 | 1017 | SetupMaterial(materialPanel); |
---|
721 | 1018 | } |
---|
| 1019 | + |
---|
722 | 1020 | //SetupName(); |
---|
723 | 1021 | //SetupViews(); |
---|
724 | 1022 | } |
---|
.. | .. |
---|
728 | 1026 | // NumberSlider vDivsField; |
---|
729 | 1027 | // JCheckBox endcaps; |
---|
730 | 1028 | JCheckBox liveCB; |
---|
731 | | - JCheckBox selectCB; |
---|
| 1029 | + JCheckBox selectableCB; |
---|
732 | 1030 | JCheckBox hideCB; |
---|
733 | 1031 | JCheckBox link2masterCB; |
---|
734 | 1032 | JCheckBox markCB; |
---|
.. | .. |
---|
736 | 1034 | JCheckBox speedupCB; |
---|
737 | 1035 | JCheckBox rewindCB; |
---|
738 | 1036 | JCheckBox flipVCB; |
---|
| 1037 | + |
---|
| 1038 | + cCheckBox toggleTextureCB; |
---|
| 1039 | + cCheckBox toggleSwitchCB; |
---|
| 1040 | + |
---|
739 | 1041 | JComboBox texresMenu; |
---|
| 1042 | + |
---|
740 | 1043 | JButton resetButton; |
---|
741 | 1044 | JButton stepButton; |
---|
742 | 1045 | JButton stepAllButton; |
---|
.. | .. |
---|
745 | 1048 | JButton fasterButton; |
---|
746 | 1049 | JButton remarkButton; |
---|
747 | 1050 | |
---|
| 1051 | + cGridBag editPanel; |
---|
| 1052 | + cGridBag editCommandsPanel; |
---|
| 1053 | + |
---|
748 | 1054 | cGridBag namePanel; |
---|
749 | 1055 | cGridBag setupPanel; |
---|
750 | | - cGridBag commandsPanel; |
---|
| 1056 | + cGridBag setupPanel2; |
---|
| 1057 | + cGridBag objectCommandsPanel; |
---|
751 | 1058 | cGridBag pushPanel; |
---|
752 | 1059 | cGridBag fillPanel; |
---|
753 | 1060 | |
---|
.. | .. |
---|
918 | 1225 | |
---|
919 | 1226 | namePanel = new cGridBag(); |
---|
920 | 1227 | |
---|
| 1228 | + //if (copy.pinned) |
---|
| 1229 | + { |
---|
| 1230 | + pinButton = GetToggleButton("icons/pin.png", !Grafreed.NIMBUSLAF); |
---|
| 1231 | + pinButton.setSelected(copy.pinned); |
---|
| 1232 | + cGridBag t = new cGridBag(); |
---|
| 1233 | + t.preferredWidth = 2; |
---|
| 1234 | + t.add(pinButton); |
---|
| 1235 | + namePanel.add(t); |
---|
| 1236 | + |
---|
| 1237 | + pinButton.addItemListener(this); |
---|
| 1238 | + } |
---|
| 1239 | + |
---|
921 | 1240 | nameField = AddText(namePanel, copy.GetName()); |
---|
922 | | - namePanel.add(nameField); |
---|
| 1241 | + namePanel.add(new JScrollPane(nameField, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER)); |
---|
923 | 1242 | oe.ctrlPanel.add(namePanel); |
---|
924 | 1243 | |
---|
925 | 1244 | oe.ctrlPanel.Return(); |
---|
926 | 1245 | |
---|
927 | | - if (!GroupEditor.allparams) |
---|
| 1246 | + if (!allparams) |
---|
928 | 1247 | return; |
---|
929 | 1248 | |
---|
930 | 1249 | setupPanel = new cGridBag().setVertical(false); |
---|
931 | 1250 | |
---|
932 | 1251 | liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
933 | 1252 | liveCB.setToolTipText("Animate object"); |
---|
934 | | - selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
935 | | - selectCB.setToolTipText("Make object selectable"); |
---|
| 1253 | + selectableCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
| 1254 | + selectableCB.setToolTipText("Make object selectable"); |
---|
936 | 1255 | // Return(); |
---|
| 1256 | + |
---|
937 | 1257 | hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
938 | 1258 | hideCB.setToolTipText("Hide object"); |
---|
939 | 1259 | markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
940 | | - markCB.setToolTipText("Set the animation target transform"); |
---|
| 1260 | + markCB.setToolTipText("As animation target transform"); |
---|
941 | 1261 | |
---|
942 | | - rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind); |
---|
| 1262 | + ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false); |
---|
| 1263 | + |
---|
| 1264 | + setupPanel2 = new cGridBag().setVertical(false); |
---|
| 1265 | + |
---|
| 1266 | + rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind); |
---|
943 | 1267 | rewindCB.setToolTipText("Rewind animation"); |
---|
944 | 1268 | |
---|
945 | | - randomCB = AddCheckBox(setupPanel, "Random", copy.random); |
---|
946 | | - randomCB.setToolTipText("Option for switch node"); |
---|
| 1269 | + randomCB = AddCheckBox(setupPanel2, "Random", copy.random); |
---|
| 1270 | + randomCB.setToolTipText("Randomly Rewind (or Go back and forth)"); |
---|
947 | 1271 | |
---|
| 1272 | + link2masterCB = AddCheckBox(setupPanel2, "Support", copy.link2master); |
---|
| 1273 | + link2masterCB.setToolTipText("Attach to support"); |
---|
| 1274 | + |
---|
948 | 1275 | if (Globals.ADVANCED) |
---|
949 | 1276 | { |
---|
950 | | - link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master); |
---|
951 | | - link2masterCB.setToolTipText("Attach to support"); |
---|
952 | | - speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup); |
---|
| 1277 | + speedupCB = AddCheckBox(setupPanel2, "Speed", copy.speedup); |
---|
953 | 1278 | speedupCB.setToolTipText("Option motion capture"); |
---|
954 | 1279 | } |
---|
955 | 1280 | |
---|
956 | 1281 | oe.ctrlPanel.add(setupPanel); |
---|
957 | 1282 | oe.ctrlPanel.Return(); |
---|
| 1283 | + oe.ctrlPanel.add(setupPanel2); |
---|
| 1284 | + oe.ctrlPanel.Return(); |
---|
958 | 1285 | |
---|
959 | | - commandsPanel = new cGridBag().setVertical(false); |
---|
| 1286 | + objectCommandsPanel = new cGridBag().setVertical(false); |
---|
960 | 1287 | |
---|
961 | | - resetButton = AddButton(commandsPanel, "Reset"); |
---|
| 1288 | + resetButton = AddButton(objectCommandsPanel, "Reset"); |
---|
962 | 1289 | resetButton.setToolTipText("Jump to frame zero"); |
---|
963 | | - stepButton = AddButton(commandsPanel, "Step"); |
---|
| 1290 | + stepButton = AddButton(objectCommandsPanel, "Step"); |
---|
964 | 1291 | stepButton.setToolTipText("Step one frame"); |
---|
965 | 1292 | // resetAllButton = AddButton(oe, "Reset All"); |
---|
966 | 1293 | // stepAllButton = AddButton(oe, "Step All"); |
---|
967 | 1294 | // Return(); |
---|
968 | | - slowerButton = AddButton(commandsPanel, "Slow"); |
---|
| 1295 | + slowerButton = AddButton(objectCommandsPanel, "Slow"); |
---|
969 | 1296 | slowerButton.setToolTipText("Decrease animation speed"); |
---|
970 | | - fasterButton = AddButton(commandsPanel, "Fast"); |
---|
| 1297 | + fasterButton = AddButton(objectCommandsPanel, "Fast"); |
---|
971 | 1298 | fasterButton.setToolTipText("Increase animation speed"); |
---|
972 | | - remarkButton = AddButton(commandsPanel, "Remark"); |
---|
| 1299 | + remarkButton = AddButton(objectCommandsPanel, "Remark"); |
---|
973 | 1300 | remarkButton.setToolTipText("Set the current transform as the target"); |
---|
974 | 1301 | |
---|
975 | | - oe.ctrlPanel.add(commandsPanel); |
---|
| 1302 | + oe.ctrlPanel.add(objectCommandsPanel); |
---|
976 | 1303 | oe.ctrlPanel.Return(); |
---|
977 | 1304 | |
---|
978 | 1305 | pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons |
---|
.. | .. |
---|
1178 | 1505 | //worldPanel.setName("World"); |
---|
1179 | 1506 | centralPanel = new cGridBag(); |
---|
1180 | 1507 | centralPanel.preferredWidth = 20; |
---|
1181 | | - timelinePanel = new JPanel(new BorderLayout()); |
---|
1182 | | - timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
| 1508 | + |
---|
| 1509 | + if (Globals.ADVANCED) |
---|
| 1510 | + { |
---|
| 1511 | + timelinePanel = new JPanel(new BorderLayout()); |
---|
| 1512 | + timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
1183 | 1513 | |
---|
1184 | 1514 | cameraPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, cameraView, timelinePanel); |
---|
1185 | 1515 | cameraPanel.setContinuousLayout(true); |
---|
.. | .. |
---|
1188 | 1518 | // cameraPanel.setDividerSize(9); |
---|
1189 | 1519 | cameraPanel.setResizeWeight(1.0); |
---|
1190 | 1520 | |
---|
| 1521 | + } |
---|
| 1522 | + |
---|
1191 | 1523 | centralPanel.add(cameraView); |
---|
| 1524 | + centralPanel.setFocusable(true); |
---|
1192 | 1525 | //frame.setJMenuBar(timelineMenubar); |
---|
1193 | 1526 | //centralPanel.add(timelinePanel); |
---|
1194 | 1527 | |
---|
.. | .. |
---|
1214 | 1547 | XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
---|
1215 | 1548 | XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll); |
---|
1216 | 1549 | XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll); |
---|
| 1550 | + //XYZPanel.setName("XYZ"); |
---|
1217 | 1551 | |
---|
1218 | 1552 | /* |
---|
1219 | 1553 | gridPanel = new JPanel(); //new BorderLayout()); |
---|
.. | .. |
---|
1251 | 1585 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
---|
1252 | 1586 | //tmp.setName("Edit"); |
---|
1253 | 1587 | objectPanel.add(materialPanel); |
---|
| 1588 | + objectPanel.setIconAt(0, GetIcon("icons/material.png")); |
---|
| 1589 | + objectPanel.setToolTipTextAt(0, "Material"); |
---|
| 1590 | + |
---|
| 1591 | + objectPanel.add(toolboxPanel); |
---|
| 1592 | + objectPanel.setIconAt(1, GetIcon("icons/primitives.png")); |
---|
| 1593 | + objectPanel.setToolTipTextAt(1, "Objects & textures"); |
---|
| 1594 | + |
---|
| 1595 | + objectPanel.add(skyboxPanel); |
---|
| 1596 | + objectPanel.setIconAt(2, GetIcon("icons/skybox.jpg")); |
---|
| 1597 | + objectPanel.setToolTipTextAt(2, "Backgrounds"); |
---|
| 1598 | + |
---|
1254 | 1599 | // JPanel north = new JPanel(new BorderLayout()); |
---|
1255 | 1600 | // north.setName("Edit"); |
---|
1256 | 1601 | // north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1257 | 1602 | // objectPanel.add(north); |
---|
1258 | | - objectPanel.add(ctrlPanel); |
---|
1259 | | - objectPanel.add(infoPanel); |
---|
1260 | | - |
---|
| 1603 | + objectPanel.add(editPanel); |
---|
| 1604 | + objectPanel.setIconAt(3, GetIcon("icons/write.png")); |
---|
| 1605 | + objectPanel.setToolTipTextAt(3, "Edit controls"); |
---|
| 1606 | + |
---|
| 1607 | + objectPanel.add(XYZPanel); |
---|
| 1608 | + objectPanel.setIconAt(4, GetIcon("icons/XYZ.png")); |
---|
| 1609 | + objectPanel.setToolTipTextAt(4, "XYZ/RGB transform"); |
---|
| 1610 | + |
---|
1261 | 1611 | /* |
---|
1262 | 1612 | aConstraints.gridx = 0; |
---|
1263 | 1613 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1265 | 1615 | aConstraints.gridy += 1; |
---|
1266 | 1616 | aConstraints.gridwidth = 1; |
---|
1267 | 1617 | mainPanel.add(objectPanel, aConstraints); |
---|
1268 | | - */ |
---|
| 1618 | + */ |
---|
1269 | 1619 | |
---|
1270 | 1620 | scrollpane = new JScrollPane(mainPanel, ScrollPaneConstants.// VERTICAL_SCROLLBAR_ALWAYS, |
---|
1271 | 1621 | VERTICAL_SCROLLBAR_AS_NEEDED, |
---|
.. | .. |
---|
1277 | 1627 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1278 | 1628 | |
---|
1279 | 1629 | /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
1280 | | - scenePanel.preferredWidth = 6; |
---|
| 1630 | + scenePanel.preferredWidth = 5; |
---|
1281 | 1631 | |
---|
1282 | 1632 | JTabbedPane tabbedPane = new JTabbedPane(); |
---|
1283 | 1633 | tabbedPane.add(scrollpane); |
---|
1284 | 1634 | |
---|
1285 | | - tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
1286 | | - |
---|
1287 | | - optionsPanel = new cGridBag().setVertical(true); |
---|
| 1635 | + optionsPanel = new cGridBag().setVertical(false); |
---|
1288 | 1636 | |
---|
1289 | 1637 | optionsPanel.setName("Options"); |
---|
1290 | 1638 | |
---|
.. | .. |
---|
1292 | 1640 | |
---|
1293 | 1641 | tabbedPane.add(optionsPanel); |
---|
1294 | 1642 | |
---|
| 1643 | + tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
| 1644 | + |
---|
1295 | 1645 | scenePanel.add(tabbedPane); |
---|
1296 | 1646 | |
---|
| 1647 | + //if (Globals.ADVANCED) |
---|
| 1648 | + tabbedPane.add(infoPanel); |
---|
| 1649 | + tabbedPane.setIconAt(3, GetIcon("icons/info.png")); |
---|
| 1650 | + tabbedPane.setToolTipTextAt(3, "Information"); |
---|
| 1651 | + |
---|
1297 | 1652 | /* |
---|
1298 | 1653 | cTree jTree = new cTree(null); |
---|
1299 | 1654 | ToolTipManager.sharedInstance().registerComponent(jTree); |
---|
.. | .. |
---|
1355 | 1710 | bigThree = new cGridBag(); |
---|
1356 | 1711 | bigThree.addComponent(scenePanel); |
---|
1357 | 1712 | bigThree.addComponent(centralPanel); |
---|
1358 | | - bigThree.addComponent(XYZPanel); |
---|
| 1713 | + //bigThree.addComponent(XYZPanel); |
---|
1359 | 1714 | |
---|
1360 | 1715 | // // SIDE EFFECT!!! |
---|
1361 | 1716 | // aConstraints.gridx = 0; |
---|
.. | .. |
---|
1364 | 1719 | // aConstraints.gridheight = 1; |
---|
1365 | 1720 | |
---|
1366 | 1721 | framePanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, toolbarPanel, bigThree); |
---|
1367 | | - framePanel.setContinuousLayout(true); |
---|
1368 | | - framePanel.setOneTouchExpandable(true); |
---|
1369 | | - framePanel.setDividerLocation(0.8); |
---|
| 1722 | + |
---|
| 1723 | + framePanel.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, |
---|
| 1724 | + new java.beans.PropertyChangeListener() |
---|
| 1725 | + { |
---|
| 1726 | + public void propertyChange(java.beans.PropertyChangeEvent pce) |
---|
| 1727 | + { |
---|
| 1728 | + if ((Integer)pce.getOldValue() == 1) |
---|
| 1729 | + { |
---|
| 1730 | + if (radio.layout != expandedLayout) |
---|
| 1731 | + { |
---|
| 1732 | + radio.layout = expandedLayout; |
---|
| 1733 | + radio.layout.doClick(); |
---|
| 1734 | + } |
---|
| 1735 | + } |
---|
| 1736 | + } |
---|
| 1737 | + }); |
---|
| 1738 | + |
---|
| 1739 | + framePanel.setContinuousLayout(false); |
---|
| 1740 | + framePanel.setOneTouchExpandable(false); |
---|
| 1741 | + //.setDividerLocation(0.8); |
---|
1370 | 1742 | //framePanel.setDividerSize(15); |
---|
1371 | 1743 | //framePanel.setResizeWeight(0.15); |
---|
1372 | 1744 | framePanel.setName("Frame"); |
---|
.. | .. |
---|
1384 | 1756 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
1385 | 1757 | |
---|
1386 | 1758 | frame.setSize(1280, 860); |
---|
1387 | | - frame.setVisible(true); |
---|
1388 | | - |
---|
| 1759 | + |
---|
| 1760 | + cameraView.requestFocusInWindow(); |
---|
| 1761 | + |
---|
1389 | 1762 | gridPanel.setDividerLocation(1.0); |
---|
| 1763 | + |
---|
| 1764 | + frame.validate(); |
---|
| 1765 | + |
---|
| 1766 | + frame.setVisible(true); |
---|
1390 | 1767 | |
---|
1391 | 1768 | frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); |
---|
1392 | 1769 | frame.addWindowListener(new WindowAdapter() |
---|
1393 | 1770 | { |
---|
1394 | | - |
---|
1395 | 1771 | public void windowClosing(WindowEvent e) |
---|
1396 | 1772 | { |
---|
1397 | 1773 | Close(); |
---|
.. | .. |
---|
1414 | 1790 | ctrlPanel.removeAll(); |
---|
1415 | 1791 | } |
---|
1416 | 1792 | |
---|
1417 | | - void SetupMaterial(cGridBag panel) |
---|
| 1793 | + void SetupMaterial(cGridBag materialpanel) |
---|
1418 | 1794 | { |
---|
1419 | | - /* |
---|
| 1795 | + cGridBag presetpanel = new cGridBag().setVertical(true); |
---|
| 1796 | + |
---|
| 1797 | + cLabel skin = GetLabel("icons/shadericons/shadericon00000.png", !Grafreed.NIMBUSLAF); |
---|
| 1798 | + skin.setToolTipText("Skin"); |
---|
| 1799 | + skin.addMouseListener(new MouseAdapter() |
---|
| 1800 | + { |
---|
| 1801 | + public void mouseClicked(MouseEvent e) |
---|
| 1802 | + { |
---|
| 1803 | + Object3D object = Grafreed.materials.versionlist[0].get(0); |
---|
| 1804 | + cMaterial material = object.material; |
---|
| 1805 | + |
---|
| 1806 | + // Skin |
---|
| 1807 | + colorField.setFloat(material.color); |
---|
| 1808 | + saturationField.setFloat(material.modulation); |
---|
| 1809 | + subsurfaceField.setFloat(material.subsurface); |
---|
| 1810 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1811 | + diffusenessField.setFloat(material.factor); |
---|
| 1812 | + shininessField.setFloat(material.shininess); |
---|
| 1813 | + shadowbiasField.setFloat(material.shadowbias); |
---|
| 1814 | + diffuseField.setFloat(material.diffuse); |
---|
| 1815 | + specularField.setFloat(material.specular); |
---|
| 1816 | + |
---|
| 1817 | + bumpField.setFloat(object.projectedVertices[0].x / 1000.0); |
---|
| 1818 | + noiseField.setFloat(object.projectedVertices[0].y / 1000.0); |
---|
| 1819 | + powerField.setFloat(object.projectedVertices[2].x / 1000.0); |
---|
| 1820 | + |
---|
| 1821 | + materialtouched = true; |
---|
| 1822 | + applySelf(); |
---|
| 1823 | + } |
---|
| 1824 | + }); |
---|
| 1825 | + presetpanel.add(skin); |
---|
| 1826 | + |
---|
| 1827 | + cLabel lambert = GetLabel("icons/shadericons/shadericon00002.png", !Grafreed.NIMBUSLAF); |
---|
| 1828 | + lambert.setToolTipText("Diffuse"); |
---|
| 1829 | + lambert.addMouseListener(new MouseAdapter() |
---|
| 1830 | + { |
---|
| 1831 | + public void mouseClicked(MouseEvent e) |
---|
| 1832 | + { |
---|
| 1833 | + Object3D object = Grafreed.materials.versionlist[2].get(0); |
---|
| 1834 | + cMaterial material = object.material; |
---|
| 1835 | + |
---|
| 1836 | + diffusenessField.setFloat(material.factor); |
---|
| 1837 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1838 | + |
---|
| 1839 | + materialtouched = true; |
---|
| 1840 | + applySelf(); |
---|
| 1841 | + } |
---|
| 1842 | + }); |
---|
| 1843 | + presetpanel.add(lambert); |
---|
| 1844 | + |
---|
| 1845 | + cLabel diffuse2 = GetLabel("icons/shadericons/shadericon00003.png", !Grafreed.NIMBUSLAF); |
---|
| 1846 | + diffuse2.setToolTipText("Diffuse2"); |
---|
| 1847 | + diffuse2.addMouseListener(new MouseAdapter() |
---|
| 1848 | + { |
---|
| 1849 | + public void mouseClicked(MouseEvent e) |
---|
| 1850 | + { |
---|
| 1851 | + Object3D object = Grafreed.materials.versionlist[3].get(0); |
---|
| 1852 | + cMaterial material = object.material; |
---|
| 1853 | + |
---|
| 1854 | + diffusenessField.setFloat(material.factor); |
---|
| 1855 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1856 | + |
---|
| 1857 | + materialtouched = true; |
---|
| 1858 | + applySelf(); |
---|
| 1859 | + } |
---|
| 1860 | + }); |
---|
| 1861 | + presetpanel.add(diffuse2); |
---|
| 1862 | + |
---|
| 1863 | + cLabel diffusemoon = GetLabel("icons/shadericons/shadericon00004.png", !Grafreed.NIMBUSLAF); |
---|
| 1864 | + diffusemoon.setToolTipText("Moon"); |
---|
| 1865 | + diffusemoon.addMouseListener(new MouseAdapter() |
---|
| 1866 | + { |
---|
| 1867 | + public void mouseClicked(MouseEvent e) |
---|
| 1868 | + { |
---|
| 1869 | + Object3D object = Grafreed.materials.versionlist[4].get(0); |
---|
| 1870 | + cMaterial material = object.material; |
---|
| 1871 | + |
---|
| 1872 | + diffusenessField.setFloat(material.factor); |
---|
| 1873 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1874 | + |
---|
| 1875 | + materialtouched = true; |
---|
| 1876 | + applySelf(); |
---|
| 1877 | + } |
---|
| 1878 | + }); |
---|
| 1879 | + presetpanel.add(diffusemoon); |
---|
| 1880 | + |
---|
| 1881 | + cLabel diffusemoon2 = GetLabel("icons/shadericons/shadericon00005.png", !Grafreed.NIMBUSLAF); |
---|
| 1882 | + diffusemoon2.setToolTipText("Moon2"); |
---|
| 1883 | + diffusemoon2.addMouseListener(new MouseAdapter() |
---|
| 1884 | + { |
---|
| 1885 | + public void mouseClicked(MouseEvent e) |
---|
| 1886 | + { |
---|
| 1887 | + Object3D object = Grafreed.materials.versionlist[5].get(0); |
---|
| 1888 | + cMaterial material = object.material; |
---|
| 1889 | + |
---|
| 1890 | + diffusenessField.setFloat(material.factor); |
---|
| 1891 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1892 | + |
---|
| 1893 | + materialtouched = true; |
---|
| 1894 | + applySelf(); |
---|
| 1895 | + } |
---|
| 1896 | + }); |
---|
| 1897 | + presetpanel.add(diffusemoon2); |
---|
| 1898 | + |
---|
| 1899 | + cLabel diffusemoon3 = GetLabel("icons/shadericons/shadericon00006.png", !Grafreed.NIMBUSLAF); |
---|
| 1900 | + diffusemoon3.setToolTipText("Moon3"); |
---|
| 1901 | + diffusemoon3.addMouseListener(new MouseAdapter() |
---|
| 1902 | + { |
---|
| 1903 | + public void mouseClicked(MouseEvent e) |
---|
| 1904 | + { |
---|
| 1905 | + Object3D object = Grafreed.materials.versionlist[6].get(0); |
---|
| 1906 | + cMaterial material = object.material; |
---|
| 1907 | + |
---|
| 1908 | + diffusenessField.setFloat(material.factor); |
---|
| 1909 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1910 | + |
---|
| 1911 | + materialtouched = true; |
---|
| 1912 | + applySelf(); |
---|
| 1913 | + } |
---|
| 1914 | + }); |
---|
| 1915 | + presetpanel.add(diffusemoon3); |
---|
| 1916 | + |
---|
| 1917 | + cLabel diffusesheen = GetLabel("icons/shadericons/shadericon00007.png", !Grafreed.NIMBUSLAF); |
---|
| 1918 | + diffusesheen.setToolTipText("Sheen"); |
---|
| 1919 | + diffusesheen.addMouseListener(new MouseAdapter() |
---|
| 1920 | + { |
---|
| 1921 | + public void mouseClicked(MouseEvent e) |
---|
| 1922 | + { |
---|
| 1923 | + Object3D object = Grafreed.materials.versionlist[7].get(0); |
---|
| 1924 | + cMaterial material = object.material; |
---|
| 1925 | + |
---|
| 1926 | + sheenField.setFloat(material.sheen); |
---|
| 1927 | + |
---|
| 1928 | + materialtouched = true; |
---|
| 1929 | + applySelf(); |
---|
| 1930 | + } |
---|
| 1931 | + }); |
---|
| 1932 | + presetpanel.add(diffusesheen); |
---|
| 1933 | + |
---|
| 1934 | + cLabel rough = GetLabel("icons/shadericons/shadericon00001.png", !Grafreed.NIMBUSLAF); |
---|
| 1935 | + rough.setToolTipText("Rough metal"); |
---|
| 1936 | + rough.addMouseListener(new MouseAdapter() |
---|
| 1937 | + { |
---|
| 1938 | + public void mouseClicked(MouseEvent e) |
---|
| 1939 | + { |
---|
| 1940 | + Object3D object = Grafreed.materials.versionlist[1].get(0); |
---|
| 1941 | + cMaterial material = object.material; |
---|
| 1942 | + |
---|
| 1943 | + shininessField.setFloat(material.shininess); |
---|
| 1944 | + velvetField.setFloat(material.velvet); |
---|
| 1945 | + |
---|
| 1946 | + materialtouched = true; |
---|
| 1947 | + applySelf(); |
---|
| 1948 | + } |
---|
| 1949 | + }); |
---|
| 1950 | + presetpanel.add(rough); |
---|
| 1951 | + |
---|
| 1952 | + cLabel rough2 = GetLabel("icons/shadericons/shadericon00013.png", !Grafreed.NIMBUSLAF); |
---|
| 1953 | + rough2.setToolTipText("Medium metal"); |
---|
| 1954 | + rough2.addMouseListener(new MouseAdapter() |
---|
| 1955 | + { |
---|
| 1956 | + public void mouseClicked(MouseEvent e) |
---|
| 1957 | + { |
---|
| 1958 | + Object3D object = Grafreed.materials.versionlist[13].get(0); |
---|
| 1959 | + cMaterial material = object.material; |
---|
| 1960 | + |
---|
| 1961 | + shininessField.setFloat(material.shininess); |
---|
| 1962 | + lightareaField.setFloat(material.lightarea); |
---|
| 1963 | + |
---|
| 1964 | + materialtouched = true; |
---|
| 1965 | + applySelf(); |
---|
| 1966 | + } |
---|
| 1967 | + }); |
---|
| 1968 | + presetpanel.add(rough2); |
---|
| 1969 | + |
---|
| 1970 | + cLabel shini0 = GetLabel("icons/shadericons/shadericon00014.png", !Grafreed.NIMBUSLAF); |
---|
| 1971 | + shini0.setToolTipText("Shiny"); |
---|
| 1972 | + shini0.addMouseListener(new MouseAdapter() |
---|
| 1973 | + { |
---|
| 1974 | + public void mouseClicked(MouseEvent e) |
---|
| 1975 | + { |
---|
| 1976 | + Object3D object = Grafreed.materials.versionlist[14].get(0); |
---|
| 1977 | + cMaterial material = object.material; |
---|
| 1978 | + |
---|
| 1979 | + shininessField.setFloat(material.shininess); |
---|
| 1980 | + lightareaField.setFloat(material.lightarea); |
---|
| 1981 | + |
---|
| 1982 | + materialtouched = true; |
---|
| 1983 | + applySelf(); |
---|
| 1984 | + } |
---|
| 1985 | + }); |
---|
| 1986 | + presetpanel.add(shini0); |
---|
| 1987 | + |
---|
| 1988 | + cLabel shini1 = GetLabel("icons/shadericons/shadericon00011.png", !Grafreed.NIMBUSLAF); |
---|
| 1989 | + shini1.setToolTipText("Shiny2"); |
---|
| 1990 | + shini1.addMouseListener(new MouseAdapter() |
---|
| 1991 | + { |
---|
| 1992 | + public void mouseClicked(MouseEvent e) |
---|
| 1993 | + { |
---|
| 1994 | + Object3D object = Grafreed.materials.versionlist[11].get(0); |
---|
| 1995 | + cMaterial material = object.material; |
---|
| 1996 | + |
---|
| 1997 | + shininessField.setFloat(material.shininess); |
---|
| 1998 | + lightareaField.setFloat(material.lightarea); |
---|
| 1999 | + |
---|
| 2000 | + materialtouched = true; |
---|
| 2001 | + applySelf(); |
---|
| 2002 | + } |
---|
| 2003 | + }); |
---|
| 2004 | + presetpanel.add(shini1); |
---|
| 2005 | + |
---|
| 2006 | + cLabel shini2 = GetLabel("icons/shadericons/shadericon00012.png", !Grafreed.NIMBUSLAF); |
---|
| 2007 | + shini2.setToolTipText("Shiny3"); |
---|
| 2008 | + shini2.addMouseListener(new MouseAdapter() |
---|
| 2009 | + { |
---|
| 2010 | + public void mouseClicked(MouseEvent e) |
---|
| 2011 | + { |
---|
| 2012 | + Object3D object = Grafreed.materials.versionlist[12].get(0); |
---|
| 2013 | + cMaterial material = object.material; |
---|
| 2014 | + |
---|
| 2015 | + shininessField.setFloat(material.shininess); |
---|
| 2016 | + lightareaField.setFloat(material.lightarea); |
---|
| 2017 | + |
---|
| 2018 | + materialtouched = true; |
---|
| 2019 | + applySelf(); |
---|
| 2020 | + } |
---|
| 2021 | + }); |
---|
| 2022 | + presetpanel.add(shini2); |
---|
| 2023 | + |
---|
| 2024 | + cLabel aniso = GetLabel("icons/shadericons/shadericon00008.png", !Grafreed.NIMBUSLAF); |
---|
| 2025 | + aniso.setToolTipText("AnisoU"); |
---|
| 2026 | + aniso.addMouseListener(new MouseAdapter() |
---|
| 2027 | + { |
---|
| 2028 | + public void mouseClicked(MouseEvent e) |
---|
| 2029 | + { |
---|
| 2030 | + Object3D object = Grafreed.materials.versionlist[8].get(0); |
---|
| 2031 | + cMaterial material = object.material; |
---|
| 2032 | + |
---|
| 2033 | + anisoField.setFloat(material.aniso); |
---|
| 2034 | + anisoVField.setFloat(material.anisoV); |
---|
| 2035 | + |
---|
| 2036 | + materialtouched = true; |
---|
| 2037 | + applySelf(); |
---|
| 2038 | + } |
---|
| 2039 | + }); |
---|
| 2040 | + presetpanel.add(aniso); |
---|
| 2041 | + |
---|
| 2042 | + cLabel aniso2 = GetLabel("icons/shadericons/shadericon00009.png", !Grafreed.NIMBUSLAF); |
---|
| 2043 | + aniso2.setToolTipText("AnisoV"); |
---|
| 2044 | + aniso2.addMouseListener(new MouseAdapter() |
---|
| 2045 | + { |
---|
| 2046 | + public void mouseClicked(MouseEvent e) |
---|
| 2047 | + { |
---|
| 2048 | + Object3D object = Grafreed.materials.versionlist[9].get(0); |
---|
| 2049 | + cMaterial material = object.material; |
---|
| 2050 | + |
---|
| 2051 | + anisoField.setFloat(material.aniso); |
---|
| 2052 | + anisoVField.setFloat(material.anisoV); |
---|
| 2053 | + |
---|
| 2054 | + materialtouched = true; |
---|
| 2055 | + applySelf(); |
---|
| 2056 | + } |
---|
| 2057 | + }); |
---|
| 2058 | + presetpanel.add(aniso2); |
---|
| 2059 | + |
---|
| 2060 | + cLabel aniso3 = GetLabel("icons/shadericons/shadericon00010.png", !Grafreed.NIMBUSLAF); |
---|
| 2061 | + aniso3.setToolTipText("AnisoUV"); |
---|
| 2062 | + aniso3.addMouseListener(new MouseAdapter() |
---|
| 2063 | + { |
---|
| 2064 | + public void mouseClicked(MouseEvent e) |
---|
| 2065 | + { |
---|
| 2066 | + Object3D object = Grafreed.materials.versionlist[10].get(0); |
---|
| 2067 | + cMaterial material = object.material; |
---|
| 2068 | + |
---|
| 2069 | + anisoField.setFloat(material.aniso); |
---|
| 2070 | + anisoVField.setFloat(material.anisoV); |
---|
| 2071 | + |
---|
| 2072 | + materialtouched = true; |
---|
| 2073 | + applySelf(); |
---|
| 2074 | + } |
---|
| 2075 | + }); |
---|
| 2076 | + presetpanel.add(aniso3); |
---|
| 2077 | + |
---|
| 2078 | + cLabel velvet0 = GetLabel("icons/shadericons/shadericon00015.png", !Grafreed.NIMBUSLAF); |
---|
| 2079 | + velvet0.setToolTipText("Velvet"); |
---|
| 2080 | + velvet0.addMouseListener(new MouseAdapter() |
---|
| 2081 | + { |
---|
| 2082 | + public void mouseClicked(MouseEvent e) |
---|
| 2083 | + { |
---|
| 2084 | + Object3D object = Grafreed.materials.versionlist[15].get(0); |
---|
| 2085 | + cMaterial material = object.material; |
---|
| 2086 | + |
---|
| 2087 | + diffusenessField.setFloat(material.factor); |
---|
| 2088 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 2089 | + sheenField.setFloat(material.sheen); |
---|
| 2090 | + shininessField.setFloat(material.shininess); |
---|
| 2091 | + velvetField.setFloat(material.velvet); |
---|
| 2092 | + shiftField.setFloat(material.shift); |
---|
| 2093 | + |
---|
| 2094 | + materialtouched = true; |
---|
| 2095 | + applySelf(); |
---|
| 2096 | + } |
---|
| 2097 | + }); |
---|
| 2098 | + presetpanel.add(velvet0); |
---|
| 2099 | + |
---|
| 2100 | + cLabel bump0 = GetLabel("icons/shadericons/shadericon00016.png", !Grafreed.NIMBUSLAF); |
---|
| 2101 | + bump0.setToolTipText("Bump texture"); |
---|
| 2102 | + bump0.addMouseListener(new MouseAdapter() |
---|
| 2103 | + { |
---|
| 2104 | + public void mouseClicked(MouseEvent e) |
---|
| 2105 | + { |
---|
| 2106 | + Object3D object = Grafreed.materials.versionlist[16].get(0); |
---|
| 2107 | + cMaterial material = object.material; |
---|
| 2108 | + |
---|
| 2109 | + bumpField.setFloat(object.projectedVertices[0].x / 1000.0); |
---|
| 2110 | + noiseField.setFloat(object.projectedVertices[0].y / 1000.0); |
---|
| 2111 | + powerField.setFloat(object.projectedVertices[2].x / 1000.0); |
---|
| 2112 | + |
---|
| 2113 | + materialtouched = true; |
---|
| 2114 | + applySelf(); |
---|
| 2115 | + } |
---|
| 2116 | + }); |
---|
| 2117 | + presetpanel.add(bump0); |
---|
| 2118 | + |
---|
| 2119 | + cLabel halo = GetLabel("icons/shadericons/shadericon00017.png", !Grafreed.NIMBUSLAF); |
---|
| 2120 | + halo.setToolTipText("Halo"); |
---|
| 2121 | + halo.addMouseListener(new MouseAdapter() |
---|
| 2122 | + { |
---|
| 2123 | + public void mouseClicked(MouseEvent e) |
---|
| 2124 | + { |
---|
| 2125 | + Object3D object = Grafreed.materials.versionlist[17].get(0); |
---|
| 2126 | + cMaterial material = object.material; |
---|
| 2127 | + |
---|
| 2128 | + opacityPowerField.setFloat(object.projectedVertices[2].y / 1000.0); |
---|
| 2129 | + |
---|
| 2130 | + materialtouched = true; |
---|
| 2131 | + applySelf(); |
---|
| 2132 | + } |
---|
| 2133 | + }); |
---|
| 2134 | + presetpanel.add(halo); |
---|
| 2135 | + |
---|
| 2136 | + cLabel candle = GetLabel("icons/shadericons/shadericon00018.png", !Grafreed.NIMBUSLAF); |
---|
| 2137 | + candle.setToolTipText("Candle"); |
---|
| 2138 | + candle.addMouseListener(new MouseAdapter() |
---|
| 2139 | + { |
---|
| 2140 | + public void mouseClicked(MouseEvent e) |
---|
| 2141 | + { |
---|
| 2142 | + Object3D object = Grafreed.materials.versionlist[18].get(0); |
---|
| 2143 | + cMaterial material = object.material; |
---|
| 2144 | + |
---|
| 2145 | + subsurfaceField.setFloat(material.subsurface); |
---|
| 2146 | + shadowbiasField.setFloat(material.shadowbias); |
---|
| 2147 | + ambientField.setFloat(material.ambient); |
---|
| 2148 | + specularField.setFloat(material.specular); |
---|
| 2149 | + lightareaField.setFloat(material.lightarea); |
---|
| 2150 | + shininessField.setFloat(material.shininess); |
---|
| 2151 | + |
---|
| 2152 | + materialtouched = true; |
---|
| 2153 | + applySelf(); |
---|
| 2154 | + } |
---|
| 2155 | + }); |
---|
| 2156 | + presetpanel.add(candle); |
---|
| 2157 | + |
---|
| 2158 | + cLabel shadowShader = GetLabel("icons/shadericons/shadow.png", !Grafreed.NIMBUSLAF); |
---|
| 2159 | + shadowShader.setToolTipText("Shadow"); |
---|
| 2160 | + shadowShader.addMouseListener(new MouseAdapter() |
---|
| 2161 | + { |
---|
| 2162 | + public void mouseClicked(MouseEvent e) |
---|
| 2163 | + { |
---|
| 2164 | + diffuseField.setFloat(0.001); |
---|
| 2165 | + ambientField.setFloat(0.001); |
---|
| 2166 | + cameraField.setFloat(0.001); |
---|
| 2167 | + specularField.setFloat(0.001); |
---|
| 2168 | + fakedepthField.setFloat(0.001); |
---|
| 2169 | + opacityField.setFloat(0.6); |
---|
| 2170 | + |
---|
| 2171 | + materialtouched = true; |
---|
| 2172 | + applySelf(); |
---|
| 2173 | + } |
---|
| 2174 | + }); |
---|
| 2175 | + presetpanel.add(shadowShader); |
---|
| 2176 | + |
---|
| 2177 | + cGridBag panel = new cGridBag().setVertical(true); |
---|
| 2178 | + |
---|
| 2179 | + presetpanel.preferredWidth = 1; |
---|
| 2180 | + |
---|
| 2181 | + materialpanel.add(presetpanel); |
---|
| 2182 | + materialpanel.add(panel); |
---|
| 2183 | + |
---|
| 2184 | + panel.preferredWidth = 8; |
---|
| 2185 | + |
---|
| 2186 | + /* |
---|
1420 | 2187 | ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints); |
---|
1421 | 2188 | materialLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1422 | | - */ |
---|
| 2189 | + */ |
---|
1423 | 2190 | |
---|
1424 | 2191 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
1425 | 2192 | |
---|
.. | .. |
---|
1453 | 2220 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1454 | 2221 | |
---|
1455 | 2222 | cGridBag colorSection = new cGridBag().setVertical(true); |
---|
| 2223 | + |
---|
| 2224 | + cGridBag huepanel = new cGridBag(); |
---|
| 2225 | + cGridBag huelabel = new cGridBag(); |
---|
| 2226 | + skin = GetLabel("icons/hue.png", false); |
---|
| 2227 | + skin.fit = true; |
---|
| 2228 | + huelabel.add(skin); |
---|
| 2229 | + huelabel.preferredWidth = 20; |
---|
| 2230 | + huepanel.add(new cGridBag()); // Label |
---|
| 2231 | + huepanel.add(huelabel); // Field/slider |
---|
| 2232 | + |
---|
| 2233 | + huepanel.preferredHeight = 7; |
---|
| 2234 | + |
---|
| 2235 | + colorSection.add(huepanel); |
---|
1456 | 2236 | |
---|
1457 | 2237 | 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); |
---|
| 2238 | + |
---|
| 2239 | + color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints); |
---|
| 2240 | + colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2241 | + color.add(colorField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
| 2242 | + |
---|
1461 | 2243 | //colorField.preferredWidth = 200; |
---|
1462 | 2244 | colorSection.add(color); |
---|
1463 | 2245 | |
---|
1464 | 2246 | cGridBag modulation = new cGridBag(); |
---|
1465 | 2247 | modulation.add(modulationLabel = new JLabel("Saturation")); // , aConstraints); |
---|
1466 | 2248 | modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1467 | | - modulation.add(modulationField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 2249 | + modulation.add(saturationField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
1468 | 2250 | colorSection.add(modulation); |
---|
1469 | 2251 | |
---|
| 2252 | + cGridBag opacity = new cGridBag(); |
---|
| 2253 | + opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints); |
---|
| 2254 | + opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2255 | + opacity.add(opacityField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
| 2256 | + colorSection.add(opacity); |
---|
| 2257 | + |
---|
| 2258 | + colorSection.add(GetSeparator()); |
---|
| 2259 | + |
---|
1470 | 2260 | cGridBag texture = new cGridBag(); |
---|
1471 | 2261 | texture.add(textureLabel = new JLabel("Texture")); // , aConstraints); |
---|
1472 | 2262 | textureLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1473 | 2263 | texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1474 | 2264 | colorSection.add(texture); |
---|
1475 | 2265 | |
---|
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()); |
---|
| 2266 | + panel.add(GetSeparator()); |
---|
1495 | 2267 | |
---|
1496 | 2268 | panel.add(colorSection); |
---|
1497 | 2269 | |
---|
.. | .. |
---|
1541 | 2313 | fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1542 | 2314 | diffuseSection.add(fakedepth); |
---|
1543 | 2315 | |
---|
1544 | | - panel.add(new JSeparator()); |
---|
| 2316 | + cGridBag shadowbias = new cGridBag(); |
---|
| 2317 | + shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); |
---|
| 2318 | + shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2319 | + shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 2320 | + diffuseSection.add(shadowbias); |
---|
| 2321 | + |
---|
| 2322 | + panel.add(GetSeparator()); |
---|
1545 | 2323 | |
---|
1546 | 2324 | panel.add(diffuseSection); |
---|
1547 | 2325 | |
---|
.. | .. |
---|
1591 | 2369 | // aConstraints.gridy += 1; |
---|
1592 | 2370 | // aConstraints.gridwidth = 1; |
---|
1593 | 2371 | |
---|
| 2372 | + cGridBag anisoU = new cGridBag(); |
---|
| 2373 | + anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); |
---|
| 2374 | + anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2375 | + anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 2376 | + specularSection.add(anisoU); |
---|
1594 | 2377 | |
---|
1595 | | - panel.add(new JSeparator()); |
---|
| 2378 | + cGridBag anisoV = new cGridBag(); |
---|
| 2379 | + anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); |
---|
| 2380 | + anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2381 | + anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 2382 | + specularSection.add(anisoV); |
---|
| 2383 | + |
---|
| 2384 | + |
---|
| 2385 | + panel.add(GetSeparator()); |
---|
1596 | 2386 | |
---|
1597 | 2387 | panel.add(specularSection); |
---|
1598 | 2388 | |
---|
1599 | 2389 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1600 | 2390 | |
---|
1601 | | - cGridBag globalSection = new cGridBag().setVertical(true); |
---|
| 2391 | + //cGridBag globalSection = new cGridBag().setVertical(true); |
---|
1602 | 2392 | |
---|
1603 | 2393 | cGridBag camera = new cGridBag(); |
---|
1604 | 2394 | camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints); |
---|
1605 | 2395 | cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1606 | 2396 | camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1607 | | - globalSection.add(camera); |
---|
| 2397 | + colorSection.add(camera); |
---|
1608 | 2398 | |
---|
1609 | 2399 | cGridBag ambient = new cGridBag(); |
---|
1610 | 2400 | ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints); |
---|
1611 | 2401 | ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1612 | 2402 | ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1613 | | - globalSection.add(ambient); |
---|
| 2403 | + colorSection.add(ambient); |
---|
1614 | 2404 | |
---|
1615 | 2405 | cGridBag backlit = new cGridBag(); |
---|
1616 | 2406 | backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints); |
---|
1617 | 2407 | backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1618 | 2408 | backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1619 | | - globalSection.add(backlit); |
---|
| 2409 | + colorSection.add(backlit); |
---|
1620 | 2410 | |
---|
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()); |
---|
| 2411 | + //panel.add(new JSeparator()); |
---|
1628 | 2412 | |
---|
1629 | | - panel.add(globalSection); |
---|
| 2413 | + //panel.add(globalSection); |
---|
1630 | 2414 | |
---|
1631 | 2415 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1632 | 2416 | |
---|
.. | .. |
---|
1668 | 2452 | opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints); |
---|
1669 | 2453 | textureSection.add(opacityPower); |
---|
1670 | 2454 | |
---|
1671 | | - panel.add(new JSeparator()); |
---|
| 2455 | + panel.add(GetSeparator()); |
---|
1672 | 2456 | |
---|
1673 | 2457 | panel.add(textureSection); |
---|
1674 | 2458 | |
---|
.. | .. |
---|
1733 | 2517 | // 3D models |
---|
1734 | 2518 | if (filename.endsWith(".3ds") || filename.endsWith(".3DS")) |
---|
1735 | 2519 | { |
---|
1736 | | - lastConverter = new com.jmex.model.converters.MaxToJme(); |
---|
1737 | | - LoadFile(filename, lastConverter); |
---|
| 2520 | + //lastConverter = new com.jmex.model.converters.MaxToJme(); |
---|
| 2521 | + //LoadFile(filename, lastConverter); |
---|
| 2522 | + LoadObjFile(filename); // New 3ds loader |
---|
1738 | 2523 | continue; |
---|
1739 | 2524 | } |
---|
1740 | 2525 | if (filename.endsWith(".dae") || filename.endsWith(".DAE")) |
---|
.. | .. |
---|
2072 | 2857 | |
---|
2073 | 2858 | void LoadObjFile(String fullname) |
---|
2074 | 2859 | { |
---|
2075 | | - /* |
---|
| 2860 | + System.out.println("Loading " + fullname); |
---|
| 2861 | + /**/ |
---|
2076 | 2862 | //lastFilename = fullname; |
---|
2077 | 2863 | if(loadObjThread == null) |
---|
2078 | 2864 | { |
---|
2079 | | - loadObjThread = new LoadOBJThread(); |
---|
2080 | | - loadObjThread.start(); |
---|
| 2865 | + loadObjThread = new LoadOBJThread(); |
---|
| 2866 | + loadObjThread.start(); |
---|
2081 | 2867 | } |
---|
2082 | 2868 | |
---|
2083 | 2869 | loadObjThread.add(fullname); |
---|
2084 | | - */ |
---|
| 2870 | + /**/ |
---|
2085 | 2871 | |
---|
2086 | | - System.out.println("Loading " + fullname); |
---|
2087 | | - makeSomething(new FileObject(fullname, true), true); |
---|
| 2872 | + //makeSomething(new FileObject(fullname, true), true); |
---|
2088 | 2873 | } |
---|
2089 | 2874 | |
---|
2090 | 2875 | void LoadGFDFile(String fullname) |
---|
.. | .. |
---|
2460 | 3245 | LA.matXRotate(((Object3D) group.get(group.size() - 1)).toParent, -Math.PI / 2); |
---|
2461 | 3246 | LA.matXRotate(((Object3D) group.get(group.size() - 1)).fromParent, Math.PI / 2); |
---|
2462 | 3247 | } |
---|
| 3248 | + |
---|
2463 | 3249 | //cJME.count++; |
---|
2464 | 3250 | //cJME.count %= 12; |
---|
2465 | 3251 | if (gc) |
---|
.. | .. |
---|
2643 | 3429 | } |
---|
2644 | 3430 | } |
---|
2645 | 3431 | } |
---|
| 3432 | + |
---|
2646 | 3433 | cFileSystemPane FSPane; |
---|
2647 | 3434 | |
---|
2648 | 3435 | void SetMaterial(cMaterial mat, Object3D.cVector2[] others) |
---|
.. | .. |
---|
2652 | 3439 | |
---|
2653 | 3440 | freezematerial = true; |
---|
2654 | 3441 | colorField.setFloat(mat.color); |
---|
2655 | | - modulationField.setFloat(mat.modulation); |
---|
| 3442 | + saturationField.setFloat(mat.modulation); |
---|
2656 | 3443 | metalnessField.setFloat(mat.metalness); |
---|
2657 | 3444 | diffuseField.setFloat(mat.diffuse); |
---|
2658 | 3445 | specularField.setFloat(mat.specular); |
---|
.. | .. |
---|
2696 | 3483 | } |
---|
2697 | 3484 | } |
---|
2698 | 3485 | } |
---|
| 3486 | + |
---|
2699 | 3487 | freezematerial = false; |
---|
2700 | 3488 | } |
---|
2701 | 3489 | |
---|
2702 | 3490 | void SetMaterial(Object3D object) |
---|
2703 | 3491 | { |
---|
| 3492 | + latestObject = object; |
---|
| 3493 | + |
---|
2704 | 3494 | cMaterial mat = object.material; |
---|
2705 | 3495 | |
---|
2706 | 3496 | if (mat == null) |
---|
.. | .. |
---|
2812 | 3602 | // } |
---|
2813 | 3603 | |
---|
2814 | 3604 | /**/ |
---|
2815 | | - if (deselect) |
---|
| 3605 | + if (deselect || child == null) |
---|
2816 | 3606 | { |
---|
2817 | 3607 | //group.deselectAll(); |
---|
2818 | 3608 | //freeze = true; |
---|
2819 | 3609 | GetTree().clearSelection(); |
---|
2820 | 3610 | //freeze = false; |
---|
| 3611 | + |
---|
| 3612 | + if (child == null) |
---|
| 3613 | + { |
---|
| 3614 | + return; |
---|
| 3615 | + } |
---|
2821 | 3616 | } |
---|
2822 | 3617 | |
---|
2823 | 3618 | //group.addSelectee(child); |
---|
.. | .. |
---|
2851 | 3646 | public void itemStateChanged(ItemEvent event) |
---|
2852 | 3647 | { |
---|
2853 | 3648 | // System.out.println("Propagate = " + propagate); |
---|
| 3649 | + if (event.getSource() == pinButton) |
---|
| 3650 | + { |
---|
| 3651 | + copy.pinned ^= true; |
---|
| 3652 | + if (!copy.pinned && !copy.editWindow.copy.selection.contains(copy)) |
---|
| 3653 | + { |
---|
| 3654 | + ((GroupEditor)copy.editWindow).listUI.remove(copy); |
---|
| 3655 | + copy.CloseUI(); |
---|
| 3656 | + //copy.editWindow.refreshContents(); |
---|
| 3657 | + } |
---|
| 3658 | + } |
---|
| 3659 | + else |
---|
2854 | 3660 | if (event.getSource() == propagateToggle) |
---|
2855 | 3661 | { |
---|
2856 | 3662 | propagate ^= true; |
---|
.. | .. |
---|
2886 | 3692 | cameraView.ToggleDL(); |
---|
2887 | 3693 | cameraView.repaint(); |
---|
2888 | 3694 | return; |
---|
2889 | | - } else if (event.getSource() == toggleTextureItem) |
---|
| 3695 | + } else if (event.getSource() == toggleTextureItem || event.getSource() == toggleTextureCB) |
---|
2890 | 3696 | { |
---|
2891 | 3697 | cameraView.ToggleTexture(); |
---|
2892 | 3698 | // june 2013 copy.HardTouch(); |
---|
.. | .. |
---|
2925 | 3731 | frame.validate(); |
---|
2926 | 3732 | |
---|
2927 | 3733 | return; |
---|
2928 | | - } else if (event.getSource() == toggleSwitchItem) |
---|
| 3734 | + } else if (event.getSource() == toggleSwitchItem || event.getSource() == toggleSwitchCB) |
---|
2929 | 3735 | { |
---|
2930 | | - cameraView.ToggleRandom(); |
---|
| 3736 | + cameraView.ToggleSwitch(); |
---|
2931 | 3737 | cameraView.repaint(); |
---|
2932 | 3738 | return; |
---|
2933 | 3739 | } else if (event.getSource() == toggleHandleItem) |
---|
.. | .. |
---|
2955 | 3761 | } else if (event.getSource() == liveCB) |
---|
2956 | 3762 | { |
---|
2957 | 3763 | copy.live ^= true; |
---|
| 3764 | + objEditor.refreshContents(true); // To show item colors |
---|
2958 | 3765 | return; |
---|
2959 | | - } else if (event.getSource() == selectCB) |
---|
| 3766 | + } else if (event.getSource() == selectableCB) |
---|
2960 | 3767 | { |
---|
2961 | 3768 | copy.dontselect ^= true; |
---|
2962 | 3769 | return; |
---|
.. | .. |
---|
2964 | 3771 | { |
---|
2965 | 3772 | copy.hide ^= true; |
---|
2966 | 3773 | copy.Touch(); // display list issue |
---|
2967 | | - objEditor.refreshContents(); |
---|
| 3774 | + objEditor.refreshContents(true); // To show item colors |
---|
2968 | 3775 | return; |
---|
2969 | 3776 | } else if (event.getSource() == link2masterCB) |
---|
2970 | 3777 | { |
---|
.. | .. |
---|
3141 | 3948 | { |
---|
3142 | 3949 | Close(); |
---|
3143 | 3950 | //return true; |
---|
3144 | | - } else if (source == loadItem) |
---|
| 3951 | + } else if (source == openItem) |
---|
3145 | 3952 | { |
---|
3146 | | - load(); |
---|
| 3953 | + Open(); |
---|
3147 | 3954 | //return true; |
---|
3148 | 3955 | } else if (source == newItem) |
---|
3149 | 3956 | { |
---|
.. | .. |
---|
3168 | 3975 | { |
---|
3169 | 3976 | generatePOV(); |
---|
3170 | 3977 | //return true; |
---|
| 3978 | + } else if (event.getSource() == archiveItem) |
---|
| 3979 | + { |
---|
| 3980 | + cTools.Archive(frame); |
---|
| 3981 | + return; |
---|
3171 | 3982 | } else if (source == zBufferItem) |
---|
3172 | 3983 | { |
---|
3173 | 3984 | try |
---|
.. | .. |
---|
3214 | 4025 | objEditor.refreshContents(); |
---|
3215 | 4026 | } |
---|
3216 | 4027 | |
---|
3217 | | - static public byte[] Compress(Object o) |
---|
| 4028 | + static public byte[] Compress(Object3D o) |
---|
3218 | 4029 | { |
---|
| 4030 | + // Slower to actually compress. |
---|
3219 | 4031 | try |
---|
3220 | 4032 | { |
---|
3221 | 4033 | ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
3222 | | - java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos); |
---|
3223 | | - ObjectOutputStream out = new ObjectOutputStream(zstream); |
---|
| 4034 | +// java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos); |
---|
| 4035 | + ObjectOutputStream out = new ObjectOutputStream(baos); //zstream); |
---|
3224 | 4036 | |
---|
| 4037 | + Object3D parent = o.parent; |
---|
| 4038 | + o.parent = null; |
---|
| 4039 | + |
---|
3225 | 4040 | out.writeObject(o); |
---|
3226 | 4041 | |
---|
| 4042 | + o.parent = parent; |
---|
| 4043 | + |
---|
3227 | 4044 | out.flush(); |
---|
3228 | 4045 | |
---|
3229 | | - zstream.close(); |
---|
| 4046 | + baos //zstream |
---|
| 4047 | + .close(); |
---|
3230 | 4048 | out.close(); |
---|
3231 | 4049 | |
---|
3232 | | - return baos.toByteArray(); |
---|
| 4050 | + byte[] bytes = baos.toByteArray(); |
---|
| 4051 | + |
---|
| 4052 | + System.out.println("save #bytes = " + bytes.length); |
---|
| 4053 | + return bytes; |
---|
3233 | 4054 | } catch (Exception e) |
---|
3234 | 4055 | { |
---|
3235 | 4056 | System.err.println(e); |
---|
.. | .. |
---|
3239 | 4060 | |
---|
3240 | 4061 | static public Object Uncompress(byte[] bytes) |
---|
3241 | 4062 | { |
---|
| 4063 | + System.out.println("restore #bytes = " + bytes.length); |
---|
3242 | 4064 | try |
---|
3243 | 4065 | { |
---|
3244 | 4066 | ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
3245 | | - java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais); |
---|
3246 | | - ObjectInputStream in = new ObjectInputStream(istream); |
---|
| 4067 | + //java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais); |
---|
| 4068 | + ObjectInputStream in = new ObjectInputStream(bais); // istream); |
---|
3247 | 4069 | Object obj = in.readObject(); |
---|
| 4070 | + |
---|
| 4071 | + bais //istream |
---|
| 4072 | + .close(); |
---|
3248 | 4073 | in.close(); |
---|
3249 | 4074 | |
---|
3250 | 4075 | return obj; |
---|
.. | .. |
---|
3299 | 4124 | return null; |
---|
3300 | 4125 | } |
---|
3301 | 4126 | |
---|
3302 | | - java.util.Hashtable<java.util.UUID, Object3D> hashtable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
3303 | 4127 | |
---|
3304 | 4128 | public void Save() |
---|
3305 | 4129 | { |
---|
3306 | | - cRadio tab = GetCurrentTab(); |
---|
| 4130 | + //Save(true); |
---|
| 4131 | + Replace(); |
---|
| 4132 | + SetUndoStates(); |
---|
| 4133 | + } |
---|
| 4134 | + |
---|
| 4135 | + private boolean Equal(byte[] compress, byte[] name) |
---|
| 4136 | + { |
---|
| 4137 | + if (compress.length != name.length) |
---|
| 4138 | + { |
---|
| 4139 | + return false; |
---|
| 4140 | + } |
---|
3307 | 4141 | |
---|
3308 | | - copy.ExtractBigData(hashtable); |
---|
| 4142 | + for (int i=compress.length; --i>=0;) |
---|
| 4143 | + { |
---|
| 4144 | + if (compress[i] != name[i]) |
---|
| 4145 | + return false; |
---|
| 4146 | + } |
---|
| 4147 | + |
---|
| 4148 | + return true; |
---|
| 4149 | + } |
---|
| 4150 | + |
---|
| 4151 | + java.util.Hashtable<java.util.UUID, Object3D> versiontable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
| 4152 | + |
---|
| 4153 | + void DeleteVersion() |
---|
| 4154 | + { |
---|
| 4155 | + for (int i = copy.versionindex; i < copy.versionlist.length-1; i++) |
---|
| 4156 | + { |
---|
| 4157 | + copy.versionlist[i] = copy.versionlist[i+1]; |
---|
| 4158 | + } |
---|
| 4159 | + |
---|
| 4160 | + CopyChanged(); |
---|
| 4161 | + |
---|
| 4162 | + SetUndoStates(); |
---|
| 4163 | + } |
---|
| 4164 | + |
---|
| 4165 | + public boolean Save(boolean user) |
---|
| 4166 | + { |
---|
| 4167 | + System.err.println("Save"); |
---|
| 4168 | + Replace(); |
---|
| 4169 | + |
---|
| 4170 | + //cRadio tab = GetCurrentTab(); |
---|
| 4171 | + |
---|
| 4172 | + Object3D compress = Duplicate(copy); // Saved version. No need for "Replace"? |
---|
| 4173 | + |
---|
| 4174 | + boolean thesame = false; |
---|
| 4175 | + |
---|
| 4176 | +// if (copy.versionindex > 0 && copy.versions[copy.versionindex-1] != null && Equal(compress, copy.versions[copy.versionindex-1])) |
---|
| 4177 | +// { |
---|
| 4178 | +// thesame = true; |
---|
| 4179 | +// } |
---|
3309 | 4180 | |
---|
3310 | 4181 | //EditorFrame.m_MainFrame.requestFocusInWindow(); |
---|
3311 | | - tab.graphs[tab.undoindex++] = (Object3D)clone(copy); |
---|
3312 | | - |
---|
3313 | | - copy.RestoreBigData(hashtable); |
---|
3314 | | - |
---|
3315 | | - //assert(hashtable.isEmpty()); |
---|
3316 | | - |
---|
3317 | | - for (int i = tab.undoindex; i < tab.graphs.length; i++) |
---|
| 4182 | + if (!thesame) |
---|
3318 | 4183 | { |
---|
3319 | | - tab.graphs[i] = null; |
---|
| 4184 | + for (int i = copy.versionlist.length; --i > copy.versionindex+1;) |
---|
| 4185 | + { |
---|
| 4186 | + copy.versionlist[i] = copy.versionlist[i-1]; |
---|
| 4187 | + } |
---|
| 4188 | + |
---|
| 4189 | + //tab.user[tab.versionindex] = user; |
---|
| 4190 | + //boolean increment = true; // tab.graphs[tab.versionindex] == null; |
---|
| 4191 | + |
---|
| 4192 | + copy.versionlist[++copy.versionindex] = compress; |
---|
| 4193 | + |
---|
| 4194 | + // if (increment) |
---|
| 4195 | + // tab.versionindex++; |
---|
3320 | 4196 | } |
---|
3321 | 4197 | |
---|
| 4198 | + //copy.RestoreBigData(versiontable); |
---|
| 4199 | + |
---|
| 4200 | + //assert(hashtable.isEmpty()); |
---|
| 4201 | + |
---|
| 4202 | +// for (int i = copy.versionindex+1; i < copy.versionlist.length; i++) |
---|
| 4203 | +// { |
---|
| 4204 | +// //tab.user[i] = false; |
---|
| 4205 | +// copy.versionlist[i] = null; |
---|
| 4206 | +// } |
---|
| 4207 | + |
---|
| 4208 | + SetUndoStates(); |
---|
| 4209 | + |
---|
3322 | 4210 | // test save |
---|
3323 | 4211 | if (false) |
---|
3324 | 4212 | { |
---|
3325 | 4213 | try |
---|
3326 | 4214 | { |
---|
3327 | | - FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex); |
---|
| 4215 | + FileOutputStream ostream = new FileOutputStream("save" + copy.versionindex); |
---|
3328 | 4216 | ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
3329 | 4217 | |
---|
3330 | 4218 | p.writeObject(copy); |
---|
.. | .. |
---|
3337 | 4225 | e.printStackTrace(); |
---|
3338 | 4226 | } |
---|
3339 | 4227 | } |
---|
| 4228 | + |
---|
| 4229 | + return !thesame; |
---|
| 4230 | + } |
---|
| 4231 | + |
---|
| 4232 | + boolean flashIt = true; |
---|
| 4233 | + |
---|
| 4234 | + void RefreshSelection() |
---|
| 4235 | + { |
---|
| 4236 | + Object3D selection = new Object3D(); |
---|
| 4237 | + |
---|
| 4238 | + for (int i = 0; i < copy.selection.size(); i++) |
---|
| 4239 | + { |
---|
| 4240 | + Object3D elem = copy.selection.elementAt(i); |
---|
| 4241 | + |
---|
| 4242 | + Object3D obj = copy.GetObject(elem.GetUUID()); |
---|
| 4243 | + |
---|
| 4244 | + if (obj == null) |
---|
| 4245 | + { |
---|
| 4246 | + copy.selection.remove(i--); |
---|
| 4247 | + } |
---|
| 4248 | + else |
---|
| 4249 | + { |
---|
| 4250 | + selection.add(obj); |
---|
| 4251 | + copy.selection.setElementAt(obj, i); |
---|
| 4252 | + } |
---|
| 4253 | + } |
---|
| 4254 | + |
---|
| 4255 | + flashIt = false; |
---|
| 4256 | + GetTree().clearSelection(); |
---|
| 4257 | + for (int i = 0; i < selection.size(); i++) |
---|
| 4258 | + GetTree().addSelectionPath(selection.elementAt(i).GetTreePath().GetTreePath()); |
---|
| 4259 | + flashIt = true; |
---|
| 4260 | + |
---|
| 4261 | + //refreshContents(false); |
---|
3340 | 4262 | } |
---|
3341 | 4263 | |
---|
3342 | | - void CopyChanged(Object3D obj) |
---|
| 4264 | + void CopyChanged() |
---|
3343 | 4265 | { |
---|
3344 | | - copy.ExtractBigData(hashtable); |
---|
| 4266 | + Object3D obj = (Object3D)Grafreed.clone(copy.versionlist[copy.versionindex]); |
---|
| 4267 | + |
---|
| 4268 | + SetUndoStates(); |
---|
| 4269 | + |
---|
| 4270 | + boolean temp = CameraPane.SWITCH; |
---|
| 4271 | + CameraPane.SWITCH = false; |
---|
| 4272 | + |
---|
| 4273 | + copy.ExtractBigData(versiontable); |
---|
3345 | 4274 | |
---|
3346 | 4275 | copy.clear(); |
---|
3347 | 4276 | |
---|
| 4277 | + copy.skyboxname = obj.skyboxname; |
---|
| 4278 | + copy.skyboxext = obj.skyboxext; |
---|
| 4279 | + |
---|
3348 | 4280 | for (int i=0; i<obj.Size(); i++) |
---|
3349 | 4281 | { |
---|
3350 | 4282 | copy.add(obj.get(i)); |
---|
3351 | 4283 | } |
---|
3352 | 4284 | |
---|
3353 | | - copy.RestoreBigData(hashtable); |
---|
| 4285 | + copy.RestoreBigData(versiontable); |
---|
3354 | 4286 | |
---|
| 4287 | + CameraPane.SWITCH = temp; |
---|
| 4288 | + |
---|
| 4289 | + RefreshSelection(); |
---|
3355 | 4290 | //assert(hashtable.isEmpty()); |
---|
3356 | 4291 | |
---|
3357 | 4292 | copy.Touch(); |
---|
.. | .. |
---|
3372 | 4307 | } |
---|
3373 | 4308 | } |
---|
3374 | 4309 | |
---|
3375 | | - refreshContents(); |
---|
| 4310 | + refreshContents(true); |
---|
3376 | 4311 | } |
---|
3377 | 4312 | |
---|
3378 | | - public void Undo() |
---|
3379 | | - { |
---|
3380 | | - cRadio tab = GetCurrentTab(); |
---|
| 4313 | + cButton previousVersionButton; |
---|
| 4314 | + cButton restoreButton; |
---|
| 4315 | + cButton replaceButton; |
---|
| 4316 | + cButton nextVersionButton; |
---|
| 4317 | + cButton saveVersionButton; |
---|
| 4318 | + cButton deleteVersionButton; |
---|
3381 | 4319 | |
---|
3382 | | - if (tab.undoindex == 0) |
---|
| 4320 | + boolean muteSlider; |
---|
| 4321 | + |
---|
| 4322 | + int VersionCount() |
---|
| 4323 | + { |
---|
| 4324 | + int count = 0; |
---|
| 4325 | + |
---|
| 4326 | + for (int i = copy.versionlist.length; --i >= 0;) |
---|
| 4327 | + { |
---|
| 4328 | + if (copy.versionlist[i] != null) |
---|
| 4329 | + count++; |
---|
| 4330 | + } |
---|
| 4331 | + |
---|
| 4332 | + return count; |
---|
| 4333 | + } |
---|
| 4334 | + |
---|
| 4335 | + void SetUndoStates() |
---|
| 4336 | + { |
---|
| 4337 | + //if (true) |
---|
| 4338 | + // return; |
---|
| 4339 | + |
---|
| 4340 | + //cRadio tab = GetCurrentTab(); |
---|
| 4341 | + |
---|
| 4342 | + restoreButton.setEnabled(copy.versionindex != -1); |
---|
| 4343 | + replaceButton.setEnabled(copy.versionindex != -1); |
---|
| 4344 | + |
---|
| 4345 | + previousVersionButton.setEnabled(copy.versionindex > 0); |
---|
| 4346 | + nextVersionButton.setEnabled(copy.versionlist[copy.versionindex + 1] != null); |
---|
| 4347 | + |
---|
| 4348 | + deleteVersionButton.setEnabled(//copy.versionindex > 0 && |
---|
| 4349 | + copy.versionlist[copy.versionindex + 1] != null); |
---|
| 4350 | + |
---|
| 4351 | + muteSlider = true; |
---|
| 4352 | + versionSlider.setMinimum(0); |
---|
| 4353 | + versionSlider.setMaximum(VersionCount() - 1); |
---|
| 4354 | + versionSlider.setInteger(copy.versionindex); |
---|
| 4355 | + versionSlider.setEnabled(copy.versionindex != -1); |
---|
| 4356 | + muteSlider = false; |
---|
| 4357 | + } |
---|
| 4358 | + |
---|
| 4359 | + public boolean PreviousVersion() |
---|
| 4360 | + { |
---|
| 4361 | + // Option? |
---|
| 4362 | + Replace(); |
---|
| 4363 | + |
---|
| 4364 | + System.err.println("Undo"); |
---|
| 4365 | + |
---|
| 4366 | + //cRadio tab = GetCurrentTab(); |
---|
| 4367 | + |
---|
| 4368 | + if (copy.versionindex == 0) |
---|
3383 | 4369 | { |
---|
3384 | 4370 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
3385 | | - return; |
---|
| 4371 | + return false; |
---|
3386 | 4372 | } |
---|
3387 | 4373 | |
---|
3388 | | - if (tab.graphs[tab.undoindex] == null) |
---|
3389 | | - { |
---|
3390 | | - Save(); |
---|
3391 | | - tab.undoindex -= 1; |
---|
3392 | | - } |
---|
| 4374 | +// if (tab.graphs[tab.versionindex] == null) // || !tab.user[tab.versionindex]) |
---|
| 4375 | +// { |
---|
| 4376 | +// if (Save(false)) |
---|
| 4377 | +// tab.versionindex -= 1; |
---|
| 4378 | +// else |
---|
| 4379 | +// { |
---|
| 4380 | +// if (tab.versionindex <= 0) |
---|
| 4381 | +// return false; |
---|
| 4382 | +// else |
---|
| 4383 | +// tab.versionindex -= 1; |
---|
| 4384 | +// } |
---|
| 4385 | +// } |
---|
3393 | 4386 | |
---|
3394 | | - tab.undoindex -= 1; |
---|
| 4387 | + copy.versionindex -= 1; |
---|
3395 | 4388 | |
---|
3396 | | - CopyChanged(tab.graphs[tab.undoindex]); |
---|
| 4389 | + CopyChanged(); |
---|
| 4390 | + |
---|
| 4391 | + return true; |
---|
3397 | 4392 | } |
---|
3398 | 4393 | |
---|
3399 | | - public void Redo() |
---|
| 4394 | + public boolean Restore() |
---|
3400 | 4395 | { |
---|
3401 | | - cRadio tab = GetCurrentTab(); |
---|
| 4396 | + System.err.println("Restore"); |
---|
3402 | 4397 | |
---|
3403 | | - if (tab.graphs[tab.undoindex + 1] == null) |
---|
| 4398 | + //cRadio tab = GetCurrentTab(); |
---|
| 4399 | + |
---|
| 4400 | + if (copy.versionindex == -1 || copy.versionlist[copy.versionindex] == null) |
---|
| 4401 | + { |
---|
| 4402 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 4403 | + return false; |
---|
| 4404 | + } |
---|
| 4405 | + |
---|
| 4406 | + //CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex])); |
---|
| 4407 | + CopyChanged(); |
---|
| 4408 | + |
---|
| 4409 | + return true; |
---|
| 4410 | + } |
---|
| 4411 | + |
---|
| 4412 | + public boolean Replace() |
---|
| 4413 | + { |
---|
| 4414 | + System.err.println("Replace"); |
---|
| 4415 | + |
---|
| 4416 | + //cRadio tab = GetCurrentTab(); |
---|
| 4417 | + |
---|
| 4418 | + if (copy.versionindex == -1 || copy.versionlist[copy.versionindex] == null) |
---|
| 4419 | + { |
---|
| 4420 | + // No version yet. OK. java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 4421 | + return false; |
---|
| 4422 | + } |
---|
| 4423 | + |
---|
| 4424 | + copy.versionlist[copy.versionindex] = Duplicate(copy); |
---|
| 4425 | + |
---|
| 4426 | + return true; |
---|
| 4427 | + } |
---|
| 4428 | + |
---|
| 4429 | + public void NextVersion() |
---|
| 4430 | + { |
---|
| 4431 | + // Option? |
---|
| 4432 | + Replace(); |
---|
| 4433 | + |
---|
| 4434 | + //cRadio tab = GetCurrentTab(); |
---|
| 4435 | + |
---|
| 4436 | + if (copy.versionlist[copy.versionindex + 1] == null) |
---|
3404 | 4437 | { |
---|
3405 | 4438 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
3406 | 4439 | return; |
---|
3407 | 4440 | } |
---|
3408 | 4441 | |
---|
3409 | | - tab.undoindex += 1; |
---|
| 4442 | + copy.versionindex += 1; |
---|
3410 | 4443 | |
---|
3411 | | - CopyChanged(tab.graphs[tab.undoindex]); |
---|
| 4444 | + CopyChanged(); |
---|
| 4445 | + |
---|
| 4446 | + //if (!tab.user[tab.versionindex]) |
---|
| 4447 | + // tab.graphs[tab.versionindex] = null; |
---|
3412 | 4448 | } |
---|
3413 | 4449 | |
---|
3414 | 4450 | void ImportGFD() |
---|
.. | .. |
---|
3560 | 4596 | assert false; |
---|
3561 | 4597 | } |
---|
3562 | 4598 | |
---|
3563 | | - void EditSelection() |
---|
| 4599 | + void EditSelection(boolean newWindow) |
---|
3564 | 4600 | { |
---|
3565 | 4601 | } |
---|
3566 | 4602 | |
---|
.. | .. |
---|
3619 | 4655 | //copy.material = new cMaterial(copy.GetMaterial()); |
---|
3620 | 4656 | |
---|
3621 | 4657 | current.color = (float) colorField.getFloat(); |
---|
3622 | | - current.modulation = (float) modulationField.getFloat(); |
---|
| 4658 | + current.modulation = (float) saturationField.getFloat(); |
---|
3623 | 4659 | current.metalness = (float) metalnessField.getFloat(); |
---|
3624 | 4660 | current.diffuse = (float) diffuseField.getFloat(); |
---|
3625 | 4661 | current.specular = (float) specularField.getFloat(); |
---|
.. | .. |
---|
3652 | 4688 | cMaterial mat = copy.material; |
---|
3653 | 4689 | |
---|
3654 | 4690 | colorField.SetToolTipValue((mat.color)); |
---|
3655 | | - modulationField.SetToolTipValue((mat.modulation)); |
---|
| 4691 | + saturationField.SetToolTipValue((mat.modulation)); |
---|
3656 | 4692 | metalnessField.SetToolTipValue((mat.metalness)); |
---|
3657 | 4693 | diffuseField.SetToolTipValue((mat.diffuse)); |
---|
3658 | 4694 | specularField.SetToolTipValue((mat.specular)); |
---|
.. | .. |
---|
3704 | 4740 | //copy.Touch(); |
---|
3705 | 4741 | } |
---|
3706 | 4742 | |
---|
| 4743 | + cNumberSlider versionSlider; |
---|
| 4744 | + |
---|
3707 | 4745 | public void stateChanged(ChangeEvent e) |
---|
3708 | 4746 | { |
---|
3709 | 4747 | // assert(false); |
---|
| 4748 | + if (e.getSource() == versionSlider) |
---|
| 4749 | + { |
---|
| 4750 | + if (muteSlider) |
---|
| 4751 | + return; |
---|
| 4752 | + |
---|
| 4753 | + int version = versionSlider.getInteger(); |
---|
| 4754 | + |
---|
| 4755 | + if (version != -1 && copy.versionlist[version] != null) |
---|
| 4756 | + { |
---|
| 4757 | + copy.versionindex = version; |
---|
| 4758 | + CopyChanged(); |
---|
| 4759 | + } |
---|
| 4760 | + |
---|
| 4761 | + return; |
---|
| 4762 | + } |
---|
3710 | 4763 | |
---|
3711 | 4764 | if (freezematerial) |
---|
3712 | 4765 | { |
---|
.. | .. |
---|
3742 | 4795 | { |
---|
3743 | 4796 | //System.out.println("stateChanged = " + this); |
---|
3744 | 4797 | materialtouched = true; |
---|
| 4798 | + |
---|
| 4799 | + if (Globals.AUTOSATURATE && e.getSource() == colorField && saturationField.getFloat() == 0.001) |
---|
| 4800 | + { |
---|
| 4801 | + saturationField.setFloat(1); |
---|
| 4802 | + } |
---|
| 4803 | + |
---|
3745 | 4804 | applySelf(); |
---|
3746 | 4805 | //System.out.println("this = " + this); |
---|
3747 | 4806 | //System.out.println("PARENT = " + parent); |
---|
.. | .. |
---|
4041 | 5100 | { |
---|
4042 | 5101 | if (GetTree() != null) |
---|
4043 | 5102 | { |
---|
| 5103 | + GetTree().revalidate(); |
---|
4044 | 5104 | GetTree().repaint(); |
---|
4045 | 5105 | } |
---|
4046 | 5106 | |
---|
.. | .. |
---|
4049 | 5109 | ctrlPanel.validate(); // ? new |
---|
4050 | 5110 | ctrlPanel.repaint(); |
---|
4051 | 5111 | } |
---|
| 5112 | + |
---|
| 5113 | + if (previousVersionButton != null && copy.versionlist != null) |
---|
| 5114 | + SetUndoStates(); |
---|
4052 | 5115 | } |
---|
4053 | 5116 | |
---|
4054 | 5117 | static TweenManager tweenManager = new TweenManager(); |
---|
4055 | 5118 | |
---|
4056 | 5119 | void makeSomething(Object3D thing, boolean resetmodel) // deselect) |
---|
4057 | 5120 | { |
---|
4058 | | - Save(); |
---|
| 5121 | + if (Globals.REPLACEONMAKE) // && resetmodel) |
---|
| 5122 | + Save(); |
---|
4059 | 5123 | //Tween.set(thing, 0).target(1).start(tweenManager); |
---|
4060 | 5124 | //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager); |
---|
4061 | 5125 | // if (thing instanceof GenericJointDemo) |
---|
.. | .. |
---|
4142 | 5206 | { |
---|
4143 | 5207 | ResetModel(); |
---|
4144 | 5208 | Select(thing.GetTreePath(), true, false); // unselect... false); |
---|
| 5209 | + |
---|
| 5210 | + if (thing.Size() == 0) |
---|
| 5211 | + { |
---|
| 5212 | + //EditSelection(false); |
---|
| 5213 | + } |
---|
| 5214 | + |
---|
4145 | 5215 | refreshContents(); |
---|
4146 | 5216 | } |
---|
4147 | 5217 | |
---|
.. | .. |
---|
4279 | 5349 | |
---|
4280 | 5350 | try |
---|
4281 | 5351 | { |
---|
| 5352 | + // Try compressed version first. |
---|
4282 | 5353 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
4283 | 5354 | java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream); |
---|
4284 | 5355 | java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream); |
---|
.. | .. |
---|
4289 | 5360 | readobj.ResetDisplayList(); |
---|
4290 | 5361 | } catch (Exception e) |
---|
4291 | 5362 | { |
---|
4292 | | - //e.printStackTrace(); |
---|
| 5363 | + if (!e.toString().contains("GZIP")) |
---|
| 5364 | + e.printStackTrace(); |
---|
| 5365 | + |
---|
4293 | 5366 | try |
---|
4294 | 5367 | { |
---|
4295 | 5368 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
.. | .. |
---|
4348 | 5421 | |
---|
4349 | 5422 | void LoadIt(Object obj) |
---|
4350 | 5423 | { |
---|
| 5424 | + if (obj == null) |
---|
| 5425 | + { |
---|
| 5426 | + // Invalid file |
---|
| 5427 | + return; |
---|
| 5428 | + } |
---|
| 5429 | + |
---|
4351 | 5430 | System.out.println("Loaded " + obj); |
---|
4352 | 5431 | //new Exception().printStackTrace(); |
---|
4353 | 5432 | Object3D readobj = (Object3D) obj; |
---|
.. | .. |
---|
4357 | 5436 | |
---|
4358 | 5437 | if (readobj != null) |
---|
4359 | 5438 | { |
---|
4360 | | - Save(); |
---|
| 5439 | + //if (Globals.SAVEONMAKE) // A new object cannot share meshes |
---|
| 5440 | + // Save(); |
---|
4361 | 5441 | try |
---|
4362 | 5442 | { |
---|
4363 | 5443 | //readobj.deepCopySelf(copy); |
---|
4364 | 5444 | copy.clear(); // june 2014 |
---|
| 5445 | + copy.skyboxname = readobj.skyboxname; |
---|
| 5446 | + copy.skyboxext = readobj.skyboxext; |
---|
4365 | 5447 | for (int i = 0; i < readobj.size(); i++) |
---|
4366 | 5448 | { |
---|
4367 | 5449 | Object3D child = readobj.get(i); // reserve(i); |
---|
.. | .. |
---|
4402 | 5484 | } |
---|
4403 | 5485 | } catch (ClassCastException e) |
---|
4404 | 5486 | { |
---|
| 5487 | + e.printStackTrace(); |
---|
4405 | 5488 | assert (false); |
---|
4406 | 5489 | Composite c = (Composite) copy; |
---|
4407 | 5490 | c.children.clear(); |
---|
.. | .. |
---|
4412 | 5495 | c.addChild(csg); |
---|
4413 | 5496 | } |
---|
4414 | 5497 | |
---|
| 5498 | + copy.versionlist = readobj.versionlist; |
---|
| 5499 | + copy.versionindex = readobj.versionindex; |
---|
| 5500 | + |
---|
| 5501 | + if (copy.versionlist == null) |
---|
| 5502 | + { |
---|
| 5503 | + // Backward compatibility |
---|
| 5504 | + copy.versionlist = new Object3D[100]; |
---|
| 5505 | + copy.versionindex = -1; |
---|
| 5506 | + |
---|
| 5507 | + Save(true); |
---|
| 5508 | + } |
---|
| 5509 | + |
---|
| 5510 | + //? SetUndoStates(); |
---|
| 5511 | + |
---|
4415 | 5512 | ResetModel(); |
---|
4416 | 5513 | copy.HardTouch(); // recompile? |
---|
4417 | 5514 | refreshContents(); |
---|
4418 | 5515 | } |
---|
4419 | 5516 | } |
---|
4420 | 5517 | |
---|
4421 | | - void load() // throws ClassNotFoundException |
---|
| 5518 | + void Open() // throws ClassNotFoundException |
---|
4422 | 5519 | { |
---|
4423 | 5520 | if (Grafreed.standAlone) |
---|
4424 | 5521 | { |
---|
4425 | | - FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); |
---|
| 5522 | + FileDialog browser = new FileDialog(frame, "Open", FileDialog.LOAD); |
---|
4426 | 5523 | browser.show(); |
---|
4427 | 5524 | String filename = browser.getFile(); |
---|
4428 | 5525 | if (filename != null && filename.length() > 0) |
---|
.. | .. |
---|
4521 | 5618 | //ps.print(buffer.toString()); |
---|
4522 | 5619 | } catch (IOException e) |
---|
4523 | 5620 | { |
---|
| 5621 | + e.printStackTrace(); |
---|
4524 | 5622 | } |
---|
4525 | 5623 | } |
---|
4526 | 5624 | |
---|
.. | .. |
---|
4535 | 5633 | String filename = browser.getFile(); |
---|
4536 | 5634 | if (filename != null && filename.length() > 0) |
---|
4537 | 5635 | { |
---|
| 5636 | + if (!filename.endsWith(".gfd")) |
---|
| 5637 | + filename += ".gfd"; |
---|
4538 | 5638 | lastname = browser.getDirectory() + filename; |
---|
4539 | 5639 | save(); |
---|
4540 | 5640 | } |
---|
.. | .. |
---|
4701 | 5801 | MenuBar menuBar; |
---|
4702 | 5802 | Menu fileMenu; |
---|
4703 | 5803 | MenuItem newItem; |
---|
4704 | | - MenuItem loadItem; |
---|
| 5804 | + MenuItem openItem; |
---|
4705 | 5805 | MenuItem saveItem; |
---|
4706 | 5806 | MenuItem saveAsItem; |
---|
4707 | 5807 | MenuItem exportAsItem; |
---|
.. | .. |
---|
4724 | 5824 | CheckboxMenuItem toggleSwitchItem; |
---|
4725 | 5825 | CheckboxMenuItem toggleRootItem; |
---|
4726 | 5826 | CheckboxMenuItem animationItem; |
---|
| 5827 | + MenuItem archiveItem; |
---|
4727 | 5828 | CheckboxMenuItem toggleHandleItem; |
---|
4728 | 5829 | CheckboxMenuItem togglePaintItem; |
---|
4729 | 5830 | JSplitPane mainPanel; |
---|
4730 | 5831 | JScrollPane scrollpane; |
---|
| 5832 | + |
---|
4731 | 5833 | JPanel toolbarPanel; |
---|
| 5834 | + |
---|
4732 | 5835 | cGridBag treePanel; |
---|
| 5836 | + |
---|
4733 | 5837 | JPanel radioPanel; |
---|
4734 | 5838 | ButtonGroup buttonGroup; |
---|
4735 | | - cGridBag ctrlPanel; |
---|
| 5839 | + |
---|
| 5840 | + cGridBag toolboxPanel; |
---|
| 5841 | + cGridBag skyboxPanel; |
---|
4736 | 5842 | cGridBag materialPanel; |
---|
| 5843 | + cGridBag ctrlPanel; |
---|
| 5844 | + |
---|
4737 | 5845 | JScrollPane infoPanel; |
---|
| 5846 | + |
---|
4738 | 5847 | cGridBag optionsPanel; |
---|
| 5848 | + |
---|
4739 | 5849 | JTabbedPane objectPanel; |
---|
| 5850 | + boolean materialFlushed; |
---|
| 5851 | + Object3D latestObject; |
---|
| 5852 | + |
---|
4740 | 5853 | cGridBag XYZPanel; |
---|
| 5854 | + |
---|
4741 | 5855 | JSplitPane gridPanel; |
---|
4742 | 5856 | JSplitPane bigPanel; |
---|
| 5857 | + |
---|
4743 | 5858 | cGridBag bigThree; |
---|
4744 | 5859 | cGridBag scenePanel; |
---|
4745 | 5860 | cGridBag centralPanel; |
---|
.. | .. |
---|
4797 | 5912 | JLabel colorLabel; |
---|
4798 | 5913 | cNumberSlider colorField; |
---|
4799 | 5914 | JLabel modulationLabel; |
---|
4800 | | - cNumberSlider modulationField; |
---|
| 5915 | + cNumberSlider saturationField; |
---|
4801 | 5916 | JLabel metalnessLabel; |
---|
4802 | 5917 | cNumberSlider metalnessField; |
---|
4803 | 5918 | JLabel diffuseLabel; |
---|
.. | .. |
---|
4828 | 5943 | cNumberSlider anisoField; |
---|
4829 | 5944 | JLabel anisoVLabel; |
---|
4830 | 5945 | cNumberSlider anisoVField; |
---|
| 5946 | + |
---|
4831 | 5947 | JLabel cameraLabel; |
---|
4832 | 5948 | cNumberSlider cameraField; |
---|
4833 | 5949 | JLabel selfshadowLabel; |
---|
.. | .. |
---|
4842 | 5958 | cNumberSlider fakedepthField; |
---|
4843 | 5959 | JLabel shadowbiasLabel; |
---|
4844 | 5960 | cNumberSlider shadowbiasField; |
---|
| 5961 | + |
---|
4845 | 5962 | JLabel bumpLabel; |
---|
4846 | 5963 | cNumberSlider bumpField; |
---|
4847 | 5964 | JLabel noiseLabel; |
---|
.. | .. |
---|
4854 | 5971 | cNumberSlider fogField; |
---|
4855 | 5972 | JLabel opacityPowerLabel; |
---|
4856 | 5973 | cNumberSlider opacityPowerField; |
---|
4857 | | - JTree jTree; |
---|
| 5974 | + cTree jTree; |
---|
4858 | 5975 | //ObjectUI parent; |
---|
4859 | 5976 | |
---|
4860 | 5977 | cNumberSlider normalpushField; |
---|