.. | .. |
---|
31 | 31 | final String path = "cubemaps/" + f + "-skyboxes/" + s; |
---|
32 | 32 | row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.NIMBUSLAF)); |
---|
33 | 33 | //row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF)); |
---|
34 | | - skyboxButton.setToolTipText(s); |
---|
| 34 | + skyboxButton.setToolTipText(s.equals("") ? "No background" : s); |
---|
35 | 35 | skyboxButton.addActionListener(new ActionListener() |
---|
36 | 36 | { |
---|
37 | 37 | @Override |
---|
.. | .. |
---|
73 | 73 | cGridBag row5 = new cGridBag(); |
---|
74 | 74 | cGridBag row6 = new cGridBag(); |
---|
75 | 75 | |
---|
76 | | - AddSkyboxButton("default", "rgb", row0); |
---|
| 76 | + AddSkyboxButton("default", "", row0); |
---|
77 | 77 | //AddSkyboxButton("default", "cornell", row0); |
---|
78 | 78 | AddSkyboxButton("penguins", "dust", row0); |
---|
79 | 79 | AddSkyboxButton("penguins", "tropic", row0); |
---|
.. | .. |
---|
330 | 330 | |
---|
331 | 331 | public void ChangeSkybox(String skybox) |
---|
332 | 332 | { |
---|
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 | + } |
---|
337 | 346 | } |
---|
338 | 347 | |
---|
339 | 348 | public void CreateSkyboxPanel(cGridBag skyboxPanel) |
---|
.. | .. |
---|
410 | 419 | { |
---|
411 | 420 | copy.versionlist = new Object3D[100]; |
---|
412 | 421 | copy.versionindex = -1; |
---|
| 422 | + |
---|
| 423 | + Save(true); |
---|
413 | 424 | } |
---|
414 | 425 | |
---|
415 | 426 | if(ui) |
---|
.. | .. |
---|
529 | 540 | // menu.add("-"); |
---|
530 | 541 | duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate")); |
---|
531 | 542 | duplicateItem.addActionListener(this); |
---|
532 | | - cloneItem = menu.add(new MenuItem("Clone")); |
---|
| 543 | + |
---|
| 544 | + cloneItem = oe.jTree.popup.add(new JMenuItem("Clone")); |
---|
533 | 545 | cloneItem.addActionListener(this); |
---|
534 | | - if (Globals.ADVANCED) |
---|
| 546 | + //if (Globals.ADVANCED) |
---|
535 | 547 | { |
---|
536 | 548 | cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
537 | 549 | cloneSupportItem.addActionListener(this); |
---|
538 | 550 | } |
---|
| 551 | + oe.jTree.popup.addSeparator(); |
---|
539 | 552 | menu.add("-"); |
---|
540 | | - cutItem = menu.add(new MenuItem("Cut")); |
---|
| 553 | + cutItem = oe.jTree.popup.add(new JMenuItem("Cut")); |
---|
541 | 554 | cutItem.addActionListener(this); |
---|
542 | | - copyItem = menu.add(new MenuItem("Copy")); |
---|
| 555 | + copyItem = oe.jTree.popup.add(new JMenuItem("Copy")); |
---|
543 | 556 | copyItem.addActionListener(this); |
---|
544 | 557 | pasteItem = menu.add(new MenuItem("Paste")); |
---|
545 | 558 | pasteItem.addActionListener(this); |
---|
546 | 559 | |
---|
547 | | - menu.add("-"); |
---|
548 | | - 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")); |
---|
549 | 563 | pasteIntoItem.addActionListener(this); |
---|
550 | | - pasteLinkItem = menu.add(new MenuItem("Paste link")); |
---|
| 564 | + pasteLinkItem = oe.jTree.popup.add(new JMenuItem("Paste link")); |
---|
551 | 565 | pasteLinkItem.addActionListener(this); |
---|
552 | | - pasteCloneItem = menu.add(new MenuItem("Paste clone")); |
---|
| 566 | + pasteCloneItem = oe.jTree.popup.add(new JMenuItem("Paste clone")); |
---|
553 | 567 | pasteCloneItem.addActionListener(this); |
---|
554 | | -// pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
| 568 | +// CRASH pasteExpandItem = oe.jTree.popup.add(new JMenuItem("Paste expand")); |
---|
555 | 569 | // pasteExpandItem.addActionListener(this); |
---|
556 | | - menu.add("-"); |
---|
557 | | - deleteItem = menu.add(new MenuItem("Delete")); |
---|
558 | | - deleteItem.addActionListener(this); |
---|
| 570 | + //menu.add("-"); |
---|
| 571 | + oe.jTree.popup.addSeparator(); |
---|
559 | 572 | |
---|
560 | 573 | if (Globals.ADVANCED) |
---|
561 | 574 | { |
---|
.. | .. |
---|
641 | 654 | oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
642 | 655 | //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
643 | 656 | //cameraMenu.add(switchViewItem = new MenuItem("Reverse View")); |
---|
644 | | - editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
645 | 657 | oe.cameraMenu.add("-"); |
---|
646 | 658 | openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
647 | 659 | openWindowItem.addActionListener(this); |
---|
648 | | - editLeafItem.addActionListener(this); |
---|
649 | 660 | lookAtItem.addActionListener(this); |
---|
650 | 661 | //lookFromItem.addActinoListener(this); |
---|
651 | 662 | //switchViewItem.addActionListener(this); |
---|
.. | .. |
---|
692 | 703 | setMasterItem.addActionListener(this); |
---|
693 | 704 | } |
---|
694 | 705 | |
---|
695 | | - oe.menuBar.add(menu = new Menu("Group")); |
---|
696 | | -// grabItem = menu.add(new MenuItem("Grab")); |
---|
697 | | -// grabItem.addActionListener(this); |
---|
| 706 | + oe.menuBar.add(menu = new Menu("Order")); |
---|
| 707 | + |
---|
698 | 708 | backItem = menu.add(new MenuItem("Back")); |
---|
699 | 709 | backItem.addActionListener(this); |
---|
700 | 710 | frontItem = menu.add(new MenuItem("Front")); |
---|
.. | .. |
---|
702 | 712 | // compositeItem = menu.add(new MenuItem("Composite")); |
---|
703 | 713 | // compositeItem.addActionListener(this); |
---|
704 | 714 | |
---|
| 715 | + grabItem = oe.jTree.popup.add(new JMenuItem("Group")); |
---|
| 716 | + grabItem.addActionListener(this); |
---|
| 717 | + |
---|
705 | 718 | if (Globals.ADVANCED) |
---|
706 | 719 | { |
---|
707 | 720 | hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
708 | 721 | hideItem.addActionListener(this); |
---|
709 | 722 | } |
---|
710 | | - ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
| 723 | + ungroupItem = oe.jTree.popup.add(new JMenuItem("Ungroup")); |
---|
711 | 724 | ungroupItem.addActionListener(this); |
---|
| 725 | + |
---|
| 726 | + oe.jTree.popup.addSeparator(); |
---|
| 727 | + |
---|
| 728 | + deleteItem = oe.jTree.popup.add(new JMenuItem("Delete")); |
---|
| 729 | + deleteItem.addActionListener(this); |
---|
712 | 730 | |
---|
713 | 731 | // menu.add("-"); |
---|
714 | 732 | // |
---|
.. | .. |
---|
893 | 911 | shareGeometriesItem.addActionListener(this); |
---|
894 | 912 | mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries")); |
---|
895 | 913 | mergeGeometriesItem.addActionListener(this); |
---|
| 914 | + menu.add("-"); |
---|
| 915 | + editLeafItem = menu.add(new MenuItem("Edit leaf...")); |
---|
| 916 | + editLeafItem.addActionListener(this); |
---|
896 | 917 | if (Globals.ADVANCED) |
---|
897 | 918 | { |
---|
898 | 919 | // Pretty much the same as duplicate and clone. |
---|
.. | .. |
---|
911 | 932 | |
---|
912 | 933 | JTabbedPane resourcecontainer; |
---|
913 | 934 | cGridBag currenttab; |
---|
914 | | - boolean added; // patch for jar |
---|
| 935 | + //boolean added; // patch for jar |
---|
915 | 936 | |
---|
916 | 937 | int tabcount = 0; |
---|
917 | 938 | int colcount = 0; |
---|
.. | .. |
---|
928 | 949 | // System.out.println(); |
---|
929 | 950 | |
---|
930 | 951 | if (//rowcount == 0 || |
---|
931 | | - path.length == 1) |
---|
| 952 | + path.length == 1 && !path[0].equals("") && !path[0].equals(".DS_Store")) |
---|
932 | 953 | { |
---|
933 | 954 | currenttab = new cGridBag(); |
---|
934 | | - added = false; |
---|
935 | 955 | String tabname = path[0]; // String.valueOf((char)('A'+tabcount)); |
---|
936 | 956 | currenttab.setName(tabname); |
---|
| 957 | + //added = false; |
---|
| 958 | + resourcecontainer.add(currenttab); |
---|
| 959 | + resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname); |
---|
937 | 960 | rowcount = 1; |
---|
938 | 961 | colcount = 0; |
---|
939 | 962 | texturecount = 0; |
---|
.. | .. |
---|
941 | 964 | |
---|
942 | 965 | if (path.length > 2 && path[2].toLowerCase().endsWith(".jpg")) |
---|
943 | 966 | { |
---|
944 | | - if (!added) |
---|
| 967 | + //if (!added) |
---|
945 | 968 | { |
---|
946 | | - added = true; |
---|
947 | | - resourcecontainer.add(currenttab); |
---|
| 969 | + //added = true; |
---|
948 | 970 | String tabname = path[0]; // String.valueOf((char)('A'+tabcount)); |
---|
949 | | - resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname); |
---|
| 971 | + currenttab = (cGridBag)resourcecontainer.getComponentAt(resourcecontainer.indexOfTab(tabname)); |
---|
950 | 972 | } |
---|
951 | 973 | |
---|
952 | 974 | AddTextureButton(path[0], path[1], path[2], texturecount++, currenttab); |
---|
.. | .. |
---|
1026 | 1048 | |
---|
1027 | 1049 | if (Globals.ADVANCED) |
---|
1028 | 1050 | { |
---|
1029 | | - oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1030 | | - maxButton.setToolTipText("Maximize window"); |
---|
1031 | | - maxButton.addActionListener(this); |
---|
| 1051 | +// oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1052 | +// maxButton.setToolTipText("Maximize window"); |
---|
| 1053 | +// maxButton.addActionListener(this); |
---|
1032 | 1054 | } |
---|
1033 | 1055 | |
---|
1034 | 1056 | cButton gcButton; |
---|
1035 | 1057 | |
---|
1036 | | - oe.toolbarPanel.add(gcButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1037 | | - gcButton.setToolTipText("Garbage collect"); |
---|
1038 | | - gcButton.addActionListener(new ActionListener() |
---|
1039 | | - { |
---|
1040 | | - public void actionPerformed(ActionEvent e) |
---|
1041 | | - { |
---|
1042 | | - System.gc(); |
---|
1043 | | - } |
---|
1044 | | - }); |
---|
| 1058 | +// oe.toolbarPanel.add(gcButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1059 | +// gcButton.setToolTipText("Garbage collect"); |
---|
| 1060 | +// gcButton.addActionListener(new ActionListener() |
---|
| 1061 | +// { |
---|
| 1062 | +// public void actionPerformed(ActionEvent e) |
---|
| 1063 | +// { |
---|
| 1064 | +// System.gc(); |
---|
| 1065 | +// } |
---|
| 1066 | +// }); |
---|
1045 | 1067 | |
---|
1046 | 1068 | oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1047 | 1069 | collapseButton.setToolTipText("Collapse toolbar"); |
---|
1048 | 1070 | collapseButton.addActionListener(this); |
---|
1049 | 1071 | |
---|
1050 | | - oe.toolbarPanel.add(maximize3DButton = GetButton("", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1072 | + oe.toolbarPanel.add(maximize3DButton = GetButton("icons/empty.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1051 | 1073 | maximize3DButton.setToolTipText("Maximize 3D view"); |
---|
1052 | 1074 | maximize3DButton.addActionListener(this); |
---|
1053 | 1075 | |
---|
.. | .. |
---|
1162 | 1184 | |
---|
1163 | 1185 | // INSERT |
---|
1164 | 1186 | row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1165 | | - gridButton.setToolTipText("Create grid"); |
---|
| 1187 | + gridButton.setToolTipText("Create ground"); |
---|
1166 | 1188 | gridButton.addActionListener(this); |
---|
1167 | 1189 | |
---|
1168 | 1190 | row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1169 | 1191 | boxButton.setToolTipText("Create box"); |
---|
1170 | 1192 | boxButton.addActionListener(this); |
---|
| 1193 | + |
---|
| 1194 | + row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1195 | + superButton.setToolTipText("Create superellipsoid"); |
---|
| 1196 | + superButton.addActionListener(this); |
---|
1171 | 1197 | |
---|
1172 | 1198 | row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1173 | 1199 | sphereButton.setToolTipText("Create sphere"); |
---|
.. | .. |
---|
1180 | 1206 | row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1181 | 1207 | torusButton.setToolTipText("Create torus"); |
---|
1182 | 1208 | torusButton.addActionListener(this); |
---|
1183 | | - |
---|
1184 | | - row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1185 | | - superButton.setToolTipText("Create superellipsoid"); |
---|
1186 | | - superButton.addActionListener(this); |
---|
1187 | 1209 | |
---|
1188 | 1210 | if (Globals.ADVANCED) |
---|
1189 | 1211 | { |
---|
.. | .. |
---|
1454 | 1476 | |
---|
1455 | 1477 | void EditObject(Object3D obj) |
---|
1456 | 1478 | { |
---|
| 1479 | + assert(obj instanceof Composite); |
---|
| 1480 | + |
---|
| 1481 | +// if (obj.versionlist == null) |
---|
| 1482 | +// { |
---|
| 1483 | +// obj.versionlist = new Object3D[100]; |
---|
| 1484 | +// obj.versionindex = -1; |
---|
| 1485 | +// } |
---|
| 1486 | + |
---|
1457 | 1487 | cRadio radioButton = new cRadio(obj.name); |
---|
1458 | 1488 | |
---|
1459 | 1489 | // June 2019. Patch to avoid bug with transparency. |
---|
.. | .. |
---|
1478 | 1508 | |
---|
1479 | 1509 | oe.SetupViews(); |
---|
1480 | 1510 | |
---|
| 1511 | + if (Globals.DEBUG) |
---|
1481 | 1512 | System.out.println("SetupViews"); |
---|
1482 | 1513 | DragSource.getDefaultDragSource().createDefaultDragGestureRecognizer( |
---|
1483 | 1514 | oe.cameraView, DnDConstants.ACTION_COPY_OR_MOVE, this); // ACTION_LINK ?? |
---|
.. | .. |
---|
2139 | 2170 | shadow.material = new cMaterial(obj.material); |
---|
2140 | 2171 | shadow.material.diffuse = 0.0001f; |
---|
2141 | 2172 | shadow.material.specular = 0.0001f; |
---|
2142 | | - //shadow.projectedVertices[1].x = 300; |
---|
| 2173 | + shadow.material.opacity = 0.75f; |
---|
| 2174 | + |
---|
| 2175 | + AllocProjectedVertices(shadow); |
---|
| 2176 | + |
---|
| 2177 | + shadow.projectedVertices[1].x = 300; |
---|
2143 | 2178 | |
---|
2144 | 2179 | makeSomething(shadow); |
---|
2145 | 2180 | } |
---|
.. | .. |
---|
2660 | 2695 | } else |
---|
2661 | 2696 | if (source == loopItem || source == loopButton) |
---|
2662 | 2697 | { |
---|
| 2698 | + if (!group.selection.isEmpty()) |
---|
| 2699 | + { |
---|
2663 | 2700 | Composite csg = new GroupLeaf(); |
---|
2664 | 2701 | csg.count = 5; |
---|
2665 | | - group(csg); |
---|
2666 | 2702 | Composite child = new cGroup("Branch"); |
---|
2667 | 2703 | csg.addChild(child); |
---|
2668 | 2704 | child.addChild(csg); |
---|
| 2705 | + group(csg); |
---|
| 2706 | + } |
---|
2669 | 2707 | } else |
---|
2670 | 2708 | if (source == doubleItem) |
---|
2671 | 2709 | { |
---|
| 2710 | + if (!group.selection.isEmpty()) |
---|
| 2711 | + { |
---|
2672 | 2712 | Composite csg = new GroupLeaf("Fork"); |
---|
2673 | 2713 | csg.count = 5; |
---|
2674 | | - group(csg); |
---|
2675 | 2714 | Composite child = new cGroup("Branch A"); |
---|
2676 | 2715 | csg.addChild(child); |
---|
2677 | 2716 | child.addChild(csg); |
---|
2678 | 2717 | child = new cGroup("Branch B"); |
---|
2679 | 2718 | csg.addChild(child); |
---|
2680 | 2719 | child.addChild(csg); |
---|
| 2720 | + group(csg); |
---|
| 2721 | + } |
---|
2681 | 2722 | } else |
---|
2682 | 2723 | if (source == tripleItem) |
---|
2683 | 2724 | { |
---|
| 2725 | + if (!group.selection.isEmpty()) |
---|
| 2726 | + { |
---|
2684 | 2727 | Composite csg = new GroupLeaf("Trident"); |
---|
2685 | 2728 | csg.count = 4; |
---|
2686 | 2729 | group(csg); |
---|
.. | .. |
---|
2693 | 2736 | child = new cGroup(); |
---|
2694 | 2737 | csg.addChild(child); |
---|
2695 | 2738 | child.addChild(csg); |
---|
| 2739 | + } |
---|
2696 | 2740 | } else |
---|
2697 | 2741 | if (source == computeAOItem) |
---|
2698 | 2742 | { |
---|
.. | .. |
---|
3328 | 3372 | } else |
---|
3329 | 3373 | if (source == ungroupItem || source == ungroupButton) |
---|
3330 | 3374 | { |
---|
3331 | | - boolean hasRoot = false; |
---|
| 3375 | + boolean canUngroup = true; |
---|
3332 | 3376 | |
---|
3333 | 3377 | for (int i=0; i<group.selection.size(); i++) |
---|
3334 | 3378 | { |
---|
3335 | | - if (group.selection.get(i) == group) |
---|
| 3379 | + Object3D selectedItem = group.selection.get(i); |
---|
| 3380 | + |
---|
| 3381 | + if (selectedItem.Size() == 0) |
---|
3336 | 3382 | { |
---|
3337 | | - hasRoot = true; |
---|
| 3383 | + // Cannot ungroup leaves |
---|
| 3384 | + canUngroup = false; |
---|
| 3385 | + break; |
---|
| 3386 | + } |
---|
| 3387 | + |
---|
| 3388 | + if (selectedItem == group) |
---|
| 3389 | + { |
---|
| 3390 | + // Cannot ungroup root |
---|
| 3391 | + canUngroup = false; |
---|
3338 | 3392 | break; |
---|
3339 | 3393 | } |
---|
3340 | 3394 | } |
---|
3341 | 3395 | |
---|
3342 | | - if (!hasRoot) |
---|
| 3396 | + if (canUngroup) |
---|
3343 | 3397 | { |
---|
3344 | 3398 | for (int i=0; i<group.selection.size(); i++) |
---|
3345 | 3399 | { |
---|
3346 | | - Ungroup(group.selection.get(i)); |
---|
| 3400 | + Object3D selectedItem = group.selection.get(i); |
---|
| 3401 | + |
---|
| 3402 | + Ungroup(selectedItem); |
---|
3347 | 3403 | } |
---|
3348 | 3404 | |
---|
3349 | 3405 | ClearSelection(false); |
---|
.. | .. |
---|
3892 | 3948 | } else |
---|
3893 | 3949 | if (source == rootButton) |
---|
3894 | 3950 | { |
---|
| 3951 | + Replace(); |
---|
3895 | 3952 | Object3D obj; |
---|
3896 | 3953 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
3897 | 3954 | { |
---|
.. | .. |
---|
4028 | 4085 | |
---|
4029 | 4086 | copy = group; |
---|
4030 | 4087 | |
---|
4031 | | - SetUndoStates(); |
---|
4032 | | - |
---|
4033 | 4088 | //Globals.theRenderer.object = group; |
---|
4034 | 4089 | if(!useclient) |
---|
4035 | 4090 | { |
---|
.. | .. |
---|
4057 | 4112 | */ |
---|
4058 | 4113 | radio.layout.doClick(); |
---|
4059 | 4114 | |
---|
| 4115 | + assert(copy instanceof Composite); |
---|
| 4116 | + |
---|
| 4117 | + if (copy.versionlist == null) |
---|
| 4118 | + { |
---|
| 4119 | + copy.versionlist = new Object3D[100]; |
---|
| 4120 | + copy.versionindex = -1; |
---|
| 4121 | + |
---|
| 4122 | + // Cannot work with loops |
---|
| 4123 | + // To fix this issue, first mark all nodes above the root, |
---|
| 4124 | + // and check if any of these nodes are reachable below the root. |
---|
| 4125 | + //Save(true); |
---|
| 4126 | + } |
---|
| 4127 | + |
---|
| 4128 | + SetVersionStates(); |
---|
| 4129 | + |
---|
4060 | 4130 | ClearUnpinned(); |
---|
4061 | 4131 | |
---|
4062 | 4132 | //Grafreed.Assert(group != null); |
---|
.. | .. |
---|
5291 | 5361 | flashSelectionButton.setEnabled(enabled); |
---|
5292 | 5362 | |
---|
5293 | 5363 | clearPanelButton.setEnabled(!listUI.isEmpty()); |
---|
| 5364 | + |
---|
| 5365 | + boolean allComposites = true; |
---|
| 5366 | + |
---|
| 5367 | + if (group.selection != null) |
---|
| 5368 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 5369 | + { |
---|
| 5370 | + Object next = e.nextElement(); |
---|
| 5371 | + if (!(next instanceof Composite)) // || (next instanceof GroupLeaf)) |
---|
| 5372 | + { |
---|
| 5373 | + allComposites = false; |
---|
| 5374 | + break; |
---|
| 5375 | + } |
---|
| 5376 | + } |
---|
| 5377 | + |
---|
| 5378 | + rootButton.setEnabled(allComposites); |
---|
5294 | 5379 | } |
---|
5295 | 5380 | |
---|
5296 | 5381 | void refreshContents(boolean cp) |
---|
.. | .. |
---|
6188 | 6273 | private MenuItem lookAtItem; |
---|
6189 | 6274 | private MenuItem lookFromItem; |
---|
6190 | 6275 | private MenuItem switchViewItem; |
---|
6191 | | - private MenuItem cutItem; |
---|
| 6276 | + private JMenuItem cutItem; |
---|
6192 | 6277 | private MenuItem undoItem; |
---|
6193 | 6278 | private MenuItem redoItem; |
---|
6194 | 6279 | private JMenuItem duplicateItem; |
---|
6195 | | - private MenuItem cloneItem; |
---|
| 6280 | + private JMenuItem cloneItem; |
---|
6196 | 6281 | private MenuItem cloneSupportItem; |
---|
6197 | 6282 | private MenuItem overwriteGeoItem; |
---|
6198 | 6283 | private MenuItem overwriteMatItem; |
---|
.. | .. |
---|
6213 | 6298 | private MenuItem cloneGeometriesItem; |
---|
6214 | 6299 | private MenuItem shareGeometriesItem; |
---|
6215 | 6300 | private MenuItem mergeGeometriesItem; |
---|
6216 | | - private MenuItem copyItem; |
---|
| 6301 | + private JMenuItem copyItem; |
---|
6217 | 6302 | private MenuItem pasteItem; |
---|
6218 | | - private MenuItem pasteIntoItem; |
---|
6219 | | - private MenuItem pasteLinkItem; |
---|
6220 | | - private MenuItem pasteCloneItem; |
---|
6221 | | - private MenuItem pasteExpandItem; |
---|
6222 | | - private MenuItem deleteItem; |
---|
| 6303 | + private JMenuItem pasteIntoItem; |
---|
| 6304 | + private JMenuItem pasteLinkItem; |
---|
| 6305 | + private JMenuItem pasteCloneItem; |
---|
| 6306 | + private JMenuItem pasteExpandItem; |
---|
| 6307 | + private JMenuItem deleteItem; |
---|
6223 | 6308 | private MenuItem clearAllItem; |
---|
6224 | 6309 | private MenuItem genUVItem; |
---|
6225 | 6310 | private MenuItem genNormalsMESHItem; |
---|
.. | .. |
---|
6274 | 6359 | private MenuItem transformGeometryItem; |
---|
6275 | 6360 | private MenuItem transformChildrenItem; |
---|
6276 | 6361 | private MenuItem hideItem; |
---|
6277 | | - private MenuItem grabItem; |
---|
| 6362 | + private JMenuItem grabItem; |
---|
6278 | 6363 | private MenuItem backItem; |
---|
6279 | 6364 | private MenuItem frontItem; |
---|
6280 | 6365 | private MenuItem cameraItem; |
---|
.. | .. |
---|
6287 | 6372 | private MenuItem switchTransfoItem; |
---|
6288 | 6373 | private MenuItem morphItem; |
---|
6289 | 6374 | private MenuItem linkerItem; |
---|
6290 | | - private MenuItem ungroupItem; |
---|
| 6375 | + private JMenuItem ungroupItem; |
---|
6291 | 6376 | private MenuItem editItem; |
---|
6292 | 6377 | private MenuItem openWindowItem; |
---|
6293 | 6378 | private MenuItem editLeafItem; |
---|