.. | .. |
---|
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 | + String name; |
---|
| 437 | + |
---|
| 438 | + public void stateChanged(ChangeEvent changeEvent) |
---|
| 439 | + { |
---|
| 440 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Material") && !materialFlushed) |
---|
| 441 | +// { |
---|
| 442 | +// if (latestObject != null) |
---|
| 443 | +// { |
---|
| 444 | +// refreshContents(true); |
---|
| 445 | +// SetMaterial(latestObject); |
---|
| 446 | +// } |
---|
| 447 | +// |
---|
| 448 | +// materialFlushed = true; |
---|
| 449 | +// } |
---|
| 450 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Edit")) |
---|
| 451 | +// { |
---|
| 452 | +// if (listUI.size() == 0) |
---|
| 453 | +// EditSelection(false); |
---|
| 454 | +// } |
---|
| 455 | + |
---|
| 456 | + if (objectPanel.getSelectedIndex() == 4) |
---|
| 457 | + { |
---|
| 458 | + name = copy.skyboxname; |
---|
| 459 | + |
---|
| 460 | + if (name == null) |
---|
| 461 | + { |
---|
| 462 | + name = ""; |
---|
| 463 | + } |
---|
| 464 | + |
---|
| 465 | + copy.skyboxname = "cubemaps/default-skyboxes/rgb"; |
---|
| 466 | + copy.skyboxext = "jpg"; |
---|
| 467 | + } |
---|
| 468 | + else |
---|
| 469 | + { |
---|
| 470 | + if (name != null) |
---|
| 471 | + { |
---|
| 472 | + if (name.equals("")) |
---|
| 473 | + { |
---|
| 474 | + copy.skyboxname = null; |
---|
| 475 | + copy.skyboxext = null; |
---|
| 476 | + } |
---|
| 477 | + else |
---|
| 478 | + { |
---|
| 479 | + copy.skyboxname = name; |
---|
| 480 | + } |
---|
| 481 | + } |
---|
| 482 | + } |
---|
| 483 | + |
---|
| 484 | +// refreshContents(false); // To refresh Info tab |
---|
| 485 | + cameraView.repaint(); |
---|
| 486 | + } |
---|
| 487 | + }; |
---|
| 488 | + objectPanel.addChangeListener(changeListener); |
---|
| 489 | + |
---|
322 | 490 | toolbarPanel = new JPanel(); |
---|
323 | 491 | toolbarPanel.setName("Toolbar"); |
---|
| 492 | + |
---|
324 | 493 | treePanel = new cGridBag(); |
---|
325 | 494 | treePanel.setName("Tree"); |
---|
| 495 | + |
---|
| 496 | + editPanel = new cGridBag().setVertical(true); |
---|
| 497 | + //editPanel.setName("Edit"); |
---|
| 498 | + |
---|
326 | 499 | ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
---|
327 | | - ctrlPanel.setName("Edit"); |
---|
328 | | - materialPanel = new cGridBag().setVertical(true); |
---|
329 | | - materialPanel.setName("Material"); |
---|
| 500 | + |
---|
| 501 | + editCommandsPanel = new cGridBag(); |
---|
| 502 | + editPanel.add(editCommandsPanel); |
---|
| 503 | + editPanel.add(ctrlPanel); |
---|
| 504 | + |
---|
| 505 | + toolboxPanel = new cGridBag().setVertical(true); |
---|
| 506 | + //toolboxPanel.setName("Toolbox"); |
---|
| 507 | + |
---|
| 508 | + skyboxPanel = new cGridBag().setVertical(true); |
---|
| 509 | + |
---|
| 510 | + materialPanel = new cGridBag().setVertical(false); |
---|
| 511 | + //materialPanel.setName("Material"); |
---|
| 512 | + |
---|
330 | 513 | /*JTextPane*/ |
---|
331 | 514 | infoarea = createTextPane(); |
---|
332 | 515 | doc = infoarea.getStyledDocument(); |
---|
333 | 516 | |
---|
334 | 517 | infoarea.setEditable(true); |
---|
335 | 518 | SetText(); |
---|
| 519 | + |
---|
336 | 520 | // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f)); |
---|
337 | 521 | // infoarea.setOpaque(false); |
---|
338 | 522 | // //infoarea.setForeground(textcolor); |
---|
339 | 523 | // TEXTAREA infoarea.setLineWrap(true); |
---|
340 | 524 | // TEXTAREA infoarea.setWrapStyleWord(true); |
---|
341 | 525 | 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"); |
---|
| 526 | + infoPanel.setPreferredSize(new Dimension(1, 1)); |
---|
| 527 | + //infoPanel.setName("Info"); |
---|
344 | 528 | //infoPanel.setLayout(new BorderLayout()); |
---|
345 | 529 | //infoPanel.add(createTextPane()); |
---|
346 | 530 | |
---|
.. | .. |
---|
351 | 535 | mainPanel.setDividerSize(9); |
---|
352 | 536 | mainPanel.setDividerLocation(0.5); //1.0); |
---|
353 | 537 | mainPanel.setResizeWeight(0.5); |
---|
354 | | - |
---|
| 538 | + |
---|
| 539 | +//mainPanel.setDividerSize((int) (mainPanel.getDividerSize() * 1.5)); |
---|
| 540 | + BasicSplitPaneDivider divider = ( (BasicSplitPaneUI) mainPanel.getUI()).getDivider(); |
---|
| 541 | + divider.setDividerSize(15); |
---|
| 542 | + divider.setBorder(BorderFactory.createTitledBorder(divider.getBorder(), "Custom border title -- gets rid of the one-touch arrows!")); |
---|
| 543 | + |
---|
| 544 | + mainPanel.setUI(new BasicSplitPaneUI()); |
---|
| 545 | + |
---|
355 | 546 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
---|
356 | 547 | //mainPanel.setLayout(new GridBagLayout()); |
---|
357 | 548 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
.. | .. |
---|
419 | 610 | e.printStackTrace(); |
---|
420 | 611 | } |
---|
421 | 612 | |
---|
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(); |
---|
| 613 | +// String selection = infoarea.getText(); |
---|
| 614 | +// java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection); |
---|
| 615 | +// java.awt.datatransfer.Clipboard clipboard = |
---|
| 616 | +// Toolkit.getDefaultToolkit().getSystemClipboard(); |
---|
426 | 617 | //clipboard.setContents(data, data); |
---|
427 | 618 | } |
---|
428 | 619 | |
---|
.. | .. |
---|
582 | 773 | } |
---|
583 | 774 | } |
---|
584 | 775 | |
---|
| 776 | +//static GraphicsDevice device = GraphicsEnvironment |
---|
| 777 | +// .getLocalGraphicsEnvironment().getScreenDevices()[0]; |
---|
| 778 | + |
---|
| 779 | + Rectangle keeprect; |
---|
| 780 | + cRadio radio; |
---|
| 781 | + |
---|
| 782 | +cButton keepButton; |
---|
| 783 | + cButton twoButton; // Full 3D |
---|
| 784 | + cButton sixButton; |
---|
| 785 | + cButton threeButton; |
---|
| 786 | + cButton sevenButton; |
---|
| 787 | + cButton fourButton; // full panel |
---|
| 788 | + cButton oneButton; // full XYZ |
---|
| 789 | + //cButton currentLayout; |
---|
| 790 | + |
---|
| 791 | + boolean maximized; |
---|
| 792 | + |
---|
| 793 | + cButton fullscreenLayout; |
---|
| 794 | + cButton expandedLayout; |
---|
| 795 | + |
---|
| 796 | + void Minimize() |
---|
| 797 | + { |
---|
| 798 | + frame.setState(Frame.ICONIFIED); |
---|
| 799 | + frame.validate(); |
---|
| 800 | + } |
---|
| 801 | + |
---|
| 802 | +// artifactURI=null, type=0, property=${file.reference.jfxrt.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@6767876f, broken=false, additional={} |
---|
| 803 | +// artifactURI=null, type=0, property=${file.reference.mac-ui.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@16bdc817, broken=false, additional={} |
---|
| 804 | +// artifactURI=null, type=0, property=${file.reference.classes.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@9daa9c17, broken=false, additional={} |
---|
| 805 | + void Maximize() |
---|
| 806 | + { |
---|
| 807 | + if (CameraPane.FULLSCREEN) |
---|
| 808 | + { |
---|
| 809 | + ToggleFullScreen(); |
---|
| 810 | + } |
---|
| 811 | + |
---|
| 812 | + if (maximized) |
---|
| 813 | + { |
---|
| 814 | + frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); |
---|
| 815 | + } |
---|
| 816 | + else |
---|
| 817 | + { |
---|
| 818 | + keeprect = frame.getBounds(); |
---|
| 819 | +// Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); |
---|
| 820 | +// Dimension rect2 = frame.getToolkit().getScreenSize(); |
---|
| 821 | +// frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height); |
---|
| 822 | +// frame.setState(Frame.MAXIMIZED_BOTH); |
---|
| 823 | + frame.setBounds(frame.getGraphicsConfiguration().getBounds()); |
---|
| 824 | + } |
---|
| 825 | + |
---|
| 826 | + maximized ^= true; |
---|
| 827 | + |
---|
| 828 | + frame.validate(); |
---|
| 829 | + } |
---|
| 830 | + |
---|
| 831 | + cButton minButton; |
---|
| 832 | + cButton maxButton; |
---|
| 833 | + cButton fullButton; |
---|
| 834 | + cButton collapseButton; |
---|
| 835 | + cButton maximize3DButton; |
---|
| 836 | + |
---|
585 | 837 | void ToggleFullScreen() |
---|
586 | 838 | { |
---|
587 | | - if (CameraPane.FULLSCREEN) |
---|
| 839 | + GraphicsDevice device = frame.getGraphicsConfiguration().getDevice(); |
---|
| 840 | + |
---|
| 841 | + cameraView.ToggleFullScreen(); |
---|
| 842 | + |
---|
| 843 | + if (!CameraPane.FULLSCREEN) |
---|
588 | 844 | { |
---|
589 | | - frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
590 | | - framePanel.add(bigThree); |
---|
591 | | - frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 845 | + device.setFullScreenWindow(null); |
---|
| 846 | + frame.dispose(); |
---|
| 847 | + frame.setUndecorated(false); |
---|
| 848 | + frame.validate(); |
---|
| 849 | + frame.setVisible(true); |
---|
| 850 | + |
---|
| 851 | + //frame.setVisible(false); |
---|
| 852 | +// frame.removeNotify(); |
---|
| 853 | +// frame.setUndecorated(false); |
---|
| 854 | +// frame.addNotify(); |
---|
| 855 | + //frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); |
---|
| 856 | + |
---|
| 857 | +// X frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
| 858 | +// X framePanel.add(bigThree); |
---|
| 859 | +// X frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 860 | +// framePanel.setDividerLocation(46); // icons are 24x24 |
---|
| 861 | + |
---|
| 862 | + //frame.setVisible(true); |
---|
| 863 | +// radio.layout = keepButton; |
---|
| 864 | + //theFrame = null; |
---|
| 865 | + keepButton = null; |
---|
| 866 | +// radio.layout.doClick(); |
---|
| 867 | + |
---|
592 | 868 | } else |
---|
593 | 869 | { |
---|
594 | | - frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
595 | | - framePanel.remove(bigThree); |
---|
596 | | - frame.getContentPane().add(/*"Center",*/bigThree); |
---|
| 870 | + keepButton = radio.layout; |
---|
| 871 | + //keeprect = frame.getBounds(); |
---|
| 872 | +// frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width, |
---|
| 873 | +// frame.getToolkit().getScreenSize().height); |
---|
| 874 | + //frame.setVisible(false); |
---|
| 875 | + |
---|
| 876 | + frame.dispose(); |
---|
| 877 | + frame.setUndecorated(true); |
---|
| 878 | + device.setFullScreenWindow(frame); |
---|
| 879 | + frame.validate(); |
---|
| 880 | + frame.setVisible(true); |
---|
| 881 | +// frame.removeNotify(); |
---|
| 882 | +// frame.setUndecorated(true); |
---|
| 883 | +// frame.addNotify(); |
---|
| 884 | +// X frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
| 885 | +// X framePanel.remove(bigThree); |
---|
| 886 | +// X frame.getContentPane().add(/*"Center",*/bigThree); |
---|
| 887 | +// framePanel.setDividerLocation(0); |
---|
| 888 | + |
---|
| 889 | +// radio.layout = fullscreenLayout; |
---|
| 890 | +// radio.layout.doClick(); |
---|
| 891 | + //frame.setVisible(true); |
---|
597 | 892 | } |
---|
598 | | - cameraView.ToggleFullScreen(); |
---|
| 893 | + frame.validate(); |
---|
| 894 | + |
---|
| 895 | + cameraView.requestFocusInWindow(); |
---|
599 | 896 | } |
---|
| 897 | + |
---|
| 898 | + void CollapseToolbar() |
---|
| 899 | + { |
---|
| 900 | + framePanel.setDividerLocation(0); |
---|
| 901 | + //frame.validate(); |
---|
| 902 | + |
---|
| 903 | + cameraView.requestFocusInWindow(); |
---|
| 904 | + } |
---|
| 905 | + |
---|
| 906 | + private Object3D Duplicate(Object3D object) |
---|
| 907 | + { |
---|
| 908 | + boolean temp = CameraPane.SWITCH; |
---|
| 909 | + CameraPane.SWITCH = false; |
---|
| 910 | + |
---|
| 911 | + object.ExtractBigData(versiontable); |
---|
| 912 | + // if (copy == client) |
---|
| 913 | + |
---|
| 914 | + Object3D versions[] = object.versionlist; |
---|
| 915 | + object.versionlist = null; |
---|
| 916 | + |
---|
| 917 | + //byte[] compress = Compress(copy); |
---|
| 918 | + Object3D compress = (Object3D)Grafreed.clone(object); |
---|
| 919 | + |
---|
| 920 | + object.versionlist = versions; |
---|
| 921 | + |
---|
| 922 | + object.RestoreBigData(versiontable); |
---|
| 923 | + |
---|
| 924 | + CameraPane.SWITCH = temp; |
---|
| 925 | + |
---|
| 926 | + return compress; |
---|
| 927 | + } |
---|
600 | 928 | |
---|
601 | 929 | private JTextPane createTextPane() |
---|
602 | 930 | { |
---|
.. | .. |
---|
719 | 1047 | { |
---|
720 | 1048 | SetupMaterial(materialPanel); |
---|
721 | 1049 | } |
---|
| 1050 | + |
---|
722 | 1051 | //SetupName(); |
---|
723 | 1052 | //SetupViews(); |
---|
724 | 1053 | } |
---|
.. | .. |
---|
728 | 1057 | // NumberSlider vDivsField; |
---|
729 | 1058 | // JCheckBox endcaps; |
---|
730 | 1059 | JCheckBox liveCB; |
---|
731 | | - JCheckBox selectCB; |
---|
| 1060 | + JCheckBox selectableCB; |
---|
732 | 1061 | JCheckBox hideCB; |
---|
733 | 1062 | JCheckBox link2masterCB; |
---|
734 | 1063 | JCheckBox markCB; |
---|
.. | .. |
---|
736 | 1065 | JCheckBox speedupCB; |
---|
737 | 1066 | JCheckBox rewindCB; |
---|
738 | 1067 | JCheckBox flipVCB; |
---|
| 1068 | + |
---|
| 1069 | + cCheckBox toggleTextureCB; |
---|
| 1070 | + cCheckBox toggleSwitchCB; |
---|
| 1071 | + |
---|
739 | 1072 | JComboBox texresMenu; |
---|
| 1073 | + |
---|
740 | 1074 | JButton resetButton; |
---|
741 | 1075 | JButton stepButton; |
---|
742 | 1076 | JButton stepAllButton; |
---|
.. | .. |
---|
745 | 1079 | JButton fasterButton; |
---|
746 | 1080 | JButton remarkButton; |
---|
747 | 1081 | |
---|
| 1082 | + cGridBag editPanel; |
---|
| 1083 | + cGridBag editCommandsPanel; |
---|
| 1084 | + |
---|
748 | 1085 | cGridBag namePanel; |
---|
749 | 1086 | cGridBag setupPanel; |
---|
750 | | - cGridBag commandsPanel; |
---|
| 1087 | + cGridBag setupPanel2; |
---|
| 1088 | + cGridBag objectCommandsPanel; |
---|
751 | 1089 | cGridBag pushPanel; |
---|
752 | 1090 | cGridBag fillPanel; |
---|
753 | 1091 | |
---|
.. | .. |
---|
918 | 1256 | |
---|
919 | 1257 | namePanel = new cGridBag(); |
---|
920 | 1258 | |
---|
| 1259 | + //if (copy.pinned) |
---|
| 1260 | + { |
---|
| 1261 | + pinButton = GetToggleButton("icons/pin.png", !Grafreed.NIMBUSLAF); |
---|
| 1262 | + pinButton.setSelected(copy.pinned); |
---|
| 1263 | + cGridBag t = new cGridBag(); |
---|
| 1264 | + t.preferredWidth = 2; |
---|
| 1265 | + t.add(pinButton); |
---|
| 1266 | + namePanel.add(t); |
---|
| 1267 | + |
---|
| 1268 | + pinButton.addItemListener(this); |
---|
| 1269 | + } |
---|
| 1270 | + |
---|
921 | 1271 | nameField = AddText(namePanel, copy.GetName()); |
---|
922 | | - namePanel.add(nameField); |
---|
| 1272 | + namePanel.add(new JScrollPane(nameField, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER)); |
---|
923 | 1273 | oe.ctrlPanel.add(namePanel); |
---|
924 | 1274 | |
---|
925 | 1275 | oe.ctrlPanel.Return(); |
---|
926 | 1276 | |
---|
927 | | - if (!GroupEditor.allparams) |
---|
| 1277 | + if (!allparams) |
---|
928 | 1278 | return; |
---|
929 | 1279 | |
---|
930 | 1280 | setupPanel = new cGridBag().setVertical(false); |
---|
931 | 1281 | |
---|
932 | 1282 | liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
933 | 1283 | liveCB.setToolTipText("Animate object"); |
---|
934 | | - selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
935 | | - selectCB.setToolTipText("Make object selectable"); |
---|
| 1284 | + selectableCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
| 1285 | + selectableCB.setToolTipText("Make object selectable"); |
---|
936 | 1286 | // Return(); |
---|
| 1287 | + |
---|
937 | 1288 | hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
938 | 1289 | hideCB.setToolTipText("Hide object"); |
---|
939 | 1290 | markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
940 | | - markCB.setToolTipText("Set the animation target transform"); |
---|
| 1291 | + markCB.setToolTipText("As animation target transform"); |
---|
941 | 1292 | |
---|
942 | | - rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind); |
---|
| 1293 | + ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false); |
---|
| 1294 | + |
---|
| 1295 | + setupPanel2 = new cGridBag().setVertical(false); |
---|
| 1296 | + |
---|
| 1297 | + rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind); |
---|
943 | 1298 | rewindCB.setToolTipText("Rewind animation"); |
---|
944 | 1299 | |
---|
945 | | - randomCB = AddCheckBox(setupPanel, "Random", copy.random); |
---|
946 | | - randomCB.setToolTipText("Option for switch node"); |
---|
| 1300 | + randomCB = AddCheckBox(setupPanel2, "Random", copy.random); |
---|
| 1301 | + randomCB.setToolTipText("Randomly Rewind (or Go back and forth)"); |
---|
947 | 1302 | |
---|
| 1303 | + link2masterCB = AddCheckBox(setupPanel2, "Support", copy.link2master); |
---|
| 1304 | + link2masterCB.setToolTipText("Attach to support"); |
---|
| 1305 | + |
---|
948 | 1306 | if (Globals.ADVANCED) |
---|
949 | 1307 | { |
---|
950 | | - link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master); |
---|
951 | | - link2masterCB.setToolTipText("Attach to support"); |
---|
952 | | - speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup); |
---|
| 1308 | + speedupCB = AddCheckBox(setupPanel2, "Speed", copy.speedup); |
---|
953 | 1309 | speedupCB.setToolTipText("Option motion capture"); |
---|
954 | 1310 | } |
---|
955 | 1311 | |
---|
956 | 1312 | oe.ctrlPanel.add(setupPanel); |
---|
957 | 1313 | oe.ctrlPanel.Return(); |
---|
| 1314 | + oe.ctrlPanel.add(setupPanel2); |
---|
| 1315 | + oe.ctrlPanel.Return(); |
---|
958 | 1316 | |
---|
959 | | - commandsPanel = new cGridBag().setVertical(false); |
---|
| 1317 | + objectCommandsPanel = new cGridBag().setVertical(false); |
---|
960 | 1318 | |
---|
961 | | - resetButton = AddButton(commandsPanel, "Reset"); |
---|
| 1319 | + resetButton = AddButton(objectCommandsPanel, "Reset"); |
---|
962 | 1320 | resetButton.setToolTipText("Jump to frame zero"); |
---|
963 | | - stepButton = AddButton(commandsPanel, "Step"); |
---|
| 1321 | + stepButton = AddButton(objectCommandsPanel, "Step"); |
---|
964 | 1322 | stepButton.setToolTipText("Step one frame"); |
---|
965 | 1323 | // resetAllButton = AddButton(oe, "Reset All"); |
---|
966 | 1324 | // stepAllButton = AddButton(oe, "Step All"); |
---|
967 | 1325 | // Return(); |
---|
968 | | - slowerButton = AddButton(commandsPanel, "Slow"); |
---|
| 1326 | + slowerButton = AddButton(objectCommandsPanel, "Slow"); |
---|
969 | 1327 | slowerButton.setToolTipText("Decrease animation speed"); |
---|
970 | | - fasterButton = AddButton(commandsPanel, "Fast"); |
---|
| 1328 | + fasterButton = AddButton(objectCommandsPanel, "Fast"); |
---|
971 | 1329 | fasterButton.setToolTipText("Increase animation speed"); |
---|
972 | | - remarkButton = AddButton(commandsPanel, "Remark"); |
---|
| 1330 | + remarkButton = AddButton(objectCommandsPanel, "Remark"); |
---|
973 | 1331 | remarkButton.setToolTipText("Set the current transform as the target"); |
---|
974 | 1332 | |
---|
975 | | - oe.ctrlPanel.add(commandsPanel); |
---|
| 1333 | + oe.ctrlPanel.add(objectCommandsPanel); |
---|
976 | 1334 | oe.ctrlPanel.Return(); |
---|
977 | 1335 | |
---|
978 | 1336 | pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons |
---|
.. | .. |
---|
1178 | 1536 | //worldPanel.setName("World"); |
---|
1179 | 1537 | centralPanel = new cGridBag(); |
---|
1180 | 1538 | centralPanel.preferredWidth = 20; |
---|
1181 | | - timelinePanel = new JPanel(new BorderLayout()); |
---|
1182 | | - timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
| 1539 | + |
---|
| 1540 | + if (Globals.ADVANCED) |
---|
| 1541 | + { |
---|
| 1542 | + timelinePanel = new JPanel(new BorderLayout()); |
---|
| 1543 | + timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
1183 | 1544 | |
---|
1184 | 1545 | cameraPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, cameraView, timelinePanel); |
---|
1185 | 1546 | cameraPanel.setContinuousLayout(true); |
---|
.. | .. |
---|
1188 | 1549 | // cameraPanel.setDividerSize(9); |
---|
1189 | 1550 | cameraPanel.setResizeWeight(1.0); |
---|
1190 | 1551 | |
---|
| 1552 | + } |
---|
| 1553 | + |
---|
1191 | 1554 | centralPanel.add(cameraView); |
---|
| 1555 | + centralPanel.setFocusable(true); |
---|
1192 | 1556 | //frame.setJMenuBar(timelineMenubar); |
---|
1193 | 1557 | //centralPanel.add(timelinePanel); |
---|
1194 | 1558 | |
---|
.. | .. |
---|
1214 | 1578 | XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
---|
1215 | 1579 | XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll); |
---|
1216 | 1580 | XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll); |
---|
| 1581 | + //XYZPanel.setName("XYZ"); |
---|
1217 | 1582 | |
---|
1218 | 1583 | /* |
---|
1219 | 1584 | gridPanel = new JPanel(); //new BorderLayout()); |
---|
.. | .. |
---|
1251 | 1616 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
---|
1252 | 1617 | //tmp.setName("Edit"); |
---|
1253 | 1618 | objectPanel.add(materialPanel); |
---|
| 1619 | + objectPanel.setIconAt(0, GetIcon("icons/material.png")); |
---|
| 1620 | + objectPanel.setToolTipTextAt(0, "Material"); |
---|
| 1621 | + |
---|
| 1622 | + objectPanel.add(toolboxPanel); |
---|
| 1623 | + objectPanel.setIconAt(1, GetIcon("icons/primitives.png")); |
---|
| 1624 | + objectPanel.setToolTipTextAt(1, "Objects & textures"); |
---|
| 1625 | + |
---|
| 1626 | + objectPanel.add(skyboxPanel); |
---|
| 1627 | + objectPanel.setIconAt(2, GetIcon("icons/skybox.jpg")); |
---|
| 1628 | + objectPanel.setToolTipTextAt(2, "Backgrounds"); |
---|
| 1629 | + |
---|
1254 | 1630 | // JPanel north = new JPanel(new BorderLayout()); |
---|
1255 | 1631 | // north.setName("Edit"); |
---|
1256 | 1632 | // north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1257 | 1633 | // objectPanel.add(north); |
---|
1258 | | - objectPanel.add(ctrlPanel); |
---|
1259 | | - objectPanel.add(infoPanel); |
---|
1260 | | - |
---|
| 1634 | + objectPanel.add(editPanel); |
---|
| 1635 | + objectPanel.setIconAt(3, GetIcon("icons/write.png")); |
---|
| 1636 | + objectPanel.setToolTipTextAt(3, "Edit controls"); |
---|
| 1637 | + |
---|
| 1638 | + objectPanel.add(XYZPanel); |
---|
| 1639 | + objectPanel.setIconAt(4, GetIcon("icons/XYZ.png")); |
---|
| 1640 | + objectPanel.setToolTipTextAt(4, "XYZ/RGB transform"); |
---|
| 1641 | + |
---|
1261 | 1642 | /* |
---|
1262 | 1643 | aConstraints.gridx = 0; |
---|
1263 | 1644 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1265 | 1646 | aConstraints.gridy += 1; |
---|
1266 | 1647 | aConstraints.gridwidth = 1; |
---|
1267 | 1648 | mainPanel.add(objectPanel, aConstraints); |
---|
1268 | | - */ |
---|
| 1649 | + */ |
---|
1269 | 1650 | |
---|
1270 | 1651 | scrollpane = new JScrollPane(mainPanel, ScrollPaneConstants.// VERTICAL_SCROLLBAR_ALWAYS, |
---|
1271 | 1652 | VERTICAL_SCROLLBAR_AS_NEEDED, |
---|
.. | .. |
---|
1277 | 1658 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1278 | 1659 | |
---|
1279 | 1660 | /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
1280 | | - scenePanel.preferredWidth = 6; |
---|
| 1661 | + scenePanel.preferredWidth = 5; |
---|
1281 | 1662 | |
---|
1282 | 1663 | JTabbedPane tabbedPane = new JTabbedPane(); |
---|
1283 | 1664 | tabbedPane.add(scrollpane); |
---|
1284 | 1665 | |
---|
1285 | | - tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
1286 | | - |
---|
1287 | | - optionsPanel = new cGridBag().setVertical(true); |
---|
| 1666 | + optionsPanel = new cGridBag().setVertical(false); |
---|
1288 | 1667 | |
---|
1289 | 1668 | optionsPanel.setName("Options"); |
---|
1290 | 1669 | |
---|
.. | .. |
---|
1292 | 1671 | |
---|
1293 | 1672 | tabbedPane.add(optionsPanel); |
---|
1294 | 1673 | |
---|
| 1674 | + tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
| 1675 | + |
---|
1295 | 1676 | scenePanel.add(tabbedPane); |
---|
1296 | 1677 | |
---|
| 1678 | + //if (Globals.ADVANCED) |
---|
| 1679 | + tabbedPane.add(infoPanel); |
---|
| 1680 | + tabbedPane.setIconAt(3, GetIcon("icons/info.png")); |
---|
| 1681 | + tabbedPane.setToolTipTextAt(3, "Information"); |
---|
| 1682 | + |
---|
1297 | 1683 | /* |
---|
1298 | 1684 | cTree jTree = new cTree(null); |
---|
1299 | 1685 | ToolTipManager.sharedInstance().registerComponent(jTree); |
---|
.. | .. |
---|
1355 | 1741 | bigThree = new cGridBag(); |
---|
1356 | 1742 | bigThree.addComponent(scenePanel); |
---|
1357 | 1743 | bigThree.addComponent(centralPanel); |
---|
1358 | | - bigThree.addComponent(XYZPanel); |
---|
| 1744 | + //bigThree.addComponent(XYZPanel); |
---|
1359 | 1745 | |
---|
1360 | 1746 | // // SIDE EFFECT!!! |
---|
1361 | 1747 | // aConstraints.gridx = 0; |
---|
.. | .. |
---|
1364 | 1750 | // aConstraints.gridheight = 1; |
---|
1365 | 1751 | |
---|
1366 | 1752 | framePanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, toolbarPanel, bigThree); |
---|
1367 | | - framePanel.setContinuousLayout(true); |
---|
1368 | | - framePanel.setOneTouchExpandable(true); |
---|
1369 | | - framePanel.setDividerLocation(0.8); |
---|
| 1753 | + |
---|
| 1754 | + framePanel.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, |
---|
| 1755 | + new java.beans.PropertyChangeListener() |
---|
| 1756 | + { |
---|
| 1757 | + public void propertyChange(java.beans.PropertyChangeEvent pce) |
---|
| 1758 | + { |
---|
| 1759 | + if ((Integer)pce.getOldValue() == 1) |
---|
| 1760 | + { |
---|
| 1761 | + if (radio.layout != expandedLayout) |
---|
| 1762 | + { |
---|
| 1763 | + radio.layout = expandedLayout; |
---|
| 1764 | + radio.layout.doClick(); |
---|
| 1765 | + } |
---|
| 1766 | + } |
---|
| 1767 | + } |
---|
| 1768 | + }); |
---|
| 1769 | + |
---|
| 1770 | + framePanel.setContinuousLayout(false); |
---|
| 1771 | + framePanel.setOneTouchExpandable(false); |
---|
| 1772 | + //.setDividerLocation(0.8); |
---|
1370 | 1773 | //framePanel.setDividerSize(15); |
---|
1371 | 1774 | //framePanel.setResizeWeight(0.15); |
---|
1372 | 1775 | framePanel.setName("Frame"); |
---|
.. | .. |
---|
1384 | 1787 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
1385 | 1788 | |
---|
1386 | 1789 | frame.setSize(1280, 860); |
---|
1387 | | - frame.setVisible(true); |
---|
1388 | | - |
---|
| 1790 | + |
---|
| 1791 | + cameraView.requestFocusInWindow(); |
---|
| 1792 | + |
---|
1389 | 1793 | gridPanel.setDividerLocation(1.0); |
---|
| 1794 | + |
---|
| 1795 | + frame.validate(); |
---|
| 1796 | + |
---|
| 1797 | + frame.setVisible(true); |
---|
1390 | 1798 | |
---|
1391 | 1799 | frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); |
---|
1392 | 1800 | frame.addWindowListener(new WindowAdapter() |
---|
1393 | 1801 | { |
---|
1394 | | - |
---|
1395 | 1802 | public void windowClosing(WindowEvent e) |
---|
1396 | 1803 | { |
---|
1397 | 1804 | Close(); |
---|
.. | .. |
---|
1414 | 1821 | ctrlPanel.removeAll(); |
---|
1415 | 1822 | } |
---|
1416 | 1823 | |
---|
1417 | | - void SetupMaterial(cGridBag panel) |
---|
| 1824 | + void SetupMaterial(cGridBag materialpanel) |
---|
1418 | 1825 | { |
---|
1419 | | - /* |
---|
| 1826 | + cGridBag presetpanel = new cGridBag().setVertical(true); |
---|
| 1827 | + |
---|
| 1828 | + cLabel skin = GetLabel("icons/shadericons/shadericon00000.png", !Grafreed.NIMBUSLAF); |
---|
| 1829 | + skin.setToolTipText("Skin"); |
---|
| 1830 | + skin.addMouseListener(new MouseAdapter() |
---|
| 1831 | + { |
---|
| 1832 | + public void mouseClicked(MouseEvent e) |
---|
| 1833 | + { |
---|
| 1834 | + Object3D object = Grafreed.materials.versionlist[0].get(0); |
---|
| 1835 | + cMaterial material = object.material; |
---|
| 1836 | + |
---|
| 1837 | + // Skin |
---|
| 1838 | + colorField.setFloat(material.color); |
---|
| 1839 | + saturationField.setFloat(material.modulation); |
---|
| 1840 | + subsurfaceField.setFloat(material.subsurface); |
---|
| 1841 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1842 | + diffusenessField.setFloat(material.factor); |
---|
| 1843 | + shininessField.setFloat(material.shininess); |
---|
| 1844 | + shadowbiasField.setFloat(material.shadowbias); |
---|
| 1845 | + diffuseField.setFloat(material.diffuse); |
---|
| 1846 | + specularField.setFloat(material.specular); |
---|
| 1847 | + |
---|
| 1848 | + bumpField.setFloat(object.projectedVertices[0].x / 1000.0); |
---|
| 1849 | + noiseField.setFloat(object.projectedVertices[0].y / 1000.0); |
---|
| 1850 | + powerField.setFloat(object.projectedVertices[2].x / 1000.0); |
---|
| 1851 | + |
---|
| 1852 | + materialtouched = true; |
---|
| 1853 | + applySelf(); |
---|
| 1854 | + } |
---|
| 1855 | + }); |
---|
| 1856 | + presetpanel.add(skin); |
---|
| 1857 | + |
---|
| 1858 | + cLabel lambert = GetLabel("icons/shadericons/shadericon00002.png", !Grafreed.NIMBUSLAF); |
---|
| 1859 | + lambert.setToolTipText("Diffuse"); |
---|
| 1860 | + lambert.addMouseListener(new MouseAdapter() |
---|
| 1861 | + { |
---|
| 1862 | + public void mouseClicked(MouseEvent e) |
---|
| 1863 | + { |
---|
| 1864 | + Object3D object = Grafreed.materials.versionlist[2].get(0); |
---|
| 1865 | + cMaterial material = object.material; |
---|
| 1866 | + |
---|
| 1867 | + diffusenessField.setFloat(material.factor); |
---|
| 1868 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1869 | + |
---|
| 1870 | + materialtouched = true; |
---|
| 1871 | + applySelf(); |
---|
| 1872 | + } |
---|
| 1873 | + }); |
---|
| 1874 | + presetpanel.add(lambert); |
---|
| 1875 | + |
---|
| 1876 | + cLabel diffuse2 = GetLabel("icons/shadericons/shadericon00003.png", !Grafreed.NIMBUSLAF); |
---|
| 1877 | + diffuse2.setToolTipText("Diffuse2"); |
---|
| 1878 | + diffuse2.addMouseListener(new MouseAdapter() |
---|
| 1879 | + { |
---|
| 1880 | + public void mouseClicked(MouseEvent e) |
---|
| 1881 | + { |
---|
| 1882 | + Object3D object = Grafreed.materials.versionlist[3].get(0); |
---|
| 1883 | + cMaterial material = object.material; |
---|
| 1884 | + |
---|
| 1885 | + diffusenessField.setFloat(material.factor); |
---|
| 1886 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1887 | + |
---|
| 1888 | + materialtouched = true; |
---|
| 1889 | + applySelf(); |
---|
| 1890 | + } |
---|
| 1891 | + }); |
---|
| 1892 | + presetpanel.add(diffuse2); |
---|
| 1893 | + |
---|
| 1894 | + cLabel diffusemoon = GetLabel("icons/shadericons/shadericon00004.png", !Grafreed.NIMBUSLAF); |
---|
| 1895 | + diffusemoon.setToolTipText("Moon"); |
---|
| 1896 | + diffusemoon.addMouseListener(new MouseAdapter() |
---|
| 1897 | + { |
---|
| 1898 | + public void mouseClicked(MouseEvent e) |
---|
| 1899 | + { |
---|
| 1900 | + Object3D object = Grafreed.materials.versionlist[4].get(0); |
---|
| 1901 | + cMaterial material = object.material; |
---|
| 1902 | + |
---|
| 1903 | + diffusenessField.setFloat(material.factor); |
---|
| 1904 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1905 | + |
---|
| 1906 | + materialtouched = true; |
---|
| 1907 | + applySelf(); |
---|
| 1908 | + } |
---|
| 1909 | + }); |
---|
| 1910 | + presetpanel.add(diffusemoon); |
---|
| 1911 | + |
---|
| 1912 | + cLabel diffusemoon2 = GetLabel("icons/shadericons/shadericon00005.png", !Grafreed.NIMBUSLAF); |
---|
| 1913 | + diffusemoon2.setToolTipText("Moon2"); |
---|
| 1914 | + diffusemoon2.addMouseListener(new MouseAdapter() |
---|
| 1915 | + { |
---|
| 1916 | + public void mouseClicked(MouseEvent e) |
---|
| 1917 | + { |
---|
| 1918 | + Object3D object = Grafreed.materials.versionlist[5].get(0); |
---|
| 1919 | + cMaterial material = object.material; |
---|
| 1920 | + |
---|
| 1921 | + diffusenessField.setFloat(material.factor); |
---|
| 1922 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1923 | + |
---|
| 1924 | + materialtouched = true; |
---|
| 1925 | + applySelf(); |
---|
| 1926 | + } |
---|
| 1927 | + }); |
---|
| 1928 | + presetpanel.add(diffusemoon2); |
---|
| 1929 | + |
---|
| 1930 | + cLabel diffusemoon3 = GetLabel("icons/shadericons/shadericon00006.png", !Grafreed.NIMBUSLAF); |
---|
| 1931 | + diffusemoon3.setToolTipText("Moon3"); |
---|
| 1932 | + diffusemoon3.addMouseListener(new MouseAdapter() |
---|
| 1933 | + { |
---|
| 1934 | + public void mouseClicked(MouseEvent e) |
---|
| 1935 | + { |
---|
| 1936 | + Object3D object = Grafreed.materials.versionlist[6].get(0); |
---|
| 1937 | + cMaterial material = object.material; |
---|
| 1938 | + |
---|
| 1939 | + diffusenessField.setFloat(material.factor); |
---|
| 1940 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1941 | + |
---|
| 1942 | + materialtouched = true; |
---|
| 1943 | + applySelf(); |
---|
| 1944 | + } |
---|
| 1945 | + }); |
---|
| 1946 | + presetpanel.add(diffusemoon3); |
---|
| 1947 | + |
---|
| 1948 | + cLabel diffusesheen = GetLabel("icons/shadericons/shadericon00007.png", !Grafreed.NIMBUSLAF); |
---|
| 1949 | + diffusesheen.setToolTipText("Sheen"); |
---|
| 1950 | + diffusesheen.addMouseListener(new MouseAdapter() |
---|
| 1951 | + { |
---|
| 1952 | + public void mouseClicked(MouseEvent e) |
---|
| 1953 | + { |
---|
| 1954 | + Object3D object = Grafreed.materials.versionlist[7].get(0); |
---|
| 1955 | + cMaterial material = object.material; |
---|
| 1956 | + |
---|
| 1957 | + sheenField.setFloat(material.sheen); |
---|
| 1958 | + |
---|
| 1959 | + materialtouched = true; |
---|
| 1960 | + applySelf(); |
---|
| 1961 | + } |
---|
| 1962 | + }); |
---|
| 1963 | + presetpanel.add(diffusesheen); |
---|
| 1964 | + |
---|
| 1965 | + cLabel rough = GetLabel("icons/shadericons/shadericon00001.png", !Grafreed.NIMBUSLAF); |
---|
| 1966 | + rough.setToolTipText("Rough metal"); |
---|
| 1967 | + rough.addMouseListener(new MouseAdapter() |
---|
| 1968 | + { |
---|
| 1969 | + public void mouseClicked(MouseEvent e) |
---|
| 1970 | + { |
---|
| 1971 | + Object3D object = Grafreed.materials.versionlist[1].get(0); |
---|
| 1972 | + cMaterial material = object.material; |
---|
| 1973 | + |
---|
| 1974 | + shininessField.setFloat(material.shininess); |
---|
| 1975 | + velvetField.setFloat(material.velvet); |
---|
| 1976 | + |
---|
| 1977 | + materialtouched = true; |
---|
| 1978 | + applySelf(); |
---|
| 1979 | + } |
---|
| 1980 | + }); |
---|
| 1981 | + presetpanel.add(rough); |
---|
| 1982 | + |
---|
| 1983 | + cLabel rough2 = GetLabel("icons/shadericons/shadericon00013.png", !Grafreed.NIMBUSLAF); |
---|
| 1984 | + rough2.setToolTipText("Medium metal"); |
---|
| 1985 | + rough2.addMouseListener(new MouseAdapter() |
---|
| 1986 | + { |
---|
| 1987 | + public void mouseClicked(MouseEvent e) |
---|
| 1988 | + { |
---|
| 1989 | + Object3D object = Grafreed.materials.versionlist[13].get(0); |
---|
| 1990 | + cMaterial material = object.material; |
---|
| 1991 | + |
---|
| 1992 | + shininessField.setFloat(material.shininess); |
---|
| 1993 | + lightareaField.setFloat(material.lightarea); |
---|
| 1994 | + |
---|
| 1995 | + materialtouched = true; |
---|
| 1996 | + applySelf(); |
---|
| 1997 | + } |
---|
| 1998 | + }); |
---|
| 1999 | + presetpanel.add(rough2); |
---|
| 2000 | + |
---|
| 2001 | + cLabel shini0 = GetLabel("icons/shadericons/shadericon00014.png", !Grafreed.NIMBUSLAF); |
---|
| 2002 | + shini0.setToolTipText("Shiny"); |
---|
| 2003 | + shini0.addMouseListener(new MouseAdapter() |
---|
| 2004 | + { |
---|
| 2005 | + public void mouseClicked(MouseEvent e) |
---|
| 2006 | + { |
---|
| 2007 | + Object3D object = Grafreed.materials.versionlist[14].get(0); |
---|
| 2008 | + cMaterial material = object.material; |
---|
| 2009 | + |
---|
| 2010 | + shininessField.setFloat(material.shininess); |
---|
| 2011 | + lightareaField.setFloat(material.lightarea); |
---|
| 2012 | + |
---|
| 2013 | + materialtouched = true; |
---|
| 2014 | + applySelf(); |
---|
| 2015 | + } |
---|
| 2016 | + }); |
---|
| 2017 | + presetpanel.add(shini0); |
---|
| 2018 | + |
---|
| 2019 | + cLabel shini1 = GetLabel("icons/shadericons/shadericon00011.png", !Grafreed.NIMBUSLAF); |
---|
| 2020 | + shini1.setToolTipText("Shiny2"); |
---|
| 2021 | + shini1.addMouseListener(new MouseAdapter() |
---|
| 2022 | + { |
---|
| 2023 | + public void mouseClicked(MouseEvent e) |
---|
| 2024 | + { |
---|
| 2025 | + Object3D object = Grafreed.materials.versionlist[11].get(0); |
---|
| 2026 | + cMaterial material = object.material; |
---|
| 2027 | + |
---|
| 2028 | + shininessField.setFloat(material.shininess); |
---|
| 2029 | + lightareaField.setFloat(material.lightarea); |
---|
| 2030 | + |
---|
| 2031 | + materialtouched = true; |
---|
| 2032 | + applySelf(); |
---|
| 2033 | + } |
---|
| 2034 | + }); |
---|
| 2035 | + presetpanel.add(shini1); |
---|
| 2036 | + |
---|
| 2037 | + cLabel shini2 = GetLabel("icons/shadericons/shadericon00012.png", !Grafreed.NIMBUSLAF); |
---|
| 2038 | + shini2.setToolTipText("Shiny3"); |
---|
| 2039 | + shini2.addMouseListener(new MouseAdapter() |
---|
| 2040 | + { |
---|
| 2041 | + public void mouseClicked(MouseEvent e) |
---|
| 2042 | + { |
---|
| 2043 | + Object3D object = Grafreed.materials.versionlist[12].get(0); |
---|
| 2044 | + cMaterial material = object.material; |
---|
| 2045 | + |
---|
| 2046 | + shininessField.setFloat(material.shininess); |
---|
| 2047 | + lightareaField.setFloat(material.lightarea); |
---|
| 2048 | + |
---|
| 2049 | + materialtouched = true; |
---|
| 2050 | + applySelf(); |
---|
| 2051 | + } |
---|
| 2052 | + }); |
---|
| 2053 | + presetpanel.add(shini2); |
---|
| 2054 | + |
---|
| 2055 | + cLabel aniso = GetLabel("icons/shadericons/shadericon00008.png", !Grafreed.NIMBUSLAF); |
---|
| 2056 | + aniso.setToolTipText("AnisoU"); |
---|
| 2057 | + aniso.addMouseListener(new MouseAdapter() |
---|
| 2058 | + { |
---|
| 2059 | + public void mouseClicked(MouseEvent e) |
---|
| 2060 | + { |
---|
| 2061 | + Object3D object = Grafreed.materials.versionlist[8].get(0); |
---|
| 2062 | + cMaterial material = object.material; |
---|
| 2063 | + |
---|
| 2064 | + anisoField.setFloat(material.aniso); |
---|
| 2065 | + anisoVField.setFloat(material.anisoV); |
---|
| 2066 | + |
---|
| 2067 | + materialtouched = true; |
---|
| 2068 | + applySelf(); |
---|
| 2069 | + } |
---|
| 2070 | + }); |
---|
| 2071 | + presetpanel.add(aniso); |
---|
| 2072 | + |
---|
| 2073 | + cLabel aniso2 = GetLabel("icons/shadericons/shadericon00009.png", !Grafreed.NIMBUSLAF); |
---|
| 2074 | + aniso2.setToolTipText("AnisoV"); |
---|
| 2075 | + aniso2.addMouseListener(new MouseAdapter() |
---|
| 2076 | + { |
---|
| 2077 | + public void mouseClicked(MouseEvent e) |
---|
| 2078 | + { |
---|
| 2079 | + Object3D object = Grafreed.materials.versionlist[9].get(0); |
---|
| 2080 | + cMaterial material = object.material; |
---|
| 2081 | + |
---|
| 2082 | + anisoField.setFloat(material.aniso); |
---|
| 2083 | + anisoVField.setFloat(material.anisoV); |
---|
| 2084 | + |
---|
| 2085 | + materialtouched = true; |
---|
| 2086 | + applySelf(); |
---|
| 2087 | + } |
---|
| 2088 | + }); |
---|
| 2089 | + presetpanel.add(aniso2); |
---|
| 2090 | + |
---|
| 2091 | + cLabel aniso3 = GetLabel("icons/shadericons/shadericon00010.png", !Grafreed.NIMBUSLAF); |
---|
| 2092 | + aniso3.setToolTipText("AnisoUV"); |
---|
| 2093 | + aniso3.addMouseListener(new MouseAdapter() |
---|
| 2094 | + { |
---|
| 2095 | + public void mouseClicked(MouseEvent e) |
---|
| 2096 | + { |
---|
| 2097 | + Object3D object = Grafreed.materials.versionlist[10].get(0); |
---|
| 2098 | + cMaterial material = object.material; |
---|
| 2099 | + |
---|
| 2100 | + anisoField.setFloat(material.aniso); |
---|
| 2101 | + anisoVField.setFloat(material.anisoV); |
---|
| 2102 | + |
---|
| 2103 | + materialtouched = true; |
---|
| 2104 | + applySelf(); |
---|
| 2105 | + } |
---|
| 2106 | + }); |
---|
| 2107 | + presetpanel.add(aniso3); |
---|
| 2108 | + |
---|
| 2109 | + cLabel velvet0 = GetLabel("icons/shadericons/shadericon00015.png", !Grafreed.NIMBUSLAF); |
---|
| 2110 | + velvet0.setToolTipText("Velvet"); |
---|
| 2111 | + velvet0.addMouseListener(new MouseAdapter() |
---|
| 2112 | + { |
---|
| 2113 | + public void mouseClicked(MouseEvent e) |
---|
| 2114 | + { |
---|
| 2115 | + Object3D object = Grafreed.materials.versionlist[15].get(0); |
---|
| 2116 | + cMaterial material = object.material; |
---|
| 2117 | + |
---|
| 2118 | + diffusenessField.setFloat(material.factor); |
---|
| 2119 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 2120 | + sheenField.setFloat(material.sheen); |
---|
| 2121 | + shininessField.setFloat(material.shininess); |
---|
| 2122 | + velvetField.setFloat(material.velvet); |
---|
| 2123 | + shiftField.setFloat(material.shift); |
---|
| 2124 | + |
---|
| 2125 | + materialtouched = true; |
---|
| 2126 | + applySelf(); |
---|
| 2127 | + } |
---|
| 2128 | + }); |
---|
| 2129 | + presetpanel.add(velvet0); |
---|
| 2130 | + |
---|
| 2131 | + cLabel bump0 = GetLabel("icons/shadericons/shadericon00016.png", !Grafreed.NIMBUSLAF); |
---|
| 2132 | + bump0.setToolTipText("Bump texture"); |
---|
| 2133 | + bump0.addMouseListener(new MouseAdapter() |
---|
| 2134 | + { |
---|
| 2135 | + public void mouseClicked(MouseEvent e) |
---|
| 2136 | + { |
---|
| 2137 | + Object3D object = Grafreed.materials.versionlist[16].get(0); |
---|
| 2138 | + cMaterial material = object.material; |
---|
| 2139 | + |
---|
| 2140 | + bumpField.setFloat(object.projectedVertices[0].x / 1000.0); |
---|
| 2141 | + noiseField.setFloat(object.projectedVertices[0].y / 1000.0); |
---|
| 2142 | + powerField.setFloat(object.projectedVertices[2].x / 1000.0); |
---|
| 2143 | + |
---|
| 2144 | + materialtouched = true; |
---|
| 2145 | + applySelf(); |
---|
| 2146 | + } |
---|
| 2147 | + }); |
---|
| 2148 | + presetpanel.add(bump0); |
---|
| 2149 | + |
---|
| 2150 | + cLabel halo = GetLabel("icons/shadericons/shadericon00017.png", !Grafreed.NIMBUSLAF); |
---|
| 2151 | + halo.setToolTipText("Halo"); |
---|
| 2152 | + halo.addMouseListener(new MouseAdapter() |
---|
| 2153 | + { |
---|
| 2154 | + public void mouseClicked(MouseEvent e) |
---|
| 2155 | + { |
---|
| 2156 | + Object3D object = Grafreed.materials.versionlist[17].get(0); |
---|
| 2157 | + cMaterial material = object.material; |
---|
| 2158 | + |
---|
| 2159 | + opacityPowerField.setFloat(object.projectedVertices[2].y / 1000.0); |
---|
| 2160 | + |
---|
| 2161 | + materialtouched = true; |
---|
| 2162 | + applySelf(); |
---|
| 2163 | + } |
---|
| 2164 | + }); |
---|
| 2165 | + presetpanel.add(halo); |
---|
| 2166 | + |
---|
| 2167 | + cLabel candle = GetLabel("icons/shadericons/shadericon00018.png", !Grafreed.NIMBUSLAF); |
---|
| 2168 | + candle.setToolTipText("Candle"); |
---|
| 2169 | + candle.addMouseListener(new MouseAdapter() |
---|
| 2170 | + { |
---|
| 2171 | + public void mouseClicked(MouseEvent e) |
---|
| 2172 | + { |
---|
| 2173 | + Object3D object = Grafreed.materials.versionlist[18].get(0); |
---|
| 2174 | + cMaterial material = object.material; |
---|
| 2175 | + |
---|
| 2176 | + subsurfaceField.setFloat(material.subsurface); |
---|
| 2177 | + shadowbiasField.setFloat(material.shadowbias); |
---|
| 2178 | + ambientField.setFloat(material.ambient); |
---|
| 2179 | + specularField.setFloat(material.specular); |
---|
| 2180 | + lightareaField.setFloat(material.lightarea); |
---|
| 2181 | + shininessField.setFloat(material.shininess); |
---|
| 2182 | + |
---|
| 2183 | + materialtouched = true; |
---|
| 2184 | + applySelf(); |
---|
| 2185 | + } |
---|
| 2186 | + }); |
---|
| 2187 | + presetpanel.add(candle); |
---|
| 2188 | + |
---|
| 2189 | + cLabel shadowShader = GetLabel("icons/shadericons/shadow.png", !Grafreed.NIMBUSLAF); |
---|
| 2190 | + shadowShader.setToolTipText("Shadow"); |
---|
| 2191 | + shadowShader.addMouseListener(new MouseAdapter() |
---|
| 2192 | + { |
---|
| 2193 | + public void mouseClicked(MouseEvent e) |
---|
| 2194 | + { |
---|
| 2195 | + diffuseField.setFloat(0.001); |
---|
| 2196 | + ambientField.setFloat(0.001); |
---|
| 2197 | + cameraField.setFloat(0.001); |
---|
| 2198 | + specularField.setFloat(0.001); |
---|
| 2199 | + fakedepthField.setFloat(0.001); |
---|
| 2200 | + opacityField.setFloat(0.6); |
---|
| 2201 | + |
---|
| 2202 | + materialtouched = true; |
---|
| 2203 | + applySelf(); |
---|
| 2204 | + } |
---|
| 2205 | + }); |
---|
| 2206 | + presetpanel.add(shadowShader); |
---|
| 2207 | + |
---|
| 2208 | + cGridBag panel = new cGridBag().setVertical(true); |
---|
| 2209 | + |
---|
| 2210 | + presetpanel.preferredWidth = 1; |
---|
| 2211 | + |
---|
| 2212 | + materialpanel.add(presetpanel); |
---|
| 2213 | + materialpanel.add(panel); |
---|
| 2214 | + |
---|
| 2215 | + panel.preferredWidth = 8; |
---|
| 2216 | + |
---|
| 2217 | + /* |
---|
1420 | 2218 | ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints); |
---|
1421 | 2219 | materialLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1422 | | - */ |
---|
| 2220 | + */ |
---|
1423 | 2221 | |
---|
1424 | 2222 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
1425 | 2223 | |
---|
.. | .. |
---|
1453 | 2251 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1454 | 2252 | |
---|
1455 | 2253 | cGridBag colorSection = new cGridBag().setVertical(true); |
---|
| 2254 | + |
---|
| 2255 | + cGridBag huepanel = new cGridBag(); |
---|
| 2256 | + cGridBag huelabel = new cGridBag(); |
---|
| 2257 | + skin = GetLabel("icons/hue.png", false); |
---|
| 2258 | + skin.fit = true; |
---|
| 2259 | + huelabel.add(skin); |
---|
| 2260 | + huelabel.preferredWidth = 20; |
---|
| 2261 | + huepanel.add(new cGridBag()); // Label |
---|
| 2262 | + huepanel.add(huelabel); // Field/slider |
---|
| 2263 | + |
---|
| 2264 | + huepanel.preferredHeight = 7; |
---|
| 2265 | + |
---|
| 2266 | + colorSection.add(huepanel); |
---|
1456 | 2267 | |
---|
1457 | 2268 | 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); |
---|
| 2269 | + |
---|
| 2270 | + color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints); |
---|
| 2271 | + colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2272 | + color.add(colorField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
| 2273 | + |
---|
1461 | 2274 | //colorField.preferredWidth = 200; |
---|
1462 | 2275 | colorSection.add(color); |
---|
1463 | 2276 | |
---|
1464 | 2277 | cGridBag modulation = new cGridBag(); |
---|
1465 | 2278 | modulation.add(modulationLabel = new JLabel("Saturation")); // , aConstraints); |
---|
1466 | 2279 | modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1467 | | - modulation.add(modulationField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 2280 | + modulation.add(saturationField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
1468 | 2281 | colorSection.add(modulation); |
---|
1469 | 2282 | |
---|
| 2283 | + cGridBag opacity = new cGridBag(); |
---|
| 2284 | + opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints); |
---|
| 2285 | + opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2286 | + opacity.add(opacityField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
| 2287 | + colorSection.add(opacity); |
---|
| 2288 | + |
---|
| 2289 | + colorSection.add(GetSeparator()); |
---|
| 2290 | + |
---|
1470 | 2291 | cGridBag texture = new cGridBag(); |
---|
1471 | 2292 | texture.add(textureLabel = new JLabel("Texture")); // , aConstraints); |
---|
1472 | 2293 | textureLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1473 | 2294 | texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1474 | 2295 | colorSection.add(texture); |
---|
1475 | 2296 | |
---|
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()); |
---|
| 2297 | + panel.add(GetSeparator()); |
---|
1495 | 2298 | |
---|
1496 | 2299 | panel.add(colorSection); |
---|
1497 | 2300 | |
---|
.. | .. |
---|
1541 | 2344 | fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1542 | 2345 | diffuseSection.add(fakedepth); |
---|
1543 | 2346 | |
---|
1544 | | - panel.add(new JSeparator()); |
---|
| 2347 | + cGridBag shadowbias = new cGridBag(); |
---|
| 2348 | + shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); |
---|
| 2349 | + shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2350 | + shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 2351 | + diffuseSection.add(shadowbias); |
---|
| 2352 | + |
---|
| 2353 | + panel.add(GetSeparator()); |
---|
1545 | 2354 | |
---|
1546 | 2355 | panel.add(diffuseSection); |
---|
1547 | 2356 | |
---|
.. | .. |
---|
1591 | 2400 | // aConstraints.gridy += 1; |
---|
1592 | 2401 | // aConstraints.gridwidth = 1; |
---|
1593 | 2402 | |
---|
| 2403 | + cGridBag anisoU = new cGridBag(); |
---|
| 2404 | + anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); |
---|
| 2405 | + anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2406 | + anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 2407 | + specularSection.add(anisoU); |
---|
1594 | 2408 | |
---|
1595 | | - panel.add(new JSeparator()); |
---|
| 2409 | + cGridBag anisoV = new cGridBag(); |
---|
| 2410 | + anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); |
---|
| 2411 | + anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2412 | + anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 2413 | + specularSection.add(anisoV); |
---|
| 2414 | + |
---|
| 2415 | + |
---|
| 2416 | + panel.add(GetSeparator()); |
---|
1596 | 2417 | |
---|
1597 | 2418 | panel.add(specularSection); |
---|
1598 | 2419 | |
---|
1599 | 2420 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1600 | 2421 | |
---|
1601 | | - cGridBag globalSection = new cGridBag().setVertical(true); |
---|
| 2422 | + //cGridBag globalSection = new cGridBag().setVertical(true); |
---|
1602 | 2423 | |
---|
1603 | 2424 | cGridBag camera = new cGridBag(); |
---|
1604 | 2425 | camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints); |
---|
1605 | 2426 | cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1606 | 2427 | camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1607 | | - globalSection.add(camera); |
---|
| 2428 | + colorSection.add(camera); |
---|
1608 | 2429 | |
---|
1609 | 2430 | cGridBag ambient = new cGridBag(); |
---|
1610 | 2431 | ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints); |
---|
1611 | 2432 | ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1612 | 2433 | ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1613 | | - globalSection.add(ambient); |
---|
| 2434 | + colorSection.add(ambient); |
---|
1614 | 2435 | |
---|
1615 | 2436 | cGridBag backlit = new cGridBag(); |
---|
1616 | 2437 | backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints); |
---|
1617 | 2438 | backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1618 | 2439 | backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1619 | | - globalSection.add(backlit); |
---|
| 2440 | + colorSection.add(backlit); |
---|
1620 | 2441 | |
---|
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()); |
---|
| 2442 | + //panel.add(new JSeparator()); |
---|
1628 | 2443 | |
---|
1629 | | - panel.add(globalSection); |
---|
| 2444 | + //panel.add(globalSection); |
---|
1630 | 2445 | |
---|
1631 | 2446 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1632 | 2447 | |
---|
.. | .. |
---|
1668 | 2483 | opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints); |
---|
1669 | 2484 | textureSection.add(opacityPower); |
---|
1670 | 2485 | |
---|
1671 | | - panel.add(new JSeparator()); |
---|
| 2486 | + panel.add(GetSeparator()); |
---|
1672 | 2487 | |
---|
1673 | 2488 | panel.add(textureSection); |
---|
1674 | 2489 | |
---|
.. | .. |
---|
1733 | 2548 | // 3D models |
---|
1734 | 2549 | if (filename.endsWith(".3ds") || filename.endsWith(".3DS")) |
---|
1735 | 2550 | { |
---|
1736 | | - lastConverter = new com.jmex.model.converters.MaxToJme(); |
---|
1737 | | - LoadFile(filename, lastConverter); |
---|
| 2551 | + //lastConverter = new com.jmex.model.converters.MaxToJme(); |
---|
| 2552 | + //LoadFile(filename, lastConverter); |
---|
| 2553 | + LoadObjFile(filename); // New 3ds loader |
---|
1738 | 2554 | continue; |
---|
1739 | 2555 | } |
---|
1740 | 2556 | if (filename.endsWith(".dae") || filename.endsWith(".DAE")) |
---|
.. | .. |
---|
2072 | 2888 | |
---|
2073 | 2889 | void LoadObjFile(String fullname) |
---|
2074 | 2890 | { |
---|
2075 | | - /* |
---|
| 2891 | + System.out.println("Loading " + fullname); |
---|
| 2892 | + /**/ |
---|
2076 | 2893 | //lastFilename = fullname; |
---|
2077 | 2894 | if(loadObjThread == null) |
---|
2078 | 2895 | { |
---|
2079 | | - loadObjThread = new LoadOBJThread(); |
---|
2080 | | - loadObjThread.start(); |
---|
| 2896 | + loadObjThread = new LoadOBJThread(); |
---|
| 2897 | + loadObjThread.start(); |
---|
2081 | 2898 | } |
---|
2082 | 2899 | |
---|
2083 | 2900 | loadObjThread.add(fullname); |
---|
2084 | | - */ |
---|
| 2901 | + /**/ |
---|
2085 | 2902 | |
---|
2086 | | - System.out.println("Loading " + fullname); |
---|
2087 | | - makeSomething(new FileObject(fullname, true), true); |
---|
| 2903 | + //makeSomething(new FileObject(fullname, true), true); |
---|
2088 | 2904 | } |
---|
2089 | 2905 | |
---|
2090 | 2906 | void LoadGFDFile(String fullname) |
---|
.. | .. |
---|
2460 | 3276 | LA.matXRotate(((Object3D) group.get(group.size() - 1)).toParent, -Math.PI / 2); |
---|
2461 | 3277 | LA.matXRotate(((Object3D) group.get(group.size() - 1)).fromParent, Math.PI / 2); |
---|
2462 | 3278 | } |
---|
| 3279 | + |
---|
2463 | 3280 | //cJME.count++; |
---|
2464 | 3281 | //cJME.count %= 12; |
---|
2465 | 3282 | if (gc) |
---|
.. | .. |
---|
2643 | 3460 | } |
---|
2644 | 3461 | } |
---|
2645 | 3462 | } |
---|
| 3463 | + |
---|
2646 | 3464 | cFileSystemPane FSPane; |
---|
2647 | 3465 | |
---|
2648 | 3466 | void SetMaterial(cMaterial mat, Object3D.cVector2[] others) |
---|
.. | .. |
---|
2652 | 3470 | |
---|
2653 | 3471 | freezematerial = true; |
---|
2654 | 3472 | colorField.setFloat(mat.color); |
---|
2655 | | - modulationField.setFloat(mat.modulation); |
---|
| 3473 | + saturationField.setFloat(mat.modulation); |
---|
2656 | 3474 | metalnessField.setFloat(mat.metalness); |
---|
2657 | 3475 | diffuseField.setFloat(mat.diffuse); |
---|
2658 | 3476 | specularField.setFloat(mat.specular); |
---|
.. | .. |
---|
2696 | 3514 | } |
---|
2697 | 3515 | } |
---|
2698 | 3516 | } |
---|
| 3517 | + |
---|
2699 | 3518 | freezematerial = false; |
---|
2700 | 3519 | } |
---|
2701 | 3520 | |
---|
2702 | 3521 | void SetMaterial(Object3D object) |
---|
2703 | 3522 | { |
---|
| 3523 | + latestObject = object; |
---|
| 3524 | + |
---|
2704 | 3525 | cMaterial mat = object.material; |
---|
2705 | 3526 | |
---|
2706 | 3527 | if (mat == null) |
---|
.. | .. |
---|
2812 | 3633 | // } |
---|
2813 | 3634 | |
---|
2814 | 3635 | /**/ |
---|
2815 | | - if (deselect) |
---|
| 3636 | + if (deselect || child == null) |
---|
2816 | 3637 | { |
---|
2817 | 3638 | //group.deselectAll(); |
---|
2818 | 3639 | //freeze = true; |
---|
2819 | 3640 | GetTree().clearSelection(); |
---|
2820 | 3641 | //freeze = false; |
---|
| 3642 | + |
---|
| 3643 | + if (child == null) |
---|
| 3644 | + { |
---|
| 3645 | + return; |
---|
| 3646 | + } |
---|
2821 | 3647 | } |
---|
2822 | 3648 | |
---|
2823 | 3649 | //group.addSelectee(child); |
---|
.. | .. |
---|
2851 | 3677 | public void itemStateChanged(ItemEvent event) |
---|
2852 | 3678 | { |
---|
2853 | 3679 | // System.out.println("Propagate = " + propagate); |
---|
| 3680 | + if (event.getSource() == pinButton) |
---|
| 3681 | + { |
---|
| 3682 | + copy.pinned ^= true; |
---|
| 3683 | + if (!copy.pinned && !copy.editWindow.copy.selection.contains(copy)) |
---|
| 3684 | + { |
---|
| 3685 | + ((GroupEditor)copy.editWindow).listUI.remove(copy); |
---|
| 3686 | + copy.CloseUI(); |
---|
| 3687 | + //copy.editWindow.refreshContents(); |
---|
| 3688 | + } |
---|
| 3689 | + } |
---|
| 3690 | + else |
---|
2854 | 3691 | if (event.getSource() == propagateToggle) |
---|
2855 | 3692 | { |
---|
2856 | 3693 | propagate ^= true; |
---|
.. | .. |
---|
2886 | 3723 | cameraView.ToggleDL(); |
---|
2887 | 3724 | cameraView.repaint(); |
---|
2888 | 3725 | return; |
---|
2889 | | - } else if (event.getSource() == toggleTextureItem) |
---|
| 3726 | + } else if (event.getSource() == toggleTextureItem || event.getSource() == toggleTextureCB) |
---|
2890 | 3727 | { |
---|
2891 | 3728 | cameraView.ToggleTexture(); |
---|
2892 | 3729 | // june 2013 copy.HardTouch(); |
---|
.. | .. |
---|
2925 | 3762 | frame.validate(); |
---|
2926 | 3763 | |
---|
2927 | 3764 | return; |
---|
2928 | | - } else if (event.getSource() == toggleSwitchItem) |
---|
| 3765 | + } else if (event.getSource() == toggleSwitchItem || event.getSource() == toggleSwitchCB) |
---|
2929 | 3766 | { |
---|
2930 | | - cameraView.ToggleRandom(); |
---|
| 3767 | + cameraView.ToggleSwitch(); |
---|
2931 | 3768 | cameraView.repaint(); |
---|
2932 | 3769 | return; |
---|
2933 | 3770 | } else if (event.getSource() == toggleHandleItem) |
---|
.. | .. |
---|
2955 | 3792 | } else if (event.getSource() == liveCB) |
---|
2956 | 3793 | { |
---|
2957 | 3794 | copy.live ^= true; |
---|
| 3795 | + objEditor.refreshContents(true); // To show item colors |
---|
2958 | 3796 | return; |
---|
2959 | | - } else if (event.getSource() == selectCB) |
---|
| 3797 | + } else if (event.getSource() == selectableCB) |
---|
2960 | 3798 | { |
---|
2961 | 3799 | copy.dontselect ^= true; |
---|
2962 | 3800 | return; |
---|
.. | .. |
---|
2964 | 3802 | { |
---|
2965 | 3803 | copy.hide ^= true; |
---|
2966 | 3804 | copy.Touch(); // display list issue |
---|
2967 | | - objEditor.refreshContents(); |
---|
| 3805 | + objEditor.refreshContents(true); // To show item colors |
---|
2968 | 3806 | return; |
---|
2969 | 3807 | } else if (event.getSource() == link2masterCB) |
---|
2970 | 3808 | { |
---|
.. | .. |
---|
3141 | 3979 | { |
---|
3142 | 3980 | Close(); |
---|
3143 | 3981 | //return true; |
---|
3144 | | - } else if (source == loadItem) |
---|
| 3982 | + } else if (source == openItem) |
---|
3145 | 3983 | { |
---|
3146 | | - load(); |
---|
| 3984 | + Open(); |
---|
3147 | 3985 | //return true; |
---|
3148 | 3986 | } else if (source == newItem) |
---|
3149 | 3987 | { |
---|
.. | .. |
---|
3168 | 4006 | { |
---|
3169 | 4007 | generatePOV(); |
---|
3170 | 4008 | //return true; |
---|
| 4009 | + } else if (event.getSource() == archiveItem) |
---|
| 4010 | + { |
---|
| 4011 | + cTools.Archive(frame); |
---|
| 4012 | + return; |
---|
3171 | 4013 | } else if (source == zBufferItem) |
---|
3172 | 4014 | { |
---|
3173 | 4015 | try |
---|
.. | .. |
---|
3214 | 4056 | objEditor.refreshContents(); |
---|
3215 | 4057 | } |
---|
3216 | 4058 | |
---|
3217 | | - static public byte[] Compress(Object o) |
---|
| 4059 | + static public byte[] Compress(Object3D o) |
---|
3218 | 4060 | { |
---|
| 4061 | + // Slower to actually compress. |
---|
3219 | 4062 | try |
---|
3220 | 4063 | { |
---|
3221 | 4064 | ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
3222 | | - java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos); |
---|
3223 | | - ObjectOutputStream out = new ObjectOutputStream(zstream); |
---|
| 4065 | +// java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos); |
---|
| 4066 | + ObjectOutputStream out = new ObjectOutputStream(baos); //zstream); |
---|
3224 | 4067 | |
---|
| 4068 | + Object3D parent = o.parent; |
---|
| 4069 | + o.parent = null; |
---|
| 4070 | + |
---|
3225 | 4071 | out.writeObject(o); |
---|
3226 | 4072 | |
---|
| 4073 | + o.parent = parent; |
---|
| 4074 | + |
---|
3227 | 4075 | out.flush(); |
---|
3228 | 4076 | |
---|
3229 | | - zstream.close(); |
---|
| 4077 | + baos //zstream |
---|
| 4078 | + .close(); |
---|
3230 | 4079 | out.close(); |
---|
3231 | 4080 | |
---|
3232 | | - return baos.toByteArray(); |
---|
| 4081 | + byte[] bytes = baos.toByteArray(); |
---|
| 4082 | + |
---|
| 4083 | + System.out.println("save #bytes = " + bytes.length); |
---|
| 4084 | + return bytes; |
---|
3233 | 4085 | } catch (Exception e) |
---|
3234 | 4086 | { |
---|
3235 | 4087 | System.err.println(e); |
---|
.. | .. |
---|
3239 | 4091 | |
---|
3240 | 4092 | static public Object Uncompress(byte[] bytes) |
---|
3241 | 4093 | { |
---|
| 4094 | + System.out.println("restore #bytes = " + bytes.length); |
---|
3242 | 4095 | try |
---|
3243 | 4096 | { |
---|
3244 | 4097 | ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
3245 | | - java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais); |
---|
3246 | | - ObjectInputStream in = new ObjectInputStream(istream); |
---|
| 4098 | + //java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais); |
---|
| 4099 | + ObjectInputStream in = new ObjectInputStream(bais); // istream); |
---|
3247 | 4100 | Object obj = in.readObject(); |
---|
| 4101 | + |
---|
| 4102 | + bais //istream |
---|
| 4103 | + .close(); |
---|
3248 | 4104 | in.close(); |
---|
3249 | 4105 | |
---|
3250 | 4106 | return obj; |
---|
.. | .. |
---|
3299 | 4155 | return null; |
---|
3300 | 4156 | } |
---|
3301 | 4157 | |
---|
3302 | | - java.util.Hashtable<java.util.UUID, Object3D> hashtable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
3303 | 4158 | |
---|
3304 | 4159 | public void Save() |
---|
3305 | 4160 | { |
---|
3306 | | - cRadio tab = GetCurrentTab(); |
---|
| 4161 | + //Save(true); |
---|
| 4162 | + Replace(); |
---|
| 4163 | + SetVersionStates(); |
---|
| 4164 | + } |
---|
| 4165 | + |
---|
| 4166 | + private boolean Equal(byte[] compress, byte[] name) |
---|
| 4167 | + { |
---|
| 4168 | + if (compress.length != name.length) |
---|
| 4169 | + { |
---|
| 4170 | + return false; |
---|
| 4171 | + } |
---|
3307 | 4172 | |
---|
3308 | | - copy.ExtractBigData(hashtable); |
---|
| 4173 | + for (int i=compress.length; --i>=0;) |
---|
| 4174 | + { |
---|
| 4175 | + if (compress[i] != name[i]) |
---|
| 4176 | + return false; |
---|
| 4177 | + } |
---|
| 4178 | + |
---|
| 4179 | + return true; |
---|
| 4180 | + } |
---|
| 4181 | + |
---|
| 4182 | + java.util.Hashtable<java.util.UUID, Object3D> versiontable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
| 4183 | + |
---|
| 4184 | + void DeleteVersion() |
---|
| 4185 | + { |
---|
| 4186 | + for (int i = copy.versionindex; i < copy.versionlist.length-1; i++) |
---|
| 4187 | + { |
---|
| 4188 | + copy.versionlist[i] = copy.versionlist[i+1]; |
---|
| 4189 | + } |
---|
| 4190 | + |
---|
| 4191 | + CopyChanged(); |
---|
| 4192 | + |
---|
| 4193 | + SetVersionStates(); |
---|
| 4194 | + } |
---|
| 4195 | + |
---|
| 4196 | + public boolean Save(boolean user) |
---|
| 4197 | + { |
---|
| 4198 | + System.err.println("Save"); |
---|
| 4199 | + Replace(); |
---|
| 4200 | + |
---|
| 4201 | + //cRadio tab = GetCurrentTab(); |
---|
| 4202 | + |
---|
| 4203 | + Object3D compress = Duplicate(copy); // Saved version. No need for "Replace"? |
---|
| 4204 | + |
---|
| 4205 | + boolean thesame = false; |
---|
| 4206 | + |
---|
| 4207 | +// if (copy.versionindex > 0 && copy.versions[copy.versionindex-1] != null && Equal(compress, copy.versions[copy.versionindex-1])) |
---|
| 4208 | +// { |
---|
| 4209 | +// thesame = true; |
---|
| 4210 | +// } |
---|
3309 | 4211 | |
---|
3310 | 4212 | //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++) |
---|
| 4213 | + if (!thesame) |
---|
3318 | 4214 | { |
---|
3319 | | - tab.graphs[i] = null; |
---|
| 4215 | + for (int i = copy.versionlist.length; --i > copy.versionindex+1;) |
---|
| 4216 | + { |
---|
| 4217 | + copy.versionlist[i] = copy.versionlist[i-1]; |
---|
| 4218 | + } |
---|
| 4219 | + |
---|
| 4220 | + //tab.user[tab.versionindex] = user; |
---|
| 4221 | + //boolean increment = true; // tab.graphs[tab.versionindex] == null; |
---|
| 4222 | + |
---|
| 4223 | + copy.versionlist[++copy.versionindex] = compress; |
---|
| 4224 | + |
---|
| 4225 | + // if (increment) |
---|
| 4226 | + // tab.versionindex++; |
---|
3320 | 4227 | } |
---|
3321 | 4228 | |
---|
| 4229 | + //copy.RestoreBigData(versiontable); |
---|
| 4230 | + |
---|
| 4231 | + //assert(hashtable.isEmpty()); |
---|
| 4232 | + |
---|
| 4233 | +// for (int i = copy.versionindex+1; i < copy.versionlist.length; i++) |
---|
| 4234 | +// { |
---|
| 4235 | +// //tab.user[i] = false; |
---|
| 4236 | +// copy.versionlist[i] = null; |
---|
| 4237 | +// } |
---|
| 4238 | + |
---|
| 4239 | + SetVersionStates(); |
---|
| 4240 | + |
---|
3322 | 4241 | // test save |
---|
3323 | 4242 | if (false) |
---|
3324 | 4243 | { |
---|
3325 | 4244 | try |
---|
3326 | 4245 | { |
---|
3327 | | - FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex); |
---|
| 4246 | + FileOutputStream ostream = new FileOutputStream("save" + copy.versionindex); |
---|
3328 | 4247 | ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
3329 | 4248 | |
---|
3330 | 4249 | p.writeObject(copy); |
---|
.. | .. |
---|
3337 | 4256 | e.printStackTrace(); |
---|
3338 | 4257 | } |
---|
3339 | 4258 | } |
---|
| 4259 | + |
---|
| 4260 | + return !thesame; |
---|
| 4261 | + } |
---|
| 4262 | + |
---|
| 4263 | + boolean flashIt = true; |
---|
| 4264 | + |
---|
| 4265 | + void RefreshSelection() |
---|
| 4266 | + { |
---|
| 4267 | + Object3D selection = new Object3D(); |
---|
| 4268 | + |
---|
| 4269 | + for (int i = 0; i < copy.selection.size(); i++) |
---|
| 4270 | + { |
---|
| 4271 | + Object3D elem = copy.selection.elementAt(i); |
---|
| 4272 | + |
---|
| 4273 | + Object3D obj = copy.GetObject(elem.GetUUID()); |
---|
| 4274 | + |
---|
| 4275 | + if (obj == null) |
---|
| 4276 | + { |
---|
| 4277 | + copy.selection.remove(i--); |
---|
| 4278 | + } |
---|
| 4279 | + else |
---|
| 4280 | + { |
---|
| 4281 | + selection.add(obj); |
---|
| 4282 | + copy.selection.setElementAt(obj, i); |
---|
| 4283 | + } |
---|
| 4284 | + } |
---|
| 4285 | + |
---|
| 4286 | + flashIt = false; |
---|
| 4287 | + GetTree().clearSelection(); |
---|
| 4288 | + for (int i = 0; i < selection.size(); i++) |
---|
| 4289 | + GetTree().addSelectionPath(selection.elementAt(i).GetTreePath().GetTreePath()); |
---|
| 4290 | + flashIt = true; |
---|
| 4291 | + |
---|
| 4292 | + //refreshContents(false); |
---|
3340 | 4293 | } |
---|
3341 | 4294 | |
---|
3342 | | - void CopyChanged(Object3D obj) |
---|
| 4295 | + void CopyChanged() |
---|
3343 | 4296 | { |
---|
3344 | | - copy.ExtractBigData(hashtable); |
---|
| 4297 | + Object3D obj = (Object3D)Grafreed.clone(copy.versionlist[copy.versionindex]); |
---|
| 4298 | + |
---|
| 4299 | + SetVersionStates(); |
---|
| 4300 | + |
---|
| 4301 | + boolean temp = CameraPane.SWITCH; |
---|
| 4302 | + CameraPane.SWITCH = false; |
---|
| 4303 | + |
---|
| 4304 | + copy.ExtractBigData(versiontable); |
---|
3345 | 4305 | |
---|
3346 | 4306 | copy.clear(); |
---|
3347 | 4307 | |
---|
| 4308 | + copy.skyboxname = obj.skyboxname; |
---|
| 4309 | + copy.skyboxext = obj.skyboxext; |
---|
| 4310 | + |
---|
3348 | 4311 | for (int i=0; i<obj.Size(); i++) |
---|
3349 | 4312 | { |
---|
3350 | 4313 | copy.add(obj.get(i)); |
---|
3351 | 4314 | } |
---|
3352 | 4315 | |
---|
3353 | | - copy.RestoreBigData(hashtable); |
---|
| 4316 | + copy.RestoreBigData(versiontable); |
---|
3354 | 4317 | |
---|
| 4318 | + CameraPane.SWITCH = temp; |
---|
| 4319 | + |
---|
| 4320 | + RefreshSelection(); |
---|
3355 | 4321 | //assert(hashtable.isEmpty()); |
---|
3356 | 4322 | |
---|
3357 | 4323 | copy.Touch(); |
---|
.. | .. |
---|
3372 | 4338 | } |
---|
3373 | 4339 | } |
---|
3374 | 4340 | |
---|
3375 | | - refreshContents(); |
---|
| 4341 | + refreshContents(true); |
---|
3376 | 4342 | } |
---|
3377 | 4343 | |
---|
3378 | | - public void Undo() |
---|
3379 | | - { |
---|
3380 | | - cRadio tab = GetCurrentTab(); |
---|
| 4344 | + cButton previousVersionButton; |
---|
| 4345 | + cButton restoreButton; |
---|
| 4346 | + cButton replaceButton; |
---|
| 4347 | + cButton nextVersionButton; |
---|
| 4348 | + cButton saveVersionButton; |
---|
| 4349 | + cButton deleteVersionButton; |
---|
3381 | 4350 | |
---|
3382 | | - if (tab.undoindex == 0) |
---|
| 4351 | + boolean muteSlider; |
---|
| 4352 | + |
---|
| 4353 | + int VersionCount() |
---|
| 4354 | + { |
---|
| 4355 | + int count = 0; |
---|
| 4356 | + |
---|
| 4357 | + for (int i = copy.versionlist.length; --i >= 0;) |
---|
| 4358 | + { |
---|
| 4359 | + if (copy.versionlist[i] != null) |
---|
| 4360 | + count++; |
---|
| 4361 | + } |
---|
| 4362 | + |
---|
| 4363 | + return count; |
---|
| 4364 | + } |
---|
| 4365 | + |
---|
| 4366 | + void SetVersionStates() |
---|
| 4367 | + { |
---|
| 4368 | + //if (true) |
---|
| 4369 | + // return; |
---|
| 4370 | + |
---|
| 4371 | + //cRadio tab = GetCurrentTab(); |
---|
| 4372 | + |
---|
| 4373 | + restoreButton.setEnabled(copy.versionindex != -1); |
---|
| 4374 | + replaceButton.setEnabled(copy.versionindex != -1); |
---|
| 4375 | + |
---|
| 4376 | + previousVersionButton.setEnabled(copy.versionindex > 0); |
---|
| 4377 | + nextVersionButton.setEnabled(copy.versionlist[copy.versionindex + 1] != null); |
---|
| 4378 | + |
---|
| 4379 | + deleteVersionButton.setEnabled(//copy.versionindex > 0 && |
---|
| 4380 | + copy.versionlist[copy.versionindex + 1] != null); |
---|
| 4381 | + |
---|
| 4382 | + muteSlider = true; |
---|
| 4383 | + versionSlider.setMinimum(0); |
---|
| 4384 | + versionSlider.setMaximum(VersionCount() - 1); |
---|
| 4385 | + versionSlider.setInteger(copy.versionindex); |
---|
| 4386 | + versionSlider.setEnabled(copy.versionindex != -1); |
---|
| 4387 | + muteSlider = false; |
---|
| 4388 | + } |
---|
| 4389 | + |
---|
| 4390 | + public boolean PreviousVersion() |
---|
| 4391 | + { |
---|
| 4392 | + // Option? |
---|
| 4393 | + Replace(); |
---|
| 4394 | + |
---|
| 4395 | + System.err.println("Undo"); |
---|
| 4396 | + |
---|
| 4397 | + //cRadio tab = GetCurrentTab(); |
---|
| 4398 | + |
---|
| 4399 | + if (copy.versionindex == 0) |
---|
3383 | 4400 | { |
---|
3384 | 4401 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
3385 | | - return; |
---|
| 4402 | + return false; |
---|
3386 | 4403 | } |
---|
3387 | 4404 | |
---|
3388 | | - if (tab.graphs[tab.undoindex] == null) |
---|
3389 | | - { |
---|
3390 | | - Save(); |
---|
3391 | | - tab.undoindex -= 1; |
---|
3392 | | - } |
---|
| 4405 | +// if (tab.graphs[tab.versionindex] == null) // || !tab.user[tab.versionindex]) |
---|
| 4406 | +// { |
---|
| 4407 | +// if (Save(false)) |
---|
| 4408 | +// tab.versionindex -= 1; |
---|
| 4409 | +// else |
---|
| 4410 | +// { |
---|
| 4411 | +// if (tab.versionindex <= 0) |
---|
| 4412 | +// return false; |
---|
| 4413 | +// else |
---|
| 4414 | +// tab.versionindex -= 1; |
---|
| 4415 | +// } |
---|
| 4416 | +// } |
---|
3393 | 4417 | |
---|
3394 | | - tab.undoindex -= 1; |
---|
| 4418 | + copy.versionindex -= 1; |
---|
3395 | 4419 | |
---|
3396 | | - CopyChanged(tab.graphs[tab.undoindex]); |
---|
| 4420 | + CopyChanged(); |
---|
| 4421 | + |
---|
| 4422 | + return true; |
---|
3397 | 4423 | } |
---|
3398 | 4424 | |
---|
3399 | | - public void Redo() |
---|
| 4425 | + public boolean Restore() |
---|
3400 | 4426 | { |
---|
3401 | | - cRadio tab = GetCurrentTab(); |
---|
| 4427 | + System.err.println("Restore"); |
---|
3402 | 4428 | |
---|
3403 | | - if (tab.graphs[tab.undoindex + 1] == null) |
---|
| 4429 | + //cRadio tab = GetCurrentTab(); |
---|
| 4430 | + |
---|
| 4431 | + if (copy.versionindex == -1 || copy.versionlist[copy.versionindex] == null) |
---|
| 4432 | + { |
---|
| 4433 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 4434 | + return false; |
---|
| 4435 | + } |
---|
| 4436 | + |
---|
| 4437 | + //CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex])); |
---|
| 4438 | + CopyChanged(); |
---|
| 4439 | + |
---|
| 4440 | + return true; |
---|
| 4441 | + } |
---|
| 4442 | + |
---|
| 4443 | + public boolean Replace() |
---|
| 4444 | + { |
---|
| 4445 | + System.err.println("Replace"); |
---|
| 4446 | + |
---|
| 4447 | + //cRadio tab = GetCurrentTab(); |
---|
| 4448 | + |
---|
| 4449 | + if (copy.versionindex == -1 || copy.versionlist[copy.versionindex] == null) |
---|
| 4450 | + { |
---|
| 4451 | + // No version yet. OK. java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 4452 | + return false; |
---|
| 4453 | + } |
---|
| 4454 | + |
---|
| 4455 | + copy.versionlist[copy.versionindex] = Duplicate(copy); |
---|
| 4456 | + |
---|
| 4457 | + return true; |
---|
| 4458 | + } |
---|
| 4459 | + |
---|
| 4460 | + public void NextVersion() |
---|
| 4461 | + { |
---|
| 4462 | + // Option? |
---|
| 4463 | + Replace(); |
---|
| 4464 | + |
---|
| 4465 | + //cRadio tab = GetCurrentTab(); |
---|
| 4466 | + |
---|
| 4467 | + if (copy.versionlist[copy.versionindex + 1] == null) |
---|
3404 | 4468 | { |
---|
3405 | 4469 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
3406 | 4470 | return; |
---|
3407 | 4471 | } |
---|
3408 | 4472 | |
---|
3409 | | - tab.undoindex += 1; |
---|
| 4473 | + copy.versionindex += 1; |
---|
3410 | 4474 | |
---|
3411 | | - CopyChanged(tab.graphs[tab.undoindex]); |
---|
| 4475 | + CopyChanged(); |
---|
| 4476 | + |
---|
| 4477 | + //if (!tab.user[tab.versionindex]) |
---|
| 4478 | + // tab.graphs[tab.versionindex] = null; |
---|
3412 | 4479 | } |
---|
3413 | 4480 | |
---|
3414 | 4481 | void ImportGFD() |
---|
.. | .. |
---|
3560 | 4627 | assert false; |
---|
3561 | 4628 | } |
---|
3562 | 4629 | |
---|
3563 | | - void EditSelection() |
---|
| 4630 | + void EditSelection(boolean newWindow) |
---|
3564 | 4631 | { |
---|
3565 | 4632 | } |
---|
3566 | 4633 | |
---|
.. | .. |
---|
3619 | 4686 | //copy.material = new cMaterial(copy.GetMaterial()); |
---|
3620 | 4687 | |
---|
3621 | 4688 | current.color = (float) colorField.getFloat(); |
---|
3622 | | - current.modulation = (float) modulationField.getFloat(); |
---|
| 4689 | + current.modulation = (float) saturationField.getFloat(); |
---|
3623 | 4690 | current.metalness = (float) metalnessField.getFloat(); |
---|
3624 | 4691 | current.diffuse = (float) diffuseField.getFloat(); |
---|
3625 | 4692 | current.specular = (float) specularField.getFloat(); |
---|
.. | .. |
---|
3652 | 4719 | cMaterial mat = copy.material; |
---|
3653 | 4720 | |
---|
3654 | 4721 | colorField.SetToolTipValue((mat.color)); |
---|
3655 | | - modulationField.SetToolTipValue((mat.modulation)); |
---|
| 4722 | + saturationField.SetToolTipValue((mat.modulation)); |
---|
3656 | 4723 | metalnessField.SetToolTipValue((mat.metalness)); |
---|
3657 | 4724 | diffuseField.SetToolTipValue((mat.diffuse)); |
---|
3658 | 4725 | specularField.SetToolTipValue((mat.specular)); |
---|
.. | .. |
---|
3704 | 4771 | //copy.Touch(); |
---|
3705 | 4772 | } |
---|
3706 | 4773 | |
---|
| 4774 | + cNumberSlider versionSlider; |
---|
| 4775 | + |
---|
3707 | 4776 | public void stateChanged(ChangeEvent e) |
---|
3708 | 4777 | { |
---|
3709 | 4778 | // assert(false); |
---|
| 4779 | + if (e.getSource() == versionSlider) |
---|
| 4780 | + { |
---|
| 4781 | + if (muteSlider) |
---|
| 4782 | + return; |
---|
| 4783 | + |
---|
| 4784 | + int version = versionSlider.getInteger(); |
---|
| 4785 | + |
---|
| 4786 | + if (version != -1 && copy.versionlist[version] != null) |
---|
| 4787 | + { |
---|
| 4788 | + copy.versionindex = version; |
---|
| 4789 | + CopyChanged(); |
---|
| 4790 | + } |
---|
| 4791 | + |
---|
| 4792 | + return; |
---|
| 4793 | + } |
---|
3710 | 4794 | |
---|
3711 | 4795 | if (freezematerial) |
---|
3712 | 4796 | { |
---|
.. | .. |
---|
3742 | 4826 | { |
---|
3743 | 4827 | //System.out.println("stateChanged = " + this); |
---|
3744 | 4828 | materialtouched = true; |
---|
| 4829 | + |
---|
| 4830 | + if (Globals.AUTOSATURATE && e.getSource() == colorField && saturationField.getFloat() == 0.001) |
---|
| 4831 | + { |
---|
| 4832 | + saturationField.setFloat(1); |
---|
| 4833 | + } |
---|
| 4834 | + |
---|
3745 | 4835 | applySelf(); |
---|
3746 | 4836 | //System.out.println("this = " + this); |
---|
3747 | 4837 | //System.out.println("PARENT = " + parent); |
---|
.. | .. |
---|
4041 | 5131 | { |
---|
4042 | 5132 | if (GetTree() != null) |
---|
4043 | 5133 | { |
---|
| 5134 | + GetTree().revalidate(); |
---|
4044 | 5135 | GetTree().repaint(); |
---|
4045 | 5136 | } |
---|
4046 | 5137 | |
---|
.. | .. |
---|
4049 | 5140 | ctrlPanel.validate(); // ? new |
---|
4050 | 5141 | ctrlPanel.repaint(); |
---|
4051 | 5142 | } |
---|
| 5143 | + |
---|
| 5144 | + if (previousVersionButton != null && copy.versionlist != null) |
---|
| 5145 | + SetVersionStates(); |
---|
4052 | 5146 | } |
---|
4053 | 5147 | |
---|
4054 | 5148 | static TweenManager tweenManager = new TweenManager(); |
---|
4055 | 5149 | |
---|
4056 | 5150 | void makeSomething(Object3D thing, boolean resetmodel) // deselect) |
---|
4057 | 5151 | { |
---|
4058 | | - Save(); |
---|
| 5152 | + if (Globals.REPLACEONMAKE) // && resetmodel) |
---|
| 5153 | + Save(); |
---|
4059 | 5154 | //Tween.set(thing, 0).target(1).start(tweenManager); |
---|
4060 | 5155 | //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager); |
---|
4061 | 5156 | // if (thing instanceof GenericJointDemo) |
---|
.. | .. |
---|
4142 | 5237 | { |
---|
4143 | 5238 | ResetModel(); |
---|
4144 | 5239 | Select(thing.GetTreePath(), true, false); // unselect... false); |
---|
| 5240 | + |
---|
| 5241 | + if (thing.Size() == 0) |
---|
| 5242 | + { |
---|
| 5243 | + //EditSelection(false); |
---|
| 5244 | + } |
---|
| 5245 | + |
---|
4145 | 5246 | refreshContents(); |
---|
4146 | 5247 | } |
---|
4147 | 5248 | |
---|
.. | .. |
---|
4279 | 5380 | |
---|
4280 | 5381 | try |
---|
4281 | 5382 | { |
---|
| 5383 | + // Try compressed version first. |
---|
4282 | 5384 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
4283 | 5385 | java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream); |
---|
4284 | 5386 | java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream); |
---|
.. | .. |
---|
4289 | 5391 | readobj.ResetDisplayList(); |
---|
4290 | 5392 | } catch (Exception e) |
---|
4291 | 5393 | { |
---|
4292 | | - //e.printStackTrace(); |
---|
| 5394 | + if (!e.toString().contains("GZIP")) |
---|
| 5395 | + e.printStackTrace(); |
---|
| 5396 | + |
---|
4293 | 5397 | try |
---|
4294 | 5398 | { |
---|
4295 | 5399 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
.. | .. |
---|
4348 | 5452 | |
---|
4349 | 5453 | void LoadIt(Object obj) |
---|
4350 | 5454 | { |
---|
| 5455 | + if (obj == null) |
---|
| 5456 | + { |
---|
| 5457 | + // Invalid file |
---|
| 5458 | + return; |
---|
| 5459 | + } |
---|
| 5460 | + |
---|
4351 | 5461 | System.out.println("Loaded " + obj); |
---|
4352 | 5462 | //new Exception().printStackTrace(); |
---|
4353 | 5463 | Object3D readobj = (Object3D) obj; |
---|
.. | .. |
---|
4357 | 5467 | |
---|
4358 | 5468 | if (readobj != null) |
---|
4359 | 5469 | { |
---|
4360 | | - Save(); |
---|
| 5470 | + //if (Globals.SAVEONMAKE) // A new object cannot share meshes |
---|
| 5471 | + // Save(); |
---|
4361 | 5472 | try |
---|
4362 | 5473 | { |
---|
4363 | 5474 | //readobj.deepCopySelf(copy); |
---|
4364 | 5475 | copy.clear(); // june 2014 |
---|
| 5476 | + copy.skyboxname = readobj.skyboxname; |
---|
| 5477 | + copy.skyboxext = readobj.skyboxext; |
---|
4365 | 5478 | for (int i = 0; i < readobj.size(); i++) |
---|
4366 | 5479 | { |
---|
4367 | 5480 | Object3D child = readobj.get(i); // reserve(i); |
---|
.. | .. |
---|
4402 | 5515 | } |
---|
4403 | 5516 | } catch (ClassCastException e) |
---|
4404 | 5517 | { |
---|
| 5518 | + e.printStackTrace(); |
---|
4405 | 5519 | assert (false); |
---|
4406 | 5520 | Composite c = (Composite) copy; |
---|
4407 | 5521 | c.children.clear(); |
---|
.. | .. |
---|
4412 | 5526 | c.addChild(csg); |
---|
4413 | 5527 | } |
---|
4414 | 5528 | |
---|
| 5529 | + copy.versionlist = readobj.versionlist; |
---|
| 5530 | + copy.versionindex = readobj.versionindex; |
---|
| 5531 | + |
---|
| 5532 | + if (copy.versionlist == null) |
---|
| 5533 | + { |
---|
| 5534 | + // Backward compatibility |
---|
| 5535 | + copy.versionlist = new Object3D[100]; |
---|
| 5536 | + copy.versionindex = -1; |
---|
| 5537 | + |
---|
| 5538 | + Save(true); |
---|
| 5539 | + } |
---|
| 5540 | + |
---|
| 5541 | + //? SetUndoStates(); |
---|
| 5542 | + |
---|
4415 | 5543 | ResetModel(); |
---|
4416 | 5544 | copy.HardTouch(); // recompile? |
---|
4417 | 5545 | refreshContents(); |
---|
4418 | 5546 | } |
---|
4419 | 5547 | } |
---|
4420 | 5548 | |
---|
4421 | | - void load() // throws ClassNotFoundException |
---|
| 5549 | + void Open() // throws ClassNotFoundException |
---|
4422 | 5550 | { |
---|
4423 | 5551 | if (Grafreed.standAlone) |
---|
4424 | 5552 | { |
---|
4425 | | - FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); |
---|
| 5553 | + FileDialog browser = new FileDialog(frame, "Open", FileDialog.LOAD); |
---|
4426 | 5554 | browser.show(); |
---|
4427 | 5555 | String filename = browser.getFile(); |
---|
4428 | 5556 | if (filename != null && filename.length() > 0) |
---|
.. | .. |
---|
4499 | 5627 | |
---|
4500 | 5628 | void save() |
---|
4501 | 5629 | { |
---|
| 5630 | + Replace(); |
---|
| 5631 | + |
---|
4502 | 5632 | if (lastname == null) |
---|
4503 | 5633 | { |
---|
4504 | 5634 | return; |
---|
.. | .. |
---|
4521 | 5651 | //ps.print(buffer.toString()); |
---|
4522 | 5652 | } catch (IOException e) |
---|
4523 | 5653 | { |
---|
| 5654 | + e.printStackTrace(); |
---|
4524 | 5655 | } |
---|
4525 | 5656 | } |
---|
4526 | 5657 | |
---|
.. | .. |
---|
4535 | 5666 | String filename = browser.getFile(); |
---|
4536 | 5667 | if (filename != null && filename.length() > 0) |
---|
4537 | 5668 | { |
---|
| 5669 | + if (!filename.endsWith(".gfd")) |
---|
| 5670 | + filename += ".gfd"; |
---|
4538 | 5671 | lastname = browser.getDirectory() + filename; |
---|
4539 | 5672 | save(); |
---|
4540 | 5673 | } |
---|
.. | .. |
---|
4701 | 5834 | MenuBar menuBar; |
---|
4702 | 5835 | Menu fileMenu; |
---|
4703 | 5836 | MenuItem newItem; |
---|
4704 | | - MenuItem loadItem; |
---|
| 5837 | + MenuItem openItem; |
---|
4705 | 5838 | MenuItem saveItem; |
---|
4706 | 5839 | MenuItem saveAsItem; |
---|
4707 | 5840 | MenuItem exportAsItem; |
---|
.. | .. |
---|
4724 | 5857 | CheckboxMenuItem toggleSwitchItem; |
---|
4725 | 5858 | CheckboxMenuItem toggleRootItem; |
---|
4726 | 5859 | CheckboxMenuItem animationItem; |
---|
| 5860 | + MenuItem archiveItem; |
---|
4727 | 5861 | CheckboxMenuItem toggleHandleItem; |
---|
4728 | 5862 | CheckboxMenuItem togglePaintItem; |
---|
4729 | 5863 | JSplitPane mainPanel; |
---|
4730 | 5864 | JScrollPane scrollpane; |
---|
| 5865 | + |
---|
4731 | 5866 | JPanel toolbarPanel; |
---|
| 5867 | + |
---|
4732 | 5868 | cGridBag treePanel; |
---|
| 5869 | + |
---|
4733 | 5870 | JPanel radioPanel; |
---|
4734 | 5871 | ButtonGroup buttonGroup; |
---|
4735 | | - cGridBag ctrlPanel; |
---|
| 5872 | + |
---|
| 5873 | + cGridBag toolboxPanel; |
---|
| 5874 | + cGridBag skyboxPanel; |
---|
4736 | 5875 | cGridBag materialPanel; |
---|
| 5876 | + cGridBag ctrlPanel; |
---|
| 5877 | + |
---|
4737 | 5878 | JScrollPane infoPanel; |
---|
| 5879 | + |
---|
4738 | 5880 | cGridBag optionsPanel; |
---|
| 5881 | + |
---|
4739 | 5882 | JTabbedPane objectPanel; |
---|
| 5883 | + boolean materialFlushed; |
---|
| 5884 | + Object3D latestObject; |
---|
| 5885 | + |
---|
4740 | 5886 | cGridBag XYZPanel; |
---|
| 5887 | + |
---|
4741 | 5888 | JSplitPane gridPanel; |
---|
4742 | 5889 | JSplitPane bigPanel; |
---|
| 5890 | + |
---|
4743 | 5891 | cGridBag bigThree; |
---|
4744 | 5892 | cGridBag scenePanel; |
---|
4745 | 5893 | cGridBag centralPanel; |
---|
.. | .. |
---|
4797 | 5945 | JLabel colorLabel; |
---|
4798 | 5946 | cNumberSlider colorField; |
---|
4799 | 5947 | JLabel modulationLabel; |
---|
4800 | | - cNumberSlider modulationField; |
---|
| 5948 | + cNumberSlider saturationField; |
---|
4801 | 5949 | JLabel metalnessLabel; |
---|
4802 | 5950 | cNumberSlider metalnessField; |
---|
4803 | 5951 | JLabel diffuseLabel; |
---|
.. | .. |
---|
4828 | 5976 | cNumberSlider anisoField; |
---|
4829 | 5977 | JLabel anisoVLabel; |
---|
4830 | 5978 | cNumberSlider anisoVField; |
---|
| 5979 | + |
---|
4831 | 5980 | JLabel cameraLabel; |
---|
4832 | 5981 | cNumberSlider cameraField; |
---|
4833 | 5982 | JLabel selfshadowLabel; |
---|
.. | .. |
---|
4842 | 5991 | cNumberSlider fakedepthField; |
---|
4843 | 5992 | JLabel shadowbiasLabel; |
---|
4844 | 5993 | cNumberSlider shadowbiasField; |
---|
| 5994 | + |
---|
4845 | 5995 | JLabel bumpLabel; |
---|
4846 | 5996 | cNumberSlider bumpField; |
---|
4847 | 5997 | JLabel noiseLabel; |
---|
.. | .. |
---|
4854 | 6004 | cNumberSlider fogField; |
---|
4855 | 6005 | JLabel opacityPowerLabel; |
---|
4856 | 6006 | cNumberSlider opacityPowerField; |
---|
4857 | | - JTree jTree; |
---|
| 6007 | + cTree jTree; |
---|
4858 | 6008 | //ObjectUI parent; |
---|
4859 | 6009 | |
---|
4860 | 6010 | cNumberSlider normalpushField; |
---|