.. | .. |
---|
80 | 80 | this.copy = this.group = copy; |
---|
81 | 81 | //selectees = this.group.selectees; |
---|
82 | 82 | |
---|
83 | | - if (copy.versions == null) |
---|
84 | | - { |
---|
85 | | - copy.versions = new byte[100][]; |
---|
86 | | - copy.versionindex = -1; |
---|
87 | | - } |
---|
88 | | - |
---|
89 | 83 | SetupMenu2(this); //objEditor); |
---|
90 | 84 | SetupUI2(objEditor); |
---|
91 | 85 | objEditor.SetupUI(true); |
---|
92 | 86 | SetupViews(objEditor); |
---|
93 | 87 | |
---|
94 | 88 | ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true); |
---|
| 89 | + |
---|
| 90 | + if (copy.versions == null) |
---|
| 91 | + { |
---|
| 92 | + copy.versions = new byte[100][]; |
---|
| 93 | + copy.versionindex = -1; |
---|
| 94 | + |
---|
| 95 | + Save(true); |
---|
| 96 | + } |
---|
95 | 97 | } |
---|
96 | 98 | |
---|
97 | 99 | void CloneSelection(boolean supports) |
---|
.. | .. |
---|
206 | 208 | // pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
207 | 209 | // pasteExpandItem.addActionListener(this); |
---|
208 | 210 | menu.add("-"); |
---|
209 | | - clearItem = menu.add(new MenuItem("Clear")); |
---|
210 | | - clearItem.addActionListener(this); |
---|
| 211 | + deleteItem = menu.add(new MenuItem("Delete")); |
---|
| 212 | + deleteItem.addActionListener(this); |
---|
211 | 213 | |
---|
212 | 214 | if (Globals.ADVANCED) |
---|
213 | 215 | { |
---|
.. | .. |
---|
433 | 435 | genNormalsMESHItem.addActionListener(this); |
---|
434 | 436 | if (Globals.ADVANCED) |
---|
435 | 437 | { |
---|
436 | | - genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
| 438 | + genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals")); |
---|
437 | 439 | genNormalsMINEItem.addActionListener(this); |
---|
438 | 440 | } |
---|
439 | 441 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
.. | .. |
---|
685 | 687 | |
---|
686 | 688 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
687 | 689 | |
---|
688 | | - oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
689 | | - twoButton.setToolTipText("Show center view only"); |
---|
690 | | - twoButton.addActionListener(this); |
---|
691 | | - this.fullscreenLayout = twoButton; |
---|
692 | | - |
---|
693 | 690 | oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
694 | 691 | fourButton.addActionListener(this); |
---|
695 | 692 | fourButton.setToolTipText("Show left panel only"); |
---|
| 693 | + |
---|
| 694 | + oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 695 | + twoButton.setToolTipText("Show right view only"); |
---|
| 696 | + twoButton.addActionListener(this); |
---|
| 697 | + this.fullscreenLayout = twoButton; |
---|
| 698 | + |
---|
696 | 699 | oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
697 | | - sixButton.setToolTipText("2-column layout left"); |
---|
| 700 | + sixButton.setToolTipText("Show left and right"); |
---|
698 | 701 | sixButton.addActionListener(this); |
---|
699 | | - oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
700 | | - threeButton.setToolTipText("2-column layout right"); |
---|
701 | | - threeButton.addActionListener(this); |
---|
702 | | - oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
703 | | - sevenButton.setToolTipText("3-column layout"); |
---|
704 | | - sevenButton.addActionListener(this); |
---|
| 702 | +// oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 703 | +// threeButton.setToolTipText("2-column layout right"); |
---|
| 704 | +// threeButton.addActionListener(this); |
---|
| 705 | +// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 706 | +// sevenButton.setToolTipText("3-column layout"); |
---|
| 707 | +// sevenButton.addActionListener(this); |
---|
705 | 708 | // |
---|
706 | 709 | |
---|
707 | | - oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
708 | | - rootButton.setToolTipText("Edit selection in new tab"); |
---|
| 710 | + oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 711 | + rootButton.setToolTipText("Open selection in new tab"); |
---|
709 | 712 | rootButton.addActionListener(this); |
---|
710 | 713 | |
---|
711 | 714 | oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
871 | 874 | dgr.addDragGestureListener(this); |
---|
872 | 875 | }catch(Exception e) {} |
---|
873 | 876 | */ |
---|
874 | | - radio.layout = sevenButton; |
---|
| 877 | + radio.layout = sixButton; // sevenButton; |
---|
875 | 878 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
876 | 879 | } |
---|
877 | 880 | |
---|
.. | .. |
---|
1013 | 1016 | } |
---|
1014 | 1017 | |
---|
1015 | 1018 | radioButton.SetObject(obj); |
---|
1016 | | - radioButton.layout = sevenButton; |
---|
| 1019 | + radioButton.layout = sixButton; // sevenButton; |
---|
1017 | 1020 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
1018 | 1021 | radioButton.addActionListener(this); |
---|
1019 | 1022 | radioPanel.add(radioButton); |
---|
.. | .. |
---|
1692 | 1695 | listUI.remove(i); |
---|
1693 | 1696 | } |
---|
1694 | 1697 | } |
---|
| 1698 | + } |
---|
| 1699 | + |
---|
| 1700 | + private void EditElement(Object3D elem, boolean newWindow) |
---|
| 1701 | + { |
---|
| 1702 | + // if (!(elem instanceof Composite)) |
---|
| 1703 | + // newWindow = false; |
---|
| 1704 | + listUI.add(elem); |
---|
| 1705 | + elem.openEditWindow(this, newWindow); //, false); |
---|
| 1706 | + System.out.println("edit : " + elem); |
---|
| 1707 | + elem.editWindow.refreshContents(true); // ? new |
---|
1695 | 1708 | } |
---|
1696 | 1709 | |
---|
1697 | 1710 | /** |
---|
.. | .. |
---|
2658 | 2671 | { |
---|
2659 | 2672 | StepAll(); |
---|
2660 | 2673 | } else |
---|
2661 | | - if (source == clearItem) // || event.getSource() == clearButton) |
---|
| 2674 | + if (source == deleteItem) // || event.getSource() == clearButton) |
---|
2662 | 2675 | { |
---|
2663 | 2676 | //int indices[] = jList.getSelectedIndices(); |
---|
2664 | 2677 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
3553 | 3566 | radio.layout.doClick(); |
---|
3554 | 3567 | |
---|
3555 | 3568 | ClearUnpinned(); |
---|
3556 | | - Grafreed.Assert(group != null); |
---|
3557 | | - Grafreed.Assert(group.selection != null); |
---|
3558 | | - SetPinStates(group.selection.size() > 0); |
---|
3559 | | - if (group.selection.size() == 1) |
---|
| 3569 | + //Grafreed.Assert(group != null); |
---|
| 3570 | + //Grafreed.Assert(group.selection != null); |
---|
| 3571 | + SetPinStates(group.selection == null || group.selection.size() > 0); |
---|
| 3572 | + if (group.selection == null || group.selection.size() == 1) |
---|
3560 | 3573 | EditSelection(false); |
---|
3561 | 3574 | keepparent = group.parent; |
---|
3562 | 3575 | // PARENT = NULL or not??? |
---|
.. | .. |
---|
4150 | 4163 | |
---|
4151 | 4164 | try |
---|
4152 | 4165 | { |
---|
4153 | | - texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 4166 | + texturedata = Globals.theRenderer.GetTextureData(tex.pigmenttexture, pigment, false, node.texres); |
---|
4154 | 4167 | } |
---|
4155 | 4168 | catch (Exception e) |
---|
4156 | 4169 | { |
---|
.. | .. |
---|
4627 | 4640 | |
---|
4628 | 4641 | void EditSelection(boolean newWindow) |
---|
4629 | 4642 | { |
---|
| 4643 | + if (group.selection == null) |
---|
| 4644 | + { |
---|
| 4645 | + EditElement(group, newWindow); // ? new |
---|
| 4646 | + return; |
---|
| 4647 | + } |
---|
| 4648 | + |
---|
4630 | 4649 | // aConstraints.gridy = 0; |
---|
4631 | 4650 | for (int i=0; i<group.selection.size(); i++) |
---|
4632 | 4651 | { |
---|
.. | .. |
---|
4637 | 4656 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4638 | 4657 | if(elem != group || !newWindow) |
---|
4639 | 4658 | { |
---|
4640 | | - // if (!(elem instanceof Composite)) |
---|
4641 | | - // newWindow = false; |
---|
4642 | | - listUI.add(elem); |
---|
4643 | | - elem.openEditWindow(this, newWindow); //, false); |
---|
4644 | | - System.out.println("edit : " + elem); |
---|
4645 | | - elem.editWindow.refreshContents(true); // ? new |
---|
| 4659 | + EditElement(elem, newWindow); // ? new |
---|
4646 | 4660 | } |
---|
4647 | 4661 | } |
---|
4648 | 4662 | } |
---|
.. | .. |
---|
4786 | 4800 | |
---|
4787 | 4801 | void refreshContents(boolean cp) |
---|
4788 | 4802 | { |
---|
4789 | | - if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info")) |
---|
| 4803 | + if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
4790 | 4804 | if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
4791 | 4805 | { |
---|
4792 | 4806 | objEditor.ClearInfo(); // .GetMaterial()); |
---|
.. | .. |
---|
5695 | 5709 | private MenuItem pasteLinkItem; |
---|
5696 | 5710 | private MenuItem pasteCloneItem; |
---|
5697 | 5711 | private MenuItem pasteExpandItem; |
---|
5698 | | - private MenuItem clearItem; |
---|
| 5712 | + private MenuItem deleteItem; |
---|
5699 | 5713 | private MenuItem clearAllItem; |
---|
5700 | 5714 | private MenuItem genUVItem; |
---|
5701 | 5715 | private MenuItem genNormalsMESHItem; |
---|