.. | .. |
---|
415 | 415 | this.copy = this.group = group; |
---|
416 | 416 | //selectees = this.group.selectees; |
---|
417 | 417 | |
---|
| 418 | + assert(false); |
---|
| 419 | + |
---|
418 | 420 | if (copy.versionlist == null) |
---|
419 | 421 | { |
---|
420 | 422 | copy.versionlist = new Object3D[100]; |
---|
421 | 423 | copy.versionindex = -1; |
---|
422 | 424 | |
---|
423 | | - Save(true); |
---|
| 425 | + //Save(true); |
---|
424 | 426 | } |
---|
425 | 427 | |
---|
426 | 428 | if(ui) |
---|
.. | .. |
---|
449 | 451 | copy.versionlist = new Object3D[100]; |
---|
450 | 452 | copy.versionindex = -1; |
---|
451 | 453 | |
---|
452 | | - Save(true); |
---|
| 454 | + //Save(true); |
---|
453 | 455 | } |
---|
454 | 456 | } |
---|
455 | 457 | |
---|
.. | .. |
---|
569 | 571 | // pasteExpandItem.addActionListener(this); |
---|
570 | 572 | //menu.add("-"); |
---|
571 | 573 | oe.jTree.popup.addSeparator(); |
---|
572 | | - |
---|
573 | | - deleteItem = oe.jTree.popup.add(new JMenuItem("Delete")); |
---|
574 | | - deleteItem.addActionListener(this); |
---|
575 | 574 | |
---|
576 | 575 | if (Globals.ADVANCED) |
---|
577 | 576 | { |
---|
.. | .. |
---|
706 | 705 | setMasterItem.addActionListener(this); |
---|
707 | 706 | } |
---|
708 | 707 | |
---|
709 | | - oe.menuBar.add(menu = new Menu("Group")); |
---|
710 | | -// grabItem = menu.add(new MenuItem("Grab")); |
---|
711 | | -// grabItem.addActionListener(this); |
---|
| 708 | + oe.menuBar.add(menu = new Menu("Order")); |
---|
| 709 | + |
---|
712 | 710 | backItem = menu.add(new MenuItem("Back")); |
---|
713 | 711 | backItem.addActionListener(this); |
---|
714 | 712 | frontItem = menu.add(new MenuItem("Front")); |
---|
715 | 713 | frontItem.addActionListener(this); |
---|
716 | 714 | // compositeItem = menu.add(new MenuItem("Composite")); |
---|
717 | 715 | // compositeItem.addActionListener(this); |
---|
| 716 | + |
---|
| 717 | + grabItem = oe.jTree.popup.add(new JMenuItem("Group")); |
---|
| 718 | + grabItem.addActionListener(this); |
---|
718 | 719 | |
---|
719 | 720 | if (Globals.ADVANCED) |
---|
720 | 721 | { |
---|
.. | .. |
---|
723 | 724 | } |
---|
724 | 725 | ungroupItem = oe.jTree.popup.add(new JMenuItem("Ungroup")); |
---|
725 | 726 | ungroupItem.addActionListener(this); |
---|
| 727 | + |
---|
| 728 | + oe.jTree.popup.addSeparator(); |
---|
| 729 | + |
---|
| 730 | + deleteItem = oe.jTree.popup.add(new JMenuItem("Delete")); |
---|
| 731 | + deleteItem.addActionListener(this); |
---|
726 | 732 | |
---|
727 | 733 | // menu.add("-"); |
---|
728 | 734 | // |
---|
.. | .. |
---|
1065 | 1071 | collapseButton.setToolTipText("Collapse toolbar"); |
---|
1066 | 1072 | collapseButton.addActionListener(this); |
---|
1067 | 1073 | |
---|
1068 | | - oe.toolbarPanel.add(maximize3DButton = GetButton("", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1074 | + oe.toolbarPanel.add(maximize3DButton = GetButton("icons/empty.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1069 | 1075 | maximize3DButton.setToolTipText("Maximize 3D view"); |
---|
1070 | 1076 | maximize3DButton.addActionListener(this); |
---|
1071 | 1077 | |
---|
.. | .. |
---|
1107 | 1113 | copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1108 | 1114 | deleteVersionButton.setToolTipText("Delete current version"); |
---|
1109 | 1115 | deleteVersionButton.addActionListener(this); |
---|
| 1116 | + deleteVersionButton.setEnabled(false); |
---|
1110 | 1117 | |
---|
1111 | 1118 | copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1112 | 1119 | previousVersionButton.setToolTipText("Previous version"); |
---|
.. | .. |
---|
1117 | 1124 | updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1118 | 1125 | restoreButton.setToolTipText("Undo (restore current version)"); |
---|
1119 | 1126 | restoreButton.addActionListener(this); |
---|
1120 | | - //restoreButton.setEnabled(false); |
---|
| 1127 | + restoreButton.setEnabled(false); |
---|
1121 | 1128 | |
---|
1122 | 1129 | updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1123 | 1130 | replaceButton.setToolTipText("Save (replace current version)"); |
---|
1124 | 1131 | replaceButton.addActionListener(this); |
---|
1125 | | - //replaceButton.setEnabled(false); |
---|
| 1132 | + replaceButton.setEnabled(false); |
---|
1126 | 1133 | |
---|
1127 | 1134 | copyOptionsPanel.add(updown); |
---|
1128 | 1135 | |
---|
.. | .. |
---|
1187 | 1194 | boxButton.setToolTipText("Create box"); |
---|
1188 | 1195 | boxButton.addActionListener(this); |
---|
1189 | 1196 | |
---|
| 1197 | + row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1198 | + superButton.setToolTipText("Create superellipsoid"); |
---|
| 1199 | + superButton.addActionListener(this); |
---|
| 1200 | + |
---|
1190 | 1201 | row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1191 | 1202 | sphereButton.setToolTipText("Create sphere"); |
---|
1192 | 1203 | sphereButton.addActionListener(this); |
---|
.. | .. |
---|
1198 | 1209 | row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1199 | 1210 | torusButton.setToolTipText("Create torus"); |
---|
1200 | 1211 | torusButton.addActionListener(this); |
---|
1201 | | - |
---|
1202 | | - row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1203 | | - superButton.setToolTipText("Create superellipsoid"); |
---|
1204 | | - superButton.addActionListener(this); |
---|
1205 | 1212 | |
---|
1206 | 1213 | if (Globals.ADVANCED) |
---|
1207 | 1214 | { |
---|
.. | .. |
---|
1504 | 1511 | |
---|
1505 | 1512 | oe.SetupViews(); |
---|
1506 | 1513 | |
---|
| 1514 | + if (Globals.DEBUG) |
---|
1507 | 1515 | System.out.println("SetupViews"); |
---|
1508 | 1516 | DragSource.getDefaultDragSource().createDefaultDragGestureRecognizer( |
---|
1509 | 1517 | oe.cameraView, DnDConstants.ACTION_COPY_OR_MOVE, this); // ACTION_LINK ?? |
---|
.. | .. |
---|
2165 | 2173 | shadow.material = new cMaterial(obj.material); |
---|
2166 | 2174 | shadow.material.diffuse = 0.0001f; |
---|
2167 | 2175 | shadow.material.specular = 0.0001f; |
---|
2168 | | - //shadow.projectedVertices[1].x = 300; |
---|
| 2176 | + shadow.material.opacity = 0.75f; |
---|
| 2177 | + |
---|
| 2178 | + AllocProjectedVertices(shadow); |
---|
| 2179 | + |
---|
| 2180 | + shadow.projectedVertices[1].x = 300; |
---|
2169 | 2181 | |
---|
2170 | 2182 | makeSomething(shadow); |
---|
2171 | 2183 | } |
---|
.. | .. |
---|
4110 | 4122 | copy.versionlist = new Object3D[100]; |
---|
4111 | 4123 | copy.versionindex = -1; |
---|
4112 | 4124 | |
---|
4113 | | - Save(true); |
---|
| 4125 | + // Cannot work with loops |
---|
| 4126 | + // To fix this issue, first mark all nodes above the root, |
---|
| 4127 | + // and check if any of these nodes are reachable below the root. |
---|
| 4128 | + //Save(true); |
---|
4114 | 4129 | } |
---|
4115 | 4130 | |
---|
4116 | 4131 | SetVersionStates(); |
---|
.. | .. |
---|
5355 | 5370 | if (group.selection != null) |
---|
5356 | 5371 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
5357 | 5372 | { |
---|
5358 | | - if (!(e.nextElement() instanceof Composite)) |
---|
| 5373 | + Object next = e.nextElement(); |
---|
| 5374 | + if (!(next instanceof Composite)) // || (next instanceof GroupLeaf)) |
---|
5359 | 5375 | { |
---|
5360 | 5376 | allComposites = false; |
---|
5361 | 5377 | break; |
---|
.. | .. |
---|
6346 | 6362 | private MenuItem transformGeometryItem; |
---|
6347 | 6363 | private MenuItem transformChildrenItem; |
---|
6348 | 6364 | private MenuItem hideItem; |
---|
6349 | | - private MenuItem grabItem; |
---|
| 6365 | + private JMenuItem grabItem; |
---|
6350 | 6366 | private MenuItem backItem; |
---|
6351 | 6367 | private MenuItem frontItem; |
---|
6352 | 6368 | private MenuItem cameraItem; |
---|