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 {
....@@ -204,23 +454,23 @@
204454 //zBufferItem.addActionListener(this);
205455 //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
206456 //normalLensItem.addActionListener(this);
207
- cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint"));
208
- revertCameraItem.addActionListener(this);
457
+ cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint"));
458
+ restoreCameraItem.addActionListener(this);
209459
210
- cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
211
- toggleFullScreenItem.addItemListener(this);
212
- toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
213
- cameraMenu.add("-");
460
+// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
461
+// toggleFullScreenItem.addItemListener(this);
462
+// toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
463
+// cameraMenu.add("-");
464
+//
465
+// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
466
+// toggleTextureItem.addItemListener(this);
467
+// toggleTextureItem.setState(CameraPane.textureon);
468
+//
469
+// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
470
+// toggleSwitchItem.addItemListener(this);
471
+// toggleSwitchItem.setState(CameraPane.SWITCH);
214472
215
- cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
216
- toggleTextureItem.addItemListener(this);
217
- toggleTextureItem.setState(CameraPane.textureon);
218
-
219
- cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
220
- toggleSwitchItem.addItemListener(this);
221
- toggleSwitchItem.setState(CameraPane.SWITCH);
222
-
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
....@@ -275,7 +525,7 @@
275525 {
276526 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
277527 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
278
- //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
528
+ //cameraMenu.add(switchViewItem = new MenuItem("Reverse View"));
279529 editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
280530 oe.cameraMenu.add("-");
281531 openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
....@@ -283,7 +533,7 @@
283533 editLeafItem.addActionListener(this);
284534 lookAtItem.addActionListener(this);
285535 //lookFromItem.addActinoListener(this);
286
- //switchItem.addActionListener(this);
536
+ //switchViewItem.addActionListener(this);
287537 }
288538
289539 oe.menuBar.add(menu = new Menu("Setting"));
....@@ -328,14 +578,14 @@
328578 }
329579
330580 oe.menuBar.add(menu = new Menu("Group"));
331
- grabItem = menu.add(new MenuItem("Grab"));
332
- grabItem.addActionListener(this);
581
+// grabItem = menu.add(new MenuItem("Grab"));
582
+// grabItem.addActionListener(this);
333583 backItem = menu.add(new MenuItem("Back"));
334584 backItem.addActionListener(this);
335585 frontItem = menu.add(new MenuItem("Front"));
336586 frontItem.addActionListener(this);
337
- compositeItem = menu.add(new MenuItem("Composite"));
338
- compositeItem.addActionListener(this);
587
+// compositeItem = menu.add(new MenuItem("Composite"));
588
+// compositeItem.addActionListener(this);
339589
340590 if (Globals.ADVANCED)
341591 {
....@@ -345,10 +595,10 @@
345595 ungroupItem = menu.add(new MenuItem("Ungroup"));
346596 ungroupItem.addActionListener(this);
347597
348
- menu.add("-");
349
-
350
- randomItem = menu.add(new MenuItem("Switch node"));
351
- randomItem.addActionListener(this);
598
+// menu.add("-");
599
+//
600
+// switchItem = menu.add(new MenuItem("Switch node"));
601
+// switchItem.addActionListener(this);
352602 if (Globals.ADVANCED)
353603 {
354604 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
....@@ -365,13 +615,11 @@
365615 frameselectorItem.addActionListener(this);
366616 scriptNodeItem = menu.add(new MenuItem("Script Node"));
367617 scriptNodeItem.addActionListener(this);
368
- cameraItem = menu.add(new MenuItem("Camera"));
369
- cameraItem.addActionListener(this);
370618 }
371619
372620 oe.menuBar.add(menu = new Menu("Object"));
373
- textureItem = menu.add(new MenuItem("Texture"));
374
- textureItem.addActionListener(this);
621
+// textureItem = menu.add(new MenuItem("Texture"));
622
+// textureItem.addActionListener(this);
375623 billboardItem = menu.add(new MenuItem("Billboard"));
376624 billboardItem.addActionListener(this);
377625 csgItem = menu.add(new MenuItem("CSG"));
....@@ -382,13 +630,14 @@
382630 shadowYItem.addActionListener(this);
383631 shadowZItem = menu.add(new MenuItem("Shadow Blue"));
384632 shadowZItem.addActionListener(this);
633
+ attributeItem = menu.add(new MenuItem("Attribute"));
634
+ attributeItem.addActionListener(this);
635
+
385636 if (Globals.ADVANCED)
386637 {
387638 menu.add("-");
388639 linkerItem = menu.add(new MenuItem("Linker"));
389640 linkerItem.addActionListener(this);
390
- attributeItem = menu.add(new MenuItem("Attribute"));
391
- attributeItem.addActionListener(this);
392641 templateItem = menu.add(new MenuItem("Template"));
393642 templateItem.addActionListener(this);
394643 pointflowItem = menu.add(new MenuItem("Point Flow"));
....@@ -417,7 +666,7 @@
417666 genNormalsMESHItem.addActionListener(this);
418667 if (Globals.ADVANCED)
419668 {
420
- genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
669
+ genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals"));
421670 genNormalsMINEItem.addActionListener(this);
422671 }
423672 stripifyItem = menu.add(new MenuItem("Stripify"));
....@@ -510,10 +759,15 @@
510759 attachBumpItem.addActionListener(this);
511760 pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump"));
512761 pigmentBumpItem.addActionListener(this);
762
+ //embedTexturesItem
513763 detachPigmentItem = menu.add(new MenuItem("Detach Pigment"));
514764 detachPigmentItem.addActionListener(this);
515765 detachBumpItem = menu.add(new MenuItem("Detach Bump"));
516766 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);
517771 menu.add("-");
518772 sortbysizeItem = menu.add(new MenuItem("Sort by size"));
519773 sortbysizeItem.addActionListener(this);
....@@ -540,6 +794,7 @@
540794 buildToolsMenu(menu);
541795 }
542796
797
+
543798 void SetupUI2(ObjEditor oe)
544799 {
545800 // June 2019
....@@ -582,53 +837,79 @@
582837 oe.radioPanel.add(dummyButton);
583838 oe.buttonGroup.add(dummyButton);
584839 */
840
+ cGridBag copyOptionsPanel = new cGridBag();
841
+
842
+ copyOptionsPanel.preferredHeight = 2;
843
+
585844 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
586845
587846 //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
588847 //minButton.setToolTipText("Minimize window");
589848 //minButton.addActionListener(this);
590849
591
- oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
592
- maxButton.setToolTipText("Maximize window");
593
- 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
+ }
594856
595857 oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
596858 fullButton.setToolTipText("Full-screen window");
597859 fullButton.addActionListener(this);
598860
599
- oe.toolboxPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
600
- undoButton.setToolTipText("Undo changes");
601
- undoButton.addActionListener(this);
861
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
862
+ screenfitButton.setToolTipText("Screen fit");
863
+ screenfitButton.addActionListener(this);
864
+
865
+ oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
866
+ restoreCameraButton.setToolTipText("Restore viewpoint");
867
+ restoreCameraButton.addActionListener(this);
602868
603
- oe.toolboxPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
604
- redoButton.setToolTipText("Redo changes");
605
- redoButton.addActionListener(this);
606
-
607
- oe.toolboxPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
608
- saveButton.setToolTipText("Save changes");
869
+ copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
870
+ saveButton.setToolTipText("New version");
609871 saveButton.addActionListener(this);
872
+
873
+ copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
874
+ undoButton.setToolTipText("Previous version");
875
+ undoButton.addActionListener(this);
876
+ undoButton.setEnabled(false);
610877
611
- oe.toolboxPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
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
+
891
+ copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
892
+ redoButton.setToolTipText("Next version");
893
+ redoButton.addActionListener(this);
894
+ redoButton.setEnabled(false);
895
+
896
+ oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
612897 liveCB.setToolTipText("Enable animation");
613898 liveCB.addItemListener(this);
614899
615
- oe.toolboxPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
900
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
616901 oneStepButton.setToolTipText("Animate one step forward");
617902 oneStepButton.addActionListener(this);
618903
619
- oe.toolboxPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
904
+ oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
620905 fastCB.setToolTipText("Fast mode");
621906 fastCB.addItemListener(this);
622907
623
- oe.toolboxPanel.Return();
908
+ //oe.toolboxPanel.Return();
624909
625
- oe.toolboxPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
626
- trackCB.setToolTipText("Enable tracking");
627
- trackCB.addItemListener(this);
628
-
629
- oe.toolboxPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
630
- screenfitButton.setToolTipText("Screen fit");
631
- screenfitButton.addActionListener(this);
910
+// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
911
+// trackCB.setToolTipText("Enable tracking");
912
+// trackCB.addItemListener(this);
632913
633914 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
634915 // screenfitpointButton.addActionListener(this);
....@@ -638,35 +919,32 @@
638919 oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
639920 snapobjectButton.addActionListener(this);
640921 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");
641926 }
642927
643
- oe.toolboxPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
644
- flashSelectionButton.setToolTipText("Highlight selection");
645
- flashSelectionButton.addActionListener(this);
646
-
647928 //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
648929
649
- oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
650
- 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");
651932 twoButton.addActionListener(this);
652933 this.fullscreenLayout = twoButton;
653934
654
- oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
655
- fourButton.addActionListener(this);
656
- fourButton.setToolTipText("Show left panel only");
657
- oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
658
- sixButton.setToolTipText("2-column layout left");
659
- sixButton.addActionListener(this);
660
- oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
661
- 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");
662937 threeButton.addActionListener(this);
663
- oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
664
- sevenButton.setToolTipText("3-column layout");
665
- 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);
666944 //
667945
668
- oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
669
- 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");
670948 rootButton.addActionListener(this);
671949
672950 oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
....@@ -675,30 +953,30 @@
675953 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
676954 //clearButton.addActionListener(this);
677955
956
+ cGridBag row1 = new cGridBag();
957
+
678958 // INSERT
679
- oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
959
+ row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
680960 gridButton.setToolTipText("Create grid");
681961 gridButton.addActionListener(this);
682962
683
- oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
963
+ row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
684964 boxButton.setToolTipText("Create box");
685965 boxButton.addActionListener(this);
686966
687
- oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
967
+ row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
688968 sphereButton.setToolTipText("Create sphere");
689969 sphereButton.addActionListener(this);
690970
691
- oe.toolboxPanel.Return();
692
-
693
- oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
971
+ row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
694972 coneButton.setToolTipText("Create cone");
695973 coneButton.addActionListener(this);
696974
697
- oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
975
+ row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
698976 torusButton.setToolTipText("Create torus");
699977 torusButton.addActionListener(this);
700978
701
- oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
979
+ row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
702980 superButton.setToolTipText("Create superellipsoid");
703981 superButton.addActionListener(this);
704982
....@@ -709,29 +987,68 @@
709987 kleinButton.addActionListener(this);
710988 }
711989
712
- oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
990
+ row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
713991 particlesButton.setToolTipText("Create particle system");
714992 particlesButton.addActionListener(this);
715993
716
- oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
994
+ oe.toolboxPanel.add(row1);
995
+
996
+ cGridBag row2 = new cGridBag();
997
+
998
+ row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
999
+ groupButton.setToolTipText("Create group");
1000
+ groupButton.addActionListener(this);
1001
+
1002
+ row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1003
+ compositeButton.setToolTipText("Create composite");
1004
+ compositeButton.addActionListener(this);
1005
+
1006
+ row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1007
+ switchButton.setToolTipText("Create item switcher");
1008
+ switchButton.addActionListener(this);
1009
+
1010
+ row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1011
+ loopButton.setToolTipText("Create loop");
1012
+ loopButton.addActionListener(this);
1013
+
1014
+ row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1015
+ textureButton.setToolTipText("Create texture");
1016
+ textureButton.addActionListener(this);
1017
+
1018
+ row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7171019 overlayButton.setToolTipText("Create overlay");
7181020 overlayButton.addActionListener(this);
7191021
720
- 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);
7211023 lightButton.setToolTipText("Create light");
7221024 lightButton.addActionListener(this);
7231025
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);
1040
+
7241041 // EDIT panel
725
- editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
726
- editButton.setToolTipText("Edit selection");
1042
+ editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1043
+ editButton.setToolTipText("Pin selection controls");
7271044 editButton.addActionListener(this);
7281045
729
- editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
730
- uneditButton.setToolTipText("Unedit selection");
1046
+ editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1047
+ uneditButton.setToolTipText("Remove selection controls");
7311048 uneditButton.addActionListener(this);
7321049
7331050 editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
734
- allParamsButton.setToolTipText("Edit all params");
1051
+ allParamsButton.setToolTipText("Show all controle");
7351052 allParamsButton.addActionListener(this);
7361053
7371054 editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
....@@ -742,8 +1059,13 @@
7421059 unselectButton.setToolTipText("Unselect");
7431060 unselectButton.addActionListener(this);
7441061
1062
+ editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1063
+ flashSelectionButton.setToolTipText("Highlight selection");
1064
+ flashSelectionButton.addActionListener(this);
1065
+
7451066 editCommandsPanel.preferredHeight = 1;
7461067
1068
+ SetPinStates(false);
7471069 // oe.treePanel.add(commandsPanel);
7481070 // oe.treePanel.Return();
7491071
....@@ -768,26 +1090,14 @@
7681090 oe.treePanel.add(jSPPanel);
7691091 oe.treePanel.Return();
7701092
771
- cGridBag copyOptionsPanel = new cGridBag();
772
-
773
- copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
774
- colorCB.setToolTipText("Copy color when dropped");
775
- colorCB.addItemListener(this);
776
-
777
- copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
778
- materialCB.setToolTipText("Copy material when dropped");
779
- materialCB.addItemListener(this);
780
-
781
- copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
782
- textureCB.setToolTipText("Copy texture when dropped");
783
- textureCB.addItemListener(this);
784
-
785
- copyOptionsPanel.preferredHeight = 1;
7861093 oe.treePanel.add(copyOptionsPanel);
7871094 oe.treePanel.Return();
1095
+ cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
1096
+ versionSlider = (cNumberSlider)sliderPane.getComponent(1);
1097
+ sliderPane.preferredHeight = 1;
7881098
789
-// mainPanel.setDividerLocation(0.5); //1.0);
790
-// mainPanel.setResizeWeight(0.5);
1099
+// mainPanel.setDividerLocation(0.1); //1.0);
1100
+ mainPanel.setResizeWeight(0.4);
7911101
7921102 //jList.addListSelectionListener(this);
7931103 oe.jTree.addTreeSelectionListener(this);
....@@ -795,7 +1105,7 @@
7951105 //jTree.setEditable(true);
7961106 oe.jTree.setDragEnabled(true);
7971107 //jTree.setPreferredSize(new Dimension(10,10));
798
- jSP.setPreferredSize(new Dimension(100,200));
1108
+ //jSP.setPreferredSize(new Dimension(100,200));
7991109
8001110 oe.jTree.setCellRenderer(new cTreeModel.Renderer());
8011111
....@@ -807,29 +1117,49 @@
8071117 dgr.addDragGestureListener(this);
8081118 }catch(Exception e) {}
8091119 */
810
- radio.layout = sevenButton;
1120
+ radio.layout = sixButton; // sevenButton;
8111121 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
8121122 }
8131123
8141124 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
8151125 {
1126
+ panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
1127
+ colorCB.setToolTipText("Copy color when dropped");
1128
+ colorCB.addItemListener(this);
1129
+
1130
+ panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
1131
+ materialCB.setToolTipText("Copy material when dropped");
1132
+ materialCB.addItemListener(this);
1133
+
1134
+ panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
1135
+ textureCB.setToolTipText("Copy texture when dropped");
1136
+ textureCB.addItemListener(this);
1137
+
1138
+ panel.Return();
1139
+
8161140 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
8171141 boxCB.setToolTipText("Display bounding boxes");
8181142 boxCB.addItemListener(this);
8191143
8201144 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
821
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
1145
+ zoomBoxCB.setToolTipText("Display only for wheel");
8221146 zoomBoxCB.addItemListener(this);
8231147
8241148 if (true) // Globals.ADVANCED)
8251149 {
826
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
827
- supportCB.setToolTipText("Enable rigging");
828
- 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);
8291157
8301158 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
8311159 // localCB.addItemListener(this);
8321160
1161
+ panel.Return();
1162
+
8331163 panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
8341164 crowdCB.setToolTipText("Used for crowds");
8351165 crowdCB.addItemListener(this);
....@@ -846,6 +1176,8 @@
8461176 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
8471177 // speakerMocapCB.addItemListener(this);
8481178
1179
+ panel.Return();
1180
+
8491181 if (false)
8501182 {
8511183 // handled in scripts
....@@ -860,24 +1192,39 @@
8601192 //constraints.gridy += 1;
8611193 panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
8621194 smoothfocusCB.addItemListener(this);
1195
+ panel.Return();
8631196 }
8641197
8651198 //constraints.gridx += 1;
8661199 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
8671200 // debugCB.addItemListener(this);
8681201
1202
+ panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
1203
+ trackCB.setToolTipText("Enable tracking target");
1204
+ trackCB.addItemListener(this);
1205
+
8691206 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
870
- oeilCB.setToolTipText("Move camera when tracking target");
1207
+ oeilCB.setToolTipText("Move camera when tracking");
8711208 oeilCB.addItemListener(this);
8721209
8731210 panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
874
- shadowCB.setToolTipText("Compute shadows when live");
1211
+ shadowCB.setToolTipText("When live compute shadows");
8751212 shadowCB.addItemListener(this);
8761213
877
- panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints);
878
- autosaveCB.setToolTipText("Auto-save on structure change");
879
- autosaveCB.addItemListener(this);
1214
+ panel.Return();
1215
+ panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints);
1216
+ toggleTextureCB.setToolTipText("Load textures");
1217
+ toggleTextureCB.addItemListener(this);
1218
+
1219
+ panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints);
1220
+ toggleSwitchCB.setToolTipText("Choose a single item");
1221
+ toggleSwitchCB.addItemListener(this);
1222
+
1223
+ panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints);
1224
+ autokeepCB.setToolTipText("On structure change");
1225
+ autokeepCB.addItemListener(this);
8801226
1227
+ panel.Return();
8811228 if (Globals.ADVANCED)
8821229 {
8831230 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
....@@ -888,10 +1235,15 @@
8881235 }
8891236
8901237 cGridBag fill = new cGridBag();
891
-
8921238 fill.preferredHeight = 200;
1239
+ cGridBag fill2 = new cGridBag();
1240
+ fill2.preferredHeight = 200;
1241
+ cGridBag fill3 = new cGridBag();
1242
+ fill3.preferredHeight = 200;
8931243
8941244 panel.add(fill);
1245
+ panel.add(fill2);
1246
+ panel.add(fill3);
8951247
8961248 }
8971249
....@@ -899,7 +1251,7 @@
8991251 {
9001252 cRadio radioButton = new cRadio(obj.name);
9011253
902
- // Patch to avoid bug with transparency.
1254
+ // June 2019. Patch to avoid bug with transparency.
9031255 radioButton.hadMaterial = obj.material != null;
9041256 if (!radioButton.hadMaterial)
9051257 {
....@@ -907,7 +1259,7 @@
9071259 }
9081260
9091261 radioButton.SetObject(obj);
910
- radioButton.layout = sevenButton;
1262
+ radioButton.layout = sixButton; // sevenButton;
9111263 radioButton.SetCamera(cameraView.renderCamera, false);
9121264 radioButton.addActionListener(this);
9131265 radioPanel.add(radioButton);
....@@ -936,7 +1288,9 @@
9361288 cCheckBox slowCB;
9371289 cCheckBox boxCB;
9381290 cCheckBox zoomBoxCB;
939
- cToggleButton trackCB;
1291
+ cCheckBox freezeCB;
1292
+ //cToggleButton trackCB;
1293
+ cCheckBox trackCB;
9401294 cCheckBox smoothfocusCB;
9411295 // JCheckBox speakerMocapCB;
9421296 cCheckBox speakerCameraCB;
....@@ -945,7 +1299,7 @@
9451299
9461300 cCheckBox oeilCB;
9471301 cCheckBox shadowCB;
948
- cCheckBox autosaveCB;
1302
+ cCheckBox autokeepCB;
9491303 cCheckBox lookAtCB;
9501304
9511305 // static int COLOR = 1;
....@@ -1053,9 +1407,13 @@
10531407 {
10541408 Globals.COMPUTESHADOWWHENLIVE ^= true;
10551409 }
1056
- else if(e.getSource() == autosaveCB)
1410
+ else if(e.getSource() == freezeCB)
10571411 {
1058
- Globals.SAVEONMAKE ^= true;
1412
+ Globals.FREEZEONMOVE ^= true;
1413
+ }
1414
+ else if(e.getSource() == autokeepCB)
1415
+ {
1416
+ Globals.REPLACEONMAKE ^= true;
10591417 }
10601418 else if(e.getSource() == lookAtCB)
10611419 {
....@@ -1137,8 +1495,6 @@
11371495 }
11381496 }
11391497
1140
- String string = (String) object;
1141
-
11421498 System.out.println("Transfer = " + object + "; drop : " + target);
11431499 // if( object instanceof java.io.File[])
11441500 // {
....@@ -1146,6 +1502,8 @@
11461502 // objEditor.DropFile((java.io.File[]) object, true);
11471503 // return;
11481504 // }
1505
+
1506
+ String string = object.toString();
11491507
11501508 // File path for Mac and Windows
11511509 if (string.charAt(0) == '/' || string.charAt(1) == ':')
....@@ -1191,13 +1549,23 @@
11911549
11921550 assert target == objEditor.jTree;
11931551 TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y);
1552
+ Object3D destinationLeaf;
11941553 try {
1195
- Object3D dummy = (Composite) destinationPath.getLastPathComponent();
1554
+ destinationLeaf = (Composite) destinationPath.getLastPathComponent();
11961555 } catch (Exception e) {
11971556 System.out.println("destinationPath : " + destinationPath);
11981557 return;
11991558 }
12001559
1560
+ for (int i=group.selection.size(); --i>=0;)
1561
+ {
1562
+ Object3D child = (Object3D)group.selection.elementAt(i);
1563
+
1564
+ // Cannot move into itself
1565
+ if (child == destinationLeaf)
1566
+ return;
1567
+ }
1568
+
12011569 // june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
12021570 // {
12031571 loadClipboard(true);
....@@ -1312,22 +1680,30 @@
13121680 {
13131681 //heightFieldItem = menu.add(new MenuItem("Height Field"));
13141682 //heightFieldItem.addActionListener(this);
1315
- gridItem = menu.add(new MenuItem("Grid"));
1316
- gridItem.addActionListener(this);
1317
- rectoidItem = menu.add(new MenuItem("Box"));
1318
- rectoidItem.addActionListener(this);
1319
- ellipsoidItem = menu.add(new MenuItem("Sphere"));
1320
- ellipsoidItem.addActionListener(this);
1321
- coneItem = menu.add(new MenuItem("Cone"));
1322
- coneItem.addActionListener(this);
1323
- torusItem = menu.add(new MenuItem("Torus"));
1324
- torusItem.addActionListener(this);
1325
- superItem = menu.add(new MenuItem("Superellipsoid"));
1326
- superItem.addActionListener(this);
1683
+// gridItem = menu.add(new MenuItem("Grid"));
1684
+// gridItem.addActionListener(this);
1685
+// rectoidItem = menu.add(new MenuItem("Box"));
1686
+// rectoidItem.addActionListener(this);
1687
+// ellipsoidItem = menu.add(new MenuItem("Sphere"));
1688
+// ellipsoidItem.addActionListener(this);
1689
+// coneItem = menu.add(new MenuItem("Cone"));
1690
+// coneItem.addActionListener(this);
1691
+// torusItem = menu.add(new MenuItem("Torus"));
1692
+// torusItem.addActionListener(this);
1693
+// superItem = menu.add(new MenuItem("Superellipsoid"));
1694
+// superItem.addActionListener(this);
1695
+
1696
+ cameraItem = menu.add(new MenuItem("Camera"));
1697
+ cameraItem.addActionListener(this);
1698
+
1699
+ if (!Globals.ADVANCED)
1700
+ {
13271701 kleinItem = menu.add(new MenuItem("Klein Bottle"));
13281702 kleinItem.addActionListener(this);
1329
- particleItem = menu.add(new MenuItem("Particle system"));
1330
- particleItem.addActionListener(this);
1703
+ }
1704
+
1705
+// particleItem = menu.add(new MenuItem("Particle system"));
1706
+// particleItem.addActionListener(this);
13311707 if (Globals.ADVANCED)
13321708 {
13331709 ragdollItem = menu.add(new MenuItem("Rag Walk"));
....@@ -1353,15 +1729,15 @@
13531729 }
13541730 bezierItem = menu.add(new MenuItem("Bezier Patch"));
13551731 bezierItem.addActionListener(this);
1356
- overlayItem = menu.add(new MenuItem("Overlay"));
1357
- overlayItem.addActionListener(this);
1358
- lightItem = menu.add(new MenuItem("Light"));
1359
- lightItem.addActionListener(this);
1732
+// overlayItem = menu.add(new MenuItem("Overlay"));
1733
+// overlayItem.addActionListener(this);
1734
+// lightItem = menu.add(new MenuItem("Light"));
1735
+// lightItem.addActionListener(this);
13601736 menu.add("-");
13611737 //superLoopItem = menu.add(new MenuItem("Super Loop"));
13621738 //superLoopItem.addActionListener(this);
1363
- loopItem = menu.add(new MenuItem("Loop"));
1364
- loopItem.addActionListener(this);
1739
+// loopItem = menu.add(new MenuItem("Loop"));
1740
+// loopItem.addActionListener(this);
13651741 doubleItem = menu.add(new MenuItem("Fork"));
13661742 doubleItem.addActionListener(this);
13671743 if (Globals.ADVANCED)
....@@ -1377,6 +1753,9 @@
13771753 animationItem.addItemListener(this);
13781754 animationItem.setState(Globals.ANIMATION);
13791755
1756
+ menu.add(archiveItem = new MenuItem("Archive3D..."));
1757
+ archiveItem.addActionListener(this);
1758
+
13801759 menu.add("-");
13811760 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
13821761 parseverticesItem.addActionListener(this);
....@@ -1389,6 +1768,8 @@
13891768 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
13901769 reduce34MorphItem.addActionListener(this);
13911770 menu.add("-");
1771
+ menu.add(memoryItem = new MenuItem("Memory Usage"));
1772
+ memoryItem.addActionListener(this);
13921773 menu.add(computeAOItem = new MenuItem("Compute AO"));
13931774 computeAOItem.addActionListener(this);
13941775
....@@ -1397,8 +1778,6 @@
13971778 mirrorItem = menu.add(new MenuItem("Mirror Poses"));
13981779 mirrorItem.addActionListener(this);
13991780 menu.add("-");
1400
- menu.add(memoryItem = new MenuItem("Memory Usage"));
1401
- memoryItem.addActionListener(this);
14021781 menu.add(analyzeItem = new MenuItem("Analyze"));
14031782 analyzeItem.addActionListener(this);
14041783 menu.add(dumpItem = new MenuItem("Print"));
....@@ -1546,6 +1925,30 @@
15461925
15471926 makeSomething(shadow);
15481927 }
1928
+
1929
+ private void ClearUnpinned()
1930
+ {
1931
+ //for (Object3D obj : listUI)
1932
+ for (int i=listUI.size(); --i>=0;)
1933
+ {
1934
+ Object3D obj = listUI.elementAt(i);
1935
+ if (!obj.pinned)
1936
+ {
1937
+ obj.CloseUI();
1938
+ listUI.remove(i);
1939
+ }
1940
+ }
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
1951
+ }
15491952
15501953 /**
15511954 * applyExample
....@@ -1790,7 +2193,7 @@
17902193 {
17912194 ScreenFit();
17922195 } else
1793
- if (source == switchItem)
2196
+ if (source == switchViewItem)
17942197 {
17952198 cVector v1 = new cVector();
17962199 cVector v2 = new cVector();
....@@ -1974,6 +2377,23 @@
19742377 {
19752378 makeSomething(new Light());
19762379 } 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
19772397 if (source == csgItem)
19782398 {
19792399 group(new CSG());
....@@ -2020,30 +2440,30 @@
20202440
20212441 group(g);
20222442 } else
2023
- if (source == loopItem)
2443
+ if (source == loopItem || source == loopButton)
20242444 {
20252445 Composite csg = new GroupLeaf();
20262446 csg.count = 5;
20272447 group(csg);
2028
- Composite child = new cGroup();
2448
+ Composite child = new cGroup("Branch");
20292449 csg.addChild(child);
20302450 child.addChild(csg);
20312451 } else
20322452 if (source == doubleItem)
20332453 {
2034
- Composite csg = new GroupLeaf();
2454
+ Composite csg = new GroupLeaf("Fork");
20352455 csg.count = 5;
20362456 group(csg);
2037
- Composite child = new cGroup();
2457
+ Composite child = new cGroup("Branch A");
20382458 csg.addChild(child);
20392459 child.addChild(csg);
2040
- child = new cGroup();
2460
+ child = new cGroup("Branch B");
20412461 csg.addChild(child);
20422462 child.addChild(csg);
20432463 } else
20442464 if (source == tripleItem)
20452465 {
2046
- Composite csg = new GroupLeaf();
2466
+ Composite csg = new GroupLeaf("Trident");
20472467 csg.count = 4;
20482468 group(csg);
20492469 Composite child = new cGroup();
....@@ -2059,7 +2479,7 @@
20592479 if (source == computeAOItem)
20602480 {
20612481 Globals.drawMode = CameraPane.OCCLUSION;
2062
- Globals.theRenderer.repaint();
2482
+ cameraView.repaint();
20632483 } else
20642484 if (source == recompileItem)
20652485 {
....@@ -2107,15 +2527,31 @@
21072527 } else
21082528 if (source == undoButton)
21092529 {
2530
+ // Go to previous version
2531
+ //if (!Undo())
2532
+ //java.awt.Toolkit.getDefaultToolkit().beep();
21102533 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();
21112544 } else
21122545 if (source == redoButton)
21132546 {
2547
+ // Go to next version
21142548 Redo();
21152549 } else
21162550 if (source == saveButton)
21172551 {
2118
- Save();
2552
+ // Save a new version
2553
+ if (!Save(true))
2554
+ java.awt.Toolkit.getDefaultToolkit().beep();
21192555 } else
21202556 if (source == oneStepButton)
21212557 {
....@@ -2124,17 +2560,14 @@
21242560 } else
21252561 if (source == screenfitButton)
21262562 {
2127
- //Reload(lastConverter, lastFilename, true);
21282563 ScreenFit();
21292564 } else
21302565 if (source == screenfitpointButton)
21312566 {
2132
- //Reload(lastConverter, lastFilename, true);
21332567 ScreenFitPoint();
21342568 } else
21352569 if (source == snapobjectButton)
21362570 {
2137
- //Reload(lastConverter, lastFilename, true);
21382571 SnapObject();
21392572 } else
21402573 // if (event.getSource() == recompileButton)
....@@ -2498,7 +2931,7 @@
24982931 {
24992932 StepAll();
25002933 } else
2501
- if (source == clearItem) // || event.getSource() == clearButton)
2934
+ if (source == deleteItem) // || event.getSource() == clearButton)
25022935 {
25032936 //int indices[] = jList.getSelectedIndices();
25042937 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2510,9 +2943,9 @@
25102943 {
25112944 ClearSelection(true);
25122945 } else
2513
- if (source == grabItem)
2946
+ if (source == grabItem || source == groupButton)
25142947 {
2515
- group(new cGroup(), true);
2948
+ group(new cGroup(), false); // true);
25162949 } else
25172950 if (source == hideItem)
25182951 {
....@@ -2530,11 +2963,11 @@
25302963 {
25312964 makeSomething(new Camera());
25322965 } else
2533
- if (source == compositeItem)
2966
+ if (source == compositeItem || source == compositeButton)
25342967 {
25352968 group(new Composite());
25362969 } else
2537
- if (source == randomItem)
2970
+ if (source == switchItem || source == switchButton)
25382971 {
25392972 RandomNode random = new RandomNode();
25402973 group(random);
....@@ -2636,7 +3069,7 @@
26363069 {
26373070 group(new cLinker());
26383071 } else
2639
- if (source == textureItem)
3072
+ if (source == textureItem || source == textureButton)
26403073 {
26413074 group(new TextureNode());
26423075 } else
....@@ -2658,15 +3091,28 @@
26583091 } else
26593092 if (source == ungroupItem || source == ungroupButton)
26603093 {
2661
- //ungroup();
3094
+ boolean hasRoot = false;
3095
+
26623096 for (int i=0; i<group.selection.size(); i++)
26633097 {
2664
- Ungroup(group.selection.get(i));
3098
+ if (group.selection.get(i) == group)
3099
+ {
3100
+ hasRoot = true;
3101
+ break;
3102
+ }
26653103 }
26663104
2667
- ClearSelection(false);
2668
-
2669
- 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
+ }
26703116 } else
26713117 if (source == genUVItem)
26723118 {
....@@ -2967,7 +3413,7 @@
29673413 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
29683414 {
29693415 obj = (Object3D)e.nextElement();
2970
- obj.SetBumpTexture(null);
3416
+ obj.ResetBumpTexture();
29713417 }
29723418
29733419 refreshContents();
....@@ -2981,6 +3427,31 @@
29813427 obj.SetBumpTexture(obj.GetPigmentTexture());
29823428 }
29833429
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
+
29843455 refreshContents();
29853456 } else
29863457 if (source == flashSelectionButton)
....@@ -3084,8 +3555,8 @@
30843555 // centralPanel.setVisible(true);
30853556 // XYZPanel.setVisible(true);
30863557 bigThree.ClearUI();
3558
+ bigThree.add(scenePanel);
30873559 bigThree.add(centralPanel);
3088
- bigThree.add(XYZPanel);
30893560 bigThree.FlushUI();
30903561
30913562 cameraView.requestFocusInWindow();
....@@ -3165,8 +3636,8 @@
31653636 // centralPanel.setVisible(true);
31663637 // XYZPanel.setVisible(false);
31673638 bigThree.ClearUI();
3168
- bigThree.add(scenePanel);
31693639 bigThree.add(centralPanel);
3640
+ bigThree.add(scenePanel);
31703641 bigThree.FlushUI();
31713642
31723643 cameraView.requestFocusInWindow();
....@@ -3258,6 +3729,12 @@
32583729 } else
32593730 if (source == editItem || source == editButton)
32603731 {
3732
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3733
+ {
3734
+ Object3D child = (Object3D)e.nextElement();
3735
+ child.pinned = true;
3736
+ }
3737
+
32613738 EditSelection(false);
32623739 } else
32633740 if (source == uneditButton)
....@@ -3267,6 +3744,7 @@
32673744 Object3D child = (Object3D)e.nextElement();
32683745 if(child.editWindow != null)
32693746 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3747
+ child.pinned = false;
32703748 child.CloseUI();
32713749 listUI.remove(child);
32723750
....@@ -3283,6 +3761,7 @@
32833761 //copy.ClearUI();
32843762 for (Object3D obj : listUI)
32853763 {
3764
+ obj.pinned = false;
32863765 obj.CloseUI();
32873766 }
32883767 listUI.clear();
....@@ -3292,7 +3771,7 @@
32923771 {
32933772 assert(copy == group);
32943773
3295
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3774
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
32963775
32973776 for (Object3D obj : listUI)
32983777 {
....@@ -3341,6 +3820,9 @@
33413820 }
33423821
33433822 copy = group;
3823
+
3824
+ SetUndoStates();
3825
+
33443826 //Globals.theRenderer.object = group;
33453827 if(!useclient)
33463828 {
....@@ -3367,6 +3849,13 @@
33673849 currentLayout = sevenButton;
33683850 */
33693851 radio.layout.doClick();
3852
+
3853
+ ClearUnpinned();
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)
3858
+ EditSelection(false);
33703859 keepparent = group.parent;
33713860 // PARENT = NULL or not???
33723861 //group.parent = null; // ROOT
....@@ -3380,7 +3869,7 @@
33803869 cameraView.ProtectCamera();
33813870 cameraView.repaint();
33823871 return;
3383
- } else if (event.getSource() == revertCameraItem)
3872
+ } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton)
33843873 {
33853874 cameraView.RevertCamera();
33863875 cameraView.repaint();
....@@ -3959,7 +4448,7 @@
39594448
39604449 try
39614450 {
3962
- texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
4451
+ texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres);
39634452 }
39644453 catch (Exception e)
39654454 {
....@@ -4434,12 +4923,14 @@
44344923 // }
44354924 // }
44364925
4437
- static boolean allparams = true;
4438
-
4439
- static Vector<Object3D> listUI = new Vector<Object3D>();
4440
-
44414926 void EditSelection(boolean newWindow)
44424927 {
4928
+ if (group.selection == null)
4929
+ {
4930
+ EditElement(group, newWindow); // ? new
4931
+ return;
4932
+ }
4933
+
44434934 // aConstraints.gridy = 0;
44444935 for (int i=0; i<group.selection.size(); i++)
44454936 {
....@@ -4450,12 +4941,7 @@
44504941 Object3D elem = (Object3D)group.selection.elementAt(i);
44514942 if(elem != group || !newWindow)
44524943 {
4453
- // if (!(elem instanceof Composite))
4454
- // newWindow = false;
4455
- listUI.add(elem);
4456
- elem.openEditWindow(this, newWindow); //, false);
4457
- System.out.println("edit : " + elem);
4458
- elem.editWindow.refreshContents(true); // ? new
4944
+ EditElement(elem, newWindow); // ? new
44594945 }
44604946 }
44614947 }
....@@ -4530,7 +5016,8 @@
45305016 //new Exception().printStackTrace();
45315017
45325018 freezemodel = true;
4533
-
5019
+ ClearUnpinned();
5020
+
45345021 /**/
45355022 //switch (event.id)
45365023 {
....@@ -4563,7 +5050,7 @@
45635050 if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
45645051 // a camera
45655052 {
4566
- if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
5053
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace
45675054 {
45685055 CameraPane.camerachangeframe = 0; // don't refuse it
45695056 Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
....@@ -4572,6 +5059,13 @@
45725059 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
45735060 }
45745061
5062
+ if (tps != null && tps.length == 1)
5063
+ {
5064
+ EditSelection(false);
5065
+ }
5066
+
5067
+ SetPinStates(tps != null && tps.length > 0);
5068
+
45755069 refreshContents();
45765070 //return true;
45775071 }
....@@ -4581,9 +5075,18 @@
45815075 freezemodel = false;
45825076 }
45835077
5078
+ void SetPinStates(boolean enabled)
5079
+ {
5080
+ editButton.setEnabled(enabled);
5081
+ uneditButton.setEnabled(enabled);
5082
+ unselectButton.setEnabled(enabled);
5083
+ flashSelectionButton.setEnabled(enabled);
5084
+ }
5085
+
45845086 void refreshContents(boolean cp)
45855087 {
4586
- if (!Globals.MOUSEDRAGGED)
5088
+ if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
5089
+ if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
45875090 {
45885091 objEditor.ClearInfo(); // .GetMaterial());
45895092
....@@ -4682,8 +5185,8 @@
46825185
46835186 if (cut)
46845187 {
4685
- if (Globals.SAVEONMAKE)
4686
- Save();
5188
+// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save.
5189
+// Save();
46875190 //int indices[] = jList.getSelectedIndices();
46885191 //for (int i = indices.length - 1; i >= 0; i--)
46895192 //jList.remove(indices[i]);
....@@ -4786,6 +5289,10 @@
47865289
47875290 void paste(boolean expand)
47885291 {
5292
+ if (Globals.REPLACEONMAKE)
5293
+ Save();
5294
+ boolean keep = Globals.REPLACEONMAKE;
5295
+ Globals.REPLACEONMAKE = false;
47895296 // if (GrafreeD.clipboard == null)
47905297 // return;
47915298 boolean first = true;
....@@ -4845,6 +5352,7 @@
48455352 Grafreed.clipboard.get(0).parent = keepparent;
48465353 }
48475354
5355
+ Globals.REPLACEONMAKE = keep;
48485356 ResetModel();
48495357 refreshContents();
48505358 }
....@@ -4980,6 +5488,10 @@
49805488
49815489 void group(Object3D csg, boolean grab)
49825490 {
5491
+ if (Globals.REPLACEONMAKE)
5492
+ Save();
5493
+ boolean keep = Globals.REPLACEONMAKE;
5494
+ Globals.REPLACEONMAKE = false;
49835495 if (//false) // why??
49845496 !group.selection.isEmpty())
49855497 {
....@@ -5093,10 +5605,15 @@
50935605 //node.add(csg);
50945606 //makeSomething(node);
50955607 makeSomething(csg);
5608
+ Globals.REPLACEONMAKE = keep;
50965609 }
50975610
50985611 void Ungroup(Object3D g)
50995612 {
5613
+ if (Globals.REPLACEONMAKE)
5614
+ Save();
5615
+ boolean keep = Globals.REPLACEONMAKE;
5616
+ Globals.REPLACEONMAKE = false;
51005617 if (g instanceof HiddenObject)
51015618 {
51025619 HiddenObject h = (HiddenObject) g;
....@@ -5113,6 +5630,7 @@
51135630 objEditor.makeSomething(g.get(i), false);
51145631 }
51155632 }
5633
+ Globals.REPLACEONMAKE = keep;
51165634 }
51175635
51185636 void ungroup()
....@@ -5401,17 +5919,33 @@
54015919 cButton clearpanelButton;
54025920 cButton unselectButton;
54035921
5404
- cButton minButton;
5405
- cButton maxButton;
5406
- cButton fullButton;
5407
- cButton undoButton;
5408
- cButton redoButton;
5922
+ cButton restoreCameraButton;
5923
+
54095924 cButton saveButton;
54105925 cButton oneStepButton;
54115926
54125927 cButton groupButton;
54135928 cButton ungroupButton;
54145929 cButton compositeButton;
5930
+ cButton switchButton;
5931
+ cButton loopButton;
5932
+ 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;
54155949
54165950 cButton gridButton;
54175951 cButton boxButton;
....@@ -5444,7 +5978,7 @@
54445978 //JTree jTree;
54455979 private MenuItem lookAtItem;
54465980 private MenuItem lookFromItem;
5447
- private MenuItem switchItem;
5981
+ private MenuItem switchViewItem;
54485982 private MenuItem cutItem;
54495983 private MenuItem undoItem;
54505984 private MenuItem redoItem;
....@@ -5476,7 +6010,7 @@
54766010 private MenuItem pasteLinkItem;
54776011 private MenuItem pasteCloneItem;
54786012 private MenuItem pasteExpandItem;
5479
- private MenuItem clearItem;
6013
+ private MenuItem deleteItem;
54806014 private MenuItem clearAllItem;
54816015 private MenuItem genUVItem;
54826016 private MenuItem genNormalsMESHItem;
....@@ -5536,7 +6070,7 @@
55366070 private MenuItem frontItem;
55376071 private MenuItem cameraItem;
55386072 private MenuItem compositeItem;
5539
- private MenuItem randomItem;
6073
+ private MenuItem switchItem;
55406074 private MenuItem physicsItem;
55416075 private MenuItem frameselectorItem;
55426076 private MenuItem scriptNodeItem;
....@@ -5560,6 +6094,8 @@
55606094 private MenuItem attachBumpItem;
55616095 private MenuItem detachBumpItem;
55626096 private MenuItem pigmentBumpItem;
6097
+ private MenuItem embedTexturesItem;
6098
+ private MenuItem deEmbedTexturesItem;
55636099
55646100 private MenuItem particleItem;
55656101 private MenuItem ragdollItem;
....@@ -5610,5 +6146,5 @@
56106146
56116147 Menu cameraMenu;
56126148 MenuItem editCameraItem;
5613
- MenuItem revertCameraItem;
6149
+ MenuItem restoreCameraItem;
56146150 }