.. | .. |
---|
15 | 15 | //import javax.swing.plaf.ColorUIResource; |
---|
16 | 16 | //import javax.swing.plaf.metal.DefaultMetalTheme; |
---|
17 | 17 | |
---|
| 18 | +import javax.swing.plaf.basic.BasicSplitPaneDivider; |
---|
| 19 | +import javax.swing.plaf.basic.BasicSplitPaneUI; |
---|
| 20 | + |
---|
18 | 21 | //import javax.media.opengl.GLCanvas; |
---|
19 | 22 | |
---|
20 | 23 | import //weka.core. |
---|
.. | .. |
---|
31 | 34 | iSendInfo |
---|
32 | 35 | //KeyListener |
---|
33 | 36 | { |
---|
| 37 | + public cToggleButton pinButton; |
---|
34 | 38 | boolean timeline; |
---|
35 | 39 | boolean wasFullScreen; |
---|
36 | 40 | |
---|
.. | .. |
---|
38 | 42 | JFrame frame; |
---|
39 | 43 | |
---|
40 | 44 | static ObjEditor theFrame; |
---|
| 45 | + |
---|
| 46 | + public void AllocProjectedVertices(Object3D object) |
---|
| 47 | + { |
---|
| 48 | + assert (object.projectedVertices != null); |
---|
| 49 | + |
---|
| 50 | + if (object.projectedVertices.length <= 2) |
---|
| 51 | + { |
---|
| 52 | + // Side effect... |
---|
| 53 | + Object3D.cVector2[] keep = object.projectedVertices; |
---|
| 54 | + object.projectedVertices = new Object3D.cVector2[3]; |
---|
| 55 | + for (int i = 0; i < 3; i++) |
---|
| 56 | + { |
---|
| 57 | + if (i < keep.length) |
---|
| 58 | + { |
---|
| 59 | + object.projectedVertices[i] = keep[i]; |
---|
| 60 | + } else |
---|
| 61 | + { |
---|
| 62 | + object.projectedVertices[i] = new Object3D.cVector2(); |
---|
| 63 | + } |
---|
| 64 | + /* |
---|
| 65 | + if(keep.length == 0) |
---|
| 66 | + object.projectedVertices[0] = new Object3D.cVector2(); |
---|
| 67 | + else |
---|
| 68 | + object.projectedVertices[0] = keep[0]; |
---|
| 69 | + object.projectedVertices[1] = new Object3D.cVector2(); |
---|
| 70 | + */ |
---|
| 71 | + } |
---|
| 72 | + } |
---|
| 73 | + } |
---|
| 74 | + |
---|
| 75 | + public cGridBag GetSeparator() |
---|
| 76 | + { |
---|
| 77 | + cGridBag separator = new cGridBag(); |
---|
| 78 | + separator.add(new JSeparator()); |
---|
| 79 | + separator.preferredHeight = 5; |
---|
| 80 | + return separator; |
---|
| 81 | + } |
---|
41 | 82 | |
---|
42 | 83 | cButton GetButton(String name, boolean border) |
---|
43 | 84 | { |
---|
44 | | - try |
---|
45 | | - { |
---|
46 | | - ImageIcon icon = GetIcon(name); |
---|
47 | | - return new cButton(icon, border); |
---|
48 | | - } |
---|
49 | | - catch (Exception e) |
---|
50 | | - { |
---|
51 | | - return new cButton(name, border); |
---|
52 | | - } |
---|
| 85 | + ImageIcon icon = GetIcon(name); |
---|
| 86 | + return new cButton(icon, border); |
---|
| 87 | + } |
---|
| 88 | + |
---|
| 89 | + cLabel GetLabel(String name, boolean border) |
---|
| 90 | + { |
---|
| 91 | + //ImageIcon icon = GetIcon(name); |
---|
| 92 | + return new cLabel(GetImage(name), border); |
---|
53 | 93 | } |
---|
54 | 94 | |
---|
55 | 95 | cToggleButton GetToggleButton(String name, boolean border) |
---|
56 | 96 | { |
---|
57 | | - try |
---|
58 | | - { |
---|
59 | | - ImageIcon icon = GetIcon(name); |
---|
60 | | - return new cToggleButton(icon, border); |
---|
61 | | - } |
---|
62 | | - catch (Exception e) |
---|
63 | | - { |
---|
64 | | - return new cToggleButton(name, border); |
---|
65 | | - } |
---|
| 97 | + ImageIcon icon = GetIcon(name); |
---|
| 98 | + return new cToggleButton(icon, border); |
---|
66 | 99 | } |
---|
67 | 100 | |
---|
68 | 101 | cCheckBox GetCheckBox(String name, boolean border) |
---|
69 | 102 | { |
---|
| 103 | + ImageIcon icon = GetIcon(name); |
---|
| 104 | + return new cCheckBox(icon, border); |
---|
| 105 | + } |
---|
| 106 | + |
---|
| 107 | + static java.util.Hashtable<String, javax.swing.ImageIcon> icons = new java.util.Hashtable<String, javax.swing.ImageIcon>(); |
---|
| 108 | + |
---|
| 109 | + ImageIcon GetIcon(String name) |
---|
| 110 | + { |
---|
| 111 | + javax.swing.ImageIcon iconCache = icons.get(name); |
---|
| 112 | + if (iconCache != null) |
---|
| 113 | + { |
---|
| 114 | + return iconCache; |
---|
| 115 | + } |
---|
| 116 | + |
---|
70 | 117 | try |
---|
71 | 118 | { |
---|
72 | | - ImageIcon icon = GetIcon(name); |
---|
73 | | - return new cCheckBox(icon, border); |
---|
| 119 | + BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name)); |
---|
| 120 | + |
---|
| 121 | +// if (image.getWidth() > 48 && image.getHeight() > 48) |
---|
| 122 | +// { |
---|
| 123 | +// BufferedImage resized = new BufferedImage(48, 48, image.getType()); |
---|
| 124 | +// Graphics2D g = resized.createGraphics(); |
---|
| 125 | +// g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); |
---|
| 126 | +// //g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
---|
| 127 | +// g.drawImage(image, 0, 0, 48, 48, 0, 0, image.getWidth(), image.getHeight(), null); |
---|
| 128 | +// g.dispose(); |
---|
| 129 | +// |
---|
| 130 | +// image = resized; |
---|
| 131 | +// } |
---|
| 132 | + |
---|
| 133 | + javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image); |
---|
| 134 | + |
---|
| 135 | + icons.put(name, icon); |
---|
| 136 | + |
---|
| 137 | + return icon; |
---|
74 | 138 | } |
---|
75 | 139 | catch (Exception e) |
---|
76 | 140 | { |
---|
77 | | - return new cCheckBox(name, border); |
---|
| 141 | + //icons.put(name, null); |
---|
| 142 | + return null; |
---|
78 | 143 | } |
---|
79 | 144 | } |
---|
80 | | - |
---|
81 | | - private ImageIcon GetIcon(String name) throws IOException |
---|
| 145 | + |
---|
| 146 | + BufferedImage GetImage(String name) |
---|
82 | 147 | { |
---|
83 | | - BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name)); |
---|
84 | | - |
---|
85 | | - if (image.getWidth() != 24 && image.getHeight() != 24) |
---|
| 148 | + try |
---|
86 | 149 | { |
---|
87 | | - BufferedImage resized = new BufferedImage(24, 24, image.getType()); |
---|
88 | | - Graphics2D g = resized.createGraphics(); |
---|
89 | | - g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); |
---|
90 | | - //g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
---|
91 | | - g.drawImage(image, 0, 0, 24, 24, 0, 0, image.getWidth(), image.getHeight(), null); |
---|
92 | | - g.dispose(); |
---|
93 | | - |
---|
94 | | - image = resized; |
---|
| 150 | + BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name)); |
---|
| 151 | + |
---|
| 152 | + return image; |
---|
95 | 153 | } |
---|
96 | | - |
---|
97 | | - javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image); |
---|
98 | | - return icon; |
---|
| 154 | + catch (Exception e) |
---|
| 155 | + { |
---|
| 156 | + return null; |
---|
| 157 | + } |
---|
99 | 158 | } |
---|
100 | 159 | |
---|
101 | 160 | // SCRIPT |
---|
.. | .. |
---|
207 | 266 | |
---|
208 | 267 | objEditor.ctrlPanel.remove(namePanel); |
---|
209 | 268 | |
---|
210 | | - if (!GroupEditor.allparams) |
---|
| 269 | + if (!allparams) |
---|
211 | 270 | return; |
---|
212 | 271 | |
---|
213 | 272 | // objEditor.ctrlPanel.remove(liveCB); |
---|
.. | .. |
---|
279 | 338 | client = inClient; |
---|
280 | 339 | copy = client; |
---|
281 | 340 | |
---|
| 341 | +// if (copy.versionlist == null) |
---|
| 342 | +// { |
---|
| 343 | +// copy.versionlist = new Object3D[100]; |
---|
| 344 | +// copy.versionindex = -1; |
---|
| 345 | +// |
---|
| 346 | +// callee.Save(true); |
---|
| 347 | +// } |
---|
| 348 | + |
---|
282 | 349 | // "this" is not called: SetupUI2(objEditor); |
---|
283 | 350 | } |
---|
284 | 351 | |
---|
.. | .. |
---|
292 | 359 | client = inClient; |
---|
293 | 360 | copy = client; |
---|
294 | 361 | |
---|
| 362 | + if (copy.versionlist == null) |
---|
| 363 | + { |
---|
| 364 | + copy.versionlist = new Object3D[100]; |
---|
| 365 | + copy.versionindex = -1; |
---|
| 366 | + |
---|
| 367 | +// Save(true); |
---|
| 368 | + } |
---|
| 369 | + |
---|
295 | 370 | SetupUI2(callee.GetEditor()); |
---|
296 | 371 | } |
---|
297 | 372 | |
---|
.. | .. |
---|
306 | 381 | //localCopy.parent = null; |
---|
307 | 382 | |
---|
308 | 383 | frame = new JFrame(); |
---|
309 | | - frame.setUndecorated(true); |
---|
| 384 | + frame.setUndecorated(false); |
---|
310 | 385 | objEditor = this; |
---|
311 | 386 | this.callee = callee; |
---|
312 | 387 | |
---|
313 | 388 | //parent = p; |
---|
314 | 389 | |
---|
315 | 390 | GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(); |
---|
316 | | - System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow()); |
---|
| 391 | + if (Globals.DEBUG) |
---|
| 392 | + System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow()); |
---|
317 | 393 | //gd.setFullScreenWindow(this); |
---|
318 | 394 | //setResizable(false); |
---|
319 | 395 | //if (!isDisplayable()) |
---|
.. | .. |
---|
324 | 400 | copy = localCopy; |
---|
325 | 401 | copy.editWindow = this; |
---|
326 | 402 | |
---|
| 403 | +// if (copy.versionlist == null) |
---|
| 404 | +// { |
---|
| 405 | +// copy.versionlist = new Object3D[100]; |
---|
| 406 | +// copy.versionindex = -1; |
---|
| 407 | +// |
---|
| 408 | +// Save(true); |
---|
| 409 | +// } |
---|
| 410 | + |
---|
327 | 411 | SetupMenu(); |
---|
328 | 412 | |
---|
329 | 413 | //SetupName(objEditor); // new |
---|
.. | .. |
---|
337 | 421 | return frame.action(event, obj); |
---|
338 | 422 | } |
---|
339 | 423 | |
---|
| 424 | + // Cannot work without static |
---|
| 425 | + static boolean allparams = true; |
---|
| 426 | + |
---|
| 427 | + static java.util.Vector<Object3D> listUI = new java.util.Vector<Object3D>(); |
---|
| 428 | + |
---|
340 | 429 | void SetupMenu() |
---|
341 | 430 | { |
---|
342 | 431 | frame.setMenuBar(menuBar = new MenuBar()); |
---|
343 | 432 | menuBar.add(fileMenu = new Menu("File")); |
---|
344 | 433 | fileMenu.add(newItem = new MenuItem("New")); |
---|
345 | | - fileMenu.add(loadItem = new MenuItem("Open...")); |
---|
| 434 | + fileMenu.add(openItem = new MenuItem("Open...")); |
---|
346 | 435 | |
---|
347 | 436 | //oe.menuBar.add(menu = new Menu("Include")); |
---|
348 | 437 | Menu menu = new Menu("Import"); |
---|
.. | .. |
---|
374 | 463 | } |
---|
375 | 464 | |
---|
376 | 465 | newItem.addActionListener(this); |
---|
377 | | - loadItem.addActionListener(this); |
---|
| 466 | + openItem.addActionListener(this); |
---|
378 | 467 | saveItem.addActionListener(this); |
---|
379 | 468 | saveAsItem.addActionListener(this); |
---|
380 | 469 | exportAsItem.addActionListener(this); |
---|
.. | .. |
---|
383 | 472 | closeItem.addActionListener(this); |
---|
384 | 473 | |
---|
385 | 474 | objectPanel = new JTabbedPane(); |
---|
| 475 | + |
---|
| 476 | + ChangeListener changeListener = new ChangeListener() |
---|
| 477 | + { |
---|
| 478 | + //String name; |
---|
| 479 | + |
---|
| 480 | + public void stateChanged(ChangeEvent changeEvent) |
---|
| 481 | + { |
---|
| 482 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Material") && !materialFlushed) |
---|
| 483 | +// { |
---|
| 484 | +// if (latestObject != null) |
---|
| 485 | +// { |
---|
| 486 | +// refreshContents(true); |
---|
| 487 | +// SetMaterial(latestObject); |
---|
| 488 | +// } |
---|
| 489 | +// |
---|
| 490 | +// materialFlushed = true; |
---|
| 491 | +// } |
---|
| 492 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Edit")) |
---|
| 493 | +// { |
---|
| 494 | +// if (listUI.size() == 0) |
---|
| 495 | +// EditSelection(false); |
---|
| 496 | +// } |
---|
| 497 | + |
---|
| 498 | +// if (objectPanel.getSelectedIndex() == 4) |
---|
| 499 | +// { |
---|
| 500 | +// name = copy.skyboxname; |
---|
| 501 | +// |
---|
| 502 | +// if (name == null) |
---|
| 503 | +// { |
---|
| 504 | +// name = ""; |
---|
| 505 | +// } |
---|
| 506 | +// |
---|
| 507 | +// copy.skyboxname = "cubemaps/default-skyboxes/rgb"; |
---|
| 508 | +// copy.skyboxext = "jpg"; |
---|
| 509 | +// } |
---|
| 510 | +// else |
---|
| 511 | +// { |
---|
| 512 | +// if (name != null) |
---|
| 513 | +// { |
---|
| 514 | +// if (name.equals("")) |
---|
| 515 | +// { |
---|
| 516 | +// copy.skyboxname = null; |
---|
| 517 | +// copy.skyboxext = null; |
---|
| 518 | +// } |
---|
| 519 | +// else |
---|
| 520 | +// { |
---|
| 521 | +// copy.skyboxname = name; |
---|
| 522 | +// } |
---|
| 523 | +// } |
---|
| 524 | +// } |
---|
| 525 | + cameraView.transformMode = objectPanel.getSelectedIndex() == 4; |
---|
| 526 | + |
---|
| 527 | +// refreshContents(false); // To refresh Info tab |
---|
| 528 | + cameraView.repaint(); |
---|
| 529 | + } |
---|
| 530 | + }; |
---|
| 531 | + objectPanel.addChangeListener(changeListener); |
---|
| 532 | + |
---|
386 | 533 | toolbarPanel = new JPanel(); |
---|
387 | 534 | toolbarPanel.setName("Toolbar"); |
---|
| 535 | + |
---|
388 | 536 | treePanel = new cGridBag(); |
---|
389 | 537 | treePanel.setName("Tree"); |
---|
390 | 538 | |
---|
391 | 539 | editPanel = new cGridBag().setVertical(true); |
---|
392 | | - editPanel.setName("Edit"); |
---|
| 540 | + //editPanel.setName("Edit"); |
---|
393 | 541 | |
---|
394 | 542 | ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
---|
395 | 543 | |
---|
.. | .. |
---|
397 | 545 | editPanel.add(editCommandsPanel); |
---|
398 | 546 | editPanel.add(ctrlPanel); |
---|
399 | 547 | |
---|
400 | | - toolboxPanel = new cGridBag().setVertical(false); |
---|
401 | | - toolboxPanel.setName("Toolbox"); |
---|
| 548 | + toolboxPanel = new cGridBag().setVertical(true); |
---|
| 549 | + //toolboxPanel.setName("Toolbox"); |
---|
402 | 550 | |
---|
403 | | - materialPanel = new cGridBag().setVertical(true); |
---|
404 | | - materialPanel.setName("Material"); |
---|
| 551 | + skyboxPanel = new cGridBag().setVertical(true); |
---|
| 552 | + |
---|
| 553 | + materialPanel = new cGridBag().setVertical(false); |
---|
| 554 | + //materialPanel.setName("Material"); |
---|
405 | 555 | |
---|
406 | 556 | /*JTextPane*/ |
---|
407 | 557 | infoarea = createTextPane(); |
---|
.. | .. |
---|
409 | 559 | |
---|
410 | 560 | infoarea.setEditable(true); |
---|
411 | 561 | SetText(); |
---|
| 562 | + |
---|
412 | 563 | // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f)); |
---|
413 | 564 | // infoarea.setOpaque(false); |
---|
414 | 565 | // //infoarea.setForeground(textcolor); |
---|
415 | 566 | // TEXTAREA infoarea.setLineWrap(true); |
---|
416 | 567 | // TEXTAREA infoarea.setWrapStyleWord(true); |
---|
417 | 568 | infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); |
---|
418 | | - infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
419 | | - infoPanel.setName("Info"); |
---|
| 569 | + infoPanel.setPreferredSize(new Dimension(1, 1)); |
---|
| 570 | + //infoPanel.setName("Info"); |
---|
420 | 571 | //infoPanel.setLayout(new BorderLayout()); |
---|
421 | 572 | //infoPanel.add(createTextPane()); |
---|
422 | 573 | |
---|
.. | .. |
---|
427 | 578 | mainPanel.setDividerSize(9); |
---|
428 | 579 | mainPanel.setDividerLocation(0.5); //1.0); |
---|
429 | 580 | mainPanel.setResizeWeight(0.5); |
---|
430 | | - |
---|
| 581 | + |
---|
| 582 | +//mainPanel.setDividerSize((int) (mainPanel.getDividerSize() * 1.5)); |
---|
| 583 | + BasicSplitPaneDivider divider = ( (BasicSplitPaneUI) mainPanel.getUI()).getDivider(); |
---|
| 584 | + divider.setDividerSize(15); |
---|
| 585 | + divider.setBorder(BorderFactory.createTitledBorder(divider.getBorder(), "Custom border title -- gets rid of the one-touch arrows!")); |
---|
| 586 | + |
---|
| 587 | + mainPanel.setUI(new BasicSplitPaneUI()); |
---|
| 588 | + |
---|
431 | 589 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
---|
432 | 590 | //mainPanel.setLayout(new GridBagLayout()); |
---|
433 | 591 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
.. | .. |
---|
658 | 816 | } |
---|
659 | 817 | } |
---|
660 | 818 | |
---|
661 | | -static GraphicsDevice device = GraphicsEnvironment |
---|
662 | | - .getLocalGraphicsEnvironment().getScreenDevices()[0]; |
---|
| 819 | +//static GraphicsDevice device = GraphicsEnvironment |
---|
| 820 | +// .getLocalGraphicsEnvironment().getScreenDevices()[0]; |
---|
663 | 821 | |
---|
664 | 822 | Rectangle keeprect; |
---|
665 | 823 | cRadio radio; |
---|
.. | .. |
---|
676 | 834 | boolean maximized; |
---|
677 | 835 | |
---|
678 | 836 | cButton fullscreenLayout; |
---|
| 837 | + cButton expandedLayout; |
---|
679 | 838 | |
---|
680 | 839 | void Minimize() |
---|
681 | 840 | { |
---|
682 | 841 | frame.setState(Frame.ICONIFIED); |
---|
| 842 | + frame.validate(); |
---|
683 | 843 | } |
---|
684 | 844 | |
---|
| 845 | +// artifactURI=null, type=0, property=${file.reference.jfxrt.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@6767876f, broken=false, additional={} |
---|
| 846 | +// artifactURI=null, type=0, property=${file.reference.mac-ui.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@16bdc817, broken=false, additional={} |
---|
| 847 | +// artifactURI=null, type=0, property=${file.reference.classes.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@9daa9c17, broken=false, additional={} |
---|
685 | 848 | void Maximize() |
---|
686 | 849 | { |
---|
| 850 | + if (CameraPane.FULLSCREEN) |
---|
| 851 | + { |
---|
| 852 | + ToggleFullScreen(); |
---|
| 853 | + } |
---|
| 854 | + |
---|
687 | 855 | if (maximized) |
---|
688 | 856 | { |
---|
689 | 857 | frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); |
---|
.. | .. |
---|
691 | 859 | else |
---|
692 | 860 | { |
---|
693 | 861 | keeprect = frame.getBounds(); |
---|
694 | | - Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); |
---|
695 | | - Dimension rect2 = frame.getToolkit().getScreenSize(); |
---|
696 | | - frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height); |
---|
| 862 | +// Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); |
---|
| 863 | +// Dimension rect2 = frame.getToolkit().getScreenSize(); |
---|
| 864 | +// frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height); |
---|
697 | 865 | // frame.setState(Frame.MAXIMIZED_BOTH); |
---|
| 866 | + frame.setBounds(frame.getGraphicsConfiguration().getBounds()); |
---|
698 | 867 | } |
---|
699 | 868 | |
---|
700 | 869 | maximized ^= true; |
---|
| 870 | + |
---|
| 871 | + frame.validate(); |
---|
701 | 872 | } |
---|
| 873 | + |
---|
| 874 | + cButton minButton; |
---|
| 875 | + cButton maxButton; |
---|
| 876 | + cButton fullButton; |
---|
| 877 | + cButton collapseButton; |
---|
| 878 | + cButton maximize3DButton; |
---|
702 | 879 | |
---|
703 | 880 | void ToggleFullScreen() |
---|
704 | 881 | { |
---|
705 | | - if (CameraPane.FULLSCREEN) |
---|
| 882 | + GraphicsDevice device = frame.getGraphicsConfiguration().getDevice(); |
---|
| 883 | + |
---|
| 884 | + cameraView.ToggleFullScreen(); |
---|
| 885 | + |
---|
| 886 | + if (!CameraPane.FULLSCREEN) |
---|
706 | 887 | { |
---|
707 | 888 | device.setFullScreenWindow(null); |
---|
| 889 | + frame.dispose(); |
---|
| 890 | + frame.setUndecorated(false); |
---|
| 891 | + frame.validate(); |
---|
| 892 | + frame.setVisible(true); |
---|
| 893 | + |
---|
708 | 894 | //frame.setVisible(false); |
---|
709 | 895 | // frame.removeNotify(); |
---|
710 | 896 | // frame.setUndecorated(false); |
---|
.. | .. |
---|
714 | 900 | // X frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
715 | 901 | // X framePanel.add(bigThree); |
---|
716 | 902 | // X frame.getContentPane().add(/*"Center",*/framePanel); |
---|
717 | | - framePanel.setDividerLocation(1); |
---|
| 903 | +// framePanel.setDividerLocation(46); // icons are 24x24 |
---|
718 | 904 | |
---|
719 | 905 | //frame.setVisible(true); |
---|
720 | | - radio.layout = keepButton; |
---|
| 906 | +// radio.layout = keepButton; |
---|
721 | 907 | //theFrame = null; |
---|
722 | 908 | keepButton = null; |
---|
723 | | - radio.layout.doClick(); |
---|
| 909 | +// radio.layout.doClick(); |
---|
724 | 910 | |
---|
725 | 911 | } else |
---|
726 | 912 | { |
---|
.. | .. |
---|
729 | 915 | // frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width, |
---|
730 | 916 | // frame.getToolkit().getScreenSize().height); |
---|
731 | 917 | //frame.setVisible(false); |
---|
| 918 | + |
---|
| 919 | + frame.dispose(); |
---|
| 920 | + frame.setUndecorated(true); |
---|
732 | 921 | device.setFullScreenWindow(frame); |
---|
| 922 | + frame.validate(); |
---|
| 923 | + frame.setVisible(true); |
---|
733 | 924 | // frame.removeNotify(); |
---|
734 | 925 | // frame.setUndecorated(true); |
---|
735 | 926 | // frame.addNotify(); |
---|
736 | 927 | // X frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
737 | 928 | // X framePanel.remove(bigThree); |
---|
738 | 929 | // X frame.getContentPane().add(/*"Center",*/bigThree); |
---|
739 | | - framePanel.setDividerLocation(0); |
---|
| 930 | +// framePanel.setDividerLocation(0); |
---|
740 | 931 | |
---|
741 | | - radio.layout = fullscreenLayout; |
---|
742 | | - radio.layout.doClick(); |
---|
| 932 | +// radio.layout = fullscreenLayout; |
---|
| 933 | +// radio.layout.doClick(); |
---|
743 | 934 | //frame.setVisible(true); |
---|
744 | 935 | } |
---|
745 | | - |
---|
746 | | - cameraView.ToggleFullScreen(); |
---|
| 936 | + frame.validate(); |
---|
| 937 | + |
---|
| 938 | + cameraView.requestFocusInWindow(); |
---|
747 | 939 | } |
---|
| 940 | + |
---|
| 941 | + void CollapseToolbar() |
---|
| 942 | + { |
---|
| 943 | + framePanel.setDividerLocation(0); |
---|
| 944 | + //frame.validate(); |
---|
| 945 | + |
---|
| 946 | + cameraView.requestFocusInWindow(); |
---|
| 947 | + } |
---|
| 948 | + |
---|
| 949 | + private Object3D Duplicate(Object3D object) |
---|
| 950 | + { |
---|
| 951 | + boolean temp = CameraPane.SWITCH; |
---|
| 952 | + CameraPane.SWITCH = false; |
---|
| 953 | + |
---|
| 954 | + object.ExtractBigData(versiontable); |
---|
| 955 | + // if (copy == client) |
---|
| 956 | + |
---|
| 957 | + Object3D versions[] = object.versionlist; |
---|
| 958 | + object.versionlist = null; |
---|
| 959 | + |
---|
| 960 | + //byte[] compress = Compress(copy); |
---|
| 961 | + Object3D compress = (Object3D)Grafreed.clone(object); |
---|
| 962 | + |
---|
| 963 | + object.versionlist = versions; |
---|
| 964 | + |
---|
| 965 | + object.RestoreBigData(versiontable); |
---|
| 966 | + |
---|
| 967 | + CameraPane.SWITCH = temp; |
---|
| 968 | + |
---|
| 969 | + return compress; |
---|
| 970 | + } |
---|
748 | 971 | |
---|
749 | 972 | private JTextPane createTextPane() |
---|
750 | 973 | { |
---|
.. | .. |
---|
867 | 1090 | { |
---|
868 | 1091 | SetupMaterial(materialPanel); |
---|
869 | 1092 | } |
---|
| 1093 | + |
---|
870 | 1094 | //SetupName(); |
---|
871 | 1095 | //SetupViews(); |
---|
872 | 1096 | } |
---|
.. | .. |
---|
876 | 1100 | // NumberSlider vDivsField; |
---|
877 | 1101 | // JCheckBox endcaps; |
---|
878 | 1102 | JCheckBox liveCB; |
---|
879 | | - JCheckBox selectCB; |
---|
| 1103 | + JCheckBox selectableCB; |
---|
880 | 1104 | JCheckBox hideCB; |
---|
881 | 1105 | JCheckBox link2masterCB; |
---|
882 | 1106 | JCheckBox markCB; |
---|
.. | .. |
---|
884 | 1108 | JCheckBox speedupCB; |
---|
885 | 1109 | JCheckBox rewindCB; |
---|
886 | 1110 | JCheckBox flipVCB; |
---|
| 1111 | + |
---|
| 1112 | + cCheckBox toggleTextureCB; |
---|
| 1113 | + cCheckBox toggleSwitchCB; |
---|
| 1114 | + |
---|
887 | 1115 | JComboBox texresMenu; |
---|
| 1116 | + |
---|
888 | 1117 | JButton resetButton; |
---|
889 | 1118 | JButton stepButton; |
---|
890 | 1119 | JButton stepAllButton; |
---|
.. | .. |
---|
1070 | 1299 | |
---|
1071 | 1300 | namePanel = new cGridBag(); |
---|
1072 | 1301 | |
---|
| 1302 | + //if (copy.pinned) |
---|
| 1303 | + { |
---|
| 1304 | + pinButton = GetToggleButton("icons/pin.png", !Grafreed.NIMBUSLAF); |
---|
| 1305 | + pinButton.setSelected(copy.pinned); |
---|
| 1306 | + cGridBag t = new cGridBag(); |
---|
| 1307 | + t.preferredWidth = 2; |
---|
| 1308 | + t.add(pinButton); |
---|
| 1309 | + namePanel.add(t); |
---|
| 1310 | + |
---|
| 1311 | + pinButton.addItemListener(this); |
---|
| 1312 | + } |
---|
| 1313 | + |
---|
1073 | 1314 | nameField = AddText(namePanel, copy.GetName()); |
---|
1074 | | - namePanel.add(nameField); |
---|
| 1315 | + namePanel.add(new JScrollPane(nameField, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER)); |
---|
1075 | 1316 | oe.ctrlPanel.add(namePanel); |
---|
1076 | 1317 | |
---|
1077 | 1318 | oe.ctrlPanel.Return(); |
---|
1078 | 1319 | |
---|
1079 | | - if (!GroupEditor.allparams) |
---|
| 1320 | + if (!allparams) |
---|
1080 | 1321 | return; |
---|
1081 | 1322 | |
---|
1082 | 1323 | setupPanel = new cGridBag().setVertical(false); |
---|
1083 | 1324 | |
---|
1084 | 1325 | liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
1085 | 1326 | liveCB.setToolTipText("Animate object"); |
---|
1086 | | - selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
1087 | | - selectCB.setToolTipText("Make object selectable"); |
---|
| 1327 | + markCB = AddCheckBox(setupPanel, "Anim", copy.marked); |
---|
| 1328 | + markCB.setToolTipText("Set target transform"); |
---|
| 1329 | + selectableCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
| 1330 | + selectableCB.setToolTipText("Make object selectable"); |
---|
1088 | 1331 | // Return(); |
---|
| 1332 | + |
---|
1089 | 1333 | hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
1090 | 1334 | hideCB.setToolTipText("Hide object"); |
---|
1091 | | - markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
1092 | | - markCB.setToolTipText("Set the animation target transform"); |
---|
| 1335 | + |
---|
| 1336 | + ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false); |
---|
1093 | 1337 | |
---|
1094 | 1338 | setupPanel2 = new cGridBag().setVertical(false); |
---|
1095 | 1339 | |
---|
1096 | 1340 | rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind); |
---|
1097 | 1341 | rewindCB.setToolTipText("Rewind animation"); |
---|
1098 | 1342 | |
---|
1099 | | - randomCB = AddCheckBox(setupPanel2, "Rand", copy.random); |
---|
1100 | | - randomCB.setToolTipText("Randomly Rewind or Go back and forth"); |
---|
| 1343 | + randomCB = AddCheckBox(setupPanel2, "Random", copy.random); |
---|
| 1344 | + randomCB.setToolTipText("Randomly Rewind (or Go back and forth)"); |
---|
1101 | 1345 | |
---|
| 1346 | + link2masterCB = AddCheckBox(setupPanel2, "Support", copy.link2master); |
---|
| 1347 | + link2masterCB.setToolTipText("Attach to support"); |
---|
| 1348 | + |
---|
1102 | 1349 | if (Globals.ADVANCED) |
---|
1103 | 1350 | { |
---|
1104 | | - link2masterCB = AddCheckBox(setupPanel2, "Supp", copy.link2master); |
---|
1105 | | - link2masterCB.setToolTipText("Attach to support"); |
---|
1106 | 1351 | speedupCB = AddCheckBox(setupPanel2, "Speed", copy.speedup); |
---|
1107 | 1352 | speedupCB.setToolTipText("Option motion capture"); |
---|
1108 | 1353 | } |
---|
.. | .. |
---|
1288 | 1533 | |
---|
1289 | 1534 | if (cam == null || !(copy.get(0) instanceof cGroup)) |
---|
1290 | 1535 | { |
---|
| 1536 | + if (Globals.DEBUG) |
---|
1291 | 1537 | System.out.println("CREATE CAMERAS"); |
---|
1292 | 1538 | cams = new cTemplate(); |
---|
1293 | 1539 | cams.name = "Cameras"; |
---|
.. | .. |
---|
1376 | 1622 | XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
---|
1377 | 1623 | XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll); |
---|
1378 | 1624 | XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll); |
---|
| 1625 | + //XYZPanel.setName("XYZ"); |
---|
1379 | 1626 | |
---|
1380 | 1627 | /* |
---|
1381 | 1628 | gridPanel = new JPanel(); //new BorderLayout()); |
---|
.. | .. |
---|
1412 | 1659 | |
---|
1413 | 1660 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
---|
1414 | 1661 | //tmp.setName("Edit"); |
---|
1415 | | - objectPanel.add(toolboxPanel); |
---|
1416 | 1662 | objectPanel.add(materialPanel); |
---|
| 1663 | + objectPanel.setIconAt(0, GetIcon("icons/material.png")); |
---|
| 1664 | + objectPanel.setToolTipTextAt(0, "Material"); |
---|
| 1665 | + |
---|
| 1666 | + objectPanel.add(toolboxPanel); |
---|
| 1667 | + objectPanel.setIconAt(1, GetIcon("icons/primitives.png")); |
---|
| 1668 | + objectPanel.setToolTipTextAt(1, "Objects & textures"); |
---|
| 1669 | + |
---|
| 1670 | + objectPanel.add(skyboxPanel); |
---|
| 1671 | + objectPanel.setIconAt(2, GetIcon("icons/skybox.jpg")); |
---|
| 1672 | + objectPanel.setToolTipTextAt(2, "Backgrounds"); |
---|
| 1673 | + |
---|
1417 | 1674 | // JPanel north = new JPanel(new BorderLayout()); |
---|
1418 | 1675 | // north.setName("Edit"); |
---|
1419 | 1676 | // north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1420 | 1677 | // objectPanel.add(north); |
---|
1421 | 1678 | objectPanel.add(editPanel); |
---|
1422 | | - objectPanel.add(infoPanel); |
---|
1423 | | - |
---|
| 1679 | + objectPanel.setIconAt(3, GetIcon("icons/write.png")); |
---|
| 1680 | + objectPanel.setToolTipTextAt(3, "Edit controls"); |
---|
| 1681 | + |
---|
| 1682 | + objectPanel.add(XYZPanel); |
---|
| 1683 | + objectPanel.setIconAt(4, GetIcon("icons/XYZ.png")); |
---|
| 1684 | + objectPanel.setToolTipTextAt(4, "XYZ/RGB transform"); |
---|
| 1685 | + |
---|
1424 | 1686 | /* |
---|
1425 | 1687 | aConstraints.gridx = 0; |
---|
1426 | 1688 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1428 | 1690 | aConstraints.gridy += 1; |
---|
1429 | 1691 | aConstraints.gridwidth = 1; |
---|
1430 | 1692 | mainPanel.add(objectPanel, aConstraints); |
---|
1431 | | - */ |
---|
| 1693 | + */ |
---|
1432 | 1694 | |
---|
1433 | 1695 | scrollpane = new JScrollPane(mainPanel, ScrollPaneConstants.// VERTICAL_SCROLLBAR_ALWAYS, |
---|
1434 | 1696 | VERTICAL_SCROLLBAR_AS_NEEDED, |
---|
.. | .. |
---|
1440 | 1702 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1441 | 1703 | |
---|
1442 | 1704 | /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
1443 | | - scenePanel.preferredWidth = 6; |
---|
| 1705 | + scenePanel.preferredWidth = 5; |
---|
1444 | 1706 | |
---|
1445 | 1707 | JTabbedPane tabbedPane = new JTabbedPane(); |
---|
1446 | 1708 | tabbedPane.add(scrollpane); |
---|
1447 | 1709 | |
---|
1448 | | - tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
1449 | | - |
---|
1450 | | - optionsPanel = new cGridBag().setVertical(true); |
---|
| 1710 | + optionsPanel = new cGridBag().setVertical(false); |
---|
1451 | 1711 | |
---|
1452 | 1712 | optionsPanel.setName("Options"); |
---|
1453 | 1713 | |
---|
.. | .. |
---|
1455 | 1715 | |
---|
1456 | 1716 | tabbedPane.add(optionsPanel); |
---|
1457 | 1717 | |
---|
| 1718 | + tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
| 1719 | + |
---|
1458 | 1720 | scenePanel.add(tabbedPane); |
---|
1459 | 1721 | |
---|
| 1722 | + //if (Globals.ADVANCED) |
---|
| 1723 | +// tabbedPane.add(infoPanel); |
---|
| 1724 | +// tabbedPane.setIconAt(3, GetIcon("icons/info.png")); |
---|
| 1725 | +// tabbedPane.setToolTipTextAt(3, "Information"); |
---|
| 1726 | + |
---|
1460 | 1727 | /* |
---|
1461 | 1728 | cTree jTree = new cTree(null); |
---|
1462 | 1729 | ToolTipManager.sharedInstance().registerComponent(jTree); |
---|
.. | .. |
---|
1518 | 1785 | bigThree = new cGridBag(); |
---|
1519 | 1786 | bigThree.addComponent(scenePanel); |
---|
1520 | 1787 | bigThree.addComponent(centralPanel); |
---|
1521 | | - bigThree.addComponent(XYZPanel); |
---|
| 1788 | + //bigThree.addComponent(XYZPanel); |
---|
1522 | 1789 | |
---|
1523 | 1790 | // // SIDE EFFECT!!! |
---|
1524 | 1791 | // aConstraints.gridx = 0; |
---|
.. | .. |
---|
1527 | 1794 | // aConstraints.gridheight = 1; |
---|
1528 | 1795 | |
---|
1529 | 1796 | framePanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, toolbarPanel, bigThree); |
---|
1530 | | - framePanel.setContinuousLayout(true); |
---|
1531 | | - framePanel.setOneTouchExpandable(true); |
---|
1532 | | - framePanel.setDividerLocation(0.8); |
---|
| 1797 | + |
---|
| 1798 | + framePanel.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, |
---|
| 1799 | + new java.beans.PropertyChangeListener() |
---|
| 1800 | + { |
---|
| 1801 | + public void propertyChange(java.beans.PropertyChangeEvent pce) |
---|
| 1802 | + { |
---|
| 1803 | + if ((Integer)pce.getOldValue() == 1) |
---|
| 1804 | + { |
---|
| 1805 | + if (radio.layout != expandedLayout) |
---|
| 1806 | + { |
---|
| 1807 | + radio.layout = expandedLayout; |
---|
| 1808 | + radio.layout.doClick(); |
---|
| 1809 | + } |
---|
| 1810 | + } |
---|
| 1811 | + } |
---|
| 1812 | + }); |
---|
| 1813 | + |
---|
| 1814 | + framePanel.setContinuousLayout(false); |
---|
| 1815 | + framePanel.setOneTouchExpandable(false); |
---|
| 1816 | + //.setDividerLocation(0.8); |
---|
1533 | 1817 | //framePanel.setDividerSize(15); |
---|
1534 | 1818 | //framePanel.setResizeWeight(0.15); |
---|
1535 | 1819 | framePanel.setName("Frame"); |
---|
1536 | 1820 | |
---|
1537 | 1821 | frame.getContentPane().setLayout(new BorderLayout()); |
---|
1538 | 1822 | /**/ |
---|
1539 | | - JTabbedPane worldPane = new JTabbedPane(); |
---|
| 1823 | + //JTabbedPane worldPane = new JTabbedPane(); |
---|
1540 | 1824 | //worldPane.add(bigPanel); |
---|
1541 | 1825 | //worldPane.add(worldPanel); |
---|
1542 | 1826 | /**/ |
---|
.. | .. |
---|
1547 | 1831 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
1548 | 1832 | |
---|
1549 | 1833 | frame.setSize(1280, 860); |
---|
1550 | | - frame.setVisible(true); |
---|
1551 | | - |
---|
| 1834 | + |
---|
1552 | 1835 | cameraView.requestFocusInWindow(); |
---|
1553 | 1836 | |
---|
1554 | 1837 | gridPanel.setDividerLocation(1.0); |
---|
| 1838 | + |
---|
| 1839 | + frame.validate(); |
---|
| 1840 | + |
---|
| 1841 | + frame.setVisible(true); |
---|
1555 | 1842 | |
---|
1556 | 1843 | frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); |
---|
1557 | 1844 | frame.addWindowListener(new WindowAdapter() |
---|
1558 | 1845 | { |
---|
1559 | | - |
---|
1560 | 1846 | public void windowClosing(WindowEvent e) |
---|
1561 | 1847 | { |
---|
1562 | 1848 | Close(); |
---|
.. | .. |
---|
1579 | 1865 | ctrlPanel.removeAll(); |
---|
1580 | 1866 | } |
---|
1581 | 1867 | |
---|
1582 | | - void SetupMaterial(cGridBag panel) |
---|
| 1868 | + void SetupMaterial(cGridBag materialpanel) |
---|
1583 | 1869 | { |
---|
1584 | | - /* |
---|
| 1870 | + cGridBag presetpanel = new cGridBag().setVertical(true); |
---|
| 1871 | + |
---|
| 1872 | + cLabel skin = GetLabel("icons/shadericons/shadericon00000.png", !Grafreed.NIMBUSLAF); |
---|
| 1873 | + skin.setToolTipText("Skin"); |
---|
| 1874 | + skin.addMouseListener(new MouseAdapter() |
---|
| 1875 | + { |
---|
| 1876 | + public void mouseClicked(MouseEvent e) |
---|
| 1877 | + { |
---|
| 1878 | + Object3D object = Grafreed.materials.versionlist[0].get(0); |
---|
| 1879 | + cMaterial material = object.material; |
---|
| 1880 | + |
---|
| 1881 | + // Skin |
---|
| 1882 | + colorField.setFloat(material.color); |
---|
| 1883 | + saturationField.setFloat(material.modulation); |
---|
| 1884 | + subsurfaceField.setFloat(material.subsurface); |
---|
| 1885 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1886 | + diffusenessField.setFloat(material.factor); |
---|
| 1887 | + shininessField.setFloat(material.shininess); |
---|
| 1888 | + shadowbiasField.setFloat(material.shadowbias); |
---|
| 1889 | + diffuseField.setFloat(material.diffuse); |
---|
| 1890 | + specularField.setFloat(material.specular); |
---|
| 1891 | + |
---|
| 1892 | + bumpField.setFloat(object.projectedVertices[0].x / 1000.0); |
---|
| 1893 | + noiseField.setFloat(object.projectedVertices[0].y / 1000.0); |
---|
| 1894 | + powerField.setFloat(object.projectedVertices[2].x / 1000.0); |
---|
| 1895 | + |
---|
| 1896 | + materialtouched = true; |
---|
| 1897 | + applySelf(); |
---|
| 1898 | + } |
---|
| 1899 | + }); |
---|
| 1900 | + presetpanel.add(skin); |
---|
| 1901 | + |
---|
| 1902 | + cLabel lambert = GetLabel("icons/shadericons/shadericon00002.png", !Grafreed.NIMBUSLAF); |
---|
| 1903 | + lambert.setToolTipText("Diffuse"); |
---|
| 1904 | + lambert.addMouseListener(new MouseAdapter() |
---|
| 1905 | + { |
---|
| 1906 | + public void mouseClicked(MouseEvent e) |
---|
| 1907 | + { |
---|
| 1908 | + Object3D object = Grafreed.materials.versionlist[2].get(0); |
---|
| 1909 | + cMaterial material = object.material; |
---|
| 1910 | + |
---|
| 1911 | + diffusenessField.setFloat(material.factor); |
---|
| 1912 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1913 | + |
---|
| 1914 | + materialtouched = true; |
---|
| 1915 | + applySelf(); |
---|
| 1916 | + } |
---|
| 1917 | + }); |
---|
| 1918 | + presetpanel.add(lambert); |
---|
| 1919 | + |
---|
| 1920 | + cLabel diffuse2 = GetLabel("icons/shadericons/shadericon00003.png", !Grafreed.NIMBUSLAF); |
---|
| 1921 | + diffuse2.setToolTipText("Diffuse2"); |
---|
| 1922 | + diffuse2.addMouseListener(new MouseAdapter() |
---|
| 1923 | + { |
---|
| 1924 | + public void mouseClicked(MouseEvent e) |
---|
| 1925 | + { |
---|
| 1926 | + Object3D object = Grafreed.materials.versionlist[3].get(0); |
---|
| 1927 | + cMaterial material = object.material; |
---|
| 1928 | + |
---|
| 1929 | + diffusenessField.setFloat(material.factor); |
---|
| 1930 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1931 | + |
---|
| 1932 | + materialtouched = true; |
---|
| 1933 | + applySelf(); |
---|
| 1934 | + } |
---|
| 1935 | + }); |
---|
| 1936 | + presetpanel.add(diffuse2); |
---|
| 1937 | + |
---|
| 1938 | + cLabel diffusemoon = GetLabel("icons/shadericons/shadericon00004.png", !Grafreed.NIMBUSLAF); |
---|
| 1939 | + diffusemoon.setToolTipText("Moon"); |
---|
| 1940 | + diffusemoon.addMouseListener(new MouseAdapter() |
---|
| 1941 | + { |
---|
| 1942 | + public void mouseClicked(MouseEvent e) |
---|
| 1943 | + { |
---|
| 1944 | + Object3D object = Grafreed.materials.versionlist[4].get(0); |
---|
| 1945 | + cMaterial material = object.material; |
---|
| 1946 | + |
---|
| 1947 | + diffusenessField.setFloat(material.factor); |
---|
| 1948 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1949 | + |
---|
| 1950 | + materialtouched = true; |
---|
| 1951 | + applySelf(); |
---|
| 1952 | + } |
---|
| 1953 | + }); |
---|
| 1954 | + presetpanel.add(diffusemoon); |
---|
| 1955 | + |
---|
| 1956 | + cLabel diffusemoon2 = GetLabel("icons/shadericons/shadericon00005.png", !Grafreed.NIMBUSLAF); |
---|
| 1957 | + diffusemoon2.setToolTipText("Moon2"); |
---|
| 1958 | + diffusemoon2.addMouseListener(new MouseAdapter() |
---|
| 1959 | + { |
---|
| 1960 | + public void mouseClicked(MouseEvent e) |
---|
| 1961 | + { |
---|
| 1962 | + Object3D object = Grafreed.materials.versionlist[5].get(0); |
---|
| 1963 | + cMaterial material = object.material; |
---|
| 1964 | + |
---|
| 1965 | + diffusenessField.setFloat(material.factor); |
---|
| 1966 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1967 | + |
---|
| 1968 | + materialtouched = true; |
---|
| 1969 | + applySelf(); |
---|
| 1970 | + } |
---|
| 1971 | + }); |
---|
| 1972 | + presetpanel.add(diffusemoon2); |
---|
| 1973 | + |
---|
| 1974 | + cLabel diffusemoon3 = GetLabel("icons/shadericons/shadericon00006.png", !Grafreed.NIMBUSLAF); |
---|
| 1975 | + diffusemoon3.setToolTipText("Moon3"); |
---|
| 1976 | + diffusemoon3.addMouseListener(new MouseAdapter() |
---|
| 1977 | + { |
---|
| 1978 | + public void mouseClicked(MouseEvent e) |
---|
| 1979 | + { |
---|
| 1980 | + Object3D object = Grafreed.materials.versionlist[6].get(0); |
---|
| 1981 | + cMaterial material = object.material; |
---|
| 1982 | + |
---|
| 1983 | + diffusenessField.setFloat(material.factor); |
---|
| 1984 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 1985 | + |
---|
| 1986 | + materialtouched = true; |
---|
| 1987 | + applySelf(); |
---|
| 1988 | + } |
---|
| 1989 | + }); |
---|
| 1990 | + presetpanel.add(diffusemoon3); |
---|
| 1991 | + |
---|
| 1992 | + cLabel diffusesheen = GetLabel("icons/shadericons/shadericon00007.png", !Grafreed.NIMBUSLAF); |
---|
| 1993 | + diffusesheen.setToolTipText("Sheen"); |
---|
| 1994 | + diffusesheen.addMouseListener(new MouseAdapter() |
---|
| 1995 | + { |
---|
| 1996 | + public void mouseClicked(MouseEvent e) |
---|
| 1997 | + { |
---|
| 1998 | + Object3D object = Grafreed.materials.versionlist[7].get(0); |
---|
| 1999 | + cMaterial material = object.material; |
---|
| 2000 | + |
---|
| 2001 | + sheenField.setFloat(material.sheen); |
---|
| 2002 | + |
---|
| 2003 | + materialtouched = true; |
---|
| 2004 | + applySelf(); |
---|
| 2005 | + } |
---|
| 2006 | + }); |
---|
| 2007 | + presetpanel.add(diffusesheen); |
---|
| 2008 | + |
---|
| 2009 | + cLabel rough = GetLabel("icons/shadericons/shadericon00001.png", !Grafreed.NIMBUSLAF); |
---|
| 2010 | + rough.setToolTipText("Rough metal"); |
---|
| 2011 | + rough.addMouseListener(new MouseAdapter() |
---|
| 2012 | + { |
---|
| 2013 | + public void mouseClicked(MouseEvent e) |
---|
| 2014 | + { |
---|
| 2015 | + Object3D object = Grafreed.materials.versionlist[1].get(0); |
---|
| 2016 | + cMaterial material = object.material; |
---|
| 2017 | + |
---|
| 2018 | + shininessField.setFloat(material.shininess); |
---|
| 2019 | + velvetField.setFloat(material.velvet); |
---|
| 2020 | + |
---|
| 2021 | + materialtouched = true; |
---|
| 2022 | + applySelf(); |
---|
| 2023 | + } |
---|
| 2024 | + }); |
---|
| 2025 | + presetpanel.add(rough); |
---|
| 2026 | + |
---|
| 2027 | + cLabel rough2 = GetLabel("icons/shadericons/shadericon00013.png", !Grafreed.NIMBUSLAF); |
---|
| 2028 | + rough2.setToolTipText("Medium metal"); |
---|
| 2029 | + rough2.addMouseListener(new MouseAdapter() |
---|
| 2030 | + { |
---|
| 2031 | + public void mouseClicked(MouseEvent e) |
---|
| 2032 | + { |
---|
| 2033 | + Object3D object = Grafreed.materials.versionlist[13].get(0); |
---|
| 2034 | + cMaterial material = object.material; |
---|
| 2035 | + |
---|
| 2036 | + shininessField.setFloat(material.shininess); |
---|
| 2037 | + lightareaField.setFloat(material.lightarea); |
---|
| 2038 | + |
---|
| 2039 | + materialtouched = true; |
---|
| 2040 | + applySelf(); |
---|
| 2041 | + } |
---|
| 2042 | + }); |
---|
| 2043 | + presetpanel.add(rough2); |
---|
| 2044 | + |
---|
| 2045 | + cLabel shini0 = GetLabel("icons/shadericons/shadericon00014.png", !Grafreed.NIMBUSLAF); |
---|
| 2046 | + shini0.setToolTipText("Shiny"); |
---|
| 2047 | + shini0.addMouseListener(new MouseAdapter() |
---|
| 2048 | + { |
---|
| 2049 | + public void mouseClicked(MouseEvent e) |
---|
| 2050 | + { |
---|
| 2051 | + Object3D object = Grafreed.materials.versionlist[14].get(0); |
---|
| 2052 | + cMaterial material = object.material; |
---|
| 2053 | + |
---|
| 2054 | + shininessField.setFloat(material.shininess); |
---|
| 2055 | + lightareaField.setFloat(material.lightarea); |
---|
| 2056 | + |
---|
| 2057 | + materialtouched = true; |
---|
| 2058 | + applySelf(); |
---|
| 2059 | + } |
---|
| 2060 | + }); |
---|
| 2061 | + presetpanel.add(shini0); |
---|
| 2062 | + |
---|
| 2063 | + cLabel shini1 = GetLabel("icons/shadericons/shadericon00011.png", !Grafreed.NIMBUSLAF); |
---|
| 2064 | + shini1.setToolTipText("Shiny2"); |
---|
| 2065 | + shini1.addMouseListener(new MouseAdapter() |
---|
| 2066 | + { |
---|
| 2067 | + public void mouseClicked(MouseEvent e) |
---|
| 2068 | + { |
---|
| 2069 | + Object3D object = Grafreed.materials.versionlist[11].get(0); |
---|
| 2070 | + cMaterial material = object.material; |
---|
| 2071 | + |
---|
| 2072 | + shininessField.setFloat(material.shininess); |
---|
| 2073 | + lightareaField.setFloat(material.lightarea); |
---|
| 2074 | + |
---|
| 2075 | + materialtouched = true; |
---|
| 2076 | + applySelf(); |
---|
| 2077 | + } |
---|
| 2078 | + }); |
---|
| 2079 | + presetpanel.add(shini1); |
---|
| 2080 | + |
---|
| 2081 | + cLabel shini2 = GetLabel("icons/shadericons/shadericon00012.png", !Grafreed.NIMBUSLAF); |
---|
| 2082 | + shini2.setToolTipText("Shiny3"); |
---|
| 2083 | + shini2.addMouseListener(new MouseAdapter() |
---|
| 2084 | + { |
---|
| 2085 | + public void mouseClicked(MouseEvent e) |
---|
| 2086 | + { |
---|
| 2087 | + Object3D object = Grafreed.materials.versionlist[12].get(0); |
---|
| 2088 | + cMaterial material = object.material; |
---|
| 2089 | + |
---|
| 2090 | + shininessField.setFloat(material.shininess); |
---|
| 2091 | + lightareaField.setFloat(material.lightarea); |
---|
| 2092 | + |
---|
| 2093 | + materialtouched = true; |
---|
| 2094 | + applySelf(); |
---|
| 2095 | + } |
---|
| 2096 | + }); |
---|
| 2097 | + presetpanel.add(shini2); |
---|
| 2098 | + |
---|
| 2099 | + cLabel aniso = GetLabel("icons/shadericons/shadericon00008.png", !Grafreed.NIMBUSLAF); |
---|
| 2100 | + aniso.setToolTipText("AnisoU"); |
---|
| 2101 | + aniso.addMouseListener(new MouseAdapter() |
---|
| 2102 | + { |
---|
| 2103 | + public void mouseClicked(MouseEvent e) |
---|
| 2104 | + { |
---|
| 2105 | + Object3D object = Grafreed.materials.versionlist[8].get(0); |
---|
| 2106 | + cMaterial material = object.material; |
---|
| 2107 | + |
---|
| 2108 | + anisoField.setFloat(material.aniso); |
---|
| 2109 | + anisoVField.setFloat(material.anisoV); |
---|
| 2110 | + |
---|
| 2111 | + materialtouched = true; |
---|
| 2112 | + applySelf(); |
---|
| 2113 | + } |
---|
| 2114 | + }); |
---|
| 2115 | + presetpanel.add(aniso); |
---|
| 2116 | + |
---|
| 2117 | + cLabel aniso2 = GetLabel("icons/shadericons/shadericon00009.png", !Grafreed.NIMBUSLAF); |
---|
| 2118 | + aniso2.setToolTipText("AnisoV"); |
---|
| 2119 | + aniso2.addMouseListener(new MouseAdapter() |
---|
| 2120 | + { |
---|
| 2121 | + public void mouseClicked(MouseEvent e) |
---|
| 2122 | + { |
---|
| 2123 | + Object3D object = Grafreed.materials.versionlist[9].get(0); |
---|
| 2124 | + cMaterial material = object.material; |
---|
| 2125 | + |
---|
| 2126 | + anisoField.setFloat(material.aniso); |
---|
| 2127 | + anisoVField.setFloat(material.anisoV); |
---|
| 2128 | + |
---|
| 2129 | + materialtouched = true; |
---|
| 2130 | + applySelf(); |
---|
| 2131 | + } |
---|
| 2132 | + }); |
---|
| 2133 | + presetpanel.add(aniso2); |
---|
| 2134 | + |
---|
| 2135 | + cLabel aniso3 = GetLabel("icons/shadericons/shadericon00010.png", !Grafreed.NIMBUSLAF); |
---|
| 2136 | + aniso3.setToolTipText("AnisoUV"); |
---|
| 2137 | + aniso3.addMouseListener(new MouseAdapter() |
---|
| 2138 | + { |
---|
| 2139 | + public void mouseClicked(MouseEvent e) |
---|
| 2140 | + { |
---|
| 2141 | + Object3D object = Grafreed.materials.versionlist[10].get(0); |
---|
| 2142 | + cMaterial material = object.material; |
---|
| 2143 | + |
---|
| 2144 | + anisoField.setFloat(material.aniso); |
---|
| 2145 | + anisoVField.setFloat(material.anisoV); |
---|
| 2146 | + |
---|
| 2147 | + materialtouched = true; |
---|
| 2148 | + applySelf(); |
---|
| 2149 | + } |
---|
| 2150 | + }); |
---|
| 2151 | + presetpanel.add(aniso3); |
---|
| 2152 | + |
---|
| 2153 | + cLabel velvet0 = GetLabel("icons/shadericons/shadericon00015.png", !Grafreed.NIMBUSLAF); |
---|
| 2154 | + velvet0.setToolTipText("Velvet"); |
---|
| 2155 | + velvet0.addMouseListener(new MouseAdapter() |
---|
| 2156 | + { |
---|
| 2157 | + public void mouseClicked(MouseEvent e) |
---|
| 2158 | + { |
---|
| 2159 | + Object3D object = Grafreed.materials.versionlist[15].get(0); |
---|
| 2160 | + cMaterial material = object.material; |
---|
| 2161 | + |
---|
| 2162 | + diffusenessField.setFloat(material.factor); |
---|
| 2163 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 2164 | + sheenField.setFloat(material.sheen); |
---|
| 2165 | + shininessField.setFloat(material.shininess); |
---|
| 2166 | + velvetField.setFloat(material.velvet); |
---|
| 2167 | + shiftField.setFloat(material.shift); |
---|
| 2168 | + |
---|
| 2169 | + materialtouched = true; |
---|
| 2170 | + applySelf(); |
---|
| 2171 | + } |
---|
| 2172 | + }); |
---|
| 2173 | + presetpanel.add(velvet0); |
---|
| 2174 | + |
---|
| 2175 | + cLabel bump0 = GetLabel("icons/shadericons/shadericon00016.png", !Grafreed.NIMBUSLAF); |
---|
| 2176 | + bump0.setToolTipText("Bump texture"); |
---|
| 2177 | + bump0.addMouseListener(new MouseAdapter() |
---|
| 2178 | + { |
---|
| 2179 | + public void mouseClicked(MouseEvent e) |
---|
| 2180 | + { |
---|
| 2181 | + Object3D object = Grafreed.materials.versionlist[16].get(0); |
---|
| 2182 | + cMaterial material = object.material; |
---|
| 2183 | + |
---|
| 2184 | + bumpField.setFloat(object.projectedVertices[0].x / 1000.0); |
---|
| 2185 | + noiseField.setFloat(object.projectedVertices[0].y / 1000.0); |
---|
| 2186 | + powerField.setFloat(object.projectedVertices[2].x / 1000.0); |
---|
| 2187 | + |
---|
| 2188 | + materialtouched = true; |
---|
| 2189 | + applySelf(); |
---|
| 2190 | + } |
---|
| 2191 | + }); |
---|
| 2192 | + presetpanel.add(bump0); |
---|
| 2193 | + |
---|
| 2194 | + cLabel borderShader = GetLabel("icons/shadericons/borderfade.jpg", !Grafreed.NIMBUSLAF); |
---|
| 2195 | + borderShader.setToolTipText("Border fade"); |
---|
| 2196 | + borderShader.addMouseListener(new MouseAdapter() |
---|
| 2197 | + { |
---|
| 2198 | + public void mouseClicked(MouseEvent e) |
---|
| 2199 | + { |
---|
| 2200 | + borderfadeField.setFloat(0.5); |
---|
| 2201 | + opacityField.setFloat(0.75); |
---|
| 2202 | + |
---|
| 2203 | + materialtouched = true; |
---|
| 2204 | + applySelf(); |
---|
| 2205 | + } |
---|
| 2206 | + }); |
---|
| 2207 | + presetpanel.add(borderShader); |
---|
| 2208 | + |
---|
| 2209 | + cLabel halo = GetLabel("icons/shadericons/shadericon00017.png", !Grafreed.NIMBUSLAF); |
---|
| 2210 | + halo.setToolTipText("Halo"); |
---|
| 2211 | + halo.addMouseListener(new MouseAdapter() |
---|
| 2212 | + { |
---|
| 2213 | + public void mouseClicked(MouseEvent e) |
---|
| 2214 | + { |
---|
| 2215 | + Object3D object = Grafreed.materials.versionlist[17].get(0); |
---|
| 2216 | + cMaterial material = object.material; |
---|
| 2217 | + |
---|
| 2218 | + opacityPowerField.setFloat(object.projectedVertices[2].y / 1000.0); |
---|
| 2219 | + |
---|
| 2220 | + materialtouched = true; |
---|
| 2221 | + applySelf(); |
---|
| 2222 | + } |
---|
| 2223 | + }); |
---|
| 2224 | + presetpanel.add(halo); |
---|
| 2225 | + |
---|
| 2226 | + cLabel candle = GetLabel("icons/shadericons/shadericon00018.png", !Grafreed.NIMBUSLAF); |
---|
| 2227 | + candle.setToolTipText("Candle"); |
---|
| 2228 | + candle.addMouseListener(new MouseAdapter() |
---|
| 2229 | + { |
---|
| 2230 | + public void mouseClicked(MouseEvent e) |
---|
| 2231 | + { |
---|
| 2232 | + Object3D object = Grafreed.materials.versionlist[18].get(0); |
---|
| 2233 | + cMaterial material = object.material; |
---|
| 2234 | + |
---|
| 2235 | + subsurfaceField.setFloat(material.subsurface); |
---|
| 2236 | + shadowbiasField.setFloat(material.shadowbias); |
---|
| 2237 | + ambientField.setFloat(material.ambient); |
---|
| 2238 | + specularField.setFloat(material.specular); |
---|
| 2239 | + lightareaField.setFloat(material.lightarea); |
---|
| 2240 | + shininessField.setFloat(material.shininess); |
---|
| 2241 | + |
---|
| 2242 | + materialtouched = true; |
---|
| 2243 | + applySelf(); |
---|
| 2244 | + } |
---|
| 2245 | + }); |
---|
| 2246 | + presetpanel.add(candle); |
---|
| 2247 | + |
---|
| 2248 | + cLabel shadowShader = GetLabel("icons/shadericons/shadow.png", !Grafreed.NIMBUSLAF); |
---|
| 2249 | + shadowShader.setToolTipText("Shadow"); |
---|
| 2250 | + shadowShader.addMouseListener(new MouseAdapter() |
---|
| 2251 | + { |
---|
| 2252 | + public void mouseClicked(MouseEvent e) |
---|
| 2253 | + { |
---|
| 2254 | + diffuseField.setFloat(0.001); |
---|
| 2255 | + ambientField.setFloat(0.001); |
---|
| 2256 | + cameraField.setFloat(0.001); |
---|
| 2257 | + specularField.setFloat(0.001); |
---|
| 2258 | + fakedepthField.setFloat(0.001); |
---|
| 2259 | + opacityField.setFloat(0.6); |
---|
| 2260 | + |
---|
| 2261 | + materialtouched = true; |
---|
| 2262 | + applySelf(); |
---|
| 2263 | + } |
---|
| 2264 | + }); |
---|
| 2265 | + presetpanel.add(shadowShader); |
---|
| 2266 | + |
---|
| 2267 | + cGridBag panel = new cGridBag().setVertical(true); |
---|
| 2268 | + |
---|
| 2269 | + presetpanel.preferredWidth = 1; |
---|
| 2270 | + |
---|
| 2271 | + materialpanel.add(presetpanel); |
---|
| 2272 | + materialpanel.add(panel); |
---|
| 2273 | + |
---|
| 2274 | + panel.preferredWidth = 8; |
---|
| 2275 | + |
---|
| 2276 | + /* |
---|
1585 | 2277 | ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints); |
---|
1586 | 2278 | materialLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1587 | | - */ |
---|
| 2279 | + */ |
---|
1588 | 2280 | |
---|
1589 | 2281 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
1590 | 2282 | |
---|
.. | .. |
---|
1618 | 2310 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1619 | 2311 | |
---|
1620 | 2312 | cGridBag colorSection = new cGridBag().setVertical(true); |
---|
| 2313 | + |
---|
| 2314 | + cGridBag huepanel = new cGridBag(); |
---|
| 2315 | + cGridBag huelabel = new cGridBag(); |
---|
| 2316 | + cLabel hue = GetLabel("icons/hue.png", false); |
---|
| 2317 | + hue.fit = true; |
---|
| 2318 | + |
---|
| 2319 | + hue.addMouseListener(new MouseAdapter() |
---|
| 2320 | + { |
---|
| 2321 | + public void mousePressed(MouseEvent e) |
---|
| 2322 | + { |
---|
| 2323 | + int x = e.getX(); |
---|
| 2324 | + |
---|
| 2325 | + colorField.setFloat((double)x / ((cLabel)e.getSource()).getWidth()); |
---|
| 2326 | + } |
---|
| 2327 | + }); |
---|
| 2328 | + |
---|
| 2329 | + huelabel.add(hue); |
---|
| 2330 | + huelabel.preferredWidth = 20; |
---|
| 2331 | + huepanel.add(new cGridBag()); // Label |
---|
| 2332 | + huepanel.add(huelabel); // Field/slider |
---|
| 2333 | + |
---|
| 2334 | + huepanel.preferredHeight = 7; |
---|
| 2335 | + |
---|
| 2336 | + colorSection.add(huepanel); |
---|
1621 | 2337 | |
---|
1622 | 2338 | cGridBag color = new cGridBag(); |
---|
1623 | | - color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints); |
---|
1624 | | - colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1625 | | - color.add(colorField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 2339 | + |
---|
| 2340 | + color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints); |
---|
| 2341 | + colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2342 | + color.add(colorField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
| 2343 | + |
---|
1626 | 2344 | //colorField.preferredWidth = 200; |
---|
1627 | 2345 | colorSection.add(color); |
---|
1628 | 2346 | |
---|
1629 | 2347 | cGridBag modulation = new cGridBag(); |
---|
1630 | 2348 | modulation.add(modulationLabel = new JLabel("Saturation")); // , aConstraints); |
---|
1631 | 2349 | modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1632 | | - modulation.add(modulationField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 2350 | + modulation.add(saturationField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
1633 | 2351 | colorSection.add(modulation); |
---|
1634 | 2352 | |
---|
| 2353 | + cGridBag opacity = new cGridBag(); |
---|
| 2354 | + opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints); |
---|
| 2355 | + opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2356 | + opacity.add(opacityField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
| 2357 | + colorSection.add(opacity); |
---|
| 2358 | + |
---|
| 2359 | + colorSection.add(GetSeparator()); |
---|
| 2360 | + |
---|
1635 | 2361 | cGridBag texture = new cGridBag(); |
---|
1636 | 2362 | texture.add(textureLabel = new JLabel("Texture")); // , aConstraints); |
---|
1637 | 2363 | textureLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1638 | 2364 | texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1639 | 2365 | colorSection.add(texture); |
---|
1640 | 2366 | |
---|
1641 | | - cGridBag anisoU = new cGridBag(); |
---|
1642 | | - anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); |
---|
1643 | | - anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1644 | | - anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1645 | | - colorSection.add(anisoU); |
---|
1646 | | - |
---|
1647 | | - cGridBag anisoV = new cGridBag(); |
---|
1648 | | - anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); |
---|
1649 | | - anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1650 | | - anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1651 | | - colorSection.add(anisoV); |
---|
1652 | | - |
---|
1653 | | - cGridBag shadowbias = new cGridBag(); |
---|
1654 | | - shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); |
---|
1655 | | - shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1656 | | - shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1657 | | - colorSection.add(shadowbias); |
---|
1658 | | - |
---|
1659 | | - panel.add(new JSeparator()); |
---|
| 2367 | + panel.add(GetSeparator()); |
---|
1660 | 2368 | |
---|
1661 | 2369 | panel.add(colorSection); |
---|
1662 | 2370 | |
---|
.. | .. |
---|
1706 | 2414 | fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1707 | 2415 | diffuseSection.add(fakedepth); |
---|
1708 | 2416 | |
---|
1709 | | - panel.add(new JSeparator()); |
---|
| 2417 | + cGridBag shadowbias = new cGridBag(); |
---|
| 2418 | + shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); |
---|
| 2419 | + shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2420 | + shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 2421 | + diffuseSection.add(shadowbias); |
---|
| 2422 | + |
---|
| 2423 | + panel.add(GetSeparator()); |
---|
1710 | 2424 | |
---|
1711 | 2425 | panel.add(diffuseSection); |
---|
1712 | 2426 | |
---|
.. | .. |
---|
1756 | 2470 | // aConstraints.gridy += 1; |
---|
1757 | 2471 | // aConstraints.gridwidth = 1; |
---|
1758 | 2472 | |
---|
| 2473 | + cGridBag anisoU = new cGridBag(); |
---|
| 2474 | + anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); |
---|
| 2475 | + anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2476 | + anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 2477 | + specularSection.add(anisoU); |
---|
1759 | 2478 | |
---|
1760 | | - panel.add(new JSeparator()); |
---|
| 2479 | + cGridBag anisoV = new cGridBag(); |
---|
| 2480 | + anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); |
---|
| 2481 | + anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2482 | + anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 2483 | + specularSection.add(anisoV); |
---|
| 2484 | + |
---|
| 2485 | + |
---|
| 2486 | + panel.add(GetSeparator()); |
---|
1761 | 2487 | |
---|
1762 | 2488 | panel.add(specularSection); |
---|
1763 | 2489 | |
---|
1764 | 2490 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1765 | 2491 | |
---|
1766 | | - cGridBag globalSection = new cGridBag().setVertical(true); |
---|
| 2492 | + //cGridBag globalSection = new cGridBag().setVertical(true); |
---|
1767 | 2493 | |
---|
1768 | 2494 | cGridBag camera = new cGridBag(); |
---|
1769 | 2495 | camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints); |
---|
1770 | 2496 | cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1771 | 2497 | camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1772 | | - globalSection.add(camera); |
---|
| 2498 | + colorSection.add(camera); |
---|
1773 | 2499 | |
---|
1774 | 2500 | cGridBag ambient = new cGridBag(); |
---|
1775 | 2501 | ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints); |
---|
1776 | 2502 | ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1777 | 2503 | ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1778 | | - globalSection.add(ambient); |
---|
| 2504 | + colorSection.add(ambient); |
---|
1779 | 2505 | |
---|
1780 | 2506 | cGridBag backlit = new cGridBag(); |
---|
1781 | 2507 | backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints); |
---|
1782 | 2508 | backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1783 | 2509 | backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1784 | | - globalSection.add(backlit); |
---|
| 2510 | + colorSection.add(backlit); |
---|
1785 | 2511 | |
---|
1786 | | - cGridBag opacity = new cGridBag(); |
---|
1787 | | - opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints); |
---|
1788 | | - opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1789 | | - opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1790 | | - globalSection.add(opacity); |
---|
1791 | | - |
---|
1792 | | - panel.add(new JSeparator()); |
---|
| 2512 | + //panel.add(new JSeparator()); |
---|
1793 | 2513 | |
---|
1794 | | - panel.add(globalSection); |
---|
| 2514 | + //panel.add(globalSection); |
---|
1795 | 2515 | |
---|
1796 | 2516 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1797 | 2517 | |
---|
.. | .. |
---|
1833 | 2553 | opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints); |
---|
1834 | 2554 | textureSection.add(opacityPower); |
---|
1835 | 2555 | |
---|
1836 | | - panel.add(new JSeparator()); |
---|
| 2556 | + panel.add(GetSeparator()); |
---|
1837 | 2557 | |
---|
1838 | 2558 | panel.add(textureSection); |
---|
1839 | 2559 | |
---|
.. | .. |
---|
1898 | 2618 | // 3D models |
---|
1899 | 2619 | if (filename.endsWith(".3ds") || filename.endsWith(".3DS")) |
---|
1900 | 2620 | { |
---|
1901 | | - lastConverter = new com.jmex.model.converters.MaxToJme(); |
---|
1902 | | - LoadFile(filename, lastConverter); |
---|
| 2621 | + //lastConverter = new com.jmex.model.converters.MaxToJme(); |
---|
| 2622 | + //LoadFile(filename, lastConverter); |
---|
| 2623 | + LoadObjFile(filename); // New 3ds loader |
---|
1903 | 2624 | continue; |
---|
1904 | 2625 | } |
---|
1905 | 2626 | if (filename.endsWith(".dae") || filename.endsWith(".DAE")) |
---|
.. | .. |
---|
2625 | 3346 | LA.matXRotate(((Object3D) group.get(group.size() - 1)).toParent, -Math.PI / 2); |
---|
2626 | 3347 | LA.matXRotate(((Object3D) group.get(group.size() - 1)).fromParent, Math.PI / 2); |
---|
2627 | 3348 | } |
---|
| 3349 | + |
---|
2628 | 3350 | //cJME.count++; |
---|
2629 | 3351 | //cJME.count %= 12; |
---|
2630 | 3352 | if (gc) |
---|
.. | .. |
---|
2808 | 3530 | } |
---|
2809 | 3531 | } |
---|
2810 | 3532 | } |
---|
| 3533 | + |
---|
2811 | 3534 | cFileSystemPane FSPane; |
---|
2812 | 3535 | |
---|
2813 | 3536 | void SetMaterial(cMaterial mat, Object3D.cVector2[] others) |
---|
.. | .. |
---|
2817 | 3540 | |
---|
2818 | 3541 | freezematerial = true; |
---|
2819 | 3542 | colorField.setFloat(mat.color); |
---|
2820 | | - modulationField.setFloat(mat.modulation); |
---|
| 3543 | + saturationField.setFloat(mat.modulation); |
---|
2821 | 3544 | metalnessField.setFloat(mat.metalness); |
---|
2822 | 3545 | diffuseField.setFloat(mat.diffuse); |
---|
2823 | 3546 | specularField.setFloat(mat.specular); |
---|
.. | .. |
---|
2861 | 3584 | } |
---|
2862 | 3585 | } |
---|
2863 | 3586 | } |
---|
| 3587 | + |
---|
2864 | 3588 | freezematerial = false; |
---|
2865 | 3589 | } |
---|
2866 | 3590 | |
---|
2867 | 3591 | void SetMaterial(Object3D object) |
---|
2868 | 3592 | { |
---|
| 3593 | + latestObject = object; |
---|
| 3594 | + |
---|
2869 | 3595 | cMaterial mat = object.material; |
---|
2870 | 3596 | |
---|
2871 | 3597 | if (mat == null) |
---|
.. | .. |
---|
2876 | 3602 | |
---|
2877 | 3603 | if (multiplyToggle != null) |
---|
2878 | 3604 | multiplyToggle.setSelected(mat.multiply); |
---|
2879 | | - |
---|
2880 | | - assert (object.projectedVertices != null); |
---|
2881 | | - |
---|
2882 | | - if (object.projectedVertices.length <= 2) |
---|
2883 | | - { |
---|
2884 | | - // Side effect... |
---|
2885 | | - Object3D.cVector2[] keep = object.projectedVertices; |
---|
2886 | | - object.projectedVertices = new Object3D.cVector2[3]; |
---|
2887 | | - for (int i = 0; i < 3; i++) |
---|
2888 | | - { |
---|
2889 | | - if (i < keep.length) |
---|
2890 | | - { |
---|
2891 | | - object.projectedVertices[i] = keep[i]; |
---|
2892 | | - } else |
---|
2893 | | - { |
---|
2894 | | - object.projectedVertices[i] = new Object3D.cVector2(); |
---|
2895 | | - } |
---|
2896 | | - /* |
---|
2897 | | - if(keep.length == 0) |
---|
2898 | | - object.projectedVertices[0] = new Object3D.cVector2(); |
---|
2899 | | - else |
---|
2900 | | - object.projectedVertices[0] = keep[0]; |
---|
2901 | | - object.projectedVertices[1] = new Object3D.cVector2(); |
---|
2902 | | - */ |
---|
2903 | | - } |
---|
2904 | | - } |
---|
| 3605 | + |
---|
| 3606 | + AllocProjectedVertices(object); |
---|
2905 | 3607 | |
---|
2906 | 3608 | SetMaterial(mat, object.projectedVertices); |
---|
2907 | 3609 | } |
---|
.. | .. |
---|
2977 | 3679 | // } |
---|
2978 | 3680 | |
---|
2979 | 3681 | /**/ |
---|
2980 | | - if (deselect) |
---|
| 3682 | + if (deselect || child == null) |
---|
2981 | 3683 | { |
---|
2982 | 3684 | //group.deselectAll(); |
---|
2983 | 3685 | //freeze = true; |
---|
2984 | 3686 | GetTree().clearSelection(); |
---|
2985 | 3687 | //freeze = false; |
---|
| 3688 | + |
---|
| 3689 | + if (child == null) |
---|
| 3690 | + { |
---|
| 3691 | + return; |
---|
| 3692 | + } |
---|
2986 | 3693 | } |
---|
2987 | 3694 | |
---|
2988 | 3695 | //group.addSelectee(child); |
---|
.. | .. |
---|
3016 | 3723 | public void itemStateChanged(ItemEvent event) |
---|
3017 | 3724 | { |
---|
3018 | 3725 | // System.out.println("Propagate = " + propagate); |
---|
| 3726 | + if (event.getSource() == pinButton) |
---|
| 3727 | + { |
---|
| 3728 | + copy.pinned ^= true; |
---|
| 3729 | + if (!copy.pinned && !copy.editWindow.copy.selection.contains(copy)) |
---|
| 3730 | + { |
---|
| 3731 | + ((GroupEditor)copy.editWindow).listUI.remove(copy); |
---|
| 3732 | + copy.CloseUI(); |
---|
| 3733 | + //copy.editWindow.refreshContents(); |
---|
| 3734 | + } |
---|
| 3735 | + } |
---|
| 3736 | + else |
---|
3019 | 3737 | if (event.getSource() == propagateToggle) |
---|
3020 | 3738 | { |
---|
3021 | 3739 | propagate ^= true; |
---|
.. | .. |
---|
3051 | 3769 | cameraView.ToggleDL(); |
---|
3052 | 3770 | cameraView.repaint(); |
---|
3053 | 3771 | return; |
---|
3054 | | - } else if (event.getSource() == toggleTextureItem) |
---|
| 3772 | + } else if (event.getSource() == toggleTextureItem || event.getSource() == toggleTextureCB) |
---|
3055 | 3773 | { |
---|
3056 | 3774 | cameraView.ToggleTexture(); |
---|
3057 | 3775 | // june 2013 copy.HardTouch(); |
---|
.. | .. |
---|
3090 | 3808 | frame.validate(); |
---|
3091 | 3809 | |
---|
3092 | 3810 | return; |
---|
3093 | | - } else if (event.getSource() == toggleSwitchItem) |
---|
| 3811 | + } else if (event.getSource() == toggleSwitchItem || event.getSource() == toggleSwitchCB) |
---|
3094 | 3812 | { |
---|
3095 | 3813 | cameraView.ToggleSwitch(); |
---|
3096 | 3814 | cameraView.repaint(); |
---|
.. | .. |
---|
3120 | 3838 | } else if (event.getSource() == liveCB) |
---|
3121 | 3839 | { |
---|
3122 | 3840 | copy.live ^= true; |
---|
| 3841 | + objEditor.refreshContents(true); // To show item colors |
---|
3123 | 3842 | return; |
---|
3124 | | - } else if (event.getSource() == selectCB) |
---|
| 3843 | + } else if (event.getSource() == selectableCB) |
---|
3125 | 3844 | { |
---|
3126 | 3845 | copy.dontselect ^= true; |
---|
3127 | 3846 | return; |
---|
.. | .. |
---|
3129 | 3848 | { |
---|
3130 | 3849 | copy.hide ^= true; |
---|
3131 | 3850 | copy.Touch(); // display list issue |
---|
3132 | | - objEditor.refreshContents(); |
---|
| 3851 | + objEditor.refreshContents(true); // To show item colors |
---|
3133 | 3852 | return; |
---|
3134 | 3853 | } else if (event.getSource() == link2masterCB) |
---|
3135 | 3854 | { |
---|
.. | .. |
---|
3306 | 4025 | { |
---|
3307 | 4026 | Close(); |
---|
3308 | 4027 | //return true; |
---|
3309 | | - } else if (source == loadItem) |
---|
| 4028 | + } else if (source == openItem) |
---|
3310 | 4029 | { |
---|
3311 | | - load(); |
---|
| 4030 | + Open(); |
---|
3312 | 4031 | //return true; |
---|
3313 | 4032 | } else if (source == newItem) |
---|
3314 | 4033 | { |
---|
.. | .. |
---|
3333 | 4052 | { |
---|
3334 | 4053 | generatePOV(); |
---|
3335 | 4054 | //return true; |
---|
| 4055 | + } else if (event.getSource() == archiveItem) |
---|
| 4056 | + { |
---|
| 4057 | + cTools.Archive(frame); |
---|
| 4058 | + return; |
---|
3336 | 4059 | } else if (source == zBufferItem) |
---|
3337 | 4060 | { |
---|
3338 | 4061 | try |
---|
.. | .. |
---|
3381 | 4104 | |
---|
3382 | 4105 | static public byte[] Compress(Object3D o) |
---|
3383 | 4106 | { |
---|
| 4107 | + // Slower to actually compress. |
---|
3384 | 4108 | try |
---|
3385 | 4109 | { |
---|
3386 | 4110 | ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
3387 | | - java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos); |
---|
3388 | | - ObjectOutputStream out = new ObjectOutputStream(zstream); |
---|
| 4111 | +// java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos); |
---|
| 4112 | + ObjectOutputStream out = new ObjectOutputStream(baos); //zstream); |
---|
3389 | 4113 | |
---|
3390 | 4114 | Object3D parent = o.parent; |
---|
3391 | 4115 | o.parent = null; |
---|
.. | .. |
---|
3396 | 4120 | |
---|
3397 | 4121 | out.flush(); |
---|
3398 | 4122 | |
---|
3399 | | - zstream.close(); |
---|
| 4123 | + baos //zstream |
---|
| 4124 | + .close(); |
---|
3400 | 4125 | out.close(); |
---|
3401 | 4126 | |
---|
3402 | | - return baos.toByteArray(); |
---|
| 4127 | + byte[] bytes = baos.toByteArray(); |
---|
| 4128 | + |
---|
| 4129 | + System.out.println("save #bytes = " + bytes.length); |
---|
| 4130 | + return bytes; |
---|
3403 | 4131 | } catch (Exception e) |
---|
3404 | 4132 | { |
---|
3405 | 4133 | System.err.println(e); |
---|
.. | .. |
---|
3409 | 4137 | |
---|
3410 | 4138 | static public Object Uncompress(byte[] bytes) |
---|
3411 | 4139 | { |
---|
3412 | | - System.out.println("#bytes = " + bytes.length); |
---|
| 4140 | + System.out.println("restore #bytes = " + bytes.length); |
---|
3413 | 4141 | try |
---|
3414 | 4142 | { |
---|
3415 | 4143 | ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
3416 | | - java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais); |
---|
3417 | | - ObjectInputStream in = new ObjectInputStream(istream); |
---|
| 4144 | + //java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais); |
---|
| 4145 | + ObjectInputStream in = new ObjectInputStream(bais); // istream); |
---|
3418 | 4146 | Object obj = in.readObject(); |
---|
| 4147 | + |
---|
| 4148 | + bais //istream |
---|
| 4149 | + .close(); |
---|
3419 | 4150 | in.close(); |
---|
3420 | 4151 | |
---|
3421 | 4152 | return obj; |
---|
.. | .. |
---|
3470 | 4201 | return null; |
---|
3471 | 4202 | } |
---|
3472 | 4203 | |
---|
3473 | | - java.util.Hashtable<java.util.UUID, Object3D> hashtable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
3474 | 4204 | |
---|
3475 | 4205 | public void Save() |
---|
3476 | 4206 | { |
---|
| 4207 | + //Save(true); |
---|
| 4208 | + Replace(); |
---|
| 4209 | + SetVersionStates(); |
---|
| 4210 | + } |
---|
| 4211 | + |
---|
| 4212 | + private boolean Equal(byte[] compress, byte[] name) |
---|
| 4213 | + { |
---|
| 4214 | + if (compress.length != name.length) |
---|
| 4215 | + { |
---|
| 4216 | + return false; |
---|
| 4217 | + } |
---|
| 4218 | + |
---|
| 4219 | + for (int i=compress.length; --i>=0;) |
---|
| 4220 | + { |
---|
| 4221 | + if (compress[i] != name[i]) |
---|
| 4222 | + return false; |
---|
| 4223 | + } |
---|
| 4224 | + |
---|
| 4225 | + return true; |
---|
| 4226 | + } |
---|
| 4227 | + |
---|
| 4228 | + java.util.Hashtable<java.util.UUID, Object3D> versiontable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
| 4229 | + |
---|
| 4230 | + void DeleteVersion() |
---|
| 4231 | + { |
---|
| 4232 | + for (int i = copy.versionindex; i < copy.versionlist.length-1; i++) |
---|
| 4233 | + { |
---|
| 4234 | + copy.versionlist[i] = copy.versionlist[i+1]; |
---|
| 4235 | + } |
---|
| 4236 | + |
---|
| 4237 | + CopyChanged(); |
---|
| 4238 | + |
---|
| 4239 | + SetVersionStates(); |
---|
| 4240 | + } |
---|
| 4241 | + |
---|
| 4242 | + public boolean Save(boolean user) |
---|
| 4243 | + { |
---|
3477 | 4244 | System.err.println("Save"); |
---|
| 4245 | + Replace(); |
---|
3478 | 4246 | |
---|
3479 | | - cRadio tab = GetCurrentTab(); |
---|
| 4247 | + //cRadio tab = GetCurrentTab(); |
---|
3480 | 4248 | |
---|
3481 | | - boolean temp = CameraPane.SWITCH; |
---|
3482 | | - CameraPane.SWITCH = false; |
---|
| 4249 | + Object3D compress = Duplicate(copy); // Saved version. No need for "Replace"? |
---|
3483 | 4250 | |
---|
3484 | | - copy.ExtractBigData(hashtable); |
---|
| 4251 | + boolean thesame = false; |
---|
| 4252 | + |
---|
| 4253 | +// if (copy.versionindex > 0 && copy.versions[copy.versionindex-1] != null && Equal(compress, copy.versions[copy.versionindex-1])) |
---|
| 4254 | +// { |
---|
| 4255 | +// thesame = true; |
---|
| 4256 | +// } |
---|
3485 | 4257 | |
---|
3486 | 4258 | //EditorFrame.m_MainFrame.requestFocusInWindow(); |
---|
3487 | | - tab.graphs[tab.undoindex++] = Compress(copy); |
---|
3488 | | - |
---|
3489 | | - copy.RestoreBigData(hashtable); |
---|
3490 | | - |
---|
3491 | | - CameraPane.SWITCH = temp; |
---|
3492 | | - |
---|
3493 | | - //assert(hashtable.isEmpty()); |
---|
3494 | | - |
---|
3495 | | - for (int i = tab.undoindex; i < tab.graphs.length; i++) |
---|
| 4259 | + if (!thesame) |
---|
3496 | 4260 | { |
---|
3497 | | - tab.graphs[i] = null; |
---|
| 4261 | + for (int i = copy.versionlist.length; --i > copy.versionindex+1;) |
---|
| 4262 | + { |
---|
| 4263 | + copy.versionlist[i] = copy.versionlist[i-1]; |
---|
| 4264 | + } |
---|
| 4265 | + |
---|
| 4266 | + //tab.user[tab.versionindex] = user; |
---|
| 4267 | + //boolean increment = true; // tab.graphs[tab.versionindex] == null; |
---|
| 4268 | + |
---|
| 4269 | + copy.versionlist[++copy.versionindex] = compress; |
---|
| 4270 | + |
---|
| 4271 | + // if (increment) |
---|
| 4272 | + // tab.versionindex++; |
---|
3498 | 4273 | } |
---|
3499 | 4274 | |
---|
| 4275 | + //copy.RestoreBigData(versiontable); |
---|
| 4276 | + |
---|
| 4277 | + //assert(hashtable.isEmpty()); |
---|
| 4278 | + |
---|
| 4279 | +// for (int i = copy.versionindex+1; i < copy.versionlist.length; i++) |
---|
| 4280 | +// { |
---|
| 4281 | +// //tab.user[i] = false; |
---|
| 4282 | +// copy.versionlist[i] = null; |
---|
| 4283 | +// } |
---|
| 4284 | + |
---|
| 4285 | + SetVersionStates(); |
---|
| 4286 | + |
---|
3500 | 4287 | // test save |
---|
3501 | 4288 | if (false) |
---|
3502 | 4289 | { |
---|
3503 | 4290 | try |
---|
3504 | 4291 | { |
---|
3505 | | - FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex); |
---|
| 4292 | + FileOutputStream ostream = new FileOutputStream("save" + copy.versionindex); |
---|
3506 | 4293 | ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
3507 | 4294 | |
---|
3508 | 4295 | p.writeObject(copy); |
---|
.. | .. |
---|
3515 | 4302 | e.printStackTrace(); |
---|
3516 | 4303 | } |
---|
3517 | 4304 | } |
---|
| 4305 | + |
---|
| 4306 | + return !thesame; |
---|
| 4307 | + } |
---|
| 4308 | + |
---|
| 4309 | + boolean flashIt = true; |
---|
| 4310 | + |
---|
| 4311 | + void RefreshSelection() |
---|
| 4312 | + { |
---|
| 4313 | + Object3D selection = new Object3D(); |
---|
| 4314 | + |
---|
| 4315 | + for (int i = 0; i < copy.selection.size(); i++) |
---|
| 4316 | + { |
---|
| 4317 | + Object3D elem = copy.selection.elementAt(i); |
---|
| 4318 | + |
---|
| 4319 | + Object3D obj = copy.GetObject(elem.GetUUID()); |
---|
| 4320 | + |
---|
| 4321 | + if (obj == null) |
---|
| 4322 | + { |
---|
| 4323 | + copy.selection.remove(i--); |
---|
| 4324 | + } |
---|
| 4325 | + else |
---|
| 4326 | + { |
---|
| 4327 | + selection.add(obj); |
---|
| 4328 | + copy.selection.setElementAt(obj, i); |
---|
| 4329 | + } |
---|
| 4330 | + } |
---|
| 4331 | + |
---|
| 4332 | + flashIt = false; |
---|
| 4333 | + GetTree().clearSelection(); |
---|
| 4334 | + for (int i = 0; i < selection.size(); i++) |
---|
| 4335 | + GetTree().addSelectionPath(selection.elementAt(i).GetTreePath().GetTreePath()); |
---|
| 4336 | + flashIt = true; |
---|
| 4337 | + |
---|
| 4338 | + //refreshContents(false); |
---|
3518 | 4339 | } |
---|
3519 | 4340 | |
---|
3520 | | - void CopyChanged(Object3D obj) |
---|
| 4341 | + void CopyChanged() |
---|
3521 | 4342 | { |
---|
| 4343 | + Object3D obj = (Object3D)Grafreed.clone(copy.versionlist[copy.versionindex]); |
---|
| 4344 | + |
---|
| 4345 | + SetVersionStates(); |
---|
| 4346 | + |
---|
3522 | 4347 | boolean temp = CameraPane.SWITCH; |
---|
3523 | 4348 | CameraPane.SWITCH = false; |
---|
3524 | 4349 | |
---|
3525 | | - copy.ExtractBigData(hashtable); |
---|
| 4350 | + copy.ExtractBigData(versiontable); |
---|
3526 | 4351 | |
---|
3527 | 4352 | copy.clear(); |
---|
3528 | 4353 | |
---|
| 4354 | + copy.skyboxname = obj.skyboxname; |
---|
| 4355 | + copy.skyboxext = obj.skyboxext; |
---|
| 4356 | + |
---|
3529 | 4357 | for (int i=0; i<obj.Size(); i++) |
---|
3530 | 4358 | { |
---|
3531 | 4359 | copy.add(obj.get(i)); |
---|
3532 | 4360 | } |
---|
3533 | 4361 | |
---|
3534 | | - copy.RestoreBigData(hashtable); |
---|
| 4362 | + copy.RestoreBigData(versiontable); |
---|
3535 | 4363 | |
---|
3536 | 4364 | CameraPane.SWITCH = temp; |
---|
3537 | 4365 | |
---|
| 4366 | + RefreshSelection(); |
---|
3538 | 4367 | //assert(hashtable.isEmpty()); |
---|
3539 | 4368 | |
---|
3540 | 4369 | copy.Touch(); |
---|
.. | .. |
---|
3555 | 4384 | } |
---|
3556 | 4385 | } |
---|
3557 | 4386 | |
---|
3558 | | - refreshContents(); |
---|
| 4387 | + refreshContents(true); |
---|
3559 | 4388 | } |
---|
3560 | 4389 | |
---|
3561 | | - public void Undo() |
---|
| 4390 | + cButton previousVersionButton; |
---|
| 4391 | + cButton restoreButton; |
---|
| 4392 | + cButton replaceButton; |
---|
| 4393 | + cButton nextVersionButton; |
---|
| 4394 | + cButton saveVersionButton; |
---|
| 4395 | + cButton deleteVersionButton; |
---|
| 4396 | + |
---|
| 4397 | + boolean muteSlider; |
---|
| 4398 | + |
---|
| 4399 | + int VersionCount() |
---|
3562 | 4400 | { |
---|
| 4401 | + int count = 0; |
---|
| 4402 | + |
---|
| 4403 | + for (int i = copy.versionlist.length; --i >= 0;) |
---|
| 4404 | + { |
---|
| 4405 | + if (copy.versionlist[i] != null) |
---|
| 4406 | + count++; |
---|
| 4407 | + } |
---|
| 4408 | + |
---|
| 4409 | + return count; |
---|
| 4410 | + } |
---|
| 4411 | + |
---|
| 4412 | + void SetVersionStates() |
---|
| 4413 | + { |
---|
| 4414 | + //if (true) |
---|
| 4415 | + // return; |
---|
| 4416 | + |
---|
| 4417 | + //cRadio tab = GetCurrentTab(); |
---|
| 4418 | + |
---|
| 4419 | + restoreButton.setEnabled(copy.versionindex != -1); |
---|
| 4420 | + replaceButton.setEnabled(copy.versionindex != -1); |
---|
| 4421 | + |
---|
| 4422 | + previousVersionButton.setEnabled(copy.versionindex > 0); |
---|
| 4423 | + nextVersionButton.setEnabled(copy.versionlist[copy.versionindex + 1] != null); |
---|
| 4424 | + |
---|
| 4425 | + deleteVersionButton.setEnabled(//copy.versionindex > 0 && |
---|
| 4426 | + copy.versionlist[copy.versionindex + 1] != null); |
---|
| 4427 | + |
---|
| 4428 | + muteSlider = true; |
---|
| 4429 | + versionSlider.setMinimum(0); |
---|
| 4430 | + versionSlider.setMaximum(VersionCount() - 1); |
---|
| 4431 | + versionSlider.setInteger(copy.versionindex); |
---|
| 4432 | + versionSlider.setEnabled(copy.versionindex != -1); |
---|
| 4433 | + muteSlider = false; |
---|
| 4434 | + } |
---|
| 4435 | + |
---|
| 4436 | + public boolean PreviousVersion() |
---|
| 4437 | + { |
---|
| 4438 | + // Option? |
---|
| 4439 | + Replace(); |
---|
| 4440 | + |
---|
3563 | 4441 | System.err.println("Undo"); |
---|
3564 | 4442 | |
---|
3565 | | - cRadio tab = GetCurrentTab(); |
---|
| 4443 | + //cRadio tab = GetCurrentTab(); |
---|
3566 | 4444 | |
---|
3567 | | - if (tab.undoindex == 0) |
---|
| 4445 | + if (copy.versionindex == 0) |
---|
3568 | 4446 | { |
---|
3569 | 4447 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
3570 | | - return; |
---|
| 4448 | + return false; |
---|
3571 | 4449 | } |
---|
3572 | 4450 | |
---|
3573 | | - if (tab.graphs[tab.undoindex] == null) |
---|
3574 | | - { |
---|
3575 | | - Save(); |
---|
3576 | | - tab.undoindex -= 1; |
---|
3577 | | - } |
---|
| 4451 | +// if (tab.graphs[tab.versionindex] == null) // || !tab.user[tab.versionindex]) |
---|
| 4452 | +// { |
---|
| 4453 | +// if (Save(false)) |
---|
| 4454 | +// tab.versionindex -= 1; |
---|
| 4455 | +// else |
---|
| 4456 | +// { |
---|
| 4457 | +// if (tab.versionindex <= 0) |
---|
| 4458 | +// return false; |
---|
| 4459 | +// else |
---|
| 4460 | +// tab.versionindex -= 1; |
---|
| 4461 | +// } |
---|
| 4462 | +// } |
---|
3578 | 4463 | |
---|
3579 | | - tab.undoindex -= 1; |
---|
| 4464 | + copy.versionindex -= 1; |
---|
3580 | 4465 | |
---|
3581 | | - CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); |
---|
| 4466 | + CopyChanged(); |
---|
| 4467 | + |
---|
| 4468 | + return true; |
---|
3582 | 4469 | } |
---|
3583 | 4470 | |
---|
3584 | | - public void Redo() |
---|
| 4471 | + public boolean Restore() |
---|
3585 | 4472 | { |
---|
3586 | | - cRadio tab = GetCurrentTab(); |
---|
| 4473 | + System.err.println("Restore"); |
---|
3587 | 4474 | |
---|
3588 | | - if (tab.graphs[tab.undoindex + 1] == null) |
---|
| 4475 | + //cRadio tab = GetCurrentTab(); |
---|
| 4476 | + |
---|
| 4477 | + if (copy.versionindex == -1 || copy.versionlist[copy.versionindex] == null) |
---|
| 4478 | + { |
---|
| 4479 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 4480 | + return false; |
---|
| 4481 | + } |
---|
| 4482 | + |
---|
| 4483 | + //CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex])); |
---|
| 4484 | + CopyChanged(); |
---|
| 4485 | + |
---|
| 4486 | + return true; |
---|
| 4487 | + } |
---|
| 4488 | + |
---|
| 4489 | + public boolean Replace() |
---|
| 4490 | + { |
---|
| 4491 | + System.err.println("Replace"); |
---|
| 4492 | + |
---|
| 4493 | + //cRadio tab = GetCurrentTab(); |
---|
| 4494 | + |
---|
| 4495 | + if (copy.versionindex == -1 || copy.versionlist[copy.versionindex] == null) |
---|
| 4496 | + { |
---|
| 4497 | + // No version yet. OK. java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 4498 | + return false; |
---|
| 4499 | + } |
---|
| 4500 | + |
---|
| 4501 | + copy.versionlist[copy.versionindex] = Duplicate(copy); |
---|
| 4502 | + |
---|
| 4503 | + return true; |
---|
| 4504 | + } |
---|
| 4505 | + |
---|
| 4506 | + public void NextVersion() |
---|
| 4507 | + { |
---|
| 4508 | + // Option? |
---|
| 4509 | + Replace(); |
---|
| 4510 | + |
---|
| 4511 | + //cRadio tab = GetCurrentTab(); |
---|
| 4512 | + |
---|
| 4513 | + if (copy.versionlist[copy.versionindex + 1] == null) |
---|
3589 | 4514 | { |
---|
3590 | 4515 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
3591 | 4516 | return; |
---|
3592 | 4517 | } |
---|
3593 | 4518 | |
---|
3594 | | - tab.undoindex += 1; |
---|
| 4519 | + copy.versionindex += 1; |
---|
3595 | 4520 | |
---|
3596 | | - CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); |
---|
| 4521 | + CopyChanged(); |
---|
| 4522 | + |
---|
| 4523 | + //if (!tab.user[tab.versionindex]) |
---|
| 4524 | + // tab.graphs[tab.versionindex] = null; |
---|
3597 | 4525 | } |
---|
3598 | 4526 | |
---|
3599 | 4527 | void ImportGFD() |
---|
.. | .. |
---|
3804 | 4732 | //copy.material = new cMaterial(copy.GetMaterial()); |
---|
3805 | 4733 | |
---|
3806 | 4734 | current.color = (float) colorField.getFloat(); |
---|
3807 | | - current.modulation = (float) modulationField.getFloat(); |
---|
| 4735 | + current.modulation = (float) saturationField.getFloat(); |
---|
3808 | 4736 | current.metalness = (float) metalnessField.getFloat(); |
---|
3809 | 4737 | current.diffuse = (float) diffuseField.getFloat(); |
---|
3810 | 4738 | current.specular = (float) specularField.getFloat(); |
---|
.. | .. |
---|
3837 | 4765 | cMaterial mat = copy.material; |
---|
3838 | 4766 | |
---|
3839 | 4767 | colorField.SetToolTipValue((mat.color)); |
---|
3840 | | - modulationField.SetToolTipValue((mat.modulation)); |
---|
| 4768 | + saturationField.SetToolTipValue((mat.modulation)); |
---|
3841 | 4769 | metalnessField.SetToolTipValue((mat.metalness)); |
---|
3842 | 4770 | diffuseField.SetToolTipValue((mat.diffuse)); |
---|
3843 | 4771 | specularField.SetToolTipValue((mat.specular)); |
---|
.. | .. |
---|
3889 | 4817 | //copy.Touch(); |
---|
3890 | 4818 | } |
---|
3891 | 4819 | |
---|
| 4820 | + cNumberSlider versionSlider; |
---|
| 4821 | + |
---|
3892 | 4822 | public void stateChanged(ChangeEvent e) |
---|
3893 | 4823 | { |
---|
3894 | 4824 | // assert(false); |
---|
| 4825 | + if (e.getSource() == versionSlider) |
---|
| 4826 | + { |
---|
| 4827 | + if (muteSlider) |
---|
| 4828 | + return; |
---|
| 4829 | + |
---|
| 4830 | + Replace(); |
---|
| 4831 | + |
---|
| 4832 | + int version = versionSlider.getInteger(); |
---|
| 4833 | + |
---|
| 4834 | + if (version != -1 && copy.versionlist[version] != null) |
---|
| 4835 | + { |
---|
| 4836 | + copy.versionindex = version; |
---|
| 4837 | + CopyChanged(); |
---|
| 4838 | + } |
---|
| 4839 | + |
---|
| 4840 | + return; |
---|
| 4841 | + } |
---|
3895 | 4842 | |
---|
3896 | 4843 | if (freezematerial) |
---|
3897 | 4844 | { |
---|
.. | .. |
---|
3927 | 4874 | { |
---|
3928 | 4875 | //System.out.println("stateChanged = " + this); |
---|
3929 | 4876 | materialtouched = true; |
---|
| 4877 | + |
---|
| 4878 | + if (Globals.AUTOSATURATE && e.getSource() == colorField && saturationField.getFloat() == 0.001) |
---|
| 4879 | + { |
---|
| 4880 | + saturationField.setFloat(1); |
---|
| 4881 | + } |
---|
| 4882 | + |
---|
3930 | 4883 | applySelf(); |
---|
3931 | 4884 | //System.out.println("this = " + this); |
---|
3932 | 4885 | //System.out.println("PARENT = " + parent); |
---|
.. | .. |
---|
4226 | 5179 | { |
---|
4227 | 5180 | if (GetTree() != null) |
---|
4228 | 5181 | { |
---|
| 5182 | + GetTree().revalidate(); |
---|
4229 | 5183 | GetTree().repaint(); |
---|
4230 | 5184 | } |
---|
4231 | 5185 | |
---|
.. | .. |
---|
4234 | 5188 | ctrlPanel.validate(); // ? new |
---|
4235 | 5189 | ctrlPanel.repaint(); |
---|
4236 | 5190 | } |
---|
| 5191 | + |
---|
| 5192 | + if (previousVersionButton != null && copy.versionlist != null) |
---|
| 5193 | + SetVersionStates(); |
---|
| 5194 | + |
---|
| 5195 | + cameraView.requestFocusInWindow(); |
---|
4237 | 5196 | } |
---|
4238 | 5197 | |
---|
4239 | 5198 | static TweenManager tweenManager = new TweenManager(); |
---|
4240 | 5199 | |
---|
4241 | 5200 | void makeSomething(Object3D thing, boolean resetmodel) // deselect) |
---|
4242 | 5201 | { |
---|
4243 | | - if (Globals.SAVEONMAKE) // && resetmodel) |
---|
| 5202 | + if (Globals.REPLACEONMAKE) // && resetmodel) |
---|
4244 | 5203 | Save(); |
---|
4245 | 5204 | //Tween.set(thing, 0).target(1).start(tweenManager); |
---|
4246 | 5205 | //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager); |
---|
.. | .. |
---|
4265 | 5224 | // group = (Composite) group.get(0); |
---|
4266 | 5225 | // } |
---|
4267 | 5226 | |
---|
4268 | | - System.out.println("makeSomething of " + thing); |
---|
| 5227 | + //System.out.println("makeSomething of " + thing); |
---|
4269 | 5228 | |
---|
4270 | 5229 | /* |
---|
4271 | 5230 | if (deselect && jList != null) |
---|
.. | .. |
---|
4482 | 5441 | readobj.ResetDisplayList(); |
---|
4483 | 5442 | } catch (Exception e) |
---|
4484 | 5443 | { |
---|
4485 | | - //e.printStackTrace(); |
---|
| 5444 | + if (!e.toString().contains("GZIP")) |
---|
| 5445 | + e.printStackTrace(); |
---|
| 5446 | + |
---|
4486 | 5447 | try |
---|
4487 | 5448 | { |
---|
4488 | 5449 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
.. | .. |
---|
4556 | 5517 | |
---|
4557 | 5518 | if (readobj != null) |
---|
4558 | 5519 | { |
---|
4559 | | - if (Globals.SAVEONMAKE) |
---|
4560 | | - Save(); |
---|
| 5520 | + //if (Globals.SAVEONMAKE) // A new object cannot share meshes |
---|
| 5521 | + // Save(); |
---|
4561 | 5522 | try |
---|
4562 | 5523 | { |
---|
4563 | 5524 | //readobj.deepCopySelf(copy); |
---|
4564 | 5525 | copy.clear(); // june 2014 |
---|
| 5526 | + copy.skyboxname = readobj.skyboxname; |
---|
| 5527 | + copy.skyboxext = readobj.skyboxext; |
---|
4565 | 5528 | for (int i = 0; i < readobj.size(); i++) |
---|
4566 | 5529 | { |
---|
4567 | 5530 | Object3D child = readobj.get(i); // reserve(i); |
---|
.. | .. |
---|
4602 | 5565 | } |
---|
4603 | 5566 | } catch (ClassCastException e) |
---|
4604 | 5567 | { |
---|
| 5568 | + e.printStackTrace(); |
---|
4605 | 5569 | assert (false); |
---|
4606 | 5570 | Composite c = (Composite) copy; |
---|
4607 | 5571 | c.children.clear(); |
---|
.. | .. |
---|
4612 | 5576 | c.addChild(csg); |
---|
4613 | 5577 | } |
---|
4614 | 5578 | |
---|
| 5579 | + copy.versionlist = readobj.versionlist; |
---|
| 5580 | + copy.versionindex = readobj.versionindex; |
---|
| 5581 | + |
---|
| 5582 | + if (copy.versionlist == null) |
---|
| 5583 | + { |
---|
| 5584 | + // Backward compatibility |
---|
| 5585 | + copy.versionlist = new Object3D[100]; |
---|
| 5586 | + copy.versionindex = -1; |
---|
| 5587 | + |
---|
| 5588 | + //Save(true); |
---|
| 5589 | + } |
---|
| 5590 | + |
---|
| 5591 | + //? SetUndoStates(); |
---|
| 5592 | + |
---|
4615 | 5593 | ResetModel(); |
---|
4616 | 5594 | copy.HardTouch(); // recompile? |
---|
4617 | 5595 | refreshContents(); |
---|
4618 | 5596 | } |
---|
4619 | 5597 | } |
---|
4620 | 5598 | |
---|
4621 | | - void load() // throws ClassNotFoundException |
---|
| 5599 | + void Open() // throws ClassNotFoundException |
---|
4622 | 5600 | { |
---|
4623 | 5601 | if (Grafreed.standAlone) |
---|
4624 | 5602 | { |
---|
4625 | | - FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); |
---|
| 5603 | + FileDialog browser = new FileDialog(frame, "Open", FileDialog.LOAD); |
---|
4626 | 5604 | browser.show(); |
---|
4627 | 5605 | String filename = browser.getFile(); |
---|
4628 | 5606 | if (filename != null && filename.length() > 0) |
---|
.. | .. |
---|
4699 | 5677 | |
---|
4700 | 5678 | void save() |
---|
4701 | 5679 | { |
---|
| 5680 | + Replace(); |
---|
| 5681 | + |
---|
4702 | 5682 | if (lastname == null) |
---|
4703 | 5683 | { |
---|
4704 | 5684 | return; |
---|
.. | .. |
---|
4721 | 5701 | //ps.print(buffer.toString()); |
---|
4722 | 5702 | } catch (IOException e) |
---|
4723 | 5703 | { |
---|
| 5704 | + e.printStackTrace(); |
---|
4724 | 5705 | } |
---|
4725 | 5706 | } |
---|
4726 | 5707 | |
---|
.. | .. |
---|
4735 | 5716 | String filename = browser.getFile(); |
---|
4736 | 5717 | if (filename != null && filename.length() > 0) |
---|
4737 | 5718 | { |
---|
| 5719 | + if (!filename.endsWith(".gfd")) |
---|
| 5720 | + filename += ".gfd"; |
---|
4738 | 5721 | lastname = browser.getDirectory() + filename; |
---|
4739 | 5722 | save(); |
---|
4740 | 5723 | } |
---|
.. | .. |
---|
4901 | 5884 | MenuBar menuBar; |
---|
4902 | 5885 | Menu fileMenu; |
---|
4903 | 5886 | MenuItem newItem; |
---|
4904 | | - MenuItem loadItem; |
---|
| 5887 | + MenuItem openItem; |
---|
4905 | 5888 | MenuItem saveItem; |
---|
4906 | 5889 | MenuItem saveAsItem; |
---|
4907 | 5890 | MenuItem exportAsItem; |
---|
.. | .. |
---|
4924 | 5907 | CheckboxMenuItem toggleSwitchItem; |
---|
4925 | 5908 | CheckboxMenuItem toggleRootItem; |
---|
4926 | 5909 | CheckboxMenuItem animationItem; |
---|
| 5910 | + MenuItem archiveItem; |
---|
4927 | 5911 | CheckboxMenuItem toggleHandleItem; |
---|
4928 | 5912 | CheckboxMenuItem togglePaintItem; |
---|
4929 | 5913 | JSplitPane mainPanel; |
---|
.. | .. |
---|
4937 | 5921 | ButtonGroup buttonGroup; |
---|
4938 | 5922 | |
---|
4939 | 5923 | cGridBag toolboxPanel; |
---|
| 5924 | + cGridBag skyboxPanel; |
---|
4940 | 5925 | cGridBag materialPanel; |
---|
4941 | 5926 | cGridBag ctrlPanel; |
---|
4942 | 5927 | |
---|
.. | .. |
---|
4945 | 5930 | cGridBag optionsPanel; |
---|
4946 | 5931 | |
---|
4947 | 5932 | JTabbedPane objectPanel; |
---|
| 5933 | + boolean materialFlushed; |
---|
| 5934 | + Object3D latestObject; |
---|
4948 | 5935 | |
---|
4949 | 5936 | cGridBag XYZPanel; |
---|
4950 | 5937 | |
---|
.. | .. |
---|
5008 | 5995 | JLabel colorLabel; |
---|
5009 | 5996 | cNumberSlider colorField; |
---|
5010 | 5997 | JLabel modulationLabel; |
---|
5011 | | - cNumberSlider modulationField; |
---|
| 5998 | + cNumberSlider saturationField; |
---|
5012 | 5999 | JLabel metalnessLabel; |
---|
5013 | 6000 | cNumberSlider metalnessField; |
---|
5014 | 6001 | JLabel diffuseLabel; |
---|
.. | .. |
---|
5039 | 6026 | cNumberSlider anisoField; |
---|
5040 | 6027 | JLabel anisoVLabel; |
---|
5041 | 6028 | cNumberSlider anisoVField; |
---|
| 6029 | + |
---|
5042 | 6030 | JLabel cameraLabel; |
---|
5043 | 6031 | cNumberSlider cameraField; |
---|
5044 | 6032 | JLabel selfshadowLabel; |
---|
.. | .. |
---|
5053 | 6041 | cNumberSlider fakedepthField; |
---|
5054 | 6042 | JLabel shadowbiasLabel; |
---|
5055 | 6043 | cNumberSlider shadowbiasField; |
---|
| 6044 | + |
---|
5056 | 6045 | JLabel bumpLabel; |
---|
5057 | 6046 | cNumberSlider bumpField; |
---|
5058 | 6047 | JLabel noiseLabel; |
---|