.. | .. |
---|
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 Composite CreateCameras() |
---|
| 76 | + { |
---|
| 77 | + Composite cams = new cTemplate(); |
---|
| 78 | + cams.name = "Cameras"; |
---|
| 79 | + copy.insertElementAt(cams, 0); |
---|
| 80 | + |
---|
| 81 | + cams.addChild(new Camera()); |
---|
| 82 | + cams.addChild(new Camera(1)); |
---|
| 83 | + cams.addChild(new Camera(2)); |
---|
| 84 | + cams.addChild(new Camera(3)); |
---|
| 85 | + cams.addChild(new Camera(4)); |
---|
| 86 | + |
---|
| 87 | + return cams; |
---|
| 88 | + } |
---|
| 89 | + |
---|
| 90 | + public cGridBag GetSeparator() |
---|
| 91 | + { |
---|
| 92 | + cGridBag separator = new cGridBag(); |
---|
| 93 | + separator.add(new JSeparator()); |
---|
| 94 | + separator.preferredHeight = 5; |
---|
| 95 | + return separator; |
---|
| 96 | + } |
---|
41 | 97 | |
---|
42 | 98 | cButton GetButton(String name, boolean border) |
---|
43 | 99 | { |
---|
44 | | - try |
---|
45 | | - { |
---|
46 | | - ImageIcon icon = GetIcon(name); |
---|
| 100 | + ImageIcon icon = GetIcon(name); |
---|
| 101 | + if (icon != null || name.contains("/")) |
---|
47 | 102 | return new cButton(icon, border); |
---|
48 | | - } |
---|
49 | | - catch (Exception e) |
---|
50 | | - { |
---|
| 103 | + else |
---|
51 | 104 | return new cButton(name, border); |
---|
52 | | - } |
---|
| 105 | + } |
---|
| 106 | + |
---|
| 107 | + cLabel GetLabel(String name, boolean border) |
---|
| 108 | + { |
---|
| 109 | + //ImageIcon icon = GetIcon(name); |
---|
| 110 | + return new cLabel(GetImage(name), border); |
---|
53 | 111 | } |
---|
54 | 112 | |
---|
55 | 113 | cToggleButton GetToggleButton(String name, boolean border) |
---|
56 | 114 | { |
---|
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 | | - } |
---|
| 115 | + ImageIcon icon = GetIcon(name); |
---|
| 116 | + return new cToggleButton(icon, border); |
---|
66 | 117 | } |
---|
67 | 118 | |
---|
68 | 119 | cCheckBox GetCheckBox(String name, boolean border) |
---|
69 | 120 | { |
---|
| 121 | + ImageIcon icon = GetIcon(name); |
---|
| 122 | + return new cCheckBox(icon, border); |
---|
| 123 | + } |
---|
| 124 | + |
---|
| 125 | + static java.util.Hashtable<String, javax.swing.ImageIcon> icons = new java.util.Hashtable<String, javax.swing.ImageIcon>(); |
---|
| 126 | + |
---|
| 127 | + static ImageIcon GetIcon(String name) |
---|
| 128 | + { |
---|
| 129 | + javax.swing.ImageIcon iconCache = icons.get(name); |
---|
| 130 | + if (iconCache != null) |
---|
| 131 | + { |
---|
| 132 | + return iconCache; |
---|
| 133 | + } |
---|
| 134 | + |
---|
70 | 135 | try |
---|
71 | 136 | { |
---|
72 | | - ImageIcon icon = GetIcon(name); |
---|
73 | | - return new cCheckBox(icon, border); |
---|
| 137 | + BufferedImage image = javax.imageio.ImageIO.read(ObjEditor.class.getClassLoader().getResourceAsStream(name)); |
---|
| 138 | + |
---|
| 139 | +// if (image.getWidth() > 48 && image.getHeight() > 48) |
---|
| 140 | +// { |
---|
| 141 | +// BufferedImage resized = new BufferedImage(48, 48, image.getType()); |
---|
| 142 | +// Graphics2D g = resized.createGraphics(); |
---|
| 143 | +// g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); |
---|
| 144 | +// //g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
---|
| 145 | +// g.drawImage(image, 0, 0, 48, 48, 0, 0, image.getWidth(), image.getHeight(), null); |
---|
| 146 | +// g.dispose(); |
---|
| 147 | +// |
---|
| 148 | +// image = resized; |
---|
| 149 | +// } |
---|
| 150 | + |
---|
| 151 | + javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image); |
---|
| 152 | + |
---|
| 153 | + icons.put(name, icon); |
---|
| 154 | + |
---|
| 155 | + return icon; |
---|
74 | 156 | } |
---|
75 | 157 | catch (Exception e) |
---|
76 | 158 | { |
---|
77 | | - return new cCheckBox(name, border); |
---|
| 159 | + //icons.put(name, null); |
---|
| 160 | + return null; |
---|
78 | 161 | } |
---|
79 | 162 | } |
---|
80 | | - |
---|
81 | | - private ImageIcon GetIcon(String name) throws IOException |
---|
| 163 | + |
---|
| 164 | + BufferedImage GetImage(String name) |
---|
82 | 165 | { |
---|
83 | | - BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name)); |
---|
84 | | - |
---|
85 | | - if (image.getWidth() != 24 && image.getHeight() != 24) |
---|
| 166 | + try |
---|
86 | 167 | { |
---|
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; |
---|
| 168 | + BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name)); |
---|
| 169 | + |
---|
| 170 | + return image; |
---|
95 | 171 | } |
---|
96 | | - |
---|
97 | | - javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image); |
---|
98 | | - return icon; |
---|
| 172 | + catch (Exception e) |
---|
| 173 | + { |
---|
| 174 | + return null; |
---|
| 175 | + } |
---|
99 | 176 | } |
---|
100 | 177 | |
---|
101 | 178 | // SCRIPT |
---|
.. | .. |
---|
207 | 284 | |
---|
208 | 285 | objEditor.ctrlPanel.remove(namePanel); |
---|
209 | 286 | |
---|
210 | | - if (!GroupEditor.allparams) |
---|
| 287 | + if (!allparams) |
---|
211 | 288 | return; |
---|
212 | 289 | |
---|
213 | 290 | // objEditor.ctrlPanel.remove(liveCB); |
---|
.. | .. |
---|
279 | 356 | client = inClient; |
---|
280 | 357 | copy = client; |
---|
281 | 358 | |
---|
| 359 | +// if (copy.versionlist == null) |
---|
| 360 | +// { |
---|
| 361 | +// copy.versionlist = new Object3D[100]; |
---|
| 362 | +// copy.versionindex = -1; |
---|
| 363 | +// |
---|
| 364 | +// callee.Save(true); |
---|
| 365 | +// } |
---|
| 366 | + |
---|
282 | 367 | // "this" is not called: SetupUI2(objEditor); |
---|
283 | 368 | } |
---|
284 | 369 | |
---|
.. | .. |
---|
292 | 377 | client = inClient; |
---|
293 | 378 | copy = client; |
---|
294 | 379 | |
---|
| 380 | + if (copy.versionlist == null) |
---|
| 381 | + { |
---|
| 382 | + copy.versionlist = new Object3D[100]; |
---|
| 383 | + copy.versionindex = -1; |
---|
| 384 | + |
---|
| 385 | +// Save(true); |
---|
| 386 | + } |
---|
| 387 | + |
---|
295 | 388 | SetupUI2(callee.GetEditor()); |
---|
296 | 389 | } |
---|
297 | 390 | |
---|
.. | .. |
---|
306 | 399 | //localCopy.parent = null; |
---|
307 | 400 | |
---|
308 | 401 | frame = new JFrame(); |
---|
309 | | - frame.setUndecorated(true); |
---|
| 402 | + frame.setUndecorated(false); |
---|
310 | 403 | objEditor = this; |
---|
311 | 404 | this.callee = callee; |
---|
312 | 405 | |
---|
313 | 406 | //parent = p; |
---|
314 | 407 | |
---|
315 | 408 | GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(); |
---|
316 | | - System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow()); |
---|
| 409 | + if (Globals.DEBUG) |
---|
| 410 | + System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow()); |
---|
317 | 411 | //gd.setFullScreenWindow(this); |
---|
318 | 412 | //setResizable(false); |
---|
319 | 413 | //if (!isDisplayable()) |
---|
.. | .. |
---|
324 | 418 | copy = localCopy; |
---|
325 | 419 | copy.editWindow = this; |
---|
326 | 420 | |
---|
| 421 | +// if (copy.versionlist == null) |
---|
| 422 | +// { |
---|
| 423 | +// copy.versionlist = new Object3D[100]; |
---|
| 424 | +// copy.versionindex = -1; |
---|
| 425 | +// |
---|
| 426 | +// Save(true); |
---|
| 427 | +// } |
---|
| 428 | + |
---|
327 | 429 | SetupMenu(); |
---|
328 | 430 | |
---|
329 | 431 | //SetupName(objEditor); // new |
---|
.. | .. |
---|
337 | 439 | return frame.action(event, obj); |
---|
338 | 440 | } |
---|
339 | 441 | |
---|
| 442 | + // Cannot work without static |
---|
| 443 | + static boolean allparams = true; |
---|
| 444 | + |
---|
| 445 | + static java.util.Vector<Object3D> listUI = new java.util.Vector<Object3D>(); |
---|
| 446 | + |
---|
| 447 | + // This is to refresh the UI of the material panel. |
---|
| 448 | + boolean patchMaterial; |
---|
| 449 | + |
---|
340 | 450 | void SetupMenu() |
---|
341 | 451 | { |
---|
342 | 452 | frame.setMenuBar(menuBar = new MenuBar()); |
---|
343 | 453 | menuBar.add(fileMenu = new Menu("File")); |
---|
344 | 454 | fileMenu.add(newItem = new MenuItem("New")); |
---|
345 | | - fileMenu.add(loadItem = new MenuItem("Open...")); |
---|
| 455 | + fileMenu.add(openItem = new MenuItem("Open...")); |
---|
346 | 456 | |
---|
347 | 457 | //oe.menuBar.add(menu = new Menu("Include")); |
---|
348 | 458 | Menu menu = new Menu("Import"); |
---|
.. | .. |
---|
350 | 460 | importOBJItem.addActionListener(this); |
---|
351 | 461 | import3DSItem = menu.add(new MenuItem("3DS file...")); |
---|
352 | 462 | import3DSItem.addActionListener(this); |
---|
| 463 | + if (Globals.ADVANCED) |
---|
| 464 | + { |
---|
353 | 465 | importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file...")); |
---|
354 | 466 | importVRMLX3DItem.addActionListener(this); |
---|
| 467 | + } |
---|
355 | 468 | menu.add("-"); |
---|
356 | 469 | importGFDItem = menu.add(new MenuItem("Grafreed file...")); |
---|
357 | 470 | importGFDItem.addActionListener(this); |
---|
.. | .. |
---|
374 | 487 | } |
---|
375 | 488 | |
---|
376 | 489 | newItem.addActionListener(this); |
---|
377 | | - loadItem.addActionListener(this); |
---|
| 490 | + openItem.addActionListener(this); |
---|
378 | 491 | saveItem.addActionListener(this); |
---|
379 | 492 | saveAsItem.addActionListener(this); |
---|
380 | 493 | exportAsItem.addActionListener(this); |
---|
.. | .. |
---|
383 | 496 | closeItem.addActionListener(this); |
---|
384 | 497 | |
---|
385 | 498 | objectPanel = new JTabbedPane(); |
---|
| 499 | + |
---|
| 500 | + ChangeListener changeListener = new ChangeListener() |
---|
| 501 | + { |
---|
| 502 | + //String name; |
---|
| 503 | + |
---|
| 504 | + public void stateChanged(ChangeEvent changeEvent) |
---|
| 505 | + { |
---|
| 506 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Material") && !materialFlushed) |
---|
| 507 | +// { |
---|
| 508 | +// if (latestObject != null) |
---|
| 509 | +// { |
---|
| 510 | +// refreshContents(true); |
---|
| 511 | +// SetMaterial(latestObject); |
---|
| 512 | +// } |
---|
| 513 | +// |
---|
| 514 | +// materialFlushed = true; |
---|
| 515 | +// } |
---|
| 516 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Edit")) |
---|
| 517 | +// { |
---|
| 518 | +// if (listUI.size() == 0) |
---|
| 519 | +// EditSelection(false); |
---|
| 520 | +// } |
---|
| 521 | + |
---|
| 522 | +// if (objectPanel.getSelectedIndex() == 4) |
---|
| 523 | +// { |
---|
| 524 | +// name = copy.skyboxname; |
---|
| 525 | +// |
---|
| 526 | +// if (name == null) |
---|
| 527 | +// { |
---|
| 528 | +// name = ""; |
---|
| 529 | +// } |
---|
| 530 | +// |
---|
| 531 | +// copy.skyboxname = "cubemaps/default-skyboxes/rgb"; |
---|
| 532 | +// copy.skyboxext = "jpg"; |
---|
| 533 | +// } |
---|
| 534 | +// else |
---|
| 535 | +// { |
---|
| 536 | +// if (name != null) |
---|
| 537 | +// { |
---|
| 538 | +// if (name.equals("")) |
---|
| 539 | +// { |
---|
| 540 | +// copy.skyboxname = null; |
---|
| 541 | +// copy.skyboxext = null; |
---|
| 542 | +// } |
---|
| 543 | +// else |
---|
| 544 | +// { |
---|
| 545 | +// copy.skyboxname = name; |
---|
| 546 | +// } |
---|
| 547 | +// } |
---|
| 548 | +// } |
---|
| 549 | + cameraView.transformMode = objectPanel.getSelectedIndex() == 4; |
---|
| 550 | + |
---|
| 551 | +// refreshContents(false); // To refresh Info tab |
---|
| 552 | + cameraView.repaint(); |
---|
| 553 | + } |
---|
| 554 | + }; |
---|
| 555 | + objectPanel.addChangeListener(changeListener); |
---|
| 556 | + |
---|
386 | 557 | toolbarPanel = new JPanel(); |
---|
387 | 558 | toolbarPanel.setName("Toolbar"); |
---|
| 559 | + |
---|
388 | 560 | treePanel = new cGridBag(); |
---|
389 | 561 | treePanel.setName("Tree"); |
---|
390 | 562 | |
---|
391 | 563 | editPanel = new cGridBag().setVertical(true); |
---|
392 | | - editPanel.setName("Edit"); |
---|
| 564 | + //editPanel.setName("Edit"); |
---|
393 | 565 | |
---|
394 | 566 | ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
---|
395 | 567 | |
---|
.. | .. |
---|
397 | 569 | editPanel.add(editCommandsPanel); |
---|
398 | 570 | editPanel.add(ctrlPanel); |
---|
399 | 571 | |
---|
400 | | - toolboxPanel = new cGridBag().setVertical(false); |
---|
401 | | - toolboxPanel.setName("Toolbox"); |
---|
| 572 | + toolboxPanel = new cGridBag().setVertical(true); |
---|
| 573 | + //toolboxPanel.setName("Toolbox"); |
---|
402 | 574 | |
---|
403 | | - materialPanel = new cGridBag().setVertical(true); |
---|
404 | | - materialPanel.setName("Material"); |
---|
| 575 | + skyboxPanel = new cGridBag().setVertical(true); |
---|
| 576 | + |
---|
| 577 | + materialPanel = new cGridBag().setVertical(false); |
---|
| 578 | + //materialPanel.setName("Material"); |
---|
405 | 579 | |
---|
406 | 580 | /*JTextPane*/ |
---|
407 | 581 | infoarea = createTextPane(); |
---|
.. | .. |
---|
409 | 583 | |
---|
410 | 584 | infoarea.setEditable(true); |
---|
411 | 585 | SetText(); |
---|
| 586 | + |
---|
412 | 587 | // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f)); |
---|
413 | 588 | // infoarea.setOpaque(false); |
---|
414 | 589 | // //infoarea.setForeground(textcolor); |
---|
415 | 590 | // TEXTAREA infoarea.setLineWrap(true); |
---|
416 | 591 | // TEXTAREA infoarea.setWrapStyleWord(true); |
---|
417 | 592 | 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"); |
---|
| 593 | + infoPanel.setPreferredSize(new Dimension(1, 1)); |
---|
| 594 | + //infoPanel.setName("Info"); |
---|
420 | 595 | //infoPanel.setLayout(new BorderLayout()); |
---|
421 | 596 | //infoPanel.add(createTextPane()); |
---|
422 | 597 | |
---|
.. | .. |
---|
427 | 602 | mainPanel.setDividerSize(9); |
---|
428 | 603 | mainPanel.setDividerLocation(0.5); //1.0); |
---|
429 | 604 | mainPanel.setResizeWeight(0.5); |
---|
430 | | - |
---|
| 605 | + |
---|
| 606 | +//mainPanel.setDividerSize((int) (mainPanel.getDividerSize() * 1.5)); |
---|
| 607 | + BasicSplitPaneDivider divider = ( (BasicSplitPaneUI) mainPanel.getUI()).getDivider(); |
---|
| 608 | + divider.setDividerSize(15); |
---|
| 609 | + divider.setBorder(BorderFactory.createTitledBorder(divider.getBorder(), "Custom border title -- gets rid of the one-touch arrows!")); |
---|
| 610 | + |
---|
| 611 | + mainPanel.setUI(new BasicSplitPaneUI()); |
---|
| 612 | + |
---|
431 | 613 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
---|
432 | 614 | //mainPanel.setLayout(new GridBagLayout()); |
---|
433 | 615 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
.. | .. |
---|
658 | 840 | } |
---|
659 | 841 | } |
---|
660 | 842 | |
---|
661 | | -static GraphicsDevice device = GraphicsEnvironment |
---|
662 | | - .getLocalGraphicsEnvironment().getScreenDevices()[0]; |
---|
| 843 | +//static GraphicsDevice device = GraphicsEnvironment |
---|
| 844 | +// .getLocalGraphicsEnvironment().getScreenDevices()[0]; |
---|
663 | 845 | |
---|
664 | 846 | Rectangle keeprect; |
---|
665 | 847 | cRadio radio; |
---|
.. | .. |
---|
676 | 858 | boolean maximized; |
---|
677 | 859 | |
---|
678 | 860 | cButton fullscreenLayout; |
---|
| 861 | + cButton expandedLayout; |
---|
679 | 862 | |
---|
680 | 863 | void Minimize() |
---|
681 | 864 | { |
---|
682 | 865 | frame.setState(Frame.ICONIFIED); |
---|
| 866 | + frame.validate(); |
---|
683 | 867 | } |
---|
684 | 868 | |
---|
| 869 | +// artifactURI=null, type=0, property=${file.reference.jfxrt.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@6767876f, broken=false, additional={} |
---|
| 870 | +// artifactURI=null, type=0, property=${file.reference.mac-ui.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@16bdc817, broken=false, additional={} |
---|
| 871 | +// artifactURI=null, type=0, property=${file.reference.classes.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@9daa9c17, broken=false, additional={} |
---|
685 | 872 | void Maximize() |
---|
686 | 873 | { |
---|
| 874 | + if (CameraPane.FULLSCREEN) |
---|
| 875 | + { |
---|
| 876 | + ToggleFullScreen(); |
---|
| 877 | + } |
---|
| 878 | + |
---|
687 | 879 | if (maximized) |
---|
688 | 880 | { |
---|
689 | 881 | frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); |
---|
.. | .. |
---|
691 | 883 | else |
---|
692 | 884 | { |
---|
693 | 885 | 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); |
---|
| 886 | +// Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); |
---|
| 887 | +// Dimension rect2 = frame.getToolkit().getScreenSize(); |
---|
| 888 | +// frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height); |
---|
697 | 889 | // frame.setState(Frame.MAXIMIZED_BOTH); |
---|
| 890 | + frame.setBounds(frame.getGraphicsConfiguration().getBounds()); |
---|
698 | 891 | } |
---|
699 | 892 | |
---|
700 | 893 | maximized ^= true; |
---|
| 894 | + |
---|
| 895 | + frame.validate(); |
---|
701 | 896 | } |
---|
| 897 | + |
---|
| 898 | + cButton minButton; |
---|
| 899 | + cButton maxButton; |
---|
| 900 | + cButton fullButton; |
---|
| 901 | + cButton collapseButton; |
---|
| 902 | + cButton maximize3DButton; |
---|
702 | 903 | |
---|
703 | 904 | void ToggleFullScreen() |
---|
704 | 905 | { |
---|
705 | | - if (CameraPane.FULLSCREEN) |
---|
| 906 | + GraphicsDevice device = frame.getGraphicsConfiguration().getDevice(); |
---|
| 907 | + |
---|
| 908 | + cameraView.ToggleFullScreen(); |
---|
| 909 | + |
---|
| 910 | + if (!CameraPane.FULLSCREEN) |
---|
706 | 911 | { |
---|
707 | 912 | device.setFullScreenWindow(null); |
---|
| 913 | + frame.dispose(); |
---|
| 914 | + frame.setUndecorated(false); |
---|
| 915 | + frame.validate(); |
---|
| 916 | + frame.setVisible(true); |
---|
| 917 | + |
---|
708 | 918 | //frame.setVisible(false); |
---|
709 | 919 | // frame.removeNotify(); |
---|
710 | 920 | // frame.setUndecorated(false); |
---|
.. | .. |
---|
714 | 924 | // X frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
715 | 925 | // X framePanel.add(bigThree); |
---|
716 | 926 | // X frame.getContentPane().add(/*"Center",*/framePanel); |
---|
717 | | - framePanel.setDividerLocation(1); |
---|
| 927 | +// framePanel.setDividerLocation(46); // icons are 24x24 |
---|
718 | 928 | |
---|
719 | 929 | //frame.setVisible(true); |
---|
720 | | - radio.layout = keepButton; |
---|
| 930 | +// radio.layout = keepButton; |
---|
721 | 931 | //theFrame = null; |
---|
722 | 932 | keepButton = null; |
---|
723 | | - radio.layout.doClick(); |
---|
| 933 | +// radio.layout.doClick(); |
---|
724 | 934 | |
---|
725 | 935 | } else |
---|
726 | 936 | { |
---|
.. | .. |
---|
729 | 939 | // frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width, |
---|
730 | 940 | // frame.getToolkit().getScreenSize().height); |
---|
731 | 941 | //frame.setVisible(false); |
---|
| 942 | + |
---|
| 943 | + frame.dispose(); |
---|
| 944 | + frame.setUndecorated(true); |
---|
732 | 945 | device.setFullScreenWindow(frame); |
---|
| 946 | + frame.validate(); |
---|
| 947 | + frame.setVisible(true); |
---|
733 | 948 | // frame.removeNotify(); |
---|
734 | 949 | // frame.setUndecorated(true); |
---|
735 | 950 | // frame.addNotify(); |
---|
736 | 951 | // X frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
737 | 952 | // X framePanel.remove(bigThree); |
---|
738 | 953 | // X frame.getContentPane().add(/*"Center",*/bigThree); |
---|
739 | | - framePanel.setDividerLocation(0); |
---|
| 954 | +// framePanel.setDividerLocation(0); |
---|
740 | 955 | |
---|
741 | | - radio.layout = fullscreenLayout; |
---|
742 | | - radio.layout.doClick(); |
---|
| 956 | +// radio.layout = fullscreenLayout; |
---|
| 957 | +// radio.layout.doClick(); |
---|
743 | 958 | //frame.setVisible(true); |
---|
744 | 959 | } |
---|
745 | | - |
---|
746 | | - cameraView.ToggleFullScreen(); |
---|
| 960 | + frame.validate(); |
---|
| 961 | + |
---|
| 962 | + cameraView.requestFocusInWindow(); |
---|
747 | 963 | } |
---|
| 964 | + |
---|
| 965 | + void CollapseToolbar() |
---|
| 966 | + { |
---|
| 967 | + framePanel.setDividerLocation(0); |
---|
| 968 | + //frame.validate(); |
---|
| 969 | + |
---|
| 970 | + cameraView.requestFocusInWindow(); |
---|
| 971 | + } |
---|
| 972 | + |
---|
| 973 | + private Object3D Duplicate(Object3D object) |
---|
| 974 | + { |
---|
| 975 | + boolean temp = CameraPane.SWITCH; |
---|
| 976 | + CameraPane.SWITCH = false; |
---|
| 977 | + |
---|
| 978 | + if (Grafreed.grafreed.universe.versiontable == null) |
---|
| 979 | + Grafreed.grafreed.universe.versiontable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
| 980 | + |
---|
| 981 | + object.ExtractBigData(Grafreed.grafreed.universe.versiontable); |
---|
| 982 | + // if (copy == client) |
---|
| 983 | + |
---|
| 984 | + Object3D versions[] = object.versionlist; |
---|
| 985 | + java.util.Hashtable<java.util.UUID, Object3D> versiontable = object.versiontable; // if Grafreed.grafreed.universe |
---|
| 986 | + object.versionlist = null; |
---|
| 987 | + object.versiontable = null; |
---|
| 988 | + |
---|
| 989 | + Object3D parent = object.parent; |
---|
| 990 | + object.parent = null; |
---|
| 991 | + |
---|
| 992 | + //byte[] compress = Compress(copy); |
---|
| 993 | + Object3D compress = (Object3D)Grafreed.clone(object); |
---|
| 994 | + |
---|
| 995 | + object.parent = parent; |
---|
| 996 | + |
---|
| 997 | + object.versionlist = versions; |
---|
| 998 | + object.versiontable = versiontable; // if Grafreed.grafreed.universe |
---|
| 999 | + |
---|
| 1000 | + object.RestoreBigData(Grafreed.grafreed.universe.versiontable); |
---|
| 1001 | + |
---|
| 1002 | + CameraPane.SWITCH = temp; |
---|
| 1003 | + |
---|
| 1004 | + return compress; |
---|
| 1005 | + } |
---|
748 | 1006 | |
---|
749 | 1007 | private JTextPane createTextPane() |
---|
750 | 1008 | { |
---|
.. | .. |
---|
867 | 1125 | { |
---|
868 | 1126 | SetupMaterial(materialPanel); |
---|
869 | 1127 | } |
---|
| 1128 | + |
---|
870 | 1129 | //SetupName(); |
---|
871 | 1130 | //SetupViews(); |
---|
872 | 1131 | } |
---|
.. | .. |
---|
876 | 1135 | // NumberSlider vDivsField; |
---|
877 | 1136 | // JCheckBox endcaps; |
---|
878 | 1137 | JCheckBox liveCB; |
---|
879 | | - JCheckBox selectCB; |
---|
| 1138 | + JCheckBox selectableCB; |
---|
880 | 1139 | JCheckBox hideCB; |
---|
881 | 1140 | JCheckBox link2masterCB; |
---|
882 | 1141 | JCheckBox markCB; |
---|
.. | .. |
---|
884 | 1143 | JCheckBox speedupCB; |
---|
885 | 1144 | JCheckBox rewindCB; |
---|
886 | 1145 | JCheckBox flipVCB; |
---|
| 1146 | + |
---|
| 1147 | + cCheckBox toggleTextureCB; |
---|
| 1148 | + cCheckBox toggleSwitchCB; |
---|
| 1149 | + |
---|
887 | 1150 | JComboBox texresMenu; |
---|
| 1151 | + |
---|
888 | 1152 | JButton resetButton; |
---|
889 | 1153 | JButton stepButton; |
---|
890 | 1154 | JButton stepAllButton; |
---|
.. | .. |
---|
1070 | 1334 | |
---|
1071 | 1335 | namePanel = new cGridBag(); |
---|
1072 | 1336 | |
---|
| 1337 | + //if (copy.pinned) |
---|
| 1338 | + { |
---|
| 1339 | + pinButton = GetToggleButton("icons/pin.png", !Globals.NIMBUSLAF); |
---|
| 1340 | + pinButton.setSelected(copy.pinned); |
---|
| 1341 | + cGridBag t = new cGridBag(); |
---|
| 1342 | + t.preferredWidth = 2; |
---|
| 1343 | + t.add(pinButton); |
---|
| 1344 | + namePanel.add(t); |
---|
| 1345 | + |
---|
| 1346 | + pinButton.addItemListener(this); |
---|
| 1347 | + } |
---|
| 1348 | + |
---|
1073 | 1349 | nameField = AddText(namePanel, copy.GetName()); |
---|
1074 | | - namePanel.add(nameField); |
---|
| 1350 | + namePanel.add(new JScrollPane(nameField, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER)); |
---|
1075 | 1351 | oe.ctrlPanel.add(namePanel); |
---|
1076 | 1352 | |
---|
1077 | 1353 | oe.ctrlPanel.Return(); |
---|
1078 | 1354 | |
---|
1079 | | - if (!GroupEditor.allparams) |
---|
| 1355 | + if (!allparams) |
---|
1080 | 1356 | return; |
---|
1081 | 1357 | |
---|
1082 | 1358 | setupPanel = new cGridBag().setVertical(false); |
---|
1083 | 1359 | |
---|
1084 | 1360 | liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
1085 | 1361 | liveCB.setToolTipText("Animate object"); |
---|
1086 | | - selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
1087 | | - selectCB.setToolTipText("Make object selectable"); |
---|
| 1362 | + markCB = AddCheckBox(setupPanel, "Anim", copy.marked); |
---|
| 1363 | + markCB.setToolTipText("Set target transform"); |
---|
| 1364 | + selectableCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
| 1365 | + selectableCB.setToolTipText("Make object selectable"); |
---|
1088 | 1366 | // Return(); |
---|
| 1367 | + |
---|
1089 | 1368 | hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
1090 | 1369 | hideCB.setToolTipText("Hide object"); |
---|
1091 | | - markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
1092 | | - markCB.setToolTipText("Set the animation target transform"); |
---|
| 1370 | + |
---|
| 1371 | + ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false); |
---|
1093 | 1372 | |
---|
1094 | 1373 | setupPanel2 = new cGridBag().setVertical(false); |
---|
1095 | 1374 | |
---|
1096 | 1375 | rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind); |
---|
1097 | 1376 | rewindCB.setToolTipText("Rewind animation"); |
---|
1098 | 1377 | |
---|
1099 | | - randomCB = AddCheckBox(setupPanel2, "Rand", copy.random); |
---|
1100 | | - randomCB.setToolTipText("Randomly Rewind or Go back and forth"); |
---|
| 1378 | + randomCB = AddCheckBox(setupPanel2, "Random", copy.random); |
---|
| 1379 | + randomCB.setToolTipText("Randomly Rewind (or Go back and forth)"); |
---|
1101 | 1380 | |
---|
| 1381 | + link2masterCB = AddCheckBox(setupPanel2, "Support", copy.link2master); |
---|
| 1382 | + link2masterCB.setToolTipText("Attach to support"); |
---|
| 1383 | + |
---|
1102 | 1384 | if (Globals.ADVANCED) |
---|
1103 | 1385 | { |
---|
1104 | | - link2masterCB = AddCheckBox(setupPanel2, "Supp", copy.link2master); |
---|
1105 | | - link2masterCB.setToolTipText("Attach to support"); |
---|
1106 | 1386 | speedupCB = AddCheckBox(setupPanel2, "Speed", copy.speedup); |
---|
1107 | 1387 | speedupCB.setToolTipText("Option motion capture"); |
---|
1108 | 1388 | } |
---|
.. | .. |
---|
1288 | 1568 | |
---|
1289 | 1569 | if (cam == null || !(copy.get(0) instanceof cGroup)) |
---|
1290 | 1570 | { |
---|
1291 | | - System.out.println("CREATE CAMERAS"); |
---|
1292 | | - cams = new cTemplate(); |
---|
1293 | | - cams.name = "Cameras"; |
---|
1294 | | - copy.insertElementAt(cams, 0); |
---|
1295 | | - //cams.parent = copy; |
---|
1296 | | - |
---|
1297 | | - cam = new Camera(); // LA.newVector(3, 2, 1)); |
---|
1298 | | - cams.addChild(cam); |
---|
1299 | | - cam = new Camera(1); |
---|
1300 | | - cams.addChild(cam); |
---|
1301 | | - cam = new Camera(2); |
---|
1302 | | - cams.addChild(cam); |
---|
1303 | | - cam = new Camera(3); |
---|
1304 | | - cams.addChild(cam); |
---|
1305 | | - cam = new Camera(4); // Light |
---|
1306 | | - cams.addChild(cam); |
---|
| 1571 | + if (Globals.DEBUG) |
---|
| 1572 | + System.out.println("CREATE CAMERAS"); |
---|
| 1573 | + cams = CreateCameras(); |
---|
1307 | 1574 | } else |
---|
1308 | 1575 | { |
---|
1309 | 1576 | cams = (cGroup) copy.get(0); |
---|
.. | .. |
---|
1369 | 1636 | //frontView.object = copy; |
---|
1370 | 1637 | //sideView.object = copy; |
---|
1371 | 1638 | |
---|
| 1639 | + transformPanel = new cGridBag().setVertical(true); |
---|
| 1640 | + |
---|
| 1641 | + cGridBag resetTransformPanel = new cGridBag(); |
---|
| 1642 | + |
---|
| 1643 | + resetTransformPanel.preferredHeight = 2; |
---|
| 1644 | + |
---|
| 1645 | + cButton resetTransform = GetButton("Reset all", !Globals.NIMBUSLAF); |
---|
| 1646 | + resetTransform.setToolTipText("Reset Translation, Rotation and Scale"); |
---|
| 1647 | + resetTransform.addMouseListener(new MouseAdapter() |
---|
| 1648 | + { |
---|
| 1649 | + public void mouseClicked(MouseEvent e) |
---|
| 1650 | + { |
---|
| 1651 | + ResetTransform(); |
---|
| 1652 | + } |
---|
| 1653 | + }); |
---|
| 1654 | + resetTransformPanel.add(resetTransform); |
---|
| 1655 | + |
---|
| 1656 | + resetTransform = GetButton("T only", !Globals.NIMBUSLAF); |
---|
| 1657 | + resetTransform.setToolTipText("Reset Translation only"); |
---|
| 1658 | + resetTransform.addMouseListener(new MouseAdapter() |
---|
| 1659 | + { |
---|
| 1660 | + public void mouseClicked(MouseEvent e) |
---|
| 1661 | + { |
---|
| 1662 | + ResetTransform(1); |
---|
| 1663 | + } |
---|
| 1664 | + }); |
---|
| 1665 | + resetTransformPanel.add(resetTransform); |
---|
| 1666 | + |
---|
| 1667 | + resetTransform = GetButton("RS only", !Globals.NIMBUSLAF); |
---|
| 1668 | + resetTransform.setToolTipText("Reset Rotation and Scale only"); |
---|
| 1669 | + resetTransform.addMouseListener(new MouseAdapter() |
---|
| 1670 | + { |
---|
| 1671 | + public void mouseClicked(MouseEvent e) |
---|
| 1672 | + { |
---|
| 1673 | + ResetTransform(2); |
---|
| 1674 | + } |
---|
| 1675 | + }); |
---|
| 1676 | + resetTransformPanel.add(resetTransform); |
---|
| 1677 | + |
---|
1372 | 1678 | XYZPanel = new cGridBag().setVertical(true); |
---|
1373 | 1679 | //XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
---|
1374 | 1680 | |
---|
.. | .. |
---|
1376 | 1682 | XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
---|
1377 | 1683 | XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll); |
---|
1378 | 1684 | XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll); |
---|
| 1685 | + //XYZPanel.setName("XYZ"); |
---|
1379 | 1686 | |
---|
| 1687 | + transformPanel.add(resetTransformPanel); |
---|
| 1688 | + transformPanel.add(XYZPanel); |
---|
| 1689 | + |
---|
1380 | 1690 | /* |
---|
1381 | 1691 | gridPanel = new JPanel(); //new BorderLayout()); |
---|
1382 | 1692 | gridPanel.setLayout(new GridLayout(1, 2)); |
---|
.. | .. |
---|
1384 | 1694 | gridPanel.add(cameraView); |
---|
1385 | 1695 | gridPanel.add(XYZPanel); |
---|
1386 | 1696 | */ |
---|
1387 | | - gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, centralPanel, XYZPanel); //new BorderLayout()); |
---|
1388 | | - gridPanel.setContinuousLayout(true); |
---|
1389 | | - gridPanel.setOneTouchExpandable(true); |
---|
1390 | | - gridPanel.setDividerLocation(1.0); |
---|
1391 | | - gridPanel.setDividerSize(9); |
---|
1392 | | - gridPanel.setResizeWeight(0.85); |
---|
| 1697 | +// gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, centralPanel, XYZPanel); //new BorderLayout()); |
---|
| 1698 | +// gridPanel.setContinuousLayout(true); |
---|
| 1699 | +// gridPanel.setOneTouchExpandable(true); |
---|
| 1700 | +// gridPanel.setDividerLocation(1.0); |
---|
| 1701 | +// gridPanel.setDividerSize(9); |
---|
| 1702 | +// gridPanel.setResizeWeight(0.85); |
---|
1393 | 1703 | |
---|
1394 | 1704 | // aConstraints.weighty = 0; |
---|
1395 | 1705 | //System.out.println("THIS = " + this); |
---|
.. | .. |
---|
1412 | 1722 | |
---|
1413 | 1723 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
---|
1414 | 1724 | //tmp.setName("Edit"); |
---|
| 1725 | + objectPanel.add(skyboxPanel); |
---|
| 1726 | + objectPanel.setIconAt(0, GetIcon("icons/skybox.jpg")); |
---|
| 1727 | + objectPanel.setToolTipTextAt(0, "Backgrounds"); |
---|
| 1728 | + |
---|
1415 | 1729 | objectPanel.add(toolboxPanel); |
---|
| 1730 | + objectPanel.setIconAt(1, GetIcon("icons/primitives.png")); |
---|
| 1731 | + objectPanel.setToolTipTextAt(1, "Objects & textures"); |
---|
| 1732 | + |
---|
1416 | 1733 | objectPanel.add(materialPanel); |
---|
| 1734 | + objectPanel.setIconAt(2, GetIcon("icons/material.png")); |
---|
| 1735 | + objectPanel.setToolTipTextAt(2, "Material"); |
---|
| 1736 | + |
---|
1417 | 1737 | // JPanel north = new JPanel(new BorderLayout()); |
---|
1418 | 1738 | // north.setName("Edit"); |
---|
1419 | 1739 | // north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1420 | 1740 | // objectPanel.add(north); |
---|
1421 | 1741 | objectPanel.add(editPanel); |
---|
1422 | | - objectPanel.add(infoPanel); |
---|
1423 | | - |
---|
| 1742 | + objectPanel.setIconAt(3, GetIcon("icons/writewhite.png")); |
---|
| 1743 | + objectPanel.setToolTipTextAt(3, "Edit controls"); |
---|
| 1744 | + |
---|
| 1745 | + objectPanel.add(transformPanel); |
---|
| 1746 | + objectPanel.setIconAt(4, GetIcon("icons/XYZ.png")); |
---|
| 1747 | + objectPanel.setToolTipTextAt(4, "TRS transform"); |
---|
| 1748 | + |
---|
| 1749 | + patchMaterial = true; |
---|
| 1750 | + cameraView.patchMaterial = this; |
---|
| 1751 | + objectPanel.setSelectedIndex(2); |
---|
| 1752 | + |
---|
1424 | 1753 | /* |
---|
1425 | 1754 | aConstraints.gridx = 0; |
---|
1426 | 1755 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1428 | 1757 | aConstraints.gridy += 1; |
---|
1429 | 1758 | aConstraints.gridwidth = 1; |
---|
1430 | 1759 | mainPanel.add(objectPanel, aConstraints); |
---|
1431 | | - */ |
---|
| 1760 | + */ |
---|
1432 | 1761 | |
---|
1433 | 1762 | scrollpane = new JScrollPane(mainPanel, ScrollPaneConstants.// VERTICAL_SCROLLBAR_ALWAYS, |
---|
1434 | 1763 | VERTICAL_SCROLLBAR_AS_NEEDED, |
---|
.. | .. |
---|
1445 | 1774 | JTabbedPane tabbedPane = new JTabbedPane(); |
---|
1446 | 1775 | tabbedPane.add(scrollpane); |
---|
1447 | 1776 | |
---|
1448 | | - tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
1449 | | - |
---|
1450 | | - optionsPanel = new cGridBag().setVertical(true); |
---|
| 1777 | + optionsPanel = new cGridBag().setVertical(false); |
---|
1451 | 1778 | |
---|
1452 | 1779 | optionsPanel.setName("Options"); |
---|
1453 | 1780 | |
---|
1454 | 1781 | AddOptions(optionsPanel); //, aConstraints); |
---|
1455 | 1782 | |
---|
| 1783 | + tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
| 1784 | + |
---|
1456 | 1785 | tabbedPane.add(optionsPanel); |
---|
1457 | 1786 | |
---|
1458 | 1787 | scenePanel.add(tabbedPane); |
---|
| 1788 | + |
---|
| 1789 | + cGridBag creditsPanel = new cGridBag().setVertical(true); |
---|
| 1790 | + creditsPanel.setName("Credits"); |
---|
| 1791 | + |
---|
| 1792 | + cLabel ogaLabel = new cLabel(" Skyboxes courtesy of OpenGameArt!", !Globals.NIMBUSLAF); |
---|
| 1793 | + creditsPanel.add(ogaLabel); |
---|
| 1794 | + |
---|
| 1795 | + cButton creditButton; |
---|
| 1796 | + creditsPanel.add(creditButton = GetButton("icons/sara-logo.png", !Globals.NIMBUSLAF)); |
---|
| 1797 | + creditButton.setToolTipText("https://opengameart.org"); |
---|
| 1798 | + |
---|
| 1799 | + creditButton.addMouseListener(new MouseAdapter() |
---|
| 1800 | + { |
---|
| 1801 | + public void mouseClicked(MouseEvent e) |
---|
| 1802 | + { |
---|
| 1803 | + try |
---|
| 1804 | + { |
---|
| 1805 | + Desktop.getDesktop().browse(new java.net.URI("https://opengameart.org/")); |
---|
| 1806 | + } catch (Exception e1) |
---|
| 1807 | +// } catch (java.io.IOException | java.net.URISyntaxException e1) |
---|
| 1808 | + { |
---|
| 1809 | + e1.printStackTrace(); |
---|
| 1810 | + } |
---|
| 1811 | + } |
---|
| 1812 | + }); |
---|
| 1813 | + |
---|
| 1814 | + ogaLabel = new cLabel(" Download 3D models! (.3ds and .obj only)", !Globals.NIMBUSLAF); |
---|
| 1815 | + creditsPanel.add(ogaLabel); |
---|
| 1816 | + |
---|
| 1817 | + creditsPanel.add(creditButton = GetButton("icons/3delicious.png", !Globals.NIMBUSLAF)); |
---|
| 1818 | + creditButton.setToolTipText("https://3delicious.net"); |
---|
| 1819 | + |
---|
| 1820 | + creditButton.addMouseListener(new MouseAdapter() |
---|
| 1821 | + { |
---|
| 1822 | + public void mouseClicked(MouseEvent e) |
---|
| 1823 | + { |
---|
| 1824 | + try |
---|
| 1825 | + { |
---|
| 1826 | + Desktop.getDesktop().browse(new java.net.URI("https://3delicious.net")); |
---|
| 1827 | + } catch (Exception e1) |
---|
| 1828 | +// } catch (java.io.IOException | java.net.URISyntaxException e1) |
---|
| 1829 | + { |
---|
| 1830 | + e1.printStackTrace(); |
---|
| 1831 | + } |
---|
| 1832 | + } |
---|
| 1833 | + }); |
---|
| 1834 | + |
---|
| 1835 | + creditsPanel.add(creditButton = GetButton("icons/archive3d.png", !Globals.NIMBUSLAF)); |
---|
| 1836 | + creditButton.setToolTipText("https://archive3d.net"); |
---|
| 1837 | + |
---|
| 1838 | + creditButton.addMouseListener(new MouseAdapter() |
---|
| 1839 | + { |
---|
| 1840 | + public void mouseClicked(MouseEvent e) |
---|
| 1841 | + { |
---|
| 1842 | + try |
---|
| 1843 | + { |
---|
| 1844 | + Desktop.getDesktop().browse(new java.net.URI("https://archive3d.net")); |
---|
| 1845 | + } catch (Exception e1) |
---|
| 1846 | +// } catch (java.io.IOException | java.net.URISyntaxException e1) |
---|
| 1847 | + { |
---|
| 1848 | + e1.printStackTrace(); |
---|
| 1849 | + } |
---|
| 1850 | + } |
---|
| 1851 | + }); |
---|
| 1852 | + |
---|
| 1853 | + creditsPanel.add(creditButton = GetButton("icons/turbosquid.png", !Globals.NIMBUSLAF)); |
---|
| 1854 | + creditButton.setToolTipText("https://turbosquid.com"); |
---|
| 1855 | + |
---|
| 1856 | + creditButton.addMouseListener(new MouseAdapter() |
---|
| 1857 | + { |
---|
| 1858 | + public void mouseClicked(MouseEvent e) |
---|
| 1859 | + { |
---|
| 1860 | + try |
---|
| 1861 | + { |
---|
| 1862 | + Desktop.getDesktop().browse(new java.net.URI("https://www.turbosquid.com/Search/3D-Models/free")); |
---|
| 1863 | + } catch (Exception e1) |
---|
| 1864 | +// } catch (java.io.IOException | java.net.URISyntaxException e1) |
---|
| 1865 | + { |
---|
| 1866 | + e1.printStackTrace(); |
---|
| 1867 | + } |
---|
| 1868 | + } |
---|
| 1869 | + }); |
---|
| 1870 | + |
---|
| 1871 | + for (int i=6; --i>=0;) |
---|
| 1872 | + { |
---|
| 1873 | + creditsPanel.add(new cGridBag()); |
---|
| 1874 | + } |
---|
| 1875 | + |
---|
| 1876 | + tabbedPane.add(creditsPanel); |
---|
| 1877 | + tabbedPane.setToolTipTextAt(3, "Credits"); |
---|
| 1878 | + |
---|
| 1879 | + if (Globals.ADVANCED) |
---|
| 1880 | + { |
---|
| 1881 | + tabbedPane.add(infoPanel); |
---|
| 1882 | + tabbedPane.setIconAt(4, GetIcon("icons/info.png")); |
---|
| 1883 | + tabbedPane.setToolTipTextAt(4, "Information"); |
---|
| 1884 | + } |
---|
1459 | 1885 | |
---|
1460 | 1886 | /* |
---|
1461 | 1887 | cTree jTree = new cTree(null); |
---|
.. | .. |
---|
1477 | 1903 | jtp.add(tree); |
---|
1478 | 1904 | */ |
---|
1479 | 1905 | |
---|
1480 | | - bigPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, scenePanel, gridPanel); |
---|
1481 | | - bigPanel.setContinuousLayout(true); |
---|
1482 | | - bigPanel.setOneTouchExpandable(true); |
---|
1483 | | - bigPanel.setDividerLocation(0.8); |
---|
1484 | | - bigPanel.setDividerSize(15); |
---|
1485 | | - bigPanel.setResizeWeight(0.15); |
---|
1486 | | - bigPanel.setName("Scene"); |
---|
| 1906 | +// bigPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, scenePanel, gridPanel); |
---|
| 1907 | +// bigPanel.setContinuousLayout(true); |
---|
| 1908 | +// bigPanel.setOneTouchExpandable(true); |
---|
| 1909 | +// bigPanel.setDividerLocation(0.8); |
---|
| 1910 | +// bigPanel.setDividerSize(15); |
---|
| 1911 | +// bigPanel.setResizeWeight(0.15); |
---|
| 1912 | +// bigPanel.setName("Scene"); |
---|
1487 | 1913 | |
---|
1488 | 1914 | //bigPanel.setLayout(new BorderLayout()); |
---|
1489 | 1915 | //bigPanel.setSize(new Dimension(10,10)); |
---|
.. | .. |
---|
1518 | 1944 | bigThree = new cGridBag(); |
---|
1519 | 1945 | bigThree.addComponent(scenePanel); |
---|
1520 | 1946 | bigThree.addComponent(centralPanel); |
---|
1521 | | - bigThree.addComponent(XYZPanel); |
---|
| 1947 | + //bigThree.addComponent(XYZPanel); |
---|
1522 | 1948 | |
---|
1523 | 1949 | // // SIDE EFFECT!!! |
---|
1524 | 1950 | // aConstraints.gridx = 0; |
---|
.. | .. |
---|
1527 | 1953 | // aConstraints.gridheight = 1; |
---|
1528 | 1954 | |
---|
1529 | 1955 | framePanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, toolbarPanel, bigThree); |
---|
1530 | | - framePanel.setContinuousLayout(true); |
---|
1531 | | - framePanel.setOneTouchExpandable(true); |
---|
1532 | | - framePanel.setDividerLocation(0.8); |
---|
| 1956 | + |
---|
| 1957 | + framePanel.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, |
---|
| 1958 | + new java.beans.PropertyChangeListener() |
---|
| 1959 | + { |
---|
| 1960 | + public void propertyChange(java.beans.PropertyChangeEvent pce) |
---|
| 1961 | + { |
---|
| 1962 | + if ((Integer)pce.getOldValue() == 1) |
---|
| 1963 | + { |
---|
| 1964 | + if (radio.layout != expandedLayout) |
---|
| 1965 | + { |
---|
| 1966 | + radio.layout = expandedLayout; |
---|
| 1967 | + radio.layout.doClick(); |
---|
| 1968 | + } |
---|
| 1969 | + } |
---|
| 1970 | + } |
---|
| 1971 | + }); |
---|
| 1972 | + |
---|
| 1973 | + framePanel.setContinuousLayout(false); |
---|
| 1974 | + framePanel.setOneTouchExpandable(false); |
---|
| 1975 | + //.setDividerLocation(0.8); |
---|
1533 | 1976 | //framePanel.setDividerSize(15); |
---|
1534 | 1977 | //framePanel.setResizeWeight(0.15); |
---|
1535 | 1978 | framePanel.setName("Frame"); |
---|
1536 | 1979 | |
---|
1537 | 1980 | frame.getContentPane().setLayout(new BorderLayout()); |
---|
1538 | 1981 | /**/ |
---|
1539 | | - JTabbedPane worldPane = new JTabbedPane(); |
---|
| 1982 | + //JTabbedPane worldPane = new JTabbedPane(); |
---|
1540 | 1983 | //worldPane.add(bigPanel); |
---|
1541 | 1984 | //worldPane.add(worldPanel); |
---|
1542 | 1985 | /**/ |
---|
.. | .. |
---|
1547 | 1990 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
1548 | 1991 | |
---|
1549 | 1992 | frame.setSize(1280, 860); |
---|
1550 | | - frame.setVisible(true); |
---|
1551 | | - |
---|
| 1993 | + |
---|
1552 | 1994 | cameraView.requestFocusInWindow(); |
---|
1553 | 1995 | |
---|
1554 | | - gridPanel.setDividerLocation(1.0); |
---|
| 1996 | +// gridPanel.setDividerLocation(1.0); |
---|
| 1997 | + |
---|
| 1998 | + frame.validate(); |
---|
| 1999 | + |
---|
| 2000 | + frame.setVisible(true); |
---|
1555 | 2001 | |
---|
1556 | 2002 | frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); |
---|
1557 | 2003 | frame.addWindowListener(new WindowAdapter() |
---|
1558 | 2004 | { |
---|
1559 | | - |
---|
1560 | 2005 | public void windowClosing(WindowEvent e) |
---|
1561 | 2006 | { |
---|
1562 | 2007 | Close(); |
---|
.. | .. |
---|
1579 | 2024 | ctrlPanel.removeAll(); |
---|
1580 | 2025 | } |
---|
1581 | 2026 | |
---|
1582 | | - void SetupMaterial(cGridBag panel) |
---|
| 2027 | + void SetupMaterial(cGridBag materialpanel) |
---|
1583 | 2028 | { |
---|
1584 | | - /* |
---|
| 2029 | + cGridBag presetpanel = new cGridBag().setVertical(true); |
---|
| 2030 | + |
---|
| 2031 | + cLabel skin = GetLabel("icons/shadericons/shadericon00000.png", !Globals.NIMBUSLAF); |
---|
| 2032 | + skin.setToolTipText("Skin"); |
---|
| 2033 | + skin.addMouseListener(new MouseAdapter() |
---|
| 2034 | + { |
---|
| 2035 | + public void mouseClicked(MouseEvent e) |
---|
| 2036 | + { |
---|
| 2037 | + Object3D object = Grafreed.materials.versionlist[0].get(0); |
---|
| 2038 | + cMaterial material = object.material; |
---|
| 2039 | + |
---|
| 2040 | + // Skin |
---|
| 2041 | + colorField.setFloat(material.color); |
---|
| 2042 | + float saturation = material.modulation; |
---|
| 2043 | + |
---|
| 2044 | + if (!cameraView.Skinshader) |
---|
| 2045 | + { |
---|
| 2046 | + saturation /= 1.5; |
---|
| 2047 | + } |
---|
| 2048 | + |
---|
| 2049 | + saturationField.setFloat(saturation); |
---|
| 2050 | + |
---|
| 2051 | + subsurfaceField.setFloat(material.subsurface); |
---|
| 2052 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 2053 | + diffusenessField.setFloat(material.factor); |
---|
| 2054 | + shininessField.setFloat(material.shininess); |
---|
| 2055 | + shadowbiasField.setFloat(material.shadowbias); |
---|
| 2056 | + diffuseField.setFloat(material.diffuse); |
---|
| 2057 | + specularField.setFloat(material.specular); |
---|
| 2058 | + |
---|
| 2059 | + bumpField.setFloat(object.projectedVertices[0].x / 1000.0); |
---|
| 2060 | + noiseField.setFloat(object.projectedVertices[0].y / 1000.0); |
---|
| 2061 | + powerField.setFloat(object.projectedVertices[2].x / 1000.0); |
---|
| 2062 | + |
---|
| 2063 | + materialtouched = true; |
---|
| 2064 | + applySelf(); |
---|
| 2065 | + } |
---|
| 2066 | + }); |
---|
| 2067 | + presetpanel.add(skin); |
---|
| 2068 | + |
---|
| 2069 | + cLabel lambert = GetLabel("icons/shadericons/shadericon00002.png", !Globals.NIMBUSLAF); |
---|
| 2070 | + lambert.setToolTipText("Diffuse"); |
---|
| 2071 | + lambert.addMouseListener(new MouseAdapter() |
---|
| 2072 | + { |
---|
| 2073 | + public void mouseClicked(MouseEvent e) |
---|
| 2074 | + { |
---|
| 2075 | + Object3D object = Grafreed.materials.versionlist[2].get(0); |
---|
| 2076 | + cMaterial material = object.material; |
---|
| 2077 | + |
---|
| 2078 | + diffusenessField.setFloat(material.factor); |
---|
| 2079 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 2080 | + |
---|
| 2081 | + materialtouched = true; |
---|
| 2082 | + applySelf(); |
---|
| 2083 | + } |
---|
| 2084 | + }); |
---|
| 2085 | + presetpanel.add(lambert); |
---|
| 2086 | + |
---|
| 2087 | + cLabel diffuse2 = GetLabel("icons/shadericons/shadericon00003.png", !Globals.NIMBUSLAF); |
---|
| 2088 | + diffuse2.setToolTipText("Diffuse2"); |
---|
| 2089 | + diffuse2.addMouseListener(new MouseAdapter() |
---|
| 2090 | + { |
---|
| 2091 | + public void mouseClicked(MouseEvent e) |
---|
| 2092 | + { |
---|
| 2093 | + Object3D object = Grafreed.materials.versionlist[3].get(0); |
---|
| 2094 | + cMaterial material = object.material; |
---|
| 2095 | + |
---|
| 2096 | + diffusenessField.setFloat(material.factor); |
---|
| 2097 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 2098 | + |
---|
| 2099 | + materialtouched = true; |
---|
| 2100 | + applySelf(); |
---|
| 2101 | + } |
---|
| 2102 | + }); |
---|
| 2103 | + presetpanel.add(diffuse2); |
---|
| 2104 | + |
---|
| 2105 | + cLabel diffusemoon = GetLabel("icons/shadericons/shadericon00004.png", !Globals.NIMBUSLAF); |
---|
| 2106 | + diffusemoon.setToolTipText("Moon"); |
---|
| 2107 | + diffusemoon.addMouseListener(new MouseAdapter() |
---|
| 2108 | + { |
---|
| 2109 | + public void mouseClicked(MouseEvent e) |
---|
| 2110 | + { |
---|
| 2111 | + Object3D object = Grafreed.materials.versionlist[4].get(0); |
---|
| 2112 | + cMaterial material = object.material; |
---|
| 2113 | + |
---|
| 2114 | + diffusenessField.setFloat(material.factor); |
---|
| 2115 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 2116 | + |
---|
| 2117 | + materialtouched = true; |
---|
| 2118 | + applySelf(); |
---|
| 2119 | + } |
---|
| 2120 | + }); |
---|
| 2121 | + presetpanel.add(diffusemoon); |
---|
| 2122 | + |
---|
| 2123 | + cLabel diffusemoon2 = GetLabel("icons/shadericons/shadericon00005.png", !Globals.NIMBUSLAF); |
---|
| 2124 | + diffusemoon2.setToolTipText("Moon2"); |
---|
| 2125 | + diffusemoon2.addMouseListener(new MouseAdapter() |
---|
| 2126 | + { |
---|
| 2127 | + public void mouseClicked(MouseEvent e) |
---|
| 2128 | + { |
---|
| 2129 | + Object3D object = Grafreed.materials.versionlist[5].get(0); |
---|
| 2130 | + cMaterial material = object.material; |
---|
| 2131 | + |
---|
| 2132 | + diffusenessField.setFloat(material.factor); |
---|
| 2133 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 2134 | + |
---|
| 2135 | + materialtouched = true; |
---|
| 2136 | + applySelf(); |
---|
| 2137 | + } |
---|
| 2138 | + }); |
---|
| 2139 | + presetpanel.add(diffusemoon2); |
---|
| 2140 | + |
---|
| 2141 | + cLabel diffusemoon3 = GetLabel("icons/shadericons/shadericon00006.png", !Globals.NIMBUSLAF); |
---|
| 2142 | + diffusemoon3.setToolTipText("Moon3"); |
---|
| 2143 | + diffusemoon3.addMouseListener(new MouseAdapter() |
---|
| 2144 | + { |
---|
| 2145 | + public void mouseClicked(MouseEvent e) |
---|
| 2146 | + { |
---|
| 2147 | + Object3D object = Grafreed.materials.versionlist[6].get(0); |
---|
| 2148 | + cMaterial material = object.material; |
---|
| 2149 | + |
---|
| 2150 | + diffusenessField.setFloat(material.factor); |
---|
| 2151 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 2152 | + |
---|
| 2153 | + materialtouched = true; |
---|
| 2154 | + applySelf(); |
---|
| 2155 | + } |
---|
| 2156 | + }); |
---|
| 2157 | + presetpanel.add(diffusemoon3); |
---|
| 2158 | + |
---|
| 2159 | + cLabel diffusesheen = GetLabel("icons/shadericons/shadericon00007.png", !Globals.NIMBUSLAF); |
---|
| 2160 | + diffusesheen.setToolTipText("Sheen"); |
---|
| 2161 | + diffusesheen.addMouseListener(new MouseAdapter() |
---|
| 2162 | + { |
---|
| 2163 | + public void mouseClicked(MouseEvent e) |
---|
| 2164 | + { |
---|
| 2165 | + Object3D object = Grafreed.materials.versionlist[7].get(0); |
---|
| 2166 | + cMaterial material = object.material; |
---|
| 2167 | + |
---|
| 2168 | + sheenField.setFloat(material.sheen); |
---|
| 2169 | + |
---|
| 2170 | + materialtouched = true; |
---|
| 2171 | + applySelf(); |
---|
| 2172 | + } |
---|
| 2173 | + }); |
---|
| 2174 | + presetpanel.add(diffusesheen); |
---|
| 2175 | + |
---|
| 2176 | + cLabel rough = GetLabel("icons/shadericons/shadericon00001.png", !Globals.NIMBUSLAF); |
---|
| 2177 | + rough.setToolTipText("Rough metal"); |
---|
| 2178 | + rough.addMouseListener(new MouseAdapter() |
---|
| 2179 | + { |
---|
| 2180 | + public void mouseClicked(MouseEvent e) |
---|
| 2181 | + { |
---|
| 2182 | + Object3D object = Grafreed.materials.versionlist[1].get(0); |
---|
| 2183 | + cMaterial material = object.material; |
---|
| 2184 | + |
---|
| 2185 | + shininessField.setFloat(material.shininess); |
---|
| 2186 | + velvetField.setFloat(material.velvet); |
---|
| 2187 | + |
---|
| 2188 | + materialtouched = true; |
---|
| 2189 | + applySelf(); |
---|
| 2190 | + } |
---|
| 2191 | + }); |
---|
| 2192 | + presetpanel.add(rough); |
---|
| 2193 | + |
---|
| 2194 | + cLabel rough2 = GetLabel("icons/shadericons/shadericon00013.png", !Globals.NIMBUSLAF); |
---|
| 2195 | + rough2.setToolTipText("Medium metal"); |
---|
| 2196 | + rough2.addMouseListener(new MouseAdapter() |
---|
| 2197 | + { |
---|
| 2198 | + public void mouseClicked(MouseEvent e) |
---|
| 2199 | + { |
---|
| 2200 | + Object3D object = Grafreed.materials.versionlist[13].get(0); |
---|
| 2201 | + cMaterial material = object.material; |
---|
| 2202 | + |
---|
| 2203 | + shininessField.setFloat(material.shininess); |
---|
| 2204 | + lightareaField.setFloat(material.lightarea); |
---|
| 2205 | + |
---|
| 2206 | + materialtouched = true; |
---|
| 2207 | + applySelf(); |
---|
| 2208 | + } |
---|
| 2209 | + }); |
---|
| 2210 | + presetpanel.add(rough2); |
---|
| 2211 | + |
---|
| 2212 | + cLabel shini0 = GetLabel("icons/shadericons/shadericon00014.png", !Globals.NIMBUSLAF); |
---|
| 2213 | + shini0.setToolTipText("Shiny"); |
---|
| 2214 | + shini0.addMouseListener(new MouseAdapter() |
---|
| 2215 | + { |
---|
| 2216 | + public void mouseClicked(MouseEvent e) |
---|
| 2217 | + { |
---|
| 2218 | + Object3D object = Grafreed.materials.versionlist[14].get(0); |
---|
| 2219 | + cMaterial material = object.material; |
---|
| 2220 | + |
---|
| 2221 | + shininessField.setFloat(material.shininess); |
---|
| 2222 | + lightareaField.setFloat(material.lightarea); |
---|
| 2223 | + |
---|
| 2224 | + materialtouched = true; |
---|
| 2225 | + applySelf(); |
---|
| 2226 | + } |
---|
| 2227 | + }); |
---|
| 2228 | + presetpanel.add(shini0); |
---|
| 2229 | + |
---|
| 2230 | + cLabel shini1 = GetLabel("icons/shadericons/shadericon00011.png", !Globals.NIMBUSLAF); |
---|
| 2231 | + shini1.setToolTipText("Shiny2"); |
---|
| 2232 | + shini1.addMouseListener(new MouseAdapter() |
---|
| 2233 | + { |
---|
| 2234 | + public void mouseClicked(MouseEvent e) |
---|
| 2235 | + { |
---|
| 2236 | + Object3D object = Grafreed.materials.versionlist[11].get(0); |
---|
| 2237 | + cMaterial material = object.material; |
---|
| 2238 | + |
---|
| 2239 | + shininessField.setFloat(material.shininess); |
---|
| 2240 | + lightareaField.setFloat(material.lightarea); |
---|
| 2241 | + |
---|
| 2242 | + materialtouched = true; |
---|
| 2243 | + applySelf(); |
---|
| 2244 | + } |
---|
| 2245 | + }); |
---|
| 2246 | + presetpanel.add(shini1); |
---|
| 2247 | + |
---|
| 2248 | + cLabel shini2 = GetLabel("icons/shadericons/shadericon00012.png", !Globals.NIMBUSLAF); |
---|
| 2249 | + shini2.setToolTipText("Shiny3"); |
---|
| 2250 | + shini2.addMouseListener(new MouseAdapter() |
---|
| 2251 | + { |
---|
| 2252 | + public void mouseClicked(MouseEvent e) |
---|
| 2253 | + { |
---|
| 2254 | + Object3D object = Grafreed.materials.versionlist[12].get(0); |
---|
| 2255 | + cMaterial material = object.material; |
---|
| 2256 | + |
---|
| 2257 | + shininessField.setFloat(material.shininess); |
---|
| 2258 | + lightareaField.setFloat(material.lightarea); |
---|
| 2259 | + |
---|
| 2260 | + materialtouched = true; |
---|
| 2261 | + applySelf(); |
---|
| 2262 | + } |
---|
| 2263 | + }); |
---|
| 2264 | + presetpanel.add(shini2); |
---|
| 2265 | + |
---|
| 2266 | + cLabel aniso = GetLabel("icons/shadericons/shadericon00008.png", !Globals.NIMBUSLAF); |
---|
| 2267 | + aniso.setToolTipText("AnisoU"); |
---|
| 2268 | + aniso.addMouseListener(new MouseAdapter() |
---|
| 2269 | + { |
---|
| 2270 | + public void mouseClicked(MouseEvent e) |
---|
| 2271 | + { |
---|
| 2272 | + Object3D object = Grafreed.materials.versionlist[8].get(0); |
---|
| 2273 | + cMaterial material = object.material; |
---|
| 2274 | + |
---|
| 2275 | + anisoField.setFloat(material.aniso); |
---|
| 2276 | + anisoVField.setFloat(material.anisoV); |
---|
| 2277 | + |
---|
| 2278 | + materialtouched = true; |
---|
| 2279 | + applySelf(); |
---|
| 2280 | + } |
---|
| 2281 | + }); |
---|
| 2282 | + presetpanel.add(aniso); |
---|
| 2283 | + |
---|
| 2284 | + cLabel aniso2 = GetLabel("icons/shadericons/shadericon00009.png", !Globals.NIMBUSLAF); |
---|
| 2285 | + aniso2.setToolTipText("AnisoV"); |
---|
| 2286 | + aniso2.addMouseListener(new MouseAdapter() |
---|
| 2287 | + { |
---|
| 2288 | + public void mouseClicked(MouseEvent e) |
---|
| 2289 | + { |
---|
| 2290 | + Object3D object = Grafreed.materials.versionlist[9].get(0); |
---|
| 2291 | + cMaterial material = object.material; |
---|
| 2292 | + |
---|
| 2293 | + anisoField.setFloat(material.aniso); |
---|
| 2294 | + anisoVField.setFloat(material.anisoV); |
---|
| 2295 | + |
---|
| 2296 | + materialtouched = true; |
---|
| 2297 | + applySelf(); |
---|
| 2298 | + } |
---|
| 2299 | + }); |
---|
| 2300 | + presetpanel.add(aniso2); |
---|
| 2301 | + |
---|
| 2302 | + cLabel aniso3 = GetLabel("icons/shadericons/shadericon00010.png", !Globals.NIMBUSLAF); |
---|
| 2303 | + aniso3.setToolTipText("AnisoUV"); |
---|
| 2304 | + aniso3.addMouseListener(new MouseAdapter() |
---|
| 2305 | + { |
---|
| 2306 | + public void mouseClicked(MouseEvent e) |
---|
| 2307 | + { |
---|
| 2308 | + Object3D object = Grafreed.materials.versionlist[10].get(0); |
---|
| 2309 | + cMaterial material = object.material; |
---|
| 2310 | + |
---|
| 2311 | + anisoField.setFloat(material.aniso); |
---|
| 2312 | + anisoVField.setFloat(material.anisoV); |
---|
| 2313 | + |
---|
| 2314 | + materialtouched = true; |
---|
| 2315 | + applySelf(); |
---|
| 2316 | + } |
---|
| 2317 | + }); |
---|
| 2318 | + presetpanel.add(aniso3); |
---|
| 2319 | + |
---|
| 2320 | + cLabel velvet0 = GetLabel("icons/shadericons/shadericon00015.png", !Globals.NIMBUSLAF); |
---|
| 2321 | + velvet0.setToolTipText("Velvet"); |
---|
| 2322 | + velvet0.addMouseListener(new MouseAdapter() |
---|
| 2323 | + { |
---|
| 2324 | + public void mouseClicked(MouseEvent e) |
---|
| 2325 | + { |
---|
| 2326 | + Object3D object = Grafreed.materials.versionlist[15].get(0); |
---|
| 2327 | + cMaterial material = object.material; |
---|
| 2328 | + |
---|
| 2329 | + diffusenessField.setFloat(material.factor); |
---|
| 2330 | + selfshadowField.setFloat(material.diffuseness); |
---|
| 2331 | + sheenField.setFloat(material.sheen); |
---|
| 2332 | + shininessField.setFloat(material.shininess); |
---|
| 2333 | + velvetField.setFloat(material.velvet); |
---|
| 2334 | + shiftField.setFloat(material.shift); |
---|
| 2335 | + |
---|
| 2336 | + materialtouched = true; |
---|
| 2337 | + applySelf(); |
---|
| 2338 | + } |
---|
| 2339 | + }); |
---|
| 2340 | + presetpanel.add(velvet0); |
---|
| 2341 | + |
---|
| 2342 | + cLabel bump0 = GetLabel("icons/shadericons/shadericon00016.png", !Globals.NIMBUSLAF); |
---|
| 2343 | + bump0.setToolTipText("Bump texture"); |
---|
| 2344 | + bump0.addMouseListener(new MouseAdapter() |
---|
| 2345 | + { |
---|
| 2346 | + public void mouseClicked(MouseEvent e) |
---|
| 2347 | + { |
---|
| 2348 | + Object3D object = Grafreed.materials.versionlist[16].get(0); |
---|
| 2349 | + cMaterial material = object.material; |
---|
| 2350 | + |
---|
| 2351 | + bumpField.setFloat(object.projectedVertices[0].x / 1000.0); |
---|
| 2352 | + noiseField.setFloat(object.projectedVertices[0].y / 1000.0); |
---|
| 2353 | + powerField.setFloat(object.projectedVertices[2].x / 1000.0); |
---|
| 2354 | + |
---|
| 2355 | + materialtouched = true; |
---|
| 2356 | + applySelf(); |
---|
| 2357 | + } |
---|
| 2358 | + }); |
---|
| 2359 | + presetpanel.add(bump0); |
---|
| 2360 | + |
---|
| 2361 | + cLabel borderShader = GetLabel("icons/shadericons/borderfade.jpg", !Globals.NIMBUSLAF); |
---|
| 2362 | + borderShader.setToolTipText("Border fade"); |
---|
| 2363 | + borderShader.addMouseListener(new MouseAdapter() |
---|
| 2364 | + { |
---|
| 2365 | + public void mouseClicked(MouseEvent e) |
---|
| 2366 | + { |
---|
| 2367 | + borderfadeField.setFloat(0.5); |
---|
| 2368 | + opacityField.setFloat(0.75); |
---|
| 2369 | + |
---|
| 2370 | + materialtouched = true; |
---|
| 2371 | + applySelf(); |
---|
| 2372 | + } |
---|
| 2373 | + }); |
---|
| 2374 | + presetpanel.add(borderShader); |
---|
| 2375 | + |
---|
| 2376 | + cLabel halo = GetLabel("icons/shadericons/shadericon00017.png", !Globals.NIMBUSLAF); |
---|
| 2377 | + halo.setToolTipText("Halo"); |
---|
| 2378 | + halo.addMouseListener(new MouseAdapter() |
---|
| 2379 | + { |
---|
| 2380 | + public void mouseClicked(MouseEvent e) |
---|
| 2381 | + { |
---|
| 2382 | + Object3D object = Grafreed.materials.versionlist[17].get(0); |
---|
| 2383 | + cMaterial material = object.material; |
---|
| 2384 | + |
---|
| 2385 | + opacityPowerField.setFloat(object.projectedVertices[2].y / 1000.0); |
---|
| 2386 | + |
---|
| 2387 | + materialtouched = true; |
---|
| 2388 | + applySelf(); |
---|
| 2389 | + } |
---|
| 2390 | + }); |
---|
| 2391 | + presetpanel.add(halo); |
---|
| 2392 | + |
---|
| 2393 | + cLabel candle = GetLabel("icons/shadericons/shadericon00018.png", !Globals.NIMBUSLAF); |
---|
| 2394 | + candle.setToolTipText("Candle"); |
---|
| 2395 | + candle.addMouseListener(new MouseAdapter() |
---|
| 2396 | + { |
---|
| 2397 | + public void mouseClicked(MouseEvent e) |
---|
| 2398 | + { |
---|
| 2399 | + Object3D object = Grafreed.materials.versionlist[18].get(0); |
---|
| 2400 | + cMaterial material = object.material; |
---|
| 2401 | + |
---|
| 2402 | + subsurfaceField.setFloat(material.subsurface); |
---|
| 2403 | + shadowbiasField.setFloat(material.shadowbias); |
---|
| 2404 | + ambientField.setFloat(material.ambient); |
---|
| 2405 | + specularField.setFloat(material.specular); |
---|
| 2406 | + lightareaField.setFloat(material.lightarea); |
---|
| 2407 | + shininessField.setFloat(material.shininess); |
---|
| 2408 | + |
---|
| 2409 | + materialtouched = true; |
---|
| 2410 | + applySelf(); |
---|
| 2411 | + } |
---|
| 2412 | + }); |
---|
| 2413 | + presetpanel.add(candle); |
---|
| 2414 | + |
---|
| 2415 | + cLabel shadowShader = GetLabel("icons/shadericons/shadow.png", !Globals.NIMBUSLAF); |
---|
| 2416 | + shadowShader.setToolTipText("Shadow"); |
---|
| 2417 | + shadowShader.addMouseListener(new MouseAdapter() |
---|
| 2418 | + { |
---|
| 2419 | + public void mouseClicked(MouseEvent e) |
---|
| 2420 | + { |
---|
| 2421 | + diffuseField.setFloat(0.001); |
---|
| 2422 | + ambientField.setFloat(0.001); |
---|
| 2423 | + cameraField.setFloat(0.001); |
---|
| 2424 | + specularField.setFloat(0.001); |
---|
| 2425 | + fakedepthField.setFloat(0.001); |
---|
| 2426 | + opacityField.setFloat(0.6); |
---|
| 2427 | + |
---|
| 2428 | + materialtouched = true; |
---|
| 2429 | + applySelf(); |
---|
| 2430 | + } |
---|
| 2431 | + }); |
---|
| 2432 | + presetpanel.add(shadowShader); |
---|
| 2433 | + |
---|
| 2434 | + cGridBag panel = new cGridBag().setVertical(true); |
---|
| 2435 | + |
---|
| 2436 | + presetpanel.preferredWidth = 1; |
---|
| 2437 | + |
---|
| 2438 | + materialpanel.add(presetpanel); |
---|
| 2439 | + materialpanel.add(panel); |
---|
| 2440 | + |
---|
| 2441 | + panel.preferredWidth = 8; |
---|
| 2442 | + |
---|
| 2443 | + /* |
---|
1585 | 2444 | ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints); |
---|
1586 | 2445 | materialLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1587 | | - */ |
---|
| 2446 | + */ |
---|
1588 | 2447 | |
---|
1589 | 2448 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
1590 | 2449 | |
---|
1591 | | - editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 2450 | + editBar.add(createMaterialButton = new cButton("Create", !Globals.NIMBUSLAF)); // , aConstraints); |
---|
1592 | 2451 | createMaterialButton.setToolTipText("Create material"); |
---|
1593 | 2452 | |
---|
1594 | 2453 | /* |
---|
1595 | 2454 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
---|
1596 | 2455 | */ |
---|
1597 | 2456 | |
---|
1598 | | - editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 2457 | + editBar.add(clearMaterialButton = new cButton("Clear", !Globals.NIMBUSLAF)); // , aConstraints); |
---|
1599 | 2458 | clearMaterialButton.setToolTipText("Clear material"); |
---|
1600 | 2459 | |
---|
1601 | 2460 | if (Globals.ADVANCED) |
---|
1602 | 2461 | { |
---|
1603 | | - editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 2462 | + editBar.add(resetSlidersButton = new cButton("Reset", !Globals.NIMBUSLAF)); // , aConstraints); |
---|
1604 | 2463 | editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
1605 | 2464 | editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
1606 | 2465 | } |
---|
.. | .. |
---|
1618 | 2477 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1619 | 2478 | |
---|
1620 | 2479 | cGridBag colorSection = new cGridBag().setVertical(true); |
---|
| 2480 | + |
---|
| 2481 | + cGridBag huepanel = new cGridBag(); |
---|
| 2482 | + cGridBag huelabel = new cGridBag(); |
---|
| 2483 | + cLabel hue = GetLabel("icons/hue.png", false); |
---|
| 2484 | + hue.fit = true; |
---|
| 2485 | + |
---|
| 2486 | + hue.addMouseListener(new MouseAdapter() |
---|
| 2487 | + { |
---|
| 2488 | + public void mousePressed(MouseEvent e) |
---|
| 2489 | + { |
---|
| 2490 | + int x = e.getX(); |
---|
| 2491 | + |
---|
| 2492 | + colorField.setFloat((double)x / ((cLabel)e.getSource()).getWidth()); |
---|
| 2493 | + } |
---|
| 2494 | + }); |
---|
| 2495 | + |
---|
| 2496 | + huelabel.add(hue); |
---|
| 2497 | + huelabel.preferredWidth = 20; |
---|
| 2498 | + huepanel.add(new cGridBag()); // Label |
---|
| 2499 | + huepanel.add(huelabel); // Field/slider |
---|
| 2500 | + |
---|
| 2501 | + huepanel.preferredHeight = 7; |
---|
| 2502 | + |
---|
| 2503 | + colorSection.add(huepanel); |
---|
1621 | 2504 | |
---|
1622 | 2505 | 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); |
---|
| 2506 | + |
---|
| 2507 | + color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints); |
---|
| 2508 | + colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2509 | + color.add(colorField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
| 2510 | + |
---|
1626 | 2511 | //colorField.preferredWidth = 200; |
---|
1627 | 2512 | colorSection.add(color); |
---|
1628 | 2513 | |
---|
1629 | 2514 | cGridBag modulation = new cGridBag(); |
---|
1630 | 2515 | modulation.add(modulationLabel = new JLabel("Saturation")); // , aConstraints); |
---|
1631 | 2516 | modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1632 | | - modulation.add(modulationField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 2517 | + modulation.add(saturationField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
1633 | 2518 | colorSection.add(modulation); |
---|
1634 | 2519 | |
---|
| 2520 | + cGridBag opacity = new cGridBag(); |
---|
| 2521 | + opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints); |
---|
| 2522 | + opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2523 | + opacity.add(opacityField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); |
---|
| 2524 | + colorSection.add(opacity); |
---|
| 2525 | + |
---|
| 2526 | + colorSection.add(GetSeparator()); |
---|
| 2527 | + |
---|
1635 | 2528 | cGridBag texture = new cGridBag(); |
---|
1636 | 2529 | texture.add(textureLabel = new JLabel("Texture")); // , aConstraints); |
---|
1637 | 2530 | textureLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1638 | 2531 | texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1639 | 2532 | colorSection.add(texture); |
---|
1640 | 2533 | |
---|
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()); |
---|
| 2534 | + panel.add(GetSeparator()); |
---|
1660 | 2535 | |
---|
1661 | 2536 | panel.add(colorSection); |
---|
1662 | 2537 | |
---|
.. | .. |
---|
1706 | 2581 | fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1707 | 2582 | diffuseSection.add(fakedepth); |
---|
1708 | 2583 | |
---|
1709 | | - panel.add(new JSeparator()); |
---|
| 2584 | + cGridBag shadowbias = new cGridBag(); |
---|
| 2585 | + shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); |
---|
| 2586 | + shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2587 | + shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 2588 | + diffuseSection.add(shadowbias); |
---|
| 2589 | + |
---|
| 2590 | + panel.add(GetSeparator()); |
---|
1710 | 2591 | |
---|
1711 | 2592 | panel.add(diffuseSection); |
---|
1712 | 2593 | |
---|
.. | .. |
---|
1756 | 2637 | // aConstraints.gridy += 1; |
---|
1757 | 2638 | // aConstraints.gridwidth = 1; |
---|
1758 | 2639 | |
---|
| 2640 | + cGridBag anisoU = new cGridBag(); |
---|
| 2641 | + anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); |
---|
| 2642 | + anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2643 | + anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 2644 | + specularSection.add(anisoU); |
---|
1759 | 2645 | |
---|
1760 | | - panel.add(new JSeparator()); |
---|
| 2646 | + cGridBag anisoV = new cGridBag(); |
---|
| 2647 | + anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); |
---|
| 2648 | + anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2649 | + anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 2650 | + specularSection.add(anisoV); |
---|
| 2651 | + |
---|
| 2652 | + |
---|
| 2653 | + panel.add(GetSeparator()); |
---|
1761 | 2654 | |
---|
1762 | 2655 | panel.add(specularSection); |
---|
1763 | 2656 | |
---|
1764 | 2657 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1765 | 2658 | |
---|
1766 | | - cGridBag globalSection = new cGridBag().setVertical(true); |
---|
| 2659 | + //cGridBag globalSection = new cGridBag().setVertical(true); |
---|
1767 | 2660 | |
---|
1768 | 2661 | cGridBag camera = new cGridBag(); |
---|
1769 | 2662 | camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints); |
---|
1770 | 2663 | cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1771 | 2664 | camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1772 | | - globalSection.add(camera); |
---|
| 2665 | + colorSection.add(camera); |
---|
1773 | 2666 | |
---|
1774 | 2667 | cGridBag ambient = new cGridBag(); |
---|
1775 | 2668 | ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints); |
---|
1776 | 2669 | ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1777 | 2670 | ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1778 | | - globalSection.add(ambient); |
---|
| 2671 | + colorSection.add(ambient); |
---|
1779 | 2672 | |
---|
1780 | 2673 | cGridBag backlit = new cGridBag(); |
---|
1781 | 2674 | backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints); |
---|
1782 | 2675 | backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1783 | 2676 | backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1784 | | - globalSection.add(backlit); |
---|
| 2677 | + colorSection.add(backlit); |
---|
1785 | 2678 | |
---|
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()); |
---|
| 2679 | + //panel.add(new JSeparator()); |
---|
1793 | 2680 | |
---|
1794 | | - panel.add(globalSection); |
---|
| 2681 | + //panel.add(globalSection); |
---|
1795 | 2682 | |
---|
1796 | 2683 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1797 | 2684 | |
---|
.. | .. |
---|
1833 | 2720 | opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints); |
---|
1834 | 2721 | textureSection.add(opacityPower); |
---|
1835 | 2722 | |
---|
1836 | | - panel.add(new JSeparator()); |
---|
| 2723 | + panel.add(GetSeparator()); |
---|
1837 | 2724 | |
---|
1838 | 2725 | panel.add(textureSection); |
---|
1839 | 2726 | |
---|
.. | .. |
---|
1898 | 2785 | // 3D models |
---|
1899 | 2786 | if (filename.endsWith(".3ds") || filename.endsWith(".3DS")) |
---|
1900 | 2787 | { |
---|
1901 | | - lastConverter = new com.jmex.model.converters.MaxToJme(); |
---|
1902 | | - LoadFile(filename, lastConverter); |
---|
| 2788 | + //lastConverter = new com.jmex.model.converters.MaxToJme(); |
---|
| 2789 | + //LoadFile(filename, lastConverter); |
---|
| 2790 | + LoadObjFile(filename); // New 3ds loader |
---|
1903 | 2791 | continue; |
---|
1904 | 2792 | } |
---|
1905 | 2793 | if (filename.endsWith(".dae") || filename.endsWith(".DAE")) |
---|
.. | .. |
---|
2625 | 3513 | LA.matXRotate(((Object3D) group.get(group.size() - 1)).toParent, -Math.PI / 2); |
---|
2626 | 3514 | LA.matXRotate(((Object3D) group.get(group.size() - 1)).fromParent, Math.PI / 2); |
---|
2627 | 3515 | } |
---|
| 3516 | + |
---|
2628 | 3517 | //cJME.count++; |
---|
2629 | 3518 | //cJME.count %= 12; |
---|
2630 | 3519 | if (gc) |
---|
.. | .. |
---|
2808 | 3697 | } |
---|
2809 | 3698 | } |
---|
2810 | 3699 | } |
---|
| 3700 | + |
---|
2811 | 3701 | cFileSystemPane FSPane; |
---|
2812 | 3702 | |
---|
2813 | 3703 | void SetMaterial(cMaterial mat, Object3D.cVector2[] others) |
---|
.. | .. |
---|
2817 | 3707 | |
---|
2818 | 3708 | freezematerial = true; |
---|
2819 | 3709 | colorField.setFloat(mat.color); |
---|
2820 | | - modulationField.setFloat(mat.modulation); |
---|
| 3710 | + saturationField.setFloat(mat.modulation); |
---|
2821 | 3711 | metalnessField.setFloat(mat.metalness); |
---|
2822 | 3712 | diffuseField.setFloat(mat.diffuse); |
---|
2823 | 3713 | specularField.setFloat(mat.specular); |
---|
.. | .. |
---|
2861 | 3751 | } |
---|
2862 | 3752 | } |
---|
2863 | 3753 | } |
---|
| 3754 | + |
---|
2864 | 3755 | freezematerial = false; |
---|
2865 | 3756 | } |
---|
2866 | 3757 | |
---|
2867 | 3758 | void SetMaterial(Object3D object) |
---|
2868 | 3759 | { |
---|
| 3760 | + latestObject = object; |
---|
| 3761 | + |
---|
2869 | 3762 | cMaterial mat = object.material; |
---|
2870 | 3763 | |
---|
2871 | 3764 | if (mat == null) |
---|
.. | .. |
---|
2876 | 3769 | |
---|
2877 | 3770 | if (multiplyToggle != null) |
---|
2878 | 3771 | 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 | | - } |
---|
| 3772 | + |
---|
| 3773 | + AllocProjectedVertices(object); |
---|
2905 | 3774 | |
---|
2906 | 3775 | SetMaterial(mat, object.projectedVertices); |
---|
2907 | 3776 | } |
---|
.. | .. |
---|
2977 | 3846 | // } |
---|
2978 | 3847 | |
---|
2979 | 3848 | /**/ |
---|
2980 | | - if (deselect) |
---|
| 3849 | + if (deselect || child == null) |
---|
2981 | 3850 | { |
---|
2982 | 3851 | //group.deselectAll(); |
---|
2983 | 3852 | //freeze = true; |
---|
2984 | 3853 | GetTree().clearSelection(); |
---|
2985 | 3854 | //freeze = false; |
---|
| 3855 | + |
---|
| 3856 | + if (child == null) |
---|
| 3857 | + { |
---|
| 3858 | + return; |
---|
| 3859 | + } |
---|
2986 | 3860 | } |
---|
2987 | 3861 | |
---|
2988 | 3862 | //group.addSelectee(child); |
---|
.. | .. |
---|
3016 | 3890 | public void itemStateChanged(ItemEvent event) |
---|
3017 | 3891 | { |
---|
3018 | 3892 | // System.out.println("Propagate = " + propagate); |
---|
| 3893 | + if (event.getSource() == pinButton) |
---|
| 3894 | + { |
---|
| 3895 | + copy.pinned ^= true; |
---|
| 3896 | + if (!copy.pinned && !copy.editWindow.copy.selection.contains(copy)) |
---|
| 3897 | + { |
---|
| 3898 | + ((GroupEditor)copy.editWindow).listUI.remove(copy); |
---|
| 3899 | + copy.CloseUI(); |
---|
| 3900 | + //copy.editWindow.refreshContents(); |
---|
| 3901 | + } |
---|
| 3902 | + } |
---|
| 3903 | + else |
---|
3019 | 3904 | if (event.getSource() == propagateToggle) |
---|
3020 | 3905 | { |
---|
3021 | 3906 | propagate ^= true; |
---|
.. | .. |
---|
3051 | 3936 | cameraView.ToggleDL(); |
---|
3052 | 3937 | cameraView.repaint(); |
---|
3053 | 3938 | return; |
---|
3054 | | - } else if (event.getSource() == toggleTextureItem) |
---|
| 3939 | + } else if (event.getSource() == toggleTextureItem || event.getSource() == toggleTextureCB) |
---|
3055 | 3940 | { |
---|
3056 | 3941 | cameraView.ToggleTexture(); |
---|
3057 | 3942 | // june 2013 copy.HardTouch(); |
---|
.. | .. |
---|
3090 | 3975 | frame.validate(); |
---|
3091 | 3976 | |
---|
3092 | 3977 | return; |
---|
3093 | | - } else if (event.getSource() == toggleSwitchItem) |
---|
| 3978 | + } else if (event.getSource() == toggleSwitchItem || event.getSource() == toggleSwitchCB) |
---|
3094 | 3979 | { |
---|
3095 | 3980 | cameraView.ToggleSwitch(); |
---|
3096 | 3981 | cameraView.repaint(); |
---|
.. | .. |
---|
3120 | 4005 | } else if (event.getSource() == liveCB) |
---|
3121 | 4006 | { |
---|
3122 | 4007 | copy.live ^= true; |
---|
| 4008 | + objEditor.refreshContents(true); // To show item colors |
---|
3123 | 4009 | return; |
---|
3124 | | - } else if (event.getSource() == selectCB) |
---|
| 4010 | + } else if (event.getSource() == selectableCB) |
---|
3125 | 4011 | { |
---|
3126 | 4012 | copy.dontselect ^= true; |
---|
3127 | 4013 | return; |
---|
.. | .. |
---|
3129 | 4015 | { |
---|
3130 | 4016 | copy.hide ^= true; |
---|
3131 | 4017 | copy.Touch(); // display list issue |
---|
3132 | | - objEditor.refreshContents(); |
---|
| 4018 | + objEditor.refreshContents(true); // To show item colors |
---|
3133 | 4019 | return; |
---|
3134 | 4020 | } else if (event.getSource() == link2masterCB) |
---|
3135 | 4021 | { |
---|
.. | .. |
---|
3194 | 4080 | //System.out.println("ObjEditor " + event); |
---|
3195 | 4081 | applySelf0(true); |
---|
3196 | 4082 | //parent.applySelf(); |
---|
3197 | | - objEditor.refreshContents(); |
---|
| 4083 | + // conflicts with requestFocus objEditor.refreshContents(); |
---|
3198 | 4084 | } else if (source == resetButton) |
---|
3199 | 4085 | { |
---|
3200 | 4086 | CameraPane.fullreset = true; |
---|
.. | .. |
---|
3306 | 4192 | { |
---|
3307 | 4193 | Close(); |
---|
3308 | 4194 | //return true; |
---|
3309 | | - } else if (source == loadItem) |
---|
| 4195 | + } else if (source == openItem) |
---|
3310 | 4196 | { |
---|
3311 | | - load(); |
---|
| 4197 | + Open(); |
---|
3312 | 4198 | //return true; |
---|
3313 | 4199 | } else if (source == newItem) |
---|
3314 | 4200 | { |
---|
.. | .. |
---|
3333 | 4219 | { |
---|
3334 | 4220 | generatePOV(); |
---|
3335 | 4221 | //return true; |
---|
| 4222 | + } else if (event.getSource() == archiveItem) |
---|
| 4223 | + { |
---|
| 4224 | + cTools.Archive(frame); |
---|
| 4225 | + return; |
---|
3336 | 4226 | } else if (source == zBufferItem) |
---|
3337 | 4227 | { |
---|
3338 | 4228 | try |
---|
.. | .. |
---|
3370 | 4260 | |
---|
3371 | 4261 | void New() |
---|
3372 | 4262 | { |
---|
3373 | | - while (copy.Size() > 1) |
---|
| 4263 | + while (copy.Size() > 0) |
---|
3374 | 4264 | { |
---|
3375 | | - copy.remove(1); |
---|
| 4265 | + copy.remove(0); |
---|
3376 | 4266 | } |
---|
3377 | 4267 | |
---|
| 4268 | + copy.selection.clear(); |
---|
| 4269 | + |
---|
| 4270 | + if (copy == Grafreed.grafreed.universe) |
---|
| 4271 | + { |
---|
| 4272 | + CreateCameras(); |
---|
| 4273 | + cameraView.SetCamera(GetCamera(copy, 0)); |
---|
| 4274 | + } |
---|
3378 | 4275 | ResetModel(); |
---|
3379 | 4276 | objEditor.refreshContents(); |
---|
3380 | 4277 | } |
---|
3381 | 4278 | |
---|
3382 | 4279 | static public byte[] Compress(Object3D o) |
---|
3383 | 4280 | { |
---|
| 4281 | + // Slower to actually compress. |
---|
3384 | 4282 | try |
---|
3385 | 4283 | { |
---|
3386 | 4284 | ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
3387 | | - java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos); |
---|
3388 | | - ObjectOutputStream out = new ObjectOutputStream(zstream); |
---|
| 4285 | +// java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos); |
---|
| 4286 | + ObjectOutputStream out = new ObjectOutputStream(baos); //zstream); |
---|
3389 | 4287 | |
---|
3390 | 4288 | Object3D parent = o.parent; |
---|
3391 | 4289 | o.parent = null; |
---|
.. | .. |
---|
3396 | 4294 | |
---|
3397 | 4295 | out.flush(); |
---|
3398 | 4296 | |
---|
3399 | | - zstream.close(); |
---|
| 4297 | + baos //zstream |
---|
| 4298 | + .close(); |
---|
3400 | 4299 | out.close(); |
---|
3401 | 4300 | |
---|
3402 | | - return baos.toByteArray(); |
---|
| 4301 | + byte[] bytes = baos.toByteArray(); |
---|
| 4302 | + |
---|
| 4303 | + System.out.println("save #bytes = " + bytes.length); |
---|
| 4304 | + return bytes; |
---|
3403 | 4305 | } catch (Exception e) |
---|
3404 | 4306 | { |
---|
3405 | 4307 | System.err.println(e); |
---|
.. | .. |
---|
3409 | 4311 | |
---|
3410 | 4312 | static public Object Uncompress(byte[] bytes) |
---|
3411 | 4313 | { |
---|
3412 | | - System.out.println("#bytes = " + bytes.length); |
---|
| 4314 | + System.out.println("restore #bytes = " + bytes.length); |
---|
3413 | 4315 | try |
---|
3414 | 4316 | { |
---|
3415 | 4317 | ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
3416 | | - java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais); |
---|
3417 | | - ObjectInputStream in = new ObjectInputStream(istream); |
---|
| 4318 | + //java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais); |
---|
| 4319 | + ObjectInputStream in = new ObjectInputStream(bais); // istream); |
---|
3418 | 4320 | Object obj = in.readObject(); |
---|
| 4321 | + |
---|
| 4322 | + bais //istream |
---|
| 4323 | + .close(); |
---|
3419 | 4324 | in.close(); |
---|
3420 | 4325 | |
---|
3421 | 4326 | return obj; |
---|
.. | .. |
---|
3470 | 4375 | return null; |
---|
3471 | 4376 | } |
---|
3472 | 4377 | |
---|
3473 | | - java.util.Hashtable<java.util.UUID, Object3D> hashtable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
3474 | 4378 | |
---|
3475 | 4379 | public void Save() |
---|
3476 | 4380 | { |
---|
| 4381 | + //Save(true); |
---|
| 4382 | + Replace(); |
---|
| 4383 | + SetVersionStates(); |
---|
| 4384 | + } |
---|
| 4385 | + |
---|
| 4386 | + private boolean Equal(byte[] compress, byte[] name) |
---|
| 4387 | + { |
---|
| 4388 | + if (compress.length != name.length) |
---|
| 4389 | + { |
---|
| 4390 | + return false; |
---|
| 4391 | + } |
---|
| 4392 | + |
---|
| 4393 | + for (int i=compress.length; --i>=0;) |
---|
| 4394 | + { |
---|
| 4395 | + if (compress[i] != name[i]) |
---|
| 4396 | + return false; |
---|
| 4397 | + } |
---|
| 4398 | + |
---|
| 4399 | + return true; |
---|
| 4400 | + } |
---|
| 4401 | + |
---|
| 4402 | + void DeleteVersion() |
---|
| 4403 | + { |
---|
| 4404 | + for (int i = copy.versionindex; i < copy.versionlist.length-1; i++) |
---|
| 4405 | + { |
---|
| 4406 | + copy.versionlist[i] = copy.versionlist[i+1]; |
---|
| 4407 | + } |
---|
| 4408 | + |
---|
| 4409 | + if (copy.versionlist[copy.versionindex] == null) |
---|
| 4410 | + copy.versionindex -= 1; |
---|
| 4411 | + |
---|
| 4412 | + if (copy.versionindex != -1) |
---|
| 4413 | + CopyChanged(); |
---|
| 4414 | + |
---|
| 4415 | + SetVersionStates(); |
---|
| 4416 | + } |
---|
| 4417 | + |
---|
| 4418 | + public boolean Save(boolean user) |
---|
| 4419 | + { |
---|
3477 | 4420 | System.err.println("Save"); |
---|
| 4421 | + Replace(); |
---|
3478 | 4422 | |
---|
3479 | | - cRadio tab = GetCurrentTab(); |
---|
| 4423 | + //cRadio tab = GetCurrentTab(); |
---|
3480 | 4424 | |
---|
3481 | | - boolean temp = CameraPane.SWITCH; |
---|
3482 | | - CameraPane.SWITCH = false; |
---|
| 4425 | + Object3D compress = Duplicate(copy); // Saved version. No need for "Replace"? |
---|
3483 | 4426 | |
---|
3484 | | - copy.ExtractBigData(hashtable); |
---|
| 4427 | + boolean thesame = false; |
---|
| 4428 | + |
---|
| 4429 | +// if (copy.versionindex > 0 && copy.versions[copy.versionindex-1] != null && Equal(compress, copy.versions[copy.versionindex-1])) |
---|
| 4430 | +// { |
---|
| 4431 | +// thesame = true; |
---|
| 4432 | +// } |
---|
3485 | 4433 | |
---|
3486 | 4434 | //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++) |
---|
| 4435 | + if (!thesame) |
---|
3496 | 4436 | { |
---|
3497 | | - tab.graphs[i] = null; |
---|
| 4437 | + for (int i = copy.versionlist.length; --i > copy.versionindex+1;) |
---|
| 4438 | + { |
---|
| 4439 | + copy.versionlist[i] = copy.versionlist[i-1]; |
---|
| 4440 | + } |
---|
| 4441 | + |
---|
| 4442 | + //tab.user[tab.versionindex] = user; |
---|
| 4443 | + //boolean increment = true; // tab.graphs[tab.versionindex] == null; |
---|
| 4444 | + |
---|
| 4445 | + copy.versionlist[++copy.versionindex] = compress; |
---|
| 4446 | + |
---|
| 4447 | + // if (increment) |
---|
| 4448 | + // tab.versionindex++; |
---|
3498 | 4449 | } |
---|
3499 | 4450 | |
---|
| 4451 | + //copy.RestoreBigData(versiontable); |
---|
| 4452 | + |
---|
| 4453 | + //assert(hashtable.isEmpty()); |
---|
| 4454 | + |
---|
| 4455 | +// for (int i = copy.versionindex+1; i < copy.versionlist.length; i++) |
---|
| 4456 | +// { |
---|
| 4457 | +// //tab.user[i] = false; |
---|
| 4458 | +// copy.versionlist[i] = null; |
---|
| 4459 | +// } |
---|
| 4460 | + |
---|
| 4461 | + SetVersionStates(); |
---|
| 4462 | + |
---|
3500 | 4463 | // test save |
---|
3501 | 4464 | if (false) |
---|
3502 | 4465 | { |
---|
3503 | 4466 | try |
---|
3504 | 4467 | { |
---|
3505 | | - FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex); |
---|
| 4468 | + FileOutputStream ostream = new FileOutputStream("save" + copy.versionindex); |
---|
3506 | 4469 | ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
3507 | 4470 | |
---|
3508 | 4471 | p.writeObject(copy); |
---|
.. | .. |
---|
3515 | 4478 | e.printStackTrace(); |
---|
3516 | 4479 | } |
---|
3517 | 4480 | } |
---|
| 4481 | + |
---|
| 4482 | + return !thesame; |
---|
| 4483 | + } |
---|
| 4484 | + |
---|
| 4485 | + boolean flashIt = true; |
---|
| 4486 | + |
---|
| 4487 | + void RefreshSelection() |
---|
| 4488 | + { |
---|
| 4489 | + Object3D selection = new Object3D(); |
---|
| 4490 | + |
---|
| 4491 | + for (int i = 0; i < copy.selection.size(); i++) |
---|
| 4492 | + { |
---|
| 4493 | + Object3D elem = copy.selection.elementAt(i); |
---|
| 4494 | + |
---|
| 4495 | + Object3D obj = copy.GetObject(elem.GetUUID()); |
---|
| 4496 | + |
---|
| 4497 | + if (obj == null) |
---|
| 4498 | + { |
---|
| 4499 | + copy.selection.remove(i--); |
---|
| 4500 | + } |
---|
| 4501 | + else |
---|
| 4502 | + { |
---|
| 4503 | + selection.add(obj); |
---|
| 4504 | + copy.selection.setElementAt(obj, i); |
---|
| 4505 | + } |
---|
| 4506 | + } |
---|
| 4507 | + |
---|
| 4508 | + flashIt = false; |
---|
| 4509 | + GetTree().clearSelection(); |
---|
| 4510 | + for (int i = 0; i < selection.size(); i++) |
---|
| 4511 | + GetTree().addSelectionPath(selection.elementAt(i).GetTreePath().GetTreePath()); |
---|
| 4512 | + flashIt = true; |
---|
| 4513 | + |
---|
| 4514 | + //refreshContents(false); |
---|
3518 | 4515 | } |
---|
3519 | 4516 | |
---|
3520 | | - void CopyChanged(Object3D obj) |
---|
| 4517 | + void CopyChanged() |
---|
3521 | 4518 | { |
---|
| 4519 | + Object3D obj = (Object3D)Grafreed.clone(copy.versionlist[copy.versionindex]); |
---|
| 4520 | + |
---|
| 4521 | + SetVersionStates(); |
---|
| 4522 | + |
---|
3522 | 4523 | boolean temp = CameraPane.SWITCH; |
---|
3523 | 4524 | CameraPane.SWITCH = false; |
---|
3524 | 4525 | |
---|
3525 | | - copy.ExtractBigData(hashtable); |
---|
| 4526 | + copy.ExtractBigData(Grafreed.grafreed.universe.versiontable); |
---|
3526 | 4527 | |
---|
3527 | 4528 | copy.clear(); |
---|
3528 | 4529 | |
---|
| 4530 | + copy.skyboxname = obj.skyboxname; |
---|
| 4531 | + copy.skyboxext = obj.skyboxext; |
---|
| 4532 | + |
---|
3529 | 4533 | for (int i=0; i<obj.Size(); i++) |
---|
3530 | 4534 | { |
---|
3531 | 4535 | copy.add(obj.get(i)); |
---|
3532 | 4536 | } |
---|
3533 | 4537 | |
---|
3534 | | - copy.RestoreBigData(hashtable); |
---|
| 4538 | + copy.RestoreBigData(Grafreed.grafreed.universe.versiontable); |
---|
3535 | 4539 | |
---|
3536 | 4540 | CameraPane.SWITCH = temp; |
---|
3537 | 4541 | |
---|
| 4542 | + RefreshSelection(); |
---|
3538 | 4543 | //assert(hashtable.isEmpty()); |
---|
3539 | 4544 | |
---|
3540 | 4545 | copy.Touch(); |
---|
.. | .. |
---|
3555 | 4560 | } |
---|
3556 | 4561 | } |
---|
3557 | 4562 | |
---|
3558 | | - refreshContents(); |
---|
| 4563 | + refreshContents(true); |
---|
3559 | 4564 | } |
---|
3560 | 4565 | |
---|
3561 | | - public void Undo() |
---|
| 4566 | + cButton previousVersionButton; |
---|
| 4567 | + cButton restoreButton; |
---|
| 4568 | + cButton replaceButton; |
---|
| 4569 | + cButton nextVersionButton; |
---|
| 4570 | + cButton saveVersionButton; |
---|
| 4571 | + cButton deleteVersionButton; |
---|
| 4572 | + |
---|
| 4573 | + boolean muteSlider; |
---|
| 4574 | + |
---|
| 4575 | + int VersionCount() |
---|
3562 | 4576 | { |
---|
| 4577 | + int count = 0; |
---|
| 4578 | + |
---|
| 4579 | + for (int i = copy.versionlist.length; --i >= 0;) |
---|
| 4580 | + { |
---|
| 4581 | + if (copy.versionlist[i] != null) |
---|
| 4582 | + count++; |
---|
| 4583 | + } |
---|
| 4584 | + |
---|
| 4585 | + return count; |
---|
| 4586 | + } |
---|
| 4587 | + |
---|
| 4588 | + public cGridBag versionSliderPane; |
---|
| 4589 | + |
---|
| 4590 | + void SetVersionStates() |
---|
| 4591 | + { |
---|
| 4592 | + //if (true) |
---|
| 4593 | + // return; |
---|
| 4594 | + |
---|
| 4595 | + //cRadio tab = GetCurrentTab(); |
---|
| 4596 | + |
---|
| 4597 | + if (copy.versionlist == null) |
---|
| 4598 | + { |
---|
| 4599 | + saveVersionButton.setEnabled(false); |
---|
| 4600 | + restoreButton.setEnabled(false); |
---|
| 4601 | + replaceButton.setEnabled(false); |
---|
| 4602 | + previousVersionButton.setEnabled(false); |
---|
| 4603 | + nextVersionButton.setEnabled(false); |
---|
| 4604 | + deleteVersionButton.setEnabled(false); |
---|
| 4605 | + versionSliderPane.setVisible(false); |
---|
| 4606 | + } |
---|
| 4607 | + else |
---|
| 4608 | + { |
---|
| 4609 | + restoreButton.setEnabled(copy.versionindex != -1); |
---|
| 4610 | + replaceButton.setEnabled(copy.versionindex != -1); |
---|
| 4611 | + |
---|
| 4612 | + previousVersionButton.setEnabled(copy.versionindex > 0); |
---|
| 4613 | + nextVersionButton.setEnabled(copy.versionlist[copy.versionindex + 1] != null); |
---|
| 4614 | + |
---|
| 4615 | + deleteVersionButton.setEnabled(copy.versionindex != -1); |
---|
| 4616 | + //copy.versionlist[copy.versionindex + 1] != null); |
---|
| 4617 | + |
---|
| 4618 | + muteSlider = true; |
---|
| 4619 | + versionSlider.setMinimum(0); |
---|
| 4620 | + versionSlider.setMaximum(VersionCount() - 1); |
---|
| 4621 | + versionSlider.setInteger(copy.versionindex); |
---|
| 4622 | + versionSlider.setEnabled(copy.versionindex != -1); |
---|
| 4623 | + muteSlider = false; |
---|
| 4624 | + |
---|
| 4625 | + versionSliderPane.setVisible(true); |
---|
| 4626 | + } |
---|
| 4627 | + } |
---|
| 4628 | + |
---|
| 4629 | + public boolean PreviousVersion() |
---|
| 4630 | + { |
---|
| 4631 | + // Option? |
---|
| 4632 | + Replace(); |
---|
| 4633 | + |
---|
3563 | 4634 | System.err.println("Undo"); |
---|
3564 | 4635 | |
---|
3565 | | - cRadio tab = GetCurrentTab(); |
---|
| 4636 | + //cRadio tab = GetCurrentTab(); |
---|
3566 | 4637 | |
---|
3567 | | - if (tab.undoindex == 0) |
---|
| 4638 | + if (copy.versionindex == 0) |
---|
3568 | 4639 | { |
---|
3569 | 4640 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
3570 | | - return; |
---|
| 4641 | + return false; |
---|
3571 | 4642 | } |
---|
3572 | 4643 | |
---|
3573 | | - if (tab.graphs[tab.undoindex] == null) |
---|
3574 | | - { |
---|
3575 | | - Save(); |
---|
3576 | | - tab.undoindex -= 1; |
---|
3577 | | - } |
---|
| 4644 | +// if (tab.graphs[tab.versionindex] == null) // || !tab.user[tab.versionindex]) |
---|
| 4645 | +// { |
---|
| 4646 | +// if (Save(false)) |
---|
| 4647 | +// tab.versionindex -= 1; |
---|
| 4648 | +// else |
---|
| 4649 | +// { |
---|
| 4650 | +// if (tab.versionindex <= 0) |
---|
| 4651 | +// return false; |
---|
| 4652 | +// else |
---|
| 4653 | +// tab.versionindex -= 1; |
---|
| 4654 | +// } |
---|
| 4655 | +// } |
---|
3578 | 4656 | |
---|
3579 | | - tab.undoindex -= 1; |
---|
| 4657 | + copy.versionindex -= 1; |
---|
3580 | 4658 | |
---|
3581 | | - CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); |
---|
| 4659 | + CopyChanged(); |
---|
| 4660 | + |
---|
| 4661 | + return true; |
---|
3582 | 4662 | } |
---|
3583 | 4663 | |
---|
3584 | | - public void Redo() |
---|
| 4664 | + public boolean Restore() |
---|
3585 | 4665 | { |
---|
3586 | | - cRadio tab = GetCurrentTab(); |
---|
| 4666 | + System.err.println("Restore"); |
---|
3587 | 4667 | |
---|
3588 | | - if (tab.graphs[tab.undoindex + 1] == null) |
---|
| 4668 | + //cRadio tab = GetCurrentTab(); |
---|
| 4669 | + |
---|
| 4670 | + if (copy.versionindex == -1 || copy.versionlist[copy.versionindex] == null) |
---|
| 4671 | + { |
---|
| 4672 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 4673 | + return false; |
---|
| 4674 | + } |
---|
| 4675 | + |
---|
| 4676 | + //CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex])); |
---|
| 4677 | + CopyChanged(); |
---|
| 4678 | + |
---|
| 4679 | + return true; |
---|
| 4680 | + } |
---|
| 4681 | + |
---|
| 4682 | + public boolean Replace() |
---|
| 4683 | + { |
---|
| 4684 | + //System.err.println("Replace"); |
---|
| 4685 | + |
---|
| 4686 | + //cRadio tab = GetCurrentTab(); |
---|
| 4687 | + |
---|
| 4688 | + if (copy.versionindex == -1 || copy.versionlist[copy.versionindex] == null) |
---|
| 4689 | + { |
---|
| 4690 | + // No version yet. OK. java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 4691 | + return false; |
---|
| 4692 | + } |
---|
| 4693 | + |
---|
| 4694 | + copy.versionlist[copy.versionindex] = Duplicate(copy); |
---|
| 4695 | + |
---|
| 4696 | + return true; |
---|
| 4697 | + } |
---|
| 4698 | + |
---|
| 4699 | + public void NextVersion() |
---|
| 4700 | + { |
---|
| 4701 | + // Option? |
---|
| 4702 | + Replace(); |
---|
| 4703 | + |
---|
| 4704 | + //cRadio tab = GetCurrentTab(); |
---|
| 4705 | + |
---|
| 4706 | + if (copy.versionlist[copy.versionindex + 1] == null) |
---|
3589 | 4707 | { |
---|
3590 | 4708 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
3591 | 4709 | return; |
---|
3592 | 4710 | } |
---|
3593 | 4711 | |
---|
3594 | | - tab.undoindex += 1; |
---|
| 4712 | + copy.versionindex += 1; |
---|
3595 | 4713 | |
---|
3596 | | - CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); |
---|
| 4714 | + CopyChanged(); |
---|
| 4715 | + |
---|
| 4716 | + //if (!tab.user[tab.versionindex]) |
---|
| 4717 | + // tab.graphs[tab.versionindex] = null; |
---|
3597 | 4718 | } |
---|
3598 | 4719 | |
---|
3599 | 4720 | void ImportGFD() |
---|
.. | .. |
---|
3787 | 4908 | // else |
---|
3788 | 4909 | // applySelf(true); |
---|
3789 | 4910 | // } |
---|
| 4911 | + |
---|
| 4912 | + boolean Equal(double a, double b) |
---|
| 4913 | + { |
---|
| 4914 | + return Math.abs(a - b) < 0.001; |
---|
| 4915 | + } |
---|
| 4916 | + |
---|
3790 | 4917 | void applySelf0(boolean name) |
---|
3791 | 4918 | { |
---|
3792 | 4919 | if (name) |
---|
.. | .. |
---|
3804 | 4931 | //copy.material = new cMaterial(copy.GetMaterial()); |
---|
3805 | 4932 | |
---|
3806 | 4933 | current.color = (float) colorField.getFloat(); |
---|
3807 | | - current.modulation = (float) modulationField.getFloat(); |
---|
| 4934 | + current.modulation = (float) saturationField.getFloat(); |
---|
3808 | 4935 | current.metalness = (float) metalnessField.getFloat(); |
---|
3809 | 4936 | current.diffuse = (float) diffuseField.getFloat(); |
---|
3810 | 4937 | current.specular = (float) specularField.getFloat(); |
---|
.. | .. |
---|
3836 | 4963 | { |
---|
3837 | 4964 | cMaterial mat = copy.material; |
---|
3838 | 4965 | |
---|
3839 | | - colorField.SetToolTipValue((mat.color)); |
---|
3840 | | - modulationField.SetToolTipValue((mat.modulation)); |
---|
3841 | | - metalnessField.SetToolTipValue((mat.metalness)); |
---|
3842 | | - diffuseField.SetToolTipValue((mat.diffuse)); |
---|
3843 | | - specularField.SetToolTipValue((mat.specular)); |
---|
3844 | | - shininessField.SetToolTipValue((mat.shininess)); |
---|
3845 | | - shiftField.SetToolTipValue((mat.shift)); |
---|
3846 | | - ambientField.SetToolTipValue((mat.ambient)); |
---|
3847 | | - lightareaField.SetToolTipValue((mat.lightarea)); |
---|
3848 | | - diffusenessField.SetToolTipValue((mat.factor)); |
---|
3849 | | - velvetField.SetToolTipValue((mat.velvet)); |
---|
3850 | | - sheenField.SetToolTipValue((mat.sheen)); |
---|
3851 | | - subsurfaceField.SetToolTipValue((mat.subsurface)); |
---|
3852 | | - backlitField.SetToolTipValue((mat.bump)); |
---|
3853 | | - anisoField.SetToolTipValue((mat.aniso)); |
---|
3854 | | - anisoVField.SetToolTipValue((mat.anisoV)); |
---|
3855 | | - cameraField.SetToolTipValue((mat.cameralight)); |
---|
3856 | | - selfshadowField.SetToolTipValue((mat.diffuseness)); |
---|
3857 | | - shadowField.SetToolTipValue((mat.shadow)); |
---|
3858 | | - textureField.SetToolTipValue((mat.texture)); |
---|
3859 | | - opacityField.SetToolTipValue((mat.opacity)); |
---|
3860 | | - fakedepthField.SetToolTipValue((mat.fakedepth)); |
---|
3861 | | - shadowbiasField.SetToolTipValue((mat.shadowbias)); |
---|
| 4966 | + if (!Equal(colorField.getFloat(), mat.color)) |
---|
| 4967 | + colorField.SetToolTipValue((mat.color)); |
---|
| 4968 | + if (!Equal(saturationField.getFloat(), mat.modulation)) |
---|
| 4969 | + saturationField.SetToolTipValue((mat.modulation)); |
---|
| 4970 | + if (!Equal(metalnessField.getFloat(), mat.metalness)) |
---|
| 4971 | + metalnessField.SetToolTipValue((mat.metalness)); |
---|
| 4972 | + if (!Equal(diffuseField.getFloat(), mat.diffuse)) |
---|
| 4973 | + diffuseField.SetToolTipValue((mat.diffuse)); |
---|
| 4974 | + if (!Equal(specularField.getFloat(), mat.specular)) |
---|
| 4975 | + specularField.SetToolTipValue((mat.specular)); |
---|
| 4976 | + if (!Equal(shininessField.getFloat(), mat.shininess)) |
---|
| 4977 | + shininessField.SetToolTipValue((mat.shininess)); |
---|
| 4978 | + if (!Equal(shiftField.getFloat(), mat.shift)) |
---|
| 4979 | + shiftField.SetToolTipValue((mat.shift)); |
---|
| 4980 | + if (!Equal(ambientField.getFloat(), mat.ambient)) |
---|
| 4981 | + ambientField.SetToolTipValue((mat.ambient)); |
---|
| 4982 | + if (!Equal(lightareaField.getFloat(), mat.lightarea)) |
---|
| 4983 | + lightareaField.SetToolTipValue((mat.lightarea)); |
---|
| 4984 | + if (!Equal(diffusenessField.getFloat(), mat.factor)) |
---|
| 4985 | + diffusenessField.SetToolTipValue((mat.factor)); |
---|
| 4986 | + if (!Equal(velvetField.getFloat(), mat.velvet)) |
---|
| 4987 | + velvetField.SetToolTipValue((mat.velvet)); |
---|
| 4988 | + if (!Equal(sheenField.getFloat(), mat.sheen)) |
---|
| 4989 | + sheenField.SetToolTipValue((mat.sheen)); |
---|
| 4990 | + if (!Equal(subsurfaceField.getFloat(), mat.subsurface)) |
---|
| 4991 | + subsurfaceField.SetToolTipValue((mat.subsurface)); |
---|
| 4992 | + if (!Equal(backlitField.getFloat(), mat.bump)) |
---|
| 4993 | + backlitField.SetToolTipValue((mat.bump)); |
---|
| 4994 | + if (!Equal(anisoField.getFloat(), mat.aniso)) |
---|
| 4995 | + anisoField.SetToolTipValue((mat.aniso)); |
---|
| 4996 | + if (!Equal(anisoVField.getFloat(), mat.anisoV)) |
---|
| 4997 | + anisoVField.SetToolTipValue((mat.anisoV)); |
---|
| 4998 | + if (!Equal(cameraField.getFloat(), mat.cameralight)) |
---|
| 4999 | + cameraField.SetToolTipValue((mat.cameralight)); |
---|
| 5000 | + if (!Equal(selfshadowField.getFloat(), mat.diffuseness)) |
---|
| 5001 | + selfshadowField.SetToolTipValue((mat.diffuseness)); |
---|
| 5002 | + if (!Equal(shadowField.getFloat(), mat.shadow)) |
---|
| 5003 | + shadowField.SetToolTipValue((mat.shadow)); |
---|
| 5004 | + if (!Equal(textureField.getFloat(), mat.texture)) |
---|
| 5005 | + textureField.SetToolTipValue((mat.texture)); |
---|
| 5006 | + if (!Equal(opacityField.getFloat(), mat.opacity)) |
---|
| 5007 | + opacityField.SetToolTipValue((mat.opacity)); |
---|
| 5008 | + if (!Equal(fakedepthField.getFloat(), mat.fakedepth)) |
---|
| 5009 | + fakedepthField.SetToolTipValue((mat.fakedepth)); |
---|
| 5010 | + if (!Equal(shadowbiasField.getFloat(), mat.shadowbias)) |
---|
| 5011 | + shadowbiasField.SetToolTipValue((mat.shadowbias)); |
---|
3862 | 5012 | } |
---|
3863 | 5013 | |
---|
3864 | 5014 | if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null) |
---|
.. | .. |
---|
3889 | 5039 | //copy.Touch(); |
---|
3890 | 5040 | } |
---|
3891 | 5041 | |
---|
| 5042 | + cNumberSlider versionSlider; |
---|
| 5043 | + |
---|
3892 | 5044 | public void stateChanged(ChangeEvent e) |
---|
3893 | 5045 | { |
---|
3894 | | - // assert(false); |
---|
| 5046 | + // assert(false); |
---|
| 5047 | + if (e.getSource() == versionSlider) |
---|
| 5048 | + { |
---|
| 5049 | + if (muteSlider) |
---|
| 5050 | + return; |
---|
| 5051 | + |
---|
| 5052 | + Replace(); |
---|
| 5053 | + |
---|
| 5054 | + int version = versionSlider.getInteger(); |
---|
| 5055 | + |
---|
| 5056 | + if (version != -1 && copy.versionlist[version] != null) |
---|
| 5057 | + { |
---|
| 5058 | + copy.versionindex = version; |
---|
| 5059 | + CopyChanged(); |
---|
| 5060 | + } |
---|
| 5061 | + |
---|
| 5062 | + return; |
---|
| 5063 | + } |
---|
3895 | 5064 | |
---|
3896 | 5065 | if (freezematerial) |
---|
3897 | 5066 | { |
---|
.. | .. |
---|
3927 | 5096 | { |
---|
3928 | 5097 | //System.out.println("stateChanged = " + this); |
---|
3929 | 5098 | materialtouched = true; |
---|
| 5099 | + |
---|
| 5100 | + if (Globals.AUTOSATURATE && e.getSource() == colorField && saturationField.getFloat() == 0.001) |
---|
| 5101 | + { |
---|
| 5102 | + saturationField.setFloat(1); |
---|
| 5103 | + } |
---|
| 5104 | + |
---|
3930 | 5105 | applySelf(); |
---|
3931 | 5106 | //System.out.println("this = " + this); |
---|
3932 | 5107 | //System.out.println("PARENT = " + parent); |
---|
.. | .. |
---|
4226 | 5401 | { |
---|
4227 | 5402 | if (GetTree() != null) |
---|
4228 | 5403 | { |
---|
| 5404 | + GetTree().revalidate(); |
---|
4229 | 5405 | GetTree().repaint(); |
---|
4230 | 5406 | } |
---|
4231 | 5407 | |
---|
.. | .. |
---|
4234 | 5410 | ctrlPanel.validate(); // ? new |
---|
4235 | 5411 | ctrlPanel.repaint(); |
---|
4236 | 5412 | } |
---|
| 5413 | + |
---|
| 5414 | + if (previousVersionButton != null && copy.versionlist != null) |
---|
| 5415 | + SetVersionStates(); |
---|
| 5416 | + |
---|
| 5417 | + cameraView.requestFocusInWindow(); |
---|
4237 | 5418 | } |
---|
4238 | 5419 | |
---|
4239 | 5420 | static TweenManager tweenManager = new TweenManager(); |
---|
4240 | 5421 | |
---|
4241 | 5422 | void makeSomething(Object3D thing, boolean resetmodel) // deselect) |
---|
4242 | 5423 | { |
---|
4243 | | - if (Globals.SAVEONMAKE) // && resetmodel) |
---|
| 5424 | + if (Globals.REPLACEONMAKE) // && resetmodel) |
---|
4244 | 5425 | Save(); |
---|
4245 | 5426 | //Tween.set(thing, 0).target(1).start(tweenManager); |
---|
4246 | 5427 | //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager); |
---|
.. | .. |
---|
4265 | 5446 | // group = (Composite) group.get(0); |
---|
4266 | 5447 | // } |
---|
4267 | 5448 | |
---|
4268 | | - System.out.println("makeSomething of " + thing); |
---|
| 5449 | + //System.out.println("makeSomething of " + thing); |
---|
4269 | 5450 | |
---|
4270 | 5451 | /* |
---|
4271 | 5452 | if (deselect && jList != null) |
---|
.. | .. |
---|
4482 | 5663 | readobj.ResetDisplayList(); |
---|
4483 | 5664 | } catch (Exception e) |
---|
4484 | 5665 | { |
---|
4485 | | - //e.printStackTrace(); |
---|
| 5666 | + if (!e.toString().contains("GZIP")) |
---|
| 5667 | + e.printStackTrace(); |
---|
| 5668 | + |
---|
4486 | 5669 | try |
---|
4487 | 5670 | { |
---|
4488 | 5671 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
.. | .. |
---|
4556 | 5739 | |
---|
4557 | 5740 | if (readobj != null) |
---|
4558 | 5741 | { |
---|
4559 | | - if (Globals.SAVEONMAKE) |
---|
4560 | | - Save(); |
---|
| 5742 | + //if (Globals.SAVEONMAKE) // A new object cannot share meshes |
---|
| 5743 | + // Save(); |
---|
4561 | 5744 | try |
---|
4562 | 5745 | { |
---|
4563 | 5746 | //readobj.deepCopySelf(copy); |
---|
4564 | 5747 | copy.clear(); // june 2014 |
---|
| 5748 | + copy.skyboxname = readobj.skyboxname; |
---|
| 5749 | + copy.skyboxext = readobj.skyboxext; |
---|
4565 | 5750 | for (int i = 0; i < readobj.size(); i++) |
---|
4566 | 5751 | { |
---|
4567 | 5752 | Object3D child = readobj.get(i); // reserve(i); |
---|
.. | .. |
---|
4602 | 5787 | } |
---|
4603 | 5788 | } catch (ClassCastException e) |
---|
4604 | 5789 | { |
---|
| 5790 | + e.printStackTrace(); |
---|
4605 | 5791 | assert (false); |
---|
4606 | 5792 | Composite c = (Composite) copy; |
---|
4607 | 5793 | c.children.clear(); |
---|
.. | .. |
---|
4612 | 5798 | c.addChild(csg); |
---|
4613 | 5799 | } |
---|
4614 | 5800 | |
---|
| 5801 | + copy.versionlist = readobj.versionlist; |
---|
| 5802 | + copy.versionindex = readobj.versionindex; |
---|
| 5803 | + copy.versiontable = readobj.versiontable; |
---|
| 5804 | + |
---|
| 5805 | + if (copy.versionlist == null) |
---|
| 5806 | + { |
---|
| 5807 | + // Backward compatibility |
---|
| 5808 | + copy.versionlist = new Object3D[100]; |
---|
| 5809 | + copy.versionindex = -1; |
---|
| 5810 | + |
---|
| 5811 | + //Save(true); |
---|
| 5812 | + } |
---|
| 5813 | + |
---|
| 5814 | + //? SetUndoStates(); |
---|
| 5815 | + |
---|
4615 | 5816 | ResetModel(); |
---|
4616 | 5817 | copy.HardTouch(); // recompile? |
---|
4617 | 5818 | refreshContents(); |
---|
4618 | 5819 | } |
---|
4619 | 5820 | } |
---|
4620 | 5821 | |
---|
4621 | | - void load() // throws ClassNotFoundException |
---|
| 5822 | + void Open() // throws ClassNotFoundException |
---|
4622 | 5823 | { |
---|
4623 | 5824 | if (Grafreed.standAlone) |
---|
4624 | 5825 | { |
---|
4625 | | - FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); |
---|
| 5826 | + FileDialog browser = new FileDialog(frame, "Open", FileDialog.LOAD); |
---|
4626 | 5827 | browser.show(); |
---|
4627 | 5828 | String filename = browser.getFile(); |
---|
4628 | 5829 | if (filename != null && filename.length() > 0) |
---|
.. | .. |
---|
4699 | 5900 | |
---|
4700 | 5901 | void save() |
---|
4701 | 5902 | { |
---|
| 5903 | + Replace(); |
---|
| 5904 | + |
---|
4702 | 5905 | if (lastname == null) |
---|
4703 | 5906 | { |
---|
4704 | 5907 | return; |
---|
.. | .. |
---|
4721 | 5924 | //ps.print(buffer.toString()); |
---|
4722 | 5925 | } catch (IOException e) |
---|
4723 | 5926 | { |
---|
| 5927 | + e.printStackTrace(); |
---|
4724 | 5928 | } |
---|
4725 | 5929 | } |
---|
4726 | 5930 | |
---|
.. | .. |
---|
4735 | 5939 | String filename = browser.getFile(); |
---|
4736 | 5940 | if (filename != null && filename.length() > 0) |
---|
4737 | 5941 | { |
---|
| 5942 | + if (!filename.endsWith(".gfd")) |
---|
| 5943 | + filename += ".gfd"; |
---|
4738 | 5944 | lastname = browser.getDirectory() + filename; |
---|
4739 | 5945 | save(); |
---|
4740 | 5946 | } |
---|
.. | .. |
---|
4901 | 6107 | MenuBar menuBar; |
---|
4902 | 6108 | Menu fileMenu; |
---|
4903 | 6109 | MenuItem newItem; |
---|
4904 | | - MenuItem loadItem; |
---|
| 6110 | + MenuItem openItem; |
---|
4905 | 6111 | MenuItem saveItem; |
---|
4906 | 6112 | MenuItem saveAsItem; |
---|
4907 | 6113 | MenuItem exportAsItem; |
---|
.. | .. |
---|
4924 | 6130 | CheckboxMenuItem toggleSwitchItem; |
---|
4925 | 6131 | CheckboxMenuItem toggleRootItem; |
---|
4926 | 6132 | CheckboxMenuItem animationItem; |
---|
| 6133 | + MenuItem archiveItem; |
---|
4927 | 6134 | CheckboxMenuItem toggleHandleItem; |
---|
4928 | 6135 | CheckboxMenuItem togglePaintItem; |
---|
4929 | 6136 | JSplitPane mainPanel; |
---|
.. | .. |
---|
4937 | 6144 | ButtonGroup buttonGroup; |
---|
4938 | 6145 | |
---|
4939 | 6146 | cGridBag toolboxPanel; |
---|
| 6147 | + cGridBag skyboxPanel; |
---|
4940 | 6148 | cGridBag materialPanel; |
---|
4941 | 6149 | cGridBag ctrlPanel; |
---|
4942 | 6150 | |
---|
.. | .. |
---|
4945 | 6153 | cGridBag optionsPanel; |
---|
4946 | 6154 | |
---|
4947 | 6155 | JTabbedPane objectPanel; |
---|
| 6156 | + boolean materialFlushed; |
---|
| 6157 | + Object3D latestObject; |
---|
4948 | 6158 | |
---|
| 6159 | + cGridBag transformPanel; |
---|
4949 | 6160 | cGridBag XYZPanel; |
---|
4950 | 6161 | |
---|
4951 | 6162 | JSplitPane gridPanel; |
---|
.. | .. |
---|
5008 | 6219 | JLabel colorLabel; |
---|
5009 | 6220 | cNumberSlider colorField; |
---|
5010 | 6221 | JLabel modulationLabel; |
---|
5011 | | - cNumberSlider modulationField; |
---|
| 6222 | + cNumberSlider saturationField; |
---|
5012 | 6223 | JLabel metalnessLabel; |
---|
5013 | 6224 | cNumberSlider metalnessField; |
---|
5014 | 6225 | JLabel diffuseLabel; |
---|
.. | .. |
---|
5039 | 6250 | cNumberSlider anisoField; |
---|
5040 | 6251 | JLabel anisoVLabel; |
---|
5041 | 6252 | cNumberSlider anisoVField; |
---|
| 6253 | + |
---|
5042 | 6254 | JLabel cameraLabel; |
---|
5043 | 6255 | cNumberSlider cameraField; |
---|
5044 | 6256 | JLabel selfshadowLabel; |
---|
.. | .. |
---|
5053 | 6265 | cNumberSlider fakedepthField; |
---|
5054 | 6266 | JLabel shadowbiasLabel; |
---|
5055 | 6267 | cNumberSlider shadowbiasField; |
---|
| 6268 | + |
---|
5056 | 6269 | JLabel bumpLabel; |
---|
5057 | 6270 | cNumberSlider bumpField; |
---|
5058 | 6271 | JLabel noiseLabel; |
---|