Normand Briere
2019-08-08 8294241adc5fe698b70e13ebd6780af46ab83f7e
GroupEditor.java
....@@ -16,6 +16,7 @@
1616 //import buoy.widget.BFileChooser;
1717
1818 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
19
+ Grafreed.iResourceCallBack,
1920 ObjectUI,
2021 Runnable,
2122 ActionListener,
....@@ -23,6 +24,335 @@
2324 DragGestureListener, DragSourceListener, DropTargetListener,
2425 ItemListener // ListSelectionListener
2526 {
27
+
28
+ public void AddSkyboxButton(String f, String s, cGridBag row)
29
+ {
30
+ cButton skyboxButton;
31
+ final String path = "cubemaps/" + f + "-skyboxes/" + s;
32
+ row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.NIMBUSLAF));
33
+ //row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF));
34
+ skyboxButton.setToolTipText(s);
35
+ skyboxButton.addActionListener(new ActionListener()
36
+ {
37
+ @Override
38
+ public void actionPerformed(ActionEvent e)
39
+ {
40
+ ChangeSkybox(path);
41
+ }
42
+ });
43
+ }
44
+
45
+ public void AddTextureButton(String f, final String t, cGridBag row)
46
+ {
47
+ cButton textureButton;
48
+ final String path = "textures/" + f + "/"; // + t;
49
+ row.add(textureButton = GetButton(path + "icons/" + t, !Grafreed.NIMBUSLAF));
50
+ textureButton.setToolTipText(f + "s");
51
+ textureButton.addActionListener(new ActionListener()
52
+ {
53
+ @Override
54
+ public void actionPerformed(ActionEvent e)
55
+ {
56
+ ChangeTexture(path + t);
57
+ }
58
+ });
59
+ }
60
+
61
+ public void AddSkyboxTab0(JTabbedPane skyboxpanel)
62
+ {
63
+ cGridBag tab0 = new cGridBag().setVertical(true);
64
+
65
+ tab0.setName("Urban");
66
+ skyboxpanel.add(tab0);
67
+
68
+ cGridBag row0 = new cGridBag();
69
+ cGridBag row1 = new cGridBag();
70
+ cGridBag row2 = new cGridBag();
71
+ cGridBag row3 = new cGridBag();
72
+ cGridBag row4 = new cGridBag();
73
+ cGridBag row5 = new cGridBag();
74
+ cGridBag row6 = new cGridBag();
75
+
76
+ AddSkyboxButton("default", "rgb", row0);
77
+ //AddSkyboxButton("default", "cornell", row0);
78
+ AddSkyboxButton("penguins", "dust", row0);
79
+ AddSkyboxButton("penguins", "tropic", row0);
80
+ AddSkyboxButton("penguins", "yonder", row0);
81
+
82
+ AddSkyboxButton("default", "uffizi", row1);
83
+ AddSkyboxButton("bridge", "Bridge", row1);
84
+ AddSkyboxButton("bridge", "Bridge2", row1);
85
+ AddSkyboxButton("urban", "GamlaStan2", row1);
86
+
87
+ AddSkyboxButton("urban", "Parliament", row2);
88
+ AddSkyboxButton("urban", "Roundabout", row2);
89
+ AddSkyboxButton("urban", "SaintLazarusChurch", row2);
90
+ AddSkyboxButton("urban", "SaintLazarusChurch2", row2);
91
+
92
+ AddSkyboxButton("urban", "SaintLazarusChurch3", row3);
93
+ AddSkyboxButton("urban", "UnionSquare", row3);
94
+ AddSkyboxButton("urban", "Medborgarplatsen", row3);
95
+ AddSkyboxButton("park", "BerzeliiPark", row3);
96
+
97
+ AddSkyboxButton("park", "Buddha", row4);
98
+ AddSkyboxButton("park", "CNTower2", row4);
99
+ AddSkyboxButton("park", "NiagaraFalls1", row4);
100
+ AddSkyboxButton("park", "NiagaraFalls3", row4);
101
+
102
+ AddSkyboxButton("park", "Park", row5);
103
+ AddSkyboxButton("park", "Pond", row5);
104
+ AddSkyboxButton("park", "Skansen", row5);
105
+ AddSkyboxButton("park", "Skansen2", row5);
106
+
107
+ AddSkyboxButton("park", "Skansen3", row6);
108
+ AddSkyboxButton("park", "Skansen4", row6);
109
+ AddSkyboxButton("park", "Skansen5", row6);
110
+ AddSkyboxButton("persson", "VancouverConventionCentre", row6);
111
+
112
+ tab0.add(row0);
113
+ tab0.add(row1);
114
+ tab0.add(row2);
115
+ tab0.add(row3);
116
+ tab0.add(row4);
117
+ tab0.add(row5);
118
+ tab0.add(row6);
119
+
120
+ for (int i=5; --i>=0;)
121
+ {
122
+ //oe.toolboxPanel.Return();
123
+ //tab0.add(new cGridBag());
124
+ }
125
+ }
126
+
127
+ public void AddSkyboxTab1(JTabbedPane skyboxpanel)
128
+ {
129
+ cGridBag tab0 = new cGridBag().setVertical(true);
130
+
131
+ tab0.setName("Nature");
132
+ skyboxpanel.add(tab0);
133
+
134
+ cGridBag row0 = new cGridBag();
135
+ cGridBag row1 = new cGridBag();
136
+ cGridBag row2 = new cGridBag();
137
+ cGridBag row3 = new cGridBag();
138
+ cGridBag row4 = new cGridBag();
139
+ cGridBag row5 = new cGridBag();
140
+ cGridBag row6 = new cGridBag();
141
+
142
+ AddSkyboxButton("beach", "HeartInTheSand", row0);
143
+ AddSkyboxButton("beach", "LarnacaBeach", row0);
144
+ AddSkyboxButton("beach", "PalmTrees", row0);
145
+ AddSkyboxButton("beach", "Tenerife", row0);
146
+
147
+ AddSkyboxButton("beach", "Tenerife2", row1);
148
+ AddSkyboxButton("beach", "Tenerife3", row1);
149
+ AddSkyboxButton("field", "FishPond", row1);
150
+ AddSkyboxButton("field", "Footballfield", row1);
151
+
152
+ AddSkyboxButton("field", "Meadow", row2);
153
+ AddSkyboxButton("field", "Sorsele", row2);
154
+ AddSkyboxButton("field", "Sorsele2", row2);
155
+ AddSkyboxButton("field", "Sorsele3", row2);
156
+
157
+ AddSkyboxButton("forest", "Brudslojan", row3);
158
+ AddSkyboxButton("forest", "Langholmen2", row3);
159
+ AddSkyboxButton("forest", "Plants", row3);
160
+ AddSkyboxButton("mountain", "Maskonaive", row3);
161
+
162
+ AddSkyboxButton("mountain", "Maskonaive2", row4);
163
+ AddSkyboxButton("mountain", "Maskonaive3", row4);
164
+ AddSkyboxButton("mountain", "Teide", row4);
165
+ AddSkyboxButton("park", "Tantolunden4", row4);
166
+
167
+ AddSkyboxButton("park", "Stairs", row5);
168
+ AddSkyboxButton("default", "skycube", row6);
169
+ AddSkyboxButton("rocky", "Langholmen", row5);
170
+ AddSkyboxButton("rocky", "Skinnarviksberget", row5);
171
+
172
+ AddSkyboxButton("rocky", "Tantolunden6", row5);
173
+ AddSkyboxButton("default", "CloudyHills", row6);
174
+ AddSkyboxButton("daz", "Autumn", row6);
175
+ AddSkyboxButton("daz", "MountainTrail", row6);
176
+ /*
177
+Autumn
178
+Greenlands
179
+MountainTrail
180
+Oasis
181
+TheRock
182
+TopOfTheWorld
183
+Winter
184
+ */
185
+
186
+ tab0.add(row0);
187
+ tab0.add(row1);
188
+ tab0.add(row2);
189
+ tab0.add(row3);
190
+ tab0.add(row4);
191
+ tab0.add(row5);
192
+ tab0.add(row6);
193
+
194
+ for (int i=5; --i>=0;)
195
+ {
196
+ //oe.toolboxPanel.Return();
197
+ //tab0.add(new cGridBag());
198
+ }
199
+ }
200
+
201
+ public void AddSkyboxTab2(JTabbedPane skyboxpanel)
202
+ {
203
+ cGridBag tab0 = new cGridBag().setVertical(true);
204
+
205
+ tab0.setName("Night");
206
+ skyboxpanel.add(tab0);
207
+
208
+ cGridBag row0 = new cGridBag();
209
+ cGridBag row1 = new cGridBag();
210
+ cGridBag row2 = new cGridBag();
211
+ cGridBag row3 = new cGridBag();
212
+ cGridBag row4 = new cGridBag();
213
+ cGridBag row5 = new cGridBag();
214
+ cGridBag row6 = new cGridBag();
215
+
216
+ AddSkyboxButton("night", "NightPath", row0);
217
+ AddSkyboxButton("night", "PondNight", row0);
218
+ AddSkyboxButton("night", "Powerlines", row0);
219
+ AddSkyboxButton("night", "SwedishRoyalCastle", row0);
220
+
221
+ AddSkyboxButton("urban", "CNTower", row1);
222
+ AddSkyboxButton("bridge", "ArstaBridge", row1);
223
+ AddSkyboxButton("rocky", "Riddarfjarden", row1);
224
+ AddSkyboxButton("penguins", "sleepyhollow", row1);
225
+
226
+ AddSkyboxButton("penguins", "kenon_star", row2);
227
+ AddSkyboxButton("persson", "corona", row2);
228
+ AddSkyboxButton("persson", "spaceskybox", row2);
229
+ AddSkyboxButton("indoors", "Vasa", row2);
230
+
231
+ AddSkyboxButton("winter", "Backyard", row3);
232
+ AddSkyboxButton("winter", "Creek", row3);
233
+ AddSkyboxButton("winter", "FootballField3", row3);
234
+ AddSkyboxButton("winter", "Forest", row3);
235
+
236
+ AddSkyboxButton("winter", "HornstullsStrand2", row4);
237
+ AddSkyboxButton("winter", "House", row4);
238
+ AddSkyboxButton("winter", "IceLake", row4);
239
+ AddSkyboxButton("winter", "IceRiver", row4);
240
+
241
+ AddSkyboxButton("winter", "Park3", row5);
242
+ AddSkyboxButton("winter", "PondWinter", row5);
243
+ AddSkyboxButton("winter", "Tantolunden5", row5);
244
+ AddSkyboxButton("winter", "Vindelalven", row5);
245
+
246
+ AddSkyboxButton("daz", "TheRock", row6);
247
+ AddSkyboxButton("daz", "TopOfTheWorld", row6);
248
+ AddSkyboxButton("daz", "Winter", row6);
249
+ AddSkyboxButton("mountain", "Ryfjallet", row6);
250
+
251
+ tab0.add(row0);
252
+ tab0.add(row1);
253
+ tab0.add(row2);
254
+ tab0.add(row3);
255
+ tab0.add(row4);
256
+ tab0.add(row5);
257
+ tab0.add(row6);
258
+
259
+ for (int i=5; --i>=0;)
260
+ {
261
+ //oe.toolboxPanel.Return();
262
+ //tab0.add(new cGridBag());
263
+ }
264
+ }
265
+
266
+ public void AddSkyboxTab3(JTabbedPane skyboxpanel)
267
+ {
268
+ cGridBag tab0 = new cGridBag().setVertical(true);
269
+
270
+ tab0.setName("Others");
271
+ skyboxpanel.add(tab0);
272
+
273
+ cGridBag row0 = new cGridBag();
274
+ cGridBag row1 = new cGridBag();
275
+ cGridBag row2 = new cGridBag();
276
+ cGridBag row3 = new cGridBag();
277
+ cGridBag row4 = new cGridBag();
278
+ cGridBag row5 = new cGridBag();
279
+ cGridBag row6 = new cGridBag();
280
+
281
+ AddSkyboxButton("mayhem", "afterrain", row0);
282
+ AddSkyboxButton("mayhem", "aqua4", row0);
283
+ AddSkyboxButton("mayhem", "aqua9", row0);
284
+ AddSkyboxButton("mayhem", "flame", row0);
285
+
286
+ AddSkyboxButton("mayhem", "h2s", row1);
287
+ AddSkyboxButton("mayhem", "prehistoric", row1);
288
+ AddSkyboxButton("mayhem", "scorched", row1);
289
+ AddSkyboxButton("penguins", "desertdawn", row1);
290
+
291
+ AddSkyboxButton("persson", "Citadella", row2);
292
+ AddSkyboxButton("persson", "Citadella2", row2);
293
+ AddSkyboxButton("persson", "clouds1", row2);
294
+ AddSkyboxButton("penguins", "wrath", row2);
295
+
296
+ AddSkyboxButton("persson", "FishermansBastion", row3);
297
+ AddSkyboxButton("persson", "HeroesSquare", row3);
298
+ AddSkyboxButton("indoors", "DallasW", row3);
299
+ AddSkyboxButton("indoors", "MarriottMadisonWest", row3);
300
+
301
+ AddSkyboxButton("persson", "LancellottiChapel", row4);
302
+ AddSkyboxButton("persson", "PereaBeach1", row4);
303
+ AddSkyboxButton("persson", "PereaBeach2", row4);
304
+ AddSkyboxButton("persson", "redeclipse", row4);
305
+
306
+ AddSkyboxButton("daz", "Greenlands", row5);
307
+ AddSkyboxButton("daz", "Oasis", row5);
308
+ AddSkyboxButton("elyvisions", "arch3", row5);
309
+ AddSkyboxButton("elyvisions", "calm_sea", row5);
310
+
311
+ AddSkyboxButton("elyvisions", "rainbow", row6);
312
+ AddSkyboxButton("elyvisions", "distant_sunset", row6);
313
+ AddSkyboxButton("elyvisions", "heaven", row6);
314
+ AddSkyboxButton("elyvisions", "hot", row6);
315
+
316
+ tab0.add(row0);
317
+ tab0.add(row1);
318
+ tab0.add(row2);
319
+ tab0.add(row3);
320
+ tab0.add(row4);
321
+ tab0.add(row5);
322
+ tab0.add(row6);
323
+
324
+ for (int i=5; --i>=0;)
325
+ {
326
+ //oe.toolboxPanel.Return();
327
+ //tab0.add(new cGridBag());
328
+ }
329
+ }
330
+
331
+ public void ChangeSkybox(String skybox)
332
+ {
333
+ //cameraView.envyoff = false;
334
+ group.skyboxname = skybox;
335
+ group.skyboxext = "jpg";
336
+ cameraView.repaint();
337
+ }
338
+
339
+ public void CreateSkyboxPanel(cGridBag skyboxPanel)
340
+ {
341
+ JTabbedPane skyboxpane = new JTabbedPane();
342
+
343
+ AddSkyboxTab0(skyboxpane);
344
+ AddSkyboxTab1(skyboxpane);
345
+ AddSkyboxTab2(skyboxpane);
346
+ AddSkyboxTab3(skyboxpane);
347
+
348
+ skyboxPanel.add(skyboxpane);
349
+ }
350
+
351
+ public void ChangeTexture(String texture)
352
+ {
353
+ cameraView.repaint();
354
+ }
355
+
26356 //ObjEditor objEditor;
27357 public void closeUI2()
28358 {
....@@ -60,6 +390,12 @@
60390 this.copy = this.group = group;
61391 //selectees = this.group.selectees;
62392
393
+ if (copy.versionlist == null)
394
+ {
395
+ copy.versionlist = new Object3D[100];
396
+ copy.versionindex = -1;
397
+ }
398
+
63399 if(ui)
64400 SetupUI(objEditor);
65401 }
....@@ -80,10 +416,22 @@
80416 SetupViews(objEditor);
81417
82418 ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true);
419
+
420
+ if (copy.versionlist == null)
421
+ {
422
+ copy.versionlist = new Object3D[100];
423
+ copy.versionindex = -1;
424
+
425
+ Save(true);
426
+ }
83427 }
84428
85429 void CloneSelection(boolean supports)
86430 {
431
+ if (Globals.REPLACEONMAKE)
432
+ Save();
433
+ boolean keep = Globals.REPLACEONMAKE;
434
+ Globals.REPLACEONMAKE = false;
87435 // Object3D keep = GrafreeD.clipboard;
88436 //Object3D obj;
89437 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -94,6 +442,7 @@
94442
95443 makeSomething(clone, i==group.selection.size()-1);
96444 }
445
+ Globals.REPLACEONMAKE = keep;
97446 }
98447
99448 void CloneClipboard(boolean supports)
....@@ -150,6 +499,8 @@
150499
151500 void SetupMenu2(GroupEditor oe)
152501 {
502
+ oe.jTree = new cTree();
503
+
153504 Menu menu;
154505 oe.menuBar.add(menu = new Menu("Edit"));
155506 //editItem = menu.add(new MenuItem("Edit"));
....@@ -160,7 +511,7 @@
160511 // redoItem = menu.add(new MenuItem("Redo"));
161512 // redoItem.addActionListener(this);
162513 // menu.add("-");
163
- duplicateItem = menu.add(new MenuItem("Duplicate"));
514
+ duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate"));
164515 duplicateItem.addActionListener(this);
165516 cloneItem = menu.add(new MenuItem("Clone"));
166517 cloneItem.addActionListener(this);
....@@ -187,8 +538,8 @@
187538 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
188539 // pasteExpandItem.addActionListener(this);
189540 menu.add("-");
190
- clearItem = menu.add(new MenuItem("Clear"));
191
- clearItem.addActionListener(this);
541
+ deleteItem = menu.add(new MenuItem("Delete"));
542
+ deleteItem.addActionListener(this);
192543
193544 if (Globals.ADVANCED)
194545 {
....@@ -202,23 +553,23 @@
202553 //zBufferItem.addActionListener(this);
203554 //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
204555 //normalLensItem.addActionListener(this);
205
- cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint"));
206
- revertCameraItem.addActionListener(this);
556
+ cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint"));
557
+ restoreCameraItem.addActionListener(this);
207558
208
- cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
209
- toggleFullScreenItem.addItemListener(this);
210
- toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
211
- cameraMenu.add("-");
559
+// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
560
+// toggleFullScreenItem.addItemListener(this);
561
+// toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
562
+// cameraMenu.add("-");
563
+//
564
+// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
565
+// toggleTextureItem.addItemListener(this);
566
+// toggleTextureItem.setState(CameraPane.textureon);
567
+//
568
+// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
569
+// toggleSwitchItem.addItemListener(this);
570
+// toggleSwitchItem.setState(CameraPane.SWITCH);
212571
213
- cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
214
- toggleTextureItem.addItemListener(this);
215
- toggleTextureItem.setState(CameraPane.textureon);
216
-
217
- cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
218
- toggleSwitchItem.addItemListener(this);
219
- toggleSwitchItem.setState(CameraPane.SWITCH);
220
-
221
- cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
572
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles"));
222573 toggleHandleItem.addItemListener(this);
223574 toggleHandleItem.setState(CameraPane.HANDLES);
224575
....@@ -273,7 +624,7 @@
273624 {
274625 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
275626 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
276
- //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
627
+ //cameraMenu.add(switchViewItem = new MenuItem("Reverse View"));
277628 editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
278629 oe.cameraMenu.add("-");
279630 openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
....@@ -281,7 +632,7 @@
281632 editLeafItem.addActionListener(this);
282633 lookAtItem.addActionListener(this);
283634 //lookFromItem.addActinoListener(this);
284
- //switchItem.addActionListener(this);
635
+ //switchViewItem.addActionListener(this);
285636 }
286637
287638 oe.menuBar.add(menu = new Menu("Setting"));
....@@ -326,21 +677,29 @@
326677 }
327678
328679 oe.menuBar.add(menu = new Menu("Group"));
329
- grabItem = menu.add(new MenuItem("Grab"));
330
- grabItem.addActionListener(this);
680
+// grabItem = menu.add(new MenuItem("Grab"));
681
+// grabItem.addActionListener(this);
331682 backItem = menu.add(new MenuItem("Back"));
332683 backItem.addActionListener(this);
333684 frontItem = menu.add(new MenuItem("Front"));
334685 frontItem.addActionListener(this);
335
- compositeItem = menu.add(new MenuItem("Composite"));
336
- compositeItem.addActionListener(this);
686
+// compositeItem = menu.add(new MenuItem("Composite"));
687
+// compositeItem.addActionListener(this);
688
+
689
+ if (Globals.ADVANCED)
690
+ {
337691 hideItem = menu.add(new MenuItem("Hidden Group"));
338692 hideItem.addActionListener(this);
693
+ }
339694 ungroupItem = menu.add(new MenuItem("Ungroup"));
340695 ungroupItem.addActionListener(this);
341
- menu.add("-");
342
- randomItem = menu.add(new MenuItem("Switch node"));
343
- randomItem.addActionListener(this);
696
+
697
+// menu.add("-");
698
+//
699
+// switchItem = menu.add(new MenuItem("Switch node"));
700
+// switchItem.addActionListener(this);
701
+ if (Globals.ADVANCED)
702
+ {
344703 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
345704 switchGeoItem.addActionListener(this);
346705 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
....@@ -348,8 +707,6 @@
348707 morphItem = menu.add(new MenuItem("Morph Group"));
349708 morphItem.addActionListener(this);
350709
351
- if (Globals.ADVANCED)
352
- {
353710 menu.add("-");
354711 physicsItem = menu.add(new MenuItem("Physics"));
355712 physicsItem.addActionListener(this);
....@@ -357,13 +714,11 @@
357714 frameselectorItem.addActionListener(this);
358715 scriptNodeItem = menu.add(new MenuItem("Script Node"));
359716 scriptNodeItem.addActionListener(this);
360
- cameraItem = menu.add(new MenuItem("Camera"));
361
- cameraItem.addActionListener(this);
362717 }
363718
364719 oe.menuBar.add(menu = new Menu("Object"));
365
- textureItem = menu.add(new MenuItem("Texture"));
366
- textureItem.addActionListener(this);
720
+// textureItem = menu.add(new MenuItem("Texture"));
721
+// textureItem.addActionListener(this);
367722 billboardItem = menu.add(new MenuItem("Billboard"));
368723 billboardItem.addActionListener(this);
369724 csgItem = menu.add(new MenuItem("CSG"));
....@@ -374,13 +729,14 @@
374729 shadowYItem.addActionListener(this);
375730 shadowZItem = menu.add(new MenuItem("Shadow Blue"));
376731 shadowZItem.addActionListener(this);
732
+ attributeItem = menu.add(new MenuItem("Attribute"));
733
+ attributeItem.addActionListener(this);
734
+
377735 if (Globals.ADVANCED)
378736 {
379737 menu.add("-");
380738 linkerItem = menu.add(new MenuItem("Linker"));
381739 linkerItem.addActionListener(this);
382
- attributeItem = menu.add(new MenuItem("Attribute"));
383
- attributeItem.addActionListener(this);
384740 templateItem = menu.add(new MenuItem("Template"));
385741 templateItem.addActionListener(this);
386742 pointflowItem = menu.add(new MenuItem("Point Flow"));
....@@ -409,7 +765,7 @@
409765 genNormalsMESHItem.addActionListener(this);
410766 if (Globals.ADVANCED)
411767 {
412
- genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
768
+ genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals"));
413769 genNormalsMINEItem.addActionListener(this);
414770 }
415771 stripifyItem = menu.add(new MenuItem("Stripify"));
....@@ -502,10 +858,15 @@
502858 attachBumpItem.addActionListener(this);
503859 pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump"));
504860 pigmentBumpItem.addActionListener(this);
861
+ //embedTexturesItem
505862 detachPigmentItem = menu.add(new MenuItem("Detach Pigment"));
506863 detachPigmentItem.addActionListener(this);
507864 detachBumpItem = menu.add(new MenuItem("Detach Bump"));
508865 detachBumpItem.addActionListener(this);
866
+ embedTexturesItem = menu.add(new MenuItem("Embed Textures"));
867
+ embedTexturesItem.addActionListener(this);
868
+ deEmbedTexturesItem = menu.add(new MenuItem("De-embed Textures"));
869
+ deEmbedTexturesItem.addActionListener(this);
509870 menu.add("-");
510871 sortbysizeItem = menu.add(new MenuItem("Sort by size"));
511872 sortbysizeItem.addActionListener(this);
....@@ -532,6 +893,68 @@
532893 buildToolsMenu(menu);
533894 }
534895
896
+ JTabbedPane resourcecontainer;
897
+ cGridBag currenttab;
898
+ boolean added; // patch for jar
899
+
900
+ int tabcount = 0;
901
+ int colcount = 0;
902
+ int rowcount = 0;
903
+
904
+ int columns = 5;
905
+ int rows = 7;
906
+
907
+ public void ResourceCallBack(String[] path)
908
+ {
909
+ for (int i = 0; i < path.length; i++)
910
+ System.out.print(path[i] + "/");
911
+ System.out.println();
912
+ if (rowcount == 0)
913
+ {
914
+ currenttab = new cGridBag();
915
+ added = false;
916
+ String tabname = String.valueOf((char)('A'+tabcount));
917
+ currenttab.setName(tabname);
918
+ rowcount = 1;
919
+ }
920
+
921
+ if (path.length > 1 && path[1].toLowerCase().endsWith(".jpg"))
922
+ {
923
+ if (!added)
924
+ {
925
+ added = true;
926
+ resourcecontainer.add(currenttab);
927
+ String tabname = String.valueOf((char)('A'+tabcount));
928
+ resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname);
929
+ }
930
+
931
+ AddTextureButton(path[0], path[1], currenttab);
932
+ if (++colcount >= columns)
933
+ {
934
+ colcount = 0;
935
+ currenttab.Return();
936
+
937
+ if (rowcount++ >= rows)
938
+ {
939
+ rowcount = 0;
940
+ }
941
+ }
942
+ }
943
+ else
944
+ {
945
+// if (!path[path.length-1].equals("icons"))
946
+// resourcecontainer.Return();
947
+ }
948
+ }
949
+
950
+ void CreateTexturePanel(cGridBag container)
951
+ {
952
+ resourcecontainer = new JTabbedPane();
953
+ container.add(resourcecontainer);
954
+
955
+ Grafreed.ParseResources("textures", this);
956
+ }
957
+
535958 void SetupUI2(ObjEditor oe)
536959 {
537960 // June 2019
....@@ -574,51 +997,83 @@
574997 oe.radioPanel.add(dummyButton);
575998 oe.buttonGroup.add(dummyButton);
576999 */
1000
+ cGridBag copyOptionsPanel = new cGridBag();
1001
+
1002
+ copyOptionsPanel.preferredHeight = 2;
1003
+
5771004 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
5781005
5791006 //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
5801007 //minButton.setToolTipText("Minimize window");
5811008 //minButton.addActionListener(this);
5821009
583
- oe.toolbarPanel.add(maxButton = new cButton("\u271A", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
584
- maxButton.setToolTipText("Maximize window");
585
- maxButton.addActionListener(this);
1010
+ if (Globals.ADVANCED)
1011
+ {
1012
+ oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1013
+ maxButton.setToolTipText("Maximize window");
1014
+ maxButton.addActionListener(this);
1015
+ }
5861016
587
- oe.toolbarPanel.add(fullButton = new cButton("\u2b1c", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1017
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
5881018 fullButton.setToolTipText("Full-screen window");
5891019 fullButton.addActionListener(this);
5901020
591
- oe.toolbarPanel.add(undoButton = new cButton("\u21a9", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
592
- undoButton.setToolTipText("Undo changes");
593
- undoButton.addActionListener(this);
1021
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1022
+ screenfitButton.setToolTipText("Screen fit");
1023
+ screenfitButton.addActionListener(this);
1024
+
1025
+ oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1026
+ restoreCameraButton.setToolTipText("Restore viewpoint");
1027
+ restoreCameraButton.addActionListener(this);
5941028
595
- oe.toolbarPanel.add(redoButton = new cButton("\u21aa", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
596
- redoButton.setToolTipText("Redo changes");
597
- redoButton.addActionListener(this);
1029
+ copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1030
+ saveVersionButton.setToolTipText("Duplicate current version");
1031
+ saveVersionButton.addActionListener(this);
1032
+
1033
+ copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1034
+ deleteVersionButton.setToolTipText("Delete current version");
1035
+ deleteVersionButton.addActionListener(this);
1036
+
1037
+ copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1038
+ previousVersionButton.setToolTipText("Previous version");
1039
+ previousVersionButton.addActionListener(this);
1040
+ previousVersionButton.setEnabled(false);
5981041
599
- oe.toolbarPanel.add(saveButton = new cButton("\u21e3", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
600
- saveButton.setToolTipText("Save changes");
601
- saveButton.addActionListener(this);
1042
+ cGridBag updown = new cGridBag().setVertical(true);
1043
+ updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1044
+ restoreButton.setToolTipText("Undo (restore current version)");
1045
+ restoreButton.addActionListener(this);
1046
+ //restoreButton.setEnabled(false);
6021047
603
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
1048
+ updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1049
+ replaceButton.setToolTipText("Save (replace current version)");
1050
+ replaceButton.addActionListener(this);
1051
+ //replaceButton.setEnabled(false);
1052
+
1053
+ copyOptionsPanel.add(updown);
1054
+
1055
+ copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1056
+ nextVersionButton.setToolTipText("Next version");
1057
+ nextVersionButton.addActionListener(this);
1058
+ nextVersionButton.setEnabled(false);
1059
+
1060
+ oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
6041061 liveCB.setToolTipText("Enable animation");
6051062 liveCB.addItemListener(this);
6061063
607
- oe.toolbarPanel.add(oneStepButton = new cButton("\u29f4", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1064
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
6081065 oneStepButton.setToolTipText("Animate one step forward");
6091066 oneStepButton.addActionListener(this);
6101067
611
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
1068
+ oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
6121069 fastCB.setToolTipText("Fast mode");
6131070 fastCB.addItemListener(this);
6141071
615
- oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK)); //, oe.aConstraints);
616
- trackCB.setToolTipText("Enable tracking");
617
- trackCB.addItemListener(this);
618
-
619
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
620
- screenfitButton.setToolTipText("Screen fit");
621
- screenfitButton.addActionListener(this);
1072
+ //oe.toolboxPanel.Return();
1073
+
1074
+// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
1075
+// trackCB.setToolTipText("Enable tracking");
1076
+// trackCB.addItemListener(this);
6221077
6231078 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
6241079 // screenfitpointButton.addActionListener(this);
....@@ -628,63 +1083,150 @@
6281083 oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
6291084 snapobjectButton.addActionListener(this);
6301085 snapobjectButton.setToolTipText("Snap Object");
1086
+
1087
+ oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1088
+ fourButton.addActionListener(this);
1089
+ fourButton.setToolTipText("Show control panel only");
6311090 }
6321091
633
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
634
- flashSelectionButton.setToolTipText("Show selection");
635
- flashSelectionButton.addActionListener(this);
1092
+ //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
6361093
637
- oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
638
-
639
- oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
640
- twoButton.setToolTipText("Show center view only");
1094
+ oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1095
+ twoButton.setToolTipText("Show 3D view only");
6411096 twoButton.addActionListener(this);
642
- oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
643
- fourButton.addActionListener(this);
644
- fourButton.setToolTipText("Show left panel only");
645
- oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
646
- sixButton.setToolTipText("2-column layout left");
647
- sixButton.addActionListener(this);
648
- oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
649
- threeButton.setToolTipText("2-column layout right");
1097
+ this.fullscreenLayout = twoButton;
1098
+
1099
+ oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1100
+ threeButton.setToolTipText("Show controls and 3D view");
6501101 threeButton.addActionListener(this);
651
- oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
652
- sevenButton.setToolTipText("3-column layout");
653
- sevenButton.addActionListener(this);
1102
+ oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1103
+ sixButton.setToolTipText("Show 3D view and controls");
1104
+ sixButton.addActionListener(this);
1105
+// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1106
+// sevenButton.setToolTipText("3-column layout");
1107
+// sevenButton.addActionListener(this);
6541108 //
6551109
656
- oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
657
- rootButton.setToolTipText("Edit selection in new tab");
1110
+ oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1111
+ rootButton.setToolTipText("Open selection in new tab");
6581112 rootButton.addActionListener(this);
6591113
660
- oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1114
+ oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
6611115 closeButton.setToolTipText("Close tab");
6621116 closeButton.addActionListener(this);
6631117 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
6641118 //clearButton.addActionListener(this);
665
-
666
- editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
667
- editButton.setToolTipText("Edit selection");
1119
+
1120
+ cGridBag row1 = new cGridBag();
1121
+
1122
+ // INSERT
1123
+ row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1124
+ gridButton.setToolTipText("Create grid");
1125
+ gridButton.addActionListener(this);
1126
+
1127
+ row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1128
+ boxButton.setToolTipText("Create box");
1129
+ boxButton.addActionListener(this);
1130
+
1131
+ row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1132
+ sphereButton.setToolTipText("Create sphere");
1133
+ sphereButton.addActionListener(this);
1134
+
1135
+ row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1136
+ coneButton.setToolTipText("Create cone");
1137
+ coneButton.addActionListener(this);
1138
+
1139
+ row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1140
+ torusButton.setToolTipText("Create torus");
1141
+ torusButton.addActionListener(this);
1142
+
1143
+ row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1144
+ superButton.setToolTipText("Create superellipsoid");
1145
+ superButton.addActionListener(this);
1146
+
1147
+ if (Globals.ADVANCED)
1148
+ {
1149
+ oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1150
+ kleinButton.setToolTipText("Create Klein bottle");
1151
+ kleinButton.addActionListener(this);
1152
+ }
1153
+
1154
+ row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1155
+ particlesButton.setToolTipText("Create particle system");
1156
+ particlesButton.addActionListener(this);
1157
+
1158
+ oe.toolboxPanel.add(row1);
1159
+
1160
+ cGridBag row2 = new cGridBag();
1161
+
1162
+ row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1163
+ groupButton.setToolTipText("Create group");
1164
+ groupButton.addActionListener(this);
1165
+
1166
+ row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1167
+ compositeButton.setToolTipText("Create composite");
1168
+ compositeButton.addActionListener(this);
1169
+
1170
+ row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1171
+ switchButton.setToolTipText("Create item switcher");
1172
+ switchButton.addActionListener(this);
1173
+
1174
+ row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1175
+ loopButton.setToolTipText("Create loop");
1176
+ loopButton.addActionListener(this);
1177
+
1178
+ row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1179
+ textureButton.setToolTipText("Create texture");
1180
+ textureButton.addActionListener(this);
1181
+
1182
+ row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1183
+ overlayButton.setToolTipText("Create overlay");
1184
+ overlayButton.addActionListener(this);
1185
+
1186
+ row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1187
+ lightButton.setToolTipText("Create light");
1188
+ lightButton.addActionListener(this);
1189
+
1190
+ oe.toolboxPanel.add(row2);
1191
+
1192
+ cGridBag textures = new cGridBag();
1193
+
1194
+ CreateTexturePanel(textures);
1195
+
1196
+ oe.toolboxPanel.add(textures);
1197
+
1198
+ textures.preferredHeight = 100;
1199
+
1200
+ CreateSkyboxPanel(oe.skyboxPanel);
1201
+
1202
+ // EDIT panel
1203
+ editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1204
+ editButton.setToolTipText("Pin selection controls");
6681205 editButton.addActionListener(this);
6691206
670
- editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
671
- uneditButton.setToolTipText("Unedit selection");
1207
+ editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1208
+ uneditButton.setToolTipText("Unpin and remove selection controls");
6721209 uneditButton.addActionListener(this);
6731210
6741211 editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
675
- allParamsButton.setToolTipText("Edit all params");
1212
+ allParamsButton.setToolTipText("Show all controls");
6761213 allParamsButton.addActionListener(this);
6771214
678
- editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
679
- clearPanelButton.setToolTipText("Clear edit panel");
1215
+ editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1216
+ clearPanelButton.setToolTipText("Clear all controls");
6801217 clearPanelButton.addActionListener(this);
6811218
682
- editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
683
- unselectButton.setToolTipText("Unselect");
684
- unselectButton.addActionListener(this);
1219
+ //editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1220
+ //unselectButton.setToolTipText("Unselect");
1221
+ //unselectButton.addActionListener(this);
6851222
1223
+ editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1224
+ flashSelectionButton.setToolTipText("Highlight selection");
1225
+ flashSelectionButton.addActionListener(this);
1226
+
6861227 editCommandsPanel.preferredHeight = 1;
6871228
1229
+ SetPinStates(false);
6881230 // oe.treePanel.add(commandsPanel);
6891231 // oe.treePanel.Return();
6901232
....@@ -703,32 +1245,20 @@
7031245
7041246 JScrollPane jSP;
7051247 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
706
- jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
1248
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
7071249 ResetModel();
7081250
7091251 oe.treePanel.add(jSPPanel);
7101252 oe.treePanel.Return();
7111253
712
- cGridBag copyOptionsPanel = new cGridBag();
713
-
714
- copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
715
- colorCB.setToolTipText("Copy color when dropped");
716
- colorCB.addItemListener(this);
717
-
718
- copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
719
- materialCB.setToolTipText("Copy material when dropped");
720
- materialCB.addItemListener(this);
721
-
722
- copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
723
- textureCB.setToolTipText("Copy texture when dropped");
724
- textureCB.addItemListener(this);
725
-
726
- copyOptionsPanel.preferredHeight = 1;
7271254 oe.treePanel.add(copyOptionsPanel);
7281255 oe.treePanel.Return();
1256
+ cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
1257
+ versionSlider = (cNumberSlider)sliderPane.getComponent(1);
1258
+ sliderPane.preferredHeight = 1;
7291259
730
-// mainPanel.setDividerLocation(0.5); //1.0);
731
-// mainPanel.setResizeWeight(0.5);
1260
+// mainPanel.setDividerLocation(0.1); //1.0);
1261
+ mainPanel.setResizeWeight(0.4);
7321262
7331263 //jList.addListSelectionListener(this);
7341264 oe.jTree.addTreeSelectionListener(this);
....@@ -736,7 +1266,7 @@
7361266 //jTree.setEditable(true);
7371267 oe.jTree.setDragEnabled(true);
7381268 //jTree.setPreferredSize(new Dimension(10,10));
739
- jSP.setPreferredSize(new Dimension(100,200));
1269
+ //jSP.setPreferredSize(new Dimension(100,200));
7401270
7411271 oe.jTree.setCellRenderer(new cTreeModel.Renderer());
7421272
....@@ -748,29 +1278,49 @@
7481278 dgr.addDragGestureListener(this);
7491279 }catch(Exception e) {}
7501280 */
751
- radio.layout = sevenButton;
1281
+ radio.layout = threeButton; // sixButton;
7521282 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
7531283 }
7541284
7551285 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
7561286 {
1287
+ panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
1288
+ colorCB.setToolTipText("Copy color when dropped");
1289
+ colorCB.addItemListener(this);
1290
+
1291
+ panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
1292
+ materialCB.setToolTipText("Copy material when dropped");
1293
+ materialCB.addItemListener(this);
1294
+
1295
+ panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
1296
+ textureCB.setToolTipText("Copy texture when dropped");
1297
+ textureCB.addItemListener(this);
1298
+
1299
+ panel.Return();
1300
+
7571301 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
7581302 boxCB.setToolTipText("Display bounding boxes");
7591303 boxCB.addItemListener(this);
7601304
7611305 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
762
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
1306
+ zoomBoxCB.setToolTipText("Display only for wheel");
7631307 zoomBoxCB.addItemListener(this);
7641308
7651309 if (true) // Globals.ADVANCED)
7661310 {
767
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
768
- supportCB.setToolTipText("Enable rigging");
769
- supportCB.addItemListener(this);
1311
+// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
1312
+// supportCB.setToolTipText("Enable rigging");
1313
+// supportCB.addItemListener(this);
1314
+
1315
+ panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints);
1316
+ freezeCB.setToolTipText("Fast moving camera");
1317
+ freezeCB.addItemListener(this);
7701318
7711319 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
7721320 // localCB.addItemListener(this);
7731321
1322
+ panel.Return();
1323
+
7741324 panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
7751325 crowdCB.setToolTipText("Used for crowds");
7761326 crowdCB.addItemListener(this);
....@@ -779,14 +1329,19 @@
7791329 smoothCB.setToolTipText("Snapping delay");
7801330 smoothCB.addItemListener(this);
7811331
782
- panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
783
- slowCB.setToolTipText("Smooth interpolation");
784
- slowCB.addItemListener(this);
1332
+// panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
1333
+// slowCB.setToolTipText("Smooth interpolation");
1334
+// slowCB.addItemListener(this);
1335
+ panel.add(minshaderCB = new cCheckBox("Min shader", Globals.MINSHADER)); //, constraints);
1336
+ minshaderCB.setToolTipText("Minimal fast shader");
1337
+ minshaderCB.addItemListener(this);
7851338
7861339 // constraints.gridy += 1;
7871340 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
7881341 // speakerMocapCB.addItemListener(this);
7891342
1343
+ panel.Return();
1344
+
7901345 if (false)
7911346 {
7921347 // handled in scripts
....@@ -801,34 +1356,74 @@
8011356 //constraints.gridy += 1;
8021357 panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
8031358 smoothfocusCB.addItemListener(this);
1359
+ panel.Return();
8041360 }
8051361
8061362 //constraints.gridx += 1;
8071363 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
8081364 // debugCB.addItemListener(this);
8091365
1366
+ panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
1367
+ trackCB.setToolTipText("Enable tracking target");
1368
+ trackCB.addItemListener(this);
1369
+
8101370 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
1371
+ oeilCB.setToolTipText("Move camera when tracking");
8111372 oeilCB.addItemListener(this);
8121373
1374
+ panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
1375
+ shadowCB.setToolTipText("When live compute shadows");
1376
+ shadowCB.addItemListener(this);
1377
+
1378
+ panel.Return();
1379
+ panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints);
1380
+ toggleTextureCB.setToolTipText("Load textures");
1381
+ toggleTextureCB.addItemListener(this);
1382
+
1383
+ panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints);
1384
+ toggleSwitchCB.setToolTipText("Choose a single item");
1385
+ toggleSwitchCB.addItemListener(this);
1386
+
1387
+ panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints);
1388
+ autokeepCB.setToolTipText("On structure change");
1389
+ autokeepCB.addItemListener(this);
1390
+
1391
+ panel.Return();
1392
+ if (Globals.ADVANCED)
1393
+ {
8131394 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
8141395 lookAtCB.setToolTipText("Look-at target");
8151396 lookAtCB.addItemListener(this);
1397
+ }
8161398
8171399 }
8181400
8191401 cGridBag fill = new cGridBag();
820
-
8211402 fill.preferredHeight = 200;
1403
+ cGridBag fill2 = new cGridBag();
1404
+ fill2.preferredHeight = 200;
1405
+ cGridBag fill3 = new cGridBag();
1406
+ fill3.preferredHeight = 200;
8221407
8231408 panel.add(fill);
1409
+ panel.add(fill2);
1410
+ panel.add(fill3);
8241411
8251412 }
8261413
8271414 void EditObject(Object3D obj)
8281415 {
8291416 cRadio radioButton = new cRadio(obj.name);
1417
+
1418
+ // June 2019. Patch to avoid bug with transparency.
1419
+ radioButton.hadMaterial = obj.material != null;
1420
+ if (!radioButton.hadMaterial)
1421
+ {
1422
+ obj.material = new cMaterial();
1423
+ }
1424
+
8301425 radioButton.SetObject(obj);
831
- radioButton.layout = sevenButton;
1426
+ radioButton.layout = threeButton; // sixButton;
8321427 radioButton.SetCamera(cameraView.renderCamera, false);
8331428 radioButton.addActionListener(this);
8341429 radioPanel.add(radioButton);
....@@ -848,23 +1443,30 @@
8481443 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
8491444 }
8501445
851
- JCheckBox liveCB;
852
- JCheckBox supportCB;
853
- JCheckBox localCB;
854
- JCheckBox crowdCB;
855
- JCheckBox smoothCB;
856
- JCheckBox fastCB;
857
- JCheckBox slowCB;
858
- JCheckBox boxCB;
859
- JCheckBox zoomBoxCB;
860
- JCheckBox trackCB;
861
- JCheckBox smoothfocusCB;
1446
+ cToggleButton liveCB;
1447
+ cCheckBox supportCB;
1448
+ cCheckBox localCB;
1449
+ cCheckBox crowdCB;
1450
+ cCheckBox smoothCB;
1451
+ cCheckBox minshaderCB;
1452
+
1453
+ cToggleButton fastCB;
1454
+ cCheckBox slowCB;
1455
+ cCheckBox boxCB;
1456
+ cCheckBox zoomBoxCB;
1457
+ cCheckBox freezeCB;
1458
+ //cToggleButton trackCB;
1459
+ cCheckBox trackCB;
1460
+ cCheckBox smoothfocusCB;
8621461 // JCheckBox speakerMocapCB;
863
- JCheckBox speakerCameraCB;
864
- JCheckBox speakerFocusCB;
865
- JCheckBox debugCB;
866
- JCheckBox oeilCB;
867
- JCheckBox lookAtCB;
1462
+ cCheckBox speakerCameraCB;
1463
+ cCheckBox speakerFocusCB;
1464
+ cCheckBox debugCB;
1465
+
1466
+ cCheckBox oeilCB;
1467
+ cCheckBox shadowCB;
1468
+ cCheckBox autokeepCB;
1469
+ cCheckBox lookAtCB;
8681470
8691471 // static int COLOR = 1;
8701472 // static int MATERIAL = 2;
....@@ -872,9 +1474,9 @@
8721474
8731475 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
8741476
875
- JCheckBox colorCB;
876
- JCheckBox materialCB;
877
- JCheckBox textureCB;
1477
+ cCheckBox colorCB;
1478
+ cCheckBox materialCB;
1479
+ cCheckBox textureCB;
8781480
8791481 public void itemStateChanged(ItemEvent e)
8801482 {
....@@ -918,6 +1520,12 @@
9181520 {
9191521 cameraView.ToggleInertia();
9201522 cameraView.repaint();
1523
+ }
1524
+ else if(e.getSource() == minshaderCB)
1525
+ {
1526
+ Globals.MINSHADER ^= true;
1527
+ cameraView.programInitialized = false;
1528
+ cameraView.repaint();
9211529 }
9221530 else if(e.getSource() == localCB)
9231531 {
....@@ -967,6 +1575,18 @@
9671575 {
9681576 cameraView.ToggleOeil();
9691577 }
1578
+ else if(e.getSource() == shadowCB)
1579
+ {
1580
+ Globals.COMPUTESHADOWWHENLIVE ^= true;
1581
+ }
1582
+ else if(e.getSource() == freezeCB)
1583
+ {
1584
+ Globals.FREEZEONMOVE ^= true;
1585
+ }
1586
+ else if(e.getSource() == autokeepCB)
1587
+ {
1588
+ Globals.REPLACEONMAKE ^= true;
1589
+ }
9701590 else if(e.getSource() == lookAtCB)
9711591 {
9721592 cameraView.ToggleLookAt();
....@@ -983,7 +1603,8 @@
9831603
9841604 /**/
9851605 //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this);
986
- TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1606
+ //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1607
+ TreePath path = objEditor.jTree.getSelectionPath();
9871608 if ((path == null) || (path.getPathCount() <= 1)) {
9881609 // We can't move the root node or an empty selection
9891610 return;
....@@ -1046,8 +1667,6 @@
10461667 }
10471668 }
10481669
1049
- String string = (String) object;
1050
-
10511670 System.out.println("Transfer = " + object + "; drop : " + target);
10521671 // if( object instanceof java.io.File[])
10531672 // {
....@@ -1055,6 +1674,8 @@
10551674 // objEditor.DropFile((java.io.File[]) object, true);
10561675 // return;
10571676 // }
1677
+
1678
+ String string = object.toString();
10581679
10591680 // File path for Mac and Windows
10601681 if (string.charAt(0) == '/' || string.charAt(1) == ':')
....@@ -1100,23 +1721,33 @@
11001721
11011722 assert target == objEditor.jTree;
11021723 TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y);
1724
+ Object3D destinationLeaf;
11031725 try {
1104
- Object3D dummy = (Composite) destinationPath.getLastPathComponent();
1726
+ destinationLeaf = (Composite) destinationPath.getLastPathComponent();
11051727 } catch (Exception e) {
11061728 System.out.println("destinationPath : " + destinationPath);
11071729 return;
11081730 }
11091731
1110
- if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1732
+ for (int i=group.selection.size(); --i>=0;)
11111733 {
1734
+ Object3D child = (Object3D)group.selection.elementAt(i);
1735
+
1736
+ // Cannot move into itself
1737
+ if (child == destinationLeaf)
1738
+ return;
1739
+ }
1740
+
1741
+// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1742
+// {
11121743 loadClipboard(true);
11131744 objEditor.jTree.setSelectionPath(destinationPath);
11141745 pasteInto(false, false);
1115
- } else {
1116
- loadClipboard(false);
1117
- objEditor.jTree.setSelectionPath(destinationPath);
1118
- pasteInto(false, false); // true); // ???
1119
- }
1746
+// } else {
1747
+// loadClipboard(false);
1748
+// objEditor.jTree.setSelectionPath(destinationPath);
1749
+// pasteInto(false, false); // true); // ???
1750
+// }
11201751 }
11211752 public void dropActionChanged(DropTargetDragEvent dtde)
11221753 // Called if the user has modified the current drop gesture
....@@ -1221,22 +1852,30 @@
12211852 {
12221853 //heightFieldItem = menu.add(new MenuItem("Height Field"));
12231854 //heightFieldItem.addActionListener(this);
1224
- gridItem = menu.add(new MenuItem("Grid"));
1225
- gridItem.addActionListener(this);
1226
- rectoidItem = menu.add(new MenuItem("Box"));
1227
- rectoidItem.addActionListener(this);
1228
- ellipsoidItem = menu.add(new MenuItem("Sphere"));
1229
- ellipsoidItem.addActionListener(this);
1230
- coneItem = menu.add(new MenuItem("Cone"));
1231
- coneItem.addActionListener(this);
1232
- torusItem = menu.add(new MenuItem("Torus"));
1233
- torusItem.addActionListener(this);
1234
- superItem = menu.add(new MenuItem("Superellipsoid"));
1235
- superItem.addActionListener(this);
1855
+// gridItem = menu.add(new MenuItem("Grid"));
1856
+// gridItem.addActionListener(this);
1857
+// rectoidItem = menu.add(new MenuItem("Box"));
1858
+// rectoidItem.addActionListener(this);
1859
+// ellipsoidItem = menu.add(new MenuItem("Sphere"));
1860
+// ellipsoidItem.addActionListener(this);
1861
+// coneItem = menu.add(new MenuItem("Cone"));
1862
+// coneItem.addActionListener(this);
1863
+// torusItem = menu.add(new MenuItem("Torus"));
1864
+// torusItem.addActionListener(this);
1865
+// superItem = menu.add(new MenuItem("Superellipsoid"));
1866
+// superItem.addActionListener(this);
1867
+
1868
+ cameraItem = menu.add(new MenuItem("Camera"));
1869
+ cameraItem.addActionListener(this);
1870
+
1871
+ if (!Globals.ADVANCED)
1872
+ {
12361873 kleinItem = menu.add(new MenuItem("Klein Bottle"));
12371874 kleinItem.addActionListener(this);
1238
- particleItem = menu.add(new MenuItem("Particle system"));
1239
- particleItem.addActionListener(this);
1875
+ }
1876
+
1877
+// particleItem = menu.add(new MenuItem("Particle system"));
1878
+// particleItem.addActionListener(this);
12401879 if (Globals.ADVANCED)
12411880 {
12421881 ragdollItem = menu.add(new MenuItem("Rag Walk"));
....@@ -1262,15 +1901,15 @@
12621901 }
12631902 bezierItem = menu.add(new MenuItem("Bezier Patch"));
12641903 bezierItem.addActionListener(this);
1265
- overlayItem = menu.add(new MenuItem("Overlay"));
1266
- overlayItem.addActionListener(this);
1267
- lightItem = menu.add(new MenuItem("Light"));
1268
- lightItem.addActionListener(this);
1904
+// overlayItem = menu.add(new MenuItem("Overlay"));
1905
+// overlayItem.addActionListener(this);
1906
+// lightItem = menu.add(new MenuItem("Light"));
1907
+// lightItem.addActionListener(this);
12691908 menu.add("-");
12701909 //superLoopItem = menu.add(new MenuItem("Super Loop"));
12711910 //superLoopItem.addActionListener(this);
1272
- loopItem = menu.add(new MenuItem("Loop"));
1273
- loopItem.addActionListener(this);
1911
+// loopItem = menu.add(new MenuItem("Loop"));
1912
+// loopItem.addActionListener(this);
12741913 doubleItem = menu.add(new MenuItem("Fork"));
12751914 doubleItem.addActionListener(this);
12761915 if (Globals.ADVANCED)
....@@ -1286,6 +1925,9 @@
12861925 animationItem.addItemListener(this);
12871926 animationItem.setState(Globals.ANIMATION);
12881927
1928
+ menu.add(archiveItem = new MenuItem("Archive3D..."));
1929
+ archiveItem.addActionListener(this);
1930
+
12891931 menu.add("-");
12901932 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
12911933 parseverticesItem.addActionListener(this);
....@@ -1298,6 +1940,8 @@
12981940 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
12991941 reduce34MorphItem.addActionListener(this);
13001942 menu.add("-");
1943
+ menu.add(memoryItem = new MenuItem("Memory Usage"));
1944
+ memoryItem.addActionListener(this);
13011945 menu.add(computeAOItem = new MenuItem("Compute AO"));
13021946 computeAOItem.addActionListener(this);
13031947
....@@ -1306,8 +1950,6 @@
13061950 mirrorItem = menu.add(new MenuItem("Mirror Poses"));
13071951 mirrorItem.addActionListener(this);
13081952 menu.add("-");
1309
- menu.add(memoryItem = new MenuItem("Memory Usage"));
1310
- memoryItem.addActionListener(this);
13111953 menu.add(analyzeItem = new MenuItem("Analyze"));
13121954 analyzeItem.addActionListener(this);
13131955 menu.add(dumpItem = new MenuItem("Print"));
....@@ -1455,6 +2097,30 @@
14552097
14562098 makeSomething(shadow);
14572099 }
2100
+
2101
+ private void ClearUnpinned()
2102
+ {
2103
+ //for (Object3D obj : listUI)
2104
+ for (int i=listUI.size(); --i>=0;)
2105
+ {
2106
+ Object3D obj = listUI.elementAt(i);
2107
+ if (!obj.pinned)
2108
+ {
2109
+ obj.CloseUI();
2110
+ listUI.remove(i);
2111
+ }
2112
+ }
2113
+ }
2114
+
2115
+ private void EditElement(Object3D elem, boolean newWindow)
2116
+ {
2117
+ // if (!(elem instanceof Composite))
2118
+ // newWindow = false;
2119
+ listUI.add(elem);
2120
+ elem.openEditWindow(this, newWindow); //, false);
2121
+ System.out.println("edit : " + elem);
2122
+ elem.editWindow.refreshContents(true); // ? new
2123
+ }
14582124
14592125 /**
14602126 * applyExample
....@@ -1699,7 +2365,7 @@
16992365 {
17002366 ScreenFit();
17012367 } else
1702
- if (source == switchItem)
2368
+ if (source == switchViewItem)
17032369 {
17042370 cVector v1 = new cVector();
17052371 cVector v2 = new cVector();
....@@ -1708,11 +2374,11 @@
17082374 objEditor.cameraView.renderCamera.setAim(v2, v1);
17092375 objEditor.cameraView.repaint();
17102376 } else
1711
- if (source == rectoidItem)
2377
+ if (source == rectoidItem || source == boxButton)
17122378 {
17132379 makeSomething(new Box());
17142380 } else
1715
- if (source == particleItem)
2381
+ if (source == particleItem || source == particlesButton)
17162382 {
17172383 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
17182384 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1791,27 +2457,27 @@
17912457
17922458 makeSomething(obj);
17932459 } else
1794
- if (source == gridItem)
2460
+ if (source == gridItem || source == gridButton)
17952461 {
17962462 makeSomething(new Grid());
17972463 } else
1798
- if (source == ellipsoidItem)
2464
+ if (source == ellipsoidItem || source == sphereButton)
17992465 {
18002466 makeSomething(new Sphere());
18012467 } else
1802
- if (source == coneItem)
2468
+ if (source == coneItem || source == coneButton)
18032469 {
18042470 makeSomething(new Cone());
18052471 } else
1806
- if (source == torusItem)
2472
+ if (source == torusItem || source == torusButton)
18072473 {
18082474 makeSomething(new Torus());
18092475 } else
1810
- if (source == superItem)
2476
+ if (source == superItem || source == superButton)
18112477 {
18122478 makeSomething(new Superellipsoid());
18132479 } else
1814
- if (source == kleinItem)
2480
+ if (source == kleinItem || source == kleinButton)
18152481 {
18162482 makeSomething(new Klein());
18172483 } else
....@@ -1831,7 +2497,7 @@
18312497 {
18322498 makeSomething(new BezierSurface());
18332499 } else
1834
- if (source == overlayItem)
2500
+ if (source == overlayItem || source == overlayButton)
18352501 {
18362502 /*
18372503 Object3D obj = new BezierSurface(5,8);
....@@ -1879,10 +2545,27 @@
18792545 s.setup();
18802546 makeSomething(s);
18812547 } else
1882
- if (source == lightItem)
2548
+ if (source == lightItem || source == lightButton)
18832549 {
18842550 makeSomething(new Light());
18852551 } else
2552
+// if (source == skybox1Button ||
2553
+// source == skybox2Button ||
2554
+// source == skybox3Button ||
2555
+// source == skybox4Button ||
2556
+// source == skybox5Button ||
2557
+// source == skybox6Button ||
2558
+// source == skybox7Button ||
2559
+// source == skybox11Button ||
2560
+// source == skybox12Button ||
2561
+// source == skybox13Button ||
2562
+// source == skybox14Button ||
2563
+// source == skybox15Button ||
2564
+// source == skybox16Button ||
2565
+// source == skybox17Button)
2566
+// {
2567
+// ChangeSkybox(source);
2568
+// } else
18862569 if (source == csgItem)
18872570 {
18882571 group(new CSG());
....@@ -1929,30 +2612,30 @@
19292612
19302613 group(g);
19312614 } else
1932
- if (source == loopItem)
2615
+ if (source == loopItem || source == loopButton)
19332616 {
19342617 Composite csg = new GroupLeaf();
19352618 csg.count = 5;
19362619 group(csg);
1937
- Composite child = new cGroup();
2620
+ Composite child = new cGroup("Branch");
19382621 csg.addChild(child);
19392622 child.addChild(csg);
19402623 } else
19412624 if (source == doubleItem)
19422625 {
1943
- Composite csg = new GroupLeaf();
2626
+ Composite csg = new GroupLeaf("Fork");
19442627 csg.count = 5;
19452628 group(csg);
1946
- Composite child = new cGroup();
2629
+ Composite child = new cGroup("Branch A");
19472630 csg.addChild(child);
19482631 child.addChild(csg);
1949
- child = new cGroup();
2632
+ child = new cGroup("Branch B");
19502633 csg.addChild(child);
19512634 child.addChild(csg);
19522635 } else
19532636 if (source == tripleItem)
19542637 {
1955
- Composite csg = new GroupLeaf();
2638
+ Composite csg = new GroupLeaf("Trident");
19562639 csg.count = 4;
19572640 group(csg);
19582641 Composite child = new cGroup();
....@@ -1968,7 +2651,7 @@
19682651 if (source == computeAOItem)
19692652 {
19702653 Globals.drawMode = CameraPane.OCCLUSION;
1971
- Globals.theRenderer.repaint();
2654
+ cameraView.repaint();
19722655 } else
19732656 if (source == recompileItem)
19742657 {
....@@ -1983,7 +2666,7 @@
19832666 if (source == invariantsItem)
19842667 {
19852668 System.out.println("Invariants:");
1986
- Grafreed.grafreeD.universe.invariants();
2669
+ Grafreed.grafreed.universe.invariants();
19872670 } else
19882671 if (source == memoryItem)
19892672 {
....@@ -2014,17 +2697,40 @@
20142697 {
20152698 ToggleFullScreen();
20162699 } else
2017
- if (source == undoButton)
2700
+ if (source == previousVersionButton)
20182701 {
2019
- Undo();
2702
+ // Go to previous version
2703
+ //if (!Undo())
2704
+ //java.awt.Toolkit.getDefaultToolkit().beep();
2705
+ PreviousVersion();
20202706 } else
2021
- if (source == redoButton)
2707
+ if (source == restoreButton)
20222708 {
2023
- Redo();
2709
+ // Restore current version
2710
+ Restore();
2711
+ //restoreButton.setEnabled(false);
20242712 } else
2025
- if (source == saveButton)
2713
+ if (source == replaceButton)
20262714 {
2027
- Save();
2715
+ // Overwrite current version
2716
+ Replace();
2717
+ //replaceButton.setEnabled(false);
2718
+ } else
2719
+ if (source == nextVersionButton)
2720
+ {
2721
+ // Go to next version
2722
+ NextVersion();
2723
+ } else
2724
+ if (source == saveVersionButton)
2725
+ {
2726
+ // Save a new version
2727
+ if (!Save(true))
2728
+ java.awt.Toolkit.getDefaultToolkit().beep();
2729
+ } else
2730
+ if (source == deleteVersionButton)
2731
+ {
2732
+ // Delete a new version
2733
+ DeleteVersion();
20282734 } else
20292735 if (source == oneStepButton)
20302736 {
....@@ -2033,17 +2739,14 @@
20332739 } else
20342740 if (source == screenfitButton)
20352741 {
2036
- //Reload(lastConverter, lastFilename, true);
20372742 ScreenFit();
20382743 } else
20392744 if (source == screenfitpointButton)
20402745 {
2041
- //Reload(lastConverter, lastFilename, true);
20422746 ScreenFitPoint();
20432747 } else
20442748 if (source == snapobjectButton)
20452749 {
2046
- //Reload(lastConverter, lastFilename, true);
20472750 SnapObject();
20482751 } else
20492752 // if (event.getSource() == recompileButton)
....@@ -2082,11 +2785,11 @@
20822785 } else
20832786 if (source == undoItem)
20842787 {
2085
- Undo();
2788
+ PreviousVersion();
20862789 } else
20872790 if (source == redoItem)
20882791 {
2089
- Redo();
2792
+ NextVersion();
20902793 } else
20912794 if (source == duplicateItem)
20922795 {
....@@ -2407,7 +3110,7 @@
24073110 {
24083111 StepAll();
24093112 } else
2410
- if (source == clearItem) // || event.getSource() == clearButton)
3113
+ if (source == deleteItem) // || event.getSource() == clearButton)
24113114 {
24123115 //int indices[] = jList.getSelectedIndices();
24133116 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2419,9 +3122,9 @@
24193122 {
24203123 ClearSelection(true);
24213124 } else
2422
- if (source == grabItem)
3125
+ if (source == grabItem || source == groupButton)
24233126 {
2424
- group(new cGroup(), true);
3127
+ group(new cGroup(), false); // true);
24253128 } else
24263129 if (source == hideItem)
24273130 {
....@@ -2439,11 +3142,11 @@
24393142 {
24403143 makeSomething(new Camera());
24413144 } else
2442
- if (source == compositeItem)
3145
+ if (source == compositeItem || source == compositeButton)
24433146 {
24443147 group(new Composite());
24453148 } else
2446
- if (source == randomItem)
3149
+ if (source == switchItem || source == switchButton)
24473150 {
24483151 RandomNode random = new RandomNode();
24493152 group(random);
....@@ -2545,7 +3248,7 @@
25453248 {
25463249 group(new cLinker());
25473250 } else
2548
- if (source == textureItem)
3251
+ if (source == textureItem || source == textureButton)
25493252 {
25503253 group(new TextureNode());
25513254 } else
....@@ -2565,17 +3268,30 @@
25653268 {
25663269 CastShadow(2);
25673270 } else
2568
- if (source == ungroupItem)
3271
+ if (source == ungroupItem || source == ungroupButton)
25693272 {
2570
- //ungroup();
3273
+ boolean hasRoot = false;
3274
+
25713275 for (int i=0; i<group.selection.size(); i++)
25723276 {
2573
- Ungroup(group.selection.get(i));
3277
+ if (group.selection.get(i) == group)
3278
+ {
3279
+ hasRoot = true;
3280
+ break;
3281
+ }
25743282 }
25753283
2576
- ClearSelection(false);
2577
-
2578
- refreshContents();
3284
+ if (!hasRoot)
3285
+ {
3286
+ for (int i=0; i<group.selection.size(); i++)
3287
+ {
3288
+ Ungroup(group.selection.get(i));
3289
+ }
3290
+
3291
+ ClearSelection(false);
3292
+
3293
+ refreshContents();
3294
+ }
25793295 } else
25803296 if (source == genUVItem)
25813297 {
....@@ -2876,7 +3592,7 @@
28763592 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28773593 {
28783594 obj = (Object3D)e.nextElement();
2879
- obj.SetBumpTexture(null);
3595
+ obj.ResetBumpTexture();
28803596 }
28813597
28823598 refreshContents();
....@@ -2892,6 +3608,31 @@
28923608
28933609 refreshContents();
28943610 } else
3611
+ if (source == embedTexturesItem)
3612
+ {
3613
+ Object3D obj;
3614
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3615
+ {
3616
+ obj = (Object3D)e.nextElement();
3617
+ obj.EmbedTextures(true);
3618
+ }
3619
+
3620
+ refreshContents();
3621
+ } else
3622
+ if (source == deEmbedTexturesItem)
3623
+ {
3624
+ Object3D obj;
3625
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3626
+ {
3627
+ obj = (Object3D)e.nextElement();
3628
+ obj.EmbedTextures(false);
3629
+ }
3630
+
3631
+ CameraPane.texturepigment.clear();
3632
+ CameraPane.texturebump.clear();
3633
+
3634
+ refreshContents();
3635
+ } else
28953636 if (source == flashSelectionButton)
28963637 {
28973638 CameraPane.flash = true;
....@@ -2903,6 +3644,10 @@
29033644 if (source == twoButton)
29043645 {
29053646 radio.layout = twoButton;
3647
+
3648
+ if (CameraPane.FULLSCREEN)
3649
+ fullscreenLayout = radio.layout;
3650
+
29063651 // bug
29073652 //gridPanel.setDividerLocation(1.0);
29083653 //bigPanel.setDividerLocation(0.0);
....@@ -2958,6 +3703,9 @@
29583703 {
29593704 radio.layout = threeButton;
29603705
3706
+ if (CameraPane.FULLSCREEN)
3707
+ fullscreenLayout = radio.layout;
3708
+
29613709 // bigThree.remove(scenePanel);
29623710 // bigThree.remove(centralPanel);
29633711 // bigThree.remove(XYZPanel);
....@@ -2986,8 +3734,8 @@
29863734 // centralPanel.setVisible(true);
29873735 // XYZPanel.setVisible(true);
29883736 bigThree.ClearUI();
3737
+ bigThree.add(scenePanel);
29893738 bigThree.add(centralPanel);
2990
- bigThree.add(XYZPanel);
29913739 bigThree.FlushUI();
29923740
29933741 cameraView.requestFocusInWindow();
....@@ -2995,6 +3743,9 @@
29953743 if (source == fourButton)
29963744 {
29973745 radio.layout = fourButton;
3746
+
3747
+ if (CameraPane.FULLSCREEN)
3748
+ fullscreenLayout = radio.layout;
29983749
29993750 // bigThree.remove(scenePanel);
30003751 // bigThree.remove(centralPanel);
....@@ -3033,6 +3784,9 @@
30333784 {
30343785 radio.layout = sixButton;
30353786
3787
+ if (CameraPane.FULLSCREEN)
3788
+ fullscreenLayout = radio.layout;
3789
+
30363790 // bigThree.remove(scenePanel);
30373791 // bigThree.remove(centralPanel);
30383792 // bigThree.remove(XYZPanel);
....@@ -3061,8 +3815,8 @@
30613815 // centralPanel.setVisible(true);
30623816 // XYZPanel.setVisible(false);
30633817 bigThree.ClearUI();
3064
- bigThree.add(scenePanel);
30653818 bigThree.add(centralPanel);
3819
+ bigThree.add(scenePanel);
30663820 bigThree.FlushUI();
30673821
30683822 cameraView.requestFocusInWindow();
....@@ -3070,6 +3824,9 @@
30703824 if (source == sevenButton)
30713825 {
30723826 radio.layout = sevenButton;
3827
+
3828
+ if (CameraPane.FULLSCREEN)
3829
+ fullscreenLayout = radio.layout;
30733830
30743831 // bigThree.remove(scenePanel);
30753832 // bigThree.remove(centralPanel);
....@@ -3126,12 +3883,19 @@
31263883 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
31273884 {
31283885 ab = (cRadio)e.nextElement();
3129
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3886
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
31303887 {
3888
+ // Patch to avoid bug with transparency.
3889
+ if (!ab.hadMaterial)
3890
+ {
3891
+ ab.object.material = null;
3892
+ }
3893
+
31313894 buttonGroup.remove(ab);
31323895 radioPanel.remove(ab);
31333896
3134
- ab.GetObject().editWindow = null;
3897
+ //ab.GetObject().editWindow = null;
3898
+ ab.GetObject().manipWindow = null;
31353899 // ab.GetObject().objectUI = null; // ?????????
31363900
31373901 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
....@@ -3144,6 +3908,12 @@
31443908 } else
31453909 if (source == editItem || source == editButton)
31463910 {
3911
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3912
+ {
3913
+ Object3D child = (Object3D)e.nextElement();
3914
+ child.pinned = true;
3915
+ }
3916
+
31473917 EditSelection(false);
31483918 } else
31493919 if (source == uneditButton)
....@@ -3152,9 +3922,10 @@
31523922 {
31533923 Object3D child = (Object3D)e.nextElement();
31543924 if(child.editWindow != null)
3155
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3925
+ child.pinned = false;
31563926 child.CloseUI();
31573927 listUI.remove(child);
3928
+// objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
31583929
31593930 //child.editWindow = null; // ???????????
31603931 }
....@@ -3169,16 +3940,18 @@
31693940 //copy.ClearUI();
31703941 for (Object3D obj : listUI)
31713942 {
3943
+ obj.pinned = false;
31723944 obj.CloseUI();
31733945 }
31743946 listUI.clear();
3947
+ SetPinStates(group.selection.size() > 0);
31753948 refreshContents(true);
31763949 } else
31773950 if (source == allParamsButton)
31783951 {
31793952 assert(copy == group);
31803953
3181
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3954
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
31823955
31833956 for (Object3D obj : listUI)
31843957 {
....@@ -3227,6 +4000,9 @@
32274000 }
32284001
32294002 copy = group;
4003
+
4004
+ SetUndoStates();
4005
+
32304006 //Globals.theRenderer.object = group;
32314007 if(!useclient)
32324008 {
....@@ -3245,6 +4021,7 @@
32454021
32464022 // fix "+" issue
32474023 //group.editWindow = this;
4024
+ group.manipWindow = this;
32484025
32494026 /*
32504027 currentLayout = radio.layout;
....@@ -3252,6 +4029,14 @@
32524029 currentLayout = sevenButton;
32534030 */
32544031 radio.layout.doClick();
4032
+
4033
+ ClearUnpinned();
4034
+
4035
+ //Grafreed.Assert(group != null);
4036
+ //Grafreed.Assert(group.selection != null);
4037
+ SetPinStates(group.selection == null || group.selection.size() > 0);
4038
+ if (group.selection == null || group.selection.size() == 1)
4039
+ EditSelection(false);
32554040 keepparent = group.parent;
32564041 // PARENT = NULL or not???
32574042 //group.parent = null; // ROOT
....@@ -3263,11 +4048,13 @@
32634048 } else if (event.getSource() == editCameraItem)
32644049 {
32654050 cameraView.ProtectCamera();
4051
+ cameraView.requestFocusInWindow();
32664052 cameraView.repaint();
32674053 return;
3268
- } else if (event.getSource() == revertCameraItem)
4054
+ } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton)
32694055 {
32704056 cameraView.RevertCamera();
4057
+ cameraView.requestFocusInWindow();
32714058 cameraView.repaint();
32724059 return;
32734060 // } else if (event.getSource() == textureButton)
....@@ -3844,7 +4631,7 @@
38444631
38454632 try
38464633 {
3847
- texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
4634
+ texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres);
38484635 }
38494636 catch (Exception e)
38504637 {
....@@ -4319,28 +5106,25 @@
43195106 // }
43205107 // }
43215108
4322
- static boolean allparams = true;
4323
-
4324
- static Vector<Object3D> listUI = new Vector<Object3D>();
4325
-
43265109 void EditSelection(boolean newWindow)
43275110 {
5111
+ if (group.selection == null)
5112
+ {
5113
+ EditElement(group, newWindow); // ? new
5114
+ return;
5115
+ }
5116
+
43285117 // aConstraints.gridy = 0;
43295118 for (int i=0; i<group.selection.size(); i++)
43305119 {
43315120 //System.out.println("edit : " + objectPanel.indexOfTab("Material"));
43325121 //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false);
4333
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
5122
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
43345123
43355124 Object3D elem = (Object3D)group.selection.elementAt(i);
43365125 if(elem != group || !newWindow)
43375126 {
4338
- // if (!(elem instanceof Composite))
4339
- // newWindow = false;
4340
- listUI.add(elem);
4341
- elem.openEditWindow(this, newWindow); //, false);
4342
- System.out.println("edit : " + elem);
4343
- elem.editWindow.refreshContents(true); // ? new
5127
+ EditElement(elem, newWindow); // ? new
43445128 }
43455129 }
43465130 }
....@@ -4403,9 +5187,7 @@
44035187
44045188 freezemodel = false;
44055189 }
4406
-
4407
- boolean flashIt = true;
4408
-
5190
+
44095191 public void valueChanged(TreeSelectionEvent e)
44105192 //public boolean handleEvent(Event event)
44115193 {
....@@ -4415,7 +5197,8 @@
44155197 //new Exception().printStackTrace();
44165198
44175199 freezemodel = true;
4418
-
5200
+ ClearUnpinned();
5201
+
44195202 /**/
44205203 //switch (event.id)
44215204 {
....@@ -4448,7 +5231,7 @@
44485231 if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
44495232 // a camera
44505233 {
4451
- if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
5234
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace
44525235 {
44535236 CameraPane.camerachangeframe = 0; // don't refuse it
44545237 Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
....@@ -4457,6 +5240,13 @@
44575240 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
44585241 }
44595242
5243
+ if (tps != null && tps.length == 1)
5244
+ {
5245
+ EditSelection(false);
5246
+ }
5247
+
5248
+ SetPinStates(tps != null && tps.length > 0);
5249
+
44605250 refreshContents();
44615251 //return true;
44625252 }
....@@ -4466,9 +5256,20 @@
44665256 freezemodel = false;
44675257 }
44685258
5259
+ void SetPinStates(boolean enabled)
5260
+ {
5261
+ editButton.setEnabled(enabled);
5262
+ uneditButton.setEnabled(enabled);
5263
+ //unselectButton.setEnabled(enabled);
5264
+ flashSelectionButton.setEnabled(enabled);
5265
+
5266
+ clearPanelButton.setEnabled(!listUI.isEmpty());
5267
+ }
5268
+
44695269 void refreshContents(boolean cp)
44705270 {
4471
- if (!Globals.MOUSEDRAGGED)
5271
+ //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
5272
+ if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
44725273 {
44735274 objEditor.ClearInfo(); // .GetMaterial());
44745275
....@@ -4567,7 +5368,8 @@
45675368
45685369 if (cut)
45695370 {
4570
- Save();
5371
+// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save.
5372
+// Save();
45715373 //int indices[] = jList.getSelectedIndices();
45725374 //for (int i = indices.length - 1; i >= 0; i--)
45735375 //jList.remove(indices[i]);
....@@ -4670,6 +5472,10 @@
46705472
46715473 void paste(boolean expand)
46725474 {
5475
+ if (Globals.REPLACEONMAKE)
5476
+ Save();
5477
+ boolean keep = Globals.REPLACEONMAKE;
5478
+ Globals.REPLACEONMAKE = false;
46735479 // if (GrafreeD.clipboard == null)
46745480 // return;
46755481 boolean first = true;
....@@ -4729,6 +5535,7 @@
47295535 Grafreed.clipboard.get(0).parent = keepparent;
47305536 }
47315537
5538
+ Globals.REPLACEONMAKE = keep;
47325539 ResetModel();
47335540 refreshContents();
47345541 }
....@@ -4864,6 +5671,10 @@
48645671
48655672 void group(Object3D csg, boolean grab)
48665673 {
5674
+ if (Globals.REPLACEONMAKE)
5675
+ Save();
5676
+ boolean keep = Globals.REPLACEONMAKE;
5677
+ Globals.REPLACEONMAKE = false;
48675678 if (//false) // why??
48685679 !group.selection.isEmpty())
48695680 {
....@@ -4977,10 +5788,15 @@
49775788 //node.add(csg);
49785789 //makeSomething(node);
49795790 makeSomething(csg);
5791
+ Globals.REPLACEONMAKE = keep;
49805792 }
49815793
49825794 void Ungroup(Object3D g)
49835795 {
5796
+ if (Globals.REPLACEONMAKE)
5797
+ Save();
5798
+ boolean keep = Globals.REPLACEONMAKE;
5799
+ Globals.REPLACEONMAKE = false;
49845800 if (g instanceof HiddenObject)
49855801 {
49865802 HiddenObject h = (HiddenObject) g;
....@@ -4997,6 +5813,7 @@
49975813 objEditor.makeSomething(g.get(i), false);
49985814 }
49995815 }
5816
+ Globals.REPLACEONMAKE = keep;
50005817 }
50015818
50025819 void ungroup()
....@@ -5285,13 +6102,43 @@
52856102 cButton clearpanelButton;
52866103 cButton unselectButton;
52876104
5288
- cButton minButton;
5289
- cButton maxButton;
5290
- cButton fullButton;
5291
- cButton undoButton;
5292
- cButton redoButton;
5293
- cButton saveButton;
6105
+ cButton restoreCameraButton;
6106
+
52946107 cButton oneStepButton;
6108
+
6109
+ cButton groupButton;
6110
+ cButton ungroupButton;
6111
+ cButton compositeButton;
6112
+ cButton switchButton;
6113
+ cButton loopButton;
6114
+ cButton textureButton;
6115
+
6116
+ cButton skybox1Button;
6117
+ cButton skybox2Button;
6118
+ cButton skybox3Button;
6119
+ cButton skybox4Button;
6120
+ cButton skybox5Button;
6121
+ cButton skybox6Button;
6122
+ cButton skybox7Button;
6123
+
6124
+ cButton skybox11Button;
6125
+ cButton skybox12Button;
6126
+ cButton skybox13Button;
6127
+ cButton skybox14Button;
6128
+ cButton skybox15Button;
6129
+ cButton skybox16Button;
6130
+ cButton skybox17Button;
6131
+
6132
+ cButton gridButton;
6133
+ cButton boxButton;
6134
+ cButton sphereButton;
6135
+ cButton coneButton;
6136
+ cButton torusButton;
6137
+ cButton superButton;
6138
+ cButton kleinButton;
6139
+ cButton particlesButton;
6140
+ cButton overlayButton;
6141
+ cButton lightButton;
52956142
52966143 cButton screenfitButton;
52976144 cButton screenfitpointButton;
....@@ -5313,11 +6160,11 @@
53136160 //JTree jTree;
53146161 private MenuItem lookAtItem;
53156162 private MenuItem lookFromItem;
5316
- private MenuItem switchItem;
6163
+ private MenuItem switchViewItem;
53176164 private MenuItem cutItem;
53186165 private MenuItem undoItem;
53196166 private MenuItem redoItem;
5320
- private MenuItem duplicateItem;
6167
+ private JMenuItem duplicateItem;
53216168 private MenuItem cloneItem;
53226169 private MenuItem cloneSupportItem;
53236170 private MenuItem overwriteGeoItem;
....@@ -5345,7 +6192,7 @@
53456192 private MenuItem pasteLinkItem;
53466193 private MenuItem pasteCloneItem;
53476194 private MenuItem pasteExpandItem;
5348
- private MenuItem clearItem;
6195
+ private MenuItem deleteItem;
53496196 private MenuItem clearAllItem;
53506197 private MenuItem genUVItem;
53516198 private MenuItem genNormalsMESHItem;
....@@ -5405,7 +6252,7 @@
54056252 private MenuItem frontItem;
54066253 private MenuItem cameraItem;
54076254 private MenuItem compositeItem;
5408
- private MenuItem randomItem;
6255
+ private MenuItem switchItem;
54096256 private MenuItem physicsItem;
54106257 private MenuItem frameselectorItem;
54116258 private MenuItem scriptNodeItem;
....@@ -5429,6 +6276,8 @@
54296276 private MenuItem attachBumpItem;
54306277 private MenuItem detachBumpItem;
54316278 private MenuItem pigmentBumpItem;
6279
+ private MenuItem embedTexturesItem;
6280
+ private MenuItem deEmbedTexturesItem;
54326281
54336282 private MenuItem particleItem;
54346283 private MenuItem ragdollItem;
....@@ -5479,5 +6328,5 @@
54796328
54806329 Menu cameraMenu;
54816330 MenuItem editCameraItem;
5482
- MenuItem revertCameraItem;
6331
+ MenuItem restoreCameraItem;
54836332 }