Normand Briere
2019-08-22 6a145f6c81dfcbe0653eda27d042efb48daa7512
GroupEditor.java
....@@ -16,7 +16,7 @@
1616 //import buoy.widget.BFileChooser;
1717
1818 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
19
- Grafreed.iResourceCallBack,
19
+ Grafreed.iResourceCallBack,
2020 ObjectUI,
2121 Runnable,
2222 ActionListener,
....@@ -29,9 +29,9 @@
2929 {
3030 cButton skyboxButton;
3131 final String path = "cubemaps/" + f + "-skyboxes/" + s;
32
- row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.NIMBUSLAF));
32
+ row.add(skyboxButton = GetButton(path + "/preview.jpg", !Globals.NIMBUSLAF));
3333 //row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF));
34
- skyboxButton.setToolTipText(s);
34
+ skyboxButton.setToolTipText(s.equals("") ? "No background" : s);
3535 skyboxButton.addActionListener(new ActionListener()
3636 {
3737 @Override
....@@ -42,6 +42,22 @@
4242 });
4343 }
4444
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
+
4561 public void AddSkyboxTab0(JTabbedPane skyboxpanel)
4662 {
4763 cGridBag tab0 = new cGridBag().setVertical(true);
....@@ -57,7 +73,7 @@
5773 cGridBag row5 = new cGridBag();
5874 cGridBag row6 = new cGridBag();
5975
60
- AddSkyboxButton("default", "rgb", row0);
76
+ AddSkyboxButton("default", "", row0);
6177 //AddSkyboxButton("default", "cornell", row0);
6278 AddSkyboxButton("penguins", "dust", row0);
6379 AddSkyboxButton("penguins", "tropic", row0);
....@@ -312,26 +328,56 @@
312328 }
313329 }
314330
315
- public void CallBack(String[] path)
316
- {
317
- for (int i = 0; i < path.length; i++)
318
- {
319
- System.out.print(path[i] + "/");
320
- }
321
-
322
- System.out.println();
323
- }
324
-
325331 public void ChangeSkybox(String skybox)
326332 {
327
- //cameraView.envyoff = false;
328
- group.skyboxname = skybox;
329
- group.skyboxext = "jpg";
330
- cameraView.repaint();
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
+ }
331347
332
- Grafreed.ParseResources("textures", this);
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);
333358 }
334359
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
+
335381 //ObjEditor objEditor;
336382 public void closeUI2()
337383 {
....@@ -369,10 +415,14 @@
369415 this.copy = this.group = group;
370416 //selectees = this.group.selectees;
371417
418
+ assert(false);
419
+
372420 if (copy.versionlist == null)
373421 {
374422 copy.versionlist = new Object3D[100];
375423 copy.versionindex = -1;
424
+
425
+ //Save(true);
376426 }
377427
378428 if(ui)
....@@ -401,7 +451,7 @@
401451 copy.versionlist = new Object3D[100];
402452 copy.versionindex = -1;
403453
404
- Save(true);
454
+ //Save(true);
405455 }
406456 }
407457
....@@ -492,33 +542,35 @@
492542 // menu.add("-");
493543 duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate"));
494544 duplicateItem.addActionListener(this);
495
- cloneItem = menu.add(new MenuItem("Clone"));
545
+
546
+ cloneItem = oe.jTree.popup.add(new JMenuItem("Clone"));
496547 cloneItem.addActionListener(this);
497
- if (Globals.ADVANCED)
548
+ //if (Globals.ADVANCED)
498549 {
499550 cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
500551 cloneSupportItem.addActionListener(this);
501552 }
553
+ oe.jTree.popup.addSeparator();
502554 menu.add("-");
503
- cutItem = menu.add(new MenuItem("Cut"));
555
+ cutItem = oe.jTree.popup.add(new JMenuItem("Cut"));
504556 cutItem.addActionListener(this);
505
- copyItem = menu.add(new MenuItem("Copy"));
557
+ copyItem = oe.jTree.popup.add(new JMenuItem("Copy"));
506558 copyItem.addActionListener(this);
507559 pasteItem = menu.add(new MenuItem("Paste"));
508560 pasteItem.addActionListener(this);
509561
510
- menu.add("-");
511
- 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"));
512565 pasteIntoItem.addActionListener(this);
513
- pasteLinkItem = menu.add(new MenuItem("Paste link"));
566
+ pasteLinkItem = oe.jTree.popup.add(new JMenuItem("Paste link"));
514567 pasteLinkItem.addActionListener(this);
515
- pasteCloneItem = menu.add(new MenuItem("Paste clone"));
568
+ pasteCloneItem = oe.jTree.popup.add(new JMenuItem("Paste clone"));
516569 pasteCloneItem.addActionListener(this);
517
-// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
570
+// CRASH pasteExpandItem = oe.jTree.popup.add(new JMenuItem("Paste expand"));
518571 // pasteExpandItem.addActionListener(this);
519
- menu.add("-");
520
- deleteItem = menu.add(new MenuItem("Delete"));
521
- deleteItem.addActionListener(this);
572
+ //menu.add("-");
573
+ oe.jTree.popup.addSeparator();
522574
523575 if (Globals.ADVANCED)
524576 {
....@@ -604,11 +656,9 @@
604656 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
605657 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
606658 //cameraMenu.add(switchViewItem = new MenuItem("Reverse View"));
607
- editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
608659 oe.cameraMenu.add("-");
609660 openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
610661 openWindowItem.addActionListener(this);
611
- editLeafItem.addActionListener(this);
612662 lookAtItem.addActionListener(this);
613663 //lookFromItem.addActinoListener(this);
614664 //switchViewItem.addActionListener(this);
....@@ -655,9 +705,8 @@
655705 setMasterItem.addActionListener(this);
656706 }
657707
658
- oe.menuBar.add(menu = new Menu("Group"));
659
-// grabItem = menu.add(new MenuItem("Grab"));
660
-// grabItem.addActionListener(this);
708
+ oe.menuBar.add(menu = new Menu("Order"));
709
+
661710 backItem = menu.add(new MenuItem("Back"));
662711 backItem.addActionListener(this);
663712 frontItem = menu.add(new MenuItem("Front"));
....@@ -665,13 +714,21 @@
665714 // compositeItem = menu.add(new MenuItem("Composite"));
666715 // compositeItem.addActionListener(this);
667716
717
+ grabItem = oe.jTree.popup.add(new JMenuItem("Group"));
718
+ grabItem.addActionListener(this);
719
+
668720 if (Globals.ADVANCED)
669721 {
670722 hideItem = menu.add(new MenuItem("Hidden Group"));
671723 hideItem.addActionListener(this);
672724 }
673
- ungroupItem = menu.add(new MenuItem("Ungroup"));
725
+ ungroupItem = oe.jTree.popup.add(new JMenuItem("Ungroup"));
674726 ungroupItem.addActionListener(this);
727
+
728
+ oe.jTree.popup.addSeparator();
729
+
730
+ deleteItem = oe.jTree.popup.add(new JMenuItem("Delete"));
731
+ deleteItem.addActionListener(this);
675732
676733 // menu.add("-");
677734 //
....@@ -800,9 +857,9 @@
800857 hideleavesItem.addActionListener(this);
801858 showleavesItem = menu.add(new MenuItem("Show Leaves"));
802859 showleavesItem.addActionListener(this);
803
- markleavesItem = menu.add(new MenuItem("Mark Leaves"));
860
+ markleavesItem = menu.add(new MenuItem("Anim Leaves"));
804861 markleavesItem.addActionListener(this);
805
- unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
862
+ unmarkleavesItem = menu.add(new MenuItem("Unanim Leaves"));
806863 unmarkleavesItem.addActionListener(this);
807864 rewindleavesItem = menu.add(new MenuItem("Rewind Leaves"));
808865 rewindleavesItem.addActionListener(this);
....@@ -856,6 +913,9 @@
856913 shareGeometriesItem.addActionListener(this);
857914 mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
858915 mergeGeometriesItem.addActionListener(this);
916
+ menu.add("-");
917
+ editLeafItem = menu.add(new MenuItem("Edit leaf..."));
918
+ editLeafItem.addActionListener(this);
859919 if (Globals.ADVANCED)
860920 {
861921 // Pretty much the same as duplicate and clone.
....@@ -872,6 +932,79 @@
872932 buildToolsMenu(menu);
873933 }
874934
935
+ JTabbedPane resourcecontainer;
936
+ cGridBag currenttab;
937
+ //boolean added; // patch for jar
938
+
939
+ int totalcount = 0;
940
+
941
+ int tabcount = 0;
942
+ int colcount = 0;
943
+ int rowcount = 0;
944
+ int texturecount = 0;
945
+
946
+ int columns = 5;
947
+ int rows = 7;
948
+
949
+ public void ResourceCallBack(String[] path)
950
+ {
951
+// for (int i = 0; i < path.length; i++)
952
+// System.out.print(path[i] + "/");
953
+// System.out.println();
954
+
955
+ if (//rowcount == 0 ||
956
+ path.length == 1 && !path[0].equals("") && !path[0].equals(".DS_Store"))
957
+ {
958
+ currenttab = new cGridBag();
959
+ String tabname = path[0]; // String.valueOf((char)('A'+tabcount));
960
+ currenttab.setName(tabname);
961
+ //added = false;
962
+ resourcecontainer.add(currenttab);
963
+ resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname);
964
+ rowcount = 1;
965
+ colcount = 0;
966
+ texturecount = 0;
967
+ }
968
+
969
+ if (path.length > 2 && (path[2].toLowerCase().endsWith(".jpg") || path[2].toLowerCase().endsWith(".png")))
970
+ {
971
+ //if (!added)
972
+ {
973
+ //added = true;
974
+ String tabname = path[0]; // String.valueOf((char)('A'+tabcount));
975
+ currenttab = (cGridBag)resourcecontainer.getComponentAt(resourcecontainer.indexOfTab(tabname));
976
+ }
977
+
978
+ AddTextureButton(path[0], path[1], path[2], ++texturecount, currenttab);
979
+ totalcount++;
980
+
981
+ if (++colcount >= columns)
982
+ {
983
+ colcount = 0;
984
+ currenttab.Return();
985
+
986
+ if (rowcount++ >= rows)
987
+ {
988
+ rowcount = 0;
989
+ }
990
+ }
991
+ }
992
+ else
993
+ {
994
+// if (!path[path.length-1].equals("icons"))
995
+// resourcecontainer.Return();
996
+ }
997
+ }
998
+
999
+ void CreateTexturePanel(cGridBag container)
1000
+ {
1001
+ resourcecontainer = new JTabbedPane(JTabbedPane.LEFT);
1002
+ container.add(resourcecontainer);
1003
+
1004
+ Grafreed.ParseResources("textures", this);
1005
+
1006
+ // 935. System.out.println("Total = " + totalcount);
1007
+ }
8751008
8761009 void SetupUI2(ObjEditor oe)
8771010 {
....@@ -890,11 +1023,6 @@
8901023 //new Exception().printStackTrace();
8911024
8921025 oe.radioPanel = new JPanel(new GridBagLayout());
893
- oe.aConstraints.weightx = 1;
894
- oe.aConstraints.weighty = 0;
895
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
896
- oe.aConstraints.gridwidth = 100;
897
- oe.aConstraints.gridheight = 1;
8981026 // oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
8991027
9001028 oe.buttonGroup = new ButtonGroup();
....@@ -915,9 +1043,9 @@
9151043 oe.radioPanel.add(dummyButton);
9161044 oe.buttonGroup.add(dummyButton);
9171045 */
918
- cGridBag copyOptionsPanel = new cGridBag();
1046
+ cGridBag versionManagerPanel = new cGridBag();
9191047
920
- copyOptionsPanel.preferredHeight = 2;
1048
+ versionManagerPanel.preferredHeight = 4;
9211049
9221050 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
9231051
....@@ -927,62 +1055,102 @@
9271055
9281056 if (Globals.ADVANCED)
9291057 {
930
- oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
931
- maxButton.setToolTipText("Maximize window");
932
- maxButton.addActionListener(this);
1058
+// oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1059
+// maxButton.setToolTipText("Maximize window");
1060
+// maxButton.addActionListener(this);
9331061 }
9341062
935
- oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1063
+ cButton gcButton;
1064
+
1065
+// oe.toolbarPanel.add(gcButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1066
+// gcButton.setToolTipText("Garbage collect");
1067
+// gcButton.addActionListener(new ActionListener()
1068
+// {
1069
+// public void actionPerformed(ActionEvent e)
1070
+// {
1071
+// System.gc();
1072
+// }
1073
+// });
1074
+
1075
+ oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1076
+ collapseButton.setToolTipText("Collapse toolbar");
1077
+ collapseButton.addActionListener(this);
1078
+
1079
+ oe.toolbarPanel.add(maximize3DButton = GetButton("icons/square.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1080
+ maximize3DButton.setToolTipText("Maximize 3D view");
1081
+ maximize3DButton.addActionListener(this);
1082
+
1083
+ oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1084
+ twoButton.setToolTipText("Show 3D view only");
1085
+ twoButton.addActionListener(this);
1086
+ this.fullscreenLayout = twoButton;
1087
+
1088
+ oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1089
+ threeButton.setToolTipText("Show controls and 3D view");
1090
+ threeButton.addActionListener(this);
1091
+ if (Globals.ADVANCED)
1092
+ {
1093
+ oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1094
+ sixButton.setToolTipText("Show 3D view and controls");
1095
+ sixButton.addActionListener(this);
1096
+ }
1097
+// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1098
+// sevenButton.setToolTipText("3-column layout");
1099
+// sevenButton.addActionListener(this);
1100
+ //
1101
+
1102
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
9361103 fullButton.setToolTipText("Full-screen window");
9371104 fullButton.addActionListener(this);
9381105
939
- oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1106
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
9401107 screenfitButton.setToolTipText("Screen fit");
9411108 screenfitButton.addActionListener(this);
9421109
943
- oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1110
+ oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
9441111 restoreCameraButton.setToolTipText("Restore viewpoint");
9451112 restoreCameraButton.addActionListener(this);
9461113
947
- copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1114
+ versionManagerPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
9481115 saveVersionButton.setToolTipText("Duplicate current version");
9491116 saveVersionButton.addActionListener(this);
9501117
951
- copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1118
+ versionManagerPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
9521119 deleteVersionButton.setToolTipText("Delete current version");
9531120 deleteVersionButton.addActionListener(this);
1121
+ deleteVersionButton.setEnabled(false);
9541122
955
- copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1123
+ versionManagerPanel.add(previousVersionButton = GetButton("icons/undo.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
9561124 previousVersionButton.setToolTipText("Previous version");
9571125 previousVersionButton.addActionListener(this);
9581126 previousVersionButton.setEnabled(false);
9591127
9601128 cGridBag updown = new cGridBag().setVertical(true);
961
- updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1129
+ updown.add(restoreButton = GetButton("icons/restore.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
9621130 restoreButton.setToolTipText("Undo (restore current version)");
9631131 restoreButton.addActionListener(this);
964
- //restoreButton.setEnabled(false);
1132
+ restoreButton.setEnabled(false);
9651133
966
- updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1134
+ updown.add(replaceButton = GetButton("icons/replace.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
9671135 replaceButton.setToolTipText("Save (replace current version)");
9681136 replaceButton.addActionListener(this);
969
- //replaceButton.setEnabled(false);
1137
+ replaceButton.setEnabled(false);
9701138
971
- copyOptionsPanel.add(updown);
1139
+ versionManagerPanel.add(updown);
9721140
973
- copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1141
+ versionManagerPanel.add(nextVersionButton = GetButton("icons/redo.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
9741142 nextVersionButton.setToolTipText("Next version");
9751143 nextVersionButton.addActionListener(this);
9761144 nextVersionButton.setEnabled(false);
1145
+
1146
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1147
+ oneStepButton.setToolTipText("Animate one step forward");
1148
+ oneStepButton.addActionListener(this);
9771149
9781150 oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
9791151 liveCB.setToolTipText("Enable animation");
9801152 liveCB.addItemListener(this);
9811153
982
- oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
983
- oneStepButton.setToolTipText("Animate one step forward");
984
- oneStepButton.addActionListener(this);
985
-
9861154 oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
9871155 fastCB.setToolTipText("Fast mode");
9881156 fastCB.addItemListener(this);
....@@ -998,38 +1166,23 @@
9981166
9991167 if (Globals.ADVANCED)
10001168 {
1001
- oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1169
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10021170 snapobjectButton.addActionListener(this);
10031171 snapobjectButton.setToolTipText("Snap Object");
10041172
1005
- oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1173
+ oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10061174 fourButton.addActionListener(this);
10071175 fourButton.setToolTipText("Show control panel only");
10081176 }
10091177
10101178 //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
10111179
1012
- oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1013
- twoButton.setToolTipText("Show 3D view only");
1014
- twoButton.addActionListener(this);
1015
- this.fullscreenLayout = twoButton;
1016
-
1017
- oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1018
- threeButton.setToolTipText("Show controls and 3D view");
1019
- threeButton.addActionListener(this);
1020
- oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1021
- sixButton.setToolTipText("Show 3D view and controls");
1022
- sixButton.addActionListener(this);
1023
-// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1024
-// sevenButton.setToolTipText("3-column layout");
1025
-// sevenButton.addActionListener(this);
1026
- //
10271180
1028
- oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1181
+ oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10291182 rootButton.setToolTipText("Open selection in new tab");
10301183 rootButton.addActionListener(this);
10311184
1032
- oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1185
+ oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10331186 closeButton.setToolTipText("Close tab");
10341187 closeButton.addActionListener(this);
10351188 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
....@@ -1038,38 +1191,38 @@
10381191 cGridBag row1 = new cGridBag();
10391192
10401193 // INSERT
1041
- row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1042
- gridButton.setToolTipText("Create grid");
1194
+ row1.add(gridButton = GetButton("icons/grid.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1195
+ gridButton.setToolTipText("Create ground");
10431196 gridButton.addActionListener(this);
10441197
1045
- row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1198
+ row1.add(boxButton = GetButton("icons/box.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10461199 boxButton.setToolTipText("Create box");
10471200 boxButton.addActionListener(this);
10481201
1049
- row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1050
- sphereButton.setToolTipText("Create sphere");
1051
- sphereButton.addActionListener(this);
1052
-
1053
- row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1054
- coneButton.setToolTipText("Create cone");
1055
- coneButton.addActionListener(this);
1056
-
1057
- row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1058
- torusButton.setToolTipText("Create torus");
1059
- torusButton.addActionListener(this);
1060
-
1061
- row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1202
+ row1.add(superButton = GetButton("icons/super.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10621203 superButton.setToolTipText("Create superellipsoid");
10631204 superButton.addActionListener(this);
10641205
1206
+ row1.add(sphereButton = GetButton("icons/sphere.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1207
+ sphereButton.setToolTipText("Create sphere");
1208
+ sphereButton.addActionListener(this);
1209
+
1210
+ row1.add(coneButton = GetButton("icons/cone.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1211
+ coneButton.setToolTipText("Create cone");
1212
+ coneButton.addActionListener(this);
1213
+
1214
+ row1.add(torusButton = GetButton("icons/torus.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1215
+ torusButton.setToolTipText("Create torus");
1216
+ torusButton.addActionListener(this);
1217
+
10651218 if (Globals.ADVANCED)
10661219 {
1067
- oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1220
+ oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10681221 kleinButton.setToolTipText("Create Klein bottle");
10691222 kleinButton.addActionListener(this);
10701223 }
10711224
1072
- row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1225
+ row1.add(particlesButton = GetButton("icons/particles.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10731226 particlesButton.setToolTipText("Create particle system");
10741227 particlesButton.addActionListener(this);
10751228
....@@ -1077,72 +1230,73 @@
10771230
10781231 cGridBag row2 = new cGridBag();
10791232
1080
- row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1233
+ row2.add(groupButton = GetButton("icons/group.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10811234 groupButton.setToolTipText("Create group");
10821235 groupButton.addActionListener(this);
10831236
1084
- row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1237
+ row2.add(compositeButton = GetButton("icons/composite.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10851238 compositeButton.setToolTipText("Create composite");
10861239 compositeButton.addActionListener(this);
10871240
1088
- row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1241
+ row2.add(switchButton = GetButton("icons/switch.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10891242 switchButton.setToolTipText("Create item switcher");
10901243 switchButton.addActionListener(this);
10911244
1092
- row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1245
+ row2.add(loopButton = GetButton("icons/loop.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10931246 loopButton.setToolTipText("Create loop");
10941247 loopButton.addActionListener(this);
10951248
1096
- row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1249
+ row2.add(textureButton = GetButton("icons/texture.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10971250 textureButton.setToolTipText("Create texture");
10981251 textureButton.addActionListener(this);
10991252
1100
- row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1253
+ row2.add(overlayButton = GetButton("icons/overlay.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11011254 overlayButton.setToolTipText("Create overlay");
11021255 overlayButton.addActionListener(this);
11031256
1104
- row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1257
+ row2.add(lightButton = GetButton("icons/light-bulb.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11051258 lightButton.setToolTipText("Create light");
11061259 lightButton.addActionListener(this);
11071260
11081261 oe.toolboxPanel.add(row2);
11091262
1110
- // ENVYMAPS
1111
- cGridBag skyboxpane = new cGridBag();
1112
- skyboxpane.preferredHeight = 100;
1263
+ cGridBag textures = new cGridBag();
11131264
1114
- oe.skyboxPanel.add(skyboxpane);
1265
+ CreateTexturePanel(textures);
11151266
1116
- JTabbedPane skyboxpanel = new JTabbedPane();
1117
- skyboxpane.add(skyboxpanel);
1267
+ int tabCount = resourcecontainer.getTabCount();
11181268
1119
- AddSkyboxTab0(skyboxpanel);
1120
- AddSkyboxTab1(skyboxpanel);
1121
- AddSkyboxTab2(skyboxpanel);
1122
- AddSkyboxTab3(skyboxpanel);
1269
+ if (tabCount > 0)
1270
+ resourcecontainer.setSelectedIndex((int)(Math.random() * tabCount));
1271
+
1272
+ oe.toolboxPanel.add(textures);
1273
+
1274
+ textures.preferredHeight = 100;
1275
+
1276
+ CreateSkyboxPanel(oe.skyboxPanel);
11231277
11241278 // EDIT panel
1125
- editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1279
+ editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11261280 editButton.setToolTipText("Pin selection controls");
11271281 editButton.addActionListener(this);
11281282
1129
- editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1283
+ editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11301284 uneditButton.setToolTipText("Unpin and remove selection controls");
11311285 uneditButton.addActionListener(this);
11321286
11331287 editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
1134
- allParamsButton.setToolTipText("Show all controle");
1288
+ allParamsButton.setToolTipText("Show all controls");
11351289 allParamsButton.addActionListener(this);
11361290
1137
- editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1138
- clearPanelButton.setToolTipText("Clear edit panel");
1291
+ editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1292
+ clearPanelButton.setToolTipText("Clear all controls");
11391293 clearPanelButton.addActionListener(this);
11401294
11411295 //editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
11421296 //unselectButton.setToolTipText("Unselect");
11431297 //unselectButton.addActionListener(this);
11441298
1145
- editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1299
+ editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11461300 flashSelectionButton.setToolTipText("Highlight selection");
11471301 flashSelectionButton.addActionListener(this);
11481302
....@@ -1165,6 +1319,8 @@
11651319
11661320 cGridBag jSPPanel = new cGridBag();
11671321
1322
+ jSPPanel.preferredHeight = 20;
1323
+
11681324 JScrollPane jSP;
11691325 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
11701326 jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
....@@ -1173,11 +1329,11 @@
11731329 oe.treePanel.add(jSPPanel);
11741330 oe.treePanel.Return();
11751331
1176
- oe.treePanel.add(copyOptionsPanel);
1332
+ oe.treePanel.add(versionManagerPanel);
11771333 oe.treePanel.Return();
1178
- cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
1179
- versionSlider = (cNumberSlider)sliderPane.getComponent(1);
1180
- sliderPane.preferredHeight = 1;
1334
+ versionSliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
1335
+ versionSlider = (cNumberSlider)versionSliderPane.getComponent(1);
1336
+ versionSliderPane.preferredHeight = 3;
11811337
11821338 // mainPanel.setDividerLocation(0.1); //1.0);
11831339 mainPanel.setResizeWeight(0.4);
....@@ -1335,6 +1491,14 @@
13351491
13361492 void EditObject(Object3D obj)
13371493 {
1494
+ assert(obj instanceof Composite);
1495
+
1496
+// if (obj.versionlist == null)
1497
+// {
1498
+// obj.versionlist = new Object3D[100];
1499
+// obj.versionindex = -1;
1500
+// }
1501
+
13381502 cRadio radioButton = new cRadio(obj.name);
13391503
13401504 // June 2019. Patch to avoid bug with transparency.
....@@ -1359,6 +1523,7 @@
13591523
13601524 oe.SetupViews();
13611525
1526
+ if (Globals.DEBUG)
13621527 System.out.println("SetupViews");
13631528 DragSource.getDefaultDragSource().createDefaultDragGestureRecognizer(
13641529 oe.cameraView, DnDConstants.ACTION_COPY_OR_MOVE, this); // ACTION_LINK ??
....@@ -1725,7 +1890,12 @@
17251890 TreePath path;
17261891
17271892 public TransferableTreePath(TreePath tp) {
1728
- path = tp;
1893
+ Object[] objs = new Object[tp.getPathCount()];
1894
+ for (int i=0; i<objs.length; i++)
1895
+ {
1896
+ objs[i] = ((Object3D)tp.getPathComponent(i)).GetUUID();
1897
+ }
1898
+ path = new TreePath(objs);
17291899 }
17301900
17311901 public synchronized DataFlavor[] getTransferDataFlavors() {
....@@ -2015,7 +2185,11 @@
20152185 shadow.material = new cMaterial(obj.material);
20162186 shadow.material.diffuse = 0.0001f;
20172187 shadow.material.specular = 0.0001f;
2018
- //shadow.projectedVertices[1].x = 300;
2188
+ shadow.material.opacity = 0.75f;
2189
+
2190
+ AllocProjectedVertices(shadow);
2191
+
2192
+ shadow.projectedVertices[1].x = 300;
20192193
20202194 makeSomething(shadow);
20212195 }
....@@ -2536,27 +2710,35 @@
25362710 } else
25372711 if (source == loopItem || source == loopButton)
25382712 {
2713
+ if (!group.selection.isEmpty())
2714
+ {
25392715 Composite csg = new GroupLeaf();
25402716 csg.count = 5;
2541
- group(csg);
25422717 Composite child = new cGroup("Branch");
25432718 csg.addChild(child);
25442719 child.addChild(csg);
2720
+ group(csg);
2721
+ }
25452722 } else
25462723 if (source == doubleItem)
25472724 {
2725
+ if (!group.selection.isEmpty())
2726
+ {
25482727 Composite csg = new GroupLeaf("Fork");
25492728 csg.count = 5;
2550
- group(csg);
25512729 Composite child = new cGroup("Branch A");
25522730 csg.addChild(child);
25532731 child.addChild(csg);
25542732 child = new cGroup("Branch B");
25552733 csg.addChild(child);
25562734 child.addChild(csg);
2735
+ group(csg);
2736
+ }
25572737 } else
25582738 if (source == tripleItem)
25592739 {
2740
+ if (!group.selection.isEmpty())
2741
+ {
25602742 Composite csg = new GroupLeaf("Trident");
25612743 csg.count = 4;
25622744 group(csg);
....@@ -2569,6 +2751,7 @@
25692751 child = new cGroup();
25702752 csg.addChild(child);
25712753 child.addChild(csg);
2754
+ }
25722755 } else
25732756 if (source == computeAOItem)
25742757 {
....@@ -2618,6 +2801,18 @@
26182801 if (source == fullButton)
26192802 {
26202803 ToggleFullScreen();
2804
+ } else
2805
+ if (source == collapseButton)
2806
+ {
2807
+ this.expandedLayout = radio.layout;
2808
+ CollapseToolbar();
2809
+ } else
2810
+ if (source == maximize3DButton)
2811
+ {
2812
+ this.expandedLayout = radio.layout;
2813
+ radio.layout = twoButton;
2814
+ Show3DView();
2815
+ CollapseToolbar();
26212816 } else
26222817 if (source == previousVersionButton)
26232818 {
....@@ -3192,22 +3387,34 @@
31923387 } else
31933388 if (source == ungroupItem || source == ungroupButton)
31943389 {
3195
- boolean hasRoot = false;
3390
+ boolean canUngroup = true;
31963391
31973392 for (int i=0; i<group.selection.size(); i++)
31983393 {
3199
- if (group.selection.get(i) == group)
3394
+ Object3D selectedItem = group.selection.get(i);
3395
+
3396
+ if (selectedItem.Size() == 0)
32003397 {
3201
- hasRoot = true;
3398
+ // Cannot ungroup leaves
3399
+ canUngroup = false;
3400
+ break;
3401
+ }
3402
+
3403
+ if (selectedItem == group)
3404
+ {
3405
+ // Cannot ungroup root
3406
+ canUngroup = false;
32023407 break;
32033408 }
32043409 }
32053410
3206
- if (!hasRoot)
3411
+ if (canUngroup)
32073412 {
32083413 for (int i=0; i<group.selection.size(); i++)
32093414 {
3210
- Ungroup(group.selection.get(i));
3415
+ Object3D selectedItem = group.selection.get(i);
3416
+
3417
+ Ungroup(selectedItem);
32113418 }
32123419
32133420 ClearSelection(false);
....@@ -3570,38 +3777,7 @@
35703777 if (CameraPane.FULLSCREEN)
35713778 fullscreenLayout = radio.layout;
35723779
3573
- // bug
3574
- //gridPanel.setDividerLocation(1.0);
3575
- //bigPanel.setDividerLocation(0.0);
3576
-// bigThree.remove(scenePanel);
3577
-// bigThree.remove(centralPanel);
3578
-// bigThree.remove(XYZPanel);
3579
-// aWindowConstraints.gridx = 0;
3580
-// aWindowConstraints.gridy = 0;
3581
-// aWindowConstraints.gridwidth = 1;
3582
-// // aConstraints.gridheight = 3;
3583
-// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3584
-// aWindowConstraints.weightx = 0;
3585
-// aWindowConstraints.weighty = 1;
3586
-// //bigThree.add(jtp, aWindowConstraints);
3587
-// aWindowConstraints.weightx = 1;
3588
-// aWindowConstraints.gridwidth = 3;
3589
-// // aConstraints.gridheight = 3;
3590
-// aWindowConstraints.gridx = 1;
3591
-// aWindowConstraints.fill = GridBagConstraints.BOTH;
3592
-// bigThree.add(centralPanel, aWindowConstraints);
3593
-// aWindowConstraints.weightx = 0;
3594
-// aWindowConstraints.gridx = 4;
3595
-// aWindowConstraints.gridwidth = 1;
3596
-// // aConstraints.gridheight = 3;
3597
-// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3598
-// //bigThree.add(XYZPanel, aWindowConstraints);
3599
-// scenePanel.setVisible(false);
3600
-// centralPanel.setVisible(true);
3601
-// XYZPanel.setVisible(false);
3602
- bigThree.ClearUI();
3603
- bigThree.add(centralPanel);
3604
- bigThree.FlushUI();
3780
+ Show3DView();
36053781
36063782 cameraView.requestFocusInWindow();
36073783
....@@ -3787,6 +3963,7 @@
37873963 } else
37883964 if (source == rootButton)
37893965 {
3966
+ Replace();
37903967 Object3D obj;
37913968 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
37923969 {
....@@ -3801,6 +3978,8 @@
38013978 if (source == closeButton)
38023979 {
38033980 //System.out.println("CLOSE: " + buttonGroup.getSelection());
3981
+ Replace();
3982
+
38043983 cRadio ab;
38053984 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
38063985 {
....@@ -3899,6 +4078,8 @@
38994078 } else
39004079 if(source instanceof cRadio)
39014080 {
4081
+ Replace();
4082
+
39024083 group.parent = keepparent;
39034084 group.attributes = 0;
39044085 //group.editWindow = null;
....@@ -3923,8 +4104,6 @@
39234104
39244105 copy = group;
39254106
3926
- SetUndoStates();
3927
-
39284107 //Globals.theRenderer.object = group;
39294108 if(!useclient)
39304109 {
....@@ -3952,6 +4131,29 @@
39524131 */
39534132 radio.layout.doClick();
39544133
4134
+ assert(copy instanceof Composite);
4135
+
4136
+ if (copy.versionlist == null)
4137
+ {
4138
+ copy.versionindex = -1;
4139
+
4140
+ // Cannot work with loops
4141
+ // To fix this issue, we first mark all nodes above the root,
4142
+ // and check if any of these nodes are reachable below the root.
4143
+ Grafreed.grafreed.universe.TagObjects(copy, true);
4144
+
4145
+ if (!copy.HasTags())
4146
+ {
4147
+ copy.versionlist = new Object3D[100];
4148
+
4149
+ Save(true);
4150
+ }
4151
+
4152
+ Grafreed.grafreed.universe.TagObjects(copy, false);
4153
+ }
4154
+
4155
+ SetVersionStates();
4156
+
39554157 ClearUnpinned();
39564158
39574159 //Grafreed.Assert(group != null);
....@@ -4095,7 +4297,7 @@
40954297 TouchTransform(obj);
40964298 continue;
40974299 }
4098
- if ((mask&2) != 0) // Scale
4300
+ if ((mask&2) != 0) // Scale/rotation
40994301 {
41004302 obj.toParent[0][0] = obj.toParent[1][1] = obj.toParent[2][2] = 1;
41014303 obj.toParent[0][1] = obj.toParent[1][0] = obj.toParent[2][0] = 0;
....@@ -4103,10 +4305,6 @@
41034305 obj.fromParent[0][0] = obj.fromParent[1][1] = obj.fromParent[2][2] = 1;
41044306 obj.fromParent[0][1] = obj.fromParent[1][0] = obj.fromParent[2][0] = 0;
41054307 obj.fromParent[0][2] = obj.fromParent[1][2] = obj.fromParent[2][1] = 0;
4106
- }
4107
- if ((mask&4) != 0) // Rotation
4108
- {
4109
- // ?
41104308 }
41114309 if ((mask&1) != 0) // Translation
41124310 {
....@@ -5186,10 +5384,26 @@
51865384 flashSelectionButton.setEnabled(enabled);
51875385
51885386 clearPanelButton.setEnabled(!listUI.isEmpty());
5387
+
5388
+ boolean allComposites = true;
5389
+
5390
+ if (group.selection != null)
5391
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
5392
+ {
5393
+ Object next = e.nextElement();
5394
+ if (!(next instanceof Composite)) // || (next instanceof GroupLeaf))
5395
+ {
5396
+ allComposites = false;
5397
+ break;
5398
+ }
5399
+ }
5400
+
5401
+ rootButton.setEnabled(allComposites);
51895402 }
51905403
51915404 void refreshContents(boolean cp)
51925405 {
5406
+ if (Globals.ADVANCED)
51935407 //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
51945408 if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
51955409 {
....@@ -5200,7 +5414,7 @@
52005414 Object3D child = (Object3D) group.selection.get(i);
52015415
52025416 objEditor.AddInfo(child, this, true);
5203
- System.err.println("info : " + child.GetPath());
5417
+// System.err.println("info : " + child.GetPath());
52045418 }
52055419
52065420 objEditor.SetText(); // jan 2014
....@@ -6083,11 +6297,11 @@
60836297 private MenuItem lookAtItem;
60846298 private MenuItem lookFromItem;
60856299 private MenuItem switchViewItem;
6086
- private MenuItem cutItem;
6300
+ private JMenuItem cutItem;
60876301 private MenuItem undoItem;
60886302 private MenuItem redoItem;
60896303 private JMenuItem duplicateItem;
6090
- private MenuItem cloneItem;
6304
+ private JMenuItem cloneItem;
60916305 private MenuItem cloneSupportItem;
60926306 private MenuItem overwriteGeoItem;
60936307 private MenuItem overwriteMatItem;
....@@ -6108,13 +6322,13 @@
61086322 private MenuItem cloneGeometriesItem;
61096323 private MenuItem shareGeometriesItem;
61106324 private MenuItem mergeGeometriesItem;
6111
- private MenuItem copyItem;
6325
+ private JMenuItem copyItem;
61126326 private MenuItem pasteItem;
6113
- private MenuItem pasteIntoItem;
6114
- private MenuItem pasteLinkItem;
6115
- private MenuItem pasteCloneItem;
6116
- private MenuItem pasteExpandItem;
6117
- private MenuItem deleteItem;
6327
+ private JMenuItem pasteIntoItem;
6328
+ private JMenuItem pasteLinkItem;
6329
+ private JMenuItem pasteCloneItem;
6330
+ private JMenuItem pasteExpandItem;
6331
+ private JMenuItem deleteItem;
61186332 private MenuItem clearAllItem;
61196333 private MenuItem genUVItem;
61206334 private MenuItem genNormalsMESHItem;
....@@ -6169,7 +6383,7 @@
61696383 private MenuItem transformGeometryItem;
61706384 private MenuItem transformChildrenItem;
61716385 private MenuItem hideItem;
6172
- private MenuItem grabItem;
6386
+ private JMenuItem grabItem;
61736387 private MenuItem backItem;
61746388 private MenuItem frontItem;
61756389 private MenuItem cameraItem;
....@@ -6182,7 +6396,7 @@
61826396 private MenuItem switchTransfoItem;
61836397 private MenuItem morphItem;
61846398 private MenuItem linkerItem;
6185
- private MenuItem ungroupItem;
6399
+ private JMenuItem ungroupItem;
61866400 private MenuItem editItem;
61876401 private MenuItem openWindowItem;
61886402 private MenuItem editLeafItem;