Normand Briere
2019-06-11 1d909ffa0c2beb51d453b53b845c4f3a749ca5f0
ObjEditor.java
....@@ -19,6 +19,8 @@
1919 import //weka.core.
2020 matrix.Matrix;
2121
22
+import grafeme.ui.*;
23
+
2224 class ObjEditor /*extends JFrame*/ implements iCallBack, ObjectUI,
2325 ActionListener, ChangeListener,
2426 InputMethodListener,
....@@ -28,7 +30,12 @@
2830 iSendInfo
2931 //KeyListener
3032 {
33
+ boolean timeline;
34
+ boolean wasFullScreen;
3135
36
+ GroupEditor callee;
37
+ JFrame frame;
38
+
3239 // SCRIPT
3340
3441 transient JFrame textpanel = null;
....@@ -119,51 +126,61 @@
119126 void keyPressed(int key, int modifiers)
120127 {
121128 System.out.println("KEY PRESSED");
122
- CameraPane.theRenderer.keyPressed(key, modifiers);
129
+ Globals.theRenderer.keyPressed(key, modifiers);
123130 }
124131 */
125132
126133 static GridBagConstraints aConstraints;
127134 static GridBagConstraints aWindowConstraints;
128
- GroupEditor callee;
129
- JFrame frame;
135
+
130136 static int GRIDWIDTH = 100; // 4;
131137
132138 public void closeUI()
133139 {
134140 //new Exception().printStackTrace();
135
- System.out.println("this = " + this);
136
- System.out.println("objEditor = " + objEditor);
141
+// System.out.println("this = " + this);
142
+// System.out.println("objEditor = " + objEditor);
137143 //nameField.removeActionListener(this);
138
- objEditor.ctrlPanel.remove(nameField);
144
+// objEditor.ctrlPanel.remove(nameField);
145
+
146
+ objEditor.ctrlPanel.remove(namePanel);
139147
140148 if (!GroupEditor.allparams)
141149 return;
142150
143
- objEditor.ctrlPanel.remove(liveCB);
144
- objEditor.ctrlPanel.remove(hideCB);
145
- objEditor.ctrlPanel.remove(markCB);
146
-
147
- objEditor.ctrlPanel.remove(randomCB);
148
- objEditor.ctrlPanel.remove(speedupCB);
149
- objEditor.ctrlPanel.remove(rewindCB);
150
-
151
- objEditor.ctrlPanel.remove(resetButton);
152
- objEditor.ctrlPanel.remove(stepButton);
153
-// objEditor.ctrlPanel.remove(stepAllButton);
154
-// objEditor.ctrlPanel.remove(resetAllButton);
155
- objEditor.ctrlPanel.remove(link2masterCB);
156
- //objEditor.ctrlPanel.remove(flipVCB);
157
- //objEditor.ctrlPanel.remove(texresMenu);
158
- objEditor.ctrlPanel.remove(slowerButton);
159
- objEditor.ctrlPanel.remove(fasterButton);
160
- 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);
169
+
170
+ objEditor.ctrlPanel.remove(setupPanel);
171
+ objEditor.ctrlPanel.remove(commandsPanel);
172
+ objEditor.ctrlPanel.remove(pushPanel);
173
+ //objEditor.ctrlPanel.remove(fillPanel);
174
+
175
+ //Remove(normalpushField);
161176 }
162177
163178 public ObjEditor GetEditor()
164179 {
165180 return objEditor; //.GetEditor();
166181 }
182
+
183
+ // Sometimes myself, sometimes my callee's.
167184 ObjEditor objEditor;
168185
169186 /*
....@@ -238,7 +255,7 @@
238255 //if (!isDisplayable())
239256 //setUndecorated(true);
240257
241
- System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow());
258
+ //System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow());
242259 client = inClient;
243260 copy = localCopy;
244261 copy.editWindow = this;
....@@ -259,24 +276,40 @@
259276 void SetupMenu()
260277 {
261278 frame.setMenuBar(menuBar = new MenuBar());
262
- menuBar.add(windowMenu = new Menu("File"));
263
- windowMenu.add(loadItem = new MenuItem("Load..."));
264
- windowMenu.add("-");
265
- windowMenu.add(saveItem = new MenuItem("Save"));
266
- windowMenu.add(saveAsItem = new MenuItem("Save As..."));
279
+ menuBar.add(fileMenu = new Menu("File"));
280
+ fileMenu.add(newItem = new MenuItem("New"));
281
+ fileMenu.add(loadItem = new MenuItem("Load..."));
282
+
283
+ //oe.menuBar.add(menu = new Menu("Include"));
284
+ Menu menu = new Menu("Import");
285
+ importOBJItem = menu.add(new MenuItem("OBJ file..."));
286
+ importOBJItem.addActionListener(this);
287
+ import3DSItem = menu.add(new MenuItem("3DS file..."));
288
+ import3DSItem.addActionListener(this);
289
+ importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file..."));
290
+ importVRMLX3DItem.addActionListener(this);
291
+ menu.add("-");
292
+ importGFDItem = menu.add(new MenuItem("Grafreed file..."));
293
+ importGFDItem.addActionListener(this);
294
+ fileMenu.add(menu);
295
+ fileMenu.add("-");
296
+
297
+ fileMenu.add(saveItem = new MenuItem("Save"));
298
+ fileMenu.add(saveAsItem = new MenuItem("Save As..."));
267299 //windowMenu.add(povItem = new MenuItem("Emit POV-Ray..."));
268
- windowMenu.add("-");
269
- windowMenu.add(exportAsItem = new MenuItem("Export Selection..."));
270
- windowMenu.add(reexportItem = new MenuItem("Re-export"));
271
- windowMenu.add("-");
300
+ fileMenu.add("-");
301
+ fileMenu.add(exportAsItem = new MenuItem("Export Selection..."));
302
+ fileMenu.add(reexportItem = new MenuItem("Re-export"));
303
+ fileMenu.add("-");
272304 if (client.parent != null)
273305 {
274
- windowMenu.add(closeItem = new MenuItem("Close"));
306
+ fileMenu.add(closeItem = new MenuItem("Close"));
275307 } else
276308 {
277
- windowMenu.add(closeItem = new MenuItem("Exit"));
309
+ fileMenu.add(closeItem = new MenuItem("Exit"));
278310 }
279311
312
+ newItem.addActionListener(this);
280313 loadItem.addActionListener(this);
281314 saveItem.addActionListener(this);
282315 saveAsItem.addActionListener(this);
....@@ -285,77 +318,26 @@
285318 //povItem.addActionListener(this);
286319 closeItem.addActionListener(this);
287320
288
- menuBar.add(cameraMenu = new Menu("View"));
289
- //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
290
- //zBufferItem.addActionListener(this);
291
- //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
292
- //normalLensItem.addActionListener(this);
293
- cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera"));
294
- revertCameraItem.addActionListener(this);
295
- cameraMenu.add(toggleFullItem = new CheckboxMenuItem("Full Screen"));
296
- toggleFullItem.addItemListener(this);
297
- toggleFullItem.setState(CameraPane.FULLSCREEN);
298
- cameraMenu.add("-");
299
- cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
300
- toggleTextureItem.addItemListener(this);
301
- toggleTextureItem.setState(CameraPane.textureon);
302
- cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
303
- toggleLiveItem.addItemListener(this);
304
- toggleLiveItem.setState(CameraPane.isLIVE());
305
- cameraMenu.add(stepItem = new MenuItem("Step"));
306
- stepItem.addActionListener(this);
307
-// cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
308
-// toggleDLItem.addItemListener(this);
309
-// toggleDLItem.setState(false);
310
- cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
311
- toggleRenderItem.addItemListener(this);
312
- toggleRenderItem.setState(!CameraPane.frozen);
313
- cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
314
- toggleDebugItem.addItemListener(this);
315
- toggleDebugItem.setState(CameraPane.DEBUG);
316
- cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
317
- toggleFrustumItem.addItemListener(this);
318
- toggleFrustumItem.setState(CameraPane.FRUSTUM);
319
- cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
320
- toggleFootContactItem.addItemListener(this);
321
- toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
322
- cameraMenu.add(toggleRandomItem = new CheckboxMenuItem("Random"));
323
- toggleRandomItem.addItemListener(this);
324
- toggleRandomItem.setState(CameraPane.RANDOM);
325
- cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
326
- toggleHandleItem.addItemListener(this);
327
- toggleHandleItem.setState(CameraPane.HANDLES);
328
- cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
329
- togglePaintItem.addItemListener(this);
330
- togglePaintItem.setState(CameraPane.PAINTMODE);
331
-// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
332
-// toggleRootItem.addItemListener(this);
333
-// toggleRootItem.setState(false);
334
-// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
335
-// animationItem.addItemListener(this);
336
-// animationItem.setState(CameraPane.ANIMATION);
337
- cameraMenu.add("-");
338
- cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera"));
339
- editCameraItem.addActionListener(this);
340
-
341321 objectPanel = new JTabbedPane();
342322 toolbarPanel = new JPanel();
343323 toolbarPanel.setName("Toolbar");
344
- treePanel = new JPanel();
324
+ treePanel = new cGridBag();
345325 treePanel.setName("Tree");
346
- ctrlPanel = new JPanel(); // new GridBagLayout());
326
+ ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout());
347327 ctrlPanel.setName("Edit");
348
- materialPanel = new JPanel();
328
+ materialPanel = new cGridBag().setVertical(true);
349329 materialPanel.setName("Material");
350330 /*JTextPane*/
351331 infoarea = createTextPane();
332
+ doc = infoarea.getStyledDocument();
333
+
352334 infoarea.setEditable(true);
353335 SetText();
354336 // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f));
355337 // infoarea.setOpaque(false);
356338 // //infoarea.setForeground(textcolor);
357
- infoarea.setLineWrap(true);
358
- infoarea.setWrapStyleWord(true);
339
+// TEXTAREA infoarea.setLineWrap(true);
340
+// TEXTAREA infoarea.setWrapStyleWord(true);
359341 infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED);
360342 infoPanel.setPreferredSize(new Dimension(50, 200));
361343 infoPanel.setName("Info");
....@@ -366,16 +348,16 @@
366348 mainPanel.setName("Main");
367349 mainPanel.setContinuousLayout(true);
368350 mainPanel.setOneTouchExpandable(true);
369
- mainPanel.setDividerLocation(1.0);
370351 mainPanel.setDividerSize(9);
371
- mainPanel.setResizeWeight(0);
352
+ mainPanel.setDividerLocation(0.5); //1.0);
353
+ mainPanel.setResizeWeight(0.5);
372354
373355 //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5));
374356 //mainPanel.setLayout(new GridBagLayout());
375357 toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
376
- treePanel.setLayout(new GridBagLayout());
377
- ctrlPanel.setLayout(new GridBagLayout());
378
- materialPanel.setLayout(new GridBagLayout());
358
+// treePanel.setLayout(new GridBagLayout());
359
+ //ctrlPanel.setLayout(new GridBagLayout());
360
+ //materialPanel.setLayout(new GridBagLayout());
379361
380362 aConstraints = new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0,
381363 GridBagConstraints.NORTHEAST, GridBagConstraints.BOTH, new Insets(1, 1, 1, 1), 0, 0);
....@@ -414,7 +396,7 @@
414396 static String newline = "\n";
415397 protected static final String buttonString = "JButton";
416398 StyledDocument doc;
417
- JTextArea infoarea;
399
+ JTextPane infoarea;
418400
419401 void ClearInfo()
420402 {
....@@ -463,13 +445,13 @@
463445 //SendInfo("Name:", "bold");
464446 if (sel.GetTextures() != null || debug)
465447 {
466
- si.SendInfo(sel.toString(), "bold");
448
+ si.SendInfo(sel.toString() + (Globals.ADVANCED?"":" " + System.identityHashCode(sel)), "bold");
467449 //SendInfo("#children virtual = " + sel.size() + "; real = " + sel.Size() + newline, "regular");
468450 if (sel.Size() > 0)
469451 {
470452 si.SendInfo("#children = " + sel.Size(), "regular");
471453 }
472
- si.SendInfo((debug ? " Parent: " : " ") + sel.parent, "regular");
454
+ si.SendInfo((debug ? " Parent: " : " ") + sel.parent + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.parent)), "regular");
473455 if (debug)
474456 {
475457 try
....@@ -481,7 +463,10 @@
481463 }
482464
483465 if (full)
484
- si.SendInfo(" BBox: " + minima + " - " + maxima, "regular");
466
+ {
467
+ si.SendInfo(" BBox min: " + minima, "regular");
468
+ si.SendInfo(" BBox max: " + maxima, "regular");
469
+ }
485470
486471 if (sel.bRep != null)
487472 {
....@@ -508,7 +493,7 @@
508493 }
509494 if (sel.support != null)
510495 {
511
- si.SendInfo(" support: " + sel.support, "regular");
496
+ si.SendInfo(" support: " + sel.support + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.support)), "regular");
512497 }
513498 if (sel.scriptnode != null)
514499 {
....@@ -522,18 +507,18 @@
522507 maxima.y = sel.toParent[3][1];
523508 maxima.z = sel.toParent[3][2];
524509 si.SendInfo(" Orig: " + maxima, "regular");
525
- maxima.x = sel.globalTransform[3][0];
526
- maxima.y = sel.globalTransform[3][1];
527
- maxima.z = sel.globalTransform[3][2];
528
- if (full)
529
- si.SendInfo(" Global Orig: " + maxima, "regular");
530510 maxima.x = sel.toParent[0][0];
531511 maxima.y = sel.toParent[1][1];
532512 maxima.z = sel.toParent[2][2];
533513 si.SendInfo(" Scale: " + maxima, "regular");
534
- maxima.x = sel.globalTransform[0][0];
535
- maxima.y = sel.globalTransform[1][1];
536
- maxima.z = sel.globalTransform[2][2];
514
+ maxima.x = sel.globalTransform[3][0];
515
+ maxima.y = sel.globalTransform[3][1];
516
+ maxima.z = sel.globalTransform[3][2];
517
+ if (full)
518
+ si.SendInfo(" Global Orig: " + maxima, "regular");
519
+ maxima.x = sel.globalTransform[0][0];
520
+ maxima.y = sel.globalTransform[1][1];
521
+ maxima.z = sel.globalTransform[2][2];
537522 if (full)
538523 si.SendInfo(" Global Scale: " + maxima, "regular");
539524 }
....@@ -579,6 +564,9 @@
579564 {
580565 CameraPane.pointflow = (PointFlow) sel;
581566 }
567
+
568
+ si.SendInfo("_____________________", "regular");
569
+ si.SendInfo("", "regular");
582570 }
583571 }
584572
....@@ -594,52 +582,68 @@
594582 }
595583 }
596584
597
- private JTextArea createTextPane()
598
- {
599
- String[] initString =
585
+ void ToggleFullScreen()
600586 {
601
- "This is an editable JTextPane, ", //regular
602
- "another ", //italic
603
- "styled ", //bold
604
- "text ", //small
605
- "component, ", //large
606
- "which supports embedded components..." + newline,//regular
607
- " " + newline, //button
608
- "...and embedded icons..." + newline, //regular
609
- " ", //icon
610
- newline + "JTextPane is a subclass of JEditorPane that "
611
- + "uses a StyledEditorKit and StyledDocument, and provides "
612
- + "cover methods for interacting with those objects."
613
- };
614
-
615
- String[] initStyles =
616
- {
617
- "regular", "italic", "bold", "small", "large",
618
- "regular", "button", "regular", "icon",
619
- "regular"
620
- };
621
-
622
- JTextPane textPane = new JTextPane();
623
- textPane.setEditable(true);
624
- /*StyledDocument*/ doc = textPane.getStyledDocument();
625
- addStylesToDocument(doc);
626
-
627
- try
628
- {
629
- for (int j = 0; j < 2; j++)
630
- {
631
- for (int i = 0; i < initString.length; i++)
587
+ if (CameraPane.FULLSCREEN)
632588 {
633
- doc.insertString(doc.getLength(), initString[i],
634
- doc.getStyle(initStyles[i]));
589
+ frame.getContentPane().remove(/*"Center",*/bigThree);
590
+ framePanel.add(bigThree);
591
+ frame.getContentPane().add(/*"Center",*/framePanel);
592
+ } else
593
+ {
594
+ frame.getContentPane().remove(/*"Center",*/framePanel);
595
+ framePanel.remove(bigThree);
596
+ frame.getContentPane().add(/*"Center",*/bigThree);
635597 }
636
- }
637
- } catch (BadLocationException ble)
638
- {
639
- System.err.println("Couldn't insert initial text into text pane.");
598
+ cameraView.ToggleFullScreen();
640599 }
641600
642
- return new JTextArea(); // textPane;
601
+ private JTextPane createTextPane()
602
+ {
603
+// TEXTAREA String[] initString =
604
+// {
605
+// "This is an editable JTextPane, ", //regular
606
+// "another ", //italic
607
+// "styled ", //bold
608
+// "text ", //small
609
+// "component, ", //large
610
+// "which supports embedded components..." + newline,//regular
611
+// " " + newline, //button
612
+// "...and embedded icons..." + newline, //regular
613
+// " ", //icon
614
+// newline + "JTextPane is a subclass of JEditorPane that "
615
+// + "uses a StyledEditorKit and StyledDocument, and provides "
616
+// + "cover methods for interacting with those objects."
617
+// };
618
+//
619
+// String[] initStyles =
620
+// {
621
+// "regular", "italic", "bold", "small", "large",
622
+// "regular", "button", "regular", "icon",
623
+// "regular"
624
+// };
625
+//
626
+// JTextPane textPane = new JTextPane();
627
+// textPane.setEditable(true);
628
+// /*StyledDocument*/ doc = textPane.getStyledDocument();
629
+// addStylesToDocument(doc);
630
+//
631
+// try
632
+// {
633
+// for (int j = 0; j < 2; j++)
634
+// {
635
+// for (int i = 0; i < initString.length; i++)
636
+// {
637
+// doc.insertString(doc.getLength(), initString[i],
638
+// doc.getStyle(initStyles[i]));
639
+// }
640
+// }
641
+// } catch (BadLocationException ble)
642
+// {
643
+// System.err.println("Couldn't insert initial text into text pane.");
644
+// }
645
+
646
+ return new JTextPane(); // textPane;
643647 }
644648
645649 protected void addStylesToDocument(StyledDocument doc)
....@@ -692,7 +696,7 @@
692696 protected static ImageIcon createImageIcon(String path,
693697 String description)
694698 {
695
- java.net.URL imgURL = GrafreeD.class.getResource(path);
699
+ java.net.URL imgURL = Grafreed.class.getResource(path);
696700 if (imgURL != null)
697701 {
698702 return new ImageIcon(imgURL, description);
....@@ -724,6 +728,7 @@
724728 // NumberSlider vDivsField;
725729 // JCheckBox endcaps;
726730 JCheckBox liveCB;
731
+ JCheckBox selectCB;
727732 JCheckBox hideCB;
728733 JCheckBox link2masterCB;
729734 JCheckBox markCB;
....@@ -739,115 +744,83 @@
739744 JButton slowerButton;
740745 JButton fasterButton;
741746 JButton remarkButton;
747
+
748
+ cGridBag namePanel;
749
+ cGridBag setupPanel;
750
+ cGridBag commandsPanel;
751
+ cGridBag pushPanel;
752
+ cGridBag fillPanel;
742753
743
- JCheckBox AddCheckBox(ObjEditor oe, String label, boolean on)
754
+ JCheckBox AddCheckBox(cGridBag panel, String label, boolean on)
744755 {
745756 JCheckBox cb;
746757
747
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
748
- oe.aConstraints.gridwidth = 1; // 3;
749
-// oe.aConstraints.weightx = 1;
750
-// oe.aConstraints.anchor = GridBagConstraints.WEST;
751
- oe.ctrlPanel.add(cb = new JCheckBox(label, on), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
758
+ panel.add(cb = new JCheckBox(label, on)); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
752759 cb.addItemListener(this);
753
-// oe.aConstraints.anchor = GridBagConstraints.EAST;
754
- oe.aConstraints.gridwidth = 1;
755
- oe.aConstraints.gridx += 1;
756760
757761 return cb;
758762 }
759763
760
- cButton AddButton(ObjEditor oe, String label)
764
+ cButton AddButton(cGridBag panel, String label)
761765 {
762766 cButton cb;
763767
764
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
765
- oe.aConstraints.gridwidth = 1;
766
-// oe.aConstraints.weightx = 1;
767
-// oe.aConstraints.anchor = GridBagConstraints.WEST;
768
- oe.ctrlPanel.add(cb = new cButton(label), oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1);
768
+ panel.add(cb = new cButton(label)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1);
769769 cb.addActionListener(this);
770
-// oe.aConstraints.anchor = GridBagConstraints.EAST;
771
- oe.aConstraints.gridwidth = 1;
772
- oe.aConstraints.gridx += 1;
773770
774771 return cb;
775772 }
776773
777
- JComboBox AddCombo(ObjEditor oe, java.util.Vector list, int item)
774
+ JComboBox AddCombo(cGridBag panel, java.util.Vector list, int item)
778775 {
779776 JComboBox combo;
780777
781
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
782
- oe.ctrlPanel.add(combo = new JComboBox(new cListModel(list, item)), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
783
- oe.aConstraints.gridx += 1;
778
+ panel.add(combo = new JComboBox(new cListModel(list, item))); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
784779 combo.addActionListener(this);
785780
786781 return combo;
787782 }
788783
789
- NumberSlider AddSlider(JPanel ctrlPanel, String label, double min, double max, double current, double pow)
784
+ cGridBag AddSlider(cGridBag panel, String label, double min, double max, double current, double pow)
790785 {
791
- NumberSlider combo;
786
+ cGridBag control = new cGridBag();
787
+
788
+ cNumberSlider combo;
792789
793790 JLabel jlabel = new JLabel(label);
794
-
795
- aConstraints.fill = GridBagConstraints.VERTICAL;
796791 jlabel.setHorizontalAlignment(SwingConstants.TRAILING);
797
- aConstraints.gridwidth = 2;
798
- ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
799
- aConstraints.gridx += 1;
800
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
801
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
802
- ctrlPanel.add(combo = new NumberSlider(min, max, pow), aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
803
- aConstraints.gridx += 1;
804
- aConstraints.gridwidth = 1;
805
-
792
+ control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
793
+ control.add(combo = new cNumberSlider(this, min, max, pow)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
806794 combo.setFloat(current);
807
-
808
- combo.label = jlabel;
809
-
810
- combo.addChangeListener(this);
811
-
812
- return combo;
795
+
796
+ panel.add(control);
797
+
798
+ return control;
813799 }
814800
815
- NumberSlider AddSlider(JPanel ctrlPanel, String label, int min, int max, int current)
801
+ cGridBag AddSlider(cGridBag panel, String label, int min, int max, int current)
816802 {
817
- NumberSlider combo;
803
+ cGridBag control = new cGridBag();
804
+
805
+ cNumberSlider combo;
818806
819807 JLabel jlabel = new JLabel(label);
820
-
821
- aConstraints.fill = GridBagConstraints.VERTICAL;
822808 jlabel.setHorizontalAlignment(SwingConstants.TRAILING);
823
- aConstraints.gridwidth = 2;
824
- ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
825
- aConstraints.gridx += 1;
826
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
827
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
828
- ctrlPanel.add(combo = new NumberSlider(min, max), aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
829
- aConstraints.gridx += 1;
830
- aConstraints.gridwidth = 1;
831
-
809
+ control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
810
+ control.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
832811 combo.setInteger(current);
833812
834
- combo.label = jlabel;
835
-
836
- combo.addChangeListener(this);
837
-
838
- return combo;
813
+ panel.add(control);
814
+
815
+ return control;
839816 }
840817
841
- JTextArea AddText(JPanel ctrlPanel, String name)
818
+ JTextArea AddText(cGridBag ctrlPanel, String name)
842819 {
843820 JTextArea text;
844821
845
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
846
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
847
- ctrlPanel.add(text = new JTextArea(name), aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
822
+ ctrlPanel.add(text = new JTextArea(name)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
848823 text.addCaretListener(this);
849
- aConstraints.gridx += 1;
850
- aConstraints.gridwidth = 1;
851824
852825 return text;
853826 }
....@@ -877,9 +850,16 @@
877850 objEditor.ctrlPanel.remove(j);
878851 }
879852
853
+ void Remove(cNumberSlider j)
854
+ {
855
+ j.removeChangeListener(this);
856
+ //objEditor.ctrlPanel.remove(j.label);
857
+ objEditor.ctrlPanel.remove(j);
858
+ }
859
+
880860 /*
881861 */
882
- void Return() // ObjEditor oe)
862
+ void Return0() // ObjEditor oe)
883863 {
884864 aConstraints.gridy += 1;
885865 aConstraints.gridx = 0;
....@@ -934,35 +914,73 @@
934914
935915 void SetupUI2(ObjEditor oe)
936916 {
937
-// oe.aConstraints.weightx = 0;
938
-// oe.aConstraints.weighty = 0;
939
-// oe.aConstraints.gridx = 0;
940
-// oe.aConstraints.gridy = 0;
941
- SetupName(oe);
917
+ //SetupName(oe);
918
+
919
+ namePanel = new cGridBag();
920
+
921
+ nameField = AddText(namePanel, copy.GetName());
922
+ namePanel.add(nameField);
923
+ oe.ctrlPanel.add(namePanel);
924
+
925
+ oe.ctrlPanel.Return();
942926
943927 if (!GroupEditor.allparams)
944928 return;
945929
946
- liveCB = AddCheckBox(oe, "Live", copy.live);
947
- link2masterCB = AddCheckBox(oe, "Supp", copy.link2master);
948
- hideCB = AddCheckBox(oe, "Hide", copy.hide);
930
+ setupPanel = new cGridBag().setVertical(false);
931
+
932
+ liveCB = AddCheckBox(setupPanel, "Live", copy.live);
933
+ liveCB.setToolTipText("Animate object");
934
+ selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect);
935
+ selectCB.setToolTipText("Make object selectable");
949936 // Return();
950
- markCB = AddCheckBox(oe, "Mark", copy.marked);
951
- rewindCB = AddCheckBox(oe, "Rew", copy.rewind);
952
- randomCB = AddCheckBox(oe, "Rand", copy.random);
953
- Return();
954
- resetButton = AddButton(oe, "Reset");
955
- stepButton = AddButton(oe, "Step");
937
+ hideCB = AddCheckBox(setupPanel, "Hide", copy.hide);
938
+ hideCB.setToolTipText("Hide object");
939
+ markCB = AddCheckBox(setupPanel, "Mark", copy.marked);
940
+ markCB.setToolTipText("Set the animation target transform");
941
+
942
+ rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind);
943
+ rewindCB.setToolTipText("Rewind animation");
944
+
945
+ randomCB = AddCheckBox(setupPanel, "Random", copy.random);
946
+ randomCB.setToolTipText("Option for switch node");
947
+
948
+ if (Globals.ADVANCED)
949
+ {
950
+ link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master);
951
+ link2masterCB.setToolTipText("Attach to support");
952
+ speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup);
953
+ speedupCB.setToolTipText("Option motion capture");
954
+ }
955
+
956
+ oe.ctrlPanel.add(setupPanel);
957
+ oe.ctrlPanel.Return();
958
+
959
+ commandsPanel = new cGridBag().setVertical(false);
960
+
961
+ resetButton = AddButton(commandsPanel, "Reset");
962
+ resetButton.setToolTipText("Jump to frame zero");
963
+ stepButton = AddButton(commandsPanel, "Step");
964
+ stepButton.setToolTipText("Step one frame");
956965 // resetAllButton = AddButton(oe, "Reset All");
957966 // stepAllButton = AddButton(oe, "Step All");
958
- speedupCB = AddCheckBox(oe, "Speed", copy.speedup);
959967 // Return();
960
- slowerButton = AddButton(oe, "Slow");
961
- fasterButton = AddButton(oe, "Fast");
962
- remarkButton = AddButton(oe, "Rem");
968
+ slowerButton = AddButton(commandsPanel, "Slow");
969
+ slowerButton.setToolTipText("Decrease animation speed");
970
+ fasterButton = AddButton(commandsPanel, "Fast");
971
+ fasterButton.setToolTipText("Increase animation speed");
972
+ remarkButton = AddButton(commandsPanel, "Remark");
973
+ remarkButton.setToolTipText("Set the current transform as the target");
963974
964
- Return();
975
+ oe.ctrlPanel.add(commandsPanel);
976
+ oe.ctrlPanel.Return();
965977
978
+ pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons
979
+ normalpushField = (cNumberSlider)pushPanel.getComponent(1);
980
+ //Return();
981
+
982
+ oe.ctrlPanel.Return();
983
+
966984 // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
967985 // ObjEditor.aConstraints.gridx += 1;
968986
....@@ -1056,7 +1074,7 @@
10561074 oe.aConstraints.gridwidth = 1;
10571075 /**/
10581076 nameField = AddText(oe.ctrlPanel, copy.GetName());
1059
- Return();
1077
+ oe.ctrlPanel.Return();
10601078
10611079 //ctrlPanel.add(textureButton = new Button("Texture..."));
10621080 //textureButton.setEnabled(false);
....@@ -1158,10 +1176,22 @@
11581176 //JPanel worldPanel =
11591177 // new gov.nasa.worldwind.examples.ApplicationTemplate.AppPanel(null, true);
11601178 //worldPanel.setName("World");
1161
- /*JPanel*/ cameraPanel =
1162
- new JPanel(new BorderLayout());
1163
- cameraPanel.add(cameraView);
1179
+ centralPanel = new cGridBag();
1180
+ centralPanel.preferredWidth = 20;
1181
+ timelinePanel = new JPanel(new BorderLayout());
1182
+ timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel);
11641183
1184
+ cameraPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, cameraView, timelinePanel);
1185
+ cameraPanel.setContinuousLayout(true);
1186
+ cameraPanel.setOneTouchExpandable(true);
1187
+// cameraPanel.setDividerLocation(0.9);
1188
+// cameraPanel.setDividerSize(9);
1189
+ cameraPanel.setResizeWeight(1.0);
1190
+
1191
+ centralPanel.add(cameraView);
1192
+ //frame.setJMenuBar(timelineMenubar);
1193
+ //centralPanel.add(timelinePanel);
1194
+
11651195 //topView.camera = ;
11661196 //frontView.camera = new Camera(2);
11671197 //sideView.camera = new Camera(3);
....@@ -1177,12 +1207,13 @@
11771207 //frontView.object = copy;
11781208 //sideView.object = copy;
11791209
1180
- XYZPanel = new JPanel();
1181
- XYZPanel.setLayout(new GridLayout(3, 1, 5, 5));
1210
+ XYZPanel = new cGridBag().setVertical(true);
1211
+ //XYZPanel.setLayout(new GridLayout(3, 1, 5, 5));
11821212
1183
- XYZPanel.add(/*BorderLayout.SOUTH,*/sideView); // Scroll);
1184
- XYZPanel.add(/*BorderLayout.CENTER,*/frontView); // Scroll);
1185
- XYZPanel.add(/*BorderLayout.NORTH,*/topView); // Scroll);
1213
+ XYZPanel.preferredWidth = 5;
1214
+ XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll);
1215
+ XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll);
1216
+ XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll);
11861217
11871218 /*
11881219 gridPanel = new JPanel(); //new BorderLayout());
....@@ -1191,7 +1222,7 @@
11911222 gridPanel.add(cameraView);
11921223 gridPanel.add(XYZPanel);
11931224 */
1194
- gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, cameraPanel, XYZPanel); //new BorderLayout());
1225
+ gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, centralPanel, XYZPanel); //new BorderLayout());
11951226 gridPanel.setContinuousLayout(true);
11961227 gridPanel.setOneTouchExpandable(true);
11971228 gridPanel.setDividerLocation(1.0);
....@@ -1220,10 +1251,11 @@
12201251 //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
12211252 //tmp.setName("Edit");
12221253 objectPanel.add(materialPanel);
1223
- JPanel north = new JPanel(new BorderLayout());
1224
- north.setName("Edit");
1225
- north.add(ctrlPanel, BorderLayout.NORTH);
1226
- objectPanel.add(north);
1254
+// JPanel north = new JPanel(new BorderLayout());
1255
+// north.setName("Edit");
1256
+// north.add(ctrlPanel, BorderLayout.NORTH);
1257
+// objectPanel.add(north);
1258
+ objectPanel.add(ctrlPanel);
12271259 objectPanel.add(infoPanel);
12281260
12291261 /*
....@@ -1244,16 +1276,23 @@
12441276 scrollpane.setWheelScrollingEnabled(true);
12451277 scrollpane.addMouseWheelListener(this); // Default not fast enough
12461278
1247
- /*JTabbedPane*/ jtp = new JTabbedPane();
1248
- jtp.add(scrollpane);
1279
+ /*JTabbedPane*/ scenePanel = new cGridBag();
1280
+ scenePanel.preferredWidth = 6;
1281
+
1282
+ JTabbedPane tabbedPane = new JTabbedPane();
1283
+ tabbedPane.add(scrollpane);
12491284
1250
- jtp.add(FSPane = new cFileSystemPane(this));
1285
+ tabbedPane.add(FSPane = new cFileSystemPane(this));
12511286
1252
- optionsPanel = new JPanel(new GridBagLayout());
1287
+ optionsPanel = new cGridBag().setVertical(true);
12531288
12541289 optionsPanel.setName("Options");
1255
- jtp.add(optionsPanel);
1256
-
1290
+
1291
+ AddOptions(optionsPanel); //, aConstraints);
1292
+
1293
+ tabbedPane.add(optionsPanel);
1294
+
1295
+ scenePanel.add(tabbedPane);
12571296
12581297 /*
12591298 cTree jTree = new cTree(null);
....@@ -1275,7 +1314,7 @@
12751314 jtp.add(tree);
12761315 */
12771316
1278
- bigPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, jtp, gridPanel);
1317
+ bigPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, scenePanel, gridPanel);
12791318 bigPanel.setContinuousLayout(true);
12801319 bigPanel.setOneTouchExpandable(true);
12811320 bigPanel.setDividerLocation(0.8);
....@@ -1287,6 +1326,7 @@
12871326 //bigPanel.setSize(new Dimension(10,10));
12881327 //bigPanel.add(ctrlPanel);
12891328 //bigPanel.add(gridPanel);
1329
+ /**
12901330 bigThree = new JPanel();
12911331 //big.setLayout(new FlowLayout(FlowLayout.LEFT));
12921332 bigThree.setLayout(new GridBagLayout()); //1,3,5,5));
....@@ -1297,20 +1337,26 @@
12971337 aWindowConstraints.fill = GridBagConstraints.VERTICAL;
12981338 aWindowConstraints.weightx = 0;
12991339 aWindowConstraints.weighty = 1;
1300
- bigThree.add(jtp, aWindowConstraints);
1340
+ bigThree.add(scenePanel, aWindowConstraints);
13011341 aWindowConstraints.weightx = 1;
13021342 aWindowConstraints.gridwidth = 3;
13031343 // aConstraints.gridheight = 3;
13041344 aWindowConstraints.gridx = 1;
13051345 aWindowConstraints.fill = GridBagConstraints.BOTH;
1306
- bigThree.add(cameraPanel, aWindowConstraints);
1346
+ bigThree.add(centralPanel, aWindowConstraints);
13071347 aWindowConstraints.weightx = 0;
13081348 aWindowConstraints.gridx = 4;
13091349 aWindowConstraints.gridwidth = 1;
13101350 // aConstraints.gridheight = 3;
13111351 aWindowConstraints.fill = GridBagConstraints.VERTICAL;
13121352 bigThree.add(XYZPanel, aWindowConstraints);
1353
+ /**/
13131354
1355
+ bigThree = new cGridBag();
1356
+ bigThree.addComponent(scenePanel);
1357
+ bigThree.addComponent(centralPanel);
1358
+ bigThree.addComponent(XYZPanel);
1359
+
13141360 // // SIDE EFFECT!!!
13151361 // aConstraints.gridx = 0;
13161362 // aConstraints.gridy = 0;
....@@ -1331,13 +1377,14 @@
13311377 //worldPane.add(bigPanel);
13321378 //worldPane.add(worldPanel);
13331379 /**/
1334
- frame.getContentPane().add(/*"Center",*/framePanel);
1380
+ //frame.getContentPane().add(/*"Center",*/framePanel);
1381
+ frame.add(/*"Center",*/framePanel);
13351382 //frame.getContentPane().add(/*"Center",*/ worldPane);
13361383
13371384 // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc);
13381385
1339
- frame.setSize(1024, 768);
1340
- frame.show();
1386
+ frame.setSize(1280, 860);
1387
+ frame.setVisible(true);
13411388
13421389 gridPanel.setDividerLocation(1.0);
13431390
....@@ -1352,6 +1399,10 @@
13521399 });
13531400 }
13541401
1402
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
1403
+ {
1404
+ }
1405
+
13551406 JTree GetTree()
13561407 {
13571408 return objEditor.jTree;
....@@ -1363,260 +1414,173 @@
13631414 ctrlPanel.removeAll();
13641415 }
13651416
1366
- void SetupMaterial(JPanel ctrlPanel)
1417
+ void SetupMaterial(cGridBag panel)
13671418 {
1368
- aConstraints.weighty = 0;
1369
- //aConstraints.weightx = 1;
1370
- /*
1419
+ /*
13711420 ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints);
13721421 materialLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1373
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1374
- aConstraints.gridx += 1;
13751422 */
13761423
1377
- aConstraints.gridwidth = 1;
1378
- ctrlPanel.add(createMaterialButton = new cButton("Create"), aConstraints);
1379
- aConstraints.gridx += 1;
1380
- aConstraints.weighty = 0;
1381
- aConstraints.gridwidth = 1;
1424
+ cGridBag editBar = new cGridBag().setVertical(false);
1425
+
1426
+ editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints);
1427
+ createMaterialButton.setToolTipText("Create material");
13821428
13831429 /*
13841430 ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints);
1385
- aConstraints.gridx += 1;
1386
- aConstraints.weighty = 0;
1387
- aConstraints.gridwidth = 1;
13881431 */
13891432
1390
- ctrlPanel.add(clearMaterialButton = new cButton("Clear"), aConstraints);
1391
- aConstraints.gridx += 1;
1433
+ editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints);
1434
+ clearMaterialButton.setToolTipText("Clear material");
1435
+
1436
+ if (Globals.ADVANCED)
1437
+ {
1438
+ editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints);
1439
+ editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints);
1440
+ editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints);
1441
+ }
13921442
1393
- ctrlPanel.add(resetSlidersButton = new cButton("Reset"), aConstraints);
1394
-
1395
- aConstraints.gridx += 1;
1396
-
1397
- ctrlPanel.add(propagateToggle = new cCheckBox("Prop", propagate), aConstraints);
1398
-
1399
- aConstraints.gridx += 1;
1400
-
1401
- ctrlPanel.add(multiplyToggle = new cCheckBox("Mult", false), aConstraints);
1402
-
1403
- aConstraints.gridx = 0;
1404
- aConstraints.gridy += 1;
1405
- aConstraints.weighty = 0;
1406
- aConstraints.gridwidth = 1;
1443
+ editBar.preferredHeight = 15;
1444
+
1445
+ panel.add(editBar);
1446
+
14071447 /**/
14081448 //aConstraints.weighty = 0;
14091449 ////aConstraints.weightx = 1;
14101450 //aConstraints.weighty = 1;
14111451 aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
14121452 //aConstraints.gridx += 1;
1413
- ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
1414
- aConstraints.weighty = 0;
1415
- aConstraints.gridx = 0;
1416
- aConstraints.gridy += 1;
1417
- aConstraints.gridwidth = 1;
1453
+ //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
14181454
1419
- ctrlPanel.add(colorLabel = new JLabel("Color/hue"), aConstraints);
1420
- colorLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1421
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1422
- aConstraints.gridx += 1;
1423
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1424
- //aConstraints.weightx = 0;
1425
- ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1426
- aConstraints.gridx = 0;
1427
- aConstraints.gridy += 1;
1428
- aConstraints.gridwidth = 1;
1455
+ cGridBag colorSection = new cGridBag().setVertical(true);
1456
+
1457
+ cGridBag color = new cGridBag();
1458
+ color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints);
1459
+ colorLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1460
+ color.add(colorField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1461
+ //colorField.preferredWidth = 200;
1462
+ colorSection.add(color);
14291463
1430
- ctrlPanel.add(modulationLabel = new JLabel("Saturation"), aConstraints);
1431
- modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1432
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1433
- aConstraints.gridx += 1;
1434
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1435
- ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1436
- aConstraints.gridx = 0;
1437
- aConstraints.gridy += 1;
1438
- aConstraints.gridwidth = 1;
1464
+ cGridBag modulation = new cGridBag();
1465
+ modulation.add(modulationLabel = new JLabel("Saturation")); // , aConstraints);
1466
+ modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1467
+ modulation.add(modulationField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1468
+ colorSection.add(modulation);
14391469
1440
- ctrlPanel.add(textureLabel = new JLabel("Texture"), aConstraints);
1441
- textureLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1442
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1443
- aConstraints.gridx += 1;
1444
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1445
- ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1446
- aConstraints.gridx = 0;
1447
- aConstraints.gridy += 1;
1448
- aConstraints.gridwidth = 1;
1470
+ cGridBag texture = new cGridBag();
1471
+ texture.add(textureLabel = new JLabel("Texture")); // , aConstraints);
1472
+ textureLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1473
+ texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1474
+ colorSection.add(texture);
14491475
1450
- ctrlPanel.add(anisoLabel = new JLabel("AnisoU"), aConstraints);
1451
- anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1452
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1453
- aConstraints.gridx += 1;
1454
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1455
- ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1456
- aConstraints.gridx = 0;
1457
- aConstraints.gridy += 1;
1458
- aConstraints.gridwidth = 1;
1476
+ cGridBag anisoU = new cGridBag();
1477
+ anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints);
1478
+ anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1479
+ anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1480
+ colorSection.add(anisoU);
14591481
1460
- ctrlPanel.add(anisoVLabel = new JLabel("AnisoV"), aConstraints);
1461
- anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1462
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1463
- aConstraints.gridx += 1;
1464
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1465
- ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1466
- aConstraints.gridx = 0;
1467
- aConstraints.gridy += 1;
1468
- aConstraints.gridwidth = 1;
1482
+ cGridBag anisoV = new cGridBag();
1483
+ anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints);
1484
+ anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1485
+ anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1486
+ colorSection.add(anisoV);
14691487
1470
- ctrlPanel.add(shadowbiasLabel = new JLabel("Shadowbias"), aConstraints);
1471
- shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1472
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1473
- aConstraints.gridx += 1;
1474
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1475
- ctrlPanel.add(shadowbiasField = new NumberSlider(0.001, 50, -1), aConstraints);
1476
- aConstraints.gridx = 0;
1477
- aConstraints.gridy += 1;
1478
- aConstraints.gridwidth = 1;
1488
+ cGridBag shadowbias = new cGridBag();
1489
+ shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints);
1490
+ shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1491
+ shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1492
+ colorSection.add(shadowbias);
14791493
1480
- //aConstraints.weighty = 1;
1481
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
1482
- //aConstraints.gridx += 1;
1483
- ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
1484
- aConstraints.weighty = 0;
1485
- aConstraints.gridx = 0;
1486
- aConstraints.gridy += 1;
1487
- aConstraints.gridwidth = 1;
1494
+ panel.add(new JSeparator());
1495
+
1496
+ panel.add(colorSection);
1497
+
1498
+ //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
1499
+
1500
+ cGridBag diffuseSection = new cGridBag().setVertical(true);
1501
+
1502
+ cGridBag diffuse = new cGridBag();
1503
+ diffuse.add(diffuseLabel = new JLabel("Diffuse")); // , aConstraints);
1504
+ diffuseLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1505
+ diffuse.add(diffuseField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1506
+ diffuseSection.add(diffuse);
14881507
1489
- ctrlPanel.add(diffuseLabel = new JLabel("Diffuse"), aConstraints);
1490
- diffuseLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1491
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1492
- aConstraints.gridx += 1;
1493
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1494
- ctrlPanel.add(diffuseField = new NumberSlider(0.001, 50, -1), aConstraints);
1495
- aConstraints.gridx = 0;
1496
- aConstraints.gridy += 1;
1497
- aConstraints.gridwidth = 1;
1508
+ cGridBag diffuseness = new cGridBag();
1509
+ diffuseness.add(diffusenessLabel = new JLabel("Diffusion")); // , aConstraints);
1510
+ diffusenessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1511
+ diffuseness.add(diffusenessField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1512
+ diffuseSection.add(diffuseness);
14981513
1499
- ctrlPanel.add(diffusenessLabel = new JLabel("Diffusion"), aConstraints);
1500
- diffusenessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1501
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1502
- aConstraints.gridx += 1;
1503
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1504
- ctrlPanel.add(diffusenessField = new NumberSlider(0.001, 50, -1), aConstraints);
1505
- aConstraints.gridx = 0;
1506
- aConstraints.gridy += 1;
1507
- aConstraints.gridwidth = 1;
1514
+ cGridBag selfshadow = new cGridBag();
1515
+ selfshadow.add(selfshadowLabel = new JLabel("Selfshadow")); // , aConstraints);
1516
+ selfshadowLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1517
+ selfshadow.add(selfshadowField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1518
+ diffuseSection.add(selfshadow);
15081519
1509
- ctrlPanel.add(selfshadowLabel = new JLabel("Selfshadow"), aConstraints);
1510
- selfshadowLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1511
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1512
- aConstraints.gridx += 1;
1513
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1514
- ctrlPanel.add(selfshadowField = new NumberSlider(0.001, 50, -1), aConstraints);
1515
- aConstraints.gridx = 0;
1516
- aConstraints.gridy += 1;
1517
- aConstraints.gridwidth = 1;
1520
+ cGridBag sheen = new cGridBag();
1521
+ sheen.add(sheenLabel = new JLabel("Sheen")); // , aConstraints);
1522
+ sheenLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1523
+ sheen.add(sheenField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1524
+ diffuseSection.add(sheen);
15181525
1519
- ctrlPanel.add(sheenLabel = new JLabel("Sheen"), aConstraints);
1520
- sheenLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1521
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1522
- aConstraints.gridx += 1;
1523
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1524
- ctrlPanel.add(sheenField = new NumberSlider(0.001, 50, -1), aConstraints);
1525
- aConstraints.gridx = 0;
1526
- aConstraints.gridy += 1;
1527
- aConstraints.gridwidth = 1;
1526
+ cGridBag subsurface = new cGridBag();
1527
+ subsurface.add(subsurfaceLabel = new JLabel("Subsurface")); // , aConstraints);
1528
+ subsurfaceLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1529
+ subsurface.add(subsurfaceField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1530
+ diffuseSection.add(subsurface);
15281531
1529
- ctrlPanel.add(subsurfaceLabel = new JLabel("Subsurface"), aConstraints);
1530
- subsurfaceLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1531
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1532
- aConstraints.gridx += 1;
1533
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1534
- ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1535
- aConstraints.gridx = 0;
1536
- aConstraints.gridy += 1;
1537
- aConstraints.gridwidth = 1;
1532
+ cGridBag shadow = new cGridBag();
1533
+ shadow.add(shadowLabel = new JLabel("Shadowing")); // , aConstraints);
1534
+ shadowLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1535
+ shadow.add(shadowField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1536
+ diffuseSection.add(shadow);
15381537
1539
- ctrlPanel.add(shadowLabel = new JLabel("Shadowing"), aConstraints);
1540
- shadowLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1541
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1542
- aConstraints.gridx += 1;
1543
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1544
- ctrlPanel.add(shadowField = new NumberSlider(0.001, 50, -1), aConstraints);
1545
- aConstraints.gridx = 0;
1546
- aConstraints.gridy += 1;
1547
- aConstraints.gridwidth = 1;
1538
+ cGridBag fakedepth = new cGridBag();
1539
+ fakedepth.add(fakedepthLabel = new JLabel("Fakedepth")); // , aConstraints);
1540
+ fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1541
+ fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1542
+ diffuseSection.add(fakedepth);
15481543
1549
- ctrlPanel.add(fakedepthLabel = new JLabel("Fakedepth"), aConstraints);
1550
- fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1551
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1552
- aConstraints.gridx += 1;
1553
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1554
- ctrlPanel.add(fakedepthField = new NumberSlider(0.001, 50, -1), aConstraints);
1555
- aConstraints.gridx = 0;
1556
- aConstraints.gridy += 1;
1557
- aConstraints.gridwidth = 1;
1544
+ panel.add(new JSeparator());
1545
+
1546
+ panel.add(diffuseSection);
1547
+
1548
+ //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
1549
+
1550
+ cGridBag specularSection = new cGridBag().setVertical(true);
15581551
1559
- //aConstraints.weighty = 1;
1560
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
1561
- //aConstraints.gridx += 1;
1562
- ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
1563
- aConstraints.weighty = 0;
1564
- aConstraints.gridx = 0;
1565
- aConstraints.gridy += 1;
1566
- aConstraints.gridwidth = 1;
1552
+ cGridBag specular = new cGridBag();
1553
+ specular.add(specularLabel = new JLabel("Specular")); // , aConstraints);
1554
+ specularLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1555
+ specular.add(specularField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1556
+ specularSection.add(specular);
15671557
1568
- ctrlPanel.add(specularLabel = new JLabel("Specular"), aConstraints);
1569
- specularLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1570
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1571
- aConstraints.gridx += 1;
1572
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1573
- ctrlPanel.add(specularField = new NumberSlider(0.001, 50, -1), aConstraints);
1574
- aConstraints.gridx = 0;
1575
- aConstraints.gridy += 1;
1576
- aConstraints.gridwidth = 1;
1558
+ cGridBag lightarea = new cGridBag();
1559
+ lightarea.add(lightareaLabel = new JLabel("Lightarea")); // , aConstraints);
1560
+ lightareaLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1561
+ lightarea.add(lightareaField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1562
+ specularSection.add(lightarea);
15771563
1578
- ctrlPanel.add(lightareaLabel = new JLabel("Lightarea"), aConstraints);
1579
- lightareaLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1580
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1581
- aConstraints.gridx += 1;
1582
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1583
- ctrlPanel.add(lightareaField = new NumberSlider(0.001, 50, -1), aConstraints);
1584
- aConstraints.gridx = 0;
1585
- aConstraints.gridy += 1;
1586
- aConstraints.gridwidth = 1;
1564
+ cGridBag shininess = new cGridBag();
1565
+ shininess.add(shininessLabel = new JLabel("Roughness")); // , aConstraints);
1566
+ shininessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1567
+ shininess.add(shininessField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1568
+ specularSection.add(shininess);
15871569
1588
- ctrlPanel.add(shininessLabel = new JLabel("Roughness"), aConstraints);
1589
- shininessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1590
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1591
- aConstraints.gridx += 1;
1592
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1593
- ctrlPanel.add(shininessField = new NumberSlider(0.001, 50, -1), aConstraints);
1594
- aConstraints.gridx = 0;
1595
- aConstraints.gridy += 1;
1596
- aConstraints.gridwidth = 1;
1570
+ cGridBag metalness = new cGridBag();
1571
+ metalness.add(metalnessLabel = new JLabel("Metalness")); // , aConstraints);
1572
+ metalnessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1573
+ metalness.add(metalnessField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1574
+ specularSection.add(metalness);
15971575
1598
- ctrlPanel.add(metalnessLabel = new JLabel("Metalness"), aConstraints);
1599
- metalnessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1600
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1601
- aConstraints.gridx += 1;
1602
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1603
- ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1604
- aConstraints.gridx = 0;
1605
- aConstraints.gridy += 1;
1606
- aConstraints.gridwidth = 1;
1576
+ cGridBag velvet = new cGridBag();
1577
+ velvet.add(velvetLabel = new JLabel("Velvet")); // , aConstraints);
1578
+ velvetLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1579
+ velvet.add(velvetField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1580
+ specularSection.add(velvet);
16071581
1608
- ctrlPanel.add(velvetLabel = new JLabel("Velvet"), aConstraints);
1609
- velvetLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1610
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1611
- aConstraints.gridx += 1;
1612
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1613
- ctrlPanel.add(velvetField = new NumberSlider(0.001, 50, -1), aConstraints);
1614
- aConstraints.gridx = 0;
1615
- aConstraints.gridy += 1;
1616
- aConstraints.gridwidth = 1;
1617
-
1618
- shiftField = AddSlider(ctrlPanel, "Shift", 0.001, 50, copy.material.shift, -1);
1619
- Return();
1582
+ shiftField = (cNumberSlider)AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1).getComponent(1);
1583
+ //Return();
16201584 // ctrlPanel.add(shiftLabel = new JLabel("Shift"), aConstraints);
16211585 // shiftLabel.setHorizontalAlignment(SwingConstants.TRAILING);
16221586 // aConstraints.fill = GridBagConstraints.HORIZONTAL;
....@@ -1627,130 +1591,93 @@
16271591 // aConstraints.gridy += 1;
16281592 // aConstraints.gridwidth = 1;
16291593
1630
- //aConstraints.weighty = 1;
1631
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
1632
- //aConstraints.gridx += 1;
1633
- ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
1634
- aConstraints.weighty = 0;
1635
- aConstraints.gridx = 0;
1636
- aConstraints.gridy += 1;
1637
- aConstraints.gridwidth = 1;
16381594
1639
- ctrlPanel.add(cameraLabel = new JLabel("GlobalLight"), aConstraints);
1640
- cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1641
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1642
- aConstraints.gridx += 1;
1643
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1644
- ctrlPanel.add(cameraField = new NumberSlider(0.001, 50, -1), aConstraints);
1645
- aConstraints.gridx = 0;
1646
- aConstraints.gridy += 1;
1647
- aConstraints.gridwidth = 1;
1595
+ panel.add(new JSeparator());
1596
+
1597
+ panel.add(specularSection);
1598
+
1599
+ //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
1600
+
1601
+ cGridBag globalSection = new cGridBag().setVertical(true);
16481602
1649
- ctrlPanel.add(ambientLabel = new JLabel("Ambient"), aConstraints);
1650
- ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1651
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1652
- aConstraints.gridx += 1;
1653
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1654
- ctrlPanel.add(ambientField = new NumberSlider(0.001, 50, -1), aConstraints);
1655
- aConstraints.gridx = 0;
1656
- aConstraints.gridy += 1;
1657
- aConstraints.gridwidth = 1;
1603
+ cGridBag camera = new cGridBag();
1604
+ camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints);
1605
+ cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1606
+ camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1607
+ globalSection.add(camera);
16581608
1659
- ctrlPanel.add(backlitLabel = new JLabel("Backlit"), aConstraints);
1660
- backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1661
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1662
- aConstraints.gridx += 1;
1663
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1664
- ctrlPanel.add(backlitField = new NumberSlider(0.001, 50, -1), aConstraints);
1665
- aConstraints.gridx = 0;
1666
- aConstraints.gridy += 1;
1667
- aConstraints.gridwidth = 1;
1609
+ cGridBag ambient = new cGridBag();
1610
+ ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints);
1611
+ ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1612
+ ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1613
+ globalSection.add(ambient);
16681614
1669
- ctrlPanel.add(opacityLabel = new JLabel("Opacity"), aConstraints);
1670
- opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1671
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1672
- aConstraints.gridx += 1;
1673
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1674
- ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1675
- aConstraints.gridx = 0;
1676
- aConstraints.gridy += 1;
1677
- aConstraints.gridwidth = 1;
1678
- aConstraints.weighty = 0;
1615
+ cGridBag backlit = new cGridBag();
1616
+ backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints);
1617
+ backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1618
+ backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1619
+ globalSection.add(backlit);
16791620
1680
- ctrlPanel.add(bumpLabel = new JLabel("Bump"), aConstraints);
1681
- bumpLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1682
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1683
- aConstraints.gridx += 1;
1684
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1685
- ctrlPanel.add(bumpField = new NumberSlider(0.0, 2), aConstraints);
1686
- aConstraints.gridx = 0;
1687
- aConstraints.gridy += 1;
1688
- aConstraints.gridwidth = 1;
1621
+ cGridBag opacity = new cGridBag();
1622
+ opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints);
1623
+ opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1624
+ opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1625
+ globalSection.add(opacity);
16891626
1690
- ctrlPanel.add(noiseLabel = new JLabel("Noise"), aConstraints);
1691
- noiseLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1692
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1693
- aConstraints.gridx += 1;
1694
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1695
- ctrlPanel.add(noiseField = new NumberSlider(0.0, 1/*5*/), aConstraints);
1696
- aConstraints.gridx = 0;
1697
- aConstraints.gridy += 1;
1698
- aConstraints.gridwidth = 1;
1627
+ panel.add(new JSeparator());
1628
+
1629
+ panel.add(globalSection);
1630
+
1631
+ //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
1632
+
1633
+ cGridBag textureSection = new cGridBag().setVertical(true);
16991634
1700
- ctrlPanel.add(powerLabel = new JLabel("Turbulance"), aConstraints);
1701
- powerLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1702
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1703
- aConstraints.gridx += 1;
1704
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1705
- ctrlPanel.add(powerField = new NumberSlider(0.0, 5), aConstraints);
1706
- aConstraints.gridx = 0;
1707
- aConstraints.gridy += 1;
1708
- aConstraints.gridwidth = 1;
1635
+ cGridBag bump = new cGridBag();
1636
+ bump.add(bumpLabel = new JLabel("Bump")); // , aConstraints);
1637
+ bumpLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1638
+ bump.add(bumpField = new cNumberSlider(this, 0.0, 2)); // , aConstraints);
1639
+ textureSection.add(bump);
17091640
1710
- ctrlPanel.add(borderfadeLabel = new JLabel("Borderfade"), aConstraints);
1711
- borderfadeLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1712
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1713
- aConstraints.gridx += 1;
1714
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1715
- ctrlPanel.add(borderfadeField = new NumberSlider(0.0, 2), aConstraints);
1716
- aConstraints.gridx = 0;
1717
- aConstraints.gridy += 1;
1718
- aConstraints.gridwidth = 1;
1641
+ cGridBag noise = new cGridBag();
1642
+ noise.add(noiseLabel = new JLabel("Noise")); // , aConstraints);
1643
+ noiseLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1644
+ noise.add(noiseField = new cNumberSlider(this, 0.0, 1/*5*/)); // , aConstraints);
1645
+ textureSection.add(noise);
17191646
1720
- ctrlPanel.add(fogLabel = new JLabel("Punch"), aConstraints);
1721
- fogLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1722
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1723
- aConstraints.gridx += 1;
1724
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1725
- ctrlPanel.add(fogField = new NumberSlider(0.0, 20), aConstraints);
1726
- aConstraints.gridx = 0;
1727
- aConstraints.gridy += 1;
1728
- aConstraints.gridwidth = 1;
1647
+ cGridBag power = new cGridBag();
1648
+ power.add(powerLabel = new JLabel("Turbulance")); // , aConstraints);
1649
+ powerLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1650
+ power.add(powerField = new cNumberSlider(this, 0.0, 5)); // , aConstraints);
1651
+ textureSection.add(power);
17291652
1730
- ctrlPanel.add(opacityPowerLabel = new JLabel("Halo"), aConstraints);
1731
- opacityPowerLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1732
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1733
- aConstraints.gridx += 1;
1734
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1735
- ctrlPanel.add(opacityPowerField = new NumberSlider(0.0, 10 /*10 dec 2013*/), aConstraints);
1736
- aConstraints.gridx = 0;
1737
- aConstraints.gridy += 1;
1738
- aConstraints.gridwidth = 1;
1653
+ cGridBag borderfade = new cGridBag();
1654
+ borderfade.add(borderfadeLabel = new JLabel("Borderfade")); // , aConstraints);
1655
+ borderfadeLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1656
+ borderfade.add(borderfadeField = new cNumberSlider(this, 0.0, 2)); // , aConstraints);
1657
+ textureSection.add(borderfade);
17391658
1740
- //aConstraints.weighty = 1;
1741
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
1742
- //aConstraints.gridx += 1;
1743
- ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
1744
- aConstraints.weighty = 0;
1659
+ cGridBag fog = new cGridBag();
1660
+ fog.add(fogLabel = new JLabel("Punch")); // , aConstraints);
1661
+ fogLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1662
+ fog.add(fogField = new cNumberSlider(this, 0.0, 20)); // , aConstraints);
1663
+ textureSection.add(fog);
17451664
1746
- aConstraints.gridx = 0;
1747
- aConstraints.gridy = 0;
1748
- aConstraints.gridwidth = 1;
1665
+ cGridBag opacityPower = new cGridBag();
1666
+ opacityPower.add(opacityPowerLabel = new JLabel("Halo")); // , aConstraints);
1667
+ opacityPowerLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1668
+ opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints);
1669
+ textureSection.add(opacityPower);
1670
+
1671
+ panel.add(new JSeparator());
1672
+
1673
+ panel.add(textureSection);
1674
+
1675
+ //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
17491676
17501677 SetMaterial(copy); // .GetMaterial());
17511678
1752
- colorField.addChangeListener(this);
1753
- modulationField.addChangeListener(this);
1679
+ //colorField.addChangeListener(this);
1680
+// modulationField.addChangeListener(this);
17541681 metalnessField.addChangeListener(this);
17551682 diffuseField.addChangeListener(this);
17561683 specularField.addChangeListener(this);
....@@ -1780,12 +1707,15 @@
17801707 opacityPowerField.addChangeListener(this);
17811708 /**/
17821709
1783
- resetSlidersButton.addActionListener(this);
17841710 clearMaterialButton.addActionListener(this);
17851711 createMaterialButton.addActionListener(this);
1786
-
1787
- propagateToggle.addItemListener(this);
1788
- multiplyToggle.addItemListener(this);
1712
+
1713
+ if (Globals.ADVANCED)
1714
+ {
1715
+ resetSlidersButton.addActionListener(this);
1716
+ propagateToggle.addItemListener(this);
1717
+ multiplyToggle.addItemListener(this);
1718
+ }
17891719 }
17901720
17911721 void DropFile(java.io.File[] files, boolean textures)
....@@ -1859,19 +1789,21 @@
18591789 }
18601790
18611791 // Images/textures
1862
- if (textures
1863
- && (filename.toLowerCase().endsWith(".jpg")
1864
- || filename.toLowerCase().endsWith(".jpeg")
1865
- || filename.toLowerCase().endsWith(".gif")
1866
- || filename.toLowerCase().endsWith(".png")
1867
- || filename.toLowerCase().endsWith(".tre")
1868
- || filename.toLowerCase().endsWith(".bmp")
1869
- || filename.toLowerCase().endsWith(".tga")
1870
- || filename.toLowerCase().endsWith(".sgi")
1871
- || filename.toLowerCase().endsWith(".tif")
1872
- || filename.toLowerCase().endsWith(".tiff")))
1792
+ if (filename.toLowerCase().endsWith(".jpg")
1793
+ || filename.toLowerCase().endsWith(".jpeg")
1794
+ || filename.toLowerCase().endsWith(".gif")
1795
+ || filename.toLowerCase().endsWith(".png")
1796
+ || filename.toLowerCase().endsWith(".tre")
1797
+ || filename.toLowerCase().endsWith(".bmp")
1798
+ || filename.toLowerCase().endsWith(".tga")
1799
+ || filename.toLowerCase().endsWith(".sgi")
1800
+ || filename.toLowerCase().endsWith(".tif")
1801
+ || filename.toLowerCase().endsWith(".tiff"))
18731802 {
1874
- DropTexture(filename);
1803
+ if (textures)
1804
+ DropTexture(filename);
1805
+ else
1806
+ CreateBillboard(filename);
18751807 continue;
18761808 }
18771809
....@@ -1880,6 +1812,60 @@
18801812 }
18811813
18821814 ResetModel();
1815
+ }
1816
+
1817
+ void CreateBillboard(String filename)
1818
+ {
1819
+ Object3D source = null;
1820
+ Object3D group = copy;
1821
+
1822
+ if (group.selection.size() > 0)
1823
+ {
1824
+ source = group.selection.get(0);
1825
+ }
1826
+
1827
+ Grid grid = new Grid(1,1);
1828
+ grid.material = null;
1829
+
1830
+ grid.toParent = LA.newMatrix();
1831
+ grid.fromParent = LA.newMatrix();
1832
+ LA.matYRotate(grid.toParent, Math.PI/2);
1833
+ LA.matXRotate(grid.toParent, -Math.PI/2);
1834
+ LA.matXRotate(grid.fromParent, Math.PI/2);
1835
+ LA.matYRotate(grid.fromParent, -Math.PI/2);
1836
+
1837
+ BillboardNode bb = new BillboardNode();
1838
+ bb.addChild(grid);
1839
+
1840
+ Object3D newgroup = new Object3D();
1841
+ newgroup.CreateMaterial();
1842
+
1843
+ File file = new File(filename);
1844
+ newgroup.name = file.getName();
1845
+ newgroup.addChild(bb);
1846
+
1847
+ Object3D main = newgroup;
1848
+
1849
+ main.SetPigmentTexture(filename);
1850
+
1851
+ if (source != null)
1852
+ {
1853
+ main.material = new cMaterial(source.material);
1854
+ if (main.projectedVertices.length < source.projectedVertices.length)
1855
+ {
1856
+ main.projectedVertices = new Object3D.cVector2[source.projectedVertices.length];
1857
+ }
1858
+
1859
+ for (int i=0; i<source.projectedVertices.length; i++)
1860
+ {
1861
+ main.projectedVertices[i].x = source.projectedVertices[i].x;
1862
+ main.projectedVertices[i].y = source.projectedVertices[i].y;
1863
+ }
1864
+
1865
+ main.texres = source.texres;
1866
+ }
1867
+
1868
+ makeSomething(newgroup, false);
18831869 }
18841870
18851871 Point location;
....@@ -1900,7 +1886,7 @@
19001886
19011887 //? flashIt = false;
19021888 CameraPane pane = (CameraPane) cameraView;
1903
- pane.clickStart(location.x, location.y, 0);
1889
+ pane.clickStart(location.x, location.y, 0, 0);
19041890 pane.clickEnd(location.x, location.y, 0, true);
19051891
19061892 if (group.selection.size() == 1)
....@@ -1949,6 +1935,7 @@
19491935 e2.printStackTrace();
19501936 }
19511937 }
1938
+
19521939 LoadJMEThread loadThread;
19531940
19541941 class LoadJMEThread extends Thread
....@@ -2006,6 +1993,7 @@
20061993 //LoadFile0(filename, converter);
20071994 }
20081995 }
1996
+
20091997 LoadOBJThread loadObjThread;
20101998
20111999 class LoadOBJThread extends Thread
....@@ -2138,6 +2126,8 @@
21382126 {
21392127 Mocap sel = (Mocap) copy.selection.get(0);
21402128
2129
+ sel.SetCurrentBones(sel.frame);
2130
+
21412131 sel.fullname = fullname;
21422132
21432133 if (changename)
....@@ -2151,14 +2141,18 @@
21512141 sel.smoothed = false;
21522142
21532143 // if (!changename)
2154
- sel.SetPositionDelta(false, true, true, true/*?*/); // false
2144
+ //sel.SetPositionDelta(false, true, true, true/*?*/); // false
2145
+ sel.SetGlobalTransform();
2146
+ sel.LoadData();
2147
+ sel.Rewind();
2148
+ sel.Fade();
21552149 // sel.setPose(0);
21562150 refreshContents();
21572151 } else
21582152 {
21592153 mocap.Reset();
21602154 // new skeleton
2161
- makeSomething(mocap, false); // true);
2155
+ makeSomething(mocap, true); // true);
21622156 }
21632157 } catch (Exception e)
21642158 {
....@@ -2185,6 +2179,8 @@
21852179 {
21862180 Mocap sel = (Mocap) select;
21872181
2182
+ sel.SetCurrentBones(sel.frame);
2183
+
21882184 File file = new File(fullname);
21892185
21902186 // Mocap mocap = new Mocap("Mocap" + file.getName());
....@@ -2251,7 +2247,11 @@
22512247
22522248 if (!changename)
22532249 {
2254
- sel.SetPositionDelta(false, true, true, true/*?*/);
2250
+ //sel.SetPositionDelta(false, true, true, true/*?*/);
2251
+ sel.SetGlobalTransform();
2252
+ sel.LoadData();
2253
+ sel.Rewind();
2254
+ sel.Fade();
22552255 }
22562256
22572257 // sel.setPose(0);
....@@ -2345,11 +2345,11 @@
23452345
23462346 void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName)
23472347 {
2348
- if (GrafreeD.standAlone)
2348
+ if (Grafreed.standAlone)
23492349 {
23502350 /**/
23512351 FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD);
2352
- browser.show();
2352
+ browser.setVisible(true);
23532353 String filename = browser.getFile();
23542354 if (filename != null && filename.length() > 0)
23552355 {
....@@ -2494,6 +2494,7 @@
24942494 }
24952495 if (input == null)
24962496 {
2497
+ new Exception().printStackTrace();
24972498 System.exit(0);
24982499 }
24992500
....@@ -2708,7 +2709,8 @@
27082709 return;
27092710 }
27102711
2711
- multiplyToggle.setSelected(mat.multiply);
2712
+ if (multiplyToggle != null)
2713
+ multiplyToggle.setSelected(mat.multiply);
27122714
27132715 assert (object.projectedVertices != null);
27142716
....@@ -2890,23 +2892,40 @@
28902892 // june 2013 copy.HardTouch();
28912893 cameraView.repaint();
28922894 return;
2893
- } else if (event.getSource() == toggleFullItem)
2895
+ } else if (event.getSource() == toggleTimelineItem)
28942896 {
2895
- if (CameraPane.FULLSCREEN)
2897
+ timeline ^= true;
2898
+
2899
+ if (timeline)
28962900 {
2897
- frame.getContentPane().remove(/*"Center",*/bigThree);
2898
- framePanel.add(bigThree);
2899
- frame.getContentPane().add(/*"Center",*/framePanel);
2900
- } else
2901
- {
2902
- frame.getContentPane().remove(/*"Center",*/framePanel);
2903
- frame.getContentPane().add(/*"Center",*/bigThree);
2901
+ centralPanel.remove(cameraView);
2902
+ cameraPanel.add(cameraView);
2903
+ centralPanel.add(cameraPanel);
2904
+ frame.setJMenuBar(timelineMenubar);
2905
+ wasFullScreen = CameraPane.FULLSCREEN;
2906
+ if (!CameraPane.FULLSCREEN)
2907
+ ToggleFullScreen();
2908
+ toggleFullScreenItem.setEnabled(false);
29042909 }
2910
+ else
2911
+ {
2912
+ centralPanel.remove(cameraPanel);
2913
+ centralPanel.add(cameraView);
2914
+ frame.setJMenuBar(null);
2915
+ if (!wasFullScreen)
2916
+ ToggleFullScreen();
2917
+ toggleFullScreenItem.setEnabled(true);
2918
+ }
2919
+
29052920 frame.validate();
2906
- cameraView.ToggleFullScreen();
2921
+ return;
2922
+ } else if (event.getSource() == toggleFullScreenItem)
2923
+ {
2924
+ ToggleFullScreen();
2925
+ frame.validate();
29072926
29082927 return;
2909
- } else if (event.getSource() == toggleRandomItem)
2928
+ } else if (event.getSource() == toggleSwitchItem)
29102929 {
29112930 cameraView.ToggleRandom();
29122931 cameraView.repaint();
....@@ -2937,6 +2956,10 @@
29372956 {
29382957 copy.live ^= true;
29392958 return;
2959
+ } else if (event.getSource() == selectCB)
2960
+ {
2961
+ copy.dontselect ^= true;
2962
+ return;
29402963 } else if (event.getSource() == hideCB)
29412964 {
29422965 copy.hide ^= true;
....@@ -2951,6 +2974,7 @@
29512974 if (event.getSource() == randomCB)
29522975 {
29532976 copy.random ^= true;
2977
+ objEditor.refreshContents();
29542978 return;
29552979 }
29562980 if (event.getSource() == speedupCB)
....@@ -2974,8 +2998,9 @@
29742998
29752999 public void actionPerformed(ActionEvent event)
29763000 {
3001
+ Object source = event.getSource();
29773002 // SCRIPT DIALOG
2978
- if (event.getSource() == okbutton)
3003
+ if (source == okbutton)
29793004 {
29803005 textpanel.setVisible(false);
29813006 textpanel.remove(textarea);
....@@ -2987,7 +3012,7 @@
29873012 textarea = null;
29883013 textpanel = null;
29893014 }
2990
- if (event.getSource() == cancelbutton)
3015
+ if (source == cancelbutton)
29913016 {
29923017 textpanel.setVisible(false);
29933018 textpanel.remove(textarea);
....@@ -2999,49 +3024,50 @@
29993024 //applySelf();
30003025 //client.refreshEditWindow();
30013026 //refreshContents();
3002
- if (event.getSource() == nameField)
3027
+ if (source == nameField)
30033028 {
30043029 //System.out.println("ObjEditor " + event);
30053030 applySelf0(true);
30063031 //parent.applySelf();
30073032 objEditor.refreshContents();
3008
- } else if (event.getSource() == resetButton)
3033
+ } else if (source == resetButton)
30093034 {
30103035 CameraPane.fullreset = true;
30113036 copy.Reset(); // ResetMeshes();
30123037 copy.Touch();
30133038 objEditor.refreshContents();
3014
- } else if (event.getSource() == stepItem)
3039
+ } else if (source == stepItem)
30153040 {
3016
- cameraView.ONESTEP = true;
3041
+ //cameraView.ONESTEP = true;
3042
+ Globals.ONESTEP = true;
30173043 cameraView.repaint();
30183044 return;
3019
- } else if (event.getSource() == stepButton)
3045
+ } else if (source == stepButton)
30203046 {
30213047 copy.Step();
30223048 copy.Touch();
30233049 objEditor.refreshContents();
3024
- } else if (event.getSource() == slowerButton)
3050
+ } else if (source == slowerButton)
30253051 {
30263052 copy.Slower();
30273053 copy.Touch();
30283054 objEditor.refreshContents();
3029
- } else if (event.getSource() == fasterButton)
3055
+ } else if (source == fasterButton)
30303056 {
30313057 copy.Faster();
30323058 copy.Touch();
30333059 objEditor.refreshContents();
3034
- } else if (event.getSource() == remarkButton)
3060
+ } else if (source == remarkButton)
30353061 {
30363062 copy.Remark();
30373063 copy.Touch();
30383064 objEditor.refreshContents();
3039
- } else if (event.getSource() == stepAllButton)
3065
+ } else if (source == stepAllButton)
30403066 {
30413067 copy.StepAll();
30423068 copy.Touch();
30433069 objEditor.refreshContents();
3044
- } else if (event.getSource() == resetAllButton)
3070
+ } else if (source == resetAllButton)
30453071 {
30463072 //CameraPane.fullreset = true;
30473073 copy.ResetAll(); // ResetMeshes();
....@@ -3074,53 +3100,75 @@
30743100 // Close();
30753101 // }
30763102 // else
3077
- if (event.getSource() == resetSlidersButton)
3103
+ if (source == resetSlidersButton)
30783104 {
30793105 ResetSliders();
3080
- } else if (event.getSource() == clearMaterialButton)
3106
+ } else if (source == clearMaterialButton)
30813107 {
30823108 ClearMaterial();
3083
- } else if (event.getSource() == createMaterialButton)
3109
+ } else if (source == createMaterialButton)
30843110 {
30853111 CreateMaterial();
3086
- } else if (event.getSource() == clearPanelButton)
3112
+ } else if (source == clearPanelButton)
30873113 {
30883114 copy.ClearUI();
30893115 refreshContents(true);
3090
- } /*
3091
- }
3092
-
3093
- public boolean action(Event event, Object arg)
3094
- {
3095
- */ else if (event.getSource() == closeItem)
3116
+ } else if (source == importGFDItem)
3117
+ {
3118
+ ImportGFD();
3119
+ } else
3120
+ if (source == importVRMLX3DItem)
3121
+ {
3122
+ ImportVRMLX3D();
3123
+ } else
3124
+ if (source == import3DSItem)
3125
+ {
3126
+ objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
3127
+ } else
3128
+ if (source == importOBJItem)
3129
+ {
3130
+ //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
3131
+ FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD);
3132
+ browser.setVisible(true);
3133
+ String filename = browser.getFile();
3134
+ if (filename != null && filename.length() > 0)
3135
+ {
3136
+ String fullname = browser.getDirectory() + filename;
3137
+ makeSomething(ReadOBJ(fullname), true);
3138
+ }
3139
+ } else
3140
+ if (source == closeItem)
30963141 {
30973142 Close();
30983143 //return true;
3099
- } else if (event.getSource() == loadItem)
3144
+ } else if (source == loadItem)
31003145 {
31013146 load();
31023147 //return true;
3103
- } else if (event.getSource() == saveItem)
3148
+ } else if (source == newItem)
3149
+ {
3150
+ New();
3151
+ } else if (source == saveItem)
31043152 {
31053153 save();
31063154 //return true;
3107
- } else if (event.getSource() == saveAsItem)
3155
+ } else if (source == saveAsItem)
31083156 {
31093157 saveAs();
31103158 //return true;
3111
- } else if (event.getSource() == reexportItem)
3159
+ } else if (source == reexportItem)
31123160 {
31133161 reexport();
31143162 //return true;
3115
- } else if (event.getSource() == exportAsItem)
3163
+ } else if (source == exportAsItem)
31163164 {
31173165 export();
31183166 //return true;
3119
- } else if (event.getSource() == povItem)
3167
+ } else if (source == povItem)
31203168 {
31213169 generatePOV();
31223170 //return true;
3123
- } else if (event.getSource() == zBufferItem)
3171
+ } else if (source == zBufferItem)
31243172 {
31253173 try
31263174 {
....@@ -3142,21 +3190,8 @@
31423190 cameraView.repaint();
31433191 //return true;
31443192 }
3145
- */ else if (event.getSource() == editCameraItem)
3146
- {
3147
- cameraView.ProtectCamera();
3148
- cameraView.repaint();
3149
- return;
3150
- } else if (event.getSource() == revertCameraItem)
3151
- {
3152
- cameraView.RevertCamera();
3153
- cameraView.repaint();
3154
- return;
3155
- } else if (event.getSource() == textureButton)
3156
- {
3157
- return; // true;
3158
- } else // combos...
3159
- if (event.getSource() == texresMenu)
3193
+ */ else // combos...
3194
+ if (source == texresMenu)
31603195 {
31613196 System.err.println("Object = " + copy + "; change value " + copy.texres + " to " + texresMenu.getSelectedIndex());
31623197 copy.texres = texresMenu.getSelectedIndex();
....@@ -3168,27 +3203,205 @@
31683203 }
31693204 }
31703205
3171
- void ToggleAnimation()
3206
+ void New()
31723207 {
3173
- if (!CameraPane.ANIMATION)
3208
+ while (copy.Size() > 1)
31743209 {
3175
- FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE);
3210
+ copy.remove(1);
3211
+ }
3212
+
3213
+ ResetModel();
3214
+ objEditor.refreshContents();
3215
+ }
3216
+
3217
+ static public Object clone(Object o)
3218
+ {
3219
+ try
3220
+ {
3221
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
3222
+ ObjectOutputStream out = new ObjectOutputStream(baos);
3223
+
3224
+ out.writeObject(o);
3225
+
3226
+ ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
3227
+ ObjectInputStream in = new ObjectInputStream(bais);
3228
+ Object obj = in.readObject();
3229
+ in.close();
3230
+ out.close();
3231
+ return obj;
3232
+ } catch (Exception e)
3233
+ {
3234
+ System.err.println(e);
3235
+ return null;
3236
+ }
3237
+ }
3238
+
3239
+ cRadio GetCurrentTab()
3240
+ {
3241
+ cRadio ab;
3242
+ for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
3243
+ {
3244
+ ab = (cRadio)e.nextElement();
3245
+ if(ab.GetObject() == copy)
3246
+ {
3247
+ return ab;
3248
+ }
3249
+ }
3250
+
3251
+ return null;
3252
+ }
3253
+
3254
+ public void Save()
3255
+ {
3256
+ cRadio tab = GetCurrentTab();
3257
+
3258
+ //EditorFrame.m_MainFrame.requestFocusInWindow();
3259
+ tab.graphs[tab.undoindex++] = (Object3D)clone(copy);
3260
+
3261
+ for (int i = tab.undoindex; i < tab.graphs.length; i++)
3262
+ {
3263
+ tab.graphs[i] = null;
3264
+ }
3265
+
3266
+ // test save
3267
+ if (false)
3268
+ {
3269
+ try
3270
+ {
3271
+ FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex);
3272
+ ObjectOutputStream p = new ObjectOutputStream(ostream);
3273
+
3274
+ p.writeObject(copy);
3275
+
3276
+ p.flush();
3277
+
3278
+ ostream.close();
3279
+ } catch (Exception e)
3280
+ {
3281
+ e.printStackTrace();
3282
+ }
3283
+ }
3284
+ }
3285
+
3286
+ void CopyChanged(Object3D obj)
3287
+ {
3288
+ copy.clear();
3289
+
3290
+ for (int i=0; i<obj.Size(); i++)
3291
+ {
3292
+ copy.add(obj.get(i));
3293
+ }
3294
+
3295
+ copy.Touch();
3296
+
3297
+ ResetModel();
3298
+ copy.HardTouch(); // recompile?
3299
+
3300
+ cRadio ab;
3301
+ for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
3302
+ {
3303
+ ab = (cRadio)e.nextElement();
3304
+ Object3D test = copy.GetObject(ab.object.GetUUID());
3305
+ //ab.camera = (Camera)copy.GetObject(ab.camera.GetUUID());
3306
+ if (test != null)
3307
+ {
3308
+ test.editWindow = ab.object.editWindow;
3309
+ ab.object = test;
3310
+ }
3311
+ }
3312
+
3313
+ refreshContents();
3314
+ }
3315
+
3316
+ public void Undo()
3317
+ {
3318
+ cRadio tab = GetCurrentTab();
3319
+
3320
+ if (tab.undoindex == 0)
3321
+ {
3322
+ java.awt.Toolkit.getDefaultToolkit().beep();
3323
+ return;
3324
+ }
3325
+
3326
+ if (tab.graphs[tab.undoindex] == null)
3327
+ {
3328
+ Save();
3329
+ tab.undoindex -= 1;
3330
+ }
3331
+
3332
+ tab.undoindex -= 1;
3333
+
3334
+ CopyChanged(tab.graphs[tab.undoindex]);
3335
+ }
3336
+
3337
+ public void Redo()
3338
+ {
3339
+ cRadio tab = GetCurrentTab();
3340
+
3341
+ if (tab.graphs[tab.undoindex + 1] == null)
3342
+ {
3343
+ java.awt.Toolkit.getDefaultToolkit().beep();
3344
+ return;
3345
+ }
3346
+
3347
+ tab.undoindex += 1;
3348
+
3349
+ CopyChanged(tab.graphs[tab.undoindex]);
3350
+ }
3351
+
3352
+ void ImportGFD()
3353
+ {
3354
+ FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
31763355 browser.show();
31773356 String filename = browser.getFile();
31783357 if (filename != null && filename.length() > 0)
31793358 {
3180
- CameraPane.filename = browser.getDirectory() + filename;
3359
+ String fullname = browser.getDirectory() + filename;
3360
+
3361
+ //Object3D readobj =
3362
+ objEditor.ReadGFD(fullname, objEditor);
3363
+ //makeSomething(readobj);
3364
+ }
3365
+ }
3366
+
3367
+ void ImportVRMLX3D()
3368
+ {
3369
+ if (Grafreed.standAlone)
3370
+ {
3371
+ /**/
3372
+ FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
3373
+ browser.show();
3374
+ String filename = browser.getFile();
3375
+ if (filename != null && filename.length() > 0)
3376
+ {
3377
+ String fullname = browser.getDirectory() + filename;
3378
+ LoadVRMLX3D(fullname);
3379
+ }
3380
+ /**/
3381
+ }
3382
+ }
3383
+
3384
+ void ToggleAnimation()
3385
+ {
3386
+ if (!Globals.ANIMATION)
3387
+ {
3388
+ FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE);
3389
+ browser.setVisible(true);
3390
+ String filename = browser.getFile();
3391
+ if (filename != null && filename.length() > 0)
3392
+ {
3393
+ Globals.filename = browser.getDirectory() + filename;
31813394 //CameraPane.framecount = 0;
3182
- CameraPane.imagecount = 0;
3395
+ Globals.imagecount = 0;
31833396
3184
- CameraPane.ANIMATION ^= true;
3397
+ Globals.ANIMATION ^= true;
31853398
3186
- GrafreeD.wav.cursor = 0;
3187
- GrafreeD.wav.loop = 0;
3399
+ Grafreed.wav.cursor = 0;
3400
+ Grafreed.wav.loop = 0;
31883401 }
31893402 } else
31903403 {
3191
- CameraPane.ANIMATION ^= true;
3404
+ Globals.ANIMATION ^= true;
31923405 }
31933406 }
31943407
....@@ -3234,7 +3447,7 @@
32343447 void CreateMaterial()
32353448 {
32363449 //copy.ClearMaterial(); // PATCH
3237
- copy.CreateMaterialS(multiplyToggle.isSelected());
3450
+ copy.CreateMaterialS(multiplyToggle != null && multiplyToggle.isSelected());
32383451 if (copy.selection.size() > 0)
32393452 //SetMaterial(copy);
32403453 {
....@@ -3293,11 +3506,11 @@
32933506 {
32943507 copy.ResetBlockLoop(); // temporary problem
32953508
3296
- boolean random = CameraPane.RANDOM;
3297
- CameraPane.RANDOM = false; // parse everything
3509
+ boolean random = CameraPane.SWITCH;
3510
+ CameraPane.SWITCH = false; // parse everything
32983511 copy.ResetDisplayList();
32993512 copy.HardTouch();
3300
- CameraPane.RANDOM = random;
3513
+ CameraPane.SWITCH = random;
33013514 }
33023515
33033516 // public void applySelf()
....@@ -3367,10 +3580,40 @@
33673580 current.fakedepth = (float) fakedepthField.getFloat();
33683581 current.shadowbias = (float) shadowbiasField.getFloat();
33693582
3370
- if (!NumberSlider.frozen)
3583
+ if (!cNumberSlider.frozen)
33713584 {
33723585 //System.out.println("Propagate = " + propagate);
33733586 copy.UpdateMaterial(anchor, current, propagate);
3587
+
3588
+ if (copy.material != null)
3589
+ {
3590
+ cMaterial mat = copy.material;
3591
+
3592
+ colorField.SetToolTipValue((mat.color));
3593
+ modulationField.SetToolTipValue((mat.modulation));
3594
+ metalnessField.SetToolTipValue((mat.metalness));
3595
+ diffuseField.SetToolTipValue((mat.diffuse));
3596
+ specularField.SetToolTipValue((mat.specular));
3597
+ shininessField.SetToolTipValue((mat.shininess));
3598
+ shiftField.SetToolTipValue((mat.shift));
3599
+ ambientField.SetToolTipValue((mat.ambient));
3600
+ lightareaField.SetToolTipValue((mat.lightarea));
3601
+ diffusenessField.SetToolTipValue((mat.factor));
3602
+ velvetField.SetToolTipValue((mat.velvet));
3603
+ sheenField.SetToolTipValue((mat.sheen));
3604
+ subsurfaceField.SetToolTipValue((mat.subsurface));
3605
+ backlitField.SetToolTipValue((mat.bump));
3606
+ anisoField.SetToolTipValue((mat.aniso));
3607
+ anisoVField.SetToolTipValue((mat.anisoV));
3608
+ cameraField.SetToolTipValue((mat.cameralight));
3609
+ selfshadowField.SetToolTipValue((mat.diffuseness));
3610
+ shadowField.SetToolTipValue((mat.shadow));
3611
+ textureField.SetToolTipValue((mat.texture));
3612
+ opacityField.SetToolTipValue((mat.opacity));
3613
+ fakedepthField.SetToolTipValue((mat.fakedepth));
3614
+ shadowbiasField.SetToolTipValue((mat.shadowbias));
3615
+ }
3616
+
33743617 if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null)
33753618 {
33763619 copy.projectedVertices[0].x = (int) (bumpField.getFloat() * 1000);
....@@ -3415,6 +3658,7 @@
34153658 || e.getSource() == apertureField
34163659 || e.getSource() == shadowblurField)
34173660 {
3661
+ new Exception().printStackTrace();
34183662 System.exit(0);
34193663 cameraView.options1[0] = (float) focusField.getFloat() * 10;
34203664 cameraView.options1[1] = (float) apertureField.getFloat() / 1000;
....@@ -3441,7 +3685,13 @@
34413685 //System.out.println("PARENT = " + parent);
34423686 //if (parent != null)
34433687 // parent.applySelf();
3444
- refreshContents();
3688
+ if (e.getSource() == normalpushField)
3689
+ {
3690
+ objEditor.refreshContents();
3691
+ //Refresh();
3692
+ }
3693
+ else
3694
+ refreshContents();
34453695 // ??? client.refreshEditWindow();
34463696 }
34473697 //else
....@@ -3453,7 +3703,7 @@
34533703 //group.name = nameField.getText();
34543704 //objEditor.applySelf();
34553705
3456
- assert (objEditor == this);
3706
+ // OCT2018: assert (objEditor == this);
34573707 if (copy.selection == null || copy.selection.size() == 0)
34583708 //super.applySelf()
34593709 ; else
....@@ -3477,12 +3727,18 @@
34773727 objEditor.copy = keep;
34783728 }
34793729 }
3730
+
3731
+ if (normalpushField != null)
3732
+ copy.NORMALPUSH = (float)normalpushField.getFloat()/100;
34803733 }
34813734
34823735 void SnapObject()
34833736 {
3484
- Object3D obj = (Object3D)copy.selection.elementAt(0);
3485
- SnapObject(obj);
3737
+ if (copy.selection.size() > 0)
3738
+ {
3739
+ Object3D obj = (Object3D)copy.selection.elementAt(0);
3740
+ SnapObject(obj);
3741
+ }
34863742 }
34873743
34883744 void SnapObject(Object3D obj)
....@@ -3596,7 +3852,7 @@
35963852
35973853 if (obj.parent != null)
35983854 {
3599
- obj.parent.TransformToWorld(interest);
3855
+// obj.parent.TransformToWorld(interest);
36003856 }
36013857
36023858 if (!CameraPane.TRACK)
....@@ -3728,7 +3984,7 @@
37283984
37293985 radioPanel.revalidate();
37303986 radioPanel.repaint();
3731
- ctrlPanel.revalidate(); // ? new
3987
+ ctrlPanel.validate(); // ? new
37323988 ctrlPanel.repaint();
37333989 }
37343990 }
....@@ -3737,6 +3993,7 @@
37373993
37383994 void makeSomething(Object3D thing, boolean resetmodel) // deselect)
37393995 {
3996
+ Save();
37403997 //Tween.set(thing, 0).target(1).start(tweenManager);
37413998 //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager);
37423999 // if (thing instanceof GenericJointDemo)
....@@ -3940,6 +4197,7 @@
39404197 }
39414198 }
39424199 }
4200
+
39434201 LoadGFDThread loadGFDThread;
39444202
39454203 void ReadGFD(String fullname, iCallBack cb)
....@@ -3960,7 +4218,8 @@
39604218 try
39614219 {
39624220 java.io.FileInputStream istream = new java.io.FileInputStream(fullname);
3963
- java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream);
4221
+ java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream);
4222
+ java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream);
39644223
39654224 readobj = (Object3D) p.readObject();
39664225 istream.close();
....@@ -3968,7 +4227,20 @@
39684227 readobj.ResetDisplayList();
39694228 } catch (Exception e)
39704229 {
3971
- e.printStackTrace();
4230
+ //e.printStackTrace();
4231
+ try
4232
+ {
4233
+ java.io.FileInputStream istream = new java.io.FileInputStream(fullname);
4234
+ java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream);
4235
+
4236
+ readobj = (Object3D) p.readObject();
4237
+ istream.close();
4238
+
4239
+ readobj.ResetDisplayList();
4240
+ } catch (Exception e2)
4241
+ {
4242
+ e2.printStackTrace();
4243
+ }
39724244 }
39734245 // catch(java.io.StreamCorruptedException e) { e.printStackTrace(); }
39744246 // catch(java.io.IOException e) { System.out.println("IOexception"); e.printStackTrace(); }
....@@ -4085,7 +4357,7 @@
40854357
40864358 void load() // throws ClassNotFoundException
40874359 {
4088
- if (GrafreeD.standAlone)
4360
+ if (Grafreed.standAlone)
40894361 {
40904362 FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD);
40914363 browser.show();
....@@ -4172,11 +4444,13 @@
41724444 try
41734445 {
41744446 FileOutputStream ostream = new FileOutputStream(lastname);
4175
- ObjectOutputStream p = new ObjectOutputStream(ostream);
4447
+ java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream);
4448
+ ObjectOutputStream p = new ObjectOutputStream(zstream);
41764449
41774450 p.writeObject(copy);
41784451 p.flush();
41794452
4453
+ zstream.close();
41804454 ostream.close();
41814455
41824456 //FileOutputStream fos = new FileOutputStream(fullname);
....@@ -4186,11 +4460,12 @@
41864460 {
41874461 }
41884462 }
4463
+
41894464 String lastname;
41904465
41914466 void saveAs()
41924467 {
4193
- if (GrafreeD.standAlone)
4468
+ if (Grafreed.standAlone)
41944469 {
41954470 FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE);
41964471 browser.setVisible(true);
....@@ -4295,13 +4570,13 @@
42954570 try
42964571 {
42974572 FileOutputStream ostream = new FileOutputStream(filename);
4298
- // ?? java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream);
4299
- ObjectOutputStream p = new ObjectOutputStream(/*z*/ostream);
4573
+ java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream);
4574
+ ObjectOutputStream p = new ObjectOutputStream(zstream);
43004575
43014576 Object3D objectparent = obj.parent;
43024577 obj.parent = null;
43034578
4304
- Object3D object = (Object3D) GrafreeD.clone(obj);
4579
+ Object3D object = (Object3D) Grafreed.clone(obj);
43054580
43064581 obj.parent = objectparent;
43074582
....@@ -4313,8 +4588,8 @@
43134588 p.writeObject(object);
43144589 p.flush();
43154590
4591
+ zstream.close();
43164592 ostream.close();
4317
- // zstream.close();
43184593
43194594 // group.selection.get(0).parent = parent;
43204595 //FileOutputStream fos = new FileOutputStream(fullname);
....@@ -4335,7 +4610,7 @@
43354610 buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n");
43364611 cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height);
43374612 copy.generatePOV(buffer);
4338
- if (GrafreeD.standAlone)
4613
+ if (Grafreed.standAlone)
43394614 {
43404615 FileDialog browser = new FileDialog(frame, "Export POV", 1);
43414616 browser.show();
....@@ -4361,7 +4636,8 @@
43614636 Object3D client;
43624637 Object3D copy;
43634638 MenuBar menuBar;
4364
- Menu windowMenu;
4639
+ Menu fileMenu;
4640
+ MenuItem newItem;
43654641 MenuItem loadItem;
43664642 MenuItem saveItem;
43674643 MenuItem saveAsItem;
....@@ -4369,21 +4645,20 @@
43694645 MenuItem reexportItem;
43704646 MenuItem povItem;
43714647 MenuItem closeItem;
4372
- Menu cameraMenu;
4648
+
43734649 CheckboxMenuItem zBufferItem;
43744650 //MenuItem normalLensItem;
4375
- MenuItem editCameraItem;
4376
- MenuItem revertCameraItem;
4377
- CheckboxMenuItem toggleLiveItem;
43784651 MenuItem stepItem;
4379
- CheckboxMenuItem toggleFullItem;
4652
+ CheckboxMenuItem toggleLiveItem;
4653
+ CheckboxMenuItem toggleFullScreenItem;
4654
+ CheckboxMenuItem toggleTimelineItem;
43804655 CheckboxMenuItem toggleRenderItem;
43814656 CheckboxMenuItem toggleDebugItem;
43824657 CheckboxMenuItem toggleFrustumItem;
43834658 CheckboxMenuItem toggleFootContactItem;
43844659 CheckboxMenuItem toggleDLItem;
43854660 CheckboxMenuItem toggleTextureItem;
4386
- CheckboxMenuItem toggleRandomItem;
4661
+ CheckboxMenuItem toggleSwitchItem;
43874662 CheckboxMenuItem toggleRootItem;
43884663 CheckboxMenuItem animationItem;
43894664 CheckboxMenuItem toggleHandleItem;
....@@ -4391,23 +4666,26 @@
43914666 JSplitPane mainPanel;
43924667 JScrollPane scrollpane;
43934668 JPanel toolbarPanel;
4394
- JPanel treePanel;
4669
+ cGridBag treePanel;
43954670 JPanel radioPanel;
43964671 ButtonGroup buttonGroup;
4397
- JPanel ctrlPanel;
4398
- JPanel materialPanel;
4672
+ cGridBag ctrlPanel;
4673
+ cGridBag materialPanel;
43994674 JScrollPane infoPanel;
4400
- JPanel optionsPanel;
4675
+ cGridBag optionsPanel;
44014676 JTabbedPane objectPanel;
4402
- JPanel XYZPanel;
4677
+ cGridBag XYZPanel;
44034678 JSplitPane gridPanel;
44044679 JSplitPane bigPanel;
4405
- JPanel bigThree;
4406
- JTabbedPane jtp;
4407
- JPanel cameraPanel;
4680
+ cGridBag bigThree;
4681
+ cGridBag scenePanel;
4682
+ cGridBag centralPanel;
4683
+ JSplitPane cameraPanel;
4684
+ JPanel timelinePanel;
4685
+ JMenuBar timelineMenubar;
44084686 JSplitPane framePanel;
44094687 JTextArea/*Field*/ nameField;
4410
- cButton textureButton;
4688
+ //cButton textureButton;
44114689 cButton okButton;
44124690 cButton applyButton;
44134691 cButton cancelButton;
....@@ -4454,65 +4732,72 @@
44544732 // MATERIAL
44554733 JLabel materialLabel;
44564734 JLabel colorLabel;
4457
- NumberSlider colorField;
4735
+ cNumberSlider colorField;
44584736 JLabel modulationLabel;
4459
- NumberSlider modulationField;
4737
+ cNumberSlider modulationField;
44604738 JLabel metalnessLabel;
4461
- NumberSlider metalnessField;
4739
+ cNumberSlider metalnessField;
44624740 JLabel diffuseLabel;
4463
- NumberSlider diffuseField;
4741
+ cNumberSlider diffuseField;
44644742 JLabel specularLabel;
4465
- NumberSlider specularField;
4743
+ cNumberSlider specularField;
44664744 JLabel shininessLabel;
4467
- NumberSlider shininessField;
4745
+ cNumberSlider shininessField;
44684746 JLabel shiftLabel;
4469
- NumberSlider shiftField;
4747
+ cNumberSlider shiftField;
44704748 JLabel ambientLabel;
4471
- NumberSlider ambientField;
4749
+ cNumberSlider ambientField;
44724750 JLabel lightareaLabel;
4473
- NumberSlider lightareaField;
4751
+ cNumberSlider lightareaField;
44744752 JLabel diffusenessLabel;
4475
- NumberSlider diffusenessField;
4753
+ cNumberSlider diffusenessField;
44764754 JLabel velvetLabel;
4477
- NumberSlider velvetField;
4755
+ cNumberSlider velvetField;
44784756 JLabel sheenLabel;
4479
- NumberSlider sheenField;
4757
+ cNumberSlider sheenField;
44804758 JLabel subsurfaceLabel;
4481
- NumberSlider subsurfaceField;
4759
+ cNumberSlider subsurfaceField;
44824760 //JLabel bumpLabel;
44834761 //NumberSlider bumpField;
44844762 JLabel backlitLabel;
4485
- NumberSlider backlitField;
4763
+ cNumberSlider backlitField;
44864764 JLabel anisoLabel;
4487
- NumberSlider anisoField;
4765
+ cNumberSlider anisoField;
44884766 JLabel anisoVLabel;
4489
- NumberSlider anisoVField;
4767
+ cNumberSlider anisoVField;
44904768 JLabel cameraLabel;
4491
- NumberSlider cameraField;
4769
+ cNumberSlider cameraField;
44924770 JLabel selfshadowLabel;
4493
- NumberSlider selfshadowField;
4771
+ cNumberSlider selfshadowField;
44944772 JLabel shadowLabel;
4495
- NumberSlider shadowField;
4773
+ cNumberSlider shadowField;
44964774 JLabel textureLabel;
4497
- NumberSlider textureField;
4775
+ cNumberSlider textureField;
44984776 JLabel opacityLabel;
4499
- NumberSlider opacityField;
4777
+ cNumberSlider opacityField;
45004778 JLabel fakedepthLabel;
4501
- NumberSlider fakedepthField;
4779
+ cNumberSlider fakedepthField;
45024780 JLabel shadowbiasLabel;
4503
- NumberSlider shadowbiasField;
4781
+ cNumberSlider shadowbiasField;
45044782 JLabel bumpLabel;
4505
- NumberSlider bumpField;
4783
+ cNumberSlider bumpField;
45064784 JLabel noiseLabel;
4507
- NumberSlider noiseField;
4785
+ cNumberSlider noiseField;
45084786 JLabel powerLabel;
4509
- NumberSlider powerField;
4787
+ cNumberSlider powerField;
45104788 JLabel borderfadeLabel;
4511
- NumberSlider borderfadeField;
4789
+ cNumberSlider borderfadeField;
45124790 JLabel fogLabel;
4513
- NumberSlider fogField;
4791
+ cNumberSlider fogField;
45144792 JLabel opacityPowerLabel;
4515
- NumberSlider opacityPowerField;
4793
+ cNumberSlider opacityPowerField;
45164794 JTree jTree;
45174795 //ObjectUI parent;
4796
+
4797
+ cNumberSlider normalpushField;
4798
+
4799
+ private MenuItem importGFDItem;
4800
+ private MenuItem importVRMLX3DItem;
4801
+ private MenuItem import3DSItem;
4802
+ private MenuItem importOBJItem;
45184803 }