Normand Briere
2019-05-02 a76491b66a2e304d9ae27a162f407b98c70fbafa
ObjEditor.java
....@@ -138,34 +138,41 @@
138138 public void closeUI()
139139 {
140140 //new Exception().printStackTrace();
141
- System.out.println("this = " + this);
142
- System.out.println("objEditor = " + objEditor);
141
+// System.out.println("this = " + this);
142
+// System.out.println("objEditor = " + objEditor);
143143 //nameField.removeActionListener(this);
144
- objEditor.ctrlPanel.remove(nameField);
144
+// objEditor.ctrlPanel.remove(nameField);
145
+
146
+ objEditor.ctrlPanel.remove(namePanel);
145147
146148 if (!GroupEditor.allparams)
147149 return;
148150
149
- objEditor.ctrlPanel.remove(liveCB);
150
- objEditor.ctrlPanel.remove(hideCB);
151
- objEditor.ctrlPanel.remove(markCB);
152
-
153
- objEditor.ctrlPanel.remove(randomCB);
154
- objEditor.ctrlPanel.remove(speedupCB);
155
- objEditor.ctrlPanel.remove(rewindCB);
156
-
157
- objEditor.ctrlPanel.remove(resetButton);
158
- objEditor.ctrlPanel.remove(stepButton);
159
-// objEditor.ctrlPanel.remove(stepAllButton);
160
-// objEditor.ctrlPanel.remove(resetAllButton);
161
- objEditor.ctrlPanel.remove(link2masterCB);
162
- //objEditor.ctrlPanel.remove(flipVCB);
163
- //objEditor.ctrlPanel.remove(texresMenu);
164
- objEditor.ctrlPanel.remove(slowerButton);
165
- objEditor.ctrlPanel.remove(fasterButton);
166
- objEditor.ctrlPanel.remove(remarkButton);
151
+// objEditor.ctrlPanel.remove(liveCB);
152
+// objEditor.ctrlPanel.remove(hideCB);
153
+// objEditor.ctrlPanel.remove(markCB);
154
+//
155
+// objEditor.ctrlPanel.remove(randomCB);
156
+// objEditor.ctrlPanel.remove(speedupCB);
157
+// objEditor.ctrlPanel.remove(rewindCB);
158
+//
159
+// objEditor.ctrlPanel.remove(resetButton);
160
+// objEditor.ctrlPanel.remove(stepButton);
161
+//// objEditor.ctrlPanel.remove(stepAllButton);
162
+//// objEditor.ctrlPanel.remove(resetAllButton);
163
+// objEditor.ctrlPanel.remove(link2masterCB);
164
+// //objEditor.ctrlPanel.remove(flipVCB);
165
+// //objEditor.ctrlPanel.remove(texresMenu);
166
+// objEditor.ctrlPanel.remove(slowerButton);
167
+// objEditor.ctrlPanel.remove(fasterButton);
168
+// objEditor.ctrlPanel.remove(remarkButton);
167169
168
- Remove(normalpushField);
170
+ objEditor.ctrlPanel.remove(setupPanel);
171
+ objEditor.ctrlPanel.remove(commandsPanel);
172
+ objEditor.ctrlPanel.remove(pushPanel);
173
+ //objEditor.ctrlPanel.remove(fillPanel);
174
+
175
+ //Remove(normalpushField);
169176 }
170177
171178 public ObjEditor GetEditor()
....@@ -353,21 +360,23 @@
353360 objectPanel = new JTabbedPane();
354361 toolbarPanel = new JPanel();
355362 toolbarPanel.setName("Toolbar");
356
- treePanel = new JPanel();
363
+ treePanel = new cGridBag();
357364 treePanel.setName("Tree");
358
- ctrlPanel = new cGridBag(); // new GridBagLayout());
365
+ ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout());
359366 ctrlPanel.setName("Edit");
360367 materialPanel = new cGridBag().setVertical(true);
361368 materialPanel.setName("Material");
362369 /*JTextPane*/
363370 infoarea = createTextPane();
371
+ doc = infoarea.getStyledDocument();
372
+
364373 infoarea.setEditable(true);
365374 SetText();
366375 // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f));
367376 // infoarea.setOpaque(false);
368377 // //infoarea.setForeground(textcolor);
369
- infoarea.setLineWrap(true);
370
- infoarea.setWrapStyleWord(true);
378
+// TEXTAREA infoarea.setLineWrap(true);
379
+// TEXTAREA infoarea.setWrapStyleWord(true);
371380 infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED);
372381 infoPanel.setPreferredSize(new Dimension(50, 200));
373382 infoPanel.setName("Info");
....@@ -378,15 +387,15 @@
378387 mainPanel.setName("Main");
379388 mainPanel.setContinuousLayout(true);
380389 mainPanel.setOneTouchExpandable(true);
381
- mainPanel.setDividerLocation(1.0);
382390 mainPanel.setDividerSize(9);
383
- mainPanel.setResizeWeight(0);
391
+ mainPanel.setDividerLocation(0.5); //1.0);
392
+ mainPanel.setResizeWeight(0.5);
384393
385394 //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5));
386395 //mainPanel.setLayout(new GridBagLayout());
387396 toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
388
- treePanel.setLayout(new GridBagLayout());
389
- ctrlPanel.setLayout(new GridBagLayout());
397
+// treePanel.setLayout(new GridBagLayout());
398
+ //ctrlPanel.setLayout(new GridBagLayout());
390399 //materialPanel.setLayout(new GridBagLayout());
391400
392401 aConstraints = new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0,
....@@ -426,7 +435,7 @@
426435 static String newline = "\n";
427436 protected static final String buttonString = "JButton";
428437 StyledDocument doc;
429
- JTextArea infoarea;
438
+ JTextPane infoarea;
430439
431440 void ClearInfo()
432441 {
....@@ -493,7 +502,10 @@
493502 }
494503
495504 if (full)
496
- si.SendInfo(" BBox: " + minima + " - " + maxima, "regular");
505
+ {
506
+ si.SendInfo(" BBox min: " + minima, "regular");
507
+ si.SendInfo(" BBox max: " + maxima, "regular");
508
+ }
497509
498510 if (sel.bRep != null)
499511 {
....@@ -591,6 +603,9 @@
591603 {
592604 CameraPane.pointflow = (PointFlow) sel;
593605 }
606
+
607
+ si.SendInfo("_____________________", "regular");
608
+ si.SendInfo("", "regular");
594609 }
595610 }
596611
....@@ -622,52 +637,52 @@
622637 cameraView.ToggleFullScreen();
623638 }
624639
625
- private JTextArea createTextPane()
640
+ private JTextPane createTextPane()
626641 {
627
- String[] initString =
628
- {
629
- "This is an editable JTextPane, ", //regular
630
- "another ", //italic
631
- "styled ", //bold
632
- "text ", //small
633
- "component, ", //large
634
- "which supports embedded components..." + newline,//regular
635
- " " + newline, //button
636
- "...and embedded icons..." + newline, //regular
637
- " ", //icon
638
- newline + "JTextPane is a subclass of JEditorPane that "
639
- + "uses a StyledEditorKit and StyledDocument, and provides "
640
- + "cover methods for interacting with those objects."
641
- };
642
+// TEXTAREA String[] initString =
643
+// {
644
+// "This is an editable JTextPane, ", //regular
645
+// "another ", //italic
646
+// "styled ", //bold
647
+// "text ", //small
648
+// "component, ", //large
649
+// "which supports embedded components..." + newline,//regular
650
+// " " + newline, //button
651
+// "...and embedded icons..." + newline, //regular
652
+// " ", //icon
653
+// newline + "JTextPane is a subclass of JEditorPane that "
654
+// + "uses a StyledEditorKit and StyledDocument, and provides "
655
+// + "cover methods for interacting with those objects."
656
+// };
657
+//
658
+// String[] initStyles =
659
+// {
660
+// "regular", "italic", "bold", "small", "large",
661
+// "regular", "button", "regular", "icon",
662
+// "regular"
663
+// };
664
+//
665
+// JTextPane textPane = new JTextPane();
666
+// textPane.setEditable(true);
667
+// /*StyledDocument*/ doc = textPane.getStyledDocument();
668
+// addStylesToDocument(doc);
669
+//
670
+// try
671
+// {
672
+// for (int j = 0; j < 2; j++)
673
+// {
674
+// for (int i = 0; i < initString.length; i++)
675
+// {
676
+// doc.insertString(doc.getLength(), initString[i],
677
+// doc.getStyle(initStyles[i]));
678
+// }
679
+// }
680
+// } catch (BadLocationException ble)
681
+// {
682
+// System.err.println("Couldn't insert initial text into text pane.");
683
+// }
642684
643
- String[] initStyles =
644
- {
645
- "regular", "italic", "bold", "small", "large",
646
- "regular", "button", "regular", "icon",
647
- "regular"
648
- };
649
-
650
- JTextPane textPane = new JTextPane();
651
- textPane.setEditable(true);
652
- /*StyledDocument*/ doc = textPane.getStyledDocument();
653
- addStylesToDocument(doc);
654
-
655
- try
656
- {
657
- for (int j = 0; j < 2; j++)
658
- {
659
- for (int i = 0; i < initString.length; i++)
660
- {
661
- doc.insertString(doc.getLength(), initString[i],
662
- doc.getStyle(initStyles[i]));
663
- }
664
- }
665
- } catch (BadLocationException ble)
666
- {
667
- System.err.println("Couldn't insert initial text into text pane.");
668
- }
669
-
670
- return new JTextArea(); // textPane;
685
+ return new JTextPane(); // textPane;
671686 }
672687
673688 protected void addStylesToDocument(StyledDocument doc)
....@@ -767,54 +782,44 @@
767782 JButton slowerButton;
768783 JButton fasterButton;
769784 JButton remarkButton;
785
+
786
+ cGridBag namePanel;
787
+ cGridBag setupPanel;
788
+ cGridBag commandsPanel;
789
+ cGridBag pushPanel;
790
+ cGridBag fillPanel;
770791
771
- JCheckBox AddCheckBox(ObjEditor oe, String label, boolean on)
792
+ JCheckBox AddCheckBox(cGridBag panel, String label, boolean on)
772793 {
773794 JCheckBox cb;
774795
775
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
776
- oe.aConstraints.gridwidth = 1; // 3;
777
-// oe.aConstraints.weightx = 1;
778
-// oe.aConstraints.anchor = GridBagConstraints.WEST;
779
- oe.ctrlPanel.add(cb = new JCheckBox(label, on), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
796
+ panel.add(cb = new JCheckBox(label, on)); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
780797 cb.addItemListener(this);
781
-// oe.aConstraints.anchor = GridBagConstraints.EAST;
782
- oe.aConstraints.gridwidth = 1;
783
- oe.aConstraints.gridx += 1;
784798
785799 return cb;
786800 }
787801
788
- cButton AddButton(ObjEditor oe, String label)
802
+ cButton AddButton(cGridBag panel, String label)
789803 {
790804 cButton cb;
791805
792
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
793
- oe.aConstraints.gridwidth = 1;
794
-// oe.aConstraints.weightx = 1;
795
-// oe.aConstraints.anchor = GridBagConstraints.WEST;
796
- oe.ctrlPanel.add(cb = new cButton(label), oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1);
806
+ panel.add(cb = new cButton(label)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1);
797807 cb.addActionListener(this);
798
-// oe.aConstraints.anchor = GridBagConstraints.EAST;
799
- oe.aConstraints.gridwidth = 1;
800
- oe.aConstraints.gridx += 1;
801808
802809 return cb;
803810 }
804811
805
- JComboBox AddCombo(ObjEditor oe, java.util.Vector list, int item)
812
+ JComboBox AddCombo(cGridBag panel, java.util.Vector list, int item)
806813 {
807814 JComboBox combo;
808815
809
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
810
- oe.ctrlPanel.add(combo = new JComboBox(new cListModel(list, item)), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
811
- oe.aConstraints.gridx += 1;
816
+ panel.add(combo = new JComboBox(new cListModel(list, item))); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
812817 combo.addActionListener(this);
813818
814819 return combo;
815820 }
816821
817
- cNumberSlider AddSlider(cGridBag ctrlPanel, String label, double min, double max, double current, double pow)
822
+ cGridBag AddSlider(cGridBag panel, String label, double min, double max, double current, double pow)
818823 {
819824 cGridBag control = new cGridBag();
820825
....@@ -826,12 +831,12 @@
826831 control.add(combo = new cNumberSlider(this, min, max, pow)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
827832 combo.setFloat(current);
828833
829
- ctrlPanel.add(control);
834
+ panel.add(control);
830835
831
- return combo;
836
+ return control;
832837 }
833838
834
- cNumberSlider AddSlider(cGridBag ctrlPanel, String label, int min, int max, int current)
839
+ cGridBag AddSlider(cGridBag panel, String label, int min, int max, int current)
835840 {
836841 cGridBag control = new cGridBag();
837842
....@@ -839,25 +844,21 @@
839844
840845 JLabel jlabel = new JLabel(label);
841846 jlabel.setHorizontalAlignment(SwingConstants.TRAILING);
842
- ctrlPanel.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
843
- ctrlPanel.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
847
+ control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
848
+ control.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
844849 combo.setInteger(current);
845850
846
- ctrlPanel.add(control);
851
+ panel.add(control);
847852
848
- return combo;
853
+ return control;
849854 }
850855
851856 JTextArea AddText(cGridBag ctrlPanel, String name)
852857 {
853858 JTextArea text;
854859
855
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
856
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
857860 ctrlPanel.add(text = new JTextArea(name)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
858861 text.addCaretListener(this);
859
- aConstraints.gridx += 1;
860
- aConstraints.gridwidth = 1;
861862
862863 return text;
863864 }
....@@ -896,7 +897,7 @@
896897
897898 /*
898899 */
899
- void Return() // ObjEditor oe)
900
+ void Return0() // ObjEditor oe)
900901 {
901902 aConstraints.gridy += 1;
902903 aConstraints.gridx = 0;
....@@ -951,37 +952,70 @@
951952
952953 void SetupUI2(ObjEditor oe)
953954 {
954
-// oe.aConstraints.weightx = 0;
955
-// oe.aConstraints.weighty = 0;
956
-// oe.aConstraints.gridx = 0;
957
-// oe.aConstraints.gridy = 0;
958
- SetupName(oe);
955
+ //SetupName(oe);
956
+
957
+ namePanel = new cGridBag();
958
+
959
+ nameField = AddText(namePanel, copy.GetName());
960
+ namePanel.add(nameField);
961
+ oe.ctrlPanel.add(namePanel);
962
+
963
+ oe.ctrlPanel.Return();
959964
960965 if (!GroupEditor.allparams)
961966 return;
962967
963
- liveCB = AddCheckBox(oe, "Live", copy.live);
964
- link2masterCB = AddCheckBox(oe, "Supp", copy.link2master);
965
- hideCB = AddCheckBox(oe, "Hide", copy.hide);
968
+ setupPanel = new cGridBag().setVertical(false);
969
+
970
+ liveCB = AddCheckBox(setupPanel, "Live", copy.live);
971
+ liveCB.setToolTipText("Animate object");
972
+ hideCB = AddCheckBox(setupPanel, "Hide", copy.hide);
973
+ hideCB.setToolTipText("Hide object");
966974 // Return();
967
- markCB = AddCheckBox(oe, "Mark", copy.marked);
968
- rewindCB = AddCheckBox(oe, "Rew", copy.rewind);
969
- randomCB = AddCheckBox(oe, "Rand", copy.random);
970
- Return();
971
- resetButton = AddButton(oe, "Reset");
972
- stepButton = AddButton(oe, "Step");
975
+ markCB = AddCheckBox(setupPanel, "Mark", copy.marked);
976
+ markCB.setToolTipText("Set the animation target transform");
977
+
978
+ rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind);
979
+ rewindCB.setToolTipText("Rewind animation");
980
+
981
+ randomCB = AddCheckBox(setupPanel, "Random", copy.random);
982
+ randomCB.setToolTipText("Option for switch node");
983
+
984
+ if (Globals.ADVANCED)
985
+ {
986
+ link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master);
987
+ link2masterCB.setToolTipText("Attach to support");
988
+ speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup);
989
+ speedupCB.setToolTipText("Option motion capture");
990
+ }
991
+
992
+ oe.ctrlPanel.add(setupPanel);
993
+ oe.ctrlPanel.Return();
994
+
995
+ commandsPanel = new cGridBag().setVertical(false);
996
+
997
+ resetButton = AddButton(commandsPanel, "Reset");
998
+ resetButton.setToolTipText("Jump to frame zero");
999
+ stepButton = AddButton(commandsPanel, "Step");
1000
+ stepButton.setToolTipText("Step one frame");
9731001 // resetAllButton = AddButton(oe, "Reset All");
9741002 // stepAllButton = AddButton(oe, "Step All");
975
- speedupCB = AddCheckBox(oe, "Speed", copy.speedup);
9761003 // Return();
977
- slowerButton = AddButton(oe, "Slow");
978
- fasterButton = AddButton(oe, "Fast");
979
- remarkButton = AddButton(oe, "Rem");
1004
+ slowerButton = AddButton(commandsPanel, "Slow");
1005
+ slowerButton.setToolTipText("Decrease animation speed");
1006
+ fasterButton = AddButton(commandsPanel, "Fast");
1007
+ fasterButton.setToolTipText("Increase animation speed");
1008
+ remarkButton = AddButton(commandsPanel, "Remark");
1009
+ remarkButton.setToolTipText("Set the current transform as the target");
9801010
981
- //Return();
1011
+ oe.ctrlPanel.add(commandsPanel);
1012
+ oe.ctrlPanel.Return();
9821013
983
- //normalpushField = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, -1);
1014
+ pushPanel = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, 1);
1015
+ normalpushField = (cNumberSlider)pushPanel.getComponent(1);
9841016 //Return();
1017
+
1018
+ oe.ctrlPanel.Return();
9851019
9861020 // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
9871021 // ObjEditor.aConstraints.gridx += 1;
....@@ -1076,7 +1110,7 @@
10761110 oe.aConstraints.gridwidth = 1;
10771111 /**/
10781112 nameField = AddText(oe.ctrlPanel, copy.GetName());
1079
- Return();
1113
+ oe.ctrlPanel.Return();
10801114
10811115 //ctrlPanel.add(textureButton = new Button("Texture..."));
10821116 //textureButton.setEnabled(false);
....@@ -1253,10 +1287,11 @@
12531287 //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
12541288 //tmp.setName("Edit");
12551289 objectPanel.add(materialPanel);
1256
- JPanel north = new JPanel(new BorderLayout());
1257
- north.setName("Edit");
1258
- north.add(ctrlPanel, BorderLayout.NORTH);
1259
- objectPanel.add(north);
1290
+// JPanel north = new JPanel(new BorderLayout());
1291
+// north.setName("Edit");
1292
+// north.add(ctrlPanel, BorderLayout.NORTH);
1293
+// objectPanel.add(north);
1294
+ objectPanel.add(ctrlPanel);
12601295 objectPanel.add(infoPanel);
12611296
12621297 /*
....@@ -1415,7 +1450,7 @@
14151450 ctrlPanel.removeAll();
14161451 }
14171452
1418
- void SetupMaterial(cGridBag ctrlPanel)
1453
+ void SetupMaterial(cGridBag panel)
14191454 {
14201455 /*
14211456 ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints);
....@@ -1424,18 +1459,23 @@
14241459
14251460 cGridBag editBar = new cGridBag().setVertical(false);
14261461
1427
- editBar.add(createMaterialButton = new cButton("Create")); // , aConstraints);
1462
+ editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints);
1463
+ createMaterialButton.setToolTipText("Create material");
14281464
14291465 /*
14301466 ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints);
14311467 */
14321468
1433
- editBar.add(clearMaterialButton = new cButton("Clear")); // , aConstraints);
1434
- editBar.add(resetSlidersButton = new cButton("Reset")); // , aConstraints);
1469
+ editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints);
1470
+ clearMaterialButton.setToolTipText("Clear material");
1471
+
1472
+ editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints);
14351473 editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints);
14361474 editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints);
14371475
1438
- ctrlPanel.add(editBar);
1476
+ editBar.preferredHeight = 15;
1477
+
1478
+ panel.add(editBar);
14391479
14401480 /**/
14411481 //aConstraints.weighty = 0;
....@@ -1484,9 +1524,9 @@
14841524 shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
14851525 colorSection.add(shadowbias);
14861526
1487
- ctrlPanel.add(new JSeparator());
1527
+ panel.add(new JSeparator());
14881528
1489
- ctrlPanel.add(colorSection);
1529
+ panel.add(colorSection);
14901530
14911531 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
14921532
....@@ -1534,9 +1574,9 @@
15341574 fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
15351575 diffuseSection.add(fakedepth);
15361576
1537
- ctrlPanel.add(new JSeparator());
1577
+ panel.add(new JSeparator());
15381578
1539
- ctrlPanel.add(diffuseSection);
1579
+ panel.add(diffuseSection);
15401580
15411581 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
15421582
....@@ -1572,7 +1612,7 @@
15721612 velvet.add(velvetField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
15731613 specularSection.add(velvet);
15741614
1575
- shiftField = AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1);
1615
+ shiftField = (cNumberSlider)AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1).getComponent(1);
15761616 //Return();
15771617 // ctrlPanel.add(shiftLabel = new JLabel("Shift"), aConstraints);
15781618 // shiftLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -1585,9 +1625,9 @@
15851625 // aConstraints.gridwidth = 1;
15861626
15871627
1588
- ctrlPanel.add(new JSeparator());
1628
+ panel.add(new JSeparator());
15891629
1590
- ctrlPanel.add(specularSection);
1630
+ panel.add(specularSection);
15911631
15921632 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
15931633
....@@ -1617,9 +1657,9 @@
16171657 opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
16181658 globalSection.add(opacity);
16191659
1620
- ctrlPanel.add(new JSeparator());
1660
+ panel.add(new JSeparator());
16211661
1622
- ctrlPanel.add(globalSection);
1662
+ panel.add(globalSection);
16231663
16241664 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
16251665
....@@ -1661,9 +1701,9 @@
16611701 opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints);
16621702 textureSection.add(opacityPower);
16631703
1664
- ctrlPanel.add(new JSeparator());
1704
+ panel.add(new JSeparator());
16651705
1666
- ctrlPanel.add(textureSection);
1706
+ panel.add(textureSection);
16671707
16681708 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
16691709
....@@ -2482,6 +2522,7 @@
24822522 }
24832523 if (input == null)
24842524 {
2525
+ new Exception().printStackTrace();
24852526 System.exit(0);
24862527 }
24872528
....@@ -2956,6 +2997,7 @@
29562997 if (event.getSource() == randomCB)
29572998 {
29582999 copy.random ^= true;
3000
+ objEditor.refreshContents();
29593001 return;
29603002 }
29613003 if (event.getSource() == speedupCB)
....@@ -3179,7 +3221,7 @@
31793221 if (!Globals.ANIMATION)
31803222 {
31813223 FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE);
3182
- browser.show();
3224
+ browser.setVisible(true);
31833225 String filename = browser.getFile();
31843226 if (filename != null && filename.length() > 0)
31853227 {
....@@ -3211,6 +3253,7 @@
32113253 callee.refreshContents();
32123254 } else
32133255 {
3256
+ new Exception().printStackTrace();
32143257 System.exit(0);
32153258 }
32163259 }
....@@ -3421,6 +3464,7 @@
34213464 || e.getSource() == apertureField
34223465 || e.getSource() == shadowblurField)
34233466 {
3467
+ new Exception().printStackTrace();
34243468 System.exit(0);
34253469 cameraView.options1[0] = (float) focusField.getFloat() * 10;
34263470 cameraView.options1[1] = (float) apertureField.getFloat() / 1000;
....@@ -4392,8 +4436,8 @@
43924436 //MenuItem normalLensItem;
43934437 MenuItem editCameraItem;
43944438 MenuItem revertCameraItem;
4395
- CheckboxMenuItem toggleLiveItem;
43964439 MenuItem stepItem;
4440
+ CheckboxMenuItem toggleLiveItem;
43974441 CheckboxMenuItem toggleFullScreenItem;
43984442 CheckboxMenuItem toggleTimelineItem;
43994443 CheckboxMenuItem toggleRenderItem;
....@@ -4410,7 +4454,7 @@
44104454 JSplitPane mainPanel;
44114455 JScrollPane scrollpane;
44124456 JPanel toolbarPanel;
4413
- JPanel treePanel;
4457
+ cGridBag treePanel;
44144458 JPanel radioPanel;
44154459 ButtonGroup buttonGroup;
44164460 cGridBag ctrlPanel;