.. | .. |
---|
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); |
---|
.. | .. |
---|
758 | 762 | } |
---|
759 | 763 | |
---|
760 | 764 | // EDIT panel |
---|
761 | | - editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
762 | | - editButton.setToolTipText("Edit selection"); |
---|
| 765 | + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 766 | + editButton.setToolTipText("Pin selection controls"); |
---|
763 | 767 | editButton.addActionListener(this); |
---|
764 | 768 | |
---|
765 | | - editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
766 | | - uneditButton.setToolTipText("Unedit selection"); |
---|
| 769 | + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 770 | + uneditButton.setToolTipText("Remove selection controls"); |
---|
767 | 771 | uneditButton.addActionListener(this); |
---|
768 | 772 | |
---|
769 | 773 | editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
770 | | - allParamsButton.setToolTipText("Edit all params"); |
---|
| 774 | + allParamsButton.setToolTipText("Show all controle"); |
---|
771 | 775 | allParamsButton.addActionListener(this); |
---|
772 | 776 | |
---|
773 | 777 | editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
784 | 788 | |
---|
785 | 789 | editCommandsPanel.preferredHeight = 1; |
---|
786 | 790 | |
---|
| 791 | + SetPinStates(false); |
---|
787 | 792 | // oe.treePanel.add(commandsPanel); |
---|
788 | 793 | // oe.treePanel.Return(); |
---|
789 | 794 | |
---|
.. | .. |
---|
857 | 862 | boxCB.addItemListener(this); |
---|
858 | 863 | |
---|
859 | 864 | panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
860 | | - zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 865 | + zoomBoxCB.setToolTipText("Display only for wheel"); |
---|
861 | 866 | zoomBoxCB.addItemListener(this); |
---|
862 | 867 | |
---|
863 | 868 | if (true) // Globals.ADVANCED) |
---|
864 | 869 | { |
---|
865 | | - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
866 | | - supportCB.setToolTipText("Enable rigging"); |
---|
867 | | - 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); |
---|
868 | 877 | |
---|
869 | 878 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
870 | 879 | // localCB.addItemListener(this); |
---|
.. | .. |
---|
919 | 928 | oeilCB.addItemListener(this); |
---|
920 | 929 | |
---|
921 | 930 | panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
922 | | - shadowCB.setToolTipText("Compute shadows when live"); |
---|
| 931 | + shadowCB.setToolTipText("When live compute shadows"); |
---|
923 | 932 | shadowCB.addItemListener(this); |
---|
924 | 933 | |
---|
925 | 934 | panel.Return(); |
---|
.. | .. |
---|
928 | 937 | toggleTextureCB.addItemListener(this); |
---|
929 | 938 | |
---|
930 | 939 | panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints); |
---|
931 | | - toggleSwitchCB.setToolTipText("Use switch"); |
---|
| 940 | + toggleSwitchCB.setToolTipText("Choose a single item"); |
---|
932 | 941 | toggleSwitchCB.addItemListener(this); |
---|
933 | 942 | |
---|
934 | 943 | panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); |
---|
935 | | - autosaveCB.setToolTipText("Auto-save on structure change"); |
---|
| 944 | + autosaveCB.setToolTipText("On structure change"); |
---|
936 | 945 | autosaveCB.addItemListener(this); |
---|
937 | 946 | |
---|
938 | 947 | panel.Return(); |
---|
.. | .. |
---|
999 | 1008 | cCheckBox slowCB; |
---|
1000 | 1009 | cCheckBox boxCB; |
---|
1001 | 1010 | cCheckBox zoomBoxCB; |
---|
| 1011 | + cCheckBox freezeCB; |
---|
1002 | 1012 | //cToggleButton trackCB; |
---|
1003 | 1013 | cCheckBox trackCB; |
---|
1004 | 1014 | cCheckBox smoothfocusCB; |
---|
.. | .. |
---|
1117 | 1127 | { |
---|
1118 | 1128 | Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
1119 | 1129 | } |
---|
| 1130 | + else if(e.getSource() == freezeCB) |
---|
| 1131 | + { |
---|
| 1132 | + Globals.FREEZEONMOVE ^= true; |
---|
| 1133 | + } |
---|
1120 | 1134 | else if(e.getSource() == autosaveCB) |
---|
1121 | 1135 | { |
---|
1122 | 1136 | Globals.SAVEONMAKE ^= true; |
---|
.. | .. |
---|
1201 | 1215 | } |
---|
1202 | 1216 | } |
---|
1203 | 1217 | |
---|
1204 | | - String string = (String) object; |
---|
1205 | | - |
---|
1206 | 1218 | System.out.println("Transfer = " + object + "; drop : " + target); |
---|
1207 | 1219 | // if( object instanceof java.io.File[]) |
---|
1208 | 1220 | // { |
---|
.. | .. |
---|
1210 | 1222 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
1211 | 1223 | // return; |
---|
1212 | 1224 | // } |
---|
| 1225 | + |
---|
| 1226 | + String string = (String) object; |
---|
1213 | 1227 | |
---|
1214 | 1228 | // File path for Mac and Windows |
---|
1215 | 1229 | if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
.. | .. |
---|
1459 | 1473 | animationItem.addItemListener(this); |
---|
1460 | 1474 | animationItem.setState(Globals.ANIMATION); |
---|
1461 | 1475 | |
---|
| 1476 | + menu.add(archiveItem = new MenuItem("Archive3D...")); |
---|
| 1477 | + archiveItem.addActionListener(this); |
---|
| 1478 | + |
---|
1462 | 1479 | menu.add("-"); |
---|
1463 | 1480 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1464 | 1481 | parseverticesItem.addActionListener(this); |
---|
.. | .. |
---|
1628 | 1645 | |
---|
1629 | 1646 | makeSomething(shadow); |
---|
1630 | 1647 | } |
---|
| 1648 | + |
---|
| 1649 | + private void ClearUnpinned() |
---|
| 1650 | + { |
---|
| 1651 | + //for (Object3D obj : listUI) |
---|
| 1652 | + for (int i=listUI.size(); --i>=0;) |
---|
| 1653 | + { |
---|
| 1654 | + Object3D obj = listUI.elementAt(i); |
---|
| 1655 | + if (!obj.pinned) |
---|
| 1656 | + { |
---|
| 1657 | + obj.CloseUI(); |
---|
| 1658 | + listUI.remove(i); |
---|
| 1659 | + } |
---|
| 1660 | + } |
---|
| 1661 | + } |
---|
1631 | 1662 | |
---|
1632 | 1663 | /** |
---|
1633 | 1664 | * applyExample |
---|
.. | .. |
---|
2107 | 2138 | Composite csg = new GroupLeaf(); |
---|
2108 | 2139 | csg.count = 5; |
---|
2109 | 2140 | group(csg); |
---|
2110 | | - Composite child = new cGroup(); |
---|
| 2141 | + Composite child = new cGroup("Branch"); |
---|
2111 | 2142 | csg.addChild(child); |
---|
2112 | 2143 | child.addChild(csg); |
---|
2113 | 2144 | } else |
---|
2114 | 2145 | if (source == doubleItem) |
---|
2115 | 2146 | { |
---|
2116 | | - Composite csg = new GroupLeaf(); |
---|
| 2147 | + Composite csg = new GroupLeaf("Fork"); |
---|
2117 | 2148 | csg.count = 5; |
---|
2118 | 2149 | group(csg); |
---|
2119 | | - Composite child = new cGroup(); |
---|
| 2150 | + Composite child = new cGroup("Branch A"); |
---|
2120 | 2151 | csg.addChild(child); |
---|
2121 | 2152 | child.addChild(csg); |
---|
2122 | | - child = new cGroup(); |
---|
| 2153 | + child = new cGroup("Branch B"); |
---|
2123 | 2154 | csg.addChild(child); |
---|
2124 | 2155 | child.addChild(csg); |
---|
2125 | 2156 | } else |
---|
2126 | 2157 | if (source == tripleItem) |
---|
2127 | 2158 | { |
---|
2128 | | - Composite csg = new GroupLeaf(); |
---|
| 2159 | + Composite csg = new GroupLeaf("Trident"); |
---|
2129 | 2160 | csg.count = 4; |
---|
2130 | 2161 | group(csg); |
---|
2131 | 2162 | Composite child = new cGroup(); |
---|
.. | .. |
---|
2189 | 2220 | } else |
---|
2190 | 2221 | if (source == undoButton) |
---|
2191 | 2222 | { |
---|
2192 | | - Undo(); |
---|
| 2223 | + if (!Undo()) |
---|
| 2224 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2193 | 2225 | } else |
---|
2194 | 2226 | if (source == redoButton) |
---|
2195 | 2227 | { |
---|
.. | .. |
---|
2197 | 2229 | } else |
---|
2198 | 2230 | if (source == saveButton) |
---|
2199 | 2231 | { |
---|
2200 | | - Save(); |
---|
| 2232 | + if (!Save(true)) |
---|
| 2233 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2201 | 2234 | } else |
---|
2202 | 2235 | if (source == oneStepButton) |
---|
2203 | 2236 | { |
---|
.. | .. |
---|
2206 | 2239 | } else |
---|
2207 | 2240 | if (source == screenfitButton) |
---|
2208 | 2241 | { |
---|
2209 | | - //Reload(lastConverter, lastFilename, true); |
---|
2210 | 2242 | ScreenFit(); |
---|
2211 | 2243 | } else |
---|
2212 | 2244 | if (source == screenfitpointButton) |
---|
2213 | 2245 | { |
---|
2214 | | - //Reload(lastConverter, lastFilename, true); |
---|
2215 | 2246 | ScreenFitPoint(); |
---|
2216 | 2247 | } else |
---|
2217 | 2248 | if (source == snapobjectButton) |
---|
2218 | 2249 | { |
---|
2219 | | - //Reload(lastConverter, lastFilename, true); |
---|
2220 | 2250 | SnapObject(); |
---|
2221 | 2251 | } else |
---|
2222 | 2252 | // if (event.getSource() == recompileButton) |
---|
.. | .. |
---|
2740 | 2770 | } else |
---|
2741 | 2771 | if (source == ungroupItem || source == ungroupButton) |
---|
2742 | 2772 | { |
---|
2743 | | - //ungroup(); |
---|
| 2773 | + boolean hasRoot = false; |
---|
| 2774 | + |
---|
2744 | 2775 | for (int i=0; i<group.selection.size(); i++) |
---|
2745 | 2776 | { |
---|
2746 | | - Ungroup(group.selection.get(i)); |
---|
| 2777 | + if (group.selection.get(i) == group) |
---|
| 2778 | + { |
---|
| 2779 | + hasRoot = true; |
---|
| 2780 | + break; |
---|
| 2781 | + } |
---|
2747 | 2782 | } |
---|
2748 | 2783 | |
---|
2749 | | - ClearSelection(false); |
---|
2750 | | - |
---|
2751 | | - 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 | + } |
---|
2752 | 2795 | } else |
---|
2753 | 2796 | if (source == genUVItem) |
---|
2754 | 2797 | { |
---|
.. | .. |
---|
3372 | 3415 | //copy.ClearUI(); |
---|
3373 | 3416 | for (Object3D obj : listUI) |
---|
3374 | 3417 | { |
---|
3375 | | - obj.pinned = true; |
---|
| 3418 | + obj.pinned = false; |
---|
3376 | 3419 | obj.CloseUI(); |
---|
3377 | 3420 | } |
---|
3378 | 3421 | listUI.clear(); |
---|
.. | .. |
---|
3457 | 3500 | currentLayout = sevenButton; |
---|
3458 | 3501 | */ |
---|
3459 | 3502 | radio.layout.doClick(); |
---|
| 3503 | + |
---|
| 3504 | + ClearUnpinned(); |
---|
| 3505 | + SetPinStates(group.selection.size() > 0); |
---|
| 3506 | + if (group.selection.size() == 1) |
---|
| 3507 | + EditSelection(false); |
---|
3460 | 3508 | keepparent = group.parent; |
---|
3461 | 3509 | // PARENT = NULL or not??? |
---|
3462 | 3510 | //group.parent = null; // ROOT |
---|
.. | .. |
---|
4616 | 4664 | //new Exception().printStackTrace(); |
---|
4617 | 4665 | |
---|
4618 | 4666 | freezemodel = true; |
---|
4619 | | - |
---|
4620 | | - //for (Object3D obj : listUI) |
---|
4621 | | - for (int i=listUI.size(); --i>=0;) |
---|
4622 | | - { |
---|
4623 | | - Object3D obj = listUI.elementAt(i); |
---|
4624 | | - if (!obj.pinned) |
---|
4625 | | - { |
---|
4626 | | - obj.CloseUI(); |
---|
4627 | | - listUI.remove(i); |
---|
4628 | | - } |
---|
4629 | | - } |
---|
| 4667 | + ClearUnpinned(); |
---|
4630 | 4668 | |
---|
4631 | 4669 | /**/ |
---|
4632 | 4670 | //switch (event.id) |
---|
.. | .. |
---|
4689 | 4727 | { |
---|
4690 | 4728 | editButton.setEnabled(enabled); |
---|
4691 | 4729 | uneditButton.setEnabled(enabled); |
---|
| 4730 | + unselectButton.setEnabled(enabled); |
---|
| 4731 | + flashSelectionButton.setEnabled(enabled); |
---|
4692 | 4732 | } |
---|
4693 | 4733 | |
---|
4694 | 4734 | void refreshContents(boolean cp) |
---|
4695 | 4735 | { |
---|
4696 | 4736 | if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info")) |
---|
4697 | | - if (!Globals.MOUSEDRAGGED) // && !Globals.TIMERRUNNING) |
---|
| 4737 | + if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
4698 | 4738 | { |
---|
4699 | 4739 | objEditor.ClearInfo(); // .GetMaterial()); |
---|
4700 | 4740 | |
---|
.. | .. |
---|
5514 | 5554 | |
---|
5515 | 5555 | cButton restoreCameraButton; |
---|
5516 | 5556 | |
---|
5517 | | - cButton minButton; |
---|
5518 | | - cButton maxButton; |
---|
5519 | | - cButton fullButton; |
---|
5520 | 5557 | cButton saveButton; |
---|
5521 | 5558 | cButton oneStepButton; |
---|
5522 | 5559 | |
---|