.. | .. |
---|
570 | 570 | //menu.add("-"); |
---|
571 | 571 | oe.jTree.popup.addSeparator(); |
---|
572 | 572 | |
---|
573 | | - deleteItem = oe.jTree.popup.add(new JMenuItem("Delete")); |
---|
574 | | - deleteItem.addActionListener(this); |
---|
575 | | - |
---|
576 | 573 | if (Globals.ADVANCED) |
---|
577 | 574 | { |
---|
578 | 575 | // Deletes the cameras... |
---|
.. | .. |
---|
706 | 703 | setMasterItem.addActionListener(this); |
---|
707 | 704 | } |
---|
708 | 705 | |
---|
709 | | - oe.menuBar.add(menu = new Menu("Group")); |
---|
710 | | -// grabItem = menu.add(new MenuItem("Grab")); |
---|
711 | | -// grabItem.addActionListener(this); |
---|
| 706 | + oe.menuBar.add(menu = new Menu("Order")); |
---|
| 707 | + |
---|
712 | 708 | backItem = menu.add(new MenuItem("Back")); |
---|
713 | 709 | backItem.addActionListener(this); |
---|
714 | 710 | frontItem = menu.add(new MenuItem("Front")); |
---|
715 | 711 | frontItem.addActionListener(this); |
---|
716 | 712 | // compositeItem = menu.add(new MenuItem("Composite")); |
---|
717 | 713 | // compositeItem.addActionListener(this); |
---|
| 714 | + |
---|
| 715 | + grabItem = oe.jTree.popup.add(new JMenuItem("Group")); |
---|
| 716 | + grabItem.addActionListener(this); |
---|
718 | 717 | |
---|
719 | 718 | if (Globals.ADVANCED) |
---|
720 | 719 | { |
---|
.. | .. |
---|
723 | 722 | } |
---|
724 | 723 | ungroupItem = oe.jTree.popup.add(new JMenuItem("Ungroup")); |
---|
725 | 724 | ungroupItem.addActionListener(this); |
---|
| 725 | + |
---|
| 726 | + oe.jTree.popup.addSeparator(); |
---|
| 727 | + |
---|
| 728 | + deleteItem = oe.jTree.popup.add(new JMenuItem("Delete")); |
---|
| 729 | + deleteItem.addActionListener(this); |
---|
726 | 730 | |
---|
727 | 731 | // menu.add("-"); |
---|
728 | 732 | // |
---|
.. | .. |
---|
928 | 932 | |
---|
929 | 933 | JTabbedPane resourcecontainer; |
---|
930 | 934 | cGridBag currenttab; |
---|
931 | | - boolean added; // patch for jar |
---|
| 935 | + //boolean added; // patch for jar |
---|
932 | 936 | |
---|
933 | 937 | int tabcount = 0; |
---|
934 | 938 | int colcount = 0; |
---|
.. | .. |
---|
940 | 944 | |
---|
941 | 945 | public void ResourceCallBack(String[] path) |
---|
942 | 946 | { |
---|
943 | | - for (int i = 0; i < path.length; i++) |
---|
944 | | - System.out.print(path[i] + "/"); |
---|
945 | | - System.out.println(); |
---|
| 947 | +// for (int i = 0; i < path.length; i++) |
---|
| 948 | +// System.out.print(path[i] + "/"); |
---|
| 949 | +// System.out.println(); |
---|
946 | 950 | |
---|
947 | 951 | if (//rowcount == 0 || |
---|
948 | | - path.length == 1) |
---|
| 952 | + path.length == 1 && !path[0].equals("") && !path[0].equals(".DS_Store")) |
---|
949 | 953 | { |
---|
950 | 954 | currenttab = new cGridBag(); |
---|
951 | | - added = false; |
---|
952 | 955 | String tabname = path[0]; // String.valueOf((char)('A'+tabcount)); |
---|
953 | 956 | currenttab.setName(tabname); |
---|
| 957 | + //added = false; |
---|
| 958 | + resourcecontainer.add(currenttab); |
---|
| 959 | + resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname); |
---|
954 | 960 | rowcount = 1; |
---|
955 | 961 | colcount = 0; |
---|
956 | 962 | texturecount = 0; |
---|
.. | .. |
---|
958 | 964 | |
---|
959 | 965 | if (path.length > 2 && path[2].toLowerCase().endsWith(".jpg")) |
---|
960 | 966 | { |
---|
961 | | - if (!added) |
---|
| 967 | + //if (!added) |
---|
962 | 968 | { |
---|
963 | | - added = true; |
---|
964 | | - resourcecontainer.add(currenttab); |
---|
| 969 | + //added = true; |
---|
965 | 970 | String tabname = path[0]; // String.valueOf((char)('A'+tabcount)); |
---|
966 | | - resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname); |
---|
| 971 | + currenttab = (cGridBag)resourcecontainer.getComponentAt(resourcecontainer.indexOfTab(tabname)); |
---|
967 | 972 | } |
---|
968 | 973 | |
---|
969 | 974 | AddTextureButton(path[0], path[1], path[2], texturecount++, currenttab); |
---|
.. | .. |
---|
1064 | 1069 | collapseButton.setToolTipText("Collapse toolbar"); |
---|
1065 | 1070 | collapseButton.addActionListener(this); |
---|
1066 | 1071 | |
---|
1067 | | - oe.toolbarPanel.add(maximize3DButton = GetButton("", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1072 | + oe.toolbarPanel.add(maximize3DButton = GetButton("icons/empty.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1068 | 1073 | maximize3DButton.setToolTipText("Maximize 3D view"); |
---|
1069 | 1074 | maximize3DButton.addActionListener(this); |
---|
1070 | 1075 | |
---|
.. | .. |
---|
1186 | 1191 | boxButton.setToolTipText("Create box"); |
---|
1187 | 1192 | boxButton.addActionListener(this); |
---|
1188 | 1193 | |
---|
| 1194 | + row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1195 | + superButton.setToolTipText("Create superellipsoid"); |
---|
| 1196 | + superButton.addActionListener(this); |
---|
| 1197 | + |
---|
1189 | 1198 | row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1190 | 1199 | sphereButton.setToolTipText("Create sphere"); |
---|
1191 | 1200 | sphereButton.addActionListener(this); |
---|
.. | .. |
---|
1197 | 1206 | row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1198 | 1207 | torusButton.setToolTipText("Create torus"); |
---|
1199 | 1208 | torusButton.addActionListener(this); |
---|
1200 | | - |
---|
1201 | | - row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1202 | | - superButton.setToolTipText("Create superellipsoid"); |
---|
1203 | | - superButton.addActionListener(this); |
---|
1204 | 1209 | |
---|
1205 | 1210 | if (Globals.ADVANCED) |
---|
1206 | 1211 | { |
---|
.. | .. |
---|
1503 | 1508 | |
---|
1504 | 1509 | oe.SetupViews(); |
---|
1505 | 1510 | |
---|
| 1511 | + if (Globals.DEBUG) |
---|
1506 | 1512 | System.out.println("SetupViews"); |
---|
1507 | 1513 | DragSource.getDefaultDragSource().createDefaultDragGestureRecognizer( |
---|
1508 | 1514 | oe.cameraView, DnDConstants.ACTION_COPY_OR_MOVE, this); // ACTION_LINK ?? |
---|
.. | .. |
---|
2164 | 2170 | shadow.material = new cMaterial(obj.material); |
---|
2165 | 2171 | shadow.material.diffuse = 0.0001f; |
---|
2166 | 2172 | shadow.material.specular = 0.0001f; |
---|
2167 | | - //shadow.projectedVertices[1].x = 300; |
---|
| 2173 | + shadow.material.opacity = 0.75f; |
---|
| 2174 | + |
---|
| 2175 | + AllocProjectedVertices(shadow); |
---|
| 2176 | + |
---|
| 2177 | + shadow.projectedVertices[1].x = 300; |
---|
2168 | 2178 | |
---|
2169 | 2179 | makeSomething(shadow); |
---|
2170 | 2180 | } |
---|
.. | .. |
---|
4109 | 4119 | copy.versionlist = new Object3D[100]; |
---|
4110 | 4120 | copy.versionindex = -1; |
---|
4111 | 4121 | |
---|
4112 | | - Save(true); |
---|
| 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); |
---|
4113 | 4126 | } |
---|
4114 | 4127 | |
---|
4115 | 4128 | SetVersionStates(); |
---|
.. | .. |
---|
5354 | 5367 | if (group.selection != null) |
---|
5355 | 5368 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
5356 | 5369 | { |
---|
5357 | | - if (!(e.nextElement() instanceof Composite)) |
---|
| 5370 | + Object next = e.nextElement(); |
---|
| 5371 | + if (!(next instanceof Composite)) // || (next instanceof GroupLeaf)) |
---|
5358 | 5372 | { |
---|
5359 | 5373 | allComposites = false; |
---|
5360 | 5374 | break; |
---|
.. | .. |
---|
6345 | 6359 | private MenuItem transformGeometryItem; |
---|
6346 | 6360 | private MenuItem transformChildrenItem; |
---|
6347 | 6361 | private MenuItem hideItem; |
---|
6348 | | - private MenuItem grabItem; |
---|
| 6362 | + private JMenuItem grabItem; |
---|
6349 | 6363 | private MenuItem backItem; |
---|
6350 | 6364 | private MenuItem frontItem; |
---|
6351 | 6365 | private MenuItem cameraItem; |
---|