Normand Briere
2019-08-01 c99d954f5e2bffa601c599142371cfeb45630f40
GroupEditor.java
....@@ -23,6 +23,302 @@
2323 DragGestureListener, DragSourceListener, DropTargetListener,
2424 ItemListener // ListSelectionListener
2525 {
26
+
27
+ public void AddSkyboxButton(String f, String s, cGridBag row)
28
+ {
29
+ cButton skyboxButton;
30
+ final String path = "cubemaps/" + f + "-skyboxes/" + s;
31
+ row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.NIMBUSLAF));
32
+ //row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF));
33
+ skyboxButton.setToolTipText(s);
34
+ skyboxButton.addActionListener(new ActionListener()
35
+ {
36
+ @Override
37
+ public void actionPerformed(ActionEvent e)
38
+ {
39
+ ChangeSkybox(path);
40
+ }
41
+ });
42
+ }
43
+
44
+ public void AddSkyboxTab0(JTabbedPane skyboxpanel)
45
+ {
46
+ cGridBag tab0 = new cGridBag().setVertical(true);
47
+
48
+ tab0.setName("Urban");
49
+ skyboxpanel.add(tab0);
50
+
51
+ cGridBag row0 = new cGridBag();
52
+ cGridBag row1 = new cGridBag();
53
+ cGridBag row2 = new cGridBag();
54
+ cGridBag row3 = new cGridBag();
55
+ cGridBag row4 = new cGridBag();
56
+ cGridBag row5 = new cGridBag();
57
+ cGridBag row6 = new cGridBag();
58
+
59
+ AddSkyboxButton("default", "rgb", row0);
60
+ //AddSkyboxButton("default", "cornell", row0);
61
+ AddSkyboxButton("penguins", "dust", row0);
62
+ AddSkyboxButton("penguins", "tropic", row0);
63
+ AddSkyboxButton("penguins", "yonder", row0);
64
+
65
+ AddSkyboxButton("default", "uffizi", row1);
66
+ AddSkyboxButton("bridge", "Bridge", row1);
67
+ AddSkyboxButton("bridge", "Bridge2", row1);
68
+ AddSkyboxButton("urban", "GamlaStan2", row1);
69
+
70
+ AddSkyboxButton("urban", "Parliament", row2);
71
+ AddSkyboxButton("urban", "Roundabout", row2);
72
+ AddSkyboxButton("urban", "SaintLazarusChurch", row2);
73
+ AddSkyboxButton("urban", "SaintLazarusChurch2", row2);
74
+
75
+ AddSkyboxButton("urban", "SaintLazarusChurch3", row3);
76
+ AddSkyboxButton("urban", "UnionSquare", row3);
77
+ AddSkyboxButton("urban", "Medborgarplatsen", row3);
78
+ AddSkyboxButton("park", "BerzeliiPark", row3);
79
+
80
+ AddSkyboxButton("park", "Buddha", row4);
81
+ AddSkyboxButton("park", "CNTower2", row4);
82
+ AddSkyboxButton("park", "NiagaraFalls1", row4);
83
+ AddSkyboxButton("park", "NiagaraFalls3", row4);
84
+
85
+ AddSkyboxButton("park", "Park", row5);
86
+ AddSkyboxButton("park", "Pond", row5);
87
+ AddSkyboxButton("park", "Skansen", row5);
88
+ AddSkyboxButton("park", "Skansen2", row5);
89
+
90
+ AddSkyboxButton("park", "Skansen3", row6);
91
+ AddSkyboxButton("park", "Skansen4", row6);
92
+ AddSkyboxButton("park", "Skansen5", row6);
93
+ AddSkyboxButton("persson", "VancouverConventionCentre", row6);
94
+
95
+ tab0.add(row0);
96
+ tab0.add(row1);
97
+ tab0.add(row2);
98
+ tab0.add(row3);
99
+ tab0.add(row4);
100
+ tab0.add(row5);
101
+ tab0.add(row6);
102
+
103
+ for (int i=5; --i>=0;)
104
+ {
105
+ //oe.toolboxPanel.Return();
106
+ //tab0.add(new cGridBag());
107
+ }
108
+ }
109
+
110
+ public void AddSkyboxTab1(JTabbedPane skyboxpanel)
111
+ {
112
+ cGridBag tab0 = new cGridBag().setVertical(true);
113
+
114
+ tab0.setName("Nature");
115
+ skyboxpanel.add(tab0);
116
+
117
+ cGridBag row0 = new cGridBag();
118
+ cGridBag row1 = new cGridBag();
119
+ cGridBag row2 = new cGridBag();
120
+ cGridBag row3 = new cGridBag();
121
+ cGridBag row4 = new cGridBag();
122
+ cGridBag row5 = new cGridBag();
123
+ cGridBag row6 = new cGridBag();
124
+
125
+ AddSkyboxButton("beach", "HeartInTheSand", row0);
126
+ AddSkyboxButton("beach", "LarnacaBeach", row0);
127
+ AddSkyboxButton("beach", "PalmTrees", row0);
128
+ AddSkyboxButton("beach", "Tenerife", row0);
129
+
130
+ AddSkyboxButton("beach", "Tenerife2", row1);
131
+ AddSkyboxButton("beach", "Tenerife3", row1);
132
+ AddSkyboxButton("field", "FishPond", row1);
133
+ AddSkyboxButton("field", "Footballfield", row1);
134
+
135
+ AddSkyboxButton("field", "Meadow", row2);
136
+ AddSkyboxButton("field", "Sorsele", row2);
137
+ AddSkyboxButton("field", "Sorsele2", row2);
138
+ AddSkyboxButton("field", "Sorsele3", row2);
139
+
140
+ AddSkyboxButton("forest", "Brudslojan", row3);
141
+ AddSkyboxButton("forest", "Langholmen2", row3);
142
+ AddSkyboxButton("forest", "Plants", row3);
143
+ AddSkyboxButton("mountain", "Maskonaive", row3);
144
+
145
+ AddSkyboxButton("mountain", "Maskonaive2", row4);
146
+ AddSkyboxButton("mountain", "Maskonaive3", row4);
147
+ AddSkyboxButton("mountain", "Teide", row4);
148
+ AddSkyboxButton("park", "Tantolunden4", row4);
149
+
150
+ AddSkyboxButton("park", "Stairs", row5);
151
+ AddSkyboxButton("default", "skycube", row6);
152
+ AddSkyboxButton("rocky", "Langholmen", row5);
153
+ AddSkyboxButton("rocky", "Skinnarviksberget", row5);
154
+
155
+ AddSkyboxButton("rocky", "Tantolunden6", row5);
156
+ AddSkyboxButton("default", "CloudyHills", row6);
157
+ AddSkyboxButton("daz", "Autumn", row6);
158
+ AddSkyboxButton("daz", "MountainTrail", row6);
159
+ /*
160
+Autumn
161
+Greenlands
162
+MountainTrail
163
+Oasis
164
+TheRock
165
+TopOfTheWorld
166
+Winter
167
+ */
168
+
169
+ tab0.add(row0);
170
+ tab0.add(row1);
171
+ tab0.add(row2);
172
+ tab0.add(row3);
173
+ tab0.add(row4);
174
+ tab0.add(row5);
175
+ tab0.add(row6);
176
+
177
+ for (int i=5; --i>=0;)
178
+ {
179
+ //oe.toolboxPanel.Return();
180
+ //tab0.add(new cGridBag());
181
+ }
182
+ }
183
+
184
+ public void AddSkyboxTab2(JTabbedPane skyboxpanel)
185
+ {
186
+ cGridBag tab0 = new cGridBag().setVertical(true);
187
+
188
+ tab0.setName("Night");
189
+ skyboxpanel.add(tab0);
190
+
191
+ cGridBag row0 = new cGridBag();
192
+ cGridBag row1 = new cGridBag();
193
+ cGridBag row2 = new cGridBag();
194
+ cGridBag row3 = new cGridBag();
195
+ cGridBag row4 = new cGridBag();
196
+ cGridBag row5 = new cGridBag();
197
+ cGridBag row6 = new cGridBag();
198
+
199
+ AddSkyboxButton("night", "NightPath", row0);
200
+ AddSkyboxButton("night", "PondNight", row0);
201
+ AddSkyboxButton("night", "Powerlines", row0);
202
+ AddSkyboxButton("night", "SwedishRoyalCastle", row0);
203
+
204
+ AddSkyboxButton("urban", "CNTower", row1);
205
+ AddSkyboxButton("bridge", "ArstaBridge", row1);
206
+ AddSkyboxButton("rocky", "Riddarfjarden", row1);
207
+ AddSkyboxButton("penguins", "sleepyhollow", row1);
208
+
209
+ AddSkyboxButton("penguins", "kenon_star", row2);
210
+ AddSkyboxButton("persson", "corona", row2);
211
+ AddSkyboxButton("persson", "spaceskybox", row2);
212
+ AddSkyboxButton("indoors", "Vasa", row2);
213
+
214
+ AddSkyboxButton("winter", "Backyard", row3);
215
+ AddSkyboxButton("winter", "Creek", row3);
216
+ AddSkyboxButton("winter", "FootballField3", row3);
217
+ AddSkyboxButton("winter", "Forest", row3);
218
+
219
+ AddSkyboxButton("winter", "HornstullsStrand2", row4);
220
+ AddSkyboxButton("winter", "House", row4);
221
+ AddSkyboxButton("winter", "IceLake", row4);
222
+ AddSkyboxButton("winter", "IceRiver", row4);
223
+
224
+ AddSkyboxButton("winter", "Park3", row5);
225
+ AddSkyboxButton("winter", "PondWinter", row5);
226
+ AddSkyboxButton("winter", "Tantolunden5", row5);
227
+ AddSkyboxButton("winter", "Vindelalven", row5);
228
+
229
+ AddSkyboxButton("daz", "TheRock", row6);
230
+ AddSkyboxButton("daz", "TopOfTheWorld", row6);
231
+ AddSkyboxButton("daz", "Winter", row6);
232
+ AddSkyboxButton("mountain", "Ryfjallet", row6);
233
+
234
+ tab0.add(row0);
235
+ tab0.add(row1);
236
+ tab0.add(row2);
237
+ tab0.add(row3);
238
+ tab0.add(row4);
239
+ tab0.add(row5);
240
+ tab0.add(row6);
241
+
242
+ for (int i=5; --i>=0;)
243
+ {
244
+ //oe.toolboxPanel.Return();
245
+ //tab0.add(new cGridBag());
246
+ }
247
+ }
248
+
249
+ public void AddSkyboxTab3(JTabbedPane skyboxpanel)
250
+ {
251
+ cGridBag tab0 = new cGridBag().setVertical(true);
252
+
253
+ tab0.setName("Others");
254
+ skyboxpanel.add(tab0);
255
+
256
+ cGridBag row0 = new cGridBag();
257
+ cGridBag row1 = new cGridBag();
258
+ cGridBag row2 = new cGridBag();
259
+ cGridBag row3 = new cGridBag();
260
+ cGridBag row4 = new cGridBag();
261
+ cGridBag row5 = new cGridBag();
262
+ cGridBag row6 = new cGridBag();
263
+
264
+ AddSkyboxButton("mayhem", "afterrain", row0);
265
+ AddSkyboxButton("mayhem", "aqua4", row0);
266
+ AddSkyboxButton("mayhem", "aqua9", row0);
267
+ AddSkyboxButton("mayhem", "flame", row0);
268
+
269
+ AddSkyboxButton("mayhem", "h2s", row1);
270
+ AddSkyboxButton("mayhem", "prehistoric", row1);
271
+ AddSkyboxButton("mayhem", "scorched", row1);
272
+ AddSkyboxButton("penguins", "desertdawn", row1);
273
+
274
+ AddSkyboxButton("persson", "Citadella", row2);
275
+ AddSkyboxButton("persson", "Citadella2", row2);
276
+ AddSkyboxButton("persson", "clouds1", row2);
277
+ AddSkyboxButton("penguins", "wrath", row2);
278
+
279
+ AddSkyboxButton("persson", "FishermansBastion", row3);
280
+ AddSkyboxButton("persson", "HeroesSquare", row3);
281
+ AddSkyboxButton("indoors", "DallasW", row3);
282
+ AddSkyboxButton("indoors", "MarriottMadisonWest", row3);
283
+
284
+ AddSkyboxButton("persson", "LancellottiChapel", row4);
285
+ AddSkyboxButton("persson", "PereaBeach1", row4);
286
+ AddSkyboxButton("persson", "PereaBeach2", row4);
287
+ AddSkyboxButton("persson", "redeclipse", row4);
288
+
289
+ AddSkyboxButton("daz", "Greenlands", row5);
290
+ AddSkyboxButton("daz", "Oasis", row5);
291
+ AddSkyboxButton("elyvisions", "arch3", row5);
292
+ AddSkyboxButton("elyvisions", "calm_sea", row5);
293
+
294
+ AddSkyboxButton("elyvisions", "rainbow", row6);
295
+ AddSkyboxButton("elyvisions", "distant_sunset", row6);
296
+ AddSkyboxButton("elyvisions", "heaven", row6);
297
+ AddSkyboxButton("elyvisions", "hot", row6);
298
+
299
+ tab0.add(row0);
300
+ tab0.add(row1);
301
+ tab0.add(row2);
302
+ tab0.add(row3);
303
+ tab0.add(row4);
304
+ tab0.add(row5);
305
+ tab0.add(row6);
306
+
307
+ for (int i=5; --i>=0;)
308
+ {
309
+ //oe.toolboxPanel.Return();
310
+ //tab0.add(new cGridBag());
311
+ }
312
+ }
313
+
314
+ public void ChangeSkybox(String name)
315
+ {
316
+ //cameraView.envyoff = false;
317
+ group.skyboxname = name;
318
+ group.skyboxext = "jpg";
319
+ cameraView.repaint();
320
+ }
321
+
26322 //ObjEditor objEditor;
27323 public void closeUI2()
28324 {
....@@ -60,6 +356,12 @@
60356 this.copy = this.group = group;
61357 //selectees = this.group.selectees;
62358
359
+ if (copy.versions == null)
360
+ {
361
+ copy.versions = new byte[100][];
362
+ copy.versionindex = -1;
363
+ }
364
+
63365 if(ui)
64366 SetupUI(objEditor);
65367 }
....@@ -80,10 +382,22 @@
80382 SetupViews(objEditor);
81383
82384 ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true);
385
+
386
+ if (copy.versions == null)
387
+ {
388
+ copy.versions = new byte[100][];
389
+ copy.versionindex = -1;
390
+
391
+ Save(true);
392
+ }
83393 }
84394
85395 void CloneSelection(boolean supports)
86396 {
397
+ if (Globals.REPLACEONMAKE)
398
+ Save();
399
+ boolean keep = Globals.REPLACEONMAKE;
400
+ Globals.REPLACEONMAKE = false;
87401 // Object3D keep = GrafreeD.clipboard;
88402 //Object3D obj;
89403 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -94,6 +408,7 @@
94408
95409 makeSomething(clone, i==group.selection.size()-1);
96410 }
411
+ Globals.REPLACEONMAKE = keep;
97412 }
98413
99414 void CloneClipboard(boolean supports)
....@@ -189,8 +504,8 @@
189504 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
190505 // pasteExpandItem.addActionListener(this);
191506 menu.add("-");
192
- clearItem = menu.add(new MenuItem("Clear"));
193
- clearItem.addActionListener(this);
507
+ deleteItem = menu.add(new MenuItem("Delete"));
508
+ deleteItem.addActionListener(this);
194509
195510 if (Globals.ADVANCED)
196511 {
....@@ -380,13 +695,14 @@
380695 shadowYItem.addActionListener(this);
381696 shadowZItem = menu.add(new MenuItem("Shadow Blue"));
382697 shadowZItem.addActionListener(this);
698
+ attributeItem = menu.add(new MenuItem("Attribute"));
699
+ attributeItem.addActionListener(this);
700
+
383701 if (Globals.ADVANCED)
384702 {
385703 menu.add("-");
386704 linkerItem = menu.add(new MenuItem("Linker"));
387705 linkerItem.addActionListener(this);
388
- attributeItem = menu.add(new MenuItem("Attribute"));
389
- attributeItem.addActionListener(this);
390706 templateItem = menu.add(new MenuItem("Template"));
391707 templateItem.addActionListener(this);
392708 pointflowItem = menu.add(new MenuItem("Point Flow"));
....@@ -415,7 +731,7 @@
415731 genNormalsMESHItem.addActionListener(this);
416732 if (Globals.ADVANCED)
417733 {
418
- genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
734
+ genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals"));
419735 genNormalsMINEItem.addActionListener(this);
420736 }
421737 stripifyItem = menu.add(new MenuItem("Stripify"));
....@@ -508,10 +824,15 @@
508824 attachBumpItem.addActionListener(this);
509825 pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump"));
510826 pigmentBumpItem.addActionListener(this);
827
+ //embedTexturesItem
511828 detachPigmentItem = menu.add(new MenuItem("Detach Pigment"));
512829 detachPigmentItem.addActionListener(this);
513830 detachBumpItem = menu.add(new MenuItem("Detach Bump"));
514831 detachBumpItem.addActionListener(this);
832
+ embedTexturesItem = menu.add(new MenuItem("Embed Textures"));
833
+ embedTexturesItem.addActionListener(this);
834
+ deEmbedTexturesItem = menu.add(new MenuItem("De-embed Textures"));
835
+ deEmbedTexturesItem.addActionListener(this);
515836 menu.add("-");
516837 sortbysizeItem = menu.add(new MenuItem("Sort by size"));
517838 sortbysizeItem.addActionListener(this);
....@@ -538,6 +859,7 @@
538859 buildToolsMenu(menu);
539860 }
540861
862
+
541863 void SetupUI2(ObjEditor oe)
542864 {
543865 // June 2019
....@@ -582,7 +904,7 @@
582904 */
583905 cGridBag copyOptionsPanel = new cGridBag();
584906
585
- copyOptionsPanel.preferredHeight = 1;
907
+ copyOptionsPanel.preferredHeight = 2;
586908
587909 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
588910
....@@ -601,42 +923,55 @@
601923 fullButton.setToolTipText("Full-screen window");
602924 fullButton.addActionListener(this);
603925
926
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
927
+ screenfitButton.setToolTipText("Screen fit");
928
+ screenfitButton.addActionListener(this);
929
+
604930 oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
605931 restoreCameraButton.setToolTipText("Restore viewpoint");
606932 restoreCameraButton.addActionListener(this);
607933
934
+ copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
935
+ saveButton.setToolTipText("New version");
936
+ saveButton.addActionListener(this);
937
+
608938 copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
609
- undoButton.setToolTipText("Undo changes");
939
+ undoButton.setToolTipText("Previous version");
610940 undoButton.addActionListener(this);
611941 undoButton.setEnabled(false);
612942
943
+ cGridBag updown = new cGridBag().setVertical(true);
944
+ updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
945
+ restoreButton.setToolTipText("Restore current");
946
+ restoreButton.addActionListener(this);
947
+ restoreButton.setEnabled(false);
948
+
949
+ updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
950
+ replaceButton.setToolTipText("Replace current");
951
+ replaceButton.addActionListener(this);
952
+ replaceButton.setEnabled(false);
953
+
954
+ copyOptionsPanel.add(updown);
955
+
613956 copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
614
- redoButton.setToolTipText("Redo changes");
957
+ redoButton.setToolTipText("Next version");
615958 redoButton.addActionListener(this);
616959 redoButton.setEnabled(false);
617960
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);
961
+ oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
623962 liveCB.setToolTipText("Enable animation");
624963 liveCB.addItemListener(this);
625964
626
- copyOptionsPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
965
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
627966 oneStepButton.setToolTipText("Animate one step forward");
628967 oneStepButton.addActionListener(this);
629968
630
- copyOptionsPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
969
+ oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
631970 fastCB.setToolTipText("Fast mode");
632971 fastCB.addItemListener(this);
633972
634973 //oe.toolboxPanel.Return();
635974
636
- copyOptionsPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
637
- screenfitButton.setToolTipText("Screen fit");
638
- screenfitButton.addActionListener(this);
639
-
640975 // copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
641976 // trackCB.setToolTipText("Enable tracking");
642977 // trackCB.addItemListener(this);
....@@ -649,31 +984,32 @@
649984 oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
650985 snapobjectButton.addActionListener(this);
651986 snapobjectButton.setToolTipText("Snap Object");
987
+
988
+ oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
989
+ fourButton.addActionListener(this);
990
+ fourButton.setToolTipText("Show control panel only");
652991 }
653992
654993 //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
655994
656
- oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
657
- twoButton.setToolTipText("Show center view only");
995
+ oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
996
+ twoButton.setToolTipText("Show 3D view only");
658997 twoButton.addActionListener(this);
659998 this.fullscreenLayout = twoButton;
660999
661
- oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
662
- fourButton.addActionListener(this);
663
- fourButton.setToolTipText("Show left panel only");
664
- oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
665
- sixButton.setToolTipText("2-column layout left");
666
- sixButton.addActionListener(this);
667
- oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
668
- threeButton.setToolTipText("2-column layout right");
1000
+ oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1001
+ threeButton.setToolTipText("Show controls and 3D view");
6691002 threeButton.addActionListener(this);
670
- oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
671
- sevenButton.setToolTipText("3-column layout");
672
- sevenButton.addActionListener(this);
1003
+ oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1004
+ sixButton.setToolTipText("Show 3D view and controls");
1005
+ sixButton.addActionListener(this);
1006
+// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1007
+// sevenButton.setToolTipText("3-column layout");
1008
+// sevenButton.addActionListener(this);
6731009 //
6741010
675
- oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
676
- rootButton.setToolTipText("Edit selection in new tab");
1011
+ oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1012
+ rootButton.setToolTipText("Open selection in new tab");
6771013 rootButton.addActionListener(this);
6781014
6791015 oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
....@@ -682,28 +1018,30 @@
6821018 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
6831019 //clearButton.addActionListener(this);
6841020
1021
+ cGridBag row1 = new cGridBag();
1022
+
6851023 // INSERT
686
- oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1024
+ row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
6871025 gridButton.setToolTipText("Create grid");
6881026 gridButton.addActionListener(this);
6891027
690
- oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1028
+ row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
6911029 boxButton.setToolTipText("Create box");
6921030 boxButton.addActionListener(this);
6931031
694
- oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1032
+ row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
6951033 sphereButton.setToolTipText("Create sphere");
6961034 sphereButton.addActionListener(this);
6971035
698
- oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1036
+ row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
6991037 coneButton.setToolTipText("Create cone");
7001038 coneButton.addActionListener(this);
7011039
702
- oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1040
+ row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7031041 torusButton.setToolTipText("Create torus");
7041042 torusButton.addActionListener(this);
7051043
706
- oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1044
+ row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7071045 superButton.setToolTipText("Create superellipsoid");
7081046 superButton.addActionListener(this);
7091047
....@@ -714,51 +1052,57 @@
7141052 kleinButton.addActionListener(this);
7151053 }
7161054
717
- oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1055
+ row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7181056 particlesButton.setToolTipText("Create particle system");
7191057 particlesButton.addActionListener(this);
7201058
721
- oe.toolboxPanel.Return();
1059
+ oe.toolboxPanel.add(row1);
7221060
723
- oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1061
+ cGridBag row2 = new cGridBag();
1062
+
1063
+ row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7241064 groupButton.setToolTipText("Create group");
7251065 groupButton.addActionListener(this);
7261066
727
- oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1067
+ row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7281068 compositeButton.setToolTipText("Create composite");
7291069 compositeButton.addActionListener(this);
7301070
731
- oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1071
+ row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7321072 switchButton.setToolTipText("Create item switcher");
7331073 switchButton.addActionListener(this);
7341074
735
- oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1075
+ row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7361076 loopButton.setToolTipText("Create loop");
7371077 loopButton.addActionListener(this);
7381078
739
- oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1079
+ row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7401080 textureButton.setToolTipText("Create texture");
7411081 textureButton.addActionListener(this);
7421082
743
- oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1083
+ row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7441084 overlayButton.setToolTipText("Create overlay");
7451085 overlayButton.addActionListener(this);
7461086
747
- oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1087
+ row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7481088 lightButton.setToolTipText("Create light");
7491089 lightButton.addActionListener(this);
7501090
751
- for (int i=6; --i>=0;)
752
- {
753
- oe.toolboxPanel.Return();
754
- oe.toolboxPanel.add(new cGridBag());
755
- oe.toolboxPanel.add(new cGridBag());
756
- oe.toolboxPanel.add(new cGridBag());
757
- oe.toolboxPanel.add(new cGridBag());
758
- oe.toolboxPanel.add(new cGridBag());
759
- oe.toolboxPanel.add(new cGridBag());
760
- oe.toolboxPanel.add(new cGridBag());
761
- }
1091
+ oe.toolboxPanel.add(row2);
1092
+
1093
+ // ENVYMAPS
1094
+ cGridBag skyboxpane = new cGridBag();
1095
+ skyboxpane.preferredHeight = 100;
1096
+
1097
+ oe.toolboxPanel.add(skyboxpane);
1098
+
1099
+ JTabbedPane skyboxpanel = new JTabbedPane();
1100
+ skyboxpane.add(skyboxpanel);
1101
+
1102
+ AddSkyboxTab0(skyboxpanel);
1103
+ AddSkyboxTab1(skyboxpanel);
1104
+ AddSkyboxTab2(skyboxpanel);
1105
+ AddSkyboxTab3(skyboxpanel);
7621106
7631107 // EDIT panel
7641108 editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
....@@ -814,9 +1158,12 @@
8141158
8151159 oe.treePanel.add(copyOptionsPanel);
8161160 oe.treePanel.Return();
1161
+ cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
1162
+ versionSlider = (cNumberSlider)sliderPane.getComponent(1);
1163
+ sliderPane.preferredHeight = 1;
8171164
818
-// mainPanel.setDividerLocation(0.5); //1.0);
819
-// mainPanel.setResizeWeight(0.5);
1165
+// mainPanel.setDividerLocation(0.1); //1.0);
1166
+ mainPanel.setResizeWeight(0.4);
8201167
8211168 //jList.addListSelectionListener(this);
8221169 oe.jTree.addTreeSelectionListener(this);
....@@ -824,7 +1171,7 @@
8241171 //jTree.setEditable(true);
8251172 oe.jTree.setDragEnabled(true);
8261173 //jTree.setPreferredSize(new Dimension(10,10));
827
- jSP.setPreferredSize(new Dimension(100,200));
1174
+ //jSP.setPreferredSize(new Dimension(100,200));
8281175
8291176 oe.jTree.setCellRenderer(new cTreeModel.Renderer());
8301177
....@@ -836,7 +1183,7 @@
8361183 dgr.addDragGestureListener(this);
8371184 }catch(Exception e) {}
8381185 */
839
- radio.layout = sevenButton;
1186
+ radio.layout = sixButton; // sevenButton;
8401187 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
8411188 }
8421189
....@@ -939,9 +1286,9 @@
9391286 toggleSwitchCB.setToolTipText("Choose a single item");
9401287 toggleSwitchCB.addItemListener(this);
9411288
942
- panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints);
943
- autosaveCB.setToolTipText("On structure change");
944
- autosaveCB.addItemListener(this);
1289
+ panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints);
1290
+ autokeepCB.setToolTipText("On structure change");
1291
+ autokeepCB.addItemListener(this);
9451292
9461293 panel.Return();
9471294 if (Globals.ADVANCED)
....@@ -970,7 +1317,7 @@
9701317 {
9711318 cRadio radioButton = new cRadio(obj.name);
9721319
973
- // Patch to avoid bug with transparency.
1320
+ // June 2019. Patch to avoid bug with transparency.
9741321 radioButton.hadMaterial = obj.material != null;
9751322 if (!radioButton.hadMaterial)
9761323 {
....@@ -978,7 +1325,7 @@
9781325 }
9791326
9801327 radioButton.SetObject(obj);
981
- radioButton.layout = sevenButton;
1328
+ radioButton.layout = sixButton; // sevenButton;
9821329 radioButton.SetCamera(cameraView.renderCamera, false);
9831330 radioButton.addActionListener(this);
9841331 radioPanel.add(radioButton);
....@@ -1018,7 +1365,7 @@
10181365
10191366 cCheckBox oeilCB;
10201367 cCheckBox shadowCB;
1021
- cCheckBox autosaveCB;
1368
+ cCheckBox autokeepCB;
10221369 cCheckBox lookAtCB;
10231370
10241371 // static int COLOR = 1;
....@@ -1130,9 +1477,9 @@
11301477 {
11311478 Globals.FREEZEONMOVE ^= true;
11321479 }
1133
- else if(e.getSource() == autosaveCB)
1480
+ else if(e.getSource() == autokeepCB)
11341481 {
1135
- Globals.SAVEONMAKE ^= true;
1482
+ Globals.REPLACEONMAKE ^= true;
11361483 }
11371484 else if(e.getSource() == lookAtCB)
11381485 {
....@@ -1214,8 +1561,6 @@
12141561 }
12151562 }
12161563
1217
- String string = (String) object;
1218
-
12191564 System.out.println("Transfer = " + object + "; drop : " + target);
12201565 // if( object instanceof java.io.File[])
12211566 // {
....@@ -1223,6 +1568,8 @@
12231568 // objEditor.DropFile((java.io.File[]) object, true);
12241569 // return;
12251570 // }
1571
+
1572
+ String string = object.toString();
12261573
12271574 // File path for Mac and Windows
12281575 if (string.charAt(0) == '/' || string.charAt(1) == ':')
....@@ -1472,8 +1819,8 @@
14721819 animationItem.addItemListener(this);
14731820 animationItem.setState(Globals.ANIMATION);
14741821
1475
- menu.add(archiveItem = new CheckboxMenuItem("Archive3D..."));
1476
- archiveItem.addItemListener(this);
1822
+ menu.add(archiveItem = new MenuItem("Archive3D..."));
1823
+ archiveItem.addActionListener(this);
14771824
14781825 menu.add("-");
14791826 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
....@@ -1487,6 +1834,8 @@
14871834 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
14881835 reduce34MorphItem.addActionListener(this);
14891836 menu.add("-");
1837
+ menu.add(memoryItem = new MenuItem("Memory Usage"));
1838
+ memoryItem.addActionListener(this);
14901839 menu.add(computeAOItem = new MenuItem("Compute AO"));
14911840 computeAOItem.addActionListener(this);
14921841
....@@ -1495,8 +1844,6 @@
14951844 mirrorItem = menu.add(new MenuItem("Mirror Poses"));
14961845 mirrorItem.addActionListener(this);
14971846 menu.add("-");
1498
- menu.add(memoryItem = new MenuItem("Memory Usage"));
1499
- memoryItem.addActionListener(this);
15001847 menu.add(analyzeItem = new MenuItem("Analyze"));
15011848 analyzeItem.addActionListener(this);
15021849 menu.add(dumpItem = new MenuItem("Print"));
....@@ -1657,6 +2004,16 @@
16572004 listUI.remove(i);
16582005 }
16592006 }
2007
+ }
2008
+
2009
+ private void EditElement(Object3D elem, boolean newWindow)
2010
+ {
2011
+ // if (!(elem instanceof Composite))
2012
+ // newWindow = false;
2013
+ listUI.add(elem);
2014
+ elem.openEditWindow(this, newWindow); //, false);
2015
+ System.out.println("edit : " + elem);
2016
+ elem.editWindow.refreshContents(true); // ? new
16602017 }
16612018
16622019 /**
....@@ -2086,6 +2443,23 @@
20862443 {
20872444 makeSomething(new Light());
20882445 } else
2446
+// if (source == skybox1Button ||
2447
+// source == skybox2Button ||
2448
+// source == skybox3Button ||
2449
+// source == skybox4Button ||
2450
+// source == skybox5Button ||
2451
+// source == skybox6Button ||
2452
+// source == skybox7Button ||
2453
+// source == skybox11Button ||
2454
+// source == skybox12Button ||
2455
+// source == skybox13Button ||
2456
+// source == skybox14Button ||
2457
+// source == skybox15Button ||
2458
+// source == skybox16Button ||
2459
+// source == skybox17Button)
2460
+// {
2461
+// ChangeSkybox(source);
2462
+// } else
20892463 if (source == csgItem)
20902464 {
20912465 group(new CSG());
....@@ -2171,7 +2545,7 @@
21712545 if (source == computeAOItem)
21722546 {
21732547 Globals.drawMode = CameraPane.OCCLUSION;
2174
- Globals.theRenderer.repaint();
2548
+ cameraView.repaint();
21752549 } else
21762550 if (source == recompileItem)
21772551 {
....@@ -2219,15 +2593,31 @@
22192593 } else
22202594 if (source == undoButton)
22212595 {
2596
+ // Go to previous version
2597
+ //if (!Undo())
2598
+ //java.awt.Toolkit.getDefaultToolkit().beep();
22222599 Undo();
2600
+ } else
2601
+ if (source == restoreButton)
2602
+ {
2603
+ // Restore current version
2604
+ Restore();
2605
+ } else
2606
+ if (source == replaceButton)
2607
+ {
2608
+ // Overwrite current version
2609
+ Replace();
22232610 } else
22242611 if (source == redoButton)
22252612 {
2613
+ // Go to next version
22262614 Redo();
22272615 } else
22282616 if (source == saveButton)
22292617 {
2230
- Save();
2618
+ // Save a new version
2619
+ if (!Save(true))
2620
+ java.awt.Toolkit.getDefaultToolkit().beep();
22312621 } else
22322622 if (source == oneStepButton)
22332623 {
....@@ -2236,17 +2626,14 @@
22362626 } else
22372627 if (source == screenfitButton)
22382628 {
2239
- //Reload(lastConverter, lastFilename, true);
22402629 ScreenFit();
22412630 } else
22422631 if (source == screenfitpointButton)
22432632 {
2244
- //Reload(lastConverter, lastFilename, true);
22452633 ScreenFitPoint();
22462634 } else
22472635 if (source == snapobjectButton)
22482636 {
2249
- //Reload(lastConverter, lastFilename, true);
22502637 SnapObject();
22512638 } else
22522639 // if (event.getSource() == recompileButton)
....@@ -2610,7 +2997,7 @@
26102997 {
26112998 StepAll();
26122999 } else
2613
- if (source == clearItem) // || event.getSource() == clearButton)
3000
+ if (source == deleteItem) // || event.getSource() == clearButton)
26143001 {
26153002 //int indices[] = jList.getSelectedIndices();
26163003 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -3092,7 +3479,7 @@
30923479 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
30933480 {
30943481 obj = (Object3D)e.nextElement();
3095
- obj.SetBumpTexture(null);
3482
+ obj.ResetBumpTexture();
30963483 }
30973484
30983485 refreshContents();
....@@ -3106,6 +3493,31 @@
31063493 obj.SetBumpTexture(obj.GetPigmentTexture());
31073494 }
31083495
3496
+ refreshContents();
3497
+ } else
3498
+ if (source == embedTexturesItem)
3499
+ {
3500
+ Object3D obj;
3501
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3502
+ {
3503
+ obj = (Object3D)e.nextElement();
3504
+ obj.EmbedTextures(true);
3505
+ }
3506
+
3507
+ refreshContents();
3508
+ } else
3509
+ if (source == deEmbedTexturesItem)
3510
+ {
3511
+ Object3D obj;
3512
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3513
+ {
3514
+ obj = (Object3D)e.nextElement();
3515
+ obj.EmbedTextures(false);
3516
+ }
3517
+
3518
+ CameraPane.texturepigment.clear();
3519
+ CameraPane.texturebump.clear();
3520
+
31093521 refreshContents();
31103522 } else
31113523 if (source == flashSelectionButton)
....@@ -3209,8 +3621,8 @@
32093621 // centralPanel.setVisible(true);
32103622 // XYZPanel.setVisible(true);
32113623 bigThree.ClearUI();
3624
+ bigThree.add(scenePanel);
32123625 bigThree.add(centralPanel);
3213
- bigThree.add(XYZPanel);
32143626 bigThree.FlushUI();
32153627
32163628 cameraView.requestFocusInWindow();
....@@ -3290,8 +3702,8 @@
32903702 // centralPanel.setVisible(true);
32913703 // XYZPanel.setVisible(false);
32923704 bigThree.ClearUI();
3293
- bigThree.add(scenePanel);
32943705 bigThree.add(centralPanel);
3706
+ bigThree.add(scenePanel);
32953707 bigThree.FlushUI();
32963708
32973709 cameraView.requestFocusInWindow();
....@@ -3474,6 +3886,9 @@
34743886 }
34753887
34763888 copy = group;
3889
+
3890
+ SetUndoStates();
3891
+
34773892 //Globals.theRenderer.object = group;
34783893 if(!useclient)
34793894 {
....@@ -3502,8 +3917,10 @@
35023917 radio.layout.doClick();
35033918
35043919 ClearUnpinned();
3505
- SetPinStates(group.selection.size() > 0);
3506
- if (group.selection.size() == 1)
3920
+ //Grafreed.Assert(group != null);
3921
+ //Grafreed.Assert(group.selection != null);
3922
+ SetPinStates(group.selection == null || group.selection.size() > 0);
3923
+ if (group.selection == null || group.selection.size() == 1)
35073924 EditSelection(false);
35083925 keepparent = group.parent;
35093926 // PARENT = NULL or not???
....@@ -4097,7 +4514,7 @@
40974514
40984515 try
40994516 {
4100
- texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
4517
+ texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres);
41014518 }
41024519 catch (Exception e)
41034520 {
....@@ -4574,6 +4991,12 @@
45744991
45754992 void EditSelection(boolean newWindow)
45764993 {
4994
+ if (group.selection == null)
4995
+ {
4996
+ EditElement(group, newWindow); // ? new
4997
+ return;
4998
+ }
4999
+
45775000 // aConstraints.gridy = 0;
45785001 for (int i=0; i<group.selection.size(); i++)
45795002 {
....@@ -4584,12 +5007,7 @@
45845007 Object3D elem = (Object3D)group.selection.elementAt(i);
45855008 if(elem != group || !newWindow)
45865009 {
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
5010
+ EditElement(elem, newWindow); // ? new
45935011 }
45945012 }
45955013 }
....@@ -4733,8 +5151,8 @@
47335151
47345152 void refreshContents(boolean cp)
47355153 {
4736
- if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info"))
4737
- if (!Globals.MOUSEDRAGGED) // && !Globals.TIMERRUNNING)
5154
+ if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
5155
+ if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
47385156 {
47395157 objEditor.ClearInfo(); // .GetMaterial());
47405158
....@@ -4833,8 +5251,8 @@
48335251
48345252 if (cut)
48355253 {
4836
- if (Globals.SAVEONMAKE)
4837
- Save();
5254
+// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save.
5255
+// Save();
48385256 //int indices[] = jList.getSelectedIndices();
48395257 //for (int i = indices.length - 1; i >= 0; i--)
48405258 //jList.remove(indices[i]);
....@@ -4937,6 +5355,10 @@
49375355
49385356 void paste(boolean expand)
49395357 {
5358
+ if (Globals.REPLACEONMAKE)
5359
+ Save();
5360
+ boolean keep = Globals.REPLACEONMAKE;
5361
+ Globals.REPLACEONMAKE = false;
49405362 // if (GrafreeD.clipboard == null)
49415363 // return;
49425364 boolean first = true;
....@@ -4996,6 +5418,7 @@
49965418 Grafreed.clipboard.get(0).parent = keepparent;
49975419 }
49985420
5421
+ Globals.REPLACEONMAKE = keep;
49995422 ResetModel();
50005423 refreshContents();
50015424 }
....@@ -5131,6 +5554,10 @@
51315554
51325555 void group(Object3D csg, boolean grab)
51335556 {
5557
+ if (Globals.REPLACEONMAKE)
5558
+ Save();
5559
+ boolean keep = Globals.REPLACEONMAKE;
5560
+ Globals.REPLACEONMAKE = false;
51345561 if (//false) // why??
51355562 !group.selection.isEmpty())
51365563 {
....@@ -5244,10 +5671,15 @@
52445671 //node.add(csg);
52455672 //makeSomething(node);
52465673 makeSomething(csg);
5674
+ Globals.REPLACEONMAKE = keep;
52475675 }
52485676
52495677 void Ungroup(Object3D g)
52505678 {
5679
+ if (Globals.REPLACEONMAKE)
5680
+ Save();
5681
+ boolean keep = Globals.REPLACEONMAKE;
5682
+ Globals.REPLACEONMAKE = false;
52515683 if (g instanceof HiddenObject)
52525684 {
52535685 HiddenObject h = (HiddenObject) g;
....@@ -5264,6 +5696,7 @@
52645696 objEditor.makeSomething(g.get(i), false);
52655697 }
52665698 }
5699
+ Globals.REPLACEONMAKE = keep;
52675700 }
52685701
52695702 void ungroup()
....@@ -5564,6 +5997,22 @@
55645997 cButton loopButton;
55655998 cButton textureButton;
55665999
6000
+ cButton skybox1Button;
6001
+ cButton skybox2Button;
6002
+ cButton skybox3Button;
6003
+ cButton skybox4Button;
6004
+ cButton skybox5Button;
6005
+ cButton skybox6Button;
6006
+ cButton skybox7Button;
6007
+
6008
+ cButton skybox11Button;
6009
+ cButton skybox12Button;
6010
+ cButton skybox13Button;
6011
+ cButton skybox14Button;
6012
+ cButton skybox15Button;
6013
+ cButton skybox16Button;
6014
+ cButton skybox17Button;
6015
+
55676016 cButton gridButton;
55686017 cButton boxButton;
55696018 cButton sphereButton;
....@@ -5627,7 +6076,7 @@
56276076 private MenuItem pasteLinkItem;
56286077 private MenuItem pasteCloneItem;
56296078 private MenuItem pasteExpandItem;
5630
- private MenuItem clearItem;
6079
+ private MenuItem deleteItem;
56316080 private MenuItem clearAllItem;
56326081 private MenuItem genUVItem;
56336082 private MenuItem genNormalsMESHItem;
....@@ -5711,6 +6160,8 @@
57116160 private MenuItem attachBumpItem;
57126161 private MenuItem detachBumpItem;
57136162 private MenuItem pigmentBumpItem;
6163
+ private MenuItem embedTexturesItem;
6164
+ private MenuItem deEmbedTexturesItem;
57146165
57156166 private MenuItem particleItem;
57166167 private MenuItem ragdollItem;