Normand Briere
2019-08-08 8294241adc5fe698b70e13ebd6780af46ab83f7e
ObjEditor.java
....@@ -15,6 +15,9 @@
1515 //import javax.swing.plaf.ColorUIResource;
1616 //import javax.swing.plaf.metal.DefaultMetalTheme;
1717
18
+import javax.swing.plaf.basic.BasicSplitPaneDivider;
19
+import javax.swing.plaf.basic.BasicSplitPaneUI;
20
+
1821 //import javax.media.opengl.GLCanvas;
1922
2023 import //weka.core.
....@@ -31,6 +34,7 @@
3134 iSendInfo
3235 //KeyListener
3336 {
37
+ public cToggleButton pinButton;
3438 boolean timeline;
3539 boolean wasFullScreen;
3640
....@@ -38,64 +42,78 @@
3842 JFrame frame;
3943
4044 static ObjEditor theFrame;
45
+
46
+ public cGridBag GetSeparator()
47
+ {
48
+ cGridBag separator = new cGridBag();
49
+ separator.add(new JSeparator());
50
+ separator.preferredHeight = 5;
51
+ return separator;
52
+ }
4153
4254 cButton GetButton(String name, boolean border)
4355 {
44
- try
45
- {
46
- ImageIcon icon = GetIcon(name);
47
- return new cButton(icon, border);
48
- }
49
- catch (Exception e)
50
- {
51
- return new cButton(name, border);
52
- }
56
+ ImageIcon icon = GetIcon(name);
57
+ return new cButton(icon, border);
58
+ }
59
+
60
+ cLabel GetLabel(String name, boolean border)
61
+ {
62
+ //ImageIcon icon = GetIcon(name);
63
+ return new cLabel(GetImage(name), border);
5364 }
5465
5566 cToggleButton GetToggleButton(String name, boolean border)
5667 {
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
- }
68
+ ImageIcon icon = GetIcon(name);
69
+ return new cToggleButton(icon, border);
6670 }
6771
6872 cCheckBox GetCheckBox(String name, boolean border)
6973 {
74
+ ImageIcon icon = GetIcon(name);
75
+ return new cCheckBox(icon, border);
76
+ }
77
+
78
+ ImageIcon GetIcon(String name)
79
+ {
7080 try
7181 {
72
- ImageIcon icon = GetIcon(name);
73
- return new cCheckBox(icon, border);
82
+ BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name));
83
+
84
+// if (image.getWidth() > 48 && image.getHeight() > 48)
85
+// {
86
+// BufferedImage resized = new BufferedImage(48, 48, image.getType());
87
+// Graphics2D g = resized.createGraphics();
88
+// g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
89
+// //g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
90
+// g.drawImage(image, 0, 0, 48, 48, 0, 0, image.getWidth(), image.getHeight(), null);
91
+// g.dispose();
92
+//
93
+// image = resized;
94
+// }
95
+
96
+ javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image);
97
+ return icon;
7498 }
7599 catch (Exception e)
76100 {
77
- return new cCheckBox(name, border);
101
+ return null;
78102 }
79103 }
80
-
81
- private ImageIcon GetIcon(String name) throws IOException
104
+
105
+ BufferedImage GetImage(String name)
82106 {
83
- BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name));
84
-
85
- if (image.getWidth() != 24 && image.getHeight() != 24)
107
+ try
86108 {
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;
109
+ BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name));
110
+
111
+ return image;
95112 }
96
-
97
- javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image);
98
- return icon;
113
+ catch (Exception e)
114
+ {
115
+ return null;
116
+ }
99117 }
100118
101119 // SCRIPT
....@@ -207,7 +225,7 @@
207225
208226 objEditor.ctrlPanel.remove(namePanel);
209227
210
- if (!GroupEditor.allparams)
228
+ if (!allparams)
211229 return;
212230
213231 // objEditor.ctrlPanel.remove(liveCB);
....@@ -279,6 +297,12 @@
279297 client = inClient;
280298 copy = client;
281299
300
+ if (copy.versionlist == null)
301
+ {
302
+ copy.versionlist = new Object3D[100];
303
+ copy.versionindex = -1;
304
+ }
305
+
282306 // "this" is not called: SetupUI2(objEditor);
283307 }
284308
....@@ -292,6 +316,12 @@
292316 client = inClient;
293317 copy = client;
294318
319
+ if (copy.versionlist == null)
320
+ {
321
+ copy.versionlist = new Object3D[100];
322
+ copy.versionindex = -1;
323
+ }
324
+
295325 SetupUI2(callee.GetEditor());
296326 }
297327
....@@ -306,7 +336,7 @@
306336 //localCopy.parent = null;
307337
308338 frame = new JFrame();
309
- frame.setUndecorated(true);
339
+ frame.setUndecorated(false);
310340 objEditor = this;
311341 this.callee = callee;
312342
....@@ -324,6 +354,12 @@
324354 copy = localCopy;
325355 copy.editWindow = this;
326356
357
+ if (copy.versionlist == null)
358
+ {
359
+// copy.versions = new byte[100][];
360
+// copy.versionindex = -1;
361
+ }
362
+
327363 SetupMenu();
328364
329365 //SetupName(objEditor); // new
....@@ -337,12 +373,17 @@
337373 return frame.action(event, obj);
338374 }
339375
376
+ // Cannot work without static
377
+ static boolean allparams = true;
378
+
379
+ static java.util.Vector<Object3D> listUI = new java.util.Vector<Object3D>();
380
+
340381 void SetupMenu()
341382 {
342383 frame.setMenuBar(menuBar = new MenuBar());
343384 menuBar.add(fileMenu = new Menu("File"));
344385 fileMenu.add(newItem = new MenuItem("New"));
345
- fileMenu.add(loadItem = new MenuItem("Open..."));
386
+ fileMenu.add(openItem = new MenuItem("Open..."));
346387
347388 //oe.menuBar.add(menu = new Menu("Include"));
348389 Menu menu = new Menu("Import");
....@@ -374,7 +415,7 @@
374415 }
375416
376417 newItem.addActionListener(this);
377
- loadItem.addActionListener(this);
418
+ openItem.addActionListener(this);
378419 saveItem.addActionListener(this);
379420 saveAsItem.addActionListener(this);
380421 exportAsItem.addActionListener(this);
....@@ -398,6 +439,11 @@
398439 //
399440 // materialFlushed = true;
400441 // }
442
+// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Edit"))
443
+// {
444
+// if (listUI.size() == 0)
445
+// EditSelection(false);
446
+// }
401447
402448 refreshContents(false); // To refresh Info tab
403449 }
....@@ -406,11 +452,12 @@
406452
407453 toolbarPanel = new JPanel();
408454 toolbarPanel.setName("Toolbar");
455
+
409456 treePanel = new cGridBag();
410457 treePanel.setName("Tree");
411458
412459 editPanel = new cGridBag().setVertical(true);
413
- editPanel.setName("Edit");
460
+ //editPanel.setName("Edit");
414461
415462 ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout());
416463
....@@ -418,11 +465,13 @@
418465 editPanel.add(editCommandsPanel);
419466 editPanel.add(ctrlPanel);
420467
421
- toolboxPanel = new cGridBag().setVertical(false);
422
- toolboxPanel.setName("Toolbox");
468
+ toolboxPanel = new cGridBag().setVertical(true);
469
+ //toolboxPanel.setName("Toolbox");
423470
424
- materialPanel = new cGridBag().setVertical(true);
425
- materialPanel.setName("Material");
471
+ skyboxPanel = new cGridBag().setVertical(true);
472
+
473
+ materialPanel = new cGridBag().setVertical(false);
474
+ //materialPanel.setName("Material");
426475
427476 /*JTextPane*/
428477 infoarea = createTextPane();
....@@ -430,14 +479,15 @@
430479
431480 infoarea.setEditable(true);
432481 SetText();
482
+
433483 // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f));
434484 // infoarea.setOpaque(false);
435485 // //infoarea.setForeground(textcolor);
436486 // TEXTAREA infoarea.setLineWrap(true);
437487 // TEXTAREA infoarea.setWrapStyleWord(true);
438488 infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED);
439
- infoPanel.setPreferredSize(new Dimension(50, 200));
440
- infoPanel.setName("Info");
489
+ infoPanel.setPreferredSize(new Dimension(1, 1));
490
+ //infoPanel.setName("Info");
441491 //infoPanel.setLayout(new BorderLayout());
442492 //infoPanel.add(createTextPane());
443493
....@@ -448,7 +498,14 @@
448498 mainPanel.setDividerSize(9);
449499 mainPanel.setDividerLocation(0.5); //1.0);
450500 mainPanel.setResizeWeight(0.5);
451
-
501
+
502
+//mainPanel.setDividerSize((int) (mainPanel.getDividerSize() * 1.5));
503
+ BasicSplitPaneDivider divider = ( (BasicSplitPaneUI) mainPanel.getUI()).getDivider();
504
+ divider.setDividerSize(15);
505
+ divider.setBorder(BorderFactory.createTitledBorder(divider.getBorder(), "Custom border title -- gets rid of the one-touch arrows!"));
506
+
507
+ mainPanel.setUI(new BasicSplitPaneUI());
508
+
452509 //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5));
453510 //mainPanel.setLayout(new GridBagLayout());
454511 toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
....@@ -679,8 +736,8 @@
679736 }
680737 }
681738
682
-static GraphicsDevice device = GraphicsEnvironment
683
- .getLocalGraphicsEnvironment().getScreenDevices()[0];
739
+//static GraphicsDevice device = GraphicsEnvironment
740
+// .getLocalGraphicsEnvironment().getScreenDevices()[0];
684741
685742 Rectangle keeprect;
686743 cRadio radio;
....@@ -701,10 +758,19 @@
701758 void Minimize()
702759 {
703760 frame.setState(Frame.ICONIFIED);
761
+ frame.validate();
704762 }
705763
764
+// artifactURI=null, type=0, property=${file.reference.jfxrt.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@6767876f, broken=false, additional={}
765
+// artifactURI=null, type=0, property=${file.reference.mac-ui.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@16bdc817, broken=false, additional={}
766
+// artifactURI=null, type=0, property=${file.reference.classes.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@9daa9c17, broken=false, additional={}
706767 void Maximize()
707768 {
769
+ if (CameraPane.FULLSCREEN)
770
+ {
771
+ ToggleFullScreen();
772
+ }
773
+
708774 if (maximized)
709775 {
710776 frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height);
....@@ -712,22 +778,36 @@
712778 else
713779 {
714780 keeprect = frame.getBounds();
715
- Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();
716
- Dimension rect2 = frame.getToolkit().getScreenSize();
717
- frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height);
781
+// Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();
782
+// Dimension rect2 = frame.getToolkit().getScreenSize();
783
+// frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height);
718784 // frame.setState(Frame.MAXIMIZED_BOTH);
785
+ frame.setBounds(frame.getGraphicsConfiguration().getBounds());
719786 }
720787
721788 maximized ^= true;
789
+
790
+ frame.validate();
722791 }
792
+
793
+ cButton minButton;
794
+ cButton maxButton;
795
+ cButton fullButton;
723796
724797 void ToggleFullScreen()
725798 {
799
+GraphicsDevice device = frame.getGraphicsConfiguration().getDevice();
800
+
726801 cameraView.ToggleFullScreen();
727802
728803 if (!CameraPane.FULLSCREEN)
729804 {
730805 device.setFullScreenWindow(null);
806
+ frame.dispose();
807
+ frame.setUndecorated(false);
808
+ frame.validate();
809
+ frame.setVisible(true);
810
+
731811 //frame.setVisible(false);
732812 // frame.removeNotify();
733813 // frame.setUndecorated(false);
....@@ -737,7 +817,7 @@
737817 // X frame.getContentPane().remove(/*"Center",*/bigThree);
738818 // X framePanel.add(bigThree);
739819 // X frame.getContentPane().add(/*"Center",*/framePanel);
740
- framePanel.setDividerLocation(1);
820
+ framePanel.setDividerLocation(46);
741821
742822 //frame.setVisible(true);
743823 radio.layout = keepButton;
....@@ -752,7 +832,12 @@
752832 // frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width,
753833 // frame.getToolkit().getScreenSize().height);
754834 //frame.setVisible(false);
835
+
836
+ frame.dispose();
837
+ frame.setUndecorated(true);
755838 device.setFullScreenWindow(frame);
839
+ frame.validate();
840
+ frame.setVisible(true);
756841 // frame.removeNotify();
757842 // frame.setUndecorated(true);
758843 // frame.addNotify();
....@@ -765,7 +850,33 @@
765850 radio.layout.doClick();
766851 //frame.setVisible(true);
767852 }
853
+ frame.validate();
854
+
855
+ cameraView.requestFocusInWindow();
768856 }
857
+
858
+ private Object3D CompressCopy()
859
+ {
860
+ boolean temp = CameraPane.SWITCH;
861
+ CameraPane.SWITCH = false;
862
+
863
+ copy.ExtractBigData(versiontable);
864
+ // if (copy == client)
865
+
866
+ Object3D versions[] = copy.versionlist;
867
+ copy.versionlist = null;
868
+
869
+ //byte[] compress = Compress(copy);
870
+ Object3D compress = (Object3D)Grafreed.clone(copy);
871
+
872
+ copy.versionlist = versions;
873
+
874
+ copy.RestoreBigData(versiontable);
875
+
876
+ CameraPane.SWITCH = temp;
877
+
878
+ return compress;
879
+ }
769880
770881 private JTextPane createTextPane()
771882 {
....@@ -888,6 +999,7 @@
888999 {
8891000 SetupMaterial(materialPanel);
8901001 }
1002
+
8911003 //SetupName();
8921004 //SetupViews();
8931005 }
....@@ -897,7 +1009,7 @@
8971009 // NumberSlider vDivsField;
8981010 // JCheckBox endcaps;
8991011 JCheckBox liveCB;
900
- JCheckBox selectCB;
1012
+ JCheckBox selectableCB;
9011013 JCheckBox hideCB;
9021014 JCheckBox link2masterCB;
9031015 JCheckBox markCB;
....@@ -1096,39 +1208,55 @@
10961208
10971209 namePanel = new cGridBag();
10981210
1211
+ //if (copy.pinned)
1212
+ {
1213
+ pinButton = GetToggleButton("icons/pin.png", !Grafreed.NIMBUSLAF);
1214
+ pinButton.setSelected(copy.pinned);
1215
+ cGridBag t = new cGridBag();
1216
+ t.preferredWidth = 2;
1217
+ t.add(pinButton);
1218
+ namePanel.add(t);
1219
+
1220
+ pinButton.addItemListener(this);
1221
+ }
1222
+
10991223 nameField = AddText(namePanel, copy.GetName());
1100
- namePanel.add(nameField);
1224
+ namePanel.add(new JScrollPane(nameField, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER));
11011225 oe.ctrlPanel.add(namePanel);
11021226
11031227 oe.ctrlPanel.Return();
11041228
1105
- if (!GroupEditor.allparams)
1229
+ if (!allparams)
11061230 return;
11071231
11081232 setupPanel = new cGridBag().setVertical(false);
11091233
11101234 liveCB = AddCheckBox(setupPanel, "Live", copy.live);
11111235 liveCB.setToolTipText("Animate object");
1112
- selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect);
1113
- selectCB.setToolTipText("Make object selectable");
1236
+ selectableCB = AddCheckBox(setupPanel, "Select", !copy.dontselect);
1237
+ selectableCB.setToolTipText("Make object selectable");
11141238 // Return();
1239
+
11151240 hideCB = AddCheckBox(setupPanel, "Hide", copy.hide);
11161241 hideCB.setToolTipText("Hide object");
11171242 markCB = AddCheckBox(setupPanel, "Mark", copy.marked);
1118
- markCB.setToolTipText("Set the animation target transform");
1243
+ markCB.setToolTipText("As animation target transform");
1244
+
1245
+ ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);
11191246
11201247 setupPanel2 = new cGridBag().setVertical(false);
11211248
11221249 rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind);
11231250 rewindCB.setToolTipText("Rewind animation");
11241251
1125
- randomCB = AddCheckBox(setupPanel2, "Rand", copy.random);
1126
- randomCB.setToolTipText("Randomly Rewind or Go back and forth");
1252
+ randomCB = AddCheckBox(setupPanel2, "Random", copy.random);
1253
+ randomCB.setToolTipText("Randomly Rewind (or Go back and forth)");
11271254
1255
+ link2masterCB = AddCheckBox(setupPanel2, "Support", copy.link2master);
1256
+ link2masterCB.setToolTipText("Attach to support");
1257
+
11281258 if (Globals.ADVANCED)
11291259 {
1130
- link2masterCB = AddCheckBox(setupPanel2, "Supp", copy.link2master);
1131
- link2masterCB.setToolTipText("Attach to support");
11321260 speedupCB = AddCheckBox(setupPanel2, "Speed", copy.speedup);
11331261 speedupCB.setToolTipText("Option motion capture");
11341262 }
....@@ -1402,6 +1530,7 @@
14021530 XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll);
14031531 XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll);
14041532 XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll);
1533
+ //XYZPanel.setName("XYZ");
14051534
14061535 /*
14071536 gridPanel = new JPanel(); //new BorderLayout());
....@@ -1439,14 +1568,29 @@
14391568 //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
14401569 //tmp.setName("Edit");
14411570 objectPanel.add(materialPanel);
1571
+ objectPanel.setIconAt(0, GetIcon("icons/material.png"));
1572
+ objectPanel.setToolTipTextAt(0, "Material");
1573
+
14421574 objectPanel.add(toolboxPanel);
1575
+ objectPanel.setIconAt(1, GetIcon("icons/primitives.png"));
1576
+ objectPanel.setToolTipTextAt(1, "Objects & textures");
1577
+
1578
+ objectPanel.add(skyboxPanel);
1579
+ objectPanel.setIconAt(2, GetIcon("icons/skybox.jpg"));
1580
+ objectPanel.setToolTipTextAt(2, "Backgrounds");
1581
+
14431582 // JPanel north = new JPanel(new BorderLayout());
14441583 // north.setName("Edit");
14451584 // north.add(ctrlPanel, BorderLayout.NORTH);
14461585 // objectPanel.add(north);
14471586 objectPanel.add(editPanel);
1448
- objectPanel.add(infoPanel);
1449
-
1587
+ objectPanel.setIconAt(3, GetIcon("icons/write.png"));
1588
+ objectPanel.setToolTipTextAt(3, "Edit controls");
1589
+
1590
+ objectPanel.add(XYZPanel);
1591
+ objectPanel.setIconAt(4, GetIcon("icons/XYZ.png"));
1592
+ objectPanel.setToolTipTextAt(4, "XYZ/RGB transform");
1593
+
14501594 /*
14511595 aConstraints.gridx = 0;
14521596 aConstraints.gridwidth = 1;
....@@ -1454,7 +1598,7 @@
14541598 aConstraints.gridy += 1;
14551599 aConstraints.gridwidth = 1;
14561600 mainPanel.add(objectPanel, aConstraints);
1457
- */
1601
+ */
14581602
14591603 scrollpane = new JScrollPane(mainPanel, ScrollPaneConstants.// VERTICAL_SCROLLBAR_ALWAYS,
14601604 VERTICAL_SCROLLBAR_AS_NEEDED,
....@@ -1466,7 +1610,7 @@
14661610 scrollpane.addMouseWheelListener(this); // Default not fast enough
14671611
14681612 /*JTabbedPane*/ scenePanel = new cGridBag();
1469
- scenePanel.preferredWidth = 6;
1613
+ scenePanel.preferredWidth = 5;
14701614
14711615 JTabbedPane tabbedPane = new JTabbedPane();
14721616 tabbedPane.add(scrollpane);
....@@ -1483,6 +1627,11 @@
14831627
14841628 scenePanel.add(tabbedPane);
14851629
1630
+ //if (Globals.ADVANCED)
1631
+ tabbedPane.add(infoPanel);
1632
+ tabbedPane.setIconAt(3, GetIcon("icons/info.png"));
1633
+ tabbedPane.setToolTipTextAt(3, "Information");
1634
+
14861635 /*
14871636 cTree jTree = new cTree(null);
14881637 ToolTipManager.sharedInstance().registerComponent(jTree);
....@@ -1544,7 +1693,7 @@
15441693 bigThree = new cGridBag();
15451694 bigThree.addComponent(scenePanel);
15461695 bigThree.addComponent(centralPanel);
1547
- bigThree.addComponent(XYZPanel);
1696
+ //bigThree.addComponent(XYZPanel);
15481697
15491698 // // SIDE EFFECT!!!
15501699 // aConstraints.gridx = 0;
....@@ -1553,9 +1702,9 @@
15531702 // aConstraints.gridheight = 1;
15541703
15551704 framePanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, toolbarPanel, bigThree);
1556
- framePanel.setContinuousLayout(true);
1557
- framePanel.setOneTouchExpandable(true);
1558
- framePanel.setDividerLocation(0.8);
1705
+ framePanel.setContinuousLayout(false);
1706
+ framePanel.setOneTouchExpandable(false);
1707
+ //.setDividerLocation(0.8);
15591708 //framePanel.setDividerSize(15);
15601709 //framePanel.setResizeWeight(0.15);
15611710 framePanel.setName("Frame");
....@@ -1574,17 +1723,17 @@
15741723
15751724 frame.setSize(1280, 860);
15761725
1577
- frame.validate();
1578
- frame.setVisible(true);
1579
-
15801726 cameraView.requestFocusInWindow();
15811727
15821728 gridPanel.setDividerLocation(1.0);
1729
+
1730
+ frame.validate();
1731
+
1732
+ frame.setVisible(true);
15831733
15841734 frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
15851735 frame.addWindowListener(new WindowAdapter()
15861736 {
1587
-
15881737 public void windowClosing(WindowEvent e)
15891738 {
15901739 Close();
....@@ -1607,12 +1756,384 @@
16071756 ctrlPanel.removeAll();
16081757 }
16091758
1610
- void SetupMaterial(cGridBag panel)
1759
+ void SetupMaterial(cGridBag materialpanel)
16111760 {
1612
- /*
1761
+ cGridBag presetpanel = new cGridBag().setVertical(true);
1762
+
1763
+ cLabel skin = GetLabel("icons/shadericons/shadericon00000.png", !Grafreed.NIMBUSLAF);
1764
+ skin.setToolTipText("Skin");
1765
+ skin.addMouseListener(new MouseAdapter()
1766
+ {
1767
+ public void mouseClicked(MouseEvent e)
1768
+ {
1769
+ Object3D object = Grafreed.materials.versionlist[0].get(0);
1770
+ cMaterial material = object.material;
1771
+
1772
+ // Skin
1773
+ colorField.setFloat(material.color);
1774
+ saturationField.setFloat(material.modulation);
1775
+ subsurfaceField.setFloat(material.subsurface);
1776
+ selfshadowField.setFloat(material.diffuseness);
1777
+ diffusenessField.setFloat(material.factor);
1778
+ shininessField.setFloat(material.shininess);
1779
+ shadowbiasField.setFloat(material.shadowbias);
1780
+ diffuseField.setFloat(material.diffuse);
1781
+ specularField.setFloat(material.specular);
1782
+
1783
+ bumpField.setFloat(object.projectedVertices[0].x / 1000.0);
1784
+ noiseField.setFloat(object.projectedVertices[0].y / 1000.0);
1785
+ powerField.setFloat(object.projectedVertices[2].x / 1000.0);
1786
+
1787
+ materialtouched = true;
1788
+ applySelf();
1789
+ }
1790
+ });
1791
+ presetpanel.add(skin);
1792
+
1793
+ cLabel lambert = GetLabel("icons/shadericons/shadericon00002.png", !Grafreed.NIMBUSLAF);
1794
+ lambert.setToolTipText("Diffuse");
1795
+ lambert.addMouseListener(new MouseAdapter()
1796
+ {
1797
+ public void mouseClicked(MouseEvent e)
1798
+ {
1799
+ Object3D object = Grafreed.materials.versionlist[2].get(0);
1800
+ cMaterial material = object.material;
1801
+
1802
+ diffusenessField.setFloat(material.factor);
1803
+ selfshadowField.setFloat(material.diffuseness);
1804
+
1805
+ materialtouched = true;
1806
+ applySelf();
1807
+ }
1808
+ });
1809
+ presetpanel.add(lambert);
1810
+
1811
+ cLabel diffuse2 = GetLabel("icons/shadericons/shadericon00003.png", !Grafreed.NIMBUSLAF);
1812
+ diffuse2.setToolTipText("Diffuse2");
1813
+ diffuse2.addMouseListener(new MouseAdapter()
1814
+ {
1815
+ public void mouseClicked(MouseEvent e)
1816
+ {
1817
+ Object3D object = Grafreed.materials.versionlist[3].get(0);
1818
+ cMaterial material = object.material;
1819
+
1820
+ diffusenessField.setFloat(material.factor);
1821
+ selfshadowField.setFloat(material.diffuseness);
1822
+
1823
+ materialtouched = true;
1824
+ applySelf();
1825
+ }
1826
+ });
1827
+ presetpanel.add(diffuse2);
1828
+
1829
+ cLabel diffusemoon = GetLabel("icons/shadericons/shadericon00004.png", !Grafreed.NIMBUSLAF);
1830
+ diffusemoon.setToolTipText("Moon");
1831
+ diffusemoon.addMouseListener(new MouseAdapter()
1832
+ {
1833
+ public void mouseClicked(MouseEvent e)
1834
+ {
1835
+ Object3D object = Grafreed.materials.versionlist[4].get(0);
1836
+ cMaterial material = object.material;
1837
+
1838
+ diffusenessField.setFloat(material.factor);
1839
+ selfshadowField.setFloat(material.diffuseness);
1840
+
1841
+ materialtouched = true;
1842
+ applySelf();
1843
+ }
1844
+ });
1845
+ presetpanel.add(diffusemoon);
1846
+
1847
+ cLabel diffusemoon2 = GetLabel("icons/shadericons/shadericon00005.png", !Grafreed.NIMBUSLAF);
1848
+ diffusemoon2.setToolTipText("Moon2");
1849
+ diffusemoon2.addMouseListener(new MouseAdapter()
1850
+ {
1851
+ public void mouseClicked(MouseEvent e)
1852
+ {
1853
+ Object3D object = Grafreed.materials.versionlist[5].get(0);
1854
+ cMaterial material = object.material;
1855
+
1856
+ diffusenessField.setFloat(material.factor);
1857
+ selfshadowField.setFloat(material.diffuseness);
1858
+
1859
+ materialtouched = true;
1860
+ applySelf();
1861
+ }
1862
+ });
1863
+ presetpanel.add(diffusemoon2);
1864
+
1865
+ cLabel diffusemoon3 = GetLabel("icons/shadericons/shadericon00006.png", !Grafreed.NIMBUSLAF);
1866
+ diffusemoon3.setToolTipText("Moon3");
1867
+ diffusemoon3.addMouseListener(new MouseAdapter()
1868
+ {
1869
+ public void mouseClicked(MouseEvent e)
1870
+ {
1871
+ Object3D object = Grafreed.materials.versionlist[6].get(0);
1872
+ cMaterial material = object.material;
1873
+
1874
+ diffusenessField.setFloat(material.factor);
1875
+ selfshadowField.setFloat(material.diffuseness);
1876
+
1877
+ materialtouched = true;
1878
+ applySelf();
1879
+ }
1880
+ });
1881
+ presetpanel.add(diffusemoon3);
1882
+
1883
+ cLabel diffusesheen = GetLabel("icons/shadericons/shadericon00007.png", !Grafreed.NIMBUSLAF);
1884
+ diffusesheen.setToolTipText("Sheen");
1885
+ diffusesheen.addMouseListener(new MouseAdapter()
1886
+ {
1887
+ public void mouseClicked(MouseEvent e)
1888
+ {
1889
+ Object3D object = Grafreed.materials.versionlist[7].get(0);
1890
+ cMaterial material = object.material;
1891
+
1892
+ sheenField.setFloat(material.sheen);
1893
+
1894
+ materialtouched = true;
1895
+ applySelf();
1896
+ }
1897
+ });
1898
+ presetpanel.add(diffusesheen);
1899
+
1900
+ cLabel rough = GetLabel("icons/shadericons/shadericon00001.png", !Grafreed.NIMBUSLAF);
1901
+ rough.setToolTipText("Rough metal");
1902
+ rough.addMouseListener(new MouseAdapter()
1903
+ {
1904
+ public void mouseClicked(MouseEvent e)
1905
+ {
1906
+ Object3D object = Grafreed.materials.versionlist[1].get(0);
1907
+ cMaterial material = object.material;
1908
+
1909
+ shininessField.setFloat(material.shininess);
1910
+ velvetField.setFloat(material.velvet);
1911
+
1912
+ materialtouched = true;
1913
+ applySelf();
1914
+ }
1915
+ });
1916
+ presetpanel.add(rough);
1917
+
1918
+ cLabel rough2 = GetLabel("icons/shadericons/shadericon00013.png", !Grafreed.NIMBUSLAF);
1919
+ rough2.setToolTipText("Medium metal");
1920
+ rough2.addMouseListener(new MouseAdapter()
1921
+ {
1922
+ public void mouseClicked(MouseEvent e)
1923
+ {
1924
+ Object3D object = Grafreed.materials.versionlist[13].get(0);
1925
+ cMaterial material = object.material;
1926
+
1927
+ shininessField.setFloat(material.shininess);
1928
+ lightareaField.setFloat(material.lightarea);
1929
+
1930
+ materialtouched = true;
1931
+ applySelf();
1932
+ }
1933
+ });
1934
+ presetpanel.add(rough2);
1935
+
1936
+ cLabel shini0 = GetLabel("icons/shadericons/shadericon00014.png", !Grafreed.NIMBUSLAF);
1937
+ shini0.setToolTipText("Shiny");
1938
+ shini0.addMouseListener(new MouseAdapter()
1939
+ {
1940
+ public void mouseClicked(MouseEvent e)
1941
+ {
1942
+ Object3D object = Grafreed.materials.versionlist[14].get(0);
1943
+ cMaterial material = object.material;
1944
+
1945
+ shininessField.setFloat(material.shininess);
1946
+ lightareaField.setFloat(material.lightarea);
1947
+
1948
+ materialtouched = true;
1949
+ applySelf();
1950
+ }
1951
+ });
1952
+ presetpanel.add(shini0);
1953
+
1954
+ cLabel shini1 = GetLabel("icons/shadericons/shadericon00011.png", !Grafreed.NIMBUSLAF);
1955
+ shini1.setToolTipText("Shiny2");
1956
+ shini1.addMouseListener(new MouseAdapter()
1957
+ {
1958
+ public void mouseClicked(MouseEvent e)
1959
+ {
1960
+ Object3D object = Grafreed.materials.versionlist[11].get(0);
1961
+ cMaterial material = object.material;
1962
+
1963
+ shininessField.setFloat(material.shininess);
1964
+ lightareaField.setFloat(material.lightarea);
1965
+
1966
+ materialtouched = true;
1967
+ applySelf();
1968
+ }
1969
+ });
1970
+ presetpanel.add(shini1);
1971
+
1972
+ cLabel shini2 = GetLabel("icons/shadericons/shadericon00012.png", !Grafreed.NIMBUSLAF);
1973
+ shini2.setToolTipText("Shiny3");
1974
+ shini2.addMouseListener(new MouseAdapter()
1975
+ {
1976
+ public void mouseClicked(MouseEvent e)
1977
+ {
1978
+ Object3D object = Grafreed.materials.versionlist[12].get(0);
1979
+ cMaterial material = object.material;
1980
+
1981
+ shininessField.setFloat(material.shininess);
1982
+ lightareaField.setFloat(material.lightarea);
1983
+
1984
+ materialtouched = true;
1985
+ applySelf();
1986
+ }
1987
+ });
1988
+ presetpanel.add(shini2);
1989
+
1990
+ cLabel aniso = GetLabel("icons/shadericons/shadericon00008.png", !Grafreed.NIMBUSLAF);
1991
+ aniso.setToolTipText("AnisoU");
1992
+ aniso.addMouseListener(new MouseAdapter()
1993
+ {
1994
+ public void mouseClicked(MouseEvent e)
1995
+ {
1996
+ Object3D object = Grafreed.materials.versionlist[8].get(0);
1997
+ cMaterial material = object.material;
1998
+
1999
+ anisoField.setFloat(material.aniso);
2000
+ anisoVField.setFloat(material.anisoV);
2001
+
2002
+ materialtouched = true;
2003
+ applySelf();
2004
+ }
2005
+ });
2006
+ presetpanel.add(aniso);
2007
+
2008
+ cLabel aniso2 = GetLabel("icons/shadericons/shadericon00009.png", !Grafreed.NIMBUSLAF);
2009
+ aniso2.setToolTipText("AnisoV");
2010
+ aniso2.addMouseListener(new MouseAdapter()
2011
+ {
2012
+ public void mouseClicked(MouseEvent e)
2013
+ {
2014
+ Object3D object = Grafreed.materials.versionlist[9].get(0);
2015
+ cMaterial material = object.material;
2016
+
2017
+ anisoField.setFloat(material.aniso);
2018
+ anisoVField.setFloat(material.anisoV);
2019
+
2020
+ materialtouched = true;
2021
+ applySelf();
2022
+ }
2023
+ });
2024
+ presetpanel.add(aniso2);
2025
+
2026
+ cLabel aniso3 = GetLabel("icons/shadericons/shadericon00010.png", !Grafreed.NIMBUSLAF);
2027
+ aniso3.setToolTipText("AnisoUV");
2028
+ aniso3.addMouseListener(new MouseAdapter()
2029
+ {
2030
+ public void mouseClicked(MouseEvent e)
2031
+ {
2032
+ Object3D object = Grafreed.materials.versionlist[10].get(0);
2033
+ cMaterial material = object.material;
2034
+
2035
+ anisoField.setFloat(material.aniso);
2036
+ anisoVField.setFloat(material.anisoV);
2037
+
2038
+ materialtouched = true;
2039
+ applySelf();
2040
+ }
2041
+ });
2042
+ presetpanel.add(aniso3);
2043
+
2044
+ cLabel velvet0 = GetLabel("icons/shadericons/shadericon00015.png", !Grafreed.NIMBUSLAF);
2045
+ velvet0.setToolTipText("Velvet");
2046
+ velvet0.addMouseListener(new MouseAdapter()
2047
+ {
2048
+ public void mouseClicked(MouseEvent e)
2049
+ {
2050
+ Object3D object = Grafreed.materials.versionlist[15].get(0);
2051
+ cMaterial material = object.material;
2052
+
2053
+ diffusenessField.setFloat(material.factor);
2054
+ selfshadowField.setFloat(material.diffuseness);
2055
+ sheenField.setFloat(material.sheen);
2056
+ shininessField.setFloat(material.shininess);
2057
+ velvetField.setFloat(material.velvet);
2058
+ shiftField.setFloat(material.shift);
2059
+
2060
+ materialtouched = true;
2061
+ applySelf();
2062
+ }
2063
+ });
2064
+ presetpanel.add(velvet0);
2065
+
2066
+ cLabel bump0 = GetLabel("icons/shadericons/shadericon00016.png", !Grafreed.NIMBUSLAF);
2067
+ bump0.setToolTipText("Bump texture");
2068
+ bump0.addMouseListener(new MouseAdapter()
2069
+ {
2070
+ public void mouseClicked(MouseEvent e)
2071
+ {
2072
+ Object3D object = Grafreed.materials.versionlist[16].get(0);
2073
+ cMaterial material = object.material;
2074
+
2075
+ bumpField.setFloat(object.projectedVertices[0].x / 1000.0);
2076
+ noiseField.setFloat(object.projectedVertices[0].y / 1000.0);
2077
+ powerField.setFloat(object.projectedVertices[2].x / 1000.0);
2078
+
2079
+ materialtouched = true;
2080
+ applySelf();
2081
+ }
2082
+ });
2083
+ presetpanel.add(bump0);
2084
+
2085
+ cLabel halo = GetLabel("icons/shadericons/shadericon00017.png", !Grafreed.NIMBUSLAF);
2086
+ halo.setToolTipText("Halo");
2087
+ halo.addMouseListener(new MouseAdapter()
2088
+ {
2089
+ public void mouseClicked(MouseEvent e)
2090
+ {
2091
+ Object3D object = Grafreed.materials.versionlist[17].get(0);
2092
+ cMaterial material = object.material;
2093
+
2094
+ opacityPowerField.setFloat(object.projectedVertices[2].y / 1000.0);
2095
+
2096
+ materialtouched = true;
2097
+ applySelf();
2098
+ }
2099
+ });
2100
+ presetpanel.add(halo);
2101
+
2102
+ cLabel candle = GetLabel("icons/shadericons/shadericon00018.png", !Grafreed.NIMBUSLAF);
2103
+ candle.setToolTipText("Candle");
2104
+ candle.addMouseListener(new MouseAdapter()
2105
+ {
2106
+ public void mouseClicked(MouseEvent e)
2107
+ {
2108
+ Object3D object = Grafreed.materials.versionlist[18].get(0);
2109
+ cMaterial material = object.material;
2110
+
2111
+ subsurfaceField.setFloat(material.subsurface);
2112
+ shadowbiasField.setFloat(material.shadowbias);
2113
+ ambientField.setFloat(material.ambient);
2114
+ specularField.setFloat(material.specular);
2115
+ lightareaField.setFloat(material.lightarea);
2116
+ shininessField.setFloat(material.shininess);
2117
+
2118
+ materialtouched = true;
2119
+ applySelf();
2120
+ }
2121
+ });
2122
+ presetpanel.add(candle);
2123
+
2124
+ cGridBag panel = new cGridBag().setVertical(true);
2125
+
2126
+ presetpanel.preferredWidth = 1;
2127
+
2128
+ materialpanel.add(presetpanel);
2129
+ materialpanel.add(panel);
2130
+
2131
+ panel.preferredWidth = 8;
2132
+
2133
+ /*
16132134 ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints);
16142135 materialLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1615
- */
2136
+ */
16162137
16172138 cGridBag editBar = new cGridBag().setVertical(false);
16182139
....@@ -1646,45 +2167,50 @@
16462167 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
16472168
16482169 cGridBag colorSection = new cGridBag().setVertical(true);
2170
+
2171
+ cGridBag huepanel = new cGridBag();
2172
+ cGridBag huelabel = new cGridBag();
2173
+ skin = GetLabel("icons/hue.png", false);
2174
+ skin.fit = true;
2175
+ huelabel.add(skin);
2176
+ huelabel.preferredWidth = 20;
2177
+ huepanel.add(new cGridBag()); // Label
2178
+ huepanel.add(huelabel); // Field/slider
2179
+
2180
+ huepanel.preferredHeight = 7;
2181
+
2182
+ colorSection.add(huepanel);
16492183
16502184 cGridBag color = new cGridBag();
1651
- color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints);
1652
- colorLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1653
- color.add(colorField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
2185
+
2186
+ color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints);
2187
+ colorLabel.setHorizontalAlignment(SwingConstants.TRAILING);
2188
+ color.add(colorField = new cNumberSlider(this, 0.001, 1)); // , aConstraints);
2189
+
16542190 //colorField.preferredWidth = 200;
16552191 colorSection.add(color);
16562192
16572193 cGridBag modulation = new cGridBag();
16582194 modulation.add(modulationLabel = new JLabel("Saturation")); // , aConstraints);
16592195 modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1660
- modulation.add(modulationField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
2196
+ modulation.add(saturationField = new cNumberSlider(this, 0.001, 1)); // , aConstraints);
16612197 colorSection.add(modulation);
16622198
2199
+ cGridBag opacity = new cGridBag();
2200
+ opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints);
2201
+ opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
2202
+ opacity.add(opacityField = new cNumberSlider(this, 0.001, 1)); // , aConstraints);
2203
+ colorSection.add(opacity);
2204
+
2205
+ colorSection.add(GetSeparator());
2206
+
16632207 cGridBag texture = new cGridBag();
16642208 texture.add(textureLabel = new JLabel("Texture")); // , aConstraints);
16652209 textureLabel.setHorizontalAlignment(SwingConstants.TRAILING);
16662210 texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
16672211 colorSection.add(texture);
16682212
1669
- cGridBag anisoU = new cGridBag();
1670
- anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints);
1671
- anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1672
- anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1673
- colorSection.add(anisoU);
1674
-
1675
- cGridBag anisoV = new cGridBag();
1676
- anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints);
1677
- anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1678
- anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1679
- colorSection.add(anisoV);
1680
-
1681
- cGridBag shadowbias = new cGridBag();
1682
- shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints);
1683
- shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1684
- shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1685
- colorSection.add(shadowbias);
1686
-
1687
- panel.add(new JSeparator());
2213
+ panel.add(GetSeparator());
16882214
16892215 panel.add(colorSection);
16902216
....@@ -1734,7 +2260,13 @@
17342260 fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
17352261 diffuseSection.add(fakedepth);
17362262
1737
- panel.add(new JSeparator());
2263
+ cGridBag shadowbias = new cGridBag();
2264
+ shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints);
2265
+ shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING);
2266
+ shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
2267
+ diffuseSection.add(shadowbias);
2268
+
2269
+ panel.add(GetSeparator());
17382270
17392271 panel.add(diffuseSection);
17402272
....@@ -1784,42 +2316,48 @@
17842316 // aConstraints.gridy += 1;
17852317 // aConstraints.gridwidth = 1;
17862318
2319
+ cGridBag anisoU = new cGridBag();
2320
+ anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints);
2321
+ anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING);
2322
+ anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
2323
+ specularSection.add(anisoU);
17872324
1788
- panel.add(new JSeparator());
2325
+ cGridBag anisoV = new cGridBag();
2326
+ anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints);
2327
+ anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING);
2328
+ anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
2329
+ specularSection.add(anisoV);
2330
+
2331
+
2332
+ panel.add(GetSeparator());
17892333
17902334 panel.add(specularSection);
17912335
17922336 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
17932337
1794
- cGridBag globalSection = new cGridBag().setVertical(true);
2338
+ //cGridBag globalSection = new cGridBag().setVertical(true);
17952339
17962340 cGridBag camera = new cGridBag();
17972341 camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints);
17982342 cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING);
17992343 camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1800
- globalSection.add(camera);
2344
+ colorSection.add(camera);
18012345
18022346 cGridBag ambient = new cGridBag();
18032347 ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints);
18042348 ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING);
18052349 ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1806
- globalSection.add(ambient);
2350
+ colorSection.add(ambient);
18072351
18082352 cGridBag backlit = new cGridBag();
18092353 backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints);
18102354 backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING);
18112355 backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1812
- globalSection.add(backlit);
2356
+ colorSection.add(backlit);
18132357
1814
- cGridBag opacity = new cGridBag();
1815
- opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints);
1816
- opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1817
- opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1818
- globalSection.add(opacity);
1819
-
1820
- panel.add(new JSeparator());
2358
+ //panel.add(new JSeparator());
18212359
1822
- panel.add(globalSection);
2360
+ //panel.add(globalSection);
18232361
18242362 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
18252363
....@@ -1861,7 +2399,7 @@
18612399 opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints);
18622400 textureSection.add(opacityPower);
18632401
1864
- panel.add(new JSeparator());
2402
+ panel.add(GetSeparator());
18652403
18662404 panel.add(textureSection);
18672405
....@@ -1926,8 +2464,9 @@
19262464 // 3D models
19272465 if (filename.endsWith(".3ds") || filename.endsWith(".3DS"))
19282466 {
1929
- lastConverter = new com.jmex.model.converters.MaxToJme();
1930
- LoadFile(filename, lastConverter);
2467
+ //lastConverter = new com.jmex.model.converters.MaxToJme();
2468
+ //LoadFile(filename, lastConverter);
2469
+ LoadObjFile(filename); // New 3ds loader
19312470 continue;
19322471 }
19332472 if (filename.endsWith(".dae") || filename.endsWith(".DAE"))
....@@ -2653,6 +3192,7 @@
26533192 LA.matXRotate(((Object3D) group.get(group.size() - 1)).toParent, -Math.PI / 2);
26543193 LA.matXRotate(((Object3D) group.get(group.size() - 1)).fromParent, Math.PI / 2);
26553194 }
3195
+
26563196 //cJME.count++;
26573197 //cJME.count %= 12;
26583198 if (gc)
....@@ -2836,6 +3376,7 @@
28363376 }
28373377 }
28383378 }
3379
+
28393380 cFileSystemPane FSPane;
28403381
28413382 void SetMaterial(cMaterial mat, Object3D.cVector2[] others)
....@@ -2845,7 +3386,7 @@
28453386
28463387 freezematerial = true;
28473388 colorField.setFloat(mat.color);
2848
- modulationField.setFloat(mat.modulation);
3389
+ saturationField.setFloat(mat.modulation);
28493390 metalnessField.setFloat(mat.metalness);
28503391 diffuseField.setFloat(mat.diffuse);
28513392 specularField.setFloat(mat.specular);
....@@ -2889,6 +3430,7 @@
28893430 }
28903431 }
28913432 }
3433
+
28923434 freezematerial = false;
28933435 }
28943436
....@@ -3007,12 +3549,17 @@
30073549 // }
30083550
30093551 /**/
3010
- if (deselect)
3552
+ if (deselect || child == null)
30113553 {
30123554 //group.deselectAll();
30133555 //freeze = true;
30143556 GetTree().clearSelection();
30153557 //freeze = false;
3558
+
3559
+ if (child == null)
3560
+ {
3561
+ return;
3562
+ }
30163563 }
30173564
30183565 //group.addSelectee(child);
....@@ -3046,6 +3593,17 @@
30463593 public void itemStateChanged(ItemEvent event)
30473594 {
30483595 // System.out.println("Propagate = " + propagate);
3596
+ if (event.getSource() == pinButton)
3597
+ {
3598
+ copy.pinned ^= true;
3599
+ if (!copy.pinned && !copy.editWindow.copy.selection.contains(copy))
3600
+ {
3601
+ ((GroupEditor)copy.editWindow).listUI.remove(copy);
3602
+ copy.CloseUI();
3603
+ //copy.editWindow.refreshContents();
3604
+ }
3605
+ }
3606
+ else
30493607 if (event.getSource() == propagateToggle)
30503608 {
30513609 propagate ^= true;
....@@ -3150,8 +3708,9 @@
31503708 } else if (event.getSource() == liveCB)
31513709 {
31523710 copy.live ^= true;
3711
+ objEditor.refreshContents(true); // To show item colors
31533712 return;
3154
- } else if (event.getSource() == selectCB)
3713
+ } else if (event.getSource() == selectableCB)
31553714 {
31563715 copy.dontselect ^= true;
31573716 return;
....@@ -3159,7 +3718,7 @@
31593718 {
31603719 copy.hide ^= true;
31613720 copy.Touch(); // display list issue
3162
- objEditor.refreshContents();
3721
+ objEditor.refreshContents(true); // To show item colors
31633722 return;
31643723 } else if (event.getSource() == link2masterCB)
31653724 {
....@@ -3336,9 +3895,9 @@
33363895 {
33373896 Close();
33383897 //return true;
3339
- } else if (source == loadItem)
3898
+ } else if (source == openItem)
33403899 {
3341
- load();
3900
+ Open();
33423901 //return true;
33433902 } else if (source == newItem)
33443903 {
....@@ -3363,6 +3922,10 @@
33633922 {
33643923 generatePOV();
33653924 //return true;
3925
+ } else if (event.getSource() == archiveItem)
3926
+ {
3927
+ cTools.Archive(frame);
3928
+ return;
33663929 } else if (source == zBufferItem)
33673930 {
33683931 try
....@@ -3411,11 +3974,12 @@
34113974
34123975 static public byte[] Compress(Object3D o)
34133976 {
3977
+ // Slower to actually compress.
34143978 try
34153979 {
34163980 ByteArrayOutputStream baos = new ByteArrayOutputStream();
3417
- java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos);
3418
- ObjectOutputStream out = new ObjectOutputStream(zstream);
3981
+// java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos);
3982
+ ObjectOutputStream out = new ObjectOutputStream(baos); //zstream);
34193983
34203984 Object3D parent = o.parent;
34213985 o.parent = null;
....@@ -3426,10 +3990,14 @@
34263990
34273991 out.flush();
34283992
3429
- zstream.close();
3993
+ baos //zstream
3994
+ .close();
34303995 out.close();
34313996
3432
- return baos.toByteArray();
3997
+ byte[] bytes = baos.toByteArray();
3998
+
3999
+ System.out.println("save #bytes = " + bytes.length);
4000
+ return bytes;
34334001 } catch (Exception e)
34344002 {
34354003 System.err.println(e);
....@@ -3439,13 +4007,16 @@
34394007
34404008 static public Object Uncompress(byte[] bytes)
34414009 {
3442
- System.out.println("#bytes = " + bytes.length);
4010
+ System.out.println("restore #bytes = " + bytes.length);
34434011 try
34444012 {
34454013 ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
3446
- java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais);
3447
- ObjectInputStream in = new ObjectInputStream(istream);
4014
+ //java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais);
4015
+ ObjectInputStream in = new ObjectInputStream(bais); // istream);
34484016 Object obj = in.readObject();
4017
+
4018
+ bais //istream
4019
+ .close();
34494020 in.close();
34504021
34514022 return obj;
....@@ -3500,39 +4071,95 @@
35004071 return null;
35014072 }
35024073
3503
- java.util.Hashtable<java.util.UUID, Object3D> hashtable = new java.util.Hashtable<java.util.UUID, Object3D>();
35044074
35054075 public void Save()
35064076 {
4077
+ //Save(true);
4078
+ Replace();
4079
+ SetUndoStates();
4080
+ }
4081
+
4082
+ private boolean Equal(byte[] compress, byte[] name)
4083
+ {
4084
+ if (compress.length != name.length)
4085
+ {
4086
+ return false;
4087
+ }
4088
+
4089
+ for (int i=compress.length; --i>=0;)
4090
+ {
4091
+ if (compress[i] != name[i])
4092
+ return false;
4093
+ }
4094
+
4095
+ return true;
4096
+ }
4097
+
4098
+ java.util.Hashtable<java.util.UUID, Object3D> versiontable = new java.util.Hashtable<java.util.UUID, Object3D>();
4099
+
4100
+ void DeleteVersion()
4101
+ {
4102
+ for (int i = copy.versionindex; i < copy.versionlist.length-1; i++)
4103
+ {
4104
+ copy.versionlist[i] = copy.versionlist[i+1];
4105
+ }
4106
+
4107
+ CopyChanged();
4108
+
4109
+ SetUndoStates();
4110
+ }
4111
+
4112
+ public boolean Save(boolean user)
4113
+ {
35074114 System.err.println("Save");
4115
+ //Replace();
35084116
35094117 cRadio tab = GetCurrentTab();
35104118
3511
- boolean temp = CameraPane.SWITCH;
3512
- CameraPane.SWITCH = false;
4119
+ Object3D compress = CompressCopy(); // Saved version. No need for "Replace"?
35134120
3514
- copy.ExtractBigData(hashtable);
4121
+ boolean thesame = false;
4122
+
4123
+// if (copy.versionindex > 0 && copy.versions[copy.versionindex-1] != null && Equal(compress, copy.versions[copy.versionindex-1]))
4124
+// {
4125
+// thesame = true;
4126
+// }
35154127
35164128 //EditorFrame.m_MainFrame.requestFocusInWindow();
3517
- tab.graphs[tab.undoindex++] = Compress(copy);
3518
-
3519
- copy.RestoreBigData(hashtable);
3520
-
3521
- CameraPane.SWITCH = temp;
3522
-
3523
- //assert(hashtable.isEmpty());
3524
-
3525
- for (int i = tab.undoindex; i < tab.graphs.length; i++)
4129
+ if (!thesame)
35264130 {
3527
- tab.graphs[i] = null;
4131
+ for (int i = copy.versionlist.length; --i > copy.versionindex+1;)
4132
+ {
4133
+ copy.versionlist[i] = copy.versionlist[i-1];
4134
+ }
4135
+
4136
+ //tab.user[tab.versionindex] = user;
4137
+ //boolean increment = true; // tab.graphs[tab.versionindex] == null;
4138
+
4139
+ copy.versionlist[++copy.versionindex] = compress;
4140
+
4141
+ // if (increment)
4142
+ // tab.versionindex++;
35284143 }
35294144
4145
+ //copy.RestoreBigData(versiontable);
4146
+
4147
+ //assert(hashtable.isEmpty());
4148
+
4149
+// for (int i = copy.versionindex+1; i < copy.versionlist.length; i++)
4150
+// {
4151
+// //tab.user[i] = false;
4152
+// copy.versionlist[i] = null;
4153
+// }
4154
+
4155
+ SetUndoStates();
4156
+
35304157 // test save
35314158 if (false)
35324159 {
35334160 try
35344161 {
3535
- FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex);
4162
+ FileOutputStream ostream = new FileOutputStream("save" + copy.versionindex);
35364163 ObjectOutputStream p = new ObjectOutputStream(ostream);
35374164
35384165 p.writeObject(copy);
....@@ -3545,26 +4172,68 @@
35454172 e.printStackTrace();
35464173 }
35474174 }
4175
+
4176
+ return !thesame;
4177
+ }
4178
+
4179
+ boolean flashIt = true;
4180
+
4181
+ void RefreshSelection()
4182
+ {
4183
+ Object3D selection = new Object3D();
4184
+
4185
+ for (int i = 0; i < copy.selection.size(); i++)
4186
+ {
4187
+ Object3D elem = copy.selection.elementAt(i);
4188
+
4189
+ Object3D obj = copy.GetObject(elem.GetUUID());
4190
+
4191
+ if (obj == null)
4192
+ {
4193
+ copy.selection.remove(i--);
4194
+ }
4195
+ else
4196
+ {
4197
+ selection.add(obj);
4198
+ copy.selection.setElementAt(obj, i);
4199
+ }
4200
+ }
4201
+
4202
+ flashIt = false;
4203
+ GetTree().clearSelection();
4204
+ for (int i = 0; i < selection.size(); i++)
4205
+ GetTree().addSelectionPath(selection.elementAt(i).GetTreePath().GetTreePath());
4206
+ flashIt = true;
4207
+
4208
+ //refreshContents(false);
35484209 }
35494210
3550
- void CopyChanged(Object3D obj)
4211
+ void CopyChanged()
35514212 {
4213
+ Object3D obj = copy.versionlist[copy.versionindex];
4214
+
4215
+ SetUndoStates();
4216
+
35524217 boolean temp = CameraPane.SWITCH;
35534218 CameraPane.SWITCH = false;
35544219
3555
- copy.ExtractBigData(hashtable);
4220
+ copy.ExtractBigData(versiontable);
35564221
35574222 copy.clear();
35584223
4224
+ copy.skyboxname = obj.skyboxname;
4225
+ copy.skyboxext = obj.skyboxext;
4226
+
35594227 for (int i=0; i<obj.Size(); i++)
35604228 {
35614229 copy.add(obj.get(i));
35624230 }
35634231
3564
- copy.RestoreBigData(hashtable);
4232
+ copy.RestoreBigData(versiontable);
35654233
35664234 CameraPane.SWITCH = temp;
35674235
4236
+ RefreshSelection();
35684237 //assert(hashtable.isEmpty());
35694238
35704239 copy.Touch();
....@@ -3585,45 +4254,139 @@
35854254 }
35864255 }
35874256
3588
- refreshContents();
4257
+ refreshContents(true);
35894258 }
35904259
3591
- public void Undo()
4260
+ cButton previousVersionButton;
4261
+ cButton restoreButton;
4262
+ cButton replaceButton;
4263
+ cButton nextVersionButton;
4264
+ cButton saveVersionButton;
4265
+ cButton deleteVersionButton;
4266
+
4267
+ boolean muteSlider;
4268
+
4269
+ int VersionCount()
35924270 {
4271
+ int count = 0;
4272
+
4273
+ for (int i = copy.versionlist.length; --i >= 0;)
4274
+ {
4275
+ if (copy.versionlist[i] != null)
4276
+ count++;
4277
+ }
4278
+
4279
+ return count;
4280
+ }
4281
+
4282
+ void SetUndoStates()
4283
+ {
4284
+ cRadio tab = GetCurrentTab();
4285
+
4286
+ restoreButton.setEnabled(true); // copy.versionindex != -1);
4287
+ replaceButton.setEnabled(true); // copy.versionindex != -1);
4288
+
4289
+ previousVersionButton.setEnabled(copy.versionindex > 0);
4290
+ nextVersionButton.setEnabled(copy.versionlist[copy.versionindex + 1] != null);
4291
+
4292
+ deleteVersionButton.setEnabled(//copy.versionindex > 0 &&
4293
+ copy.versionlist[copy.versionindex + 1] != null);
4294
+
4295
+ muteSlider = true;
4296
+ versionSlider.setMaximum(VersionCount() - 1);
4297
+ versionSlider.setInteger(copy.versionindex);
4298
+ muteSlider = false;
4299
+ }
4300
+
4301
+ public boolean PreviousVersion()
4302
+ {
4303
+ // Option?
4304
+ Replace();
4305
+
35934306 System.err.println("Undo");
35944307
35954308 cRadio tab = GetCurrentTab();
35964309
3597
- if (tab.undoindex == 0)
4310
+ if (copy.versionindex == 0)
35984311 {
35994312 java.awt.Toolkit.getDefaultToolkit().beep();
3600
- return;
4313
+ return false;
36014314 }
36024315
3603
- if (tab.graphs[tab.undoindex] == null)
3604
- {
3605
- Save();
3606
- tab.undoindex -= 1;
3607
- }
4316
+// if (tab.graphs[tab.versionindex] == null) // || !tab.user[tab.versionindex])
4317
+// {
4318
+// if (Save(false))
4319
+// tab.versionindex -= 1;
4320
+// else
4321
+// {
4322
+// if (tab.versionindex <= 0)
4323
+// return false;
4324
+// else
4325
+// tab.versionindex -= 1;
4326
+// }
4327
+// }
36084328
3609
- tab.undoindex -= 1;
4329
+ copy.versionindex -= 1;
36104330
3611
- CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex]));
4331
+ CopyChanged();
4332
+
4333
+ return true;
36124334 }
36134335
3614
- public void Redo()
4336
+ public boolean Restore()
36154337 {
4338
+ System.err.println("Restore");
4339
+
36164340 cRadio tab = GetCurrentTab();
36174341
3618
- if (tab.graphs[tab.undoindex + 1] == null)
4342
+ if (copy.versionindex == -1 || copy.versionlist[copy.versionindex] == null)
4343
+ {
4344
+ java.awt.Toolkit.getDefaultToolkit().beep();
4345
+ return false;
4346
+ }
4347
+
4348
+ //CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex]));
4349
+ CopyChanged();
4350
+
4351
+ return true;
4352
+ }
4353
+
4354
+ public boolean Replace()
4355
+ {
4356
+ System.err.println("Replace");
4357
+
4358
+ cRadio tab = GetCurrentTab();
4359
+
4360
+ if (copy.versionindex == -1 || copy.versionlist[copy.versionindex] == null)
4361
+ {
4362
+ // No version yet. OK. java.awt.Toolkit.getDefaultToolkit().beep();
4363
+ return false;
4364
+ }
4365
+
4366
+ copy.versionlist[copy.versionindex] = CompressCopy();
4367
+
4368
+ return true;
4369
+ }
4370
+
4371
+ public void NextVersion()
4372
+ {
4373
+ // Option?
4374
+ Replace();
4375
+
4376
+ cRadio tab = GetCurrentTab();
4377
+
4378
+ if (copy.versionlist[copy.versionindex + 1] == null)
36194379 {
36204380 java.awt.Toolkit.getDefaultToolkit().beep();
36214381 return;
36224382 }
36234383
3624
- tab.undoindex += 1;
4384
+ copy.versionindex += 1;
36254385
3626
- CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex]));
4386
+ CopyChanged();
4387
+
4388
+ //if (!tab.user[tab.versionindex])
4389
+ // tab.graphs[tab.versionindex] = null;
36274390 }
36284391
36294392 void ImportGFD()
....@@ -3834,7 +4597,7 @@
38344597 //copy.material = new cMaterial(copy.GetMaterial());
38354598
38364599 current.color = (float) colorField.getFloat();
3837
- current.modulation = (float) modulationField.getFloat();
4600
+ current.modulation = (float) saturationField.getFloat();
38384601 current.metalness = (float) metalnessField.getFloat();
38394602 current.diffuse = (float) diffuseField.getFloat();
38404603 current.specular = (float) specularField.getFloat();
....@@ -3867,7 +4630,7 @@
38674630 cMaterial mat = copy.material;
38684631
38694632 colorField.SetToolTipValue((mat.color));
3870
- modulationField.SetToolTipValue((mat.modulation));
4633
+ saturationField.SetToolTipValue((mat.modulation));
38714634 metalnessField.SetToolTipValue((mat.metalness));
38724635 diffuseField.SetToolTipValue((mat.diffuse));
38734636 specularField.SetToolTipValue((mat.specular));
....@@ -3919,9 +4682,26 @@
39194682 //copy.Touch();
39204683 }
39214684
4685
+ cNumberSlider versionSlider;
4686
+
39224687 public void stateChanged(ChangeEvent e)
39234688 {
39244689 // assert(false);
4690
+ if (e.getSource() == versionSlider)
4691
+ {
4692
+ if (muteSlider)
4693
+ return;
4694
+
4695
+ int version = versionSlider.getInteger();
4696
+
4697
+ if (copy.versionlist[version] != null)
4698
+ {
4699
+ copy.versionindex = version;
4700
+ CopyChanged();
4701
+ }
4702
+
4703
+ return;
4704
+ }
39254705
39264706 if (freezematerial)
39274707 {
....@@ -3957,6 +4737,12 @@
39574737 {
39584738 //System.out.println("stateChanged = " + this);
39594739 materialtouched = true;
4740
+
4741
+ if (e.getSource() == colorField && saturationField.getFloat() == 0.001)
4742
+ {
4743
+ saturationField.setFloat(1);
4744
+ }
4745
+
39604746 applySelf();
39614747 //System.out.println("this = " + this);
39624748 //System.out.println("PARENT = " + parent);
....@@ -4256,6 +5042,7 @@
42565042 {
42575043 if (GetTree() != null)
42585044 {
5045
+ GetTree().revalidate();
42595046 GetTree().repaint();
42605047 }
42615048
....@@ -4264,13 +5051,16 @@
42645051 ctrlPanel.validate(); // ? new
42655052 ctrlPanel.repaint();
42665053 }
5054
+
5055
+ if (previousVersionButton != null && copy.versionlist != null)
5056
+ SetUndoStates();
42675057 }
42685058
42695059 static TweenManager tweenManager = new TweenManager();
42705060
42715061 void makeSomething(Object3D thing, boolean resetmodel) // deselect)
42725062 {
4273
- if (Globals.SAVEONMAKE) // && resetmodel)
5063
+ if (Globals.REPLACEONMAKE) // && resetmodel)
42745064 Save();
42755065 //Tween.set(thing, 0).target(1).start(tweenManager);
42765066 //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager);
....@@ -4512,7 +5302,9 @@
45125302 readobj.ResetDisplayList();
45135303 } catch (Exception e)
45145304 {
4515
- //e.printStackTrace();
5305
+ if (!e.toString().contains("GZIP"))
5306
+ e.printStackTrace();
5307
+
45165308 try
45175309 {
45185310 java.io.FileInputStream istream = new java.io.FileInputStream(fullname);
....@@ -4586,12 +5378,14 @@
45865378
45875379 if (readobj != null)
45885380 {
4589
- if (Globals.SAVEONMAKE)
4590
- Save();
5381
+ //if (Globals.SAVEONMAKE) // A new object cannot share meshes
5382
+ // Save();
45915383 try
45925384 {
45935385 //readobj.deepCopySelf(copy);
45945386 copy.clear(); // june 2014
5387
+ copy.skyboxname = readobj.skyboxname;
5388
+ copy.skyboxext = readobj.skyboxext;
45955389 for (int i = 0; i < readobj.size(); i++)
45965390 {
45975391 Object3D child = readobj.get(i); // reserve(i);
....@@ -4632,6 +5426,7 @@
46325426 }
46335427 } catch (ClassCastException e)
46345428 {
5429
+ e.printStackTrace();
46355430 assert (false);
46365431 Composite c = (Composite) copy;
46375432 c.children.clear();
....@@ -4642,17 +5437,28 @@
46425437 c.addChild(csg);
46435438 }
46445439
5440
+ copy.versionlist = readobj.versionlist;
5441
+ copy.versionindex = readobj.versionindex;
5442
+
5443
+ if (copy.versionlist == null)
5444
+ {
5445
+ copy.versionlist = new Object3D[100];
5446
+ copy.versionindex = -1;
5447
+ }
5448
+
5449
+ //? SetUndoStates();
5450
+
46455451 ResetModel();
46465452 copy.HardTouch(); // recompile?
46475453 refreshContents();
46485454 }
46495455 }
46505456
4651
- void load() // throws ClassNotFoundException
5457
+ void Open() // throws ClassNotFoundException
46525458 {
46535459 if (Grafreed.standAlone)
46545460 {
4655
- FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD);
5461
+ FileDialog browser = new FileDialog(frame, "Open", FileDialog.LOAD);
46565462 browser.show();
46575463 String filename = browser.getFile();
46585464 if (filename != null && filename.length() > 0)
....@@ -4751,6 +5557,7 @@
47515557 //ps.print(buffer.toString());
47525558 } catch (IOException e)
47535559 {
5560
+ e.printStackTrace();
47545561 }
47555562 }
47565563
....@@ -4765,6 +5572,8 @@
47655572 String filename = browser.getFile();
47665573 if (filename != null && filename.length() > 0)
47675574 {
5575
+ if (!filename.endsWith(".gfd"))
5576
+ filename += ".gfd";
47685577 lastname = browser.getDirectory() + filename;
47695578 save();
47705579 }
....@@ -4931,7 +5740,7 @@
49315740 MenuBar menuBar;
49325741 Menu fileMenu;
49335742 MenuItem newItem;
4934
- MenuItem loadItem;
5743
+ MenuItem openItem;
49355744 MenuItem saveItem;
49365745 MenuItem saveAsItem;
49375746 MenuItem exportAsItem;
....@@ -4954,6 +5763,7 @@
49545763 CheckboxMenuItem toggleSwitchItem;
49555764 CheckboxMenuItem toggleRootItem;
49565765 CheckboxMenuItem animationItem;
5766
+ MenuItem archiveItem;
49575767 CheckboxMenuItem toggleHandleItem;
49585768 CheckboxMenuItem togglePaintItem;
49595769 JSplitPane mainPanel;
....@@ -4967,6 +5777,7 @@
49675777 ButtonGroup buttonGroup;
49685778
49695779 cGridBag toolboxPanel;
5780
+ cGridBag skyboxPanel;
49705781 cGridBag materialPanel;
49715782 cGridBag ctrlPanel;
49725783
....@@ -5040,7 +5851,7 @@
50405851 JLabel colorLabel;
50415852 cNumberSlider colorField;
50425853 JLabel modulationLabel;
5043
- cNumberSlider modulationField;
5854
+ cNumberSlider saturationField;
50445855 JLabel metalnessLabel;
50455856 cNumberSlider metalnessField;
50465857 JLabel diffuseLabel;