Normand Briere
2019-08-17 07c0c67b88160b51e61c5c1d2b9b602daafa44a9
GroupEditor.java
....@@ -16,6 +16,7 @@
1616 //import buoy.widget.BFileChooser;
1717
1818 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
19
+ Grafreed.iResourceCallBack,
1920 ObjectUI,
2021 Runnable,
2122 ActionListener,
....@@ -30,7 +31,7 @@
3031 final String path = "cubemaps/" + f + "-skyboxes/" + s;
3132 row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.NIMBUSLAF));
3233 //row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF));
33
- skyboxButton.setToolTipText(s);
34
+ skyboxButton.setToolTipText(s.equals("") ? "No background" : s);
3435 skyboxButton.addActionListener(new ActionListener()
3536 {
3637 @Override
....@@ -41,6 +42,22 @@
4142 });
4243 }
4344
45
+ public void AddTextureButton(String f, String c, final String t, int count, cGridBag row)
46
+ {
47
+ cButton textureButton;
48
+ final String path = "textures/" + f + "/" + c + "/"; // + t;
49
+ row.add(textureButton = GetButton(path + "icons/" + t, !Grafreed.NIMBUSLAF));
50
+ textureButton.setToolTipText(c + count);
51
+ textureButton.addActionListener(new ActionListener()
52
+ {
53
+ @Override
54
+ public void actionPerformed(ActionEvent e)
55
+ {
56
+ ChangeTexture(path + t);
57
+ }
58
+ });
59
+ }
60
+
4461 public void AddSkyboxTab0(JTabbedPane skyboxpanel)
4562 {
4663 cGridBag tab0 = new cGridBag().setVertical(true);
....@@ -56,11 +73,11 @@
5673 cGridBag row5 = new cGridBag();
5774 cGridBag row6 = new cGridBag();
5875
59
- AddSkyboxButton("default", "rgb", row0);
76
+ AddSkyboxButton("default", "", row0);
6077 //AddSkyboxButton("default", "cornell", row0);
6178 AddSkyboxButton("penguins", "dust", row0);
6279 AddSkyboxButton("penguins", "tropic", row0);
63
- AddSkyboxButton("default", "skycube", row0);
80
+ AddSkyboxButton("penguins", "yonder", row0);
6481
6582 AddSkyboxButton("default", "uffizi", row1);
6683 AddSkyboxButton("bridge", "Bridge", row1);
....@@ -90,7 +107,7 @@
90107 AddSkyboxButton("park", "Skansen3", row6);
91108 AddSkyboxButton("park", "Skansen4", row6);
92109 AddSkyboxButton("park", "Skansen5", row6);
93
- AddSkyboxButton("park", "Stairs", row6);
110
+ AddSkyboxButton("persson", "VancouverConventionCentre", row6);
94111
95112 tab0.add(row0);
96113 tab0.add(row1);
....@@ -144,21 +161,18 @@
144161
145162 AddSkyboxButton("mountain", "Maskonaive2", row4);
146163 AddSkyboxButton("mountain", "Maskonaive3", row4);
147
- AddSkyboxButton("mountain", "Ryfjallet", row4);
148164 AddSkyboxButton("mountain", "Teide", row4);
149165 AddSkyboxButton("park", "Tantolunden4", row4);
150166
151
- AddSkyboxButton("penguins", "wrath", row5);
152
- AddSkyboxButton("penguins", "yonder", row5);
167
+ AddSkyboxButton("park", "Stairs", row5);
168
+ AddSkyboxButton("default", "skycube", row6);
153169 AddSkyboxButton("rocky", "Langholmen", row5);
154170 AddSkyboxButton("rocky", "Skinnarviksberget", row5);
155
- AddSkyboxButton("rocky", "Tantolunden6", row5);
156171
172
+ AddSkyboxButton("rocky", "Tantolunden6", row5);
157173 AddSkyboxButton("default", "CloudyHills", row6);
158174 AddSkyboxButton("daz", "Autumn", row6);
159
- AddSkyboxButton("daz", "Greenlands", row6);
160175 AddSkyboxButton("daz", "MountainTrail", row6);
161
- AddSkyboxButton("daz", "Oasis", row6);
162176 /*
163177 Autumn
164178 Greenlands
....@@ -210,8 +224,8 @@
210224 AddSkyboxButton("penguins", "sleepyhollow", row1);
211225
212226 AddSkyboxButton("penguins", "kenon_star", row2);
213
- AddSkyboxButton("indoors", "DallasW", row2);
214
- AddSkyboxButton("indoors", "MarriottMadisonWest", row2);
227
+ AddSkyboxButton("persson", "corona", row2);
228
+ AddSkyboxButton("persson", "spaceskybox", row2);
215229 AddSkyboxButton("indoors", "Vasa", row2);
216230
217231 AddSkyboxButton("winter", "Backyard", row3);
....@@ -232,7 +246,7 @@
232246 AddSkyboxButton("daz", "TheRock", row6);
233247 AddSkyboxButton("daz", "TopOfTheWorld", row6);
234248 AddSkyboxButton("daz", "Winter", row6);
235
- AddSkyboxButton("penguins", "desertdawn", row6);
249
+ AddSkyboxButton("mountain", "Ryfjallet", row6);
236250
237251 tab0.add(row0);
238252 tab0.add(row1);
....@@ -248,15 +262,122 @@
248262 //tab0.add(new cGridBag());
249263 }
250264 }
251
-
252
- public void ChangeSkybox(String name)
265
+
266
+ public void AddSkyboxTab3(JTabbedPane skyboxpanel)
253267 {
254
- //cameraView.envyoff = false;
255
- group.skyboxname = name;
256
- group.skyboxext = "jpg";
257
- cameraView.repaint();
268
+ cGridBag tab0 = new cGridBag().setVertical(true);
269
+
270
+ tab0.setName("Others");
271
+ skyboxpanel.add(tab0);
272
+
273
+ cGridBag row0 = new cGridBag();
274
+ cGridBag row1 = new cGridBag();
275
+ cGridBag row2 = new cGridBag();
276
+ cGridBag row3 = new cGridBag();
277
+ cGridBag row4 = new cGridBag();
278
+ cGridBag row5 = new cGridBag();
279
+ cGridBag row6 = new cGridBag();
280
+
281
+ AddSkyboxButton("mayhem", "afterrain", row0);
282
+ AddSkyboxButton("mayhem", "aqua4", row0);
283
+ AddSkyboxButton("mayhem", "aqua9", row0);
284
+ AddSkyboxButton("mayhem", "flame", row0);
285
+
286
+ AddSkyboxButton("mayhem", "h2s", row1);
287
+ AddSkyboxButton("mayhem", "prehistoric", row1);
288
+ AddSkyboxButton("mayhem", "scorched", row1);
289
+ AddSkyboxButton("penguins", "desertdawn", row1);
290
+
291
+ AddSkyboxButton("persson", "Citadella", row2);
292
+ AddSkyboxButton("persson", "Citadella2", row2);
293
+ AddSkyboxButton("persson", "clouds1", row2);
294
+ AddSkyboxButton("penguins", "wrath", row2);
295
+
296
+ AddSkyboxButton("persson", "FishermansBastion", row3);
297
+ AddSkyboxButton("persson", "HeroesSquare", row3);
298
+ AddSkyboxButton("indoors", "DallasW", row3);
299
+ AddSkyboxButton("indoors", "MarriottMadisonWest", row3);
300
+
301
+ AddSkyboxButton("persson", "LancellottiChapel", row4);
302
+ AddSkyboxButton("persson", "PereaBeach1", row4);
303
+ AddSkyboxButton("persson", "PereaBeach2", row4);
304
+ AddSkyboxButton("persson", "redeclipse", row4);
305
+
306
+ AddSkyboxButton("daz", "Greenlands", row5);
307
+ AddSkyboxButton("daz", "Oasis", row5);
308
+ AddSkyboxButton("elyvisions", "arch3", row5);
309
+ AddSkyboxButton("elyvisions", "calm_sea", row5);
310
+
311
+ AddSkyboxButton("elyvisions", "rainbow", row6);
312
+ AddSkyboxButton("elyvisions", "distant_sunset", row6);
313
+ AddSkyboxButton("elyvisions", "heaven", row6);
314
+ AddSkyboxButton("elyvisions", "hot", row6);
315
+
316
+ tab0.add(row0);
317
+ tab0.add(row1);
318
+ tab0.add(row2);
319
+ tab0.add(row3);
320
+ tab0.add(row4);
321
+ tab0.add(row5);
322
+ tab0.add(row6);
323
+
324
+ for (int i=5; --i>=0;)
325
+ {
326
+ //oe.toolboxPanel.Return();
327
+ //tab0.add(new cGridBag());
328
+ }
329
+ }
330
+
331
+ public void ChangeSkybox(String skybox)
332
+ {
333
+ if (skybox.endsWith("/"))
334
+ {
335
+ group.skyboxname = null;
336
+ group.skyboxext = null;
337
+ cameraView.repaint();
338
+ }
339
+ else
340
+ {
341
+ //cameraView.envyoff = false;
342
+ group.skyboxname = skybox;
343
+ group.skyboxext = "jpg";
344
+ cameraView.repaint();
345
+ }
346
+ }
347
+
348
+ public void CreateSkyboxPanel(cGridBag skyboxPanel)
349
+ {
350
+ JTabbedPane skyboxpane = new JTabbedPane();
351
+
352
+ AddSkyboxTab0(skyboxpane);
353
+ AddSkyboxTab1(skyboxpane);
354
+ AddSkyboxTab2(skyboxpane);
355
+ AddSkyboxTab3(skyboxpane);
356
+
357
+ skyboxPanel.add(skyboxpane);
258358 }
259359
360
+ public void ChangeTexture(String texture)
361
+ {
362
+ for (int i=0; i<group.selection.size(); i++)
363
+ {
364
+ Object3D obj = group.selection.get(i);
365
+ obj.SetPigmentTexture("@" + texture);
366
+ }
367
+
368
+ refreshContents();
369
+ }
370
+
371
+ public void Show3DView()
372
+ {
373
+ // bug
374
+ //gridPanel.setDividerLocation(1.0);
375
+ //bigPanel.setDividerLocation(0.0);
376
+ bigThree.ClearUI();
377
+ bigThree.add(centralPanel);
378
+ bigThree.FlushUI();
379
+ }
380
+
260381 //ObjEditor objEditor;
261382 public void closeUI2()
262383 {
....@@ -294,10 +415,14 @@
294415 this.copy = this.group = group;
295416 //selectees = this.group.selectees;
296417
297
- if (copy.versions == null)
418
+ assert(false);
419
+
420
+ if (copy.versionlist == null)
298421 {
299
- copy.versions = new byte[100][];
422
+ copy.versionlist = new Object3D[100];
300423 copy.versionindex = -1;
424
+
425
+ //Save(true);
301426 }
302427
303428 if(ui)
....@@ -321,12 +446,12 @@
321446
322447 ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true);
323448
324
- if (copy.versions == null)
449
+ if (copy.versionlist == null)
325450 {
326
- copy.versions = new byte[100][];
451
+ copy.versionlist = new Object3D[100];
327452 copy.versionindex = -1;
328453
329
- Save(true);
454
+ //Save(true);
330455 }
331456 }
332457
....@@ -417,33 +542,35 @@
417542 // menu.add("-");
418543 duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate"));
419544 duplicateItem.addActionListener(this);
420
- cloneItem = menu.add(new MenuItem("Clone"));
545
+
546
+ cloneItem = oe.jTree.popup.add(new JMenuItem("Clone"));
421547 cloneItem.addActionListener(this);
422
- if (Globals.ADVANCED)
548
+ //if (Globals.ADVANCED)
423549 {
424550 cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
425551 cloneSupportItem.addActionListener(this);
426552 }
553
+ oe.jTree.popup.addSeparator();
427554 menu.add("-");
428
- cutItem = menu.add(new MenuItem("Cut"));
555
+ cutItem = oe.jTree.popup.add(new JMenuItem("Cut"));
429556 cutItem.addActionListener(this);
430
- copyItem = menu.add(new MenuItem("Copy"));
557
+ copyItem = oe.jTree.popup.add(new JMenuItem("Copy"));
431558 copyItem.addActionListener(this);
432559 pasteItem = menu.add(new MenuItem("Paste"));
433560 pasteItem.addActionListener(this);
434561
435
- menu.add("-");
436
- pasteIntoItem = menu.add(new MenuItem("Paste into"));
562
+ oe.jTree.popup.addSeparator();
563
+ //menu.add("-");
564
+ pasteIntoItem = oe.jTree.popup.add(new JMenuItem("Paste into"));
437565 pasteIntoItem.addActionListener(this);
438
- pasteLinkItem = menu.add(new MenuItem("Paste link"));
566
+ pasteLinkItem = oe.jTree.popup.add(new JMenuItem("Paste link"));
439567 pasteLinkItem.addActionListener(this);
440
- pasteCloneItem = menu.add(new MenuItem("Paste clone"));
568
+ pasteCloneItem = oe.jTree.popup.add(new JMenuItem("Paste clone"));
441569 pasteCloneItem.addActionListener(this);
442
-// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
570
+// CRASH pasteExpandItem = oe.jTree.popup.add(new JMenuItem("Paste expand"));
443571 // pasteExpandItem.addActionListener(this);
444
- menu.add("-");
445
- deleteItem = menu.add(new MenuItem("Delete"));
446
- deleteItem.addActionListener(this);
572
+ //menu.add("-");
573
+ oe.jTree.popup.addSeparator();
447574
448575 if (Globals.ADVANCED)
449576 {
....@@ -529,11 +656,9 @@
529656 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
530657 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
531658 //cameraMenu.add(switchViewItem = new MenuItem("Reverse View"));
532
- editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
533659 oe.cameraMenu.add("-");
534660 openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
535661 openWindowItem.addActionListener(this);
536
- editLeafItem.addActionListener(this);
537662 lookAtItem.addActionListener(this);
538663 //lookFromItem.addActinoListener(this);
539664 //switchViewItem.addActionListener(this);
....@@ -580,9 +705,8 @@
580705 setMasterItem.addActionListener(this);
581706 }
582707
583
- oe.menuBar.add(menu = new Menu("Group"));
584
-// grabItem = menu.add(new MenuItem("Grab"));
585
-// grabItem.addActionListener(this);
708
+ oe.menuBar.add(menu = new Menu("Order"));
709
+
586710 backItem = menu.add(new MenuItem("Back"));
587711 backItem.addActionListener(this);
588712 frontItem = menu.add(new MenuItem("Front"));
....@@ -590,13 +714,21 @@
590714 // compositeItem = menu.add(new MenuItem("Composite"));
591715 // compositeItem.addActionListener(this);
592716
717
+ grabItem = oe.jTree.popup.add(new JMenuItem("Group"));
718
+ grabItem.addActionListener(this);
719
+
593720 if (Globals.ADVANCED)
594721 {
595722 hideItem = menu.add(new MenuItem("Hidden Group"));
596723 hideItem.addActionListener(this);
597724 }
598
- ungroupItem = menu.add(new MenuItem("Ungroup"));
725
+ ungroupItem = oe.jTree.popup.add(new JMenuItem("Ungroup"));
599726 ungroupItem.addActionListener(this);
727
+
728
+ oe.jTree.popup.addSeparator();
729
+
730
+ deleteItem = oe.jTree.popup.add(new JMenuItem("Delete"));
731
+ deleteItem.addActionListener(this);
600732
601733 // menu.add("-");
602734 //
....@@ -781,6 +913,9 @@
781913 shareGeometriesItem.addActionListener(this);
782914 mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
783915 mergeGeometriesItem.addActionListener(this);
916
+ menu.add("-");
917
+ editLeafItem = menu.add(new MenuItem("Edit leaf..."));
918
+ editLeafItem.addActionListener(this);
784919 if (Globals.ADVANCED)
785920 {
786921 // Pretty much the same as duplicate and clone.
....@@ -797,6 +932,74 @@
797932 buildToolsMenu(menu);
798933 }
799934
935
+ JTabbedPane resourcecontainer;
936
+ cGridBag currenttab;
937
+ //boolean added; // patch for jar
938
+
939
+ int tabcount = 0;
940
+ int colcount = 0;
941
+ int rowcount = 0;
942
+ int texturecount = 0;
943
+
944
+ int columns = 5;
945
+ int rows = 7;
946
+
947
+ public void ResourceCallBack(String[] path)
948
+ {
949
+// for (int i = 0; i < path.length; i++)
950
+// System.out.print(path[i] + "/");
951
+// System.out.println();
952
+
953
+ if (//rowcount == 0 ||
954
+ path.length == 1 && !path[0].equals("") && !path[0].equals(".DS_Store"))
955
+ {
956
+ currenttab = new cGridBag();
957
+ String tabname = path[0]; // String.valueOf((char)('A'+tabcount));
958
+ currenttab.setName(tabname);
959
+ //added = false;
960
+ resourcecontainer.add(currenttab);
961
+ resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname);
962
+ rowcount = 1;
963
+ colcount = 0;
964
+ texturecount = 0;
965
+ }
966
+
967
+ if (path.length > 2 && path[2].toLowerCase().endsWith(".jpg"))
968
+ {
969
+ //if (!added)
970
+ {
971
+ //added = true;
972
+ String tabname = path[0]; // String.valueOf((char)('A'+tabcount));
973
+ currenttab = (cGridBag)resourcecontainer.getComponentAt(resourcecontainer.indexOfTab(tabname));
974
+ }
975
+
976
+ AddTextureButton(path[0], path[1], path[2], texturecount++, currenttab);
977
+
978
+ if (++colcount >= columns)
979
+ {
980
+ colcount = 0;
981
+ currenttab.Return();
982
+
983
+ if (rowcount++ >= rows)
984
+ {
985
+ rowcount = 0;
986
+ }
987
+ }
988
+ }
989
+ else
990
+ {
991
+// if (!path[path.length-1].equals("icons"))
992
+// resourcecontainer.Return();
993
+ }
994
+ }
995
+
996
+ void CreateTexturePanel(cGridBag container)
997
+ {
998
+ resourcecontainer = new JTabbedPane(JTabbedPane.LEFT);
999
+ container.add(resourcecontainer);
1000
+
1001
+ Grafreed.ParseResources("textures", this);
1002
+ }
8001003
8011004 void SetupUI2(ObjEditor oe)
8021005 {
....@@ -815,11 +1018,6 @@
8151018 //new Exception().printStackTrace();
8161019
8171020 oe.radioPanel = new JPanel(new GridBagLayout());
818
- oe.aConstraints.weightx = 1;
819
- oe.aConstraints.weighty = 0;
820
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
821
- oe.aConstraints.gridwidth = 100;
822
- oe.aConstraints.gridheight = 1;
8231021 // oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
8241022
8251023 oe.buttonGroup = new ButtonGroup();
....@@ -852,10 +1050,49 @@
8521050
8531051 if (Globals.ADVANCED)
8541052 {
855
- oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
856
- maxButton.setToolTipText("Maximize window");
857
- maxButton.addActionListener(this);
1053
+// oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1054
+// maxButton.setToolTipText("Maximize window");
1055
+// maxButton.addActionListener(this);
8581056 }
1057
+
1058
+ cButton gcButton;
1059
+
1060
+// oe.toolbarPanel.add(gcButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1061
+// gcButton.setToolTipText("Garbage collect");
1062
+// gcButton.addActionListener(new ActionListener()
1063
+// {
1064
+// public void actionPerformed(ActionEvent e)
1065
+// {
1066
+// System.gc();
1067
+// }
1068
+// });
1069
+
1070
+ oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1071
+ collapseButton.setToolTipText("Collapse toolbar");
1072
+ collapseButton.addActionListener(this);
1073
+
1074
+ oe.toolbarPanel.add(maximize3DButton = GetButton("icons/empty.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1075
+ maximize3DButton.setToolTipText("Maximize 3D view");
1076
+ maximize3DButton.addActionListener(this);
1077
+
1078
+ oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1079
+ twoButton.setToolTipText("Show 3D view only");
1080
+ twoButton.addActionListener(this);
1081
+ this.fullscreenLayout = twoButton;
1082
+
1083
+ oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1084
+ threeButton.setToolTipText("Show controls and 3D view");
1085
+ threeButton.addActionListener(this);
1086
+ if (Globals.ADVANCED)
1087
+ {
1088
+ oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1089
+ sixButton.setToolTipText("Show 3D view and controls");
1090
+ sixButton.addActionListener(this);
1091
+ }
1092
+// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1093
+// sevenButton.setToolTipText("3-column layout");
1094
+// sevenButton.addActionListener(this);
1095
+ //
8591096
8601097 oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
8611098 fullButton.setToolTipText("Full-screen window");
....@@ -869,41 +1106,46 @@
8691106 restoreCameraButton.setToolTipText("Restore viewpoint");
8701107 restoreCameraButton.addActionListener(this);
8711108
872
- copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
873
- saveButton.setToolTipText("New version");
874
- saveButton.addActionListener(this);
1109
+ copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1110
+ saveVersionButton.setToolTipText("Duplicate current version");
1111
+ saveVersionButton.addActionListener(this);
8751112
876
- copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
877
- undoButton.setToolTipText("Previous version");
878
- undoButton.addActionListener(this);
879
- undoButton.setEnabled(false);
1113
+ copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1114
+ deleteVersionButton.setToolTipText("Delete current version");
1115
+ deleteVersionButton.addActionListener(this);
1116
+ deleteVersionButton.setEnabled(false);
1117
+
1118
+ copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1119
+ previousVersionButton.setToolTipText("Previous version");
1120
+ previousVersionButton.addActionListener(this);
1121
+ previousVersionButton.setEnabled(false);
8801122
8811123 cGridBag updown = new cGridBag().setVertical(true);
8821124 updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
883
- restoreButton.setToolTipText("Restore current");
1125
+ restoreButton.setToolTipText("Undo (restore current version)");
8841126 restoreButton.addActionListener(this);
8851127 restoreButton.setEnabled(false);
8861128
8871129 updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
888
- replaceButton.setToolTipText("Replace current");
1130
+ replaceButton.setToolTipText("Save (replace current version)");
8891131 replaceButton.addActionListener(this);
8901132 replaceButton.setEnabled(false);
8911133
8921134 copyOptionsPanel.add(updown);
8931135
894
- copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
895
- redoButton.setToolTipText("Next version");
896
- redoButton.addActionListener(this);
897
- redoButton.setEnabled(false);
1136
+ copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1137
+ nextVersionButton.setToolTipText("Next version");
1138
+ nextVersionButton.addActionListener(this);
1139
+ nextVersionButton.setEnabled(false);
1140
+
1141
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1142
+ oneStepButton.setToolTipText("Animate one step forward");
1143
+ oneStepButton.addActionListener(this);
8981144
8991145 oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
9001146 liveCB.setToolTipText("Enable animation");
9011147 liveCB.addItemListener(this);
9021148
903
- oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
904
- oneStepButton.setToolTipText("Animate one step forward");
905
- oneStepButton.addActionListener(this);
906
-
9071149 oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
9081150 fastCB.setToolTipText("Fast mode");
9091151 fastCB.addItemListener(this);
....@@ -930,21 +1172,6 @@
9301172
9311173 //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
9321174
933
- oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
934
- twoButton.setToolTipText("Show 3D view only");
935
- twoButton.addActionListener(this);
936
- this.fullscreenLayout = twoButton;
937
-
938
- oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
939
- threeButton.setToolTipText("Show controls and 3D view");
940
- threeButton.addActionListener(this);
941
- oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
942
- sixButton.setToolTipText("Show 3D view and controls");
943
- sixButton.addActionListener(this);
944
-// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
945
-// sevenButton.setToolTipText("3-column layout");
946
-// sevenButton.addActionListener(this);
947
- //
9481175
9491176 oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
9501177 rootButton.setToolTipText("Open selection in new tab");
....@@ -960,12 +1187,16 @@
9601187
9611188 // INSERT
9621189 row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
963
- gridButton.setToolTipText("Create grid");
1190
+ gridButton.setToolTipText("Create ground");
9641191 gridButton.addActionListener(this);
9651192
9661193 row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
9671194 boxButton.setToolTipText("Create box");
9681195 boxButton.addActionListener(this);
1196
+
1197
+ row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1198
+ superButton.setToolTipText("Create superellipsoid");
1199
+ superButton.addActionListener(this);
9691200
9701201 row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
9711202 sphereButton.setToolTipText("Create sphere");
....@@ -978,10 +1209,6 @@
9781209 row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
9791210 torusButton.setToolTipText("Create torus");
9801211 torusButton.addActionListener(this);
981
-
982
- row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
983
- superButton.setToolTipText("Create superellipsoid");
984
- superButton.addActionListener(this);
9851212
9861213 if (Globals.ADVANCED)
9871214 {
....@@ -1028,18 +1255,17 @@
10281255
10291256 oe.toolboxPanel.add(row2);
10301257
1031
- // ENVYMAPS
1032
- cGridBag skyboxpane = new cGridBag();
1033
- skyboxpane.preferredHeight = 100;
1258
+ cGridBag textures = new cGridBag();
10341259
1035
- oe.toolboxPanel.add(skyboxpane);
1260
+ CreateTexturePanel(textures);
10361261
1037
- JTabbedPane skyboxpanel = new JTabbedPane();
1038
- skyboxpane.add(skyboxpanel);
1262
+ resourcecontainer.setSelectedIndex((int)(Math.random() * resourcecontainer.getTabCount()));
10391263
1040
- AddSkyboxTab0(skyboxpanel);
1041
- AddSkyboxTab1(skyboxpanel);
1042
- AddSkyboxTab2(skyboxpanel);
1264
+ oe.toolboxPanel.add(textures);
1265
+
1266
+ textures.preferredHeight = 100;
1267
+
1268
+ CreateSkyboxPanel(oe.skyboxPanel);
10431269
10441270 // EDIT panel
10451271 editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
....@@ -1047,20 +1273,20 @@
10471273 editButton.addActionListener(this);
10481274
10491275 editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1050
- uneditButton.setToolTipText("Remove selection controls");
1276
+ uneditButton.setToolTipText("Unpin and remove selection controls");
10511277 uneditButton.addActionListener(this);
10521278
10531279 editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
1054
- allParamsButton.setToolTipText("Show all controle");
1280
+ allParamsButton.setToolTipText("Show all controls");
10551281 allParamsButton.addActionListener(this);
10561282
1057
- editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1058
- clearPanelButton.setToolTipText("Clear edit panel");
1283
+ editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1284
+ clearPanelButton.setToolTipText("Clear all controls");
10591285 clearPanelButton.addActionListener(this);
10601286
1061
- editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1062
- unselectButton.setToolTipText("Unselect");
1063
- unselectButton.addActionListener(this);
1287
+ //editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1288
+ //unselectButton.setToolTipText("Unselect");
1289
+ //unselectButton.addActionListener(this);
10641290
10651291 editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
10661292 flashSelectionButton.setToolTipText("Highlight selection");
....@@ -1120,7 +1346,7 @@
11201346 dgr.addDragGestureListener(this);
11211347 }catch(Exception e) {}
11221348 */
1123
- radio.layout = sixButton; // sevenButton;
1349
+ radio.layout = threeButton; // sixButton;
11241350 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
11251351 }
11261352
....@@ -1171,9 +1397,12 @@
11711397 smoothCB.setToolTipText("Snapping delay");
11721398 smoothCB.addItemListener(this);
11731399
1174
- panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
1175
- slowCB.setToolTipText("Smooth interpolation");
1176
- slowCB.addItemListener(this);
1400
+// panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
1401
+// slowCB.setToolTipText("Smooth interpolation");
1402
+// slowCB.addItemListener(this);
1403
+ panel.add(minshaderCB = new cCheckBox("Min shader", Globals.MINSHADER)); //, constraints);
1404
+ minshaderCB.setToolTipText("Minimal fast shader");
1405
+ minshaderCB.addItemListener(this);
11771406
11781407 // constraints.gridy += 1;
11791408 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
....@@ -1252,6 +1481,14 @@
12521481
12531482 void EditObject(Object3D obj)
12541483 {
1484
+ assert(obj instanceof Composite);
1485
+
1486
+// if (obj.versionlist == null)
1487
+// {
1488
+// obj.versionlist = new Object3D[100];
1489
+// obj.versionindex = -1;
1490
+// }
1491
+
12551492 cRadio radioButton = new cRadio(obj.name);
12561493
12571494 // June 2019. Patch to avoid bug with transparency.
....@@ -1262,7 +1499,7 @@
12621499 }
12631500
12641501 radioButton.SetObject(obj);
1265
- radioButton.layout = sixButton; // sevenButton;
1502
+ radioButton.layout = threeButton; // sixButton;
12661503 radioButton.SetCamera(cameraView.renderCamera, false);
12671504 radioButton.addActionListener(this);
12681505 radioPanel.add(radioButton);
....@@ -1276,6 +1513,7 @@
12761513
12771514 oe.SetupViews();
12781515
1516
+ if (Globals.DEBUG)
12791517 System.out.println("SetupViews");
12801518 DragSource.getDefaultDragSource().createDefaultDragGestureRecognizer(
12811519 oe.cameraView, DnDConstants.ACTION_COPY_OR_MOVE, this); // ACTION_LINK ??
....@@ -1287,6 +1525,8 @@
12871525 cCheckBox localCB;
12881526 cCheckBox crowdCB;
12891527 cCheckBox smoothCB;
1528
+ cCheckBox minshaderCB;
1529
+
12901530 cToggleButton fastCB;
12911531 cCheckBox slowCB;
12921532 cCheckBox boxCB;
....@@ -1357,6 +1597,12 @@
13571597 {
13581598 cameraView.ToggleInertia();
13591599 cameraView.repaint();
1600
+ }
1601
+ else if(e.getSource() == minshaderCB)
1602
+ {
1603
+ Globals.MINSHADER ^= true;
1604
+ cameraView.programInitialized = false;
1605
+ cameraView.repaint();
13601606 }
13611607 else if(e.getSource() == localCB)
13621608 {
....@@ -1634,7 +1880,12 @@
16341880 TreePath path;
16351881
16361882 public TransferableTreePath(TreePath tp) {
1637
- path = tp;
1883
+ Object[] objs = new Object[tp.getPathCount()];
1884
+ for (int i=0; i<objs.length; i++)
1885
+ {
1886
+ objs[i] = ((Object3D)tp.getPathComponent(i)).GetUUID();
1887
+ }
1888
+ path = new TreePath(objs);
16381889 }
16391890
16401891 public synchronized DataFlavor[] getTransferDataFlavors() {
....@@ -1924,7 +2175,11 @@
19242175 shadow.material = new cMaterial(obj.material);
19252176 shadow.material.diffuse = 0.0001f;
19262177 shadow.material.specular = 0.0001f;
1927
- //shadow.projectedVertices[1].x = 300;
2178
+ shadow.material.opacity = 0.75f;
2179
+
2180
+ AllocProjectedVertices(shadow);
2181
+
2182
+ shadow.projectedVertices[1].x = 300;
19282183
19292184 makeSomething(shadow);
19302185 }
....@@ -2445,27 +2700,35 @@
24452700 } else
24462701 if (source == loopItem || source == loopButton)
24472702 {
2703
+ if (!group.selection.isEmpty())
2704
+ {
24482705 Composite csg = new GroupLeaf();
24492706 csg.count = 5;
2450
- group(csg);
24512707 Composite child = new cGroup("Branch");
24522708 csg.addChild(child);
24532709 child.addChild(csg);
2710
+ group(csg);
2711
+ }
24542712 } else
24552713 if (source == doubleItem)
24562714 {
2715
+ if (!group.selection.isEmpty())
2716
+ {
24572717 Composite csg = new GroupLeaf("Fork");
24582718 csg.count = 5;
2459
- group(csg);
24602719 Composite child = new cGroup("Branch A");
24612720 csg.addChild(child);
24622721 child.addChild(csg);
24632722 child = new cGroup("Branch B");
24642723 csg.addChild(child);
24652724 child.addChild(csg);
2725
+ group(csg);
2726
+ }
24662727 } else
24672728 if (source == tripleItem)
24682729 {
2730
+ if (!group.selection.isEmpty())
2731
+ {
24692732 Composite csg = new GroupLeaf("Trident");
24702733 csg.count = 4;
24712734 group(csg);
....@@ -2478,6 +2741,7 @@
24782741 child = new cGroup();
24792742 csg.addChild(child);
24802743 child.addChild(csg);
2744
+ }
24812745 } else
24822746 if (source == computeAOItem)
24832747 {
....@@ -2497,7 +2761,7 @@
24972761 if (source == invariantsItem)
24982762 {
24992763 System.out.println("Invariants:");
2500
- Grafreed.grafreeD.universe.invariants();
2764
+ Grafreed.grafreed.universe.invariants();
25012765 } else
25022766 if (source == memoryItem)
25032767 {
....@@ -2528,33 +2792,52 @@
25282792 {
25292793 ToggleFullScreen();
25302794 } else
2531
- if (source == undoButton)
2795
+ if (source == collapseButton)
2796
+ {
2797
+ this.expandedLayout = radio.layout;
2798
+ CollapseToolbar();
2799
+ } else
2800
+ if (source == maximize3DButton)
2801
+ {
2802
+ this.expandedLayout = radio.layout;
2803
+ radio.layout = twoButton;
2804
+ Show3DView();
2805
+ CollapseToolbar();
2806
+ } else
2807
+ if (source == previousVersionButton)
25322808 {
25332809 // Go to previous version
25342810 //if (!Undo())
25352811 //java.awt.Toolkit.getDefaultToolkit().beep();
2536
- Undo();
2812
+ PreviousVersion();
25372813 } else
25382814 if (source == restoreButton)
25392815 {
25402816 // Restore current version
25412817 Restore();
2818
+ //restoreButton.setEnabled(false);
25422819 } else
25432820 if (source == replaceButton)
25442821 {
25452822 // Overwrite current version
25462823 Replace();
2824
+ //replaceButton.setEnabled(false);
25472825 } else
2548
- if (source == redoButton)
2826
+ if (source == nextVersionButton)
25492827 {
25502828 // Go to next version
2551
- Redo();
2829
+ NextVersion();
25522830 } else
2553
- if (source == saveButton)
2831
+ if (source == saveVersionButton)
25542832 {
25552833 // Save a new version
25562834 if (!Save(true))
25572835 java.awt.Toolkit.getDefaultToolkit().beep();
2836
+ } else
2837
+ if (source == deleteVersionButton)
2838
+ {
2839
+ // Delete a new version
2840
+ DeleteVersion();
25582841 } else
25592842 if (source == oneStepButton)
25602843 {
....@@ -2609,11 +2892,11 @@
26092892 } else
26102893 if (source == undoItem)
26112894 {
2612
- Undo();
2895
+ PreviousVersion();
26132896 } else
26142897 if (source == redoItem)
26152898 {
2616
- Redo();
2899
+ NextVersion();
26172900 } else
26182901 if (source == duplicateItem)
26192902 {
....@@ -3094,22 +3377,34 @@
30943377 } else
30953378 if (source == ungroupItem || source == ungroupButton)
30963379 {
3097
- boolean hasRoot = false;
3380
+ boolean canUngroup = true;
30983381
30993382 for (int i=0; i<group.selection.size(); i++)
31003383 {
3101
- if (group.selection.get(i) == group)
3384
+ Object3D selectedItem = group.selection.get(i);
3385
+
3386
+ if (selectedItem.Size() == 0)
31023387 {
3103
- hasRoot = true;
3388
+ // Cannot ungroup leaves
3389
+ canUngroup = false;
3390
+ break;
3391
+ }
3392
+
3393
+ if (selectedItem == group)
3394
+ {
3395
+ // Cannot ungroup root
3396
+ canUngroup = false;
31043397 break;
31053398 }
31063399 }
31073400
3108
- if (!hasRoot)
3401
+ if (canUngroup)
31093402 {
31103403 for (int i=0; i<group.selection.size(); i++)
31113404 {
3112
- Ungroup(group.selection.get(i));
3405
+ Object3D selectedItem = group.selection.get(i);
3406
+
3407
+ Ungroup(selectedItem);
31133408 }
31143409
31153410 ClearSelection(false);
....@@ -3472,38 +3767,7 @@
34723767 if (CameraPane.FULLSCREEN)
34733768 fullscreenLayout = radio.layout;
34743769
3475
- // bug
3476
- //gridPanel.setDividerLocation(1.0);
3477
- //bigPanel.setDividerLocation(0.0);
3478
-// bigThree.remove(scenePanel);
3479
-// bigThree.remove(centralPanel);
3480
-// bigThree.remove(XYZPanel);
3481
-// aWindowConstraints.gridx = 0;
3482
-// aWindowConstraints.gridy = 0;
3483
-// aWindowConstraints.gridwidth = 1;
3484
-// // aConstraints.gridheight = 3;
3485
-// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3486
-// aWindowConstraints.weightx = 0;
3487
-// aWindowConstraints.weighty = 1;
3488
-// //bigThree.add(jtp, aWindowConstraints);
3489
-// aWindowConstraints.weightx = 1;
3490
-// aWindowConstraints.gridwidth = 3;
3491
-// // aConstraints.gridheight = 3;
3492
-// aWindowConstraints.gridx = 1;
3493
-// aWindowConstraints.fill = GridBagConstraints.BOTH;
3494
-// bigThree.add(centralPanel, aWindowConstraints);
3495
-// aWindowConstraints.weightx = 0;
3496
-// aWindowConstraints.gridx = 4;
3497
-// aWindowConstraints.gridwidth = 1;
3498
-// // aConstraints.gridheight = 3;
3499
-// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3500
-// //bigThree.add(XYZPanel, aWindowConstraints);
3501
-// scenePanel.setVisible(false);
3502
-// centralPanel.setVisible(true);
3503
-// XYZPanel.setVisible(false);
3504
- bigThree.ClearUI();
3505
- bigThree.add(centralPanel);
3506
- bigThree.FlushUI();
3770
+ Show3DView();
35073771
35083772 cameraView.requestFocusInWindow();
35093773
....@@ -3689,6 +3953,7 @@
36893953 } else
36903954 if (source == rootButton)
36913955 {
3956
+ Replace();
36923957 Object3D obj;
36933958 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
36943959 {
....@@ -3746,10 +4011,10 @@
37464011 {
37474012 Object3D child = (Object3D)e.nextElement();
37484013 if(child.editWindow != null)
3749
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
37504014 child.pinned = false;
37514015 child.CloseUI();
37524016 listUI.remove(child);
4017
+// objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
37534018
37544019 //child.editWindow = null; // ???????????
37554020 }
....@@ -3768,6 +4033,7 @@
37684033 obj.CloseUI();
37694034 }
37704035 listUI.clear();
4036
+ SetPinStates(group.selection.size() > 0);
37714037 refreshContents(true);
37724038 } else
37734039 if (source == allParamsButton)
....@@ -3824,8 +4090,6 @@
38244090
38254091 copy = group;
38264092
3827
- SetUndoStates();
3828
-
38294093 //Globals.theRenderer.object = group;
38304094 if(!useclient)
38314095 {
....@@ -3853,7 +4117,23 @@
38534117 */
38544118 radio.layout.doClick();
38554119
4120
+ assert(copy instanceof Composite);
4121
+
4122
+ if (copy.versionlist == null)
4123
+ {
4124
+ copy.versionlist = new Object3D[100];
4125
+ copy.versionindex = -1;
4126
+
4127
+ // Cannot work with loops
4128
+ // To fix this issue, first mark all nodes above the root,
4129
+ // and check if any of these nodes are reachable below the root.
4130
+ //Save(true);
4131
+ }
4132
+
4133
+ SetVersionStates();
4134
+
38564135 ClearUnpinned();
4136
+
38574137 //Grafreed.Assert(group != null);
38584138 //Grafreed.Assert(group.selection != null);
38594139 SetPinStates(group.selection == null || group.selection.size() > 0);
....@@ -3870,11 +4150,13 @@
38704150 } else if (event.getSource() == editCameraItem)
38714151 {
38724152 cameraView.ProtectCamera();
4153
+ cameraView.requestFocusInWindow();
38734154 cameraView.repaint();
38744155 return;
38754156 } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton)
38764157 {
38774158 cameraView.RevertCamera();
4159
+ cameraView.requestFocusInWindow();
38784160 cameraView.repaint();
38794161 return;
38804162 // } else if (event.getSource() == textureButton)
....@@ -5007,9 +5289,7 @@
50075289
50085290 freezemodel = false;
50095291 }
5010
-
5011
- boolean flashIt = true;
5012
-
5292
+
50135293 public void valueChanged(TreeSelectionEvent e)
50145294 //public boolean handleEvent(Event event)
50155295 {
....@@ -5082,13 +5362,30 @@
50825362 {
50835363 editButton.setEnabled(enabled);
50845364 uneditButton.setEnabled(enabled);
5085
- unselectButton.setEnabled(enabled);
5365
+ //unselectButton.setEnabled(enabled);
50865366 flashSelectionButton.setEnabled(enabled);
5367
+
5368
+ clearPanelButton.setEnabled(!listUI.isEmpty());
5369
+
5370
+ boolean allComposites = true;
5371
+
5372
+ if (group.selection != null)
5373
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
5374
+ {
5375
+ Object next = e.nextElement();
5376
+ if (!(next instanceof Composite)) // || (next instanceof GroupLeaf))
5377
+ {
5378
+ allComposites = false;
5379
+ break;
5380
+ }
5381
+ }
5382
+
5383
+ rootButton.setEnabled(allComposites);
50875384 }
50885385
50895386 void refreshContents(boolean cp)
50905387 {
5091
- if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
5388
+ //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
50925389 if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
50935390 {
50945391 objEditor.ClearInfo(); // .GetMaterial());
....@@ -5098,7 +5395,7 @@
50985395 Object3D child = (Object3D) group.selection.get(i);
50995396
51005397 objEditor.AddInfo(child, this, true);
5101
- System.err.println("info : " + child.GetPath());
5398
+// System.err.println("info : " + child.GetPath());
51025399 }
51035400
51045401 objEditor.SetText(); // jan 2014
....@@ -5924,7 +6221,6 @@
59246221
59256222 cButton restoreCameraButton;
59266223
5927
- cButton saveButton;
59286224 cButton oneStepButton;
59296225
59306226 cButton groupButton;
....@@ -5982,11 +6278,11 @@
59826278 private MenuItem lookAtItem;
59836279 private MenuItem lookFromItem;
59846280 private MenuItem switchViewItem;
5985
- private MenuItem cutItem;
6281
+ private JMenuItem cutItem;
59866282 private MenuItem undoItem;
59876283 private MenuItem redoItem;
59886284 private JMenuItem duplicateItem;
5989
- private MenuItem cloneItem;
6285
+ private JMenuItem cloneItem;
59906286 private MenuItem cloneSupportItem;
59916287 private MenuItem overwriteGeoItem;
59926288 private MenuItem overwriteMatItem;
....@@ -6007,13 +6303,13 @@
60076303 private MenuItem cloneGeometriesItem;
60086304 private MenuItem shareGeometriesItem;
60096305 private MenuItem mergeGeometriesItem;
6010
- private MenuItem copyItem;
6306
+ private JMenuItem copyItem;
60116307 private MenuItem pasteItem;
6012
- private MenuItem pasteIntoItem;
6013
- private MenuItem pasteLinkItem;
6014
- private MenuItem pasteCloneItem;
6015
- private MenuItem pasteExpandItem;
6016
- private MenuItem deleteItem;
6308
+ private JMenuItem pasteIntoItem;
6309
+ private JMenuItem pasteLinkItem;
6310
+ private JMenuItem pasteCloneItem;
6311
+ private JMenuItem pasteExpandItem;
6312
+ private JMenuItem deleteItem;
60176313 private MenuItem clearAllItem;
60186314 private MenuItem genUVItem;
60196315 private MenuItem genNormalsMESHItem;
....@@ -6068,7 +6364,7 @@
60686364 private MenuItem transformGeometryItem;
60696365 private MenuItem transformChildrenItem;
60706366 private MenuItem hideItem;
6071
- private MenuItem grabItem;
6367
+ private JMenuItem grabItem;
60726368 private MenuItem backItem;
60736369 private MenuItem frontItem;
60746370 private MenuItem cameraItem;
....@@ -6081,7 +6377,7 @@
60816377 private MenuItem switchTransfoItem;
60826378 private MenuItem morphItem;
60836379 private MenuItem linkerItem;
6084
- private MenuItem ungroupItem;
6380
+ private JMenuItem ungroupItem;
60856381 private MenuItem editItem;
60866382 private MenuItem openWindowItem;
60876383 private MenuItem editLeafItem;