Normand Briere
2019-08-26 6266c8a4b2485b29a7d5bcb217460d7aad3e1c4a
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,
....@@ -28,9 +29,9 @@
2829 {
2930 cButton skyboxButton;
3031 final String path = "cubemaps/" + f + "-skyboxes/" + s;
31
- row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.NIMBUSLAF));
32
+ row.add(skyboxButton = GetButton(path + "/preview.jpg", !Globals.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, !Globals.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
- cameraView.skyboxname = name;
256
- cameraView.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(JTabbedPane.LEFT);
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,11 +415,15 @@
294415 this.copy = this.group = group;
295416 //selectees = this.group.selectees;
296417
297
- if (copy.versions == null)
298
- {
299
- copy.versions = new byte[100][];
300
- copy.versionindex = -1;
301
- }
418
+ assert(false);
419
+
420
+// if (copy.versionlist == null)
421
+// {
422
+// copy.versionlist = new Object3D[100];
423
+// copy.versionindex = -1;
424
+//
425
+// //Save(true);
426
+// }
302427
303428 if(ui)
304429 SetupUI(objEditor);
....@@ -321,13 +446,13 @@
321446
322447 ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true);
323448
324
- if (copy.versions == null)
325
- {
326
- copy.versions = new byte[100][];
327
- copy.versionindex = -1;
328
-
329
- Save(true);
330
- }
449
+// if (copy.versionlist == null)
450
+// {
451
+// copy.versionlist = new Object3D[100];
452
+// copy.versionindex = -1;
453
+//
454
+// //Save(true);
455
+// }
331456 }
332457
333458 void CloneSelection(boolean supports)
....@@ -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 //
....@@ -633,11 +765,11 @@
633765 shadowYItem.addActionListener(this);
634766 shadowZItem = menu.add(new MenuItem("Shadow Blue"));
635767 shadowZItem.addActionListener(this);
636
- attributeItem = menu.add(new MenuItem("Attribute"));
637
- attributeItem.addActionListener(this);
638768
639769 if (Globals.ADVANCED)
640770 {
771
+ attributeItem = menu.add(new MenuItem("Attribute"));
772
+ attributeItem.addActionListener(this);
641773 menu.add("-");
642774 linkerItem = menu.add(new MenuItem("Linker"));
643775 linkerItem.addActionListener(this);
....@@ -647,11 +779,18 @@
647779 pointflowItem.addActionListener(this);
648780 }
649781 menu.add("-");
782
+ textureRatioRItem = menu.add(new MenuItem("Texture Ratio Red"));
783
+ textureRatioRItem.addActionListener(this);
784
+ textureRatioGItem = menu.add(new MenuItem("Texture Ratio Green"));
785
+ textureRatioGItem.addActionListener(this);
786
+ textureRatioBItem = menu.add(new MenuItem("Texture Ratio Blue"));
787
+ textureRatioBItem.addActionListener(this);
788
+ menu.add("-");
650789 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
651790 resetTransformItem.addActionListener(this);
652791 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
653792 resetCentroidItem.addActionListener(this);
654
- resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
793
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XZ"));
655794 resetCentroidXZItem.addActionListener(this);
656795 transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
657796 transformGeometryItem.addActionListener(this);
....@@ -703,6 +842,8 @@
703842 }
704843
705844 oe.menuBar.add(menu = new Menu("Attributes"));
845
+ clearVersionsItem = menu.add(new MenuItem("Clear Versions"));
846
+ clearVersionsItem.addActionListener(this);
706847 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
707848 clearMaterialsItem.addActionListener(this);
708849 resetAllItem = menu.add(new MenuItem("Reset All"));
....@@ -725,9 +866,9 @@
725866 hideleavesItem.addActionListener(this);
726867 showleavesItem = menu.add(new MenuItem("Show Leaves"));
727868 showleavesItem.addActionListener(this);
728
- markleavesItem = menu.add(new MenuItem("Mark Leaves"));
869
+ markleavesItem = menu.add(new MenuItem("Anim Leaves"));
729870 markleavesItem.addActionListener(this);
730
- unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
871
+ unmarkleavesItem = menu.add(new MenuItem("Unanim Leaves"));
731872 unmarkleavesItem.addActionListener(this);
732873 rewindleavesItem = menu.add(new MenuItem("Rewind Leaves"));
733874 rewindleavesItem.addActionListener(this);
....@@ -781,6 +922,9 @@
781922 shareGeometriesItem.addActionListener(this);
782923 mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
783924 mergeGeometriesItem.addActionListener(this);
925
+ menu.add("-");
926
+ editLeafItem = menu.add(new MenuItem("Edit leaf..."));
927
+ editLeafItem.addActionListener(this);
784928 if (Globals.ADVANCED)
785929 {
786930 // Pretty much the same as duplicate and clone.
....@@ -797,6 +941,79 @@
797941 buildToolsMenu(menu);
798942 }
799943
944
+ JTabbedPane resourcecontainer;
945
+ cGridBag currenttab;
946
+ //boolean added; // patch for jar
947
+
948
+ int totalcount = 0;
949
+
950
+ int tabcount = 0;
951
+ int colcount = 0;
952
+ int rowcount = 0;
953
+ int texturecount = 0;
954
+
955
+ int columns = 5;
956
+ int rows = 7;
957
+
958
+ public void ResourceCallBack(String[] path)
959
+ {
960
+// for (int i = 0; i < path.length; i++)
961
+// System.out.print(path[i] + "/");
962
+// System.out.println();
963
+
964
+ if (//rowcount == 0 ||
965
+ path.length == 1 && !path[0].equals("") && !path[0].equals(".DS_Store"))
966
+ {
967
+ currenttab = new cGridBag();
968
+ String tabname = path[0]; // String.valueOf((char)('A'+tabcount));
969
+ currenttab.setName(tabname);
970
+ //added = false;
971
+ resourcecontainer.add(currenttab);
972
+ resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname);
973
+ rowcount = 1;
974
+ colcount = 0;
975
+ texturecount = 0;
976
+ }
977
+
978
+ if (path.length > 2 && (path[2].toLowerCase().endsWith(".jpg") || path[2].toLowerCase().endsWith(".png")))
979
+ {
980
+ //if (!added)
981
+ {
982
+ //added = true;
983
+ String tabname = path[0]; // String.valueOf((char)('A'+tabcount));
984
+ currenttab = (cGridBag)resourcecontainer.getComponentAt(resourcecontainer.indexOfTab(tabname));
985
+ }
986
+
987
+ AddTextureButton(path[0], path[1], path[2], ++texturecount, currenttab);
988
+ totalcount++;
989
+
990
+ if (++colcount >= columns)
991
+ {
992
+ colcount = 0;
993
+ currenttab.Return();
994
+
995
+ if (rowcount++ >= rows)
996
+ {
997
+ rowcount = 0;
998
+ }
999
+ }
1000
+ }
1001
+ else
1002
+ {
1003
+// if (!path[path.length-1].equals("icons"))
1004
+// resourcecontainer.Return();
1005
+ }
1006
+ }
1007
+
1008
+ void CreateTexturePanel(cGridBag container)
1009
+ {
1010
+ resourcecontainer = new JTabbedPane(JTabbedPane.LEFT);
1011
+ container.add(resourcecontainer);
1012
+
1013
+ Grafreed.ParseResources("textures", this);
1014
+
1015
+ // 935. System.out.println("Total = " + totalcount);
1016
+ }
8001017
8011018 void SetupUI2(ObjEditor oe)
8021019 {
....@@ -815,11 +1032,6 @@
8151032 //new Exception().printStackTrace();
8161033
8171034 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;
8231035 // oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
8241036
8251037 oe.buttonGroup = new ButtonGroup();
....@@ -840,9 +1052,9 @@
8401052 oe.radioPanel.add(dummyButton);
8411053 oe.buttonGroup.add(dummyButton);
8421054 */
843
- cGridBag copyOptionsPanel = new cGridBag();
1055
+ cGridBag versionManagerPanel = new cGridBag();
8441056
845
- copyOptionsPanel.preferredHeight = 2;
1057
+ versionManagerPanel.preferredHeight = 4;
8461058
8471059 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
8481060
....@@ -852,58 +1064,102 @@
8521064
8531065 if (Globals.ADVANCED)
8541066 {
855
- oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
856
- maxButton.setToolTipText("Maximize window");
857
- maxButton.addActionListener(this);
1067
+// oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1068
+// maxButton.setToolTipText("Maximize window");
1069
+// maxButton.addActionListener(this);
8581070 }
8591071
860
- oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1072
+ cButton gcButton;
1073
+
1074
+// oe.toolbarPanel.add(gcButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1075
+// gcButton.setToolTipText("Garbage collect");
1076
+// gcButton.addActionListener(new ActionListener()
1077
+// {
1078
+// public void actionPerformed(ActionEvent e)
1079
+// {
1080
+// System.gc();
1081
+// }
1082
+// });
1083
+
1084
+ oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1085
+ collapseButton.setToolTipText("Collapse toolbar");
1086
+ collapseButton.addActionListener(this);
1087
+
1088
+ oe.toolbarPanel.add(maximize3DButton = GetButton("icons/square.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1089
+ maximize3DButton.setToolTipText("Maximize 3D view");
1090
+ maximize3DButton.addActionListener(this);
1091
+
1092
+ oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1093
+ twoButton.setToolTipText("Show 3D view only");
1094
+ twoButton.addActionListener(this);
1095
+ this.fullscreenLayout = twoButton;
1096
+
1097
+ oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1098
+ threeButton.setToolTipText("Show controls and 3D view");
1099
+ threeButton.addActionListener(this);
1100
+ if (Globals.ADVANCED)
1101
+ {
1102
+ oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1103
+ sixButton.setToolTipText("Show 3D view and controls");
1104
+ sixButton.addActionListener(this);
1105
+ }
1106
+// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1107
+// sevenButton.setToolTipText("3-column layout");
1108
+// sevenButton.addActionListener(this);
1109
+ //
1110
+
1111
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
8611112 fullButton.setToolTipText("Full-screen window");
8621113 fullButton.addActionListener(this);
8631114
864
- oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1115
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
8651116 screenfitButton.setToolTipText("Screen fit");
8661117 screenfitButton.addActionListener(this);
8671118
868
- oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1119
+ oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
8691120 restoreCameraButton.setToolTipText("Restore viewpoint");
8701121 restoreCameraButton.addActionListener(this);
8711122
872
- copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
873
- saveButton.setToolTipText("New version");
874
- saveButton.addActionListener(this);
1123
+ versionManagerPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1124
+ saveVersionButton.setToolTipText("Duplicate current version");
1125
+ saveVersionButton.addActionListener(this);
8751126
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);
1127
+ versionManagerPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1128
+ deleteVersionButton.setToolTipText("Delete current version");
1129
+ deleteVersionButton.addActionListener(this);
1130
+ deleteVersionButton.setEnabled(false);
1131
+
1132
+ versionManagerPanel.add(previousVersionButton = GetButton("icons/undo.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1133
+ previousVersionButton.setToolTipText("Previous version");
1134
+ previousVersionButton.addActionListener(this);
1135
+ previousVersionButton.setEnabled(false);
8801136
8811137 cGridBag updown = new cGridBag().setVertical(true);
882
- updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
883
- restoreButton.setToolTipText("Restore current");
1138
+ updown.add(restoreButton = GetButton("icons/restore.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1139
+ restoreButton.setToolTipText("Undo (restore current version)");
8841140 restoreButton.addActionListener(this);
8851141 restoreButton.setEnabled(false);
8861142
887
- updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
888
- replaceButton.setToolTipText("Replace current");
1143
+ updown.add(replaceButton = GetButton("icons/replace.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1144
+ replaceButton.setToolTipText("Save (replace current version)");
8891145 replaceButton.addActionListener(this);
8901146 replaceButton.setEnabled(false);
8911147
892
- copyOptionsPanel.add(updown);
1148
+ versionManagerPanel.add(updown);
8931149
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);
1150
+ versionManagerPanel.add(nextVersionButton = GetButton("icons/redo.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1151
+ nextVersionButton.setToolTipText("Next version");
1152
+ nextVersionButton.addActionListener(this);
1153
+ nextVersionButton.setEnabled(false);
1154
+
1155
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1156
+ oneStepButton.setToolTipText("Animate one step forward");
1157
+ oneStepButton.addActionListener(this);
8981158
8991159 oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
9001160 liveCB.setToolTipText("Enable animation");
9011161 liveCB.addItemListener(this);
9021162
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
-
9071163 oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
9081164 fastCB.setToolTipText("Fast mode");
9091165 fastCB.addItemListener(this);
....@@ -919,38 +1175,23 @@
9191175
9201176 if (Globals.ADVANCED)
9211177 {
922
- oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1178
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Globals.NIMBUSLAF)); //, oe.aConstraints);
9231179 snapobjectButton.addActionListener(this);
9241180 snapobjectButton.setToolTipText("Snap Object");
9251181
926
- oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1182
+ oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
9271183 fourButton.addActionListener(this);
9281184 fourButton.setToolTipText("Show control panel only");
9291185 }
9301186
9311187 //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
9321188
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
- //
9481189
949
- oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1190
+ oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
9501191 rootButton.setToolTipText("Open selection in new tab");
9511192 rootButton.addActionListener(this);
9521193
953
- oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1194
+ oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
9541195 closeButton.setToolTipText("Close tab");
9551196 closeButton.addActionListener(this);
9561197 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
....@@ -959,38 +1200,38 @@
9591200 cGridBag row1 = new cGridBag();
9601201
9611202 // INSERT
962
- row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
963
- gridButton.setToolTipText("Create grid");
1203
+ row1.add(gridButton = GetButton("icons/grid.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1204
+ gridButton.setToolTipText("Create ground");
9641205 gridButton.addActionListener(this);
9651206
966
- row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1207
+ row1.add(boxButton = GetButton("icons/box.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
9671208 boxButton.setToolTipText("Create box");
9681209 boxButton.addActionListener(this);
9691210
970
- row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
971
- sphereButton.setToolTipText("Create sphere");
972
- sphereButton.addActionListener(this);
973
-
974
- row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
975
- coneButton.setToolTipText("Create cone");
976
- coneButton.addActionListener(this);
977
-
978
- row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
979
- torusButton.setToolTipText("Create torus");
980
- torusButton.addActionListener(this);
981
-
982
- row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1211
+ row1.add(superButton = GetButton("icons/super.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
9831212 superButton.setToolTipText("Create superellipsoid");
9841213 superButton.addActionListener(this);
9851214
986
- if (Globals.ADVANCED)
1215
+ row1.add(sphereButton = GetButton("icons/sphere.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1216
+ sphereButton.setToolTipText("Create sphere");
1217
+ sphereButton.addActionListener(this);
1218
+
1219
+ row1.add(coneButton = GetButton("icons/cone.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1220
+ coneButton.setToolTipText("Create cone");
1221
+ coneButton.addActionListener(this);
1222
+
1223
+ row1.add(torusButton = GetButton("icons/torus.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1224
+ torusButton.setToolTipText("Create torus");
1225
+ torusButton.addActionListener(this);
1226
+
1227
+ if (false) //Globals.ADVANCED)
9871228 {
988
- oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1229
+ oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
9891230 kleinButton.setToolTipText("Create Klein bottle");
9901231 kleinButton.addActionListener(this);
9911232 }
9921233
993
- row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1234
+ row1.add(particlesButton = GetButton("icons/particles.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
9941235 particlesButton.setToolTipText("Create particle system");
9951236 particlesButton.addActionListener(this);
9961237
....@@ -998,71 +1239,73 @@
9981239
9991240 cGridBag row2 = new cGridBag();
10001241
1001
- row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1242
+ row2.add(groupButton = GetButton("icons/group.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10021243 groupButton.setToolTipText("Create group");
10031244 groupButton.addActionListener(this);
10041245
1005
- row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1246
+ row2.add(compositeButton = GetButton("icons/composite.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10061247 compositeButton.setToolTipText("Create composite");
10071248 compositeButton.addActionListener(this);
10081249
1009
- row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1250
+ row2.add(switchButton = GetButton("icons/switch.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10101251 switchButton.setToolTipText("Create item switcher");
10111252 switchButton.addActionListener(this);
10121253
1013
- row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1254
+ row2.add(loopButton = GetButton("icons/loop.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10141255 loopButton.setToolTipText("Create loop");
10151256 loopButton.addActionListener(this);
10161257
1017
- row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1258
+ row2.add(textureButton = GetButton("icons/texture.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10181259 textureButton.setToolTipText("Create texture");
10191260 textureButton.addActionListener(this);
10201261
1021
- row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1262
+ row2.add(overlayButton = GetButton("icons/overlay.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10221263 overlayButton.setToolTipText("Create overlay");
10231264 overlayButton.addActionListener(this);
10241265
1025
- row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1266
+ row2.add(lightButton = GetButton("icons/light-bulb.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10261267 lightButton.setToolTipText("Create light");
10271268 lightButton.addActionListener(this);
10281269
10291270 oe.toolboxPanel.add(row2);
10301271
1031
- // ENVYMAPS
1032
- cGridBag skyboxpane = new cGridBag();
1033
- skyboxpane.preferredHeight = 100;
1272
+ cGridBag textures = new cGridBag();
10341273
1035
- oe.toolboxPanel.add(skyboxpane);
1274
+ CreateTexturePanel(textures);
10361275
1037
- JTabbedPane skyboxpanel = new JTabbedPane();
1038
- skyboxpane.add(skyboxpanel);
1276
+ int tabCount = resourcecontainer.getTabCount();
10391277
1040
- AddSkyboxTab0(skyboxpanel);
1041
- AddSkyboxTab1(skyboxpanel);
1042
- AddSkyboxTab2(skyboxpanel);
1278
+ if (tabCount > 0)
1279
+ resourcecontainer.setSelectedIndex((int)(Math.random() * tabCount));
1280
+
1281
+ oe.toolboxPanel.add(textures);
1282
+
1283
+ textures.preferredHeight = 100;
1284
+
1285
+ CreateSkyboxPanel(oe.skyboxPanel);
10431286
10441287 // EDIT panel
1045
- editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1288
+ editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10461289 editButton.setToolTipText("Pin selection controls");
10471290 editButton.addActionListener(this);
10481291
1049
- editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1050
- uneditButton.setToolTipText("Remove selection controls");
1292
+ editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1293
+ uneditButton.setToolTipText("Unpin and remove selection controls");
10511294 uneditButton.addActionListener(this);
10521295
10531296 editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
1054
- allParamsButton.setToolTipText("Show all controle");
1297
+ allParamsButton.setToolTipText("Show all controls");
10551298 allParamsButton.addActionListener(this);
10561299
1057
- editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1058
- clearPanelButton.setToolTipText("Clear edit panel");
1300
+ editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1301
+ clearPanelButton.setToolTipText("Clear all controls");
10591302 clearPanelButton.addActionListener(this);
10601303
1061
- editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1062
- unselectButton.setToolTipText("Unselect");
1063
- unselectButton.addActionListener(this);
1304
+ //editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1305
+ //unselectButton.setToolTipText("Unselect");
1306
+ //unselectButton.addActionListener(this);
10641307
1065
- editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1308
+ editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10661309 flashSelectionButton.setToolTipText("Highlight selection");
10671310 flashSelectionButton.addActionListener(this);
10681311
....@@ -1085,6 +1328,8 @@
10851328
10861329 cGridBag jSPPanel = new cGridBag();
10871330
1331
+ jSPPanel.preferredHeight = 20;
1332
+
10881333 JScrollPane jSP;
10891334 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
10901335 jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
....@@ -1093,11 +1338,11 @@
10931338 oe.treePanel.add(jSPPanel);
10941339 oe.treePanel.Return();
10951340
1096
- oe.treePanel.add(copyOptionsPanel);
1341
+ oe.treePanel.add(versionManagerPanel);
10971342 oe.treePanel.Return();
1098
- cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
1099
- versionSlider = (cNumberSlider)sliderPane.getComponent(1);
1100
- sliderPane.preferredHeight = 1;
1343
+ versionSliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
1344
+ versionSlider = (cNumberSlider)versionSliderPane.getComponent(1);
1345
+ versionSliderPane.preferredHeight = 3;
11011346
11021347 // mainPanel.setDividerLocation(0.1); //1.0);
11031348 mainPanel.setResizeWeight(0.4);
....@@ -1120,7 +1365,7 @@
11201365 dgr.addDragGestureListener(this);
11211366 }catch(Exception e) {}
11221367 */
1123
- radio.layout = sixButton; // sevenButton;
1368
+ radio.layout = threeButton; // sixButton;
11241369 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
11251370 }
11261371
....@@ -1171,9 +1416,12 @@
11711416 smoothCB.setToolTipText("Snapping delay");
11721417 smoothCB.addItemListener(this);
11731418
1174
- panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
1175
- slowCB.setToolTipText("Smooth interpolation");
1176
- slowCB.addItemListener(this);
1419
+// panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
1420
+// slowCB.setToolTipText("Smooth interpolation");
1421
+// slowCB.addItemListener(this);
1422
+ panel.add(minshaderCB = new cCheckBox("Min shader", Globals.MINSHADER)); //, constraints);
1423
+ minshaderCB.setToolTipText("Minimal fast shader");
1424
+ minshaderCB.addItemListener(this);
11771425
11781426 // constraints.gridy += 1;
11791427 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
....@@ -1252,6 +1500,14 @@
12521500
12531501 void EditObject(Object3D obj)
12541502 {
1503
+ //assert(obj instanceof Composite);
1504
+
1505
+// if (obj.versionlist == null)
1506
+// {
1507
+// obj.versionlist = new Object3D[100];
1508
+// obj.versionindex = -1;
1509
+// }
1510
+
12551511 cRadio radioButton = new cRadio(obj.name);
12561512
12571513 // June 2019. Patch to avoid bug with transparency.
....@@ -1262,7 +1518,7 @@
12621518 }
12631519
12641520 radioButton.SetObject(obj);
1265
- radioButton.layout = sixButton; // sevenButton;
1521
+ radioButton.layout = threeButton; // sixButton;
12661522 radioButton.SetCamera(cameraView.renderCamera, false);
12671523 radioButton.addActionListener(this);
12681524 radioPanel.add(radioButton);
....@@ -1276,6 +1532,7 @@
12761532
12771533 oe.SetupViews();
12781534
1535
+ if (Globals.DEBUG)
12791536 System.out.println("SetupViews");
12801537 DragSource.getDefaultDragSource().createDefaultDragGestureRecognizer(
12811538 oe.cameraView, DnDConstants.ACTION_COPY_OR_MOVE, this); // ACTION_LINK ??
....@@ -1287,6 +1544,8 @@
12871544 cCheckBox localCB;
12881545 cCheckBox crowdCB;
12891546 cCheckBox smoothCB;
1547
+ cCheckBox minshaderCB;
1548
+
12901549 cToggleButton fastCB;
12911550 cCheckBox slowCB;
12921551 cCheckBox boxCB;
....@@ -1357,6 +1616,12 @@
13571616 {
13581617 cameraView.ToggleInertia();
13591618 cameraView.repaint();
1619
+ }
1620
+ else if(e.getSource() == minshaderCB)
1621
+ {
1622
+ Globals.MINSHADER ^= true;
1623
+ cameraView.programInitialized = false;
1624
+ cameraView.repaint();
13601625 }
13611626 else if(e.getSource() == localCB)
13621627 {
....@@ -1634,7 +1899,12 @@
16341899 TreePath path;
16351900
16361901 public TransferableTreePath(TreePath tp) {
1637
- path = tp;
1902
+ Object[] objs = new Object[tp.getPathCount()];
1903
+ for (int i=0; i<objs.length; i++)
1904
+ {
1905
+ objs[i] = ((Object3D)tp.getPathComponent(i)).GetUUID();
1906
+ }
1907
+ path = new TreePath(objs);
16381908 }
16391909
16401910 public synchronized DataFlavor[] getTransferDataFlavors() {
....@@ -1866,24 +2136,24 @@
18662136 switch(axis)
18672137 {
18682138 case 0 :
1869
- vert1.x = minima.x; vert1.y = minima.y; vert1.z = minima.z;
1870
- vert2.x = minima.x; vert2.y = maxima.y; vert2.z = minima.z;
1871
- vert3.x = minima.x; vert3.y = minima.y; vert3.z = maxima.z;
1872
- vert4.x = minima.x; vert4.y = maxima.y; vert4.z = maxima.z;
2139
+ vert1.x = minima.x + 0.001f; vert1.y = minima.y; vert1.z = minima.z;
2140
+ vert2.x = minima.x + 0.001f; vert2.y = maxima.y; vert2.z = minima.z;
2141
+ vert3.x = minima.x + 0.001f; vert3.y = minima.y; vert3.z = maxima.z;
2142
+ vert4.x = minima.x + 0.001f; vert4.y = maxima.y; vert4.z = maxima.z;
18732143 norm = cVector.X;
18742144 break;
18752145 case 1 :
1876
- vert1.x = minima.x; vert1.y = minima.y; vert1.z = minima.z;
1877
- vert2.x = maxima.x; vert2.y = minima.y; vert2.z = minima.z;
1878
- vert3.x = minima.x; vert3.y = minima.y; vert3.z = maxima.z;
1879
- vert4.x = maxima.x; vert4.y = minima.y; vert4.z = maxima.z;
2146
+ vert1.x = minima.x; vert1.y = minima.y + 0.001f; vert1.z = minima.z;
2147
+ vert2.x = maxima.x; vert2.y = minima.y + 0.001f; vert2.z = minima.z;
2148
+ vert3.x = minima.x; vert3.y = minima.y + 0.001f; vert3.z = maxima.z;
2149
+ vert4.x = maxima.x; vert4.y = minima.y + 0.001f; vert4.z = maxima.z;
18802150 norm = cVector.Y;
18812151 break;
18822152 case 2 :
1883
- vert1.x = minima.x; vert1.y = minima.y; vert1.z = minima.z;
1884
- vert2.x = maxima.x; vert2.y = minima.y; vert2.z = minima.z;
1885
- vert3.x = minima.x; vert3.y = maxima.y; vert3.z = minima.z;
1886
- vert4.x = maxima.x; vert4.y = maxima.y; vert4.z = minima.z;
2153
+ vert1.x = minima.x; vert1.y = minima.y; vert1.z = minima.z + 0.001f;
2154
+ vert2.x = maxima.x; vert2.y = minima.y; vert2.z = minima.z + 0.001f;
2155
+ vert3.x = minima.x; vert3.y = maxima.y; vert3.z = minima.z + 0.001f;
2156
+ vert4.x = maxima.x; vert4.y = maxima.y; vert4.z = minima.z + 0.001f;
18872157 norm = cVector.Z;
18882158 break;
18892159 }
....@@ -1924,7 +2194,11 @@
19242194 shadow.material = new cMaterial(obj.material);
19252195 shadow.material.diffuse = 0.0001f;
19262196 shadow.material.specular = 0.0001f;
1927
- //shadow.projectedVertices[1].x = 300;
2197
+ shadow.material.opacity = 0.75f;
2198
+
2199
+ AllocProjectedVertices(shadow);
2200
+
2201
+ shadow.projectedVertices[1].x = 300;
19282202
19292203 makeSomething(shadow);
19302204 }
....@@ -2445,27 +2719,35 @@
24452719 } else
24462720 if (source == loopItem || source == loopButton)
24472721 {
2722
+ if (!group.selection.isEmpty())
2723
+ {
24482724 Composite csg = new GroupLeaf();
24492725 csg.count = 5;
2450
- group(csg);
24512726 Composite child = new cGroup("Branch");
24522727 csg.addChild(child);
24532728 child.addChild(csg);
2729
+ group(csg);
2730
+ }
24542731 } else
24552732 if (source == doubleItem)
24562733 {
2734
+ if (!group.selection.isEmpty())
2735
+ {
24572736 Composite csg = new GroupLeaf("Fork");
24582737 csg.count = 5;
2459
- group(csg);
24602738 Composite child = new cGroup("Branch A");
24612739 csg.addChild(child);
24622740 child.addChild(csg);
24632741 child = new cGroup("Branch B");
24642742 csg.addChild(child);
24652743 child.addChild(csg);
2744
+ group(csg);
2745
+ }
24662746 } else
24672747 if (source == tripleItem)
24682748 {
2749
+ if (!group.selection.isEmpty())
2750
+ {
24692751 Composite csg = new GroupLeaf("Trident");
24702752 csg.count = 4;
24712753 group(csg);
....@@ -2478,6 +2760,7 @@
24782760 child = new cGroup();
24792761 csg.addChild(child);
24802762 child.addChild(csg);
2763
+ }
24812764 } else
24822765 if (source == computeAOItem)
24832766 {
....@@ -2497,7 +2780,7 @@
24972780 if (source == invariantsItem)
24982781 {
24992782 System.out.println("Invariants:");
2500
- Grafreed.grafreeD.universe.invariants();
2783
+ Grafreed.grafreed.universe.invariants();
25012784 } else
25022785 if (source == memoryItem)
25032786 {
....@@ -2528,33 +2811,52 @@
25282811 {
25292812 ToggleFullScreen();
25302813 } else
2531
- if (source == undoButton)
2814
+ if (source == collapseButton)
2815
+ {
2816
+ this.expandedLayout = radio.layout;
2817
+ CollapseToolbar();
2818
+ } else
2819
+ if (source == maximize3DButton)
2820
+ {
2821
+ this.expandedLayout = radio.layout;
2822
+ radio.layout = twoButton;
2823
+ Show3DView();
2824
+ CollapseToolbar();
2825
+ } else
2826
+ if (source == previousVersionButton)
25322827 {
25332828 // Go to previous version
25342829 //if (!Undo())
25352830 //java.awt.Toolkit.getDefaultToolkit().beep();
2536
- Undo();
2831
+ PreviousVersion();
25372832 } else
25382833 if (source == restoreButton)
25392834 {
25402835 // Restore current version
25412836 Restore();
2837
+ //restoreButton.setEnabled(false);
25422838 } else
25432839 if (source == replaceButton)
25442840 {
25452841 // Overwrite current version
25462842 Replace();
2843
+ //replaceButton.setEnabled(false);
25472844 } else
2548
- if (source == redoButton)
2845
+ if (source == nextVersionButton)
25492846 {
25502847 // Go to next version
2551
- Redo();
2848
+ NextVersion();
25522849 } else
2553
- if (source == saveButton)
2850
+ if (source == saveVersionButton)
25542851 {
25552852 // Save a new version
25562853 if (!Save(true))
25572854 java.awt.Toolkit.getDefaultToolkit().beep();
2855
+ } else
2856
+ if (source == deleteVersionButton)
2857
+ {
2858
+ // Delete a new version
2859
+ DeleteVersion();
25582860 } else
25592861 if (source == oneStepButton)
25602862 {
....@@ -2609,11 +2911,11 @@
26092911 } else
26102912 if (source == undoItem)
26112913 {
2612
- Undo();
2914
+ PreviousVersion();
26132915 } else
26142916 if (source == redoItem)
26152917 {
2616
- Redo();
2918
+ NextVersion();
26172919 } else
26182920 if (source == duplicateItem)
26192921 {
....@@ -3094,22 +3396,34 @@
30943396 } else
30953397 if (source == ungroupItem || source == ungroupButton)
30963398 {
3097
- boolean hasRoot = false;
3399
+ boolean canUngroup = true;
30983400
30993401 for (int i=0; i<group.selection.size(); i++)
31003402 {
3101
- if (group.selection.get(i) == group)
3403
+ Object3D selectedItem = group.selection.get(i);
3404
+
3405
+ if (selectedItem.Size() == 0)
31023406 {
3103
- hasRoot = true;
3407
+ // Cannot ungroup leaves
3408
+ canUngroup = false;
3409
+ break;
3410
+ }
3411
+
3412
+ if (selectedItem == group)
3413
+ {
3414
+ // Cannot ungroup root
3415
+ canUngroup = false;
31043416 break;
31053417 }
31063418 }
31073419
3108
- if (!hasRoot)
3420
+ if (canUngroup)
31093421 {
31103422 for (int i=0; i<group.selection.size(); i++)
31113423 {
3112
- Ungroup(group.selection.get(i));
3424
+ Object3D selectedItem = group.selection.get(i);
3425
+
3426
+ Ungroup(selectedItem);
31133427 }
31143428
31153429 ClearSelection(false);
....@@ -3160,6 +3474,10 @@
31603474 if (source == clearMaterialsItem)
31613475 {
31623476 ClearMaterials();
3477
+ } else
3478
+ if (source == clearVersionsItem)
3479
+ {
3480
+ ClearVersions();
31633481 } else
31643482 if (source == liveleavesItem)
31653483 {
....@@ -3300,6 +3618,18 @@
33003618 if (source == transformChildrenItem)
33013619 {
33023620 TransformChildren();
3621
+ } else
3622
+ if (source == textureRatioRItem)
3623
+ {
3624
+ TextureRatio(0);
3625
+ } else
3626
+ if (source == textureRatioGItem)
3627
+ {
3628
+ TextureRatio(1);
3629
+ } else
3630
+ if (source == textureRatioBItem)
3631
+ {
3632
+ TextureRatio(2);
33033633 } else
33043634 if (source == resetTransformItem)
33053635 {
....@@ -3472,38 +3802,7 @@
34723802 if (CameraPane.FULLSCREEN)
34733803 fullscreenLayout = radio.layout;
34743804
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();
3805
+ Show3DView();
35073806
35083807 cameraView.requestFocusInWindow();
35093808
....@@ -3689,6 +3988,7 @@
36893988 } else
36903989 if (source == rootButton)
36913990 {
3991
+ Replace();
36923992 Object3D obj;
36933993 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
36943994 {
....@@ -3703,6 +4003,9 @@
37034003 if (source == closeButton)
37044004 {
37054005 //System.out.println("CLOSE: " + buttonGroup.getSelection());
4006
+ if (copy.versionlist != null)
4007
+ Replace();
4008
+
37064009 cRadio ab;
37074010 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
37084011 {
....@@ -3746,10 +4049,10 @@
37464049 {
37474050 Object3D child = (Object3D)e.nextElement();
37484051 if(child.editWindow != null)
3749
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
37504052 child.pinned = false;
37514053 child.CloseUI();
37524054 listUI.remove(child);
4055
+// objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
37534056
37544057 //child.editWindow = null; // ???????????
37554058 }
....@@ -3768,6 +4071,7 @@
37684071 obj.CloseUI();
37694072 }
37704073 listUI.clear();
4074
+ SetPinStates(group.selection.size() > 0);
37714075 refreshContents(true);
37724076 } else
37734077 if (source == allParamsButton)
....@@ -3800,6 +4104,9 @@
38004104 } else
38014105 if(source instanceof cRadio)
38024106 {
4107
+ if (copy.versionlist != null)
4108
+ Replace();
4109
+
38034110 group.parent = keepparent;
38044111 group.attributes = 0;
38054112 //group.editWindow = null;
....@@ -3824,8 +4131,6 @@
38244131
38254132 copy = group;
38264133
3827
- SetUndoStates();
3828
-
38294134 //Globals.theRenderer.object = group;
38304135 if(!useclient)
38314136 {
....@@ -3853,7 +4158,33 @@
38534158 */
38544159 radio.layout.doClick();
38554160
4161
+ //assert(copy instanceof Composite);
4162
+
4163
+ if (copy.versionlist == null)
4164
+ {
4165
+ copy.versionindex = -1;
4166
+
4167
+ // Cannot work with loops
4168
+ // To fix this issue, we first mark all nodes above the root,
4169
+ // and check if any of these nodes are reachable below the root.
4170
+ Grafreed.grafreed.universe.TagObjects(copy, true);
4171
+
4172
+ if (copy instanceof Composite && copy.versionlist == null && !copy.HasTags())
4173
+ {
4174
+ copy.versionlist = new Object3D[100];
4175
+
4176
+ //Save(true);
4177
+ }
4178
+ else
4179
+ copy.versionindex = -2;
4180
+
4181
+ Grafreed.grafreed.universe.TagObjects(copy, false);
4182
+ }
4183
+
4184
+ SetVersionStates();
4185
+
38564186 ClearUnpinned();
4187
+
38574188 //Grafreed.Assert(group != null);
38584189 //Grafreed.Assert(group.selection != null);
38594190 SetPinStates(group.selection == null || group.selection.size() > 0);
....@@ -3870,11 +4201,13 @@
38704201 } else if (event.getSource() == editCameraItem)
38714202 {
38724203 cameraView.ProtectCamera();
4204
+ cameraView.requestFocusInWindow();
38734205 cameraView.repaint();
38744206 return;
38754207 } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton)
38764208 {
38774209 cameraView.RevertCamera();
4210
+ cameraView.requestFocusInWindow();
38784211 cameraView.repaint();
38794212 return;
38804213 // } else if (event.getSource() == textureButton)
....@@ -3963,6 +4296,18 @@
39634296 refreshContents();
39644297 }
39654298
4299
+ void TextureRatio(int axis)
4300
+ {
4301
+ Object3D obj;
4302
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
4303
+ {
4304
+ obj = (Object3D)e.nextElement();
4305
+ obj.TextureRatio(axis);
4306
+ }
4307
+
4308
+ refreshContents();
4309
+ }
4310
+
39664311 void ResetTransform()
39674312 {
39684313 ResetTransform(-1);
....@@ -3978,42 +4323,8 @@
39784323 if (obj.toParent == null)
39794324 continue;
39804325
3981
- if (mask == -1)
3982
- {
3983
- if (obj instanceof Camera) // jan 2014
3984
- {
3985
- LA.matIdentity(obj.toParent);
3986
- LA.matIdentity(obj.fromParent);
3987
- }
3988
- else
3989
- {
3990
- obj.toParent = null; // jan 2014 LA.matIdentity(obj.toParent);
3991
- obj.fromParent = null; // LA.matIdentity(obj.fromParent);
3992
- }
3993
- TouchTransform(obj);
3994
- continue;
3995
- }
3996
- if ((mask&2) != 0) // Scale
3997
- {
3998
- obj.toParent[0][0] = obj.toParent[1][1] = obj.toParent[2][2] = 1;
3999
- obj.toParent[0][1] = obj.toParent[1][0] = obj.toParent[2][0] = 0;
4000
- obj.toParent[0][2] = obj.toParent[1][2] = obj.toParent[2][1] = 0;
4001
- obj.fromParent[0][0] = obj.fromParent[1][1] = obj.fromParent[2][2] = 1;
4002
- obj.fromParent[0][1] = obj.fromParent[1][0] = obj.fromParent[2][0] = 0;
4003
- obj.fromParent[0][2] = obj.fromParent[1][2] = obj.fromParent[2][1] = 0;
4004
- }
4005
- if ((mask&4) != 0) // Rotation
4006
- {
4007
- // ?
4008
- }
4009
- if ((mask&1) != 0) // Translation
4010
- {
4011
- if (obj.toParent != null)
4012
- {
4013
- obj.toParent[3][0] = obj.toParent[3][1] = obj.toParent[3][2] = 0;
4014
- obj.fromParent[3][0] = obj.fromParent[3][1] = obj.fromParent[3][2] = 0;
4015
- }
4016
- }
4326
+ obj.ResetTransform(mask);
4327
+
40174328 if (obj.parent == null)
40184329 {
40194330 System.out.println("NULL PARENT!");
....@@ -4522,6 +4833,12 @@
45224833 {
45234834 Object3D obj = group.selection.get(i);
45244835
4836
+ if (obj.toParent == null)
4837
+ {
4838
+ obj.toParent = LA.newMatrix();
4839
+ obj.fromParent = LA.newMatrix();
4840
+ }
4841
+
45254842 LA.matTranslate(obj.toParent, i * scale, 0, 0);
45264843 LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0);
45274844 }
....@@ -4813,6 +5130,12 @@
48135130 refreshContents();
48145131 }
48155132
5133
+ void ClearVersions()
5134
+ {
5135
+ group.selection.ClearVersions();
5136
+ refreshContents();
5137
+ }
5138
+
48165139 void FlipV(boolean flip)
48175140 {
48185141 group.selection.FlipV(flip);
....@@ -5007,9 +5330,7 @@
50075330
50085331 freezemodel = false;
50095332 }
5010
-
5011
- boolean flashIt = true;
5012
-
5333
+
50135334 public void valueChanged(TreeSelectionEvent e)
50145335 //public boolean handleEvent(Event event)
50155336 {
....@@ -5082,13 +5403,31 @@
50825403 {
50835404 editButton.setEnabled(enabled);
50845405 uneditButton.setEnabled(enabled);
5085
- unselectButton.setEnabled(enabled);
5406
+ //unselectButton.setEnabled(enabled);
50865407 flashSelectionButton.setEnabled(enabled);
5408
+
5409
+ clearPanelButton.setEnabled(!listUI.isEmpty());
5410
+
5411
+ boolean allComposites = true;
5412
+
5413
+ if (group.selection != null)
5414
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
5415
+ {
5416
+ Object next = e.nextElement();
5417
+ if (!(next instanceof Composite)) // || (next instanceof GroupLeaf))
5418
+ {
5419
+ allComposites = false;
5420
+ break;
5421
+ }
5422
+ }
5423
+
5424
+ rootButton.setEnabled(true); // allComposites);
50875425 }
50885426
50895427 void refreshContents(boolean cp)
50905428 {
5091
- if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
5429
+ if (Globals.ADVANCED)
5430
+ //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
50925431 if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
50935432 {
50945433 objEditor.ClearInfo(); // .GetMaterial());
....@@ -5098,7 +5437,7 @@
50985437 Object3D child = (Object3D) group.selection.get(i);
50995438
51005439 objEditor.AddInfo(child, this, true);
5101
- System.err.println("info : " + child.GetPath());
5440
+// System.err.println("info : " + child.GetPath());
51025441 }
51035442
51045443 objEditor.SetText(); // jan 2014
....@@ -5924,7 +6263,6 @@
59246263
59256264 cButton restoreCameraButton;
59266265
5927
- cButton saveButton;
59286266 cButton oneStepButton;
59296267
59306268 cButton groupButton;
....@@ -5982,11 +6320,11 @@
59826320 private MenuItem lookAtItem;
59836321 private MenuItem lookFromItem;
59846322 private MenuItem switchViewItem;
5985
- private MenuItem cutItem;
6323
+ private JMenuItem cutItem;
59866324 private MenuItem undoItem;
59876325 private MenuItem redoItem;
59886326 private JMenuItem duplicateItem;
5989
- private MenuItem cloneItem;
6327
+ private JMenuItem cloneItem;
59906328 private MenuItem cloneSupportItem;
59916329 private MenuItem overwriteGeoItem;
59926330 private MenuItem overwriteMatItem;
....@@ -6007,13 +6345,13 @@
60076345 private MenuItem cloneGeometriesItem;
60086346 private MenuItem shareGeometriesItem;
60096347 private MenuItem mergeGeometriesItem;
6010
- private MenuItem copyItem;
6348
+ private JMenuItem copyItem;
60116349 private MenuItem pasteItem;
6012
- private MenuItem pasteIntoItem;
6013
- private MenuItem pasteLinkItem;
6014
- private MenuItem pasteCloneItem;
6015
- private MenuItem pasteExpandItem;
6016
- private MenuItem deleteItem;
6350
+ private JMenuItem pasteIntoItem;
6351
+ private JMenuItem pasteLinkItem;
6352
+ private JMenuItem pasteCloneItem;
6353
+ private JMenuItem pasteExpandItem;
6354
+ private JMenuItem deleteItem;
60176355 private MenuItem clearAllItem;
60186356 private MenuItem genUVItem;
60196357 private MenuItem genNormalsMESHItem;
....@@ -6039,6 +6377,7 @@
60396377 private MenuItem clipMeshItem;
60406378 private MenuItem smoothMeshItem;
60416379 private MenuItem clearMaterialsItem;
6380
+ private MenuItem clearVersionsItem;
60426381
60436382 private MenuItem liveleavesItem;
60446383 private MenuItem unliveleavesItem;
....@@ -6062,13 +6401,16 @@
60626401 private MenuItem maxTexturesItem;
60636402 private MenuItem panoTexturesItem;
60646403
6404
+ private MenuItem textureRatioRItem;
6405
+ private MenuItem textureRatioGItem;
6406
+ private MenuItem textureRatioBItem;
60656407 private MenuItem resetCentroidItem;
60666408 private MenuItem resetCentroidXZItem;
60676409 private MenuItem resetTransformItem;
60686410 private MenuItem transformGeometryItem;
60696411 private MenuItem transformChildrenItem;
60706412 private MenuItem hideItem;
6071
- private MenuItem grabItem;
6413
+ private JMenuItem grabItem;
60726414 private MenuItem backItem;
60736415 private MenuItem frontItem;
60746416 private MenuItem cameraItem;
....@@ -6081,7 +6423,7 @@
60816423 private MenuItem switchTransfoItem;
60826424 private MenuItem morphItem;
60836425 private MenuItem linkerItem;
6084
- private MenuItem ungroupItem;
6426
+ private JMenuItem ungroupItem;
60856427 private MenuItem editItem;
60866428 private MenuItem openWindowItem;
60876429 private MenuItem editLeafItem;