.. | .. |
---|
60 | 60 | this.copy = this.group = group; |
---|
61 | 61 | //selectees = this.group.selectees; |
---|
62 | 62 | |
---|
| 63 | + if (copy.versions == null) |
---|
| 64 | + { |
---|
| 65 | + copy.versions = new byte[100][]; |
---|
| 66 | + copy.versionindex = -1; |
---|
| 67 | + } |
---|
| 68 | + |
---|
63 | 69 | if(ui) |
---|
64 | 70 | SetupUI(objEditor); |
---|
65 | 71 | } |
---|
.. | .. |
---|
74 | 80 | this.copy = this.group = copy; |
---|
75 | 81 | //selectees = this.group.selectees; |
---|
76 | 82 | |
---|
| 83 | + if (copy.versions == null) |
---|
| 84 | + { |
---|
| 85 | + copy.versions = new byte[100][]; |
---|
| 86 | + copy.versionindex = -1; |
---|
| 87 | + } |
---|
| 88 | + |
---|
77 | 89 | SetupMenu2(this); //objEditor); |
---|
78 | 90 | SetupUI2(objEditor); |
---|
79 | 91 | objEditor.SetupUI(true); |
---|
.. | .. |
---|
194 | 206 | // pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
195 | 207 | // pasteExpandItem.addActionListener(this); |
---|
196 | 208 | menu.add("-"); |
---|
197 | | - clearItem = menu.add(new MenuItem("Clear")); |
---|
198 | | - clearItem.addActionListener(this); |
---|
| 209 | + deleteItem = menu.add(new MenuItem("Delete")); |
---|
| 210 | + deleteItem.addActionListener(this); |
---|
199 | 211 | |
---|
200 | 212 | if (Globals.ADVANCED) |
---|
201 | 213 | { |
---|
.. | .. |
---|
421 | 433 | genNormalsMESHItem.addActionListener(this); |
---|
422 | 434 | if (Globals.ADVANCED) |
---|
423 | 435 | { |
---|
424 | | - genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
| 436 | + genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals")); |
---|
425 | 437 | genNormalsMINEItem.addActionListener(this); |
---|
426 | 438 | } |
---|
427 | 439 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
.. | .. |
---|
673 | 685 | |
---|
674 | 686 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
675 | 687 | |
---|
676 | | - oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
677 | | - twoButton.setToolTipText("Show center view only"); |
---|
678 | | - twoButton.addActionListener(this); |
---|
679 | | - this.fullscreenLayout = twoButton; |
---|
680 | | - |
---|
681 | 688 | oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
682 | 689 | fourButton.addActionListener(this); |
---|
683 | 690 | fourButton.setToolTipText("Show left panel only"); |
---|
| 691 | + |
---|
| 692 | + oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 693 | + twoButton.setToolTipText("Show right view only"); |
---|
| 694 | + twoButton.addActionListener(this); |
---|
| 695 | + this.fullscreenLayout = twoButton; |
---|
| 696 | + |
---|
684 | 697 | oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
685 | | - sixButton.setToolTipText("2-column layout left"); |
---|
| 698 | + sixButton.setToolTipText("Show left and right"); |
---|
686 | 699 | sixButton.addActionListener(this); |
---|
687 | | - oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
688 | | - threeButton.setToolTipText("2-column layout right"); |
---|
689 | | - threeButton.addActionListener(this); |
---|
690 | | - oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
691 | | - sevenButton.setToolTipText("3-column layout"); |
---|
692 | | - sevenButton.addActionListener(this); |
---|
| 700 | +// oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 701 | +// threeButton.setToolTipText("2-column layout right"); |
---|
| 702 | +// threeButton.addActionListener(this); |
---|
| 703 | +// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 704 | +// sevenButton.setToolTipText("3-column layout"); |
---|
| 705 | +// sevenButton.addActionListener(this); |
---|
693 | 706 | // |
---|
694 | 707 | |
---|
695 | | - oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
696 | | - rootButton.setToolTipText("Edit selection in new tab"); |
---|
| 708 | + oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 709 | + rootButton.setToolTipText("Open selection in new tab"); |
---|
697 | 710 | rootButton.addActionListener(this); |
---|
698 | 711 | |
---|
699 | 712 | oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
834 | 847 | |
---|
835 | 848 | oe.treePanel.add(copyOptionsPanel); |
---|
836 | 849 | oe.treePanel.Return(); |
---|
837 | | - cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 10, 0); |
---|
838 | | - versionField = (cNumberSlider)sliderPane.getComponent(1); |
---|
| 850 | + cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); |
---|
| 851 | + versionSlider = (cNumberSlider)sliderPane.getComponent(1); |
---|
839 | 852 | sliderPane.preferredHeight = 1; |
---|
840 | 853 | |
---|
841 | 854 | // mainPanel.setDividerLocation(0.5); //1.0); |
---|
.. | .. |
---|
859 | 872 | dgr.addDragGestureListener(this); |
---|
860 | 873 | }catch(Exception e) {} |
---|
861 | 874 | */ |
---|
862 | | - radio.layout = sevenButton; |
---|
| 875 | + radio.layout = sixButton; // sevenButton; |
---|
863 | 876 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
864 | 877 | } |
---|
865 | 878 | |
---|
.. | .. |
---|
1001 | 1014 | } |
---|
1002 | 1015 | |
---|
1003 | 1016 | radioButton.SetObject(obj); |
---|
1004 | | - radioButton.layout = sevenButton; |
---|
| 1017 | + radioButton.layout = sixButton; // sevenButton; |
---|
1005 | 1018 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
1006 | 1019 | radioButton.addActionListener(this); |
---|
1007 | 1020 | radioPanel.add(radioButton); |
---|
.. | .. |
---|
1680 | 1693 | listUI.remove(i); |
---|
1681 | 1694 | } |
---|
1682 | 1695 | } |
---|
| 1696 | + } |
---|
| 1697 | + |
---|
| 1698 | + private void EditElement(Object3D elem, boolean newWindow) |
---|
| 1699 | + { |
---|
| 1700 | + // if (!(elem instanceof Composite)) |
---|
| 1701 | + // newWindow = false; |
---|
| 1702 | + listUI.add(elem); |
---|
| 1703 | + elem.openEditWindow(this, newWindow); //, false); |
---|
| 1704 | + System.out.println("edit : " + elem); |
---|
| 1705 | + elem.editWindow.refreshContents(true); // ? new |
---|
1683 | 1706 | } |
---|
1684 | 1707 | |
---|
1685 | 1708 | /** |
---|
.. | .. |
---|
2646 | 2669 | { |
---|
2647 | 2670 | StepAll(); |
---|
2648 | 2671 | } else |
---|
2649 | | - if (source == clearItem) // || event.getSource() == clearButton) |
---|
| 2672 | + if (source == deleteItem) // || event.getSource() == clearButton) |
---|
2650 | 2673 | { |
---|
2651 | 2674 | //int indices[] = jList.getSelectedIndices(); |
---|
2652 | 2675 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
3541 | 3564 | radio.layout.doClick(); |
---|
3542 | 3565 | |
---|
3543 | 3566 | ClearUnpinned(); |
---|
3544 | | - SetPinStates(group.selection.size() > 0); |
---|
3545 | | - if (group.selection.size() == 1) |
---|
| 3567 | + //Grafreed.Assert(group != null); |
---|
| 3568 | + //Grafreed.Assert(group.selection != null); |
---|
| 3569 | + SetPinStates(group.selection == null || group.selection.size() > 0); |
---|
| 3570 | + if (group.selection == null || group.selection.size() == 1) |
---|
3546 | 3571 | EditSelection(false); |
---|
3547 | 3572 | keepparent = group.parent; |
---|
3548 | 3573 | // PARENT = NULL or not??? |
---|
.. | .. |
---|
4613 | 4638 | |
---|
4614 | 4639 | void EditSelection(boolean newWindow) |
---|
4615 | 4640 | { |
---|
| 4641 | + if (group.selection == null) |
---|
| 4642 | + { |
---|
| 4643 | + EditElement(group, newWindow); // ? new |
---|
| 4644 | + return; |
---|
| 4645 | + } |
---|
| 4646 | + |
---|
4616 | 4647 | // aConstraints.gridy = 0; |
---|
4617 | 4648 | for (int i=0; i<group.selection.size(); i++) |
---|
4618 | 4649 | { |
---|
.. | .. |
---|
4623 | 4654 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4624 | 4655 | if(elem != group || !newWindow) |
---|
4625 | 4656 | { |
---|
4626 | | - // if (!(elem instanceof Composite)) |
---|
4627 | | - // newWindow = false; |
---|
4628 | | - listUI.add(elem); |
---|
4629 | | - elem.openEditWindow(this, newWindow); //, false); |
---|
4630 | | - System.out.println("edit : " + elem); |
---|
4631 | | - elem.editWindow.refreshContents(true); // ? new |
---|
| 4657 | + EditElement(elem, newWindow); // ? new |
---|
4632 | 4658 | } |
---|
4633 | 4659 | } |
---|
4634 | 4660 | } |
---|
.. | .. |
---|
5681 | 5707 | private MenuItem pasteLinkItem; |
---|
5682 | 5708 | private MenuItem pasteCloneItem; |
---|
5683 | 5709 | private MenuItem pasteExpandItem; |
---|
5684 | | - private MenuItem clearItem; |
---|
| 5710 | + private MenuItem deleteItem; |
---|
5685 | 5711 | private MenuItem clearAllItem; |
---|
5686 | 5712 | private MenuItem genUVItem; |
---|
5687 | 5713 | private MenuItem genNormalsMESHItem; |
---|