Normand Briere
2019-07-24 ebd16116fc612bf14e2469ba27dd7ee54918eabb
GroupEditor.java
....@@ -60,6 +60,12 @@
6060 this.copy = this.group = group;
6161 //selectees = this.group.selectees;
6262
63
+ if (copy.versions == null)
64
+ {
65
+ copy.versions = new byte[100][];
66
+ copy.versionindex = -1;
67
+ }
68
+
6369 if(ui)
6470 SetupUI(objEditor);
6571 }
....@@ -80,10 +86,22 @@
8086 SetupViews(objEditor);
8187
8288 ((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
+ }
8397 }
8498
8599 void CloneSelection(boolean supports)
86100 {
101
+ if (Globals.REPLACEONMAKE)
102
+ Save();
103
+ boolean keep = Globals.REPLACEONMAKE;
104
+ Globals.REPLACEONMAKE = false;
87105 // Object3D keep = GrafreeD.clipboard;
88106 //Object3D obj;
89107 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -94,6 +112,7 @@
94112
95113 makeSomething(clone, i==group.selection.size()-1);
96114 }
115
+ Globals.REPLACEONMAKE = keep;
97116 }
98117
99118 void CloneClipboard(boolean supports)
....@@ -189,8 +208,8 @@
189208 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
190209 // pasteExpandItem.addActionListener(this);
191210 menu.add("-");
192
- clearItem = menu.add(new MenuItem("Clear"));
193
- clearItem.addActionListener(this);
211
+ deleteItem = menu.add(new MenuItem("Delete"));
212
+ deleteItem.addActionListener(this);
194213
195214 if (Globals.ADVANCED)
196215 {
....@@ -380,13 +399,14 @@
380399 shadowYItem.addActionListener(this);
381400 shadowZItem = menu.add(new MenuItem("Shadow Blue"));
382401 shadowZItem.addActionListener(this);
402
+ attributeItem = menu.add(new MenuItem("Attribute"));
403
+ attributeItem.addActionListener(this);
404
+
383405 if (Globals.ADVANCED)
384406 {
385407 menu.add("-");
386408 linkerItem = menu.add(new MenuItem("Linker"));
387409 linkerItem.addActionListener(this);
388
- attributeItem = menu.add(new MenuItem("Attribute"));
389
- attributeItem.addActionListener(this);
390410 templateItem = menu.add(new MenuItem("Template"));
391411 templateItem.addActionListener(this);
392412 pointflowItem = menu.add(new MenuItem("Point Flow"));
....@@ -415,7 +435,7 @@
415435 genNormalsMESHItem.addActionListener(this);
416436 if (Globals.ADVANCED)
417437 {
418
- genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
438
+ genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals"));
419439 genNormalsMINEItem.addActionListener(this);
420440 }
421441 stripifyItem = menu.add(new MenuItem("Stripify"));
....@@ -508,10 +528,15 @@
508528 attachBumpItem.addActionListener(this);
509529 pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump"));
510530 pigmentBumpItem.addActionListener(this);
531
+ //embedTexturesItem
511532 detachPigmentItem = menu.add(new MenuItem("Detach Pigment"));
512533 detachPigmentItem.addActionListener(this);
513534 detachBumpItem = menu.add(new MenuItem("Detach Bump"));
514535 detachBumpItem.addActionListener(this);
536
+ embedTexturesItem = menu.add(new MenuItem("Embed Textures"));
537
+ embedTexturesItem.addActionListener(this);
538
+ deEmbedTexturesItem = menu.add(new MenuItem("De-embed Textures"));
539
+ deEmbedTexturesItem.addActionListener(this);
515540 menu.add("-");
516541 sortbysizeItem = menu.add(new MenuItem("Sort by size"));
517542 sortbysizeItem.addActionListener(this);
....@@ -538,6 +563,7 @@
538563 buildToolsMenu(menu);
539564 }
540565
566
+
541567 void SetupUI2(ObjEditor oe)
542568 {
543569 // June 2019
....@@ -601,42 +627,55 @@
601627 fullButton.setToolTipText("Full-screen window");
602628 fullButton.addActionListener(this);
603629
630
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
631
+ screenfitButton.setToolTipText("Screen fit");
632
+ screenfitButton.addActionListener(this);
633
+
604634 oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
605635 restoreCameraButton.setToolTipText("Restore viewpoint");
606636 restoreCameraButton.addActionListener(this);
607637
638
+ copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
639
+ saveButton.setToolTipText("New version");
640
+ saveButton.addActionListener(this);
641
+
608642 copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
609
- undoButton.setToolTipText("Undo changes");
643
+ undoButton.setToolTipText("Previous version");
610644 undoButton.addActionListener(this);
611645 undoButton.setEnabled(false);
612646
647
+ cGridBag updown = new cGridBag().setVertical(true);
648
+ updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
649
+ restoreButton.setToolTipText("Restore current");
650
+ restoreButton.addActionListener(this);
651
+ restoreButton.setEnabled(false);
652
+
653
+ updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
654
+ replaceButton.setToolTipText("Replace current");
655
+ replaceButton.addActionListener(this);
656
+ replaceButton.setEnabled(false);
657
+
658
+ copyOptionsPanel.add(updown);
659
+
613660 copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
614
- redoButton.setToolTipText("Redo changes");
661
+ redoButton.setToolTipText("Next version");
615662 redoButton.addActionListener(this);
616663 redoButton.setEnabled(false);
617664
618
- copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
619
- saveButton.setToolTipText("Save changes");
620
- saveButton.addActionListener(this);
621
-
622
- copyOptionsPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
665
+ oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
623666 liveCB.setToolTipText("Enable animation");
624667 liveCB.addItemListener(this);
625668
626
- copyOptionsPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
669
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
627670 oneStepButton.setToolTipText("Animate one step forward");
628671 oneStepButton.addActionListener(this);
629672
630
- copyOptionsPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
673
+ oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
631674 fastCB.setToolTipText("Fast mode");
632675 fastCB.addItemListener(this);
633676
634677 //oe.toolboxPanel.Return();
635678
636
- copyOptionsPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
637
- screenfitButton.setToolTipText("Screen fit");
638
- screenfitButton.addActionListener(this);
639
-
640679 // copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
641680 // trackCB.setToolTipText("Enable tracking");
642681 // trackCB.addItemListener(this);
....@@ -653,27 +692,28 @@
653692
654693 //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
655694
656
- oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
657
- twoButton.setToolTipText("Show center view only");
658
- twoButton.addActionListener(this);
659
- this.fullscreenLayout = twoButton;
660
-
661695 oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
662696 fourButton.addActionListener(this);
663697 fourButton.setToolTipText("Show left panel only");
698
+
699
+ oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
700
+ twoButton.setToolTipText("Show right view only");
701
+ twoButton.addActionListener(this);
702
+ this.fullscreenLayout = twoButton;
703
+
664704 oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
665
- sixButton.setToolTipText("2-column layout left");
705
+ sixButton.setToolTipText("Show left and right");
666706 sixButton.addActionListener(this);
667
- oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
668
- threeButton.setToolTipText("2-column layout right");
669
- threeButton.addActionListener(this);
670
- oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
671
- sevenButton.setToolTipText("3-column layout");
672
- sevenButton.addActionListener(this);
707
+// oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
708
+// threeButton.setToolTipText("2-column layout right");
709
+// threeButton.addActionListener(this);
710
+// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
711
+// sevenButton.setToolTipText("3-column layout");
712
+// sevenButton.addActionListener(this);
673713 //
674714
675
- oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
676
- rootButton.setToolTipText("Edit selection in new tab");
715
+ oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
716
+ rootButton.setToolTipText("Open selection in new tab");
677717 rootButton.addActionListener(this);
678718
679719 oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
....@@ -814,6 +854,9 @@
814854
815855 oe.treePanel.add(copyOptionsPanel);
816856 oe.treePanel.Return();
857
+ cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
858
+ versionSlider = (cNumberSlider)sliderPane.getComponent(1);
859
+ sliderPane.preferredHeight = 1;
817860
818861 // mainPanel.setDividerLocation(0.5); //1.0);
819862 // mainPanel.setResizeWeight(0.5);
....@@ -836,7 +879,7 @@
836879 dgr.addDragGestureListener(this);
837880 }catch(Exception e) {}
838881 */
839
- radio.layout = sevenButton;
882
+ radio.layout = sixButton; // sevenButton;
840883 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
841884 }
842885
....@@ -939,9 +982,9 @@
939982 toggleSwitchCB.setToolTipText("Choose a single item");
940983 toggleSwitchCB.addItemListener(this);
941984
942
- panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints);
943
- autosaveCB.setToolTipText("On structure change");
944
- autosaveCB.addItemListener(this);
985
+ panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints);
986
+ autokeepCB.setToolTipText("On structure change");
987
+ autokeepCB.addItemListener(this);
945988
946989 panel.Return();
947990 if (Globals.ADVANCED)
....@@ -970,7 +1013,7 @@
9701013 {
9711014 cRadio radioButton = new cRadio(obj.name);
9721015
973
- // Patch to avoid bug with transparency.
1016
+ // June 2019. Patch to avoid bug with transparency.
9741017 radioButton.hadMaterial = obj.material != null;
9751018 if (!radioButton.hadMaterial)
9761019 {
....@@ -978,7 +1021,7 @@
9781021 }
9791022
9801023 radioButton.SetObject(obj);
981
- radioButton.layout = sevenButton;
1024
+ radioButton.layout = sixButton; // sevenButton;
9821025 radioButton.SetCamera(cameraView.renderCamera, false);
9831026 radioButton.addActionListener(this);
9841027 radioPanel.add(radioButton);
....@@ -1018,7 +1061,7 @@
10181061
10191062 cCheckBox oeilCB;
10201063 cCheckBox shadowCB;
1021
- cCheckBox autosaveCB;
1064
+ cCheckBox autokeepCB;
10221065 cCheckBox lookAtCB;
10231066
10241067 // static int COLOR = 1;
....@@ -1130,9 +1173,9 @@
11301173 {
11311174 Globals.FREEZEONMOVE ^= true;
11321175 }
1133
- else if(e.getSource() == autosaveCB)
1176
+ else if(e.getSource() == autokeepCB)
11341177 {
1135
- Globals.SAVEONMAKE ^= true;
1178
+ Globals.REPLACEONMAKE ^= true;
11361179 }
11371180 else if(e.getSource() == lookAtCB)
11381181 {
....@@ -1214,8 +1257,6 @@
12141257 }
12151258 }
12161259
1217
- String string = (String) object;
1218
-
12191260 System.out.println("Transfer = " + object + "; drop : " + target);
12201261 // if( object instanceof java.io.File[])
12211262 // {
....@@ -1223,6 +1264,8 @@
12231264 // objEditor.DropFile((java.io.File[]) object, true);
12241265 // return;
12251266 // }
1267
+
1268
+ String string = object.toString();
12261269
12271270 // File path for Mac and Windows
12281271 if (string.charAt(0) == '/' || string.charAt(1) == ':')
....@@ -1472,6 +1515,9 @@
14721515 animationItem.addItemListener(this);
14731516 animationItem.setState(Globals.ANIMATION);
14741517
1518
+ menu.add(archiveItem = new MenuItem("Archive3D..."));
1519
+ archiveItem.addActionListener(this);
1520
+
14751521 menu.add("-");
14761522 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
14771523 parseverticesItem.addActionListener(this);
....@@ -1484,6 +1530,8 @@
14841530 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
14851531 reduce34MorphItem.addActionListener(this);
14861532 menu.add("-");
1533
+ menu.add(memoryItem = new MenuItem("Memory Usage"));
1534
+ memoryItem.addActionListener(this);
14871535 menu.add(computeAOItem = new MenuItem("Compute AO"));
14881536 computeAOItem.addActionListener(this);
14891537
....@@ -1492,8 +1540,6 @@
14921540 mirrorItem = menu.add(new MenuItem("Mirror Poses"));
14931541 mirrorItem.addActionListener(this);
14941542 menu.add("-");
1495
- menu.add(memoryItem = new MenuItem("Memory Usage"));
1496
- memoryItem.addActionListener(this);
14971543 menu.add(analyzeItem = new MenuItem("Analyze"));
14981544 analyzeItem.addActionListener(this);
14991545 menu.add(dumpItem = new MenuItem("Print"));
....@@ -1654,6 +1700,16 @@
16541700 listUI.remove(i);
16551701 }
16561702 }
1703
+ }
1704
+
1705
+ private void EditElement(Object3D elem, boolean newWindow)
1706
+ {
1707
+ // if (!(elem instanceof Composite))
1708
+ // newWindow = false;
1709
+ listUI.add(elem);
1710
+ elem.openEditWindow(this, newWindow); //, false);
1711
+ System.out.println("edit : " + elem);
1712
+ elem.editWindow.refreshContents(true); // ? new
16571713 }
16581714
16591715 /**
....@@ -2216,15 +2272,31 @@
22162272 } else
22172273 if (source == undoButton)
22182274 {
2275
+ // Go to previous version
2276
+ //if (!Undo())
2277
+ //java.awt.Toolkit.getDefaultToolkit().beep();
22192278 Undo();
2279
+ } else
2280
+ if (source == restoreButton)
2281
+ {
2282
+ // Restore current version
2283
+ Restore();
2284
+ } else
2285
+ if (source == replaceButton)
2286
+ {
2287
+ // Overwrite current version
2288
+ Replace();
22202289 } else
22212290 if (source == redoButton)
22222291 {
2292
+ // Go to next version
22232293 Redo();
22242294 } else
22252295 if (source == saveButton)
22262296 {
2227
- Save();
2297
+ // Save a new version
2298
+ if (!Save(true))
2299
+ java.awt.Toolkit.getDefaultToolkit().beep();
22282300 } else
22292301 if (source == oneStepButton)
22302302 {
....@@ -2233,17 +2305,14 @@
22332305 } else
22342306 if (source == screenfitButton)
22352307 {
2236
- //Reload(lastConverter, lastFilename, true);
22372308 ScreenFit();
22382309 } else
22392310 if (source == screenfitpointButton)
22402311 {
2241
- //Reload(lastConverter, lastFilename, true);
22422312 ScreenFitPoint();
22432313 } else
22442314 if (source == snapobjectButton)
22452315 {
2246
- //Reload(lastConverter, lastFilename, true);
22472316 SnapObject();
22482317 } else
22492318 // if (event.getSource() == recompileButton)
....@@ -2607,7 +2676,7 @@
26072676 {
26082677 StepAll();
26092678 } else
2610
- if (source == clearItem) // || event.getSource() == clearButton)
2679
+ if (source == deleteItem) // || event.getSource() == clearButton)
26112680 {
26122681 //int indices[] = jList.getSelectedIndices();
26132682 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -3089,7 +3158,7 @@
30893158 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
30903159 {
30913160 obj = (Object3D)e.nextElement();
3092
- obj.SetBumpTexture(null);
3161
+ obj.ResetBumpTexture();
30933162 }
30943163
30953164 refreshContents();
....@@ -3103,6 +3172,31 @@
31033172 obj.SetBumpTexture(obj.GetPigmentTexture());
31043173 }
31053174
3175
+ refreshContents();
3176
+ } else
3177
+ if (source == embedTexturesItem)
3178
+ {
3179
+ Object3D obj;
3180
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3181
+ {
3182
+ obj = (Object3D)e.nextElement();
3183
+ obj.EmbedTextures(true);
3184
+ }
3185
+
3186
+ refreshContents();
3187
+ } else
3188
+ if (source == deEmbedTexturesItem)
3189
+ {
3190
+ Object3D obj;
3191
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3192
+ {
3193
+ obj = (Object3D)e.nextElement();
3194
+ obj.EmbedTextures(false);
3195
+ }
3196
+
3197
+ CameraPane.texturepigment.clear();
3198
+ CameraPane.texturebump.clear();
3199
+
31063200 refreshContents();
31073201 } else
31083202 if (source == flashSelectionButton)
....@@ -3471,6 +3565,9 @@
34713565 }
34723566
34733567 copy = group;
3568
+
3569
+ SetUndoStates();
3570
+
34743571 //Globals.theRenderer.object = group;
34753572 if(!useclient)
34763573 {
....@@ -3499,8 +3596,10 @@
34993596 radio.layout.doClick();
35003597
35013598 ClearUnpinned();
3502
- SetPinStates(group.selection.size() > 0);
3503
- if (group.selection.size() == 1)
3599
+ //Grafreed.Assert(group != null);
3600
+ //Grafreed.Assert(group.selection != null);
3601
+ SetPinStates(group.selection == null || group.selection.size() > 0);
3602
+ if (group.selection == null || group.selection.size() == 1)
35043603 EditSelection(false);
35053604 keepparent = group.parent;
35063605 // PARENT = NULL or not???
....@@ -4094,7 +4193,7 @@
40944193
40954194 try
40964195 {
4097
- texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
4196
+ texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres);
40984197 }
40994198 catch (Exception e)
41004199 {
....@@ -4571,6 +4670,12 @@
45714670
45724671 void EditSelection(boolean newWindow)
45734672 {
4673
+ if (group.selection == null)
4674
+ {
4675
+ EditElement(group, newWindow); // ? new
4676
+ return;
4677
+ }
4678
+
45744679 // aConstraints.gridy = 0;
45754680 for (int i=0; i<group.selection.size(); i++)
45764681 {
....@@ -4581,12 +4686,7 @@
45814686 Object3D elem = (Object3D)group.selection.elementAt(i);
45824687 if(elem != group || !newWindow)
45834688 {
4584
- // if (!(elem instanceof Composite))
4585
- // newWindow = false;
4586
- listUI.add(elem);
4587
- elem.openEditWindow(this, newWindow); //, false);
4588
- System.out.println("edit : " + elem);
4589
- elem.editWindow.refreshContents(true); // ? new
4689
+ EditElement(elem, newWindow); // ? new
45904690 }
45914691 }
45924692 }
....@@ -4730,8 +4830,8 @@
47304830
47314831 void refreshContents(boolean cp)
47324832 {
4733
- if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info"))
4734
- if (!Globals.MOUSEDRAGGED) // && !Globals.TIMERRUNNING)
4833
+ if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
4834
+ if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
47354835 {
47364836 objEditor.ClearInfo(); // .GetMaterial());
47374837
....@@ -4830,8 +4930,8 @@
48304930
48314931 if (cut)
48324932 {
4833
- if (Globals.SAVEONMAKE)
4834
- Save();
4933
+// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save.
4934
+// Save();
48354935 //int indices[] = jList.getSelectedIndices();
48364936 //for (int i = indices.length - 1; i >= 0; i--)
48374937 //jList.remove(indices[i]);
....@@ -4934,6 +5034,10 @@
49345034
49355035 void paste(boolean expand)
49365036 {
5037
+ if (Globals.REPLACEONMAKE)
5038
+ Save();
5039
+ boolean keep = Globals.REPLACEONMAKE;
5040
+ Globals.REPLACEONMAKE = false;
49375041 // if (GrafreeD.clipboard == null)
49385042 // return;
49395043 boolean first = true;
....@@ -4993,6 +5097,7 @@
49935097 Grafreed.clipboard.get(0).parent = keepparent;
49945098 }
49955099
5100
+ Globals.REPLACEONMAKE = keep;
49965101 ResetModel();
49975102 refreshContents();
49985103 }
....@@ -5128,6 +5233,10 @@
51285233
51295234 void group(Object3D csg, boolean grab)
51305235 {
5236
+ if (Globals.REPLACEONMAKE)
5237
+ Save();
5238
+ boolean keep = Globals.REPLACEONMAKE;
5239
+ Globals.REPLACEONMAKE = false;
51315240 if (//false) // why??
51325241 !group.selection.isEmpty())
51335242 {
....@@ -5241,10 +5350,15 @@
52415350 //node.add(csg);
52425351 //makeSomething(node);
52435352 makeSomething(csg);
5353
+ Globals.REPLACEONMAKE = keep;
52445354 }
52455355
52465356 void Ungroup(Object3D g)
52475357 {
5358
+ if (Globals.REPLACEONMAKE)
5359
+ Save();
5360
+ boolean keep = Globals.REPLACEONMAKE;
5361
+ Globals.REPLACEONMAKE = false;
52485362 if (g instanceof HiddenObject)
52495363 {
52505364 HiddenObject h = (HiddenObject) g;
....@@ -5261,6 +5375,7 @@
52615375 objEditor.makeSomething(g.get(i), false);
52625376 }
52635377 }
5378
+ Globals.REPLACEONMAKE = keep;
52645379 }
52655380
52665381 void ungroup()
....@@ -5624,7 +5739,7 @@
56245739 private MenuItem pasteLinkItem;
56255740 private MenuItem pasteCloneItem;
56265741 private MenuItem pasteExpandItem;
5627
- private MenuItem clearItem;
5742
+ private MenuItem deleteItem;
56285743 private MenuItem clearAllItem;
56295744 private MenuItem genUVItem;
56305745 private MenuItem genNormalsMESHItem;
....@@ -5708,6 +5823,8 @@
57085823 private MenuItem attachBumpItem;
57095824 private MenuItem detachBumpItem;
57105825 private MenuItem pigmentBumpItem;
5826
+ private MenuItem embedTexturesItem;
5827
+ private MenuItem deEmbedTexturesItem;
57115828
57125829 private MenuItem particleItem;
57135830 private MenuItem ragdollItem;