Normand Briere
2019-08-15 33504fc9a180903aace77613264550754fba5706
GroupEditor.java
....@@ -31,7 +31,7 @@
3131 final String path = "cubemaps/" + f + "-skyboxes/" + s;
3232 row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.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
....@@ -73,7 +73,7 @@
7373 cGridBag row5 = new cGridBag();
7474 cGridBag row6 = new cGridBag();
7575
76
- AddSkyboxButton("default", "rgb", row0);
76
+ AddSkyboxButton("default", "", row0);
7777 //AddSkyboxButton("default", "cornell", row0);
7878 AddSkyboxButton("penguins", "dust", row0);
7979 AddSkyboxButton("penguins", "tropic", row0);
....@@ -330,10 +330,19 @@
330330
331331 public void ChangeSkybox(String skybox)
332332 {
333
- //cameraView.envyoff = false;
334
- group.skyboxname = skybox;
335
- group.skyboxext = "jpg";
336
- 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
+ }
337346 }
338347
339348 public void CreateSkyboxPanel(cGridBag skyboxPanel)
....@@ -357,6 +366,16 @@
357366 }
358367
359368 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();
360379 }
361380
362381 //ObjEditor objEditor;
....@@ -400,6 +419,8 @@
400419 {
401420 copy.versionlist = new Object3D[100];
402421 copy.versionindex = -1;
422
+
423
+ Save(true);
403424 }
404425
405426 if(ui)
....@@ -519,32 +540,37 @@
519540 // menu.add("-");
520541 duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate"));
521542 duplicateItem.addActionListener(this);
522
- cloneItem = menu.add(new MenuItem("Clone"));
543
+
544
+ cloneItem = oe.jTree.popup.add(new JMenuItem("Clone"));
523545 cloneItem.addActionListener(this);
524
- if (Globals.ADVANCED)
546
+ //if (Globals.ADVANCED)
525547 {
526548 cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
527549 cloneSupportItem.addActionListener(this);
528550 }
551
+ oe.jTree.popup.addSeparator();
529552 menu.add("-");
530
- cutItem = menu.add(new MenuItem("Cut"));
553
+ cutItem = oe.jTree.popup.add(new JMenuItem("Cut"));
531554 cutItem.addActionListener(this);
532
- copyItem = menu.add(new MenuItem("Copy"));
555
+ copyItem = oe.jTree.popup.add(new JMenuItem("Copy"));
533556 copyItem.addActionListener(this);
534557 pasteItem = menu.add(new MenuItem("Paste"));
535558 pasteItem.addActionListener(this);
536559
537
- menu.add("-");
538
- pasteIntoItem = menu.add(new MenuItem("Paste into"));
560
+ oe.jTree.popup.addSeparator();
561
+ //menu.add("-");
562
+ pasteIntoItem = oe.jTree.popup.add(new JMenuItem("Paste into"));
539563 pasteIntoItem.addActionListener(this);
540
- pasteLinkItem = menu.add(new MenuItem("Paste link"));
564
+ pasteLinkItem = oe.jTree.popup.add(new JMenuItem("Paste link"));
541565 pasteLinkItem.addActionListener(this);
542
- pasteCloneItem = menu.add(new MenuItem("Paste clone"));
566
+ pasteCloneItem = oe.jTree.popup.add(new JMenuItem("Paste clone"));
543567 pasteCloneItem.addActionListener(this);
544
-// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
568
+// CRASH pasteExpandItem = oe.jTree.popup.add(new JMenuItem("Paste expand"));
545569 // pasteExpandItem.addActionListener(this);
546
- menu.add("-");
547
- deleteItem = menu.add(new MenuItem("Delete"));
570
+ //menu.add("-");
571
+ oe.jTree.popup.addSeparator();
572
+
573
+ deleteItem = oe.jTree.popup.add(new JMenuItem("Delete"));
548574 deleteItem.addActionListener(this);
549575
550576 if (Globals.ADVANCED)
....@@ -631,11 +657,9 @@
631657 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
632658 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
633659 //cameraMenu.add(switchViewItem = new MenuItem("Reverse View"));
634
- editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
635660 oe.cameraMenu.add("-");
636661 openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
637662 openWindowItem.addActionListener(this);
638
- editLeafItem.addActionListener(this);
639663 lookAtItem.addActionListener(this);
640664 //lookFromItem.addActinoListener(this);
641665 //switchViewItem.addActionListener(this);
....@@ -697,7 +721,7 @@
697721 hideItem = menu.add(new MenuItem("Hidden Group"));
698722 hideItem.addActionListener(this);
699723 }
700
- ungroupItem = menu.add(new MenuItem("Ungroup"));
724
+ ungroupItem = oe.jTree.popup.add(new JMenuItem("Ungroup"));
701725 ungroupItem.addActionListener(this);
702726
703727 // menu.add("-");
....@@ -883,6 +907,9 @@
883907 shareGeometriesItem.addActionListener(this);
884908 mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
885909 mergeGeometriesItem.addActionListener(this);
910
+ menu.add("-");
911
+ editLeafItem = menu.add(new MenuItem("Edit leaf..."));
912
+ editLeafItem.addActionListener(this);
886913 if (Globals.ADVANCED)
887914 {
888915 // Pretty much the same as duplicate and clone.
....@@ -901,7 +928,7 @@
901928
902929 JTabbedPane resourcecontainer;
903930 cGridBag currenttab;
904
- boolean added; // patch for jar
931
+ //boolean added; // patch for jar
905932
906933 int tabcount = 0;
907934 int colcount = 0;
....@@ -918,12 +945,14 @@
918945 // System.out.println();
919946
920947 if (//rowcount == 0 ||
921
- path.length == 1)
948
+ path.length == 1 && !path[0].equals("") && !path[0].equals(".DS_Store"))
922949 {
923950 currenttab = new cGridBag();
924
- added = false;
925951 String tabname = path[0]; // String.valueOf((char)('A'+tabcount));
926952 currenttab.setName(tabname);
953
+ //added = false;
954
+ resourcecontainer.add(currenttab);
955
+ resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname);
927956 rowcount = 1;
928957 colcount = 0;
929958 texturecount = 0;
....@@ -931,12 +960,11 @@
931960
932961 if (path.length > 2 && path[2].toLowerCase().endsWith(".jpg"))
933962 {
934
- if (!added)
963
+ //if (!added)
935964 {
936
- added = true;
937
- resourcecontainer.add(currenttab);
965
+ //added = true;
938966 String tabname = path[0]; // String.valueOf((char)('A'+tabcount));
939
- resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname);
967
+ currenttab = (cGridBag)resourcecontainer.getComponentAt(resourcecontainer.indexOfTab(tabname));
940968 }
941969
942970 AddTextureButton(path[0], path[1], path[2], texturecount++, currenttab);
....@@ -984,11 +1012,6 @@
9841012 //new Exception().printStackTrace();
9851013
9861014 oe.radioPanel = new JPanel(new GridBagLayout());
987
- oe.aConstraints.weightx = 1;
988
- oe.aConstraints.weighty = 0;
989
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
990
- oe.aConstraints.gridwidth = 100;
991
- oe.aConstraints.gridheight = 1;
9921015 // oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
9931016
9941017 oe.buttonGroup = new ButtonGroup();
....@@ -1021,10 +1044,49 @@
10211044
10221045 if (Globals.ADVANCED)
10231046 {
1024
- oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1025
- maxButton.setToolTipText("Maximize window");
1026
- maxButton.addActionListener(this);
1047
+// oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1048
+// maxButton.setToolTipText("Maximize window");
1049
+// maxButton.addActionListener(this);
10271050 }
1051
+
1052
+ cButton gcButton;
1053
+
1054
+// oe.toolbarPanel.add(gcButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1055
+// gcButton.setToolTipText("Garbage collect");
1056
+// gcButton.addActionListener(new ActionListener()
1057
+// {
1058
+// public void actionPerformed(ActionEvent e)
1059
+// {
1060
+// System.gc();
1061
+// }
1062
+// });
1063
+
1064
+ oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1065
+ collapseButton.setToolTipText("Collapse toolbar");
1066
+ collapseButton.addActionListener(this);
1067
+
1068
+ oe.toolbarPanel.add(maximize3DButton = GetButton("", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1069
+ maximize3DButton.setToolTipText("Maximize 3D view");
1070
+ maximize3DButton.addActionListener(this);
1071
+
1072
+ oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1073
+ twoButton.setToolTipText("Show 3D view only");
1074
+ twoButton.addActionListener(this);
1075
+ this.fullscreenLayout = twoButton;
1076
+
1077
+ oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1078
+ threeButton.setToolTipText("Show controls and 3D view");
1079
+ threeButton.addActionListener(this);
1080
+ if (Globals.ADVANCED)
1081
+ {
1082
+ oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1083
+ sixButton.setToolTipText("Show 3D view and controls");
1084
+ sixButton.addActionListener(this);
1085
+ }
1086
+// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1087
+// sevenButton.setToolTipText("3-column layout");
1088
+// sevenButton.addActionListener(this);
1089
+ //
10281090
10291091 oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
10301092 fullButton.setToolTipText("Full-screen window");
....@@ -1069,14 +1131,14 @@
10691131 nextVersionButton.addActionListener(this);
10701132 nextVersionButton.setEnabled(false);
10711133
1072
- oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
1073
- liveCB.setToolTipText("Enable animation");
1074
- liveCB.addItemListener(this);
1075
-
10761134 oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
10771135 oneStepButton.setToolTipText("Animate one step forward");
10781136 oneStepButton.addActionListener(this);
10791137
1138
+ oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
1139
+ liveCB.setToolTipText("Enable animation");
1140
+ liveCB.addItemListener(this);
1141
+
10801142 oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
10811143 fastCB.setToolTipText("Fast mode");
10821144 fastCB.addItemListener(this);
....@@ -1103,21 +1165,6 @@
11031165
11041166 //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
11051167
1106
- oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1107
- twoButton.setToolTipText("Show 3D view only");
1108
- twoButton.addActionListener(this);
1109
- this.fullscreenLayout = twoButton;
1110
-
1111
- oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1112
- threeButton.setToolTipText("Show controls and 3D view");
1113
- threeButton.addActionListener(this);
1114
- oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1115
- sixButton.setToolTipText("Show 3D view and controls");
1116
- sixButton.addActionListener(this);
1117
-// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1118
-// sevenButton.setToolTipText("3-column layout");
1119
-// sevenButton.addActionListener(this);
1120
- //
11211168
11221169 oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
11231170 rootButton.setToolTipText("Open selection in new tab");
....@@ -1133,12 +1180,16 @@
11331180
11341181 // INSERT
11351182 row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1136
- gridButton.setToolTipText("Create grid");
1183
+ gridButton.setToolTipText("Create ground");
11371184 gridButton.addActionListener(this);
11381185
11391186 row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
11401187 boxButton.setToolTipText("Create box");
11411188 boxButton.addActionListener(this);
1189
+
1190
+ row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1191
+ superButton.setToolTipText("Create superellipsoid");
1192
+ superButton.addActionListener(this);
11421193
11431194 row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
11441195 sphereButton.setToolTipText("Create sphere");
....@@ -1151,10 +1202,6 @@
11511202 row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
11521203 torusButton.setToolTipText("Create torus");
11531204 torusButton.addActionListener(this);
1154
-
1155
- row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1156
- superButton.setToolTipText("Create superellipsoid");
1157
- superButton.addActionListener(this);
11581205
11591206 if (Globals.ADVANCED)
11601207 {
....@@ -1425,6 +1472,14 @@
14251472
14261473 void EditObject(Object3D obj)
14271474 {
1475
+ assert(obj instanceof Composite);
1476
+
1477
+// if (obj.versionlist == null)
1478
+// {
1479
+// obj.versionlist = new Object3D[100];
1480
+// obj.versionindex = -1;
1481
+// }
1482
+
14281483 cRadio radioButton = new cRadio(obj.name);
14291484
14301485 // June 2019. Patch to avoid bug with transparency.
....@@ -1815,7 +1870,12 @@
18151870 TreePath path;
18161871
18171872 public TransferableTreePath(TreePath tp) {
1818
- path = tp;
1873
+ Object[] objs = new Object[tp.getPathCount()];
1874
+ for (int i=0; i<objs.length; i++)
1875
+ {
1876
+ objs[i] = ((Object3D)tp.getPathComponent(i)).GetUUID();
1877
+ }
1878
+ path = new TreePath(objs);
18191879 }
18201880
18211881 public synchronized DataFlavor[] getTransferDataFlavors() {
....@@ -2105,7 +2165,11 @@
21052165 shadow.material = new cMaterial(obj.material);
21062166 shadow.material.diffuse = 0.0001f;
21072167 shadow.material.specular = 0.0001f;
2108
- //shadow.projectedVertices[1].x = 300;
2168
+ shadow.material.opacity = 0.75f;
2169
+
2170
+ AllocProjectedVertices(shadow);
2171
+
2172
+ shadow.projectedVertices[1].x = 300;
21092173
21102174 makeSomething(shadow);
21112175 }
....@@ -2626,27 +2690,35 @@
26262690 } else
26272691 if (source == loopItem || source == loopButton)
26282692 {
2693
+ if (!group.selection.isEmpty())
2694
+ {
26292695 Composite csg = new GroupLeaf();
26302696 csg.count = 5;
2631
- group(csg);
26322697 Composite child = new cGroup("Branch");
26332698 csg.addChild(child);
26342699 child.addChild(csg);
2700
+ group(csg);
2701
+ }
26352702 } else
26362703 if (source == doubleItem)
26372704 {
2705
+ if (!group.selection.isEmpty())
2706
+ {
26382707 Composite csg = new GroupLeaf("Fork");
26392708 csg.count = 5;
2640
- group(csg);
26412709 Composite child = new cGroup("Branch A");
26422710 csg.addChild(child);
26432711 child.addChild(csg);
26442712 child = new cGroup("Branch B");
26452713 csg.addChild(child);
26462714 child.addChild(csg);
2715
+ group(csg);
2716
+ }
26472717 } else
26482718 if (source == tripleItem)
26492719 {
2720
+ if (!group.selection.isEmpty())
2721
+ {
26502722 Composite csg = new GroupLeaf("Trident");
26512723 csg.count = 4;
26522724 group(csg);
....@@ -2659,6 +2731,7 @@
26592731 child = new cGroup();
26602732 csg.addChild(child);
26612733 child.addChild(csg);
2734
+ }
26622735 } else
26632736 if (source == computeAOItem)
26642737 {
....@@ -2708,6 +2781,18 @@
27082781 if (source == fullButton)
27092782 {
27102783 ToggleFullScreen();
2784
+ } else
2785
+ if (source == collapseButton)
2786
+ {
2787
+ this.expandedLayout = radio.layout;
2788
+ CollapseToolbar();
2789
+ } else
2790
+ if (source == maximize3DButton)
2791
+ {
2792
+ this.expandedLayout = radio.layout;
2793
+ radio.layout = twoButton;
2794
+ Show3DView();
2795
+ CollapseToolbar();
27112796 } else
27122797 if (source == previousVersionButton)
27132798 {
....@@ -3282,22 +3367,34 @@
32823367 } else
32833368 if (source == ungroupItem || source == ungroupButton)
32843369 {
3285
- boolean hasRoot = false;
3370
+ boolean canUngroup = true;
32863371
32873372 for (int i=0; i<group.selection.size(); i++)
32883373 {
3289
- if (group.selection.get(i) == group)
3374
+ Object3D selectedItem = group.selection.get(i);
3375
+
3376
+ if (selectedItem.Size() == 0)
32903377 {
3291
- hasRoot = true;
3378
+ // Cannot ungroup leaves
3379
+ canUngroup = false;
3380
+ break;
3381
+ }
3382
+
3383
+ if (selectedItem == group)
3384
+ {
3385
+ // Cannot ungroup root
3386
+ canUngroup = false;
32923387 break;
32933388 }
32943389 }
32953390
3296
- if (!hasRoot)
3391
+ if (canUngroup)
32973392 {
32983393 for (int i=0; i<group.selection.size(); i++)
32993394 {
3300
- Ungroup(group.selection.get(i));
3395
+ Object3D selectedItem = group.selection.get(i);
3396
+
3397
+ Ungroup(selectedItem);
33013398 }
33023399
33033400 ClearSelection(false);
....@@ -3660,38 +3757,7 @@
36603757 if (CameraPane.FULLSCREEN)
36613758 fullscreenLayout = radio.layout;
36623759
3663
- // bug
3664
- //gridPanel.setDividerLocation(1.0);
3665
- //bigPanel.setDividerLocation(0.0);
3666
-// bigThree.remove(scenePanel);
3667
-// bigThree.remove(centralPanel);
3668
-// bigThree.remove(XYZPanel);
3669
-// aWindowConstraints.gridx = 0;
3670
-// aWindowConstraints.gridy = 0;
3671
-// aWindowConstraints.gridwidth = 1;
3672
-// // aConstraints.gridheight = 3;
3673
-// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3674
-// aWindowConstraints.weightx = 0;
3675
-// aWindowConstraints.weighty = 1;
3676
-// //bigThree.add(jtp, aWindowConstraints);
3677
-// aWindowConstraints.weightx = 1;
3678
-// aWindowConstraints.gridwidth = 3;
3679
-// // aConstraints.gridheight = 3;
3680
-// aWindowConstraints.gridx = 1;
3681
-// aWindowConstraints.fill = GridBagConstraints.BOTH;
3682
-// bigThree.add(centralPanel, aWindowConstraints);
3683
-// aWindowConstraints.weightx = 0;
3684
-// aWindowConstraints.gridx = 4;
3685
-// aWindowConstraints.gridwidth = 1;
3686
-// // aConstraints.gridheight = 3;
3687
-// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3688
-// //bigThree.add(XYZPanel, aWindowConstraints);
3689
-// scenePanel.setVisible(false);
3690
-// centralPanel.setVisible(true);
3691
-// XYZPanel.setVisible(false);
3692
- bigThree.ClearUI();
3693
- bigThree.add(centralPanel);
3694
- bigThree.FlushUI();
3760
+ Show3DView();
36953761
36963762 cameraView.requestFocusInWindow();
36973763
....@@ -3877,6 +3943,7 @@
38773943 } else
38783944 if (source == rootButton)
38793945 {
3946
+ Replace();
38803947 Object3D obj;
38813948 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
38823949 {
....@@ -4013,8 +4080,6 @@
40134080
40144081 copy = group;
40154082
4016
- SetUndoStates();
4017
-
40184083 //Globals.theRenderer.object = group;
40194084 if(!useclient)
40204085 {
....@@ -4042,6 +4107,18 @@
40424107 */
40434108 radio.layout.doClick();
40444109
4110
+ assert(copy instanceof Composite);
4111
+
4112
+ if (copy.versionlist == null)
4113
+ {
4114
+ copy.versionlist = new Object3D[100];
4115
+ copy.versionindex = -1;
4116
+
4117
+ Save(true);
4118
+ }
4119
+
4120
+ SetVersionStates();
4121
+
40454122 ClearUnpinned();
40464123
40474124 //Grafreed.Assert(group != null);
....@@ -5276,6 +5353,20 @@
52765353 flashSelectionButton.setEnabled(enabled);
52775354
52785355 clearPanelButton.setEnabled(!listUI.isEmpty());
5356
+
5357
+ boolean allComposites = true;
5358
+
5359
+ if (group.selection != null)
5360
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
5361
+ {
5362
+ if (!(e.nextElement() instanceof Composite))
5363
+ {
5364
+ allComposites = false;
5365
+ break;
5366
+ }
5367
+ }
5368
+
5369
+ rootButton.setEnabled(allComposites);
52795370 }
52805371
52815372 void refreshContents(boolean cp)
....@@ -5290,7 +5381,7 @@
52905381 Object3D child = (Object3D) group.selection.get(i);
52915382
52925383 objEditor.AddInfo(child, this, true);
5293
- System.err.println("info : " + child.GetPath());
5384
+// System.err.println("info : " + child.GetPath());
52945385 }
52955386
52965387 objEditor.SetText(); // jan 2014
....@@ -6173,11 +6264,11 @@
61736264 private MenuItem lookAtItem;
61746265 private MenuItem lookFromItem;
61756266 private MenuItem switchViewItem;
6176
- private MenuItem cutItem;
6267
+ private JMenuItem cutItem;
61776268 private MenuItem undoItem;
61786269 private MenuItem redoItem;
61796270 private JMenuItem duplicateItem;
6180
- private MenuItem cloneItem;
6271
+ private JMenuItem cloneItem;
61816272 private MenuItem cloneSupportItem;
61826273 private MenuItem overwriteGeoItem;
61836274 private MenuItem overwriteMatItem;
....@@ -6198,13 +6289,13 @@
61986289 private MenuItem cloneGeometriesItem;
61996290 private MenuItem shareGeometriesItem;
62006291 private MenuItem mergeGeometriesItem;
6201
- private MenuItem copyItem;
6292
+ private JMenuItem copyItem;
62026293 private MenuItem pasteItem;
6203
- private MenuItem pasteIntoItem;
6204
- private MenuItem pasteLinkItem;
6205
- private MenuItem pasteCloneItem;
6206
- private MenuItem pasteExpandItem;
6207
- private MenuItem deleteItem;
6294
+ private JMenuItem pasteIntoItem;
6295
+ private JMenuItem pasteLinkItem;
6296
+ private JMenuItem pasteCloneItem;
6297
+ private JMenuItem pasteExpandItem;
6298
+ private JMenuItem deleteItem;
62086299 private MenuItem clearAllItem;
62096300 private MenuItem genUVItem;
62106301 private MenuItem genNormalsMESHItem;
....@@ -6272,7 +6363,7 @@
62726363 private MenuItem switchTransfoItem;
62736364 private MenuItem morphItem;
62746365 private MenuItem linkerItem;
6275
- private MenuItem ungroupItem;
6366
+ private JMenuItem ungroupItem;
62766367 private MenuItem editItem;
62776368 private MenuItem openWindowItem;
62786369 private MenuItem editLeafItem;