Normand Briere
2019-08-01 29d5516687020263d3ae0454ce81879a3a450af0
GroupEditor.java
....@@ -23,6 +23,302 @@
2323 DragGestureListener, DragSourceListener, DropTargetListener,
2424 ItemListener // ListSelectionListener
2525 {
26
+
27
+ public void AddSkyboxButton(String f, String s, cGridBag row)
28
+ {
29
+ cButton skyboxButton;
30
+ final String path = "cubemaps/" + f + "-skyboxes/" + s;
31
+ row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.NIMBUSLAF));
32
+ //row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF));
33
+ skyboxButton.setToolTipText(s);
34
+ skyboxButton.addActionListener(new ActionListener()
35
+ {
36
+ @Override
37
+ public void actionPerformed(ActionEvent e)
38
+ {
39
+ ChangeSkybox(path);
40
+ }
41
+ });
42
+ }
43
+
44
+ public void AddSkyboxTab0(JTabbedPane skyboxpanel)
45
+ {
46
+ cGridBag tab0 = new cGridBag().setVertical(true);
47
+
48
+ tab0.setName("Urban");
49
+ skyboxpanel.add(tab0);
50
+
51
+ cGridBag row0 = new cGridBag();
52
+ cGridBag row1 = new cGridBag();
53
+ cGridBag row2 = new cGridBag();
54
+ cGridBag row3 = new cGridBag();
55
+ cGridBag row4 = new cGridBag();
56
+ cGridBag row5 = new cGridBag();
57
+ cGridBag row6 = new cGridBag();
58
+
59
+ AddSkyboxButton("default", "rgb", row0);
60
+ //AddSkyboxButton("default", "cornell", row0);
61
+ AddSkyboxButton("penguins", "dust", row0);
62
+ AddSkyboxButton("penguins", "tropic", row0);
63
+ AddSkyboxButton("penguins", "yonder", row0);
64
+
65
+ AddSkyboxButton("default", "uffizi", row1);
66
+ AddSkyboxButton("bridge", "Bridge", row1);
67
+ AddSkyboxButton("bridge", "Bridge2", row1);
68
+ AddSkyboxButton("urban", "GamlaStan2", row1);
69
+
70
+ AddSkyboxButton("urban", "Parliament", row2);
71
+ AddSkyboxButton("urban", "Roundabout", row2);
72
+ AddSkyboxButton("urban", "SaintLazarusChurch", row2);
73
+ AddSkyboxButton("urban", "SaintLazarusChurch2", row2);
74
+
75
+ AddSkyboxButton("urban", "SaintLazarusChurch3", row3);
76
+ AddSkyboxButton("urban", "UnionSquare", row3);
77
+ AddSkyboxButton("urban", "Medborgarplatsen", row3);
78
+ AddSkyboxButton("park", "BerzeliiPark", row3);
79
+
80
+ AddSkyboxButton("park", "Buddha", row4);
81
+ AddSkyboxButton("park", "CNTower2", row4);
82
+ AddSkyboxButton("park", "NiagaraFalls1", row4);
83
+ AddSkyboxButton("park", "NiagaraFalls3", row4);
84
+
85
+ AddSkyboxButton("park", "Park", row5);
86
+ AddSkyboxButton("park", "Pond", row5);
87
+ AddSkyboxButton("park", "Skansen", row5);
88
+ AddSkyboxButton("park", "Skansen2", row5);
89
+
90
+ AddSkyboxButton("park", "Skansen3", row6);
91
+ AddSkyboxButton("park", "Skansen4", row6);
92
+ AddSkyboxButton("park", "Skansen5", row6);
93
+ AddSkyboxButton("persson", "VancouverConventionCentre", row6);
94
+
95
+ tab0.add(row0);
96
+ tab0.add(row1);
97
+ tab0.add(row2);
98
+ tab0.add(row3);
99
+ tab0.add(row4);
100
+ tab0.add(row5);
101
+ tab0.add(row6);
102
+
103
+ for (int i=5; --i>=0;)
104
+ {
105
+ //oe.toolboxPanel.Return();
106
+ //tab0.add(new cGridBag());
107
+ }
108
+ }
109
+
110
+ public void AddSkyboxTab1(JTabbedPane skyboxpanel)
111
+ {
112
+ cGridBag tab0 = new cGridBag().setVertical(true);
113
+
114
+ tab0.setName("Nature");
115
+ skyboxpanel.add(tab0);
116
+
117
+ cGridBag row0 = new cGridBag();
118
+ cGridBag row1 = new cGridBag();
119
+ cGridBag row2 = new cGridBag();
120
+ cGridBag row3 = new cGridBag();
121
+ cGridBag row4 = new cGridBag();
122
+ cGridBag row5 = new cGridBag();
123
+ cGridBag row6 = new cGridBag();
124
+
125
+ AddSkyboxButton("beach", "HeartInTheSand", row0);
126
+ AddSkyboxButton("beach", "LarnacaBeach", row0);
127
+ AddSkyboxButton("beach", "PalmTrees", row0);
128
+ AddSkyboxButton("beach", "Tenerife", row0);
129
+
130
+ AddSkyboxButton("beach", "Tenerife2", row1);
131
+ AddSkyboxButton("beach", "Tenerife3", row1);
132
+ AddSkyboxButton("field", "FishPond", row1);
133
+ AddSkyboxButton("field", "Footballfield", row1);
134
+
135
+ AddSkyboxButton("field", "Meadow", row2);
136
+ AddSkyboxButton("field", "Sorsele", row2);
137
+ AddSkyboxButton("field", "Sorsele2", row2);
138
+ AddSkyboxButton("field", "Sorsele3", row2);
139
+
140
+ AddSkyboxButton("forest", "Brudslojan", row3);
141
+ AddSkyboxButton("forest", "Langholmen2", row3);
142
+ AddSkyboxButton("forest", "Plants", row3);
143
+ AddSkyboxButton("mountain", "Maskonaive", row3);
144
+
145
+ AddSkyboxButton("mountain", "Maskonaive2", row4);
146
+ AddSkyboxButton("mountain", "Maskonaive3", row4);
147
+ AddSkyboxButton("mountain", "Teide", row4);
148
+ AddSkyboxButton("park", "Tantolunden4", row4);
149
+
150
+ AddSkyboxButton("park", "Stairs", row5);
151
+ AddSkyboxButton("default", "skycube", row6);
152
+ AddSkyboxButton("rocky", "Langholmen", row5);
153
+ AddSkyboxButton("rocky", "Skinnarviksberget", row5);
154
+
155
+ AddSkyboxButton("rocky", "Tantolunden6", row5);
156
+ AddSkyboxButton("default", "CloudyHills", row6);
157
+ AddSkyboxButton("daz", "Autumn", row6);
158
+ AddSkyboxButton("daz", "MountainTrail", row6);
159
+ /*
160
+Autumn
161
+Greenlands
162
+MountainTrail
163
+Oasis
164
+TheRock
165
+TopOfTheWorld
166
+Winter
167
+ */
168
+
169
+ tab0.add(row0);
170
+ tab0.add(row1);
171
+ tab0.add(row2);
172
+ tab0.add(row3);
173
+ tab0.add(row4);
174
+ tab0.add(row5);
175
+ tab0.add(row6);
176
+
177
+ for (int i=5; --i>=0;)
178
+ {
179
+ //oe.toolboxPanel.Return();
180
+ //tab0.add(new cGridBag());
181
+ }
182
+ }
183
+
184
+ public void AddSkyboxTab2(JTabbedPane skyboxpanel)
185
+ {
186
+ cGridBag tab0 = new cGridBag().setVertical(true);
187
+
188
+ tab0.setName("Night");
189
+ skyboxpanel.add(tab0);
190
+
191
+ cGridBag row0 = new cGridBag();
192
+ cGridBag row1 = new cGridBag();
193
+ cGridBag row2 = new cGridBag();
194
+ cGridBag row3 = new cGridBag();
195
+ cGridBag row4 = new cGridBag();
196
+ cGridBag row5 = new cGridBag();
197
+ cGridBag row6 = new cGridBag();
198
+
199
+ AddSkyboxButton("night", "NightPath", row0);
200
+ AddSkyboxButton("night", "PondNight", row0);
201
+ AddSkyboxButton("night", "Powerlines", row0);
202
+ AddSkyboxButton("night", "SwedishRoyalCastle", row0);
203
+
204
+ AddSkyboxButton("urban", "CNTower", row1);
205
+ AddSkyboxButton("bridge", "ArstaBridge", row1);
206
+ AddSkyboxButton("rocky", "Riddarfjarden", row1);
207
+ AddSkyboxButton("penguins", "sleepyhollow", row1);
208
+
209
+ AddSkyboxButton("penguins", "kenon_star", row2);
210
+ AddSkyboxButton("persson", "corona", row2);
211
+ AddSkyboxButton("persson", "spaceskybox", row2);
212
+ AddSkyboxButton("indoors", "Vasa", row2);
213
+
214
+ AddSkyboxButton("winter", "Backyard", row3);
215
+ AddSkyboxButton("winter", "Creek", row3);
216
+ AddSkyboxButton("winter", "FootballField3", row3);
217
+ AddSkyboxButton("winter", "Forest", row3);
218
+
219
+ AddSkyboxButton("winter", "HornstullsStrand2", row4);
220
+ AddSkyboxButton("winter", "House", row4);
221
+ AddSkyboxButton("winter", "IceLake", row4);
222
+ AddSkyboxButton("winter", "IceRiver", row4);
223
+
224
+ AddSkyboxButton("winter", "Park3", row5);
225
+ AddSkyboxButton("winter", "PondWinter", row5);
226
+ AddSkyboxButton("winter", "Tantolunden5", row5);
227
+ AddSkyboxButton("winter", "Vindelalven", row5);
228
+
229
+ AddSkyboxButton("daz", "TheRock", row6);
230
+ AddSkyboxButton("daz", "TopOfTheWorld", row6);
231
+ AddSkyboxButton("daz", "Winter", row6);
232
+ AddSkyboxButton("mountain", "Ryfjallet", row6);
233
+
234
+ tab0.add(row0);
235
+ tab0.add(row1);
236
+ tab0.add(row2);
237
+ tab0.add(row3);
238
+ tab0.add(row4);
239
+ tab0.add(row5);
240
+ tab0.add(row6);
241
+
242
+ for (int i=5; --i>=0;)
243
+ {
244
+ //oe.toolboxPanel.Return();
245
+ //tab0.add(new cGridBag());
246
+ }
247
+ }
248
+
249
+ public void AddSkyboxTab3(JTabbedPane skyboxpanel)
250
+ {
251
+ cGridBag tab0 = new cGridBag().setVertical(true);
252
+
253
+ tab0.setName("Others");
254
+ skyboxpanel.add(tab0);
255
+
256
+ cGridBag row0 = new cGridBag();
257
+ cGridBag row1 = new cGridBag();
258
+ cGridBag row2 = new cGridBag();
259
+ cGridBag row3 = new cGridBag();
260
+ cGridBag row4 = new cGridBag();
261
+ cGridBag row5 = new cGridBag();
262
+ cGridBag row6 = new cGridBag();
263
+
264
+ AddSkyboxButton("mayhem", "afterrain", row0);
265
+ AddSkyboxButton("mayhem", "aqua4", row0);
266
+ AddSkyboxButton("mayhem", "aqua9", row0);
267
+ AddSkyboxButton("mayhem", "flame", row0);
268
+
269
+ AddSkyboxButton("mayhem", "h2s", row1);
270
+ AddSkyboxButton("mayhem", "prehistoric", row1);
271
+ AddSkyboxButton("mayhem", "scorched", row1);
272
+ AddSkyboxButton("penguins", "desertdawn", row1);
273
+
274
+ AddSkyboxButton("persson", "Citadella", row2);
275
+ AddSkyboxButton("persson", "Citadella2", row2);
276
+ AddSkyboxButton("persson", "clouds1", row2);
277
+ AddSkyboxButton("penguins", "wrath", row2);
278
+
279
+ AddSkyboxButton("persson", "FishermansBastion", row3);
280
+ AddSkyboxButton("persson", "HeroesSquare", row3);
281
+ AddSkyboxButton("indoors", "DallasW", row3);
282
+ AddSkyboxButton("indoors", "MarriottMadisonWest", row3);
283
+
284
+ AddSkyboxButton("persson", "LancellottiChapel", row4);
285
+ AddSkyboxButton("persson", "PereaBeach1", row4);
286
+ AddSkyboxButton("persson", "PereaBeach2", row4);
287
+ AddSkyboxButton("persson", "redeclipse", row4);
288
+
289
+ AddSkyboxButton("daz", "Greenlands", row5);
290
+ AddSkyboxButton("daz", "Oasis", row5);
291
+ AddSkyboxButton("elyvisions", "arch3", row5);
292
+ AddSkyboxButton("elyvisions", "calm_sea", row5);
293
+
294
+ AddSkyboxButton("elyvisions", "rainbow", row6);
295
+ AddSkyboxButton("elyvisions", "distant_sunset", row6);
296
+ AddSkyboxButton("elyvisions", "heaven", row6);
297
+ AddSkyboxButton("elyvisions", "hot", row6);
298
+
299
+ tab0.add(row0);
300
+ tab0.add(row1);
301
+ tab0.add(row2);
302
+ tab0.add(row3);
303
+ tab0.add(row4);
304
+ tab0.add(row5);
305
+ tab0.add(row6);
306
+
307
+ for (int i=5; --i>=0;)
308
+ {
309
+ //oe.toolboxPanel.Return();
310
+ //tab0.add(new cGridBag());
311
+ }
312
+ }
313
+
314
+ public void ChangeSkybox(String name)
315
+ {
316
+ //cameraView.envyoff = false;
317
+ group.skyboxname = name;
318
+ group.skyboxext = "jpg";
319
+ cameraView.repaint();
320
+ }
321
+
26322 //ObjEditor objEditor;
27323 public void closeUI2()
28324 {
....@@ -60,6 +356,12 @@
60356 this.copy = this.group = group;
61357 //selectees = this.group.selectees;
62358
359
+ if (copy.versions == null)
360
+ {
361
+ copy.versions = new byte[100][];
362
+ copy.versionindex = -1;
363
+ }
364
+
63365 if(ui)
64366 SetupUI(objEditor);
65367 }
....@@ -80,10 +382,22 @@
80382 SetupViews(objEditor);
81383
82384 ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true);
385
+
386
+ if (copy.versions == null)
387
+ {
388
+ copy.versions = new byte[100][];
389
+ copy.versionindex = -1;
390
+
391
+ Save(true);
392
+ }
83393 }
84394
85395 void CloneSelection(boolean supports)
86396 {
397
+ if (Globals.REPLACEONMAKE)
398
+ Save();
399
+ boolean keep = Globals.REPLACEONMAKE;
400
+ Globals.REPLACEONMAKE = false;
87401 // Object3D keep = GrafreeD.clipboard;
88402 //Object3D obj;
89403 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -94,6 +408,7 @@
94408
95409 makeSomething(clone, i==group.selection.size()-1);
96410 }
411
+ Globals.REPLACEONMAKE = keep;
97412 }
98413
99414 void CloneClipboard(boolean supports)
....@@ -150,6 +465,8 @@
150465
151466 void SetupMenu2(GroupEditor oe)
152467 {
468
+ oe.jTree = new cTree();
469
+
153470 Menu menu;
154471 oe.menuBar.add(menu = new Menu("Edit"));
155472 //editItem = menu.add(new MenuItem("Edit"));
....@@ -160,7 +477,7 @@
160477 // redoItem = menu.add(new MenuItem("Redo"));
161478 // redoItem.addActionListener(this);
162479 // menu.add("-");
163
- duplicateItem = menu.add(new MenuItem("Duplicate"));
480
+ duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate"));
164481 duplicateItem.addActionListener(this);
165482 cloneItem = menu.add(new MenuItem("Clone"));
166483 cloneItem.addActionListener(this);
....@@ -176,7 +493,6 @@
176493 copyItem.addActionListener(this);
177494 pasteItem = menu.add(new MenuItem("Paste"));
178495 pasteItem.addActionListener(this);
179
- menu.add("-");
180496
181497 menu.add("-");
182498 pasteIntoItem = menu.add(new MenuItem("Paste into"));
....@@ -188,8 +504,8 @@
188504 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
189505 // pasteExpandItem.addActionListener(this);
190506 menu.add("-");
191
- clearItem = menu.add(new MenuItem("Clear"));
192
- clearItem.addActionListener(this);
507
+ deleteItem = menu.add(new MenuItem("Delete"));
508
+ deleteItem.addActionListener(this);
193509
194510 if (Globals.ADVANCED)
195511 {
....@@ -203,23 +519,23 @@
203519 //zBufferItem.addActionListener(this);
204520 //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
205521 //normalLensItem.addActionListener(this);
206
- cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint"));
207
- revertCameraItem.addActionListener(this);
522
+ cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint"));
523
+ restoreCameraItem.addActionListener(this);
208524
209
- cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
210
- toggleFullScreenItem.addItemListener(this);
211
- toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
212
- cameraMenu.add("-");
525
+// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
526
+// toggleFullScreenItem.addItemListener(this);
527
+// toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
528
+// cameraMenu.add("-");
529
+//
530
+// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
531
+// toggleTextureItem.addItemListener(this);
532
+// toggleTextureItem.setState(CameraPane.textureon);
533
+//
534
+// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
535
+// toggleSwitchItem.addItemListener(this);
536
+// toggleSwitchItem.setState(CameraPane.SWITCH);
213537
214
- cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
215
- toggleTextureItem.addItemListener(this);
216
- toggleTextureItem.setState(CameraPane.textureon);
217
-
218
- cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
219
- toggleSwitchItem.addItemListener(this);
220
- toggleSwitchItem.setState(CameraPane.SWITCH);
221
-
222
- cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
538
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles"));
223539 toggleHandleItem.addItemListener(this);
224540 toggleHandleItem.setState(CameraPane.HANDLES);
225541
....@@ -246,7 +562,7 @@
246562
247563 cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
248564 toggleDebugItem.addItemListener(this);
249
- toggleDebugItem.setState(CameraPane.DEBUG);
565
+ toggleDebugItem.setState(Globals.DEBUG);
250566
251567 cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
252568 toggleFrustumItem.addItemListener(this);
....@@ -274,7 +590,7 @@
274590 {
275591 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
276592 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
277
- //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
593
+ //cameraMenu.add(switchViewItem = new MenuItem("Reverse View"));
278594 editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
279595 oe.cameraMenu.add("-");
280596 openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
....@@ -282,7 +598,7 @@
282598 editLeafItem.addActionListener(this);
283599 lookAtItem.addActionListener(this);
284600 //lookFromItem.addActinoListener(this);
285
- //switchItem.addActionListener(this);
601
+ //switchViewItem.addActionListener(this);
286602 }
287603
288604 oe.menuBar.add(menu = new Menu("Setting"));
....@@ -327,21 +643,29 @@
327643 }
328644
329645 oe.menuBar.add(menu = new Menu("Group"));
330
- grabItem = menu.add(new MenuItem("Grab"));
331
- grabItem.addActionListener(this);
646
+// grabItem = menu.add(new MenuItem("Grab"));
647
+// grabItem.addActionListener(this);
332648 backItem = menu.add(new MenuItem("Back"));
333649 backItem.addActionListener(this);
334650 frontItem = menu.add(new MenuItem("Front"));
335651 frontItem.addActionListener(this);
336
- compositeItem = menu.add(new MenuItem("Composite"));
337
- compositeItem.addActionListener(this);
652
+// compositeItem = menu.add(new MenuItem("Composite"));
653
+// compositeItem.addActionListener(this);
654
+
655
+ if (Globals.ADVANCED)
656
+ {
338657 hideItem = menu.add(new MenuItem("Hidden Group"));
339658 hideItem.addActionListener(this);
659
+ }
340660 ungroupItem = menu.add(new MenuItem("Ungroup"));
341661 ungroupItem.addActionListener(this);
342
- menu.add("-");
343
- randomItem = menu.add(new MenuItem("Switch node"));
344
- randomItem.addActionListener(this);
662
+
663
+// menu.add("-");
664
+//
665
+// switchItem = menu.add(new MenuItem("Switch node"));
666
+// switchItem.addActionListener(this);
667
+ if (Globals.ADVANCED)
668
+ {
345669 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
346670 switchGeoItem.addActionListener(this);
347671 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
....@@ -349,8 +673,6 @@
349673 morphItem = menu.add(new MenuItem("Morph Group"));
350674 morphItem.addActionListener(this);
351675
352
- if (Globals.ADVANCED)
353
- {
354676 menu.add("-");
355677 physicsItem = menu.add(new MenuItem("Physics"));
356678 physicsItem.addActionListener(this);
....@@ -358,30 +680,29 @@
358680 frameselectorItem.addActionListener(this);
359681 scriptNodeItem = menu.add(new MenuItem("Script Node"));
360682 scriptNodeItem.addActionListener(this);
361
- cameraItem = menu.add(new MenuItem("Camera"));
362
- cameraItem.addActionListener(this);
363683 }
364684
365685 oe.menuBar.add(menu = new Menu("Object"));
366
- textureItem = menu.add(new MenuItem("Texture"));
367
- textureItem.addActionListener(this);
686
+// textureItem = menu.add(new MenuItem("Texture"));
687
+// textureItem.addActionListener(this);
368688 billboardItem = menu.add(new MenuItem("Billboard"));
369689 billboardItem.addActionListener(this);
370690 csgItem = menu.add(new MenuItem("CSG"));
371691 csgItem.addActionListener(this);
372
- shadowXItem = menu.add(new MenuItem("Shadow X"));
692
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
373693 shadowXItem.addActionListener(this);
374
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
694
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
375695 shadowYItem.addActionListener(this);
376
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
696
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
377697 shadowZItem.addActionListener(this);
698
+ attributeItem = menu.add(new MenuItem("Attribute"));
699
+ attributeItem.addActionListener(this);
700
+
378701 if (Globals.ADVANCED)
379702 {
380703 menu.add("-");
381704 linkerItem = menu.add(new MenuItem("Linker"));
382705 linkerItem.addActionListener(this);
383
- attributeItem = menu.add(new MenuItem("Attribute"));
384
- attributeItem.addActionListener(this);
385706 templateItem = menu.add(new MenuItem("Template"));
386707 templateItem.addActionListener(this);
387708 pointflowItem = menu.add(new MenuItem("Point Flow"));
....@@ -410,7 +731,7 @@
410731 genNormalsMESHItem.addActionListener(this);
411732 if (Globals.ADVANCED)
412733 {
413
- genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
734
+ genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals"));
414735 genNormalsMINEItem.addActionListener(this);
415736 }
416737 stripifyItem = menu.add(new MenuItem("Stripify"));
....@@ -470,6 +791,14 @@
470791 markleavesItem.addActionListener(this);
471792 unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
472793 unmarkleavesItem.addActionListener(this);
794
+ rewindleavesItem = menu.add(new MenuItem("Rewind Leaves"));
795
+ rewindleavesItem.addActionListener(this);
796
+ unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves"));
797
+ unrewindleavesItem.addActionListener(this);
798
+ randomleavesItem = menu.add(new MenuItem("Random Leaves"));
799
+ randomleavesItem.addActionListener(this);
800
+ unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves"));
801
+ unrandomleavesItem.addActionListener(this);
473802 menu.add("-");
474803 flipVItem = menu.add(new MenuItem("Flip V"));
475804 flipVItem.addActionListener(this);
....@@ -495,10 +824,15 @@
495824 attachBumpItem.addActionListener(this);
496825 pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump"));
497826 pigmentBumpItem.addActionListener(this);
827
+ //embedTexturesItem
498828 detachPigmentItem = menu.add(new MenuItem("Detach Pigment"));
499829 detachPigmentItem.addActionListener(this);
500830 detachBumpItem = menu.add(new MenuItem("Detach Bump"));
501831 detachBumpItem.addActionListener(this);
832
+ embedTexturesItem = menu.add(new MenuItem("Embed Textures"));
833
+ embedTexturesItem.addActionListener(this);
834
+ deEmbedTexturesItem = menu.add(new MenuItem("De-embed Textures"));
835
+ deEmbedTexturesItem.addActionListener(this);
502836 menu.add("-");
503837 sortbysizeItem = menu.add(new MenuItem("Sort by size"));
504838 sortbysizeItem.addActionListener(this);
....@@ -525,8 +859,21 @@
525859 buildToolsMenu(menu);
526860 }
527861
862
+
528863 void SetupUI2(ObjEditor oe)
529864 {
865
+ // June 2019
866
+ if (oe == null)
867
+ {
868
+ //super.SetupUI2(this);
869
+ //return;
870
+ }
871
+
872
+ if (copy != group)
873
+ {
874
+ //super.SetupUI2(this);
875
+ }
876
+
530877 //new Exception().printStackTrace();
531878
532879 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -555,39 +902,79 @@
555902 oe.radioPanel.add(dummyButton);
556903 oe.buttonGroup.add(dummyButton);
557904 */
905
+ cGridBag copyOptionsPanel = new cGridBag();
906
+
907
+ copyOptionsPanel.preferredHeight = 2;
908
+
558909 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
559910
560
- oe.toolbarPanel.add(undoButton = new cButton("Undo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
561
- undoButton.setToolTipText("Undo changes");
562
- undoButton.addActionListener(this);
911
+ //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
912
+ //minButton.setToolTipText("Minimize window");
913
+ //minButton.addActionListener(this);
563914
564
- oe.toolbarPanel.add(redoButton = new cButton("Redo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
565
- redoButton.setToolTipText("Redo changes");
566
- redoButton.addActionListener(this);
915
+ if (Globals.ADVANCED)
916
+ {
917
+ oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
918
+ maxButton.setToolTipText("Maximize window");
919
+ maxButton.addActionListener(this);
920
+ }
567921
568
- oe.toolbarPanel.add(saveButton = new cButton("Save", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
569
- saveButton.setToolTipText("Save changes");
922
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
923
+ fullButton.setToolTipText("Full-screen window");
924
+ fullButton.addActionListener(this);
925
+
926
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
927
+ screenfitButton.setToolTipText("Screen fit");
928
+ screenfitButton.addActionListener(this);
929
+
930
+ oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
931
+ restoreCameraButton.setToolTipText("Restore viewpoint");
932
+ restoreCameraButton.addActionListener(this);
933
+
934
+ copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
935
+ saveButton.setToolTipText("New version");
570936 saveButton.addActionListener(this);
937
+
938
+ copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
939
+ undoButton.setToolTipText("Previous version");
940
+ undoButton.addActionListener(this);
941
+ undoButton.setEnabled(false);
571942
572
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
943
+ cGridBag updown = new cGridBag().setVertical(true);
944
+ updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
945
+ restoreButton.setToolTipText("Restore current");
946
+ restoreButton.addActionListener(this);
947
+ restoreButton.setEnabled(false);
948
+
949
+ updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
950
+ replaceButton.setToolTipText("Replace current");
951
+ replaceButton.addActionListener(this);
952
+ replaceButton.setEnabled(false);
953
+
954
+ copyOptionsPanel.add(updown);
955
+
956
+ copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
957
+ redoButton.setToolTipText("Next version");
958
+ redoButton.addActionListener(this);
959
+ redoButton.setEnabled(false);
960
+
961
+ oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
573962 liveCB.setToolTipText("Enable animation");
574963 liveCB.addItemListener(this);
575964
576
- oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
965
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
577966 oneStepButton.setToolTipText("Animate one step forward");
578967 oneStepButton.addActionListener(this);
579968
580
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
969
+ oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
581970 fastCB.setToolTipText("Fast mode");
582971 fastCB.addItemListener(this);
583972
584
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
585
- trackCB.setToolTipText("Enable tracking");
586
- trackCB.addItemListener(this);
587
-
588
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
589
- screenfitButton.setToolTipText("Screen fit");
590
- screenfitButton.addActionListener(this);
973
+ //oe.toolboxPanel.Return();
974
+
975
+// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
976
+// trackCB.setToolTipText("Enable tracking");
977
+// trackCB.addItemListener(this);
591978
592979 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
593980 // screenfitpointButton.addActionListener(this);
....@@ -597,67 +984,156 @@
597984 oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
598985 snapobjectButton.addActionListener(this);
599986 snapobjectButton.setToolTipText("Snap Object");
987
+
988
+ oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
989
+ fourButton.addActionListener(this);
990
+ fourButton.setToolTipText("Show control panel only");
600991 }
601992
602
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
603
- flashSelectionButton.setToolTipText("Show selection");
604
- flashSelectionButton.addActionListener(this);
993
+ //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
605994
606
- oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
607
-
608
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
609
- twoButton.setToolTipText("Show center view only");
995
+ oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
996
+ twoButton.setToolTipText("Show 3D view only");
610997 twoButton.addActionListener(this);
611
- oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
612
- fourButton.addActionListener(this);
613
- fourButton.setToolTipText("Show left panel only");
614
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
615
- sixButton.setToolTipText("2-column layout left");
616
- sixButton.addActionListener(this);
617
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
618
- threeButton.setToolTipText("2-column layout right");
998
+ this.fullscreenLayout = twoButton;
999
+
1000
+ oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1001
+ threeButton.setToolTipText("Show controls and 3D view");
6191002 threeButton.addActionListener(this);
620
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
621
- sevenButton.setToolTipText("3-column layout");
622
- sevenButton.addActionListener(this);
1003
+ oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1004
+ sixButton.setToolTipText("Show 3D view and controls");
1005
+ sixButton.addActionListener(this);
1006
+// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1007
+// sevenButton.setToolTipText("3-column layout");
1008
+// sevenButton.addActionListener(this);
6231009 //
6241010
625
- oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
626
- rootButton.setToolTipText("Edit selection in new tab");
1011
+ oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1012
+ rootButton.setToolTipText("Open selection in new tab");
6271013 rootButton.addActionListener(this);
6281014
629
- oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1015
+ oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
6301016 closeButton.setToolTipText("Close tab");
6311017 closeButton.addActionListener(this);
6321018 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
6331019 //clearButton.addActionListener(this);
634
-
635
- cGridBag commandsPanel = new cGridBag();
1020
+
1021
+ cGridBag row1 = new cGridBag();
6361022
637
- commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
638
- editButton.setToolTipText("Edit selection");
1023
+ // INSERT
1024
+ row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1025
+ gridButton.setToolTipText("Create grid");
1026
+ gridButton.addActionListener(this);
1027
+
1028
+ row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1029
+ boxButton.setToolTipText("Create box");
1030
+ boxButton.addActionListener(this);
1031
+
1032
+ row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1033
+ sphereButton.setToolTipText("Create sphere");
1034
+ sphereButton.addActionListener(this);
1035
+
1036
+ row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1037
+ coneButton.setToolTipText("Create cone");
1038
+ coneButton.addActionListener(this);
1039
+
1040
+ row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1041
+ torusButton.setToolTipText("Create torus");
1042
+ torusButton.addActionListener(this);
1043
+
1044
+ row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1045
+ superButton.setToolTipText("Create superellipsoid");
1046
+ superButton.addActionListener(this);
1047
+
1048
+ if (Globals.ADVANCED)
1049
+ {
1050
+ oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1051
+ kleinButton.setToolTipText("Create Klein bottle");
1052
+ kleinButton.addActionListener(this);
1053
+ }
1054
+
1055
+ row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1056
+ particlesButton.setToolTipText("Create particle system");
1057
+ particlesButton.addActionListener(this);
1058
+
1059
+ oe.toolboxPanel.add(row1);
1060
+
1061
+ cGridBag row2 = new cGridBag();
1062
+
1063
+ row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1064
+ groupButton.setToolTipText("Create group");
1065
+ groupButton.addActionListener(this);
1066
+
1067
+ row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1068
+ compositeButton.setToolTipText("Create composite");
1069
+ compositeButton.addActionListener(this);
1070
+
1071
+ row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1072
+ switchButton.setToolTipText("Create item switcher");
1073
+ switchButton.addActionListener(this);
1074
+
1075
+ row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1076
+ loopButton.setToolTipText("Create loop");
1077
+ loopButton.addActionListener(this);
1078
+
1079
+ row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1080
+ textureButton.setToolTipText("Create texture");
1081
+ textureButton.addActionListener(this);
1082
+
1083
+ row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1084
+ overlayButton.setToolTipText("Create overlay");
1085
+ overlayButton.addActionListener(this);
1086
+
1087
+ row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1088
+ lightButton.setToolTipText("Create light");
1089
+ lightButton.addActionListener(this);
1090
+
1091
+ oe.toolboxPanel.add(row2);
1092
+
1093
+ // ENVYMAPS
1094
+ cGridBag skyboxpane = new cGridBag();
1095
+ skyboxpane.preferredHeight = 100;
1096
+
1097
+ oe.toolboxPanel.add(skyboxpane);
1098
+
1099
+ JTabbedPane skyboxpanel = new JTabbedPane();
1100
+ skyboxpane.add(skyboxpanel);
1101
+
1102
+ AddSkyboxTab0(skyboxpanel);
1103
+ AddSkyboxTab1(skyboxpanel);
1104
+ AddSkyboxTab2(skyboxpanel);
1105
+ AddSkyboxTab3(skyboxpanel);
1106
+
1107
+ // EDIT panel
1108
+ editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1109
+ editButton.setToolTipText("Pin selection controls");
6391110 editButton.addActionListener(this);
6401111
641
- commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
642
- uneditButton.setToolTipText("Unedit selection");
1112
+ editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1113
+ uneditButton.setToolTipText("Remove selection controls");
6431114 uneditButton.addActionListener(this);
6441115
645
- commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
646
- allParamsButton.setToolTipText("Edit all params");
1116
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
1117
+ allParamsButton.setToolTipText("Show all controle");
6471118 allParamsButton.addActionListener(this);
6481119
649
- commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1120
+ editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
6501121 clearPanelButton.setToolTipText("Clear edit panel");
6511122 clearPanelButton.addActionListener(this);
6521123
653
- commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1124
+ editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
6541125 unselectButton.setToolTipText("Unselect");
6551126 unselectButton.addActionListener(this);
6561127
657
- commandsPanel.preferredHeight = 1;
1128
+ editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1129
+ flashSelectionButton.setToolTipText("Highlight selection");
1130
+ flashSelectionButton.addActionListener(this);
6581131
659
- oe.treePanel.add(commandsPanel);
660
- oe.treePanel.Return();
1132
+ editCommandsPanel.preferredHeight = 1;
1133
+
1134
+ SetPinStates(false);
1135
+// oe.treePanel.add(commandsPanel);
1136
+// oe.treePanel.Return();
6611137
6621138 // oe.aConstraints.gridx += 1;
6631139 // oe.aConstraints.weighty = 0;
....@@ -674,32 +1150,20 @@
6741150
6751151 JScrollPane jSP;
6761152 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
677
- jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
1153
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
6781154 ResetModel();
6791155
6801156 oe.treePanel.add(jSPPanel);
6811157 oe.treePanel.Return();
6821158
683
- cGridBag copyOptionsPanel = new cGridBag();
684
-
685
- copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
686
- colorCB.setToolTipText("Copy color when dropped");
687
- colorCB.addItemListener(this);
688
-
689
- copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
690
- materialCB.setToolTipText("Copy material when dropped");
691
- materialCB.addItemListener(this);
692
-
693
- copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
694
- textureCB.setToolTipText("Copy texture when dropped");
695
- textureCB.addItemListener(this);
696
-
697
- copyOptionsPanel.preferredHeight = 1;
6981159 oe.treePanel.add(copyOptionsPanel);
6991160 oe.treePanel.Return();
1161
+ cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
1162
+ versionSlider = (cNumberSlider)sliderPane.getComponent(1);
1163
+ sliderPane.preferredHeight = 1;
7001164
701
-// mainPanel.setDividerLocation(0.5); //1.0);
702
-// mainPanel.setResizeWeight(0.5);
1165
+// mainPanel.setDividerLocation(0.1); //1.0);
1166
+ mainPanel.setResizeWeight(0.4);
7031167
7041168 //jList.addListSelectionListener(this);
7051169 oe.jTree.addTreeSelectionListener(this);
....@@ -707,7 +1171,7 @@
7071171 //jTree.setEditable(true);
7081172 oe.jTree.setDragEnabled(true);
7091173 //jTree.setPreferredSize(new Dimension(10,10));
710
- jSP.setPreferredSize(new Dimension(100,200));
1174
+ //jSP.setPreferredSize(new Dimension(100,200));
7111175
7121176 oe.jTree.setCellRenderer(new cTreeModel.Renderer());
7131177
....@@ -719,29 +1183,49 @@
7191183 dgr.addDragGestureListener(this);
7201184 }catch(Exception e) {}
7211185 */
722
- radio.layout = sevenButton;
1186
+ radio.layout = sixButton; // sevenButton;
7231187 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
7241188 }
7251189
7261190 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
7271191 {
1192
+ panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
1193
+ colorCB.setToolTipText("Copy color when dropped");
1194
+ colorCB.addItemListener(this);
1195
+
1196
+ panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
1197
+ materialCB.setToolTipText("Copy material when dropped");
1198
+ materialCB.addItemListener(this);
1199
+
1200
+ panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
1201
+ textureCB.setToolTipText("Copy texture when dropped");
1202
+ textureCB.addItemListener(this);
1203
+
1204
+ panel.Return();
1205
+
7281206 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
7291207 boxCB.setToolTipText("Display bounding boxes");
7301208 boxCB.addItemListener(this);
7311209
7321210 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
733
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
1211
+ zoomBoxCB.setToolTipText("Display only for wheel");
7341212 zoomBoxCB.addItemListener(this);
7351213
7361214 if (true) // Globals.ADVANCED)
7371215 {
738
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
739
- supportCB.setToolTipText("Enable rigging");
740
- supportCB.addItemListener(this);
1216
+// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
1217
+// supportCB.setToolTipText("Enable rigging");
1218
+// supportCB.addItemListener(this);
1219
+
1220
+ panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints);
1221
+ freezeCB.setToolTipText("Fast moving camera");
1222
+ freezeCB.addItemListener(this);
7411223
7421224 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
7431225 // localCB.addItemListener(this);
7441226
1227
+ panel.Return();
1228
+
7451229 panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
7461230 crowdCB.setToolTipText("Used for crowds");
7471231 crowdCB.addItemListener(this);
....@@ -750,14 +1234,19 @@
7501234 smoothCB.setToolTipText("Snapping delay");
7511235 smoothCB.addItemListener(this);
7521236
753
- panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
754
- slowCB.setToolTipText("Smooth interpolation");
755
- slowCB.addItemListener(this);
1237
+// panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
1238
+// slowCB.setToolTipText("Smooth interpolation");
1239
+// slowCB.addItemListener(this);
1240
+ panel.add(minshaderCB = new cCheckBox("Min shader", Globals.MINSHADER)); //, constraints);
1241
+ minshaderCB.setToolTipText("Minimal fast shader");
1242
+ minshaderCB.addItemListener(this);
7561243
7571244 // constraints.gridy += 1;
7581245 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
7591246 // speakerMocapCB.addItemListener(this);
7601247
1248
+ panel.Return();
1249
+
7611250 if (false)
7621251 {
7631252 // handled in scripts
....@@ -772,34 +1261,74 @@
7721261 //constraints.gridy += 1;
7731262 panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
7741263 smoothfocusCB.addItemListener(this);
1264
+ panel.Return();
7751265 }
7761266
7771267 //constraints.gridx += 1;
7781268 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
7791269 // debugCB.addItemListener(this);
7801270
1271
+ panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
1272
+ trackCB.setToolTipText("Enable tracking target");
1273
+ trackCB.addItemListener(this);
1274
+
7811275 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
1276
+ oeilCB.setToolTipText("Move camera when tracking");
7821277 oeilCB.addItemListener(this);
7831278
1279
+ panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
1280
+ shadowCB.setToolTipText("When live compute shadows");
1281
+ shadowCB.addItemListener(this);
1282
+
1283
+ panel.Return();
1284
+ panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints);
1285
+ toggleTextureCB.setToolTipText("Load textures");
1286
+ toggleTextureCB.addItemListener(this);
1287
+
1288
+ panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints);
1289
+ toggleSwitchCB.setToolTipText("Choose a single item");
1290
+ toggleSwitchCB.addItemListener(this);
1291
+
1292
+ panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints);
1293
+ autokeepCB.setToolTipText("On structure change");
1294
+ autokeepCB.addItemListener(this);
1295
+
1296
+ panel.Return();
1297
+ if (Globals.ADVANCED)
1298
+ {
7841299 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
7851300 lookAtCB.setToolTipText("Look-at target");
7861301 lookAtCB.addItemListener(this);
1302
+ }
7871303
7881304 }
7891305
7901306 cGridBag fill = new cGridBag();
791
-
7921307 fill.preferredHeight = 200;
1308
+ cGridBag fill2 = new cGridBag();
1309
+ fill2.preferredHeight = 200;
1310
+ cGridBag fill3 = new cGridBag();
1311
+ fill3.preferredHeight = 200;
7931312
7941313 panel.add(fill);
1314
+ panel.add(fill2);
1315
+ panel.add(fill3);
7951316
7961317 }
7971318
7981319 void EditObject(Object3D obj)
7991320 {
8001321 cRadio radioButton = new cRadio(obj.name);
1322
+
1323
+ // June 2019. Patch to avoid bug with transparency.
1324
+ radioButton.hadMaterial = obj.material != null;
1325
+ if (!radioButton.hadMaterial)
1326
+ {
1327
+ obj.material = new cMaterial();
1328
+ }
1329
+
8011330 radioButton.SetObject(obj);
802
- radioButton.layout = sevenButton;
1331
+ radioButton.layout = sixButton; // sevenButton;
8031332 radioButton.SetCamera(cameraView.renderCamera, false);
8041333 radioButton.addActionListener(this);
8051334 radioPanel.add(radioButton);
....@@ -809,6 +1338,8 @@
8091338
8101339 void SetupViews(ObjEditor oe)
8111340 {
1341
+ theFrame = this;
1342
+
8121343 oe.SetupViews();
8131344
8141345 System.out.println("SetupViews");
....@@ -817,23 +1348,30 @@
8171348 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
8181349 }
8191350
820
- JCheckBox liveCB;
821
- JCheckBox supportCB;
822
- JCheckBox localCB;
823
- JCheckBox crowdCB;
824
- JCheckBox smoothCB;
825
- JCheckBox fastCB;
826
- JCheckBox slowCB;
827
- JCheckBox boxCB;
828
- JCheckBox zoomBoxCB;
829
- JCheckBox trackCB;
830
- JCheckBox smoothfocusCB;
1351
+ cToggleButton liveCB;
1352
+ cCheckBox supportCB;
1353
+ cCheckBox localCB;
1354
+ cCheckBox crowdCB;
1355
+ cCheckBox smoothCB;
1356
+ cCheckBox minshaderCB;
1357
+
1358
+ cToggleButton fastCB;
1359
+ cCheckBox slowCB;
1360
+ cCheckBox boxCB;
1361
+ cCheckBox zoomBoxCB;
1362
+ cCheckBox freezeCB;
1363
+ //cToggleButton trackCB;
1364
+ cCheckBox trackCB;
1365
+ cCheckBox smoothfocusCB;
8311366 // JCheckBox speakerMocapCB;
832
- JCheckBox speakerCameraCB;
833
- JCheckBox speakerFocusCB;
834
- JCheckBox debugCB;
835
- JCheckBox oeilCB;
836
- JCheckBox lookAtCB;
1367
+ cCheckBox speakerCameraCB;
1368
+ cCheckBox speakerFocusCB;
1369
+ cCheckBox debugCB;
1370
+
1371
+ cCheckBox oeilCB;
1372
+ cCheckBox shadowCB;
1373
+ cCheckBox autokeepCB;
1374
+ cCheckBox lookAtCB;
8371375
8381376 // static int COLOR = 1;
8391377 // static int MATERIAL = 2;
....@@ -841,9 +1379,9 @@
8411379
8421380 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
8431381
844
- JCheckBox colorCB;
845
- JCheckBox materialCB;
846
- JCheckBox textureCB;
1382
+ cCheckBox colorCB;
1383
+ cCheckBox materialCB;
1384
+ cCheckBox textureCB;
8471385
8481386 public void itemStateChanged(ItemEvent e)
8491387 {
....@@ -887,6 +1425,12 @@
8871425 {
8881426 cameraView.ToggleInertia();
8891427 cameraView.repaint();
1428
+ }
1429
+ else if(e.getSource() == minshaderCB)
1430
+ {
1431
+ Globals.MINSHADER ^= true;
1432
+ cameraView.programInitialized = false;
1433
+ cameraView.repaint();
8901434 }
8911435 else if(e.getSource() == localCB)
8921436 {
....@@ -936,6 +1480,18 @@
9361480 {
9371481 cameraView.ToggleOeil();
9381482 }
1483
+ else if(e.getSource() == shadowCB)
1484
+ {
1485
+ Globals.COMPUTESHADOWWHENLIVE ^= true;
1486
+ }
1487
+ else if(e.getSource() == freezeCB)
1488
+ {
1489
+ Globals.FREEZEONMOVE ^= true;
1490
+ }
1491
+ else if(e.getSource() == autokeepCB)
1492
+ {
1493
+ Globals.REPLACEONMAKE ^= true;
1494
+ }
9391495 else if(e.getSource() == lookAtCB)
9401496 {
9411497 cameraView.ToggleLookAt();
....@@ -952,7 +1508,8 @@
9521508
9531509 /**/
9541510 //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this);
955
- TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1511
+ //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1512
+ TreePath path = objEditor.jTree.getSelectionPath();
9561513 if ((path == null) || (path.getPathCount() <= 1)) {
9571514 // We can't move the root node or an empty selection
9581515 return;
....@@ -1015,8 +1572,6 @@
10151572 }
10161573 }
10171574
1018
- String string = (String) object;
1019
-
10201575 System.out.println("Transfer = " + object + "; drop : " + target);
10211576 // if( object instanceof java.io.File[])
10221577 // {
....@@ -1024,6 +1579,8 @@
10241579 // objEditor.DropFile((java.io.File[]) object, true);
10251580 // return;
10261581 // }
1582
+
1583
+ String string = object.toString();
10271584
10281585 // File path for Mac and Windows
10291586 if (string.charAt(0) == '/' || string.charAt(1) == ':')
....@@ -1069,23 +1626,33 @@
10691626
10701627 assert target == objEditor.jTree;
10711628 TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y);
1629
+ Object3D destinationLeaf;
10721630 try {
1073
- Object3D dummy = (Composite) destinationPath.getLastPathComponent();
1631
+ destinationLeaf = (Composite) destinationPath.getLastPathComponent();
10741632 } catch (Exception e) {
10751633 System.out.println("destinationPath : " + destinationPath);
10761634 return;
10771635 }
10781636
1079
- if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1637
+ for (int i=group.selection.size(); --i>=0;)
10801638 {
1639
+ Object3D child = (Object3D)group.selection.elementAt(i);
1640
+
1641
+ // Cannot move into itself
1642
+ if (child == destinationLeaf)
1643
+ return;
1644
+ }
1645
+
1646
+// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1647
+// {
10811648 loadClipboard(true);
10821649 objEditor.jTree.setSelectionPath(destinationPath);
10831650 pasteInto(false, false);
1084
- } else {
1085
- loadClipboard(false);
1086
- objEditor.jTree.setSelectionPath(destinationPath);
1087
- pasteInto(false, false); // true); // ???
1088
- }
1651
+// } else {
1652
+// loadClipboard(false);
1653
+// objEditor.jTree.setSelectionPath(destinationPath);
1654
+// pasteInto(false, false); // true); // ???
1655
+// }
10891656 }
10901657 public void dropActionChanged(DropTargetDragEvent dtde)
10911658 // Called if the user has modified the current drop gesture
....@@ -1190,22 +1757,30 @@
11901757 {
11911758 //heightFieldItem = menu.add(new MenuItem("Height Field"));
11921759 //heightFieldItem.addActionListener(this);
1193
- gridItem = menu.add(new MenuItem("Grid"));
1194
- gridItem.addActionListener(this);
1195
- rectoidItem = menu.add(new MenuItem("Box"));
1196
- rectoidItem.addActionListener(this);
1197
- ellipsoidItem = menu.add(new MenuItem("Sphere"));
1198
- ellipsoidItem.addActionListener(this);
1199
- coneItem = menu.add(new MenuItem("Cone"));
1200
- coneItem.addActionListener(this);
1201
- torusItem = menu.add(new MenuItem("Torus"));
1202
- torusItem.addActionListener(this);
1203
- superItem = menu.add(new MenuItem("Superellipsoid"));
1204
- superItem.addActionListener(this);
1760
+// gridItem = menu.add(new MenuItem("Grid"));
1761
+// gridItem.addActionListener(this);
1762
+// rectoidItem = menu.add(new MenuItem("Box"));
1763
+// rectoidItem.addActionListener(this);
1764
+// ellipsoidItem = menu.add(new MenuItem("Sphere"));
1765
+// ellipsoidItem.addActionListener(this);
1766
+// coneItem = menu.add(new MenuItem("Cone"));
1767
+// coneItem.addActionListener(this);
1768
+// torusItem = menu.add(new MenuItem("Torus"));
1769
+// torusItem.addActionListener(this);
1770
+// superItem = menu.add(new MenuItem("Superellipsoid"));
1771
+// superItem.addActionListener(this);
1772
+
1773
+ cameraItem = menu.add(new MenuItem("Camera"));
1774
+ cameraItem.addActionListener(this);
1775
+
1776
+ if (!Globals.ADVANCED)
1777
+ {
12051778 kleinItem = menu.add(new MenuItem("Klein Bottle"));
12061779 kleinItem.addActionListener(this);
1207
- particleItem = menu.add(new MenuItem("Particle system"));
1208
- particleItem.addActionListener(this);
1780
+ }
1781
+
1782
+// particleItem = menu.add(new MenuItem("Particle system"));
1783
+// particleItem.addActionListener(this);
12091784 if (Globals.ADVANCED)
12101785 {
12111786 ragdollItem = menu.add(new MenuItem("Rag Walk"));
....@@ -1231,15 +1806,15 @@
12311806 }
12321807 bezierItem = menu.add(new MenuItem("Bezier Patch"));
12331808 bezierItem.addActionListener(this);
1234
- overlayItem = menu.add(new MenuItem("Overlay"));
1235
- overlayItem.addActionListener(this);
1236
- lightItem = menu.add(new MenuItem("Light"));
1237
- lightItem.addActionListener(this);
1809
+// overlayItem = menu.add(new MenuItem("Overlay"));
1810
+// overlayItem.addActionListener(this);
1811
+// lightItem = menu.add(new MenuItem("Light"));
1812
+// lightItem.addActionListener(this);
12381813 menu.add("-");
12391814 //superLoopItem = menu.add(new MenuItem("Super Loop"));
12401815 //superLoopItem.addActionListener(this);
1241
- loopItem = menu.add(new MenuItem("Loop"));
1242
- loopItem.addActionListener(this);
1816
+// loopItem = menu.add(new MenuItem("Loop"));
1817
+// loopItem.addActionListener(this);
12431818 doubleItem = menu.add(new MenuItem("Fork"));
12441819 doubleItem.addActionListener(this);
12451820 if (Globals.ADVANCED)
....@@ -1255,6 +1830,9 @@
12551830 animationItem.addItemListener(this);
12561831 animationItem.setState(Globals.ANIMATION);
12571832
1833
+ menu.add(archiveItem = new MenuItem("Archive3D..."));
1834
+ archiveItem.addActionListener(this);
1835
+
12581836 menu.add("-");
12591837 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
12601838 parseverticesItem.addActionListener(this);
....@@ -1267,6 +1845,8 @@
12671845 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
12681846 reduce34MorphItem.addActionListener(this);
12691847 menu.add("-");
1848
+ menu.add(memoryItem = new MenuItem("Memory Usage"));
1849
+ memoryItem.addActionListener(this);
12701850 menu.add(computeAOItem = new MenuItem("Compute AO"));
12711851 computeAOItem.addActionListener(this);
12721852
....@@ -1275,8 +1855,6 @@
12751855 mirrorItem = menu.add(new MenuItem("Mirror Poses"));
12761856 mirrorItem.addActionListener(this);
12771857 menu.add("-");
1278
- menu.add(memoryItem = new MenuItem("Memory Usage"));
1279
- memoryItem.addActionListener(this);
12801858 menu.add(analyzeItem = new MenuItem("Analyze"));
12811859 analyzeItem.addActionListener(this);
12821860 menu.add(dumpItem = new MenuItem("Print"));
....@@ -1420,9 +1998,34 @@
14201998 shadow.material = new cMaterial(obj.material);
14211999 shadow.material.diffuse = 0.0001f;
14222000 shadow.material.specular = 0.0001f;
2001
+ //shadow.projectedVertices[1].x = 300;
14232002
14242003 makeSomething(shadow);
14252004 }
2005
+
2006
+ private void ClearUnpinned()
2007
+ {
2008
+ //for (Object3D obj : listUI)
2009
+ for (int i=listUI.size(); --i>=0;)
2010
+ {
2011
+ Object3D obj = listUI.elementAt(i);
2012
+ if (!obj.pinned)
2013
+ {
2014
+ obj.CloseUI();
2015
+ listUI.remove(i);
2016
+ }
2017
+ }
2018
+ }
2019
+
2020
+ private void EditElement(Object3D elem, boolean newWindow)
2021
+ {
2022
+ // if (!(elem instanceof Composite))
2023
+ // newWindow = false;
2024
+ listUI.add(elem);
2025
+ elem.openEditWindow(this, newWindow); //, false);
2026
+ System.out.println("edit : " + elem);
2027
+ elem.editWindow.refreshContents(true); // ? new
2028
+ }
14262029
14272030 /**
14282031 * applyExample
....@@ -1667,7 +2270,7 @@
16672270 {
16682271 ScreenFit();
16692272 } else
1670
- if (source == switchItem)
2273
+ if (source == switchViewItem)
16712274 {
16722275 cVector v1 = new cVector();
16732276 cVector v2 = new cVector();
....@@ -1676,11 +2279,11 @@
16762279 objEditor.cameraView.renderCamera.setAim(v2, v1);
16772280 objEditor.cameraView.repaint();
16782281 } else
1679
- if (source == rectoidItem)
2282
+ if (source == rectoidItem || source == boxButton)
16802283 {
16812284 makeSomething(new Box());
16822285 } else
1683
- if (source == particleItem)
2286
+ if (source == particleItem || source == particlesButton)
16842287 {
16852288 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
16862289 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1759,27 +2362,27 @@
17592362
17602363 makeSomething(obj);
17612364 } else
1762
- if (source == gridItem)
2365
+ if (source == gridItem || source == gridButton)
17632366 {
17642367 makeSomething(new Grid());
17652368 } else
1766
- if (source == ellipsoidItem)
2369
+ if (source == ellipsoidItem || source == sphereButton)
17672370 {
17682371 makeSomething(new Sphere());
17692372 } else
1770
- if (source == coneItem)
2373
+ if (source == coneItem || source == coneButton)
17712374 {
17722375 makeSomething(new Cone());
17732376 } else
1774
- if (source == torusItem)
2377
+ if (source == torusItem || source == torusButton)
17752378 {
17762379 makeSomething(new Torus());
17772380 } else
1778
- if (source == superItem)
2381
+ if (source == superItem || source == superButton)
17792382 {
17802383 makeSomething(new Superellipsoid());
17812384 } else
1782
- if (source == kleinItem)
2385
+ if (source == kleinItem || source == kleinButton)
17832386 {
17842387 makeSomething(new Klein());
17852388 } else
....@@ -1799,7 +2402,7 @@
17992402 {
18002403 makeSomething(new BezierSurface());
18012404 } else
1802
- if (source == overlayItem)
2405
+ if (source == overlayItem || source == overlayButton)
18032406 {
18042407 /*
18052408 Object3D obj = new BezierSurface(5,8);
....@@ -1847,10 +2450,27 @@
18472450 s.setup();
18482451 makeSomething(s);
18492452 } else
1850
- if (source == lightItem)
2453
+ if (source == lightItem || source == lightButton)
18512454 {
18522455 makeSomething(new Light());
18532456 } else
2457
+// if (source == skybox1Button ||
2458
+// source == skybox2Button ||
2459
+// source == skybox3Button ||
2460
+// source == skybox4Button ||
2461
+// source == skybox5Button ||
2462
+// source == skybox6Button ||
2463
+// source == skybox7Button ||
2464
+// source == skybox11Button ||
2465
+// source == skybox12Button ||
2466
+// source == skybox13Button ||
2467
+// source == skybox14Button ||
2468
+// source == skybox15Button ||
2469
+// source == skybox16Button ||
2470
+// source == skybox17Button)
2471
+// {
2472
+// ChangeSkybox(source);
2473
+// } else
18542474 if (source == csgItem)
18552475 {
18562476 group(new CSG());
....@@ -1897,30 +2517,30 @@
18972517
18982518 group(g);
18992519 } else
1900
- if (source == loopItem)
2520
+ if (source == loopItem || source == loopButton)
19012521 {
19022522 Composite csg = new GroupLeaf();
19032523 csg.count = 5;
19042524 group(csg);
1905
- Composite child = new cGroup();
2525
+ Composite child = new cGroup("Branch");
19062526 csg.addChild(child);
19072527 child.addChild(csg);
19082528 } else
19092529 if (source == doubleItem)
19102530 {
1911
- Composite csg = new GroupLeaf();
2531
+ Composite csg = new GroupLeaf("Fork");
19122532 csg.count = 5;
19132533 group(csg);
1914
- Composite child = new cGroup();
2534
+ Composite child = new cGroup("Branch A");
19152535 csg.addChild(child);
19162536 child.addChild(csg);
1917
- child = new cGroup();
2537
+ child = new cGroup("Branch B");
19182538 csg.addChild(child);
19192539 child.addChild(csg);
19202540 } else
19212541 if (source == tripleItem)
19222542 {
1923
- Composite csg = new GroupLeaf();
2543
+ Composite csg = new GroupLeaf("Trident");
19242544 csg.count = 4;
19252545 group(csg);
19262546 Composite child = new cGroup();
....@@ -1936,7 +2556,7 @@
19362556 if (source == computeAOItem)
19372557 {
19382558 Globals.drawMode = CameraPane.OCCLUSION;
1939
- Globals.theRenderer.repaint();
2559
+ cameraView.repaint();
19402560 } else
19412561 if (source == recompileItem)
19422562 {
....@@ -1970,17 +2590,45 @@
19702590 {
19712591 DumpObject();
19722592 } else
2593
+ if (source == minButton)
2594
+ {
2595
+ Minimize();
2596
+ } else
2597
+ if (source == maxButton)
2598
+ {
2599
+ Maximize();
2600
+ } else
2601
+ if (source == fullButton)
2602
+ {
2603
+ ToggleFullScreen();
2604
+ } else
19732605 if (source == undoButton)
19742606 {
2607
+ // Go to previous version
2608
+ //if (!Undo())
2609
+ //java.awt.Toolkit.getDefaultToolkit().beep();
19752610 Undo();
2611
+ } else
2612
+ if (source == restoreButton)
2613
+ {
2614
+ // Restore current version
2615
+ Restore();
2616
+ } else
2617
+ if (source == replaceButton)
2618
+ {
2619
+ // Overwrite current version
2620
+ Replace();
19762621 } else
19772622 if (source == redoButton)
19782623 {
2624
+ // Go to next version
19792625 Redo();
19802626 } else
19812627 if (source == saveButton)
19822628 {
1983
- Save();
2629
+ // Save a new version
2630
+ if (!Save(true))
2631
+ java.awt.Toolkit.getDefaultToolkit().beep();
19842632 } else
19852633 if (source == oneStepButton)
19862634 {
....@@ -1989,17 +2637,14 @@
19892637 } else
19902638 if (source == screenfitButton)
19912639 {
1992
- //Reload(lastConverter, lastFilename, true);
19932640 ScreenFit();
19942641 } else
19952642 if (source == screenfitpointButton)
19962643 {
1997
- //Reload(lastConverter, lastFilename, true);
19982644 ScreenFitPoint();
19992645 } else
20002646 if (source == snapobjectButton)
20012647 {
2002
- //Reload(lastConverter, lastFilename, true);
20032648 SnapObject();
20042649 } else
20052650 // if (event.getSource() == recompileButton)
....@@ -2363,7 +3008,7 @@
23633008 {
23643009 StepAll();
23653010 } else
2366
- if (source == clearItem) // || event.getSource() == clearButton)
3011
+ if (source == deleteItem) // || event.getSource() == clearButton)
23673012 {
23683013 //int indices[] = jList.getSelectedIndices();
23693014 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2375,9 +3020,9 @@
23753020 {
23763021 ClearSelection(true);
23773022 } else
2378
- if (source == grabItem)
3023
+ if (source == grabItem || source == groupButton)
23793024 {
2380
- group(new cGroup(), true);
3025
+ group(new cGroup(), false); // true);
23813026 } else
23823027 if (source == hideItem)
23833028 {
....@@ -2395,11 +3040,11 @@
23953040 {
23963041 makeSomething(new Camera());
23973042 } else
2398
- if (source == compositeItem)
3043
+ if (source == compositeItem || source == compositeButton)
23993044 {
24003045 group(new Composite());
24013046 } else
2402
- if (source == randomItem)
3047
+ if (source == switchItem || source == switchButton)
24033048 {
24043049 RandomNode random = new RandomNode();
24053050 group(random);
....@@ -2501,7 +3146,7 @@
25013146 {
25023147 group(new cLinker());
25033148 } else
2504
- if (source == textureItem)
3149
+ if (source == textureItem || source == textureButton)
25053150 {
25063151 group(new TextureNode());
25073152 } else
....@@ -2521,17 +3166,30 @@
25213166 {
25223167 CastShadow(2);
25233168 } else
2524
- if (source == ungroupItem)
3169
+ if (source == ungroupItem || source == ungroupButton)
25253170 {
2526
- //ungroup();
3171
+ boolean hasRoot = false;
3172
+
25273173 for (int i=0; i<group.selection.size(); i++)
25283174 {
2529
- Ungroup(group.selection.get(i));
3175
+ if (group.selection.get(i) == group)
3176
+ {
3177
+ hasRoot = true;
3178
+ break;
3179
+ }
25303180 }
25313181
2532
- ClearSelection(false);
2533
-
2534
- refreshContents();
3182
+ if (!hasRoot)
3183
+ {
3184
+ for (int i=0; i<group.selection.size(); i++)
3185
+ {
3186
+ Ungroup(group.selection.get(i));
3187
+ }
3188
+
3189
+ ClearSelection(false);
3190
+
3191
+ refreshContents();
3192
+ }
25353193 } else
25363194 if (source == genUVItem)
25373195 {
....@@ -2608,6 +3266,22 @@
26083266 if (source == unmarkleavesItem)
26093267 {
26103268 MarkLeaves(false);
3269
+ } else
3270
+ if (source == rewindleavesItem)
3271
+ {
3272
+ RewindLeaves(true);
3273
+ } else
3274
+ if (source == unrewindleavesItem)
3275
+ {
3276
+ RewindLeaves(false);
3277
+ } else
3278
+ if (source == randomleavesItem)
3279
+ {
3280
+ RandomLeaves(true);
3281
+ } else
3282
+ if (source == unrandomleavesItem)
3283
+ {
3284
+ RandomLeaves(false);
26113285 } else
26123286 if (source == flipVItem)
26133287 {
....@@ -2816,7 +3490,7 @@
28163490 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28173491 {
28183492 obj = (Object3D)e.nextElement();
2819
- obj.SetBumpTexture(null);
3493
+ obj.ResetBumpTexture();
28203494 }
28213495
28223496 refreshContents();
....@@ -2832,6 +3506,31 @@
28323506
28333507 refreshContents();
28343508 } else
3509
+ if (source == embedTexturesItem)
3510
+ {
3511
+ Object3D obj;
3512
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3513
+ {
3514
+ obj = (Object3D)e.nextElement();
3515
+ obj.EmbedTextures(true);
3516
+ }
3517
+
3518
+ refreshContents();
3519
+ } else
3520
+ if (source == deEmbedTexturesItem)
3521
+ {
3522
+ Object3D obj;
3523
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3524
+ {
3525
+ obj = (Object3D)e.nextElement();
3526
+ obj.EmbedTextures(false);
3527
+ }
3528
+
3529
+ CameraPane.texturepigment.clear();
3530
+ CameraPane.texturebump.clear();
3531
+
3532
+ refreshContents();
3533
+ } else
28353534 if (source == flashSelectionButton)
28363535 {
28373536 CameraPane.flash = true;
....@@ -2843,6 +3542,10 @@
28433542 if (source == twoButton)
28443543 {
28453544 radio.layout = twoButton;
3545
+
3546
+ if (CameraPane.FULLSCREEN)
3547
+ fullscreenLayout = radio.layout;
3548
+
28463549 // bug
28473550 //gridPanel.setDividerLocation(1.0);
28483551 //bigPanel.setDividerLocation(0.0);
....@@ -2875,10 +3578,31 @@
28753578 bigThree.ClearUI();
28763579 bigThree.add(centralPanel);
28773580 bigThree.FlushUI();
3581
+
3582
+ cameraView.requestFocusInWindow();
3583
+
3584
+// refreshContents(true);
3585
+//
3586
+// try
3587
+// {
3588
+// java.awt.Robot bot = new java.awt.Robot();
3589
+// int mask = InputEvent.BUTTON1_MASK;
3590
+// bot.mouseMove(100, 100);
3591
+// bot.mousePress(mask);
3592
+// bot.mouseRelease(mask);
3593
+// }
3594
+// catch (Exception e)
3595
+// {
3596
+//
3597
+// }
3598
+
28783599 } else
28793600 if (source == threeButton)
28803601 {
28813602 radio.layout = threeButton;
3603
+
3604
+ if (CameraPane.FULLSCREEN)
3605
+ fullscreenLayout = radio.layout;
28823606
28833607 // bigThree.remove(scenePanel);
28843608 // bigThree.remove(centralPanel);
....@@ -2908,13 +3632,18 @@
29083632 // centralPanel.setVisible(true);
29093633 // XYZPanel.setVisible(true);
29103634 bigThree.ClearUI();
3635
+ bigThree.add(scenePanel);
29113636 bigThree.add(centralPanel);
2912
- bigThree.add(XYZPanel);
29133637 bigThree.FlushUI();
3638
+
3639
+ cameraView.requestFocusInWindow();
29143640 } else
29153641 if (source == fourButton)
29163642 {
29173643 radio.layout = fourButton;
3644
+
3645
+ if (CameraPane.FULLSCREEN)
3646
+ fullscreenLayout = radio.layout;
29183647
29193648 // bigThree.remove(scenePanel);
29203649 // bigThree.remove(centralPanel);
....@@ -2946,10 +3675,15 @@
29463675 bigThree.ClearUI();
29473676 bigThree.add(scenePanel);
29483677 bigThree.FlushUI();
3678
+
3679
+ cameraView.requestFocusInWindow();
29493680 } else
29503681 if (source == sixButton)
29513682 {
29523683 radio.layout = sixButton;
3684
+
3685
+ if (CameraPane.FULLSCREEN)
3686
+ fullscreenLayout = radio.layout;
29533687
29543688 // bigThree.remove(scenePanel);
29553689 // bigThree.remove(centralPanel);
....@@ -2979,13 +3713,18 @@
29793713 // centralPanel.setVisible(true);
29803714 // XYZPanel.setVisible(false);
29813715 bigThree.ClearUI();
2982
- bigThree.add(scenePanel);
29833716 bigThree.add(centralPanel);
3717
+ bigThree.add(scenePanel);
29843718 bigThree.FlushUI();
3719
+
3720
+ cameraView.requestFocusInWindow();
29853721 } else
29863722 if (source == sevenButton)
29873723 {
29883724 radio.layout = sevenButton;
3725
+
3726
+ if (CameraPane.FULLSCREEN)
3727
+ fullscreenLayout = radio.layout;
29893728
29903729 // bigThree.remove(scenePanel);
29913730 // bigThree.remove(centralPanel);
....@@ -3019,6 +3758,8 @@
30193758 bigThree.add(centralPanel);
30203759 bigThree.add(XYZPanel);
30213760 bigThree.FlushUI();
3761
+
3762
+ cameraView.requestFocusInWindow();
30223763 } else
30233764 if (source == rootButton)
30243765 {
....@@ -3030,6 +3771,7 @@
30303771 EditObject(obj);
30313772 }
30323773
3774
+ cameraView.requestFocusInWindow();
30333775 refreshContents(true);
30343776 } else
30353777 if (source == closeButton)
....@@ -3039,22 +3781,37 @@
30393781 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
30403782 {
30413783 ab = (cRadio)e.nextElement();
3042
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3784
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
30433785 {
3786
+ // Patch to avoid bug with transparency.
3787
+ if (!ab.hadMaterial)
3788
+ {
3789
+ ab.object.material = null;
3790
+ }
3791
+
30443792 buttonGroup.remove(ab);
30453793 radioPanel.remove(ab);
30463794
3047
- ab.GetObject().editWindow = null;
3795
+ //ab.GetObject().editWindow = null;
3796
+ ab.GetObject().manipWindow = null;
30483797 // ab.GetObject().objectUI = null; // ?????????
30493798
30503799 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
30513800 break;
30523801 }
30533802 }
3803
+
3804
+ cameraView.requestFocusInWindow();
30543805 refreshContents(true);
30553806 } else
30563807 if (source == editItem || source == editButton)
30573808 {
3809
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3810
+ {
3811
+ Object3D child = (Object3D)e.nextElement();
3812
+ child.pinned = true;
3813
+ }
3814
+
30583815 EditSelection(false);
30593816 } else
30603817 if (source == uneditButton)
....@@ -3064,6 +3821,7 @@
30643821 Object3D child = (Object3D)e.nextElement();
30653822 if(child.editWindow != null)
30663823 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3824
+ child.pinned = false;
30673825 child.CloseUI();
30683826 listUI.remove(child);
30693827
....@@ -3080,6 +3838,7 @@
30803838 //copy.ClearUI();
30813839 for (Object3D obj : listUI)
30823840 {
3841
+ obj.pinned = false;
30833842 obj.CloseUI();
30843843 }
30853844 listUI.clear();
....@@ -3089,7 +3848,7 @@
30893848 {
30903849 assert(copy == group);
30913850
3092
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3851
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
30933852
30943853 for (Object3D obj : listUI)
30953854 {
....@@ -3138,6 +3897,9 @@
31383897 }
31393898
31403899 copy = group;
3900
+
3901
+ SetUndoStates();
3902
+
31413903 //Globals.theRenderer.object = group;
31423904 if(!useclient)
31433905 {
....@@ -3155,7 +3917,8 @@
31553917 }
31563918
31573919 // fix "+" issue
3158
- group.editWindow = this;
3920
+ //group.editWindow = this;
3921
+ group.manipWindow = this;
31593922
31603923 /*
31613924 currentLayout = radio.layout;
....@@ -3163,18 +3926,27 @@
31633926 currentLayout = sevenButton;
31643927 */
31653928 radio.layout.doClick();
3929
+
3930
+ ClearUnpinned();
3931
+ //Grafreed.Assert(group != null);
3932
+ //Grafreed.Assert(group.selection != null);
3933
+ SetPinStates(group.selection == null || group.selection.size() > 0);
3934
+ if (group.selection == null || group.selection.size() == 1)
3935
+ EditSelection(false);
31663936 keepparent = group.parent;
31673937 // PARENT = NULL or not???
31683938 //group.parent = null; // ROOT
31693939 //group.attributes = -1;
31703940 ResetModel();
3941
+
3942
+ cameraView.requestFocusInWindow();
31713943 refreshContents(true);
31723944 } else if (event.getSource() == editCameraItem)
31733945 {
31743946 cameraView.ProtectCamera();
31753947 cameraView.repaint();
31763948 return;
3177
- } else if (event.getSource() == revertCameraItem)
3949
+ } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton)
31783950 {
31793951 cameraView.RevertCamera();
31803952 cameraView.repaint();
....@@ -3191,7 +3963,6 @@
31913963 }
31923964
31933965 boolean useclient = false;
3194
- cRadio radio;
31953966
31963967 void ToggleRoot()
31973968 {
....@@ -3754,7 +4525,7 @@
37544525
37554526 try
37564527 {
3757
- texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
4528
+ texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres);
37584529 }
37594530 catch (Exception e)
37604531 {
....@@ -4146,6 +4917,18 @@
41464917 refreshContents();
41474918 }
41484919
4920
+ void RewindLeaves(boolean hide)
4921
+ {
4922
+ group.selection.RewindLeaves(hide);
4923
+ refreshContents();
4924
+ }
4925
+
4926
+ void RandomLeaves(boolean hide)
4927
+ {
4928
+ group.selection.RandomLeaves(hide);
4929
+ refreshContents();
4930
+ }
4931
+
41494932 void SetTexRes(int tr)
41504933 {
41514934 group.selection.SetTexRes(tr);
....@@ -4217,28 +5000,25 @@
42175000 // }
42185001 // }
42195002
4220
- static boolean allparams = true;
4221
-
4222
- static Vector<Object3D> listUI = new Vector<Object3D>();
4223
-
42245003 void EditSelection(boolean newWindow)
42255004 {
5005
+ if (group.selection == null)
5006
+ {
5007
+ EditElement(group, newWindow); // ? new
5008
+ return;
5009
+ }
5010
+
42265011 // aConstraints.gridy = 0;
42275012 for (int i=0; i<group.selection.size(); i++)
42285013 {
42295014 //System.out.println("edit : " + objectPanel.indexOfTab("Material"));
42305015 //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false);
4231
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
5016
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
42325017
42335018 Object3D elem = (Object3D)group.selection.elementAt(i);
42345019 if(elem != group || !newWindow)
42355020 {
4236
- // if (!(elem instanceof Composite))
4237
- // newWindow = false;
4238
- listUI.add(elem);
4239
- elem.openEditWindow(this, newWindow); //, false);
4240
- System.out.println("edit : " + elem);
4241
- elem.editWindow.refreshContents(true); // ? new
5021
+ EditElement(elem, newWindow); // ? new
42425022 }
42435023 }
42445024 }
....@@ -4313,7 +5093,8 @@
43135093 //new Exception().printStackTrace();
43145094
43155095 freezemodel = true;
4316
-
5096
+ ClearUnpinned();
5097
+
43175098 /**/
43185099 //switch (event.id)
43195100 {
....@@ -4329,6 +5110,7 @@
43295110
43305111 //if (child.parent != null)
43315112 //child.parent.addSelectee(child);
5113
+ objEditor.SetMaterial(child);
43325114 group.addSelectee(child);
43335115 }
43345116 }
....@@ -4345,7 +5127,7 @@
43455127 if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
43465128 // a camera
43475129 {
4348
- if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
5130
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace
43495131 {
43505132 CameraPane.camerachangeframe = 0; // don't refuse it
43515133 Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
....@@ -4354,6 +5136,13 @@
43545136 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
43555137 }
43565138
5139
+ if (tps != null && tps.length == 1)
5140
+ {
5141
+ EditSelection(false);
5142
+ }
5143
+
5144
+ SetPinStates(tps != null && tps.length > 0);
5145
+
43575146 refreshContents();
43585147 //return true;
43595148 }
....@@ -4363,21 +5152,27 @@
43635152 freezemodel = false;
43645153 }
43655154
5155
+ void SetPinStates(boolean enabled)
5156
+ {
5157
+ editButton.setEnabled(enabled);
5158
+ uneditButton.setEnabled(enabled);
5159
+ unselectButton.setEnabled(enabled);
5160
+ flashSelectionButton.setEnabled(enabled);
5161
+ }
5162
+
43665163 void refreshContents(boolean cp)
43675164 {
4368
- if (!Globals.MOUSEDRAGGED)
5165
+ if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
5166
+ if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
43695167 {
43705168 objEditor.ClearInfo(); // .GetMaterial());
43715169
4372
- for (int i=0; i < group.selection.size(); i++)
5170
+ for (int i=0; i < group.selection.Size(); i++)
43735171 {
4374
- Object3D child = (Object3D) group.selection.reserve(i);
5172
+ Object3D child = (Object3D) group.selection.get(i);
43755173
4376
- objEditor.SetMaterial(child);
43775174 objEditor.AddInfo(child, this, true);
43785175 System.err.println("info : " + child.GetPath());
4379
-
4380
- group.selection.release(i);
43815176 }
43825177
43835178 objEditor.SetText(); // jan 2014
....@@ -4467,7 +5262,8 @@
44675262
44685263 if (cut)
44695264 {
4470
- Save();
5265
+// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save.
5266
+// Save();
44715267 //int indices[] = jList.getSelectedIndices();
44725268 //for (int i = indices.length - 1; i >= 0; i--)
44735269 //jList.remove(indices[i]);
....@@ -4570,6 +5366,10 @@
45705366
45715367 void paste(boolean expand)
45725368 {
5369
+ if (Globals.REPLACEONMAKE)
5370
+ Save();
5371
+ boolean keep = Globals.REPLACEONMAKE;
5372
+ Globals.REPLACEONMAKE = false;
45735373 // if (GrafreeD.clipboard == null)
45745374 // return;
45755375 boolean first = true;
....@@ -4629,6 +5429,7 @@
46295429 Grafreed.clipboard.get(0).parent = keepparent;
46305430 }
46315431
5432
+ Globals.REPLACEONMAKE = keep;
46325433 ResetModel();
46335434 refreshContents();
46345435 }
....@@ -4764,6 +5565,10 @@
47645565
47655566 void group(Object3D csg, boolean grab)
47665567 {
5568
+ if (Globals.REPLACEONMAKE)
5569
+ Save();
5570
+ boolean keep = Globals.REPLACEONMAKE;
5571
+ Globals.REPLACEONMAKE = false;
47675572 if (//false) // why??
47685573 !group.selection.isEmpty())
47695574 {
....@@ -4877,10 +5682,15 @@
48775682 //node.add(csg);
48785683 //makeSomething(node);
48795684 makeSomething(csg);
5685
+ Globals.REPLACEONMAKE = keep;
48805686 }
48815687
48825688 void Ungroup(Object3D g)
48835689 {
5690
+ if (Globals.REPLACEONMAKE)
5691
+ Save();
5692
+ boolean keep = Globals.REPLACEONMAKE;
5693
+ Globals.REPLACEONMAKE = false;
48845694 if (g instanceof HiddenObject)
48855695 {
48865696 HiddenObject h = (HiddenObject) g;
....@@ -4897,6 +5707,7 @@
48975707 objEditor.makeSomething(g.get(i), false);
48985708 }
48995709 }
5710
+ Globals.REPLACEONMAKE = keep;
49005711 }
49015712
49025713 void ungroup()
....@@ -5185,10 +5996,44 @@
51855996 cButton clearpanelButton;
51865997 cButton unselectButton;
51875998
5999
+ cButton restoreCameraButton;
6000
+
51886001 cButton saveButton;
5189
- cButton undoButton;
5190
- cButton redoButton;
51916002 cButton oneStepButton;
6003
+
6004
+ cButton groupButton;
6005
+ cButton ungroupButton;
6006
+ cButton compositeButton;
6007
+ cButton switchButton;
6008
+ cButton loopButton;
6009
+ cButton textureButton;
6010
+
6011
+ cButton skybox1Button;
6012
+ cButton skybox2Button;
6013
+ cButton skybox3Button;
6014
+ cButton skybox4Button;
6015
+ cButton skybox5Button;
6016
+ cButton skybox6Button;
6017
+ cButton skybox7Button;
6018
+
6019
+ cButton skybox11Button;
6020
+ cButton skybox12Button;
6021
+ cButton skybox13Button;
6022
+ cButton skybox14Button;
6023
+ cButton skybox15Button;
6024
+ cButton skybox16Button;
6025
+ cButton skybox17Button;
6026
+
6027
+ cButton gridButton;
6028
+ cButton boxButton;
6029
+ cButton sphereButton;
6030
+ cButton coneButton;
6031
+ cButton torusButton;
6032
+ cButton superButton;
6033
+ cButton kleinButton;
6034
+ cButton particlesButton;
6035
+ cButton overlayButton;
6036
+ cButton lightButton;
51926037
51936038 cButton screenfitButton;
51946039 cButton screenfitpointButton;
....@@ -5201,14 +6046,6 @@
52016046
52026047 cButton setsupportButton;
52036048
5204
- cButton twoButton;
5205
- cButton sixButton;
5206
- cButton threeButton;
5207
- cButton sevenButton;
5208
- cButton fourButton; // full panel
5209
- cButton oneButton; // full XYZ
5210
- //cButton currentLayout;
5211
-
52126049 //
52136050 //Composite
52146051 Object3D // to do !!
....@@ -5218,11 +6055,11 @@
52186055 //JTree jTree;
52196056 private MenuItem lookAtItem;
52206057 private MenuItem lookFromItem;
5221
- private MenuItem switchItem;
6058
+ private MenuItem switchViewItem;
52226059 private MenuItem cutItem;
52236060 private MenuItem undoItem;
52246061 private MenuItem redoItem;
5225
- private MenuItem duplicateItem;
6062
+ private JMenuItem duplicateItem;
52266063 private MenuItem cloneItem;
52276064 private MenuItem cloneSupportItem;
52286065 private MenuItem overwriteGeoItem;
....@@ -5250,7 +6087,7 @@
52506087 private MenuItem pasteLinkItem;
52516088 private MenuItem pasteCloneItem;
52526089 private MenuItem pasteExpandItem;
5253
- private MenuItem clearItem;
6090
+ private MenuItem deleteItem;
52546091 private MenuItem clearAllItem;
52556092 private MenuItem genUVItem;
52566093 private MenuItem genNormalsMESHItem;
....@@ -5285,6 +6122,10 @@
52856122 private MenuItem showleavesItem;
52866123 private MenuItem markleavesItem;
52876124 private MenuItem unmarkleavesItem;
6125
+ private MenuItem rewindleavesItem;
6126
+ private MenuItem unrewindleavesItem;
6127
+ private MenuItem randomleavesItem;
6128
+ private MenuItem unrandomleavesItem;
52886129
52896130 private MenuItem flipVItem;
52906131 private MenuItem unflipVItem;
....@@ -5306,7 +6147,7 @@
53066147 private MenuItem frontItem;
53076148 private MenuItem cameraItem;
53086149 private MenuItem compositeItem;
5309
- private MenuItem randomItem;
6150
+ private MenuItem switchItem;
53106151 private MenuItem physicsItem;
53116152 private MenuItem frameselectorItem;
53126153 private MenuItem scriptNodeItem;
....@@ -5330,6 +6171,8 @@
53306171 private MenuItem attachBumpItem;
53316172 private MenuItem detachBumpItem;
53326173 private MenuItem pigmentBumpItem;
6174
+ private MenuItem embedTexturesItem;
6175
+ private MenuItem deEmbedTexturesItem;
53336176
53346177 private MenuItem particleItem;
53356178 private MenuItem ragdollItem;
....@@ -5380,5 +6223,5 @@
53806223
53816224 Menu cameraMenu;
53826225 MenuItem editCameraItem;
5383
- MenuItem revertCameraItem;
6226
+ MenuItem restoreCameraItem;
53846227 }