.. | .. |
---|
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 | |
---|
.. | .. |
---|
582 | 582 | */ |
---|
583 | 583 | cGridBag copyOptionsPanel = new cGridBag(); |
---|
584 | 584 | |
---|
585 | | - copyOptionsPanel.preferredHeight = 2; |
---|
| 585 | + copyOptionsPanel.preferredHeight = 1; |
---|
586 | 586 | |
---|
587 | 587 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
588 | 588 | |
---|
.. | .. |
---|
590 | 590 | //minButton.setToolTipText("Minimize window"); |
---|
591 | 591 | //minButton.addActionListener(this); |
---|
592 | 592 | |
---|
593 | | - oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
594 | | - maxButton.setToolTipText("Maximize window"); |
---|
595 | | - maxButton.addActionListener(this); |
---|
| 593 | + if (Globals.ADVANCED) |
---|
| 594 | + { |
---|
| 595 | + oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 596 | + maxButton.setToolTipText("Maximize window"); |
---|
| 597 | + maxButton.addActionListener(this); |
---|
| 598 | + } |
---|
596 | 599 | |
---|
597 | 600 | oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
598 | 601 | fullButton.setToolTipText("Full-screen window"); |
---|
.. | .. |
---|
726 | 729 | compositeButton.addActionListener(this); |
---|
727 | 730 | |
---|
728 | 731 | oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
729 | | - switchButton.setToolTipText("Create switch"); |
---|
| 732 | + switchButton.setToolTipText("Create item switcher"); |
---|
730 | 733 | switchButton.addActionListener(this); |
---|
731 | 734 | |
---|
732 | 735 | oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
758 | 761 | } |
---|
759 | 762 | |
---|
760 | 763 | // EDIT panel |
---|
761 | | - editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
762 | | - editButton.setToolTipText("Edit selection"); |
---|
| 764 | + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 765 | + editButton.setToolTipText("Pin selection controls"); |
---|
763 | 766 | editButton.addActionListener(this); |
---|
764 | 767 | |
---|
765 | | - editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
766 | | - uneditButton.setToolTipText("Unedit selection"); |
---|
| 768 | + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 769 | + uneditButton.setToolTipText("Remove selection controls"); |
---|
767 | 770 | uneditButton.addActionListener(this); |
---|
768 | 771 | |
---|
769 | 772 | editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
770 | | - allParamsButton.setToolTipText("Edit all params"); |
---|
| 773 | + allParamsButton.setToolTipText("Show all controle"); |
---|
771 | 774 | allParamsButton.addActionListener(this); |
---|
772 | 775 | |
---|
773 | 776 | editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
784 | 787 | |
---|
785 | 788 | editCommandsPanel.preferredHeight = 1; |
---|
786 | 789 | |
---|
| 790 | + SetPinStates(false); |
---|
787 | 791 | // oe.treePanel.add(commandsPanel); |
---|
788 | 792 | // oe.treePanel.Return(); |
---|
789 | 793 | |
---|
.. | .. |
---|
857 | 861 | boxCB.addItemListener(this); |
---|
858 | 862 | |
---|
859 | 863 | panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
860 | | - zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 864 | + zoomBoxCB.setToolTipText("Display only for wheel"); |
---|
861 | 865 | zoomBoxCB.addItemListener(this); |
---|
862 | 866 | |
---|
863 | 867 | if (true) // Globals.ADVANCED) |
---|
864 | 868 | { |
---|
865 | | - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
866 | | - supportCB.setToolTipText("Enable rigging"); |
---|
867 | | - supportCB.addItemListener(this); |
---|
| 869 | +// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 870 | +// supportCB.setToolTipText("Enable rigging"); |
---|
| 871 | +// supportCB.addItemListener(this); |
---|
| 872 | + |
---|
| 873 | + panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints); |
---|
| 874 | + freezeCB.setToolTipText("Fast moving camera"); |
---|
| 875 | + freezeCB.addItemListener(this); |
---|
868 | 876 | |
---|
869 | 877 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
870 | 878 | // localCB.addItemListener(this); |
---|
.. | .. |
---|
919 | 927 | oeilCB.addItemListener(this); |
---|
920 | 928 | |
---|
921 | 929 | panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
922 | | - shadowCB.setToolTipText("Compute shadows when live"); |
---|
| 930 | + shadowCB.setToolTipText("When live compute shadows"); |
---|
923 | 931 | shadowCB.addItemListener(this); |
---|
924 | 932 | |
---|
925 | 933 | panel.Return(); |
---|
.. | .. |
---|
928 | 936 | toggleTextureCB.addItemListener(this); |
---|
929 | 937 | |
---|
930 | 938 | panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints); |
---|
931 | | - toggleSwitchCB.setToolTipText("Use switch"); |
---|
| 939 | + toggleSwitchCB.setToolTipText("Choose a single item"); |
---|
932 | 940 | toggleSwitchCB.addItemListener(this); |
---|
933 | 941 | |
---|
934 | 942 | panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); |
---|
935 | | - autosaveCB.setToolTipText("Auto-save on structure change"); |
---|
| 943 | + autosaveCB.setToolTipText("On structure change"); |
---|
936 | 944 | autosaveCB.addItemListener(this); |
---|
937 | 945 | |
---|
938 | 946 | panel.Return(); |
---|
.. | .. |
---|
999 | 1007 | cCheckBox slowCB; |
---|
1000 | 1008 | cCheckBox boxCB; |
---|
1001 | 1009 | cCheckBox zoomBoxCB; |
---|
| 1010 | + cCheckBox freezeCB; |
---|
1002 | 1011 | //cToggleButton trackCB; |
---|
1003 | 1012 | cCheckBox trackCB; |
---|
1004 | 1013 | cCheckBox smoothfocusCB; |
---|
.. | .. |
---|
1116 | 1125 | else if(e.getSource() == shadowCB) |
---|
1117 | 1126 | { |
---|
1118 | 1127 | Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
| 1128 | + } |
---|
| 1129 | + else if(e.getSource() == freezeCB) |
---|
| 1130 | + { |
---|
| 1131 | + Globals.FREEZEONMOVE ^= true; |
---|
1119 | 1132 | } |
---|
1120 | 1133 | else if(e.getSource() == autosaveCB) |
---|
1121 | 1134 | { |
---|
.. | .. |
---|
1459 | 1472 | animationItem.addItemListener(this); |
---|
1460 | 1473 | animationItem.setState(Globals.ANIMATION); |
---|
1461 | 1474 | |
---|
| 1475 | + menu.add(archiveItem = new CheckboxMenuItem("Archive3D...")); |
---|
| 1476 | + archiveItem.addItemListener(this); |
---|
| 1477 | + |
---|
1462 | 1478 | menu.add("-"); |
---|
1463 | 1479 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1464 | 1480 | parseverticesItem.addActionListener(this); |
---|
.. | .. |
---|
1628 | 1644 | |
---|
1629 | 1645 | makeSomething(shadow); |
---|
1630 | 1646 | } |
---|
| 1647 | + |
---|
| 1648 | + private void ClearUnpinned() |
---|
| 1649 | + { |
---|
| 1650 | + //for (Object3D obj : listUI) |
---|
| 1651 | + for (int i=listUI.size(); --i>=0;) |
---|
| 1652 | + { |
---|
| 1653 | + Object3D obj = listUI.elementAt(i); |
---|
| 1654 | + if (!obj.pinned) |
---|
| 1655 | + { |
---|
| 1656 | + obj.CloseUI(); |
---|
| 1657 | + listUI.remove(i); |
---|
| 1658 | + } |
---|
| 1659 | + } |
---|
| 1660 | + } |
---|
1631 | 1661 | |
---|
1632 | 1662 | /** |
---|
1633 | 1663 | * applyExample |
---|
.. | .. |
---|
2107 | 2137 | Composite csg = new GroupLeaf(); |
---|
2108 | 2138 | csg.count = 5; |
---|
2109 | 2139 | group(csg); |
---|
2110 | | - Composite child = new cGroup(); |
---|
| 2140 | + Composite child = new cGroup("Branch"); |
---|
2111 | 2141 | csg.addChild(child); |
---|
2112 | 2142 | child.addChild(csg); |
---|
2113 | 2143 | } else |
---|
2114 | 2144 | if (source == doubleItem) |
---|
2115 | 2145 | { |
---|
2116 | | - Composite csg = new GroupLeaf(); |
---|
| 2146 | + Composite csg = new GroupLeaf("Fork"); |
---|
2117 | 2147 | csg.count = 5; |
---|
2118 | 2148 | group(csg); |
---|
2119 | | - Composite child = new cGroup(); |
---|
| 2149 | + Composite child = new cGroup("Branch A"); |
---|
2120 | 2150 | csg.addChild(child); |
---|
2121 | 2151 | child.addChild(csg); |
---|
2122 | | - child = new cGroup(); |
---|
| 2152 | + child = new cGroup("Branch B"); |
---|
2123 | 2153 | csg.addChild(child); |
---|
2124 | 2154 | child.addChild(csg); |
---|
2125 | 2155 | } else |
---|
2126 | 2156 | if (source == tripleItem) |
---|
2127 | 2157 | { |
---|
2128 | | - Composite csg = new GroupLeaf(); |
---|
| 2158 | + Composite csg = new GroupLeaf("Trident"); |
---|
2129 | 2159 | csg.count = 4; |
---|
2130 | 2160 | group(csg); |
---|
2131 | 2161 | Composite child = new cGroup(); |
---|
.. | .. |
---|
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) |
---|
.. | .. |
---|
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 | |
---|