.. | .. |
---|
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); |
---|
.. | .. |
---|
84 | 96 | |
---|
85 | 97 | void CloneSelection(boolean supports) |
---|
86 | 98 | { |
---|
| 99 | + if (Globals.REPLACEONMAKE) |
---|
| 100 | + Save(); |
---|
| 101 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 102 | + Globals.REPLACEONMAKE = false; |
---|
87 | 103 | // Object3D keep = GrafreeD.clipboard; |
---|
88 | 104 | //Object3D obj; |
---|
89 | 105 | for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
94 | 110 | |
---|
95 | 111 | makeSomething(clone, i==group.selection.size()-1); |
---|
96 | 112 | } |
---|
| 113 | + Globals.REPLACEONMAKE = keep; |
---|
97 | 114 | } |
---|
98 | 115 | |
---|
99 | 116 | void CloneClipboard(boolean supports) |
---|
.. | .. |
---|
189 | 206 | // pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
190 | 207 | // pasteExpandItem.addActionListener(this); |
---|
191 | 208 | menu.add("-"); |
---|
192 | | - clearItem = menu.add(new MenuItem("Clear")); |
---|
193 | | - clearItem.addActionListener(this); |
---|
| 209 | + deleteItem = menu.add(new MenuItem("Delete")); |
---|
| 210 | + deleteItem.addActionListener(this); |
---|
194 | 211 | |
---|
195 | 212 | if (Globals.ADVANCED) |
---|
196 | 213 | { |
---|
.. | .. |
---|
380 | 397 | shadowYItem.addActionListener(this); |
---|
381 | 398 | shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
382 | 399 | shadowZItem.addActionListener(this); |
---|
| 400 | + attributeItem = menu.add(new MenuItem("Attribute")); |
---|
| 401 | + attributeItem.addActionListener(this); |
---|
383 | 402 | |
---|
384 | 403 | if (Globals.ADVANCED) |
---|
385 | 404 | { |
---|
386 | 405 | menu.add("-"); |
---|
387 | 406 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
388 | 407 | linkerItem.addActionListener(this); |
---|
389 | | - attributeItem = menu.add(new MenuItem("Attribute")); |
---|
390 | | - attributeItem.addActionListener(this); |
---|
391 | 408 | templateItem = menu.add(new MenuItem("Template")); |
---|
392 | 409 | templateItem.addActionListener(this); |
---|
393 | 410 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
.. | .. |
---|
416 | 433 | genNormalsMESHItem.addActionListener(this); |
---|
417 | 434 | if (Globals.ADVANCED) |
---|
418 | 435 | { |
---|
419 | | - genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
| 436 | + genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals")); |
---|
420 | 437 | genNormalsMINEItem.addActionListener(this); |
---|
421 | 438 | } |
---|
422 | 439 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
.. | .. |
---|
539 | 556 | buildToolsMenu(menu); |
---|
540 | 557 | } |
---|
541 | 558 | |
---|
| 559 | + |
---|
542 | 560 | void SetupUI2(ObjEditor oe) |
---|
543 | 561 | { |
---|
544 | 562 | // June 2019 |
---|
.. | .. |
---|
610 | 628 | restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
611 | 629 | restoreCameraButton.addActionListener(this); |
---|
612 | 630 | |
---|
| 631 | + copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 632 | + saveButton.setToolTipText("New version"); |
---|
| 633 | + saveButton.addActionListener(this); |
---|
| 634 | + |
---|
613 | 635 | copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
614 | | - undoButton.setToolTipText("Undo changes"); |
---|
| 636 | + undoButton.setToolTipText("Previous version"); |
---|
615 | 637 | undoButton.addActionListener(this); |
---|
616 | 638 | undoButton.setEnabled(false); |
---|
617 | 639 | |
---|
| 640 | + cGridBag updown = new cGridBag().setVertical(true); |
---|
| 641 | + updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 642 | + restoreButton.setToolTipText("Restore current"); |
---|
| 643 | + restoreButton.addActionListener(this); |
---|
| 644 | + restoreButton.setEnabled(false); |
---|
| 645 | + |
---|
| 646 | + updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 647 | + replaceButton.setToolTipText("Replace current"); |
---|
| 648 | + replaceButton.addActionListener(this); |
---|
| 649 | + replaceButton.setEnabled(false); |
---|
| 650 | + |
---|
| 651 | + copyOptionsPanel.add(updown); |
---|
| 652 | + |
---|
618 | 653 | copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
619 | | - redoButton.setToolTipText("Redo changes"); |
---|
| 654 | + redoButton.setToolTipText("Next version"); |
---|
620 | 655 | redoButton.addActionListener(this); |
---|
621 | 656 | redoButton.setEnabled(false); |
---|
622 | 657 | |
---|
623 | | - copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
624 | | - saveButton.setToolTipText("Save changes"); |
---|
625 | | - saveButton.addActionListener(this); |
---|
626 | | - |
---|
627 | | - copyOptionsPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 658 | + oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
628 | 659 | liveCB.setToolTipText("Enable animation"); |
---|
629 | 660 | liveCB.addItemListener(this); |
---|
630 | 661 | |
---|
631 | | - copyOptionsPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 662 | + oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
632 | 663 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
633 | 664 | oneStepButton.addActionListener(this); |
---|
634 | 665 | |
---|
635 | | - copyOptionsPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
| 666 | + oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
636 | 667 | fastCB.setToolTipText("Fast mode"); |
---|
637 | 668 | fastCB.addItemListener(this); |
---|
638 | 669 | |
---|
.. | .. |
---|
654 | 685 | |
---|
655 | 686 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
656 | 687 | |
---|
657 | | - oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
658 | | - twoButton.setToolTipText("Show center view only"); |
---|
659 | | - twoButton.addActionListener(this); |
---|
660 | | - this.fullscreenLayout = twoButton; |
---|
661 | | - |
---|
662 | 688 | oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
663 | 689 | fourButton.addActionListener(this); |
---|
664 | 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 | + |
---|
665 | 697 | oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
666 | | - sixButton.setToolTipText("2-column layout left"); |
---|
| 698 | + sixButton.setToolTipText("Show left and right"); |
---|
667 | 699 | sixButton.addActionListener(this); |
---|
668 | | - oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
669 | | - threeButton.setToolTipText("2-column layout right"); |
---|
670 | | - threeButton.addActionListener(this); |
---|
671 | | - oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
672 | | - sevenButton.setToolTipText("3-column layout"); |
---|
673 | | - 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); |
---|
674 | 706 | // |
---|
675 | 707 | |
---|
676 | | - oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
677 | | - 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"); |
---|
678 | 710 | rootButton.addActionListener(this); |
---|
679 | 711 | |
---|
680 | 712 | oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
815 | 847 | |
---|
816 | 848 | oe.treePanel.add(copyOptionsPanel); |
---|
817 | 849 | oe.treePanel.Return(); |
---|
| 850 | + cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); |
---|
| 851 | + versionSlider = (cNumberSlider)sliderPane.getComponent(1); |
---|
| 852 | + sliderPane.preferredHeight = 1; |
---|
818 | 853 | |
---|
819 | 854 | // mainPanel.setDividerLocation(0.5); //1.0); |
---|
820 | 855 | // mainPanel.setResizeWeight(0.5); |
---|
.. | .. |
---|
837 | 872 | dgr.addDragGestureListener(this); |
---|
838 | 873 | }catch(Exception e) {} |
---|
839 | 874 | */ |
---|
840 | | - radio.layout = sevenButton; |
---|
| 875 | + radio.layout = sixButton; // sevenButton; |
---|
841 | 876 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
842 | 877 | } |
---|
843 | 878 | |
---|
.. | .. |
---|
940 | 975 | toggleSwitchCB.setToolTipText("Choose a single item"); |
---|
941 | 976 | toggleSwitchCB.addItemListener(this); |
---|
942 | 977 | |
---|
943 | | - panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); |
---|
944 | | - autosaveCB.setToolTipText("On structure change"); |
---|
945 | | - autosaveCB.addItemListener(this); |
---|
| 978 | + panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints); |
---|
| 979 | + autokeepCB.setToolTipText("On structure change"); |
---|
| 980 | + autokeepCB.addItemListener(this); |
---|
946 | 981 | |
---|
947 | 982 | panel.Return(); |
---|
948 | 983 | if (Globals.ADVANCED) |
---|
.. | .. |
---|
971 | 1006 | { |
---|
972 | 1007 | cRadio radioButton = new cRadio(obj.name); |
---|
973 | 1008 | |
---|
974 | | - // Patch to avoid bug with transparency. |
---|
| 1009 | + // June 2019. Patch to avoid bug with transparency. |
---|
975 | 1010 | radioButton.hadMaterial = obj.material != null; |
---|
976 | 1011 | if (!radioButton.hadMaterial) |
---|
977 | 1012 | { |
---|
.. | .. |
---|
979 | 1014 | } |
---|
980 | 1015 | |
---|
981 | 1016 | radioButton.SetObject(obj); |
---|
982 | | - radioButton.layout = sevenButton; |
---|
| 1017 | + radioButton.layout = sixButton; // sevenButton; |
---|
983 | 1018 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
984 | 1019 | radioButton.addActionListener(this); |
---|
985 | 1020 | radioPanel.add(radioButton); |
---|
.. | .. |
---|
1019 | 1054 | |
---|
1020 | 1055 | cCheckBox oeilCB; |
---|
1021 | 1056 | cCheckBox shadowCB; |
---|
1022 | | - cCheckBox autosaveCB; |
---|
| 1057 | + cCheckBox autokeepCB; |
---|
1023 | 1058 | cCheckBox lookAtCB; |
---|
1024 | 1059 | |
---|
1025 | 1060 | // static int COLOR = 1; |
---|
.. | .. |
---|
1131 | 1166 | { |
---|
1132 | 1167 | Globals.FREEZEONMOVE ^= true; |
---|
1133 | 1168 | } |
---|
1134 | | - else if(e.getSource() == autosaveCB) |
---|
| 1169 | + else if(e.getSource() == autokeepCB) |
---|
1135 | 1170 | { |
---|
1136 | | - Globals.SAVEONMAKE ^= true; |
---|
| 1171 | + Globals.REPLACEONMAKE ^= true; |
---|
1137 | 1172 | } |
---|
1138 | 1173 | else if(e.getSource() == lookAtCB) |
---|
1139 | 1174 | { |
---|
.. | .. |
---|
1223 | 1258 | // return; |
---|
1224 | 1259 | // } |
---|
1225 | 1260 | |
---|
1226 | | - String string = (String) object; |
---|
| 1261 | + String string = object.toString(); |
---|
1227 | 1262 | |
---|
1228 | 1263 | // File path for Mac and Windows |
---|
1229 | 1264 | if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
.. | .. |
---|
1488 | 1523 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1489 | 1524 | reduce34MorphItem.addActionListener(this); |
---|
1490 | 1525 | menu.add("-"); |
---|
| 1526 | + menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
| 1527 | + memoryItem.addActionListener(this); |
---|
1491 | 1528 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1492 | 1529 | computeAOItem.addActionListener(this); |
---|
1493 | 1530 | |
---|
.. | .. |
---|
1496 | 1533 | mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1497 | 1534 | mirrorItem.addActionListener(this); |
---|
1498 | 1535 | menu.add("-"); |
---|
1499 | | - menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1500 | | - memoryItem.addActionListener(this); |
---|
1501 | 1536 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1502 | 1537 | analyzeItem.addActionListener(this); |
---|
1503 | 1538 | menu.add(dumpItem = new MenuItem("Print")); |
---|
.. | .. |
---|
1658 | 1693 | listUI.remove(i); |
---|
1659 | 1694 | } |
---|
1660 | 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 |
---|
1661 | 1706 | } |
---|
1662 | 1707 | |
---|
1663 | 1708 | /** |
---|
.. | .. |
---|
2220 | 2265 | } else |
---|
2221 | 2266 | if (source == undoButton) |
---|
2222 | 2267 | { |
---|
2223 | | - if (!Undo()) |
---|
2224 | | - java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 2268 | + // Go to previous version |
---|
| 2269 | + //if (!Undo()) |
---|
| 2270 | + //java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 2271 | + Undo(); |
---|
| 2272 | + } else |
---|
| 2273 | + if (source == restoreButton) |
---|
| 2274 | + { |
---|
| 2275 | + // Restore current version |
---|
| 2276 | + Restore(); |
---|
| 2277 | + } else |
---|
| 2278 | + if (source == replaceButton) |
---|
| 2279 | + { |
---|
| 2280 | + // Overwrite current version |
---|
| 2281 | + Replace(); |
---|
2225 | 2282 | } else |
---|
2226 | 2283 | if (source == redoButton) |
---|
2227 | 2284 | { |
---|
| 2285 | + // Go to next version |
---|
2228 | 2286 | Redo(); |
---|
2229 | 2287 | } else |
---|
2230 | 2288 | if (source == saveButton) |
---|
2231 | 2289 | { |
---|
| 2290 | + // Save a new version |
---|
2232 | 2291 | if (!Save(true)) |
---|
2233 | 2292 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2234 | 2293 | } else |
---|
.. | .. |
---|
2610 | 2669 | { |
---|
2611 | 2670 | StepAll(); |
---|
2612 | 2671 | } else |
---|
2613 | | - if (source == clearItem) // || event.getSource() == clearButton) |
---|
| 2672 | + if (source == deleteItem) // || event.getSource() == clearButton) |
---|
2614 | 2673 | { |
---|
2615 | 2674 | //int indices[] = jList.getSelectedIndices(); |
---|
2616 | 2675 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
3474 | 3533 | } |
---|
3475 | 3534 | |
---|
3476 | 3535 | copy = group; |
---|
| 3536 | + |
---|
| 3537 | + SetUndoStates(); |
---|
| 3538 | + |
---|
3477 | 3539 | //Globals.theRenderer.object = group; |
---|
3478 | 3540 | if(!useclient) |
---|
3479 | 3541 | { |
---|
.. | .. |
---|
3502 | 3564 | radio.layout.doClick(); |
---|
3503 | 3565 | |
---|
3504 | 3566 | ClearUnpinned(); |
---|
3505 | | - SetPinStates(group.selection.size() > 0); |
---|
3506 | | - 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) |
---|
3507 | 3571 | EditSelection(false); |
---|
3508 | 3572 | keepparent = group.parent; |
---|
3509 | 3573 | // PARENT = NULL or not??? |
---|
.. | .. |
---|
4574 | 4638 | |
---|
4575 | 4639 | void EditSelection(boolean newWindow) |
---|
4576 | 4640 | { |
---|
| 4641 | + if (group.selection == null) |
---|
| 4642 | + { |
---|
| 4643 | + EditElement(group, newWindow); // ? new |
---|
| 4644 | + return; |
---|
| 4645 | + } |
---|
| 4646 | + |
---|
4577 | 4647 | // aConstraints.gridy = 0; |
---|
4578 | 4648 | for (int i=0; i<group.selection.size(); i++) |
---|
4579 | 4649 | { |
---|
.. | .. |
---|
4584 | 4654 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4585 | 4655 | if(elem != group || !newWindow) |
---|
4586 | 4656 | { |
---|
4587 | | - // if (!(elem instanceof Composite)) |
---|
4588 | | - // newWindow = false; |
---|
4589 | | - listUI.add(elem); |
---|
4590 | | - elem.openEditWindow(this, newWindow); //, false); |
---|
4591 | | - System.out.println("edit : " + elem); |
---|
4592 | | - elem.editWindow.refreshContents(true); // ? new |
---|
| 4657 | + EditElement(elem, newWindow); // ? new |
---|
4593 | 4658 | } |
---|
4594 | 4659 | } |
---|
4595 | 4660 | } |
---|
.. | .. |
---|
4833 | 4898 | |
---|
4834 | 4899 | if (cut) |
---|
4835 | 4900 | { |
---|
4836 | | - if (Globals.SAVEONMAKE) |
---|
4837 | | - Save(); |
---|
| 4901 | +// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save. |
---|
| 4902 | +// Save(); |
---|
4838 | 4903 | //int indices[] = jList.getSelectedIndices(); |
---|
4839 | 4904 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4840 | 4905 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4937 | 5002 | |
---|
4938 | 5003 | void paste(boolean expand) |
---|
4939 | 5004 | { |
---|
| 5005 | + if (Globals.REPLACEONMAKE) |
---|
| 5006 | + Save(); |
---|
| 5007 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5008 | + Globals.REPLACEONMAKE = false; |
---|
4940 | 5009 | // if (GrafreeD.clipboard == null) |
---|
4941 | 5010 | // return; |
---|
4942 | 5011 | boolean first = true; |
---|
.. | .. |
---|
4996 | 5065 | Grafreed.clipboard.get(0).parent = keepparent; |
---|
4997 | 5066 | } |
---|
4998 | 5067 | |
---|
| 5068 | + Globals.REPLACEONMAKE = keep; |
---|
4999 | 5069 | ResetModel(); |
---|
5000 | 5070 | refreshContents(); |
---|
5001 | 5071 | } |
---|
.. | .. |
---|
5131 | 5201 | |
---|
5132 | 5202 | void group(Object3D csg, boolean grab) |
---|
5133 | 5203 | { |
---|
| 5204 | + if (Globals.REPLACEONMAKE) |
---|
| 5205 | + Save(); |
---|
| 5206 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5207 | + Globals.REPLACEONMAKE = false; |
---|
5134 | 5208 | if (//false) // why?? |
---|
5135 | 5209 | !group.selection.isEmpty()) |
---|
5136 | 5210 | { |
---|
.. | .. |
---|
5244 | 5318 | //node.add(csg); |
---|
5245 | 5319 | //makeSomething(node); |
---|
5246 | 5320 | makeSomething(csg); |
---|
| 5321 | + Globals.REPLACEONMAKE = keep; |
---|
5247 | 5322 | } |
---|
5248 | 5323 | |
---|
5249 | 5324 | void Ungroup(Object3D g) |
---|
5250 | 5325 | { |
---|
| 5326 | + if (Globals.REPLACEONMAKE) |
---|
| 5327 | + Save(); |
---|
| 5328 | + boolean keep = Globals.REPLACEONMAKE; |
---|
| 5329 | + Globals.REPLACEONMAKE = false; |
---|
5251 | 5330 | if (g instanceof HiddenObject) |
---|
5252 | 5331 | { |
---|
5253 | 5332 | HiddenObject h = (HiddenObject) g; |
---|
.. | .. |
---|
5264 | 5343 | objEditor.makeSomething(g.get(i), false); |
---|
5265 | 5344 | } |
---|
5266 | 5345 | } |
---|
| 5346 | + Globals.REPLACEONMAKE = keep; |
---|
5267 | 5347 | } |
---|
5268 | 5348 | |
---|
5269 | 5349 | void ungroup() |
---|
.. | .. |
---|
5627 | 5707 | private MenuItem pasteLinkItem; |
---|
5628 | 5708 | private MenuItem pasteCloneItem; |
---|
5629 | 5709 | private MenuItem pasteExpandItem; |
---|
5630 | | - private MenuItem clearItem; |
---|
| 5710 | + private MenuItem deleteItem; |
---|
5631 | 5711 | private MenuItem clearAllItem; |
---|
5632 | 5712 | private MenuItem genUVItem; |
---|
5633 | 5713 | private MenuItem genNormalsMESHItem; |
---|