.. | .. |
---|
220 | 220 | // toggleSwitchItem.addItemListener(this); |
---|
221 | 221 | // toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
222 | 222 | |
---|
223 | | - cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
| 223 | + cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles")); |
---|
224 | 224 | toggleHandleItem.addItemListener(this); |
---|
225 | 225 | toggleHandleItem.setState(CameraPane.HANDLES); |
---|
226 | 226 | |
---|
.. | .. |
---|
380 | 380 | shadowYItem.addActionListener(this); |
---|
381 | 381 | shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
382 | 382 | shadowZItem.addActionListener(this); |
---|
| 383 | + |
---|
383 | 384 | if (Globals.ADVANCED) |
---|
384 | 385 | { |
---|
385 | 386 | menu.add("-"); |
---|
.. | .. |
---|
582 | 583 | */ |
---|
583 | 584 | cGridBag copyOptionsPanel = new cGridBag(); |
---|
584 | 585 | |
---|
585 | | - copyOptionsPanel.preferredHeight = 2; |
---|
| 586 | + copyOptionsPanel.preferredHeight = 1; |
---|
586 | 587 | |
---|
587 | 588 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
588 | 589 | |
---|
.. | .. |
---|
590 | 591 | //minButton.setToolTipText("Minimize window"); |
---|
591 | 592 | //minButton.addActionListener(this); |
---|
592 | 593 | |
---|
593 | | - oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
594 | | - maxButton.setToolTipText("Maximize window"); |
---|
595 | | - maxButton.addActionListener(this); |
---|
| 594 | + if (Globals.ADVANCED) |
---|
| 595 | + { |
---|
| 596 | + oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 597 | + maxButton.setToolTipText("Maximize window"); |
---|
| 598 | + maxButton.addActionListener(this); |
---|
| 599 | + } |
---|
596 | 600 | |
---|
597 | 601 | oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
598 | 602 | fullButton.setToolTipText("Full-screen window"); |
---|
599 | 603 | fullButton.addActionListener(this); |
---|
600 | 604 | |
---|
| 605 | + oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 606 | + screenfitButton.setToolTipText("Screen fit"); |
---|
| 607 | + screenfitButton.addActionListener(this); |
---|
| 608 | + |
---|
601 | 609 | oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
602 | 610 | restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
603 | 611 | restoreCameraButton.addActionListener(this); |
---|
.. | .. |
---|
630 | 638 | |
---|
631 | 639 | //oe.toolboxPanel.Return(); |
---|
632 | 640 | |
---|
633 | | - copyOptionsPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
634 | | - screenfitButton.setToolTipText("Screen fit"); |
---|
635 | | - screenfitButton.addActionListener(this); |
---|
636 | | - |
---|
637 | 641 | // copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
638 | 642 | // trackCB.setToolTipText("Enable tracking"); |
---|
639 | 643 | // trackCB.addItemListener(this); |
---|
.. | .. |
---|
726 | 730 | compositeButton.addActionListener(this); |
---|
727 | 731 | |
---|
728 | 732 | oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
729 | | - switchButton.setToolTipText("Create switch"); |
---|
| 733 | + switchButton.setToolTipText("Create item switcher"); |
---|
730 | 734 | switchButton.addActionListener(this); |
---|
731 | 735 | |
---|
732 | 736 | oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
863 | 867 | |
---|
864 | 868 | if (true) // Globals.ADVANCED) |
---|
865 | 869 | { |
---|
866 | | - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
867 | | - supportCB.setToolTipText("Enable rigging"); |
---|
868 | | - supportCB.addItemListener(this); |
---|
| 870 | +// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 871 | +// supportCB.setToolTipText("Enable rigging"); |
---|
| 872 | +// supportCB.addItemListener(this); |
---|
| 873 | + |
---|
| 874 | + panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints); |
---|
| 875 | + freezeCB.setToolTipText("Fast moving camera"); |
---|
| 876 | + freezeCB.addItemListener(this); |
---|
869 | 877 | |
---|
870 | 878 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
871 | 879 | // localCB.addItemListener(this); |
---|
.. | .. |
---|
929 | 937 | toggleTextureCB.addItemListener(this); |
---|
930 | 938 | |
---|
931 | 939 | panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints); |
---|
932 | | - toggleSwitchCB.setToolTipText("Use switch"); |
---|
| 940 | + toggleSwitchCB.setToolTipText("Choose a single item"); |
---|
933 | 941 | toggleSwitchCB.addItemListener(this); |
---|
934 | 942 | |
---|
935 | 943 | panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); |
---|
.. | .. |
---|
1000 | 1008 | cCheckBox slowCB; |
---|
1001 | 1009 | cCheckBox boxCB; |
---|
1002 | 1010 | cCheckBox zoomBoxCB; |
---|
| 1011 | + cCheckBox freezeCB; |
---|
1003 | 1012 | //cToggleButton trackCB; |
---|
1004 | 1013 | cCheckBox trackCB; |
---|
1005 | 1014 | cCheckBox smoothfocusCB; |
---|
.. | .. |
---|
1118 | 1127 | { |
---|
1119 | 1128 | Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
1120 | 1129 | } |
---|
| 1130 | + else if(e.getSource() == freezeCB) |
---|
| 1131 | + { |
---|
| 1132 | + Globals.FREEZEONMOVE ^= true; |
---|
| 1133 | + } |
---|
1121 | 1134 | else if(e.getSource() == autosaveCB) |
---|
1122 | 1135 | { |
---|
1123 | 1136 | Globals.SAVEONMAKE ^= true; |
---|
.. | .. |
---|
1202 | 1215 | } |
---|
1203 | 1216 | } |
---|
1204 | 1217 | |
---|
1205 | | - String string = (String) object; |
---|
1206 | | - |
---|
1207 | 1218 | System.out.println("Transfer = " + object + "; drop : " + target); |
---|
1208 | 1219 | // if( object instanceof java.io.File[]) |
---|
1209 | 1220 | // { |
---|
.. | .. |
---|
1211 | 1222 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
1212 | 1223 | // return; |
---|
1213 | 1224 | // } |
---|
| 1225 | + |
---|
| 1226 | + String string = (String) object; |
---|
1214 | 1227 | |
---|
1215 | 1228 | // File path for Mac and Windows |
---|
1216 | 1229 | if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
.. | .. |
---|
1459 | 1472 | menu.add(animationItem = new CheckboxMenuItem("Animation...")); |
---|
1460 | 1473 | animationItem.addItemListener(this); |
---|
1461 | 1474 | animationItem.setState(Globals.ANIMATION); |
---|
| 1475 | + |
---|
| 1476 | + menu.add(archiveItem = new MenuItem("Archive3D...")); |
---|
| 1477 | + archiveItem.addActionListener(this); |
---|
1462 | 1478 | |
---|
1463 | 1479 | menu.add("-"); |
---|
1464 | 1480 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
.. | .. |
---|
2122 | 2138 | Composite csg = new GroupLeaf(); |
---|
2123 | 2139 | csg.count = 5; |
---|
2124 | 2140 | group(csg); |
---|
2125 | | - Composite child = new cGroup(); |
---|
| 2141 | + Composite child = new cGroup("Branch"); |
---|
2126 | 2142 | csg.addChild(child); |
---|
2127 | 2143 | child.addChild(csg); |
---|
2128 | 2144 | } else |
---|
2129 | 2145 | if (source == doubleItem) |
---|
2130 | 2146 | { |
---|
2131 | | - Composite csg = new GroupLeaf(); |
---|
| 2147 | + Composite csg = new GroupLeaf("Fork"); |
---|
2132 | 2148 | csg.count = 5; |
---|
2133 | 2149 | group(csg); |
---|
2134 | | - Composite child = new cGroup(); |
---|
| 2150 | + Composite child = new cGroup("Branch A"); |
---|
2135 | 2151 | csg.addChild(child); |
---|
2136 | 2152 | child.addChild(csg); |
---|
2137 | | - child = new cGroup(); |
---|
| 2153 | + child = new cGroup("Branch B"); |
---|
2138 | 2154 | csg.addChild(child); |
---|
2139 | 2155 | child.addChild(csg); |
---|
2140 | 2156 | } else |
---|
2141 | 2157 | if (source == tripleItem) |
---|
2142 | 2158 | { |
---|
2143 | | - Composite csg = new GroupLeaf(); |
---|
| 2159 | + Composite csg = new GroupLeaf("Trident"); |
---|
2144 | 2160 | csg.count = 4; |
---|
2145 | 2161 | group(csg); |
---|
2146 | 2162 | Composite child = new cGroup(); |
---|
.. | .. |
---|
2204 | 2220 | } else |
---|
2205 | 2221 | if (source == undoButton) |
---|
2206 | 2222 | { |
---|
2207 | | - Undo(); |
---|
| 2223 | + if (!Undo()) |
---|
| 2224 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2208 | 2225 | } else |
---|
2209 | 2226 | if (source == redoButton) |
---|
2210 | 2227 | { |
---|
.. | .. |
---|
2212 | 2229 | } else |
---|
2213 | 2230 | if (source == saveButton) |
---|
2214 | 2231 | { |
---|
2215 | | - Save(); |
---|
| 2232 | + if (!Save(true)) |
---|
| 2233 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2216 | 2234 | } else |
---|
2217 | 2235 | if (source == oneStepButton) |
---|
2218 | 2236 | { |
---|
.. | .. |
---|
2221 | 2239 | } else |
---|
2222 | 2240 | if (source == screenfitButton) |
---|
2223 | 2241 | { |
---|
2224 | | - //Reload(lastConverter, lastFilename, true); |
---|
2225 | 2242 | ScreenFit(); |
---|
2226 | 2243 | } else |
---|
2227 | 2244 | if (source == screenfitpointButton) |
---|
2228 | 2245 | { |
---|
2229 | | - //Reload(lastConverter, lastFilename, true); |
---|
2230 | 2246 | ScreenFitPoint(); |
---|
2231 | 2247 | } else |
---|
2232 | 2248 | if (source == snapobjectButton) |
---|
2233 | 2249 | { |
---|
2234 | | - //Reload(lastConverter, lastFilename, true); |
---|
2235 | 2250 | SnapObject(); |
---|
2236 | 2251 | } else |
---|
2237 | 2252 | // if (event.getSource() == recompileButton) |
---|
.. | .. |
---|
2755 | 2770 | } else |
---|
2756 | 2771 | if (source == ungroupItem || source == ungroupButton) |
---|
2757 | 2772 | { |
---|
2758 | | - //ungroup(); |
---|
| 2773 | + boolean hasRoot = false; |
---|
| 2774 | + |
---|
2759 | 2775 | for (int i=0; i<group.selection.size(); i++) |
---|
2760 | 2776 | { |
---|
2761 | | - Ungroup(group.selection.get(i)); |
---|
| 2777 | + if (group.selection.get(i) == group) |
---|
| 2778 | + { |
---|
| 2779 | + hasRoot = true; |
---|
| 2780 | + break; |
---|
| 2781 | + } |
---|
2762 | 2782 | } |
---|
2763 | 2783 | |
---|
2764 | | - ClearSelection(false); |
---|
2765 | | - |
---|
2766 | | - refreshContents(); |
---|
| 2784 | + if (!hasRoot) |
---|
| 2785 | + { |
---|
| 2786 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 2787 | + { |
---|
| 2788 | + Ungroup(group.selection.get(i)); |
---|
| 2789 | + } |
---|
| 2790 | + |
---|
| 2791 | + ClearSelection(false); |
---|
| 2792 | + |
---|
| 2793 | + refreshContents(); |
---|
| 2794 | + } |
---|
2767 | 2795 | } else |
---|
2768 | 2796 | if (source == genUVItem) |
---|
2769 | 2797 | { |
---|
.. | .. |
---|
4706 | 4734 | void refreshContents(boolean cp) |
---|
4707 | 4735 | { |
---|
4708 | 4736 | if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info")) |
---|
4709 | | - if (!Globals.MOUSEDRAGGED) // && !Globals.TIMERRUNNING) |
---|
| 4737 | + if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
4710 | 4738 | { |
---|
4711 | 4739 | objEditor.ClearInfo(); // .GetMaterial()); |
---|
4712 | 4740 | |
---|
.. | .. |
---|
5526 | 5554 | |
---|
5527 | 5555 | cButton restoreCameraButton; |
---|
5528 | 5556 | |
---|
5529 | | - cButton minButton; |
---|
5530 | | - cButton maxButton; |
---|
5531 | | - cButton fullButton; |
---|
5532 | 5557 | cButton saveButton; |
---|
5533 | 5558 | cButton oneStepButton; |
---|
5534 | 5559 | |
---|