Normand Briere
2019-07-28 d7fd07756f4095cb87dc25d89fcffcbda092e2cf
GroupEditor.java
....@@ -23,6 +23,237 @@
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 + "/" + s + ".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("default", "uffizi", row0);
62
+ AddSkyboxButton("default", "CloudyHills", row0);
63
+
64
+ AddSkyboxButton("default", "skycube", row1);
65
+ AddSkyboxButton("bridge", "Bridge", row1);
66
+ AddSkyboxButton("bridge", "Bridge2", row1);
67
+ AddSkyboxButton("urban", "GamlaStan2", row1);
68
+
69
+ AddSkyboxButton("urban", "Parliament", row2);
70
+ AddSkyboxButton("urban", "Roundabout", row2);
71
+ AddSkyboxButton("urban", "SaintLazarusChurch", row2);
72
+ AddSkyboxButton("urban", "SaintLazarusChurch2", row2);
73
+
74
+ AddSkyboxButton("urban", "SaintLazarusChurch3", row3);
75
+ AddSkyboxButton("urban", "UnionSquare", row3);
76
+ AddSkyboxButton("park", "BerzeliiPark", row3);
77
+ AddSkyboxButton("park", "Buddha", row3);
78
+
79
+ AddSkyboxButton("park", "CNTower2", row4);
80
+ AddSkyboxButton("park", "NiagaraFalls1", row4);
81
+ AddSkyboxButton("park", "NiagaraFalls3", row4);
82
+ AddSkyboxButton("park", "Park", row4);
83
+
84
+ AddSkyboxButton("park", "Pond", row5);
85
+ AddSkyboxButton("park", "Skansen", row5);
86
+ AddSkyboxButton("park", "Skansen2", row5);
87
+ AddSkyboxButton("park", "Skansen3", row5);
88
+
89
+ AddSkyboxButton("park", "Skansen4", row6);
90
+ AddSkyboxButton("park", "Skansen5", row6);
91
+ AddSkyboxButton("park", "Stairs", row6);
92
+ AddSkyboxButton("park", "Tantolunden4", row6);
93
+
94
+ tab0.add(row0);
95
+ tab0.add(row1);
96
+ tab0.add(row2);
97
+ tab0.add(row3);
98
+ tab0.add(row4);
99
+ tab0.add(row5);
100
+ tab0.add(row6);
101
+
102
+ for (int i=5; --i>=0;)
103
+ {
104
+ //oe.toolboxPanel.Return();
105
+ //tab0.add(new cGridBag());
106
+ }
107
+ }
108
+
109
+ public void AddSkyboxTab1(JTabbedPane skyboxpanel)
110
+ {
111
+ cGridBag tab0 = new cGridBag().setVertical(true);
112
+
113
+ tab0.setName("Nature");
114
+ skyboxpanel.add(tab0);
115
+
116
+ cGridBag row0 = new cGridBag();
117
+ cGridBag row1 = new cGridBag();
118
+ cGridBag row2 = new cGridBag();
119
+ cGridBag row3 = new cGridBag();
120
+ cGridBag row4 = new cGridBag();
121
+ cGridBag row5 = new cGridBag();
122
+ cGridBag row6 = new cGridBag();
123
+
124
+ AddSkyboxButton("beach", "HeartInTheSand", row0);
125
+ AddSkyboxButton("beach", "LarnacaBeach", row0);
126
+ AddSkyboxButton("beach", "PalmTrees", row0);
127
+ AddSkyboxButton("beach", "Tenerife", row0);
128
+
129
+ AddSkyboxButton("beach", "Tenerife2", row1);
130
+ AddSkyboxButton("beach", "Tenerife3", row1);
131
+ AddSkyboxButton("field", "FishPond", row1);
132
+ AddSkyboxButton("field", "Footballfield", row1);
133
+
134
+ AddSkyboxButton("field", "Meadow", row2);
135
+ AddSkyboxButton("field", "Sorsele", row2);
136
+ AddSkyboxButton("field", "Sorsele2", row2);
137
+ AddSkyboxButton("field", "Sorsele3", row2);
138
+
139
+ AddSkyboxButton("forest", "Brudslojan", row3);
140
+ AddSkyboxButton("forest", "Langholmen2", row3);
141
+ AddSkyboxButton("forest", "Plants", row3);
142
+ AddSkyboxButton("mountain", "Maskonaive", row3);
143
+ AddSkyboxButton("mountain", "Maskonaive2", row4);
144
+
145
+ AddSkyboxButton("mountain", "Maskonaive3", row4);
146
+ AddSkyboxButton("mountain", "Ryfjallet", row4);
147
+ AddSkyboxButton("mountain", "Teide", row4);
148
+
149
+ AddSkyboxButton("rocky", "Langholmen", row5);
150
+ AddSkyboxButton("rocky", "Riddarfjarden", row5);
151
+ AddSkyboxButton("rocky", "Skinnarviksberget", row5);
152
+ AddSkyboxButton("rocky", "Tantolunden6", row5);
153
+ /*
154
+Kastellholmen
155
+Langholmen
156
+Riddarfjarden
157
+Skinnarviksberget
158
+Tanto
159
+Tantolunden2
160
+Tantolunden6
161
+ */
162
+
163
+ tab0.add(row0);
164
+ tab0.add(row1);
165
+ tab0.add(row2);
166
+ tab0.add(row3);
167
+ tab0.add(row4);
168
+ tab0.add(row5);
169
+ tab0.add(row6);
170
+
171
+ for (int i=5; --i>=0;)
172
+ {
173
+ //oe.toolboxPanel.Return();
174
+ //tab0.add(new cGridBag());
175
+ }
176
+ }
177
+
178
+ public void AddSkyboxTab2(JTabbedPane skyboxpanel)
179
+ {
180
+ cGridBag tab0 = new cGridBag().setVertical(true);
181
+
182
+ tab0.setName("Night");
183
+ skyboxpanel.add(tab0);
184
+
185
+ cGridBag row0 = new cGridBag();
186
+ cGridBag row1 = new cGridBag();
187
+ cGridBag row2 = new cGridBag();
188
+ cGridBag row3 = new cGridBag();
189
+ cGridBag row4 = new cGridBag();
190
+ cGridBag row5 = new cGridBag();
191
+ cGridBag row6 = new cGridBag();
192
+
193
+ AddSkyboxButton("night", "NightPath", row0);
194
+ AddSkyboxButton("night", "PondNight", row0);
195
+ AddSkyboxButton("night", "Powerlines", row0);
196
+ AddSkyboxButton("night", "SwedishRoyalCastle", row0);
197
+
198
+ AddSkyboxButton("urban", "CNTower", row1);
199
+ AddSkyboxButton("bridge", "ArstaBridge", row1);
200
+ AddSkyboxButton("indoors", "DallasW", row1);
201
+ AddSkyboxButton("indoors", "MarriottMadisonWest", row1);
202
+
203
+ AddSkyboxButton("indoors", "Vasa", row2);
204
+ AddSkyboxButton("winter", "Backyard", row2);
205
+ AddSkyboxButton("winter", "Creek", row2);
206
+ AddSkyboxButton("winter", "FootballField3", row2);
207
+
208
+ AddSkyboxButton("winter", "Forest", row3);
209
+ AddSkyboxButton("winter", "HornstullsStrand2", row3);
210
+ AddSkyboxButton("winter", "House", row3);
211
+ AddSkyboxButton("winter", "IceLake", row3);
212
+
213
+ AddSkyboxButton("winter", "IceRiver", row4);
214
+ AddSkyboxButton("winter", "Park3", row4);
215
+ AddSkyboxButton("winter", "PondWinter", row4);
216
+
217
+ AddSkyboxButton("winter", "Tantolunden5", row5);
218
+ AddSkyboxButton("winter", "Vindelalven", row5);
219
+ /*
220
+Backyard
221
+Creek
222
+FootballField3
223
+Forest
224
+HornstullsStrand2
225
+House
226
+IceLake
227
+IceRiver
228
+Park3
229
+PondWinter
230
+Tantolunden5
231
+Vindelalven *
232
+ */
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 ChangeSkybox(String name)
250
+ {
251
+ cameraView.envyoff = false;
252
+ cameraView.skyboxname = name;
253
+ cameraView.skyboxext = "jpg";
254
+ cameraView.repaint();
255
+ }
256
+
26257 //ObjEditor objEditor;
27258 public void closeUI2()
28259 {
....@@ -60,6 +291,12 @@
60291 this.copy = this.group = group;
61292 //selectees = this.group.selectees;
62293
294
+ if (copy.versions == null)
295
+ {
296
+ copy.versions = new byte[100][];
297
+ copy.versionindex = -1;
298
+ }
299
+
63300 if(ui)
64301 SetupUI(objEditor);
65302 }
....@@ -80,10 +317,22 @@
80317 SetupViews(objEditor);
81318
82319 ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true);
320
+
321
+ if (copy.versions == null)
322
+ {
323
+ copy.versions = new byte[100][];
324
+ copy.versionindex = -1;
325
+
326
+ Save(true);
327
+ }
83328 }
84329
85330 void CloneSelection(boolean supports)
86331 {
332
+ if (Globals.REPLACEONMAKE)
333
+ Save();
334
+ boolean keep = Globals.REPLACEONMAKE;
335
+ Globals.REPLACEONMAKE = false;
87336 // Object3D keep = GrafreeD.clipboard;
88337 //Object3D obj;
89338 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -94,6 +343,7 @@
94343
95344 makeSomething(clone, i==group.selection.size()-1);
96345 }
346
+ Globals.REPLACEONMAKE = keep;
97347 }
98348
99349 void CloneClipboard(boolean supports)
....@@ -189,8 +439,8 @@
189439 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
190440 // pasteExpandItem.addActionListener(this);
191441 menu.add("-");
192
- clearItem = menu.add(new MenuItem("Clear"));
193
- clearItem.addActionListener(this);
442
+ deleteItem = menu.add(new MenuItem("Delete"));
443
+ deleteItem.addActionListener(this);
194444
195445 if (Globals.ADVANCED)
196446 {
....@@ -220,7 +470,7 @@
220470 // toggleSwitchItem.addItemListener(this);
221471 // toggleSwitchItem.setState(CameraPane.SWITCH);
222472
223
- cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
473
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles"));
224474 toggleHandleItem.addItemListener(this);
225475 toggleHandleItem.setState(CameraPane.HANDLES);
226476
....@@ -380,13 +630,14 @@
380630 shadowYItem.addActionListener(this);
381631 shadowZItem = menu.add(new MenuItem("Shadow Blue"));
382632 shadowZItem.addActionListener(this);
633
+ attributeItem = menu.add(new MenuItem("Attribute"));
634
+ attributeItem.addActionListener(this);
635
+
383636 if (Globals.ADVANCED)
384637 {
385638 menu.add("-");
386639 linkerItem = menu.add(new MenuItem("Linker"));
387640 linkerItem.addActionListener(this);
388
- attributeItem = menu.add(new MenuItem("Attribute"));
389
- attributeItem.addActionListener(this);
390641 templateItem = menu.add(new MenuItem("Template"));
391642 templateItem.addActionListener(this);
392643 pointflowItem = menu.add(new MenuItem("Point Flow"));
....@@ -415,7 +666,7 @@
415666 genNormalsMESHItem.addActionListener(this);
416667 if (Globals.ADVANCED)
417668 {
418
- genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
669
+ genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals"));
419670 genNormalsMINEItem.addActionListener(this);
420671 }
421672 stripifyItem = menu.add(new MenuItem("Stripify"));
....@@ -508,10 +759,15 @@
508759 attachBumpItem.addActionListener(this);
509760 pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump"));
510761 pigmentBumpItem.addActionListener(this);
762
+ //embedTexturesItem
511763 detachPigmentItem = menu.add(new MenuItem("Detach Pigment"));
512764 detachPigmentItem.addActionListener(this);
513765 detachBumpItem = menu.add(new MenuItem("Detach Bump"));
514766 detachBumpItem.addActionListener(this);
767
+ embedTexturesItem = menu.add(new MenuItem("Embed Textures"));
768
+ embedTexturesItem.addActionListener(this);
769
+ deEmbedTexturesItem = menu.add(new MenuItem("De-embed Textures"));
770
+ deEmbedTexturesItem.addActionListener(this);
515771 menu.add("-");
516772 sortbysizeItem = menu.add(new MenuItem("Sort by size"));
517773 sortbysizeItem.addActionListener(this);
....@@ -538,6 +794,7 @@
538794 buildToolsMenu(menu);
539795 }
540796
797
+
541798 void SetupUI2(ObjEditor oe)
542799 {
543800 // June 2019
....@@ -590,50 +847,66 @@
590847 //minButton.setToolTipText("Minimize window");
591848 //minButton.addActionListener(this);
592849
593
- oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
594
- maxButton.setToolTipText("Maximize window");
595
- maxButton.addActionListener(this);
850
+ if (Globals.ADVANCED)
851
+ {
852
+ oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
853
+ maxButton.setToolTipText("Maximize window");
854
+ maxButton.addActionListener(this);
855
+ }
596856
597857 oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
598858 fullButton.setToolTipText("Full-screen window");
599859 fullButton.addActionListener(this);
600860
861
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
862
+ screenfitButton.setToolTipText("Screen fit");
863
+ screenfitButton.addActionListener(this);
864
+
601865 oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
602866 restoreCameraButton.setToolTipText("Restore viewpoint");
603867 restoreCameraButton.addActionListener(this);
604868
869
+ copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
870
+ saveButton.setToolTipText("New version");
871
+ saveButton.addActionListener(this);
872
+
605873 copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
606
- undoButton.setToolTipText("Undo changes");
874
+ undoButton.setToolTipText("Previous version");
607875 undoButton.addActionListener(this);
608876 undoButton.setEnabled(false);
609877
878
+ cGridBag updown = new cGridBag().setVertical(true);
879
+ updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
880
+ restoreButton.setToolTipText("Restore current");
881
+ restoreButton.addActionListener(this);
882
+ restoreButton.setEnabled(false);
883
+
884
+ updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
885
+ replaceButton.setToolTipText("Replace current");
886
+ replaceButton.addActionListener(this);
887
+ replaceButton.setEnabled(false);
888
+
889
+ copyOptionsPanel.add(updown);
890
+
610891 copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
611
- redoButton.setToolTipText("Redo changes");
892
+ redoButton.setToolTipText("Next version");
612893 redoButton.addActionListener(this);
613894 redoButton.setEnabled(false);
614895
615
- copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
616
- saveButton.setToolTipText("Save changes");
617
- saveButton.addActionListener(this);
618
-
619
- copyOptionsPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
896
+ oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
620897 liveCB.setToolTipText("Enable animation");
621898 liveCB.addItemListener(this);
622899
623
- copyOptionsPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
900
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
624901 oneStepButton.setToolTipText("Animate one step forward");
625902 oneStepButton.addActionListener(this);
626903
627
- copyOptionsPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
904
+ oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
628905 fastCB.setToolTipText("Fast mode");
629906 fastCB.addItemListener(this);
630907
631908 //oe.toolboxPanel.Return();
632909
633
- copyOptionsPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
634
- screenfitButton.setToolTipText("Screen fit");
635
- screenfitButton.addActionListener(this);
636
-
637910 // copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
638911 // trackCB.setToolTipText("Enable tracking");
639912 // trackCB.addItemListener(this);
....@@ -646,31 +919,32 @@
646919 oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
647920 snapobjectButton.addActionListener(this);
648921 snapobjectButton.setToolTipText("Snap Object");
922
+
923
+ oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
924
+ fourButton.addActionListener(this);
925
+ fourButton.setToolTipText("Show control panel only");
649926 }
650927
651928 //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
652929
653
- oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
654
- twoButton.setToolTipText("Show center view only");
930
+ oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
931
+ twoButton.setToolTipText("Show 3D view only");
655932 twoButton.addActionListener(this);
656933 this.fullscreenLayout = twoButton;
657934
658
- oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
659
- fourButton.addActionListener(this);
660
- fourButton.setToolTipText("Show left panel only");
661
- oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
662
- sixButton.setToolTipText("2-column layout left");
663
- sixButton.addActionListener(this);
664
- oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
665
- threeButton.setToolTipText("2-column layout right");
935
+ oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
936
+ threeButton.setToolTipText("Show controls and 3D view");
666937 threeButton.addActionListener(this);
667
- oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
668
- sevenButton.setToolTipText("3-column layout");
669
- sevenButton.addActionListener(this);
938
+ oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
939
+ sixButton.setToolTipText("Show 3D view and controls");
940
+ sixButton.addActionListener(this);
941
+// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
942
+// sevenButton.setToolTipText("3-column layout");
943
+// sevenButton.addActionListener(this);
670944 //
671945
672
- oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
673
- rootButton.setToolTipText("Edit selection in new tab");
946
+ oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
947
+ rootButton.setToolTipText("Open selection in new tab");
674948 rootButton.addActionListener(this);
675949
676950 oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
....@@ -679,28 +953,30 @@
679953 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
680954 //clearButton.addActionListener(this);
681955
956
+ cGridBag row1 = new cGridBag();
957
+
682958 // INSERT
683
- oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
959
+ row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
684960 gridButton.setToolTipText("Create grid");
685961 gridButton.addActionListener(this);
686962
687
- oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
963
+ row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
688964 boxButton.setToolTipText("Create box");
689965 boxButton.addActionListener(this);
690966
691
- oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
967
+ row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
692968 sphereButton.setToolTipText("Create sphere");
693969 sphereButton.addActionListener(this);
694970
695
- oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
971
+ row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
696972 coneButton.setToolTipText("Create cone");
697973 coneButton.addActionListener(this);
698974
699
- oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
975
+ row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
700976 torusButton.setToolTipText("Create torus");
701977 torusButton.addActionListener(this);
702978
703
- oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
979
+ row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
704980 superButton.setToolTipText("Create superellipsoid");
705981 superButton.addActionListener(this);
706982
....@@ -711,51 +987,56 @@
711987 kleinButton.addActionListener(this);
712988 }
713989
714
- oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
990
+ row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
715991 particlesButton.setToolTipText("Create particle system");
716992 particlesButton.addActionListener(this);
717993
718
- oe.toolboxPanel.Return();
994
+ oe.toolboxPanel.add(row1);
719995
720
- oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
996
+ cGridBag row2 = new cGridBag();
997
+
998
+ row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
721999 groupButton.setToolTipText("Create group");
7221000 groupButton.addActionListener(this);
7231001
724
- oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1002
+ row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7251003 compositeButton.setToolTipText("Create composite");
7261004 compositeButton.addActionListener(this);
7271005
728
- oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
729
- switchButton.setToolTipText("Create switch");
1006
+ row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1007
+ switchButton.setToolTipText("Create item switcher");
7301008 switchButton.addActionListener(this);
7311009
732
- oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1010
+ row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7331011 loopButton.setToolTipText("Create loop");
7341012 loopButton.addActionListener(this);
7351013
736
- oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1014
+ row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7371015 textureButton.setToolTipText("Create texture");
7381016 textureButton.addActionListener(this);
7391017
740
- oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1018
+ row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7411019 overlayButton.setToolTipText("Create overlay");
7421020 overlayButton.addActionListener(this);
7431021
744
- oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1022
+ row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7451023 lightButton.setToolTipText("Create light");
7461024 lightButton.addActionListener(this);
7471025
748
- for (int i=6; --i>=0;)
749
- {
750
- oe.toolboxPanel.Return();
751
- oe.toolboxPanel.add(new cGridBag());
752
- oe.toolboxPanel.add(new cGridBag());
753
- oe.toolboxPanel.add(new cGridBag());
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
- }
1026
+ oe.toolboxPanel.add(row2);
1027
+
1028
+ // ENVYMAPS
1029
+ cGridBag skyboxpane = new cGridBag();
1030
+ skyboxpane.preferredHeight = 100;
1031
+
1032
+ oe.toolboxPanel.add(skyboxpane);
1033
+
1034
+ JTabbedPane skyboxpanel = new JTabbedPane();
1035
+ skyboxpane.add(skyboxpanel);
1036
+
1037
+ AddSkyboxTab0(skyboxpanel);
1038
+ AddSkyboxTab1(skyboxpanel);
1039
+ AddSkyboxTab2(skyboxpanel);
7591040
7601041 // EDIT panel
7611042 editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
....@@ -811,9 +1092,12 @@
8111092
8121093 oe.treePanel.add(copyOptionsPanel);
8131094 oe.treePanel.Return();
1095
+ cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
1096
+ versionSlider = (cNumberSlider)sliderPane.getComponent(1);
1097
+ sliderPane.preferredHeight = 1;
8141098
815
-// mainPanel.setDividerLocation(0.5); //1.0);
816
-// mainPanel.setResizeWeight(0.5);
1099
+// mainPanel.setDividerLocation(0.1); //1.0);
1100
+ mainPanel.setResizeWeight(0.4);
8171101
8181102 //jList.addListSelectionListener(this);
8191103 oe.jTree.addTreeSelectionListener(this);
....@@ -821,7 +1105,7 @@
8211105 //jTree.setEditable(true);
8221106 oe.jTree.setDragEnabled(true);
8231107 //jTree.setPreferredSize(new Dimension(10,10));
824
- jSP.setPreferredSize(new Dimension(100,200));
1108
+ //jSP.setPreferredSize(new Dimension(100,200));
8251109
8261110 oe.jTree.setCellRenderer(new cTreeModel.Renderer());
8271111
....@@ -833,7 +1117,7 @@
8331117 dgr.addDragGestureListener(this);
8341118 }catch(Exception e) {}
8351119 */
836
- radio.layout = sevenButton;
1120
+ radio.layout = sixButton; // sevenButton;
8371121 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
8381122 }
8391123
....@@ -863,9 +1147,13 @@
8631147
8641148 if (true) // Globals.ADVANCED)
8651149 {
866
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
867
- supportCB.setToolTipText("Enable rigging");
868
- supportCB.addItemListener(this);
1150
+// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
1151
+// supportCB.setToolTipText("Enable rigging");
1152
+// supportCB.addItemListener(this);
1153
+
1154
+ panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints);
1155
+ freezeCB.setToolTipText("Fast moving camera");
1156
+ freezeCB.addItemListener(this);
8691157
8701158 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
8711159 // localCB.addItemListener(this);
....@@ -929,12 +1217,12 @@
9291217 toggleTextureCB.addItemListener(this);
9301218
9311219 panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints);
932
- toggleSwitchCB.setToolTipText("Use switch");
1220
+ toggleSwitchCB.setToolTipText("Choose a single item");
9331221 toggleSwitchCB.addItemListener(this);
9341222
935
- panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints);
936
- autosaveCB.setToolTipText("On structure change");
937
- autosaveCB.addItemListener(this);
1223
+ panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints);
1224
+ autokeepCB.setToolTipText("On structure change");
1225
+ autokeepCB.addItemListener(this);
9381226
9391227 panel.Return();
9401228 if (Globals.ADVANCED)
....@@ -963,7 +1251,7 @@
9631251 {
9641252 cRadio radioButton = new cRadio(obj.name);
9651253
966
- // Patch to avoid bug with transparency.
1254
+ // June 2019. Patch to avoid bug with transparency.
9671255 radioButton.hadMaterial = obj.material != null;
9681256 if (!radioButton.hadMaterial)
9691257 {
....@@ -971,7 +1259,7 @@
9711259 }
9721260
9731261 radioButton.SetObject(obj);
974
- radioButton.layout = sevenButton;
1262
+ radioButton.layout = sixButton; // sevenButton;
9751263 radioButton.SetCamera(cameraView.renderCamera, false);
9761264 radioButton.addActionListener(this);
9771265 radioPanel.add(radioButton);
....@@ -1000,6 +1288,7 @@
10001288 cCheckBox slowCB;
10011289 cCheckBox boxCB;
10021290 cCheckBox zoomBoxCB;
1291
+ cCheckBox freezeCB;
10031292 //cToggleButton trackCB;
10041293 cCheckBox trackCB;
10051294 cCheckBox smoothfocusCB;
....@@ -1010,7 +1299,7 @@
10101299
10111300 cCheckBox oeilCB;
10121301 cCheckBox shadowCB;
1013
- cCheckBox autosaveCB;
1302
+ cCheckBox autokeepCB;
10141303 cCheckBox lookAtCB;
10151304
10161305 // static int COLOR = 1;
....@@ -1118,9 +1407,13 @@
11181407 {
11191408 Globals.COMPUTESHADOWWHENLIVE ^= true;
11201409 }
1121
- else if(e.getSource() == autosaveCB)
1410
+ else if(e.getSource() == freezeCB)
11221411 {
1123
- Globals.SAVEONMAKE ^= true;
1412
+ Globals.FREEZEONMOVE ^= true;
1413
+ }
1414
+ else if(e.getSource() == autokeepCB)
1415
+ {
1416
+ Globals.REPLACEONMAKE ^= true;
11241417 }
11251418 else if(e.getSource() == lookAtCB)
11261419 {
....@@ -1202,8 +1495,6 @@
12021495 }
12031496 }
12041497
1205
- String string = (String) object;
1206
-
12071498 System.out.println("Transfer = " + object + "; drop : " + target);
12081499 // if( object instanceof java.io.File[])
12091500 // {
....@@ -1211,6 +1502,8 @@
12111502 // objEditor.DropFile((java.io.File[]) object, true);
12121503 // return;
12131504 // }
1505
+
1506
+ String string = object.toString();
12141507
12151508 // File path for Mac and Windows
12161509 if (string.charAt(0) == '/' || string.charAt(1) == ':')
....@@ -1460,6 +1753,9 @@
14601753 animationItem.addItemListener(this);
14611754 animationItem.setState(Globals.ANIMATION);
14621755
1756
+ menu.add(archiveItem = new MenuItem("Archive3D..."));
1757
+ archiveItem.addActionListener(this);
1758
+
14631759 menu.add("-");
14641760 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
14651761 parseverticesItem.addActionListener(this);
....@@ -1472,6 +1768,8 @@
14721768 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
14731769 reduce34MorphItem.addActionListener(this);
14741770 menu.add("-");
1771
+ menu.add(memoryItem = new MenuItem("Memory Usage"));
1772
+ memoryItem.addActionListener(this);
14751773 menu.add(computeAOItem = new MenuItem("Compute AO"));
14761774 computeAOItem.addActionListener(this);
14771775
....@@ -1480,8 +1778,6 @@
14801778 mirrorItem = menu.add(new MenuItem("Mirror Poses"));
14811779 mirrorItem.addActionListener(this);
14821780 menu.add("-");
1483
- menu.add(memoryItem = new MenuItem("Memory Usage"));
1484
- memoryItem.addActionListener(this);
14851781 menu.add(analyzeItem = new MenuItem("Analyze"));
14861782 analyzeItem.addActionListener(this);
14871783 menu.add(dumpItem = new MenuItem("Print"));
....@@ -1642,6 +1938,16 @@
16421938 listUI.remove(i);
16431939 }
16441940 }
1941
+ }
1942
+
1943
+ private void EditElement(Object3D elem, boolean newWindow)
1944
+ {
1945
+ // if (!(elem instanceof Composite))
1946
+ // newWindow = false;
1947
+ listUI.add(elem);
1948
+ elem.openEditWindow(this, newWindow); //, false);
1949
+ System.out.println("edit : " + elem);
1950
+ elem.editWindow.refreshContents(true); // ? new
16451951 }
16461952
16471953 /**
....@@ -2071,6 +2377,23 @@
20712377 {
20722378 makeSomething(new Light());
20732379 } else
2380
+// if (source == skybox1Button ||
2381
+// source == skybox2Button ||
2382
+// source == skybox3Button ||
2383
+// source == skybox4Button ||
2384
+// source == skybox5Button ||
2385
+// source == skybox6Button ||
2386
+// source == skybox7Button ||
2387
+// source == skybox11Button ||
2388
+// source == skybox12Button ||
2389
+// source == skybox13Button ||
2390
+// source == skybox14Button ||
2391
+// source == skybox15Button ||
2392
+// source == skybox16Button ||
2393
+// source == skybox17Button)
2394
+// {
2395
+// ChangeSkybox(source);
2396
+// } else
20742397 if (source == csgItem)
20752398 {
20762399 group(new CSG());
....@@ -2122,25 +2445,25 @@
21222445 Composite csg = new GroupLeaf();
21232446 csg.count = 5;
21242447 group(csg);
2125
- Composite child = new cGroup();
2448
+ Composite child = new cGroup("Branch");
21262449 csg.addChild(child);
21272450 child.addChild(csg);
21282451 } else
21292452 if (source == doubleItem)
21302453 {
2131
- Composite csg = new GroupLeaf();
2454
+ Composite csg = new GroupLeaf("Fork");
21322455 csg.count = 5;
21332456 group(csg);
2134
- Composite child = new cGroup();
2457
+ Composite child = new cGroup("Branch A");
21352458 csg.addChild(child);
21362459 child.addChild(csg);
2137
- child = new cGroup();
2460
+ child = new cGroup("Branch B");
21382461 csg.addChild(child);
21392462 child.addChild(csg);
21402463 } else
21412464 if (source == tripleItem)
21422465 {
2143
- Composite csg = new GroupLeaf();
2466
+ Composite csg = new GroupLeaf("Trident");
21442467 csg.count = 4;
21452468 group(csg);
21462469 Composite child = new cGroup();
....@@ -2156,7 +2479,7 @@
21562479 if (source == computeAOItem)
21572480 {
21582481 Globals.drawMode = CameraPane.OCCLUSION;
2159
- Globals.theRenderer.repaint();
2482
+ cameraView.repaint();
21602483 } else
21612484 if (source == recompileItem)
21622485 {
....@@ -2204,15 +2527,31 @@
22042527 } else
22052528 if (source == undoButton)
22062529 {
2530
+ // Go to previous version
2531
+ //if (!Undo())
2532
+ //java.awt.Toolkit.getDefaultToolkit().beep();
22072533 Undo();
2534
+ } else
2535
+ if (source == restoreButton)
2536
+ {
2537
+ // Restore current version
2538
+ Restore();
2539
+ } else
2540
+ if (source == replaceButton)
2541
+ {
2542
+ // Overwrite current version
2543
+ Replace();
22082544 } else
22092545 if (source == redoButton)
22102546 {
2547
+ // Go to next version
22112548 Redo();
22122549 } else
22132550 if (source == saveButton)
22142551 {
2215
- Save();
2552
+ // Save a new version
2553
+ if (!Save(true))
2554
+ java.awt.Toolkit.getDefaultToolkit().beep();
22162555 } else
22172556 if (source == oneStepButton)
22182557 {
....@@ -2221,17 +2560,14 @@
22212560 } else
22222561 if (source == screenfitButton)
22232562 {
2224
- //Reload(lastConverter, lastFilename, true);
22252563 ScreenFit();
22262564 } else
22272565 if (source == screenfitpointButton)
22282566 {
2229
- //Reload(lastConverter, lastFilename, true);
22302567 ScreenFitPoint();
22312568 } else
22322569 if (source == snapobjectButton)
22332570 {
2234
- //Reload(lastConverter, lastFilename, true);
22352571 SnapObject();
22362572 } else
22372573 // if (event.getSource() == recompileButton)
....@@ -2595,7 +2931,7 @@
25952931 {
25962932 StepAll();
25972933 } else
2598
- if (source == clearItem) // || event.getSource() == clearButton)
2934
+ if (source == deleteItem) // || event.getSource() == clearButton)
25992935 {
26002936 //int indices[] = jList.getSelectedIndices();
26012937 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2755,15 +3091,28 @@
27553091 } else
27563092 if (source == ungroupItem || source == ungroupButton)
27573093 {
2758
- //ungroup();
3094
+ boolean hasRoot = false;
3095
+
27593096 for (int i=0; i<group.selection.size(); i++)
27603097 {
2761
- Ungroup(group.selection.get(i));
3098
+ if (group.selection.get(i) == group)
3099
+ {
3100
+ hasRoot = true;
3101
+ break;
3102
+ }
27623103 }
27633104
2764
- ClearSelection(false);
2765
-
2766
- refreshContents();
3105
+ if (!hasRoot)
3106
+ {
3107
+ for (int i=0; i<group.selection.size(); i++)
3108
+ {
3109
+ Ungroup(group.selection.get(i));
3110
+ }
3111
+
3112
+ ClearSelection(false);
3113
+
3114
+ refreshContents();
3115
+ }
27673116 } else
27683117 if (source == genUVItem)
27693118 {
....@@ -3064,7 +3413,7 @@
30643413 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
30653414 {
30663415 obj = (Object3D)e.nextElement();
3067
- obj.SetBumpTexture(null);
3416
+ obj.ResetBumpTexture();
30683417 }
30693418
30703419 refreshContents();
....@@ -3078,6 +3427,31 @@
30783427 obj.SetBumpTexture(obj.GetPigmentTexture());
30793428 }
30803429
3430
+ refreshContents();
3431
+ } else
3432
+ if (source == embedTexturesItem)
3433
+ {
3434
+ Object3D obj;
3435
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3436
+ {
3437
+ obj = (Object3D)e.nextElement();
3438
+ obj.EmbedTextures(true);
3439
+ }
3440
+
3441
+ refreshContents();
3442
+ } else
3443
+ if (source == deEmbedTexturesItem)
3444
+ {
3445
+ Object3D obj;
3446
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3447
+ {
3448
+ obj = (Object3D)e.nextElement();
3449
+ obj.EmbedTextures(false);
3450
+ }
3451
+
3452
+ CameraPane.texturepigment.clear();
3453
+ CameraPane.texturebump.clear();
3454
+
30813455 refreshContents();
30823456 } else
30833457 if (source == flashSelectionButton)
....@@ -3181,8 +3555,8 @@
31813555 // centralPanel.setVisible(true);
31823556 // XYZPanel.setVisible(true);
31833557 bigThree.ClearUI();
3558
+ bigThree.add(scenePanel);
31843559 bigThree.add(centralPanel);
3185
- bigThree.add(XYZPanel);
31863560 bigThree.FlushUI();
31873561
31883562 cameraView.requestFocusInWindow();
....@@ -3262,8 +3636,8 @@
32623636 // centralPanel.setVisible(true);
32633637 // XYZPanel.setVisible(false);
32643638 bigThree.ClearUI();
3265
- bigThree.add(scenePanel);
32663639 bigThree.add(centralPanel);
3640
+ bigThree.add(scenePanel);
32673641 bigThree.FlushUI();
32683642
32693643 cameraView.requestFocusInWindow();
....@@ -3446,6 +3820,9 @@
34463820 }
34473821
34483822 copy = group;
3823
+
3824
+ SetUndoStates();
3825
+
34493826 //Globals.theRenderer.object = group;
34503827 if(!useclient)
34513828 {
....@@ -3474,8 +3851,10 @@
34743851 radio.layout.doClick();
34753852
34763853 ClearUnpinned();
3477
- SetPinStates(group.selection.size() > 0);
3478
- if (group.selection.size() == 1)
3854
+ //Grafreed.Assert(group != null);
3855
+ //Grafreed.Assert(group.selection != null);
3856
+ SetPinStates(group.selection == null || group.selection.size() > 0);
3857
+ if (group.selection == null || group.selection.size() == 1)
34793858 EditSelection(false);
34803859 keepparent = group.parent;
34813860 // PARENT = NULL or not???
....@@ -4069,7 +4448,7 @@
40694448
40704449 try
40714450 {
4072
- texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
4451
+ texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres);
40734452 }
40744453 catch (Exception e)
40754454 {
....@@ -4546,6 +4925,12 @@
45464925
45474926 void EditSelection(boolean newWindow)
45484927 {
4928
+ if (group.selection == null)
4929
+ {
4930
+ EditElement(group, newWindow); // ? new
4931
+ return;
4932
+ }
4933
+
45494934 // aConstraints.gridy = 0;
45504935 for (int i=0; i<group.selection.size(); i++)
45514936 {
....@@ -4556,12 +4941,7 @@
45564941 Object3D elem = (Object3D)group.selection.elementAt(i);
45574942 if(elem != group || !newWindow)
45584943 {
4559
- // if (!(elem instanceof Composite))
4560
- // newWindow = false;
4561
- listUI.add(elem);
4562
- elem.openEditWindow(this, newWindow); //, false);
4563
- System.out.println("edit : " + elem);
4564
- elem.editWindow.refreshContents(true); // ? new
4944
+ EditElement(elem, newWindow); // ? new
45654945 }
45664946 }
45674947 }
....@@ -4705,8 +5085,8 @@
47055085
47065086 void refreshContents(boolean cp)
47075087 {
4708
- if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info"))
4709
- if (!Globals.MOUSEDRAGGED) // && !Globals.TIMERRUNNING)
5088
+ if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
5089
+ if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
47105090 {
47115091 objEditor.ClearInfo(); // .GetMaterial());
47125092
....@@ -4805,8 +5185,8 @@
48055185
48065186 if (cut)
48075187 {
4808
- if (Globals.SAVEONMAKE)
4809
- Save();
5188
+// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save.
5189
+// Save();
48105190 //int indices[] = jList.getSelectedIndices();
48115191 //for (int i = indices.length - 1; i >= 0; i--)
48125192 //jList.remove(indices[i]);
....@@ -4909,6 +5289,10 @@
49095289
49105290 void paste(boolean expand)
49115291 {
5292
+ if (Globals.REPLACEONMAKE)
5293
+ Save();
5294
+ boolean keep = Globals.REPLACEONMAKE;
5295
+ Globals.REPLACEONMAKE = false;
49125296 // if (GrafreeD.clipboard == null)
49135297 // return;
49145298 boolean first = true;
....@@ -4968,6 +5352,7 @@
49685352 Grafreed.clipboard.get(0).parent = keepparent;
49695353 }
49705354
5355
+ Globals.REPLACEONMAKE = keep;
49715356 ResetModel();
49725357 refreshContents();
49735358 }
....@@ -5103,6 +5488,10 @@
51035488
51045489 void group(Object3D csg, boolean grab)
51055490 {
5491
+ if (Globals.REPLACEONMAKE)
5492
+ Save();
5493
+ boolean keep = Globals.REPLACEONMAKE;
5494
+ Globals.REPLACEONMAKE = false;
51065495 if (//false) // why??
51075496 !group.selection.isEmpty())
51085497 {
....@@ -5216,10 +5605,15 @@
52165605 //node.add(csg);
52175606 //makeSomething(node);
52185607 makeSomething(csg);
5608
+ Globals.REPLACEONMAKE = keep;
52195609 }
52205610
52215611 void Ungroup(Object3D g)
52225612 {
5613
+ if (Globals.REPLACEONMAKE)
5614
+ Save();
5615
+ boolean keep = Globals.REPLACEONMAKE;
5616
+ Globals.REPLACEONMAKE = false;
52235617 if (g instanceof HiddenObject)
52245618 {
52255619 HiddenObject h = (HiddenObject) g;
....@@ -5236,6 +5630,7 @@
52365630 objEditor.makeSomething(g.get(i), false);
52375631 }
52385632 }
5633
+ Globals.REPLACEONMAKE = keep;
52395634 }
52405635
52415636 void ungroup()
....@@ -5526,9 +5921,6 @@
55265921
55275922 cButton restoreCameraButton;
55285923
5529
- cButton minButton;
5530
- cButton maxButton;
5531
- cButton fullButton;
55325924 cButton saveButton;
55335925 cButton oneStepButton;
55345926
....@@ -5538,6 +5930,22 @@
55385930 cButton switchButton;
55395931 cButton loopButton;
55405932 cButton textureButton;
5933
+
5934
+ cButton skybox1Button;
5935
+ cButton skybox2Button;
5936
+ cButton skybox3Button;
5937
+ cButton skybox4Button;
5938
+ cButton skybox5Button;
5939
+ cButton skybox6Button;
5940
+ cButton skybox7Button;
5941
+
5942
+ cButton skybox11Button;
5943
+ cButton skybox12Button;
5944
+ cButton skybox13Button;
5945
+ cButton skybox14Button;
5946
+ cButton skybox15Button;
5947
+ cButton skybox16Button;
5948
+ cButton skybox17Button;
55415949
55425950 cButton gridButton;
55435951 cButton boxButton;
....@@ -5602,7 +6010,7 @@
56026010 private MenuItem pasteLinkItem;
56036011 private MenuItem pasteCloneItem;
56046012 private MenuItem pasteExpandItem;
5605
- private MenuItem clearItem;
6013
+ private MenuItem deleteItem;
56066014 private MenuItem clearAllItem;
56076015 private MenuItem genUVItem;
56086016 private MenuItem genNormalsMESHItem;
....@@ -5686,6 +6094,8 @@
56866094 private MenuItem attachBumpItem;
56876095 private MenuItem detachBumpItem;
56886096 private MenuItem pigmentBumpItem;
6097
+ private MenuItem embedTexturesItem;
6098
+ private MenuItem deEmbedTexturesItem;
56896099
56906100 private MenuItem particleItem;
56916101 private MenuItem ragdollItem;