Normand Briere
2019-07-30 7a77e39423398b7ad8bf7e80cf45fac6817000c2
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,16 +465,19 @@
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"));
156473 //editItem.addActionListener(this);
157
- undoItem = menu.add(new MenuItem("Undo"));
158
- undoItem.addActionListener(this);
159
- redoItem = menu.add(new MenuItem("Redo"));
160
- redoItem.addActionListener(this);
161
- menu.add("-");
162
- duplicateItem = menu.add(new MenuItem("Duplicate"));
474
+
475
+// undoItem = menu.add(new MenuItem("Undo"));
476
+// undoItem.addActionListener(this);
477
+// redoItem = menu.add(new MenuItem("Redo"));
478
+// redoItem.addActionListener(this);
479
+// menu.add("-");
480
+ duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate"));
163481 duplicateItem.addActionListener(this);
164482 cloneItem = menu.add(new MenuItem("Clone"));
165483 cloneItem.addActionListener(this);
....@@ -175,7 +493,6 @@
175493 copyItem.addActionListener(this);
176494 pasteItem = menu.add(new MenuItem("Paste"));
177495 pasteItem.addActionListener(this);
178
- menu.add("-");
179496
180497 menu.add("-");
181498 pasteIntoItem = menu.add(new MenuItem("Paste into"));
....@@ -187,8 +504,8 @@
187504 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
188505 // pasteExpandItem.addActionListener(this);
189506 menu.add("-");
190
- clearItem = menu.add(new MenuItem("Clear"));
191
- clearItem.addActionListener(this);
507
+ deleteItem = menu.add(new MenuItem("Delete"));
508
+ deleteItem.addActionListener(this);
192509
193510 if (Globals.ADVANCED)
194511 {
....@@ -202,23 +519,23 @@
202519 //zBufferItem.addActionListener(this);
203520 //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
204521 //normalLensItem.addActionListener(this);
205
- cameraMenu.add(revertCameraItem = new MenuItem("Restore Camera"));
206
- revertCameraItem.addActionListener(this);
522
+ cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint"));
523
+ restoreCameraItem.addActionListener(this);
207524
208
- cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
209
- toggleFullScreenItem.addItemListener(this);
210
- toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
211
- 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);
212537
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"));
538
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles"));
222539 toggleHandleItem.addItemListener(this);
223540 toggleHandleItem.setState(CameraPane.HANDLES);
224541
....@@ -245,7 +562,7 @@
245562
246563 cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
247564 toggleDebugItem.addItemListener(this);
248
- toggleDebugItem.setState(CameraPane.DEBUG);
565
+ toggleDebugItem.setState(Globals.DEBUG);
249566
250567 cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
251568 toggleFrustumItem.addItemListener(this);
....@@ -266,14 +583,14 @@
266583 // animationItem.addItemListener(this);
267584 // animationItem.setState(CameraPane.ANIMATION);
268585 cameraMenu.add("-");
269
- cameraMenu.add(editCameraItem = new MenuItem("Save Camera"));
586
+ cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint"));
270587 editCameraItem.addActionListener(this);
271588
272589 if (Globals.ADVANCED)
273590 {
274591 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
275592 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
276
- //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
593
+ //cameraMenu.add(switchViewItem = new MenuItem("Reverse View"));
277594 editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
278595 oe.cameraMenu.add("-");
279596 openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
....@@ -281,7 +598,7 @@
281598 editLeafItem.addActionListener(this);
282599 lookAtItem.addActionListener(this);
283600 //lookFromItem.addActinoListener(this);
284
- //switchItem.addActionListener(this);
601
+ //switchViewItem.addActionListener(this);
285602 }
286603
287604 oe.menuBar.add(menu = new Menu("Setting"));
....@@ -326,21 +643,29 @@
326643 }
327644
328645 oe.menuBar.add(menu = new Menu("Group"));
329
- grabItem = menu.add(new MenuItem("Grab"));
330
- grabItem.addActionListener(this);
646
+// grabItem = menu.add(new MenuItem("Grab"));
647
+// grabItem.addActionListener(this);
331648 backItem = menu.add(new MenuItem("Back"));
332649 backItem.addActionListener(this);
333650 frontItem = menu.add(new MenuItem("Front"));
334651 frontItem.addActionListener(this);
335
- compositeItem = menu.add(new MenuItem("Composite"));
336
- compositeItem.addActionListener(this);
652
+// compositeItem = menu.add(new MenuItem("Composite"));
653
+// compositeItem.addActionListener(this);
654
+
655
+ if (Globals.ADVANCED)
656
+ {
337657 hideItem = menu.add(new MenuItem("Hidden Group"));
338658 hideItem.addActionListener(this);
659
+ }
339660 ungroupItem = menu.add(new MenuItem("Ungroup"));
340661 ungroupItem.addActionListener(this);
341
- menu.add("-");
342
- randomItem = menu.add(new MenuItem("Switch node"));
343
- 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
+ {
344669 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
345670 switchGeoItem.addActionListener(this);
346671 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
....@@ -348,8 +673,6 @@
348673 morphItem = menu.add(new MenuItem("Morph Group"));
349674 morphItem.addActionListener(this);
350675
351
- if (Globals.ADVANCED)
352
- {
353676 menu.add("-");
354677 physicsItem = menu.add(new MenuItem("Physics"));
355678 physicsItem.addActionListener(this);
....@@ -357,30 +680,29 @@
357680 frameselectorItem.addActionListener(this);
358681 scriptNodeItem = menu.add(new MenuItem("Script Node"));
359682 scriptNodeItem.addActionListener(this);
360
- cameraItem = menu.add(new MenuItem("Camera"));
361
- cameraItem.addActionListener(this);
362683 }
363684
364685 oe.menuBar.add(menu = new Menu("Object"));
365
- textureItem = menu.add(new MenuItem("Texture"));
366
- textureItem.addActionListener(this);
686
+// textureItem = menu.add(new MenuItem("Texture"));
687
+// textureItem.addActionListener(this);
367688 billboardItem = menu.add(new MenuItem("Billboard"));
368689 billboardItem.addActionListener(this);
369690 csgItem = menu.add(new MenuItem("CSG"));
370691 csgItem.addActionListener(this);
371
- shadowXItem = menu.add(new MenuItem("Shadow X"));
692
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
372693 shadowXItem.addActionListener(this);
373
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
694
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
374695 shadowYItem.addActionListener(this);
375
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
696
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
376697 shadowZItem.addActionListener(this);
698
+ attributeItem = menu.add(new MenuItem("Attribute"));
699
+ attributeItem.addActionListener(this);
700
+
377701 if (Globals.ADVANCED)
378702 {
379703 menu.add("-");
380704 linkerItem = menu.add(new MenuItem("Linker"));
381705 linkerItem.addActionListener(this);
382
- attributeItem = menu.add(new MenuItem("Attribute"));
383
- attributeItem.addActionListener(this);
384706 templateItem = menu.add(new MenuItem("Template"));
385707 templateItem.addActionListener(this);
386708 pointflowItem = menu.add(new MenuItem("Point Flow"));
....@@ -409,7 +731,7 @@
409731 genNormalsMESHItem.addActionListener(this);
410732 if (Globals.ADVANCED)
411733 {
412
- genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
734
+ genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals"));
413735 genNormalsMINEItem.addActionListener(this);
414736 }
415737 stripifyItem = menu.add(new MenuItem("Stripify"));
....@@ -469,6 +791,14 @@
469791 markleavesItem.addActionListener(this);
470792 unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
471793 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);
472802 menu.add("-");
473803 flipVItem = menu.add(new MenuItem("Flip V"));
474804 flipVItem.addActionListener(this);
....@@ -494,10 +824,15 @@
494824 attachBumpItem.addActionListener(this);
495825 pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump"));
496826 pigmentBumpItem.addActionListener(this);
827
+ //embedTexturesItem
497828 detachPigmentItem = menu.add(new MenuItem("Detach Pigment"));
498829 detachPigmentItem.addActionListener(this);
499830 detachBumpItem = menu.add(new MenuItem("Detach Bump"));
500831 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);
501836 menu.add("-");
502837 sortbysizeItem = menu.add(new MenuItem("Sort by size"));
503838 sortbysizeItem.addActionListener(this);
....@@ -524,8 +859,21 @@
524859 buildToolsMenu(menu);
525860 }
526861
862
+
527863 void SetupUI2(ObjEditor oe)
528864 {
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
+
529877 //new Exception().printStackTrace();
530878
531879 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -554,27 +902,79 @@
554902 oe.radioPanel.add(dummyButton);
555903 oe.buttonGroup.add(dummyButton);
556904 */
905
+ cGridBag copyOptionsPanel = new cGridBag();
906
+
907
+ copyOptionsPanel.preferredHeight = 2;
908
+
557909 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
558910
559
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
911
+ //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
912
+ //minButton.setToolTipText("Minimize window");
913
+ //minButton.addActionListener(this);
914
+
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
+ }
921
+
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");
936
+ 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);
942
+
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);
560962 liveCB.setToolTipText("Enable animation");
561963 liveCB.addItemListener(this);
562964
563
- oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
965
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
564966 oneStepButton.setToolTipText("Animate one step forward");
565967 oneStepButton.addActionListener(this);
566968
567
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
969
+ oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
568970 fastCB.setToolTipText("Fast mode");
569971 fastCB.addItemListener(this);
570972
571
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
572
- trackCB.setToolTipText("Enable tracking");
573
- trackCB.addItemListener(this);
574
-
575
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
576
- screenfitButton.setToolTipText("Screen fit");
577
- 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);
578978
579979 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
580980 // screenfitpointButton.addActionListener(this);
....@@ -584,67 +984,156 @@
584984 oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
585985 snapobjectButton.addActionListener(this);
586986 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");
587991 }
588992
589
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
590
- flashSelectionButton.setToolTipText("Show selection");
591
- flashSelectionButton.addActionListener(this);
993
+ //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
592994
593
- oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
594
-
595
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
596
- 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");
597997 twoButton.addActionListener(this);
598
- oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
599
- fourButton.addActionListener(this);
600
- fourButton.setToolTipText("Show left panel only");
601
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
602
- sixButton.setToolTipText("2-column layout left");
603
- sixButton.addActionListener(this);
604
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
605
- 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");
6061002 threeButton.addActionListener(this);
607
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
608
- sevenButton.setToolTipText("3-column layout");
609
- 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);
6101009 //
6111010
612
- oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
613
- 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");
6141013 rootButton.addActionListener(this);
6151014
616
- 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);
6171016 closeButton.setToolTipText("Close tab");
6181017 closeButton.addActionListener(this);
6191018 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
6201019 //clearButton.addActionListener(this);
621
-
622
- cGridBag commandsPanel = new cGridBag();
1020
+
1021
+ cGridBag row1 = new cGridBag();
6231022
624
- commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
625
- 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");
6261110 editButton.addActionListener(this);
6271111
628
- commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
629
- uneditButton.setToolTipText("Unedit selection");
1112
+ editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1113
+ uneditButton.setToolTipText("Remove selection controls");
6301114 uneditButton.addActionListener(this);
6311115
632
- commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
633
- allParamsButton.setToolTipText("Edit all params");
1116
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
1117
+ allParamsButton.setToolTipText("Show all controle");
6341118 allParamsButton.addActionListener(this);
6351119
636
- commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1120
+ editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
6371121 clearPanelButton.setToolTipText("Clear edit panel");
6381122 clearPanelButton.addActionListener(this);
6391123
640
- commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1124
+ editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
6411125 unselectButton.setToolTipText("Unselect");
6421126 unselectButton.addActionListener(this);
6431127
644
- 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);
6451131
646
- oe.treePanel.add(commandsPanel);
647
- oe.treePanel.Return();
1132
+ editCommandsPanel.preferredHeight = 1;
1133
+
1134
+ SetPinStates(false);
1135
+// oe.treePanel.add(commandsPanel);
1136
+// oe.treePanel.Return();
6481137
6491138 // oe.aConstraints.gridx += 1;
6501139 // oe.aConstraints.weighty = 0;
....@@ -661,32 +1150,20 @@
6611150
6621151 JScrollPane jSP;
6631152 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
664
- jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
1153
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
6651154 ResetModel();
6661155
6671156 oe.treePanel.add(jSPPanel);
6681157 oe.treePanel.Return();
6691158
670
- cGridBag copyOptionsPanel = new cGridBag();
671
-
672
- copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
673
- colorCB.setToolTipText("Copy color when dropped");
674
- colorCB.addItemListener(this);
675
-
676
- copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
677
- materialCB.setToolTipText("Copy material when dropped");
678
- materialCB.addItemListener(this);
679
-
680
- copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
681
- textureCB.setToolTipText("Copy texture when dropped");
682
- textureCB.addItemListener(this);
683
-
684
- copyOptionsPanel.preferredHeight = 1;
6851159 oe.treePanel.add(copyOptionsPanel);
6861160 oe.treePanel.Return();
1161
+ cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
1162
+ versionSlider = (cNumberSlider)sliderPane.getComponent(1);
1163
+ sliderPane.preferredHeight = 1;
6871164
688
-// mainPanel.setDividerLocation(0.5); //1.0);
689
-// mainPanel.setResizeWeight(0.5);
1165
+// mainPanel.setDividerLocation(0.1); //1.0);
1166
+ mainPanel.setResizeWeight(0.4);
6901167
6911168 //jList.addListSelectionListener(this);
6921169 oe.jTree.addTreeSelectionListener(this);
....@@ -694,7 +1171,7 @@
6941171 //jTree.setEditable(true);
6951172 oe.jTree.setDragEnabled(true);
6961173 //jTree.setPreferredSize(new Dimension(10,10));
697
- jSP.setPreferredSize(new Dimension(100,200));
1174
+ //jSP.setPreferredSize(new Dimension(100,200));
6981175
6991176 oe.jTree.setCellRenderer(new cTreeModel.Renderer());
7001177
....@@ -706,29 +1183,49 @@
7061183 dgr.addDragGestureListener(this);
7071184 }catch(Exception e) {}
7081185 */
709
- radio.layout = sevenButton;
1186
+ radio.layout = sixButton; // sevenButton;
7101187 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
7111188 }
7121189
7131190 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
7141191 {
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
+
7151206 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
7161207 boxCB.setToolTipText("Display bounding boxes");
7171208 boxCB.addItemListener(this);
7181209
7191210 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
720
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
1211
+ zoomBoxCB.setToolTipText("Display only for wheel");
7211212 zoomBoxCB.addItemListener(this);
7221213
7231214 if (true) // Globals.ADVANCED)
7241215 {
725
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
726
- supportCB.setToolTipText("Enable rigging");
727
- 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);
7281223
7291224 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
7301225 // localCB.addItemListener(this);
7311226
1227
+ panel.Return();
1228
+
7321229 panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
7331230 crowdCB.setToolTipText("Used for crowds");
7341231 crowdCB.addItemListener(this);
....@@ -745,6 +1242,8 @@
7451242 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
7461243 // speakerMocapCB.addItemListener(this);
7471244
1245
+ panel.Return();
1246
+
7481247 if (false)
7491248 {
7501249 // handled in scripts
....@@ -759,34 +1258,74 @@
7591258 //constraints.gridy += 1;
7601259 panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
7611260 smoothfocusCB.addItemListener(this);
1261
+ panel.Return();
7621262 }
7631263
7641264 //constraints.gridx += 1;
7651265 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
7661266 // debugCB.addItemListener(this);
7671267
1268
+ panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
1269
+ trackCB.setToolTipText("Enable tracking target");
1270
+ trackCB.addItemListener(this);
1271
+
7681272 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
1273
+ oeilCB.setToolTipText("Move camera when tracking");
7691274 oeilCB.addItemListener(this);
7701275
1276
+ panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
1277
+ shadowCB.setToolTipText("When live compute shadows");
1278
+ shadowCB.addItemListener(this);
1279
+
1280
+ panel.Return();
1281
+ panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints);
1282
+ toggleTextureCB.setToolTipText("Load textures");
1283
+ toggleTextureCB.addItemListener(this);
1284
+
1285
+ panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints);
1286
+ toggleSwitchCB.setToolTipText("Choose a single item");
1287
+ toggleSwitchCB.addItemListener(this);
1288
+
1289
+ panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints);
1290
+ autokeepCB.setToolTipText("On structure change");
1291
+ autokeepCB.addItemListener(this);
1292
+
1293
+ panel.Return();
1294
+ if (Globals.ADVANCED)
1295
+ {
7711296 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
7721297 lookAtCB.setToolTipText("Look-at target");
7731298 lookAtCB.addItemListener(this);
1299
+ }
7741300
7751301 }
7761302
7771303 cGridBag fill = new cGridBag();
778
-
7791304 fill.preferredHeight = 200;
1305
+ cGridBag fill2 = new cGridBag();
1306
+ fill2.preferredHeight = 200;
1307
+ cGridBag fill3 = new cGridBag();
1308
+ fill3.preferredHeight = 200;
7801309
7811310 panel.add(fill);
1311
+ panel.add(fill2);
1312
+ panel.add(fill3);
7821313
7831314 }
7841315
7851316 void EditObject(Object3D obj)
7861317 {
7871318 cRadio radioButton = new cRadio(obj.name);
1319
+
1320
+ // June 2019. Patch to avoid bug with transparency.
1321
+ radioButton.hadMaterial = obj.material != null;
1322
+ if (!radioButton.hadMaterial)
1323
+ {
1324
+ obj.material = new cMaterial();
1325
+ }
1326
+
7881327 radioButton.SetObject(obj);
789
- radioButton.layout = sevenButton;
1328
+ radioButton.layout = sixButton; // sevenButton;
7901329 radioButton.SetCamera(cameraView.renderCamera, false);
7911330 radioButton.addActionListener(this);
7921331 radioPanel.add(radioButton);
....@@ -796,6 +1335,8 @@
7961335
7971336 void SetupViews(ObjEditor oe)
7981337 {
1338
+ theFrame = this;
1339
+
7991340 oe.SetupViews();
8001341
8011342 System.out.println("SetupViews");
....@@ -804,23 +1345,28 @@
8041345 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
8051346 }
8061347
807
- JCheckBox liveCB;
808
- JCheckBox supportCB;
809
- JCheckBox localCB;
810
- JCheckBox crowdCB;
811
- JCheckBox smoothCB;
812
- JCheckBox fastCB;
813
- JCheckBox slowCB;
814
- JCheckBox boxCB;
815
- JCheckBox zoomBoxCB;
816
- JCheckBox trackCB;
817
- JCheckBox smoothfocusCB;
1348
+ cToggleButton liveCB;
1349
+ cCheckBox supportCB;
1350
+ cCheckBox localCB;
1351
+ cCheckBox crowdCB;
1352
+ cCheckBox smoothCB;
1353
+ cToggleButton fastCB;
1354
+ cCheckBox slowCB;
1355
+ cCheckBox boxCB;
1356
+ cCheckBox zoomBoxCB;
1357
+ cCheckBox freezeCB;
1358
+ //cToggleButton trackCB;
1359
+ cCheckBox trackCB;
1360
+ cCheckBox smoothfocusCB;
8181361 // JCheckBox speakerMocapCB;
819
- JCheckBox speakerCameraCB;
820
- JCheckBox speakerFocusCB;
821
- JCheckBox debugCB;
822
- JCheckBox oeilCB;
823
- JCheckBox lookAtCB;
1362
+ cCheckBox speakerCameraCB;
1363
+ cCheckBox speakerFocusCB;
1364
+ cCheckBox debugCB;
1365
+
1366
+ cCheckBox oeilCB;
1367
+ cCheckBox shadowCB;
1368
+ cCheckBox autokeepCB;
1369
+ cCheckBox lookAtCB;
8241370
8251371 // static int COLOR = 1;
8261372 // static int MATERIAL = 2;
....@@ -828,9 +1374,9 @@
8281374
8291375 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
8301376
831
- JCheckBox colorCB;
832
- JCheckBox materialCB;
833
- JCheckBox textureCB;
1377
+ cCheckBox colorCB;
1378
+ cCheckBox materialCB;
1379
+ cCheckBox textureCB;
8341380
8351381 public void itemStateChanged(ItemEvent e)
8361382 {
....@@ -858,6 +1404,7 @@
8581404 } else if(e.getSource() == liveCB)
8591405 {
8601406 cameraView.ToggleLive();
1407
+ refreshContents(false);
8611408 }
8621409 else if(e.getSource() == supportCB)
8631410 {
....@@ -922,6 +1469,18 @@
9221469 {
9231470 cameraView.ToggleOeil();
9241471 }
1472
+ else if(e.getSource() == shadowCB)
1473
+ {
1474
+ Globals.COMPUTESHADOWWHENLIVE ^= true;
1475
+ }
1476
+ else if(e.getSource() == freezeCB)
1477
+ {
1478
+ Globals.FREEZEONMOVE ^= true;
1479
+ }
1480
+ else if(e.getSource() == autokeepCB)
1481
+ {
1482
+ Globals.REPLACEONMAKE ^= true;
1483
+ }
9251484 else if(e.getSource() == lookAtCB)
9261485 {
9271486 cameraView.ToggleLookAt();
....@@ -938,7 +1497,8 @@
9381497
9391498 /**/
9401499 //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this);
941
- TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1500
+ //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1501
+ TreePath path = objEditor.jTree.getSelectionPath();
9421502 if ((path == null) || (path.getPathCount() <= 1)) {
9431503 // We can't move the root node or an empty selection
9441504 return;
....@@ -1001,8 +1561,6 @@
10011561 }
10021562 }
10031563
1004
- String string = (String) object;
1005
-
10061564 System.out.println("Transfer = " + object + "; drop : " + target);
10071565 // if( object instanceof java.io.File[])
10081566 // {
....@@ -1010,6 +1568,8 @@
10101568 // objEditor.DropFile((java.io.File[]) object, true);
10111569 // return;
10121570 // }
1571
+
1572
+ String string = object.toString();
10131573
10141574 // File path for Mac and Windows
10151575 if (string.charAt(0) == '/' || string.charAt(1) == ':')
....@@ -1055,23 +1615,33 @@
10551615
10561616 assert target == objEditor.jTree;
10571617 TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y);
1618
+ Object3D destinationLeaf;
10581619 try {
1059
- Object3D dummy = (Composite) destinationPath.getLastPathComponent();
1620
+ destinationLeaf = (Composite) destinationPath.getLastPathComponent();
10601621 } catch (Exception e) {
10611622 System.out.println("destinationPath : " + destinationPath);
10621623 return;
10631624 }
10641625
1065
- if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1626
+ for (int i=group.selection.size(); --i>=0;)
10661627 {
1628
+ Object3D child = (Object3D)group.selection.elementAt(i);
1629
+
1630
+ // Cannot move into itself
1631
+ if (child == destinationLeaf)
1632
+ return;
1633
+ }
1634
+
1635
+// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1636
+// {
10671637 loadClipboard(true);
10681638 objEditor.jTree.setSelectionPath(destinationPath);
10691639 pasteInto(false, false);
1070
- } else {
1071
- loadClipboard(false);
1072
- objEditor.jTree.setSelectionPath(destinationPath);
1073
- pasteInto(false, false); // true); // ???
1074
- }
1640
+// } else {
1641
+// loadClipboard(false);
1642
+// objEditor.jTree.setSelectionPath(destinationPath);
1643
+// pasteInto(false, false); // true); // ???
1644
+// }
10751645 }
10761646 public void dropActionChanged(DropTargetDragEvent dtde)
10771647 // Called if the user has modified the current drop gesture
....@@ -1176,22 +1746,30 @@
11761746 {
11771747 //heightFieldItem = menu.add(new MenuItem("Height Field"));
11781748 //heightFieldItem.addActionListener(this);
1179
- gridItem = menu.add(new MenuItem("Grid"));
1180
- gridItem.addActionListener(this);
1181
- rectoidItem = menu.add(new MenuItem("Box"));
1182
- rectoidItem.addActionListener(this);
1183
- ellipsoidItem = menu.add(new MenuItem("Sphere"));
1184
- ellipsoidItem.addActionListener(this);
1185
- coneItem = menu.add(new MenuItem("Cone"));
1186
- coneItem.addActionListener(this);
1187
- torusItem = menu.add(new MenuItem("Torus"));
1188
- torusItem.addActionListener(this);
1189
- superItem = menu.add(new MenuItem("Superellipsoid"));
1190
- superItem.addActionListener(this);
1749
+// gridItem = menu.add(new MenuItem("Grid"));
1750
+// gridItem.addActionListener(this);
1751
+// rectoidItem = menu.add(new MenuItem("Box"));
1752
+// rectoidItem.addActionListener(this);
1753
+// ellipsoidItem = menu.add(new MenuItem("Sphere"));
1754
+// ellipsoidItem.addActionListener(this);
1755
+// coneItem = menu.add(new MenuItem("Cone"));
1756
+// coneItem.addActionListener(this);
1757
+// torusItem = menu.add(new MenuItem("Torus"));
1758
+// torusItem.addActionListener(this);
1759
+// superItem = menu.add(new MenuItem("Superellipsoid"));
1760
+// superItem.addActionListener(this);
1761
+
1762
+ cameraItem = menu.add(new MenuItem("Camera"));
1763
+ cameraItem.addActionListener(this);
1764
+
1765
+ if (!Globals.ADVANCED)
1766
+ {
11911767 kleinItem = menu.add(new MenuItem("Klein Bottle"));
11921768 kleinItem.addActionListener(this);
1193
- particleItem = menu.add(new MenuItem("Particle system"));
1194
- particleItem.addActionListener(this);
1769
+ }
1770
+
1771
+// particleItem = menu.add(new MenuItem("Particle system"));
1772
+// particleItem.addActionListener(this);
11951773 if (Globals.ADVANCED)
11961774 {
11971775 ragdollItem = menu.add(new MenuItem("Rag Walk"));
....@@ -1217,15 +1795,15 @@
12171795 }
12181796 bezierItem = menu.add(new MenuItem("Bezier Patch"));
12191797 bezierItem.addActionListener(this);
1220
- overlayItem = menu.add(new MenuItem("Overlay"));
1221
- overlayItem.addActionListener(this);
1222
- lightItem = menu.add(new MenuItem("Light"));
1223
- lightItem.addActionListener(this);
1798
+// overlayItem = menu.add(new MenuItem("Overlay"));
1799
+// overlayItem.addActionListener(this);
1800
+// lightItem = menu.add(new MenuItem("Light"));
1801
+// lightItem.addActionListener(this);
12241802 menu.add("-");
12251803 //superLoopItem = menu.add(new MenuItem("Super Loop"));
12261804 //superLoopItem.addActionListener(this);
1227
- loopItem = menu.add(new MenuItem("Loop"));
1228
- loopItem.addActionListener(this);
1805
+// loopItem = menu.add(new MenuItem("Loop"));
1806
+// loopItem.addActionListener(this);
12291807 doubleItem = menu.add(new MenuItem("Fork"));
12301808 doubleItem.addActionListener(this);
12311809 if (Globals.ADVANCED)
....@@ -1241,6 +1819,9 @@
12411819 animationItem.addItemListener(this);
12421820 animationItem.setState(Globals.ANIMATION);
12431821
1822
+ menu.add(archiveItem = new MenuItem("Archive3D..."));
1823
+ archiveItem.addActionListener(this);
1824
+
12441825 menu.add("-");
12451826 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
12461827 parseverticesItem.addActionListener(this);
....@@ -1253,6 +1834,8 @@
12531834 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
12541835 reduce34MorphItem.addActionListener(this);
12551836 menu.add("-");
1837
+ menu.add(memoryItem = new MenuItem("Memory Usage"));
1838
+ memoryItem.addActionListener(this);
12561839 menu.add(computeAOItem = new MenuItem("Compute AO"));
12571840 computeAOItem.addActionListener(this);
12581841
....@@ -1261,11 +1844,9 @@
12611844 mirrorItem = menu.add(new MenuItem("Mirror Poses"));
12621845 mirrorItem.addActionListener(this);
12631846 menu.add("-");
1264
- menu.add(memoryItem = new MenuItem("Memory Usage"));
1265
- memoryItem.addActionListener(this);
12661847 menu.add(analyzeItem = new MenuItem("Analyze"));
12671848 analyzeItem.addActionListener(this);
1268
- menu.add(dumpItem = new MenuItem("Dump"));
1849
+ menu.add(dumpItem = new MenuItem("Print"));
12691850 dumpItem.addActionListener(this);
12701851 // menu.add(pathItem = new MenuItem("From-to path"));
12711852 // pathItem.addActionListener(this);
....@@ -1406,9 +1987,34 @@
14061987 shadow.material = new cMaterial(obj.material);
14071988 shadow.material.diffuse = 0.0001f;
14081989 shadow.material.specular = 0.0001f;
1990
+ //shadow.projectedVertices[1].x = 300;
14091991
14101992 makeSomething(shadow);
14111993 }
1994
+
1995
+ private void ClearUnpinned()
1996
+ {
1997
+ //for (Object3D obj : listUI)
1998
+ for (int i=listUI.size(); --i>=0;)
1999
+ {
2000
+ Object3D obj = listUI.elementAt(i);
2001
+ if (!obj.pinned)
2002
+ {
2003
+ obj.CloseUI();
2004
+ listUI.remove(i);
2005
+ }
2006
+ }
2007
+ }
2008
+
2009
+ private void EditElement(Object3D elem, boolean newWindow)
2010
+ {
2011
+ // if (!(elem instanceof Composite))
2012
+ // newWindow = false;
2013
+ listUI.add(elem);
2014
+ elem.openEditWindow(this, newWindow); //, false);
2015
+ System.out.println("edit : " + elem);
2016
+ elem.editWindow.refreshContents(true); // ? new
2017
+ }
14122018
14132019 /**
14142020 * applyExample
....@@ -1653,7 +2259,7 @@
16532259 {
16542260 ScreenFit();
16552261 } else
1656
- if (source == switchItem)
2262
+ if (source == switchViewItem)
16572263 {
16582264 cVector v1 = new cVector();
16592265 cVector v2 = new cVector();
....@@ -1662,11 +2268,11 @@
16622268 objEditor.cameraView.renderCamera.setAim(v2, v1);
16632269 objEditor.cameraView.repaint();
16642270 } else
1665
- if (source == rectoidItem)
2271
+ if (source == rectoidItem || source == boxButton)
16662272 {
16672273 makeSomething(new Box());
16682274 } else
1669
- if (source == particleItem)
2275
+ if (source == particleItem || source == particlesButton)
16702276 {
16712277 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
16722278 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1745,27 +2351,27 @@
17452351
17462352 makeSomething(obj);
17472353 } else
1748
- if (source == gridItem)
2354
+ if (source == gridItem || source == gridButton)
17492355 {
17502356 makeSomething(new Grid());
17512357 } else
1752
- if (source == ellipsoidItem)
2358
+ if (source == ellipsoidItem || source == sphereButton)
17532359 {
17542360 makeSomething(new Sphere());
17552361 } else
1756
- if (source == coneItem)
2362
+ if (source == coneItem || source == coneButton)
17572363 {
17582364 makeSomething(new Cone());
17592365 } else
1760
- if (source == torusItem)
2366
+ if (source == torusItem || source == torusButton)
17612367 {
17622368 makeSomething(new Torus());
17632369 } else
1764
- if (source == superItem)
2370
+ if (source == superItem || source == superButton)
17652371 {
17662372 makeSomething(new Superellipsoid());
17672373 } else
1768
- if (source == kleinItem)
2374
+ if (source == kleinItem || source == kleinButton)
17692375 {
17702376 makeSomething(new Klein());
17712377 } else
....@@ -1785,7 +2391,7 @@
17852391 {
17862392 makeSomething(new BezierSurface());
17872393 } else
1788
- if (source == overlayItem)
2394
+ if (source == overlayItem || source == overlayButton)
17892395 {
17902396 /*
17912397 Object3D obj = new BezierSurface(5,8);
....@@ -1833,10 +2439,27 @@
18332439 s.setup();
18342440 makeSomething(s);
18352441 } else
1836
- if (source == lightItem)
2442
+ if (source == lightItem || source == lightButton)
18372443 {
18382444 makeSomething(new Light());
18392445 } else
2446
+// if (source == skybox1Button ||
2447
+// source == skybox2Button ||
2448
+// source == skybox3Button ||
2449
+// source == skybox4Button ||
2450
+// source == skybox5Button ||
2451
+// source == skybox6Button ||
2452
+// source == skybox7Button ||
2453
+// source == skybox11Button ||
2454
+// source == skybox12Button ||
2455
+// source == skybox13Button ||
2456
+// source == skybox14Button ||
2457
+// source == skybox15Button ||
2458
+// source == skybox16Button ||
2459
+// source == skybox17Button)
2460
+// {
2461
+// ChangeSkybox(source);
2462
+// } else
18402463 if (source == csgItem)
18412464 {
18422465 group(new CSG());
....@@ -1883,30 +2506,30 @@
18832506
18842507 group(g);
18852508 } else
1886
- if (source == loopItem)
2509
+ if (source == loopItem || source == loopButton)
18872510 {
18882511 Composite csg = new GroupLeaf();
18892512 csg.count = 5;
18902513 group(csg);
1891
- Composite child = new cGroup();
2514
+ Composite child = new cGroup("Branch");
18922515 csg.addChild(child);
18932516 child.addChild(csg);
18942517 } else
18952518 if (source == doubleItem)
18962519 {
1897
- Composite csg = new GroupLeaf();
2520
+ Composite csg = new GroupLeaf("Fork");
18982521 csg.count = 5;
18992522 group(csg);
1900
- Composite child = new cGroup();
2523
+ Composite child = new cGroup("Branch A");
19012524 csg.addChild(child);
19022525 child.addChild(csg);
1903
- child = new cGroup();
2526
+ child = new cGroup("Branch B");
19042527 csg.addChild(child);
19052528 child.addChild(csg);
19062529 } else
19072530 if (source == tripleItem)
19082531 {
1909
- Composite csg = new GroupLeaf();
2532
+ Composite csg = new GroupLeaf("Trident");
19102533 csg.count = 4;
19112534 group(csg);
19122535 Composite child = new cGroup();
....@@ -1922,7 +2545,7 @@
19222545 if (source == computeAOItem)
19232546 {
19242547 Globals.drawMode = CameraPane.OCCLUSION;
1925
- Globals.theRenderer.repaint();
2548
+ cameraView.repaint();
19262549 } else
19272550 if (source == recompileItem)
19282551 {
....@@ -1956,6 +2579,46 @@
19562579 {
19572580 DumpObject();
19582581 } else
2582
+ if (source == minButton)
2583
+ {
2584
+ Minimize();
2585
+ } else
2586
+ if (source == maxButton)
2587
+ {
2588
+ Maximize();
2589
+ } else
2590
+ if (source == fullButton)
2591
+ {
2592
+ ToggleFullScreen();
2593
+ } else
2594
+ if (source == undoButton)
2595
+ {
2596
+ // Go to previous version
2597
+ //if (!Undo())
2598
+ //java.awt.Toolkit.getDefaultToolkit().beep();
2599
+ Undo();
2600
+ } else
2601
+ if (source == restoreButton)
2602
+ {
2603
+ // Restore current version
2604
+ Restore();
2605
+ } else
2606
+ if (source == replaceButton)
2607
+ {
2608
+ // Overwrite current version
2609
+ Replace();
2610
+ } else
2611
+ if (source == redoButton)
2612
+ {
2613
+ // Go to next version
2614
+ Redo();
2615
+ } else
2616
+ if (source == saveButton)
2617
+ {
2618
+ // Save a new version
2619
+ if (!Save(true))
2620
+ java.awt.Toolkit.getDefaultToolkit().beep();
2621
+ } else
19592622 if (source == oneStepButton)
19602623 {
19612624 Globals.ONESTEP = true;
....@@ -1963,17 +2626,14 @@
19632626 } else
19642627 if (source == screenfitButton)
19652628 {
1966
- //Reload(lastConverter, lastFilename, true);
19672629 ScreenFit();
19682630 } else
19692631 if (source == screenfitpointButton)
19702632 {
1971
- //Reload(lastConverter, lastFilename, true);
19722633 ScreenFitPoint();
19732634 } else
19742635 if (source == snapobjectButton)
19752636 {
1976
- //Reload(lastConverter, lastFilename, true);
19772637 SnapObject();
19782638 } else
19792639 // if (event.getSource() == recompileButton)
....@@ -2337,7 +2997,7 @@
23372997 {
23382998 StepAll();
23392999 } else
2340
- if (source == clearItem) // || event.getSource() == clearButton)
3000
+ if (source == deleteItem) // || event.getSource() == clearButton)
23413001 {
23423002 //int indices[] = jList.getSelectedIndices();
23433003 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2349,9 +3009,9 @@
23493009 {
23503010 ClearSelection(true);
23513011 } else
2352
- if (source == grabItem)
3012
+ if (source == grabItem || source == groupButton)
23533013 {
2354
- group(new cGroup(), true);
3014
+ group(new cGroup(), false); // true);
23553015 } else
23563016 if (source == hideItem)
23573017 {
....@@ -2369,11 +3029,11 @@
23693029 {
23703030 makeSomething(new Camera());
23713031 } else
2372
- if (source == compositeItem)
3032
+ if (source == compositeItem || source == compositeButton)
23733033 {
23743034 group(new Composite());
23753035 } else
2376
- if (source == randomItem)
3036
+ if (source == switchItem || source == switchButton)
23773037 {
23783038 RandomNode random = new RandomNode();
23793039 group(random);
....@@ -2475,7 +3135,7 @@
24753135 {
24763136 group(new cLinker());
24773137 } else
2478
- if (source == textureItem)
3138
+ if (source == textureItem || source == textureButton)
24793139 {
24803140 group(new TextureNode());
24813141 } else
....@@ -2495,17 +3155,30 @@
24953155 {
24963156 CastShadow(2);
24973157 } else
2498
- if (source == ungroupItem)
3158
+ if (source == ungroupItem || source == ungroupButton)
24993159 {
2500
- //ungroup();
3160
+ boolean hasRoot = false;
3161
+
25013162 for (int i=0; i<group.selection.size(); i++)
25023163 {
2503
- Ungroup(group.selection.get(i));
3164
+ if (group.selection.get(i) == group)
3165
+ {
3166
+ hasRoot = true;
3167
+ break;
3168
+ }
25043169 }
25053170
2506
- ClearSelection(false);
2507
-
2508
- refreshContents();
3171
+ if (!hasRoot)
3172
+ {
3173
+ for (int i=0; i<group.selection.size(); i++)
3174
+ {
3175
+ Ungroup(group.selection.get(i));
3176
+ }
3177
+
3178
+ ClearSelection(false);
3179
+
3180
+ refreshContents();
3181
+ }
25093182 } else
25103183 if (source == genUVItem)
25113184 {
....@@ -2517,7 +3190,7 @@
25173190 } else
25183191 if (source == genNormalsMESHItem)
25193192 {
2520
- GenNormals(true); // TODO
3193
+ GenNormalsMESH();
25213194 } else
25223195 if (source == genNormalsORGANItem)
25233196 {
....@@ -2582,6 +3255,22 @@
25823255 if (source == unmarkleavesItem)
25833256 {
25843257 MarkLeaves(false);
3258
+ } else
3259
+ if (source == rewindleavesItem)
3260
+ {
3261
+ RewindLeaves(true);
3262
+ } else
3263
+ if (source == unrewindleavesItem)
3264
+ {
3265
+ RewindLeaves(false);
3266
+ } else
3267
+ if (source == randomleavesItem)
3268
+ {
3269
+ RandomLeaves(true);
3270
+ } else
3271
+ if (source == unrandomleavesItem)
3272
+ {
3273
+ RandomLeaves(false);
25853274 } else
25863275 if (source == flipVItem)
25873276 {
....@@ -2790,7 +3479,7 @@
27903479 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
27913480 {
27923481 obj = (Object3D)e.nextElement();
2793
- obj.SetBumpTexture(null);
3482
+ obj.ResetBumpTexture();
27943483 }
27953484
27963485 refreshContents();
....@@ -2806,6 +3495,31 @@
28063495
28073496 refreshContents();
28083497 } else
3498
+ if (source == embedTexturesItem)
3499
+ {
3500
+ Object3D obj;
3501
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3502
+ {
3503
+ obj = (Object3D)e.nextElement();
3504
+ obj.EmbedTextures(true);
3505
+ }
3506
+
3507
+ refreshContents();
3508
+ } else
3509
+ if (source == deEmbedTexturesItem)
3510
+ {
3511
+ Object3D obj;
3512
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3513
+ {
3514
+ obj = (Object3D)e.nextElement();
3515
+ obj.EmbedTextures(false);
3516
+ }
3517
+
3518
+ CameraPane.texturepigment.clear();
3519
+ CameraPane.texturebump.clear();
3520
+
3521
+ refreshContents();
3522
+ } else
28093523 if (source == flashSelectionButton)
28103524 {
28113525 CameraPane.flash = true;
....@@ -2817,6 +3531,10 @@
28173531 if (source == twoButton)
28183532 {
28193533 radio.layout = twoButton;
3534
+
3535
+ if (CameraPane.FULLSCREEN)
3536
+ fullscreenLayout = radio.layout;
3537
+
28203538 // bug
28213539 //gridPanel.setDividerLocation(1.0);
28223540 //bigPanel.setDividerLocation(0.0);
....@@ -2849,10 +3567,31 @@
28493567 bigThree.ClearUI();
28503568 bigThree.add(centralPanel);
28513569 bigThree.FlushUI();
3570
+
3571
+ cameraView.requestFocusInWindow();
3572
+
3573
+// refreshContents(true);
3574
+//
3575
+// try
3576
+// {
3577
+// java.awt.Robot bot = new java.awt.Robot();
3578
+// int mask = InputEvent.BUTTON1_MASK;
3579
+// bot.mouseMove(100, 100);
3580
+// bot.mousePress(mask);
3581
+// bot.mouseRelease(mask);
3582
+// }
3583
+// catch (Exception e)
3584
+// {
3585
+//
3586
+// }
3587
+
28523588 } else
28533589 if (source == threeButton)
28543590 {
28553591 radio.layout = threeButton;
3592
+
3593
+ if (CameraPane.FULLSCREEN)
3594
+ fullscreenLayout = radio.layout;
28563595
28573596 // bigThree.remove(scenePanel);
28583597 // bigThree.remove(centralPanel);
....@@ -2882,13 +3621,18 @@
28823621 // centralPanel.setVisible(true);
28833622 // XYZPanel.setVisible(true);
28843623 bigThree.ClearUI();
3624
+ bigThree.add(scenePanel);
28853625 bigThree.add(centralPanel);
2886
- bigThree.add(XYZPanel);
28873626 bigThree.FlushUI();
3627
+
3628
+ cameraView.requestFocusInWindow();
28883629 } else
28893630 if (source == fourButton)
28903631 {
28913632 radio.layout = fourButton;
3633
+
3634
+ if (CameraPane.FULLSCREEN)
3635
+ fullscreenLayout = radio.layout;
28923636
28933637 // bigThree.remove(scenePanel);
28943638 // bigThree.remove(centralPanel);
....@@ -2920,10 +3664,15 @@
29203664 bigThree.ClearUI();
29213665 bigThree.add(scenePanel);
29223666 bigThree.FlushUI();
3667
+
3668
+ cameraView.requestFocusInWindow();
29233669 } else
29243670 if (source == sixButton)
29253671 {
29263672 radio.layout = sixButton;
3673
+
3674
+ if (CameraPane.FULLSCREEN)
3675
+ fullscreenLayout = radio.layout;
29273676
29283677 // bigThree.remove(scenePanel);
29293678 // bigThree.remove(centralPanel);
....@@ -2953,13 +3702,18 @@
29533702 // centralPanel.setVisible(true);
29543703 // XYZPanel.setVisible(false);
29553704 bigThree.ClearUI();
2956
- bigThree.add(scenePanel);
29573705 bigThree.add(centralPanel);
3706
+ bigThree.add(scenePanel);
29583707 bigThree.FlushUI();
3708
+
3709
+ cameraView.requestFocusInWindow();
29593710 } else
29603711 if (source == sevenButton)
29613712 {
29623713 radio.layout = sevenButton;
3714
+
3715
+ if (CameraPane.FULLSCREEN)
3716
+ fullscreenLayout = radio.layout;
29633717
29643718 // bigThree.remove(scenePanel);
29653719 // bigThree.remove(centralPanel);
....@@ -2993,6 +3747,8 @@
29933747 bigThree.add(centralPanel);
29943748 bigThree.add(XYZPanel);
29953749 bigThree.FlushUI();
3750
+
3751
+ cameraView.requestFocusInWindow();
29963752 } else
29973753 if (source == rootButton)
29983754 {
....@@ -3004,6 +3760,7 @@
30043760 EditObject(obj);
30053761 }
30063762
3763
+ cameraView.requestFocusInWindow();
30073764 refreshContents(true);
30083765 } else
30093766 if (source == closeButton)
....@@ -3013,22 +3770,37 @@
30133770 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
30143771 {
30153772 ab = (cRadio)e.nextElement();
3016
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3773
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
30173774 {
3775
+ // Patch to avoid bug with transparency.
3776
+ if (!ab.hadMaterial)
3777
+ {
3778
+ ab.object.material = null;
3779
+ }
3780
+
30183781 buttonGroup.remove(ab);
30193782 radioPanel.remove(ab);
30203783
3021
- ab.GetObject().editWindow = null;
3784
+ //ab.GetObject().editWindow = null;
3785
+ ab.GetObject().manipWindow = null;
30223786 // ab.GetObject().objectUI = null; // ?????????
30233787
30243788 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
30253789 break;
30263790 }
30273791 }
3792
+
3793
+ cameraView.requestFocusInWindow();
30283794 refreshContents(true);
30293795 } else
30303796 if (source == editItem || source == editButton)
30313797 {
3798
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3799
+ {
3800
+ Object3D child = (Object3D)e.nextElement();
3801
+ child.pinned = true;
3802
+ }
3803
+
30323804 EditSelection(false);
30333805 } else
30343806 if (source == uneditButton)
....@@ -3038,6 +3810,7 @@
30383810 Object3D child = (Object3D)e.nextElement();
30393811 if(child.editWindow != null)
30403812 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3813
+ child.pinned = false;
30413814 child.CloseUI();
30423815 listUI.remove(child);
30433816
....@@ -3054,6 +3827,7 @@
30543827 //copy.ClearUI();
30553828 for (Object3D obj : listUI)
30563829 {
3830
+ obj.pinned = false;
30573831 obj.CloseUI();
30583832 }
30593833 listUI.clear();
....@@ -3063,7 +3837,7 @@
30633837 {
30643838 assert(copy == group);
30653839
3066
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3840
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
30673841
30683842 for (Object3D obj : listUI)
30693843 {
....@@ -3112,6 +3886,9 @@
31123886 }
31133887
31143888 copy = group;
3889
+
3890
+ SetUndoStates();
3891
+
31153892 //Globals.theRenderer.object = group;
31163893 if(!useclient)
31173894 {
....@@ -3128,7 +3905,9 @@
31283905 sideView.object = group;
31293906 }
31303907
3131
-// fix "+" issue group.editWindow = this;
3908
+// fix "+" issue
3909
+ //group.editWindow = this;
3910
+ group.manipWindow = this;
31323911
31333912 /*
31343913 currentLayout = radio.layout;
....@@ -3136,18 +3915,27 @@
31363915 currentLayout = sevenButton;
31373916 */
31383917 radio.layout.doClick();
3918
+
3919
+ ClearUnpinned();
3920
+ //Grafreed.Assert(group != null);
3921
+ //Grafreed.Assert(group.selection != null);
3922
+ SetPinStates(group.selection == null || group.selection.size() > 0);
3923
+ if (group.selection == null || group.selection.size() == 1)
3924
+ EditSelection(false);
31393925 keepparent = group.parent;
31403926 // PARENT = NULL or not???
31413927 //group.parent = null; // ROOT
31423928 //group.attributes = -1;
31433929 ResetModel();
3930
+
3931
+ cameraView.requestFocusInWindow();
31443932 refreshContents(true);
31453933 } else if (event.getSource() == editCameraItem)
31463934 {
31473935 cameraView.ProtectCamera();
31483936 cameraView.repaint();
31493937 return;
3150
- } else if (event.getSource() == revertCameraItem)
3938
+ } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton)
31513939 {
31523940 cameraView.RevertCamera();
31533941 cameraView.repaint();
....@@ -3164,7 +3952,6 @@
31643952 }
31653953
31663954 boolean useclient = false;
3167
- cRadio radio;
31683955
31693956 void ToggleRoot()
31703957 {
....@@ -3403,7 +4190,8 @@
34034190
34044191 int size = obj.MemorySize();
34054192
3406
- System.err.println((size/1024) + " KB is the size of " + obj);
4193
+ //System.err.println((size/1024) + " KB is the size of " + obj);
4194
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
34074195 }
34084196 }
34094197 catch (Exception e)
....@@ -3484,6 +4272,13 @@
34844272 void GenNormals(boolean crease)
34854273 {
34864274 group.GenNormalsS(crease);
4275
+
4276
+ refreshContents();
4277
+ }
4278
+
4279
+ void GenNormalsMESH()
4280
+ {
4281
+ group.GenNormalsMeshS();
34874282
34884283 refreshContents();
34894284 }
....@@ -3719,7 +4514,7 @@
37194514
37204515 try
37214516 {
3722
- texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
4517
+ texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres);
37234518 }
37244519 catch (Exception e)
37254520 {
....@@ -4111,6 +4906,18 @@
41114906 refreshContents();
41124907 }
41134908
4909
+ void RewindLeaves(boolean hide)
4910
+ {
4911
+ group.selection.RewindLeaves(hide);
4912
+ refreshContents();
4913
+ }
4914
+
4915
+ void RandomLeaves(boolean hide)
4916
+ {
4917
+ group.selection.RandomLeaves(hide);
4918
+ refreshContents();
4919
+ }
4920
+
41144921 void SetTexRes(int tr)
41154922 {
41164923 group.selection.SetTexRes(tr);
....@@ -4182,28 +4989,25 @@
41824989 // }
41834990 // }
41844991
4185
- static boolean allparams = true;
4186
-
4187
- static Vector<Object3D> listUI = new Vector<Object3D>();
4188
-
41894992 void EditSelection(boolean newWindow)
41904993 {
4994
+ if (group.selection == null)
4995
+ {
4996
+ EditElement(group, newWindow); // ? new
4997
+ return;
4998
+ }
4999
+
41915000 // aConstraints.gridy = 0;
41925001 for (int i=0; i<group.selection.size(); i++)
41935002 {
41945003 //System.out.println("edit : " + objectPanel.indexOfTab("Material"));
41955004 //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false);
4196
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
5005
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
41975006
41985007 Object3D elem = (Object3D)group.selection.elementAt(i);
41995008 if(elem != group || !newWindow)
42005009 {
4201
- // if (!(elem instanceof Composite))
4202
- // newWindow = false;
4203
- listUI.add(elem);
4204
- elem.openEditWindow(this, newWindow); //, false);
4205
- System.out.println("edit : " + elem);
4206
- elem.editWindow.refreshContents(true); // ? new
5010
+ EditElement(elem, newWindow); // ? new
42075011 }
42085012 }
42095013 }
....@@ -4278,7 +5082,8 @@
42785082 //new Exception().printStackTrace();
42795083
42805084 freezemodel = true;
4281
-
5085
+ ClearUnpinned();
5086
+
42825087 /**/
42835088 //switch (event.id)
42845089 {
....@@ -4286,7 +5091,6 @@
42865091 //case 702: // Event.LIST_DESELECT
42875092 group.deselectAll();
42885093 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4289
- objEditor.ClearInfo(); // .GetMaterial());
42905094 if (tps != null)
42915095 {
42925096 for (int i=0; i < tps.length; i++)
....@@ -4295,10 +5099,8 @@
42955099
42965100 //if (child.parent != null)
42975101 //child.parent.addSelectee(child);
5102
+ objEditor.SetMaterial(child);
42985103 group.addSelectee(child);
4299
- objEditor.SetMaterial(child); // .GetMaterial());
4300
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4301
- System.err.println("info : " + child.GetPath());
43025104 }
43035105 }
43045106 // else
....@@ -4308,15 +5110,13 @@
43085110 // System.err.println("info : " + group.GetPath());
43095111 // }
43105112
4311
- objEditor.SetText(); // jan 2014
4312
-
43135113 if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
43145114 CameraPane.flash = true;
43155115
43165116 if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
43175117 // a camera
43185118 {
4319
- if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
5119
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace
43205120 {
43215121 CameraPane.camerachangeframe = 0; // don't refuse it
43225122 Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
....@@ -4325,6 +5125,13 @@
43255125 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
43265126 }
43275127
5128
+ if (tps != null && tps.length == 1)
5129
+ {
5130
+ EditSelection(false);
5131
+ }
5132
+
5133
+ SetPinStates(tps != null && tps.length > 0);
5134
+
43285135 refreshContents();
43295136 //return true;
43305137 }
....@@ -4333,6 +5140,35 @@
43335140
43345141 freezemodel = false;
43355142 }
5143
+
5144
+ void SetPinStates(boolean enabled)
5145
+ {
5146
+ editButton.setEnabled(enabled);
5147
+ uneditButton.setEnabled(enabled);
5148
+ unselectButton.setEnabled(enabled);
5149
+ flashSelectionButton.setEnabled(enabled);
5150
+ }
5151
+
5152
+ void refreshContents(boolean cp)
5153
+ {
5154
+ if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
5155
+ if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
5156
+ {
5157
+ objEditor.ClearInfo(); // .GetMaterial());
5158
+
5159
+ for (int i=0; i < group.selection.Size(); i++)
5160
+ {
5161
+ Object3D child = (Object3D) group.selection.get(i);
5162
+
5163
+ objEditor.AddInfo(child, this, true);
5164
+ System.err.println("info : " + child.GetPath());
5165
+ }
5166
+
5167
+ objEditor.SetText(); // jan 2014
5168
+ }
5169
+
5170
+ super.refreshContents(cp);
5171
+ }
43365172
43375173 void linkSomething(Object3D thing)
43385174 {
....@@ -4404,6 +5240,7 @@
44045240 {
44055241 if (group.selection.isEmpty())
44065242 return;
5243
+
44075244 Grafreed.clipboardIsTempGroup = false;
44085245 Composite tGroup = null;
44095246 if (group.selection.size() > 0) // 1)
....@@ -4414,6 +5251,8 @@
44145251
44155252 if (cut)
44165253 {
5254
+// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save.
5255
+// Save();
44175256 //int indices[] = jList.getSelectedIndices();
44185257 //for (int i = indices.length - 1; i >= 0; i--)
44195258 //jList.remove(indices[i]);
....@@ -4503,8 +5342,10 @@
45035342 }
45045343
45055344 }
5345
+
45065346 if (Grafreed.clipboardIsTempGroup)
45075347 Grafreed.clipboard = tGroup;
5348
+
45085349 if (cut)
45095350 {
45105351 ResetModel();
....@@ -4514,6 +5355,10 @@
45145355
45155356 void paste(boolean expand)
45165357 {
5358
+ if (Globals.REPLACEONMAKE)
5359
+ Save();
5360
+ boolean keep = Globals.REPLACEONMAKE;
5361
+ Globals.REPLACEONMAKE = false;
45175362 // if (GrafreeD.clipboard == null)
45185363 // return;
45195364 boolean first = true;
....@@ -4573,6 +5418,7 @@
45735418 Grafreed.clipboard.get(0).parent = keepparent;
45745419 }
45755420
5421
+ Globals.REPLACEONMAKE = keep;
45765422 ResetModel();
45775423 refreshContents();
45785424 }
....@@ -4708,6 +5554,10 @@
47085554
47095555 void group(Object3D csg, boolean grab)
47105556 {
5557
+ if (Globals.REPLACEONMAKE)
5558
+ Save();
5559
+ boolean keep = Globals.REPLACEONMAKE;
5560
+ Globals.REPLACEONMAKE = false;
47115561 if (//false) // why??
47125562 !group.selection.isEmpty())
47135563 {
....@@ -4821,10 +5671,15 @@
48215671 //node.add(csg);
48225672 //makeSomething(node);
48235673 makeSomething(csg);
5674
+ Globals.REPLACEONMAKE = keep;
48245675 }
48255676
48265677 void Ungroup(Object3D g)
48275678 {
5679
+ if (Globals.REPLACEONMAKE)
5680
+ Save();
5681
+ boolean keep = Globals.REPLACEONMAKE;
5682
+ Globals.REPLACEONMAKE = false;
48285683 if (g instanceof HiddenObject)
48295684 {
48305685 HiddenObject h = (HiddenObject) g;
....@@ -4841,6 +5696,7 @@
48415696 objEditor.makeSomething(g.get(i), false);
48425697 }
48435698 }
5699
+ Globals.REPLACEONMAKE = keep;
48445700 }
48455701
48465702 void ungroup()
....@@ -5129,7 +5985,44 @@
51295985 cButton clearpanelButton;
51305986 cButton unselectButton;
51315987
5988
+ cButton restoreCameraButton;
5989
+
5990
+ cButton saveButton;
51325991 cButton oneStepButton;
5992
+
5993
+ cButton groupButton;
5994
+ cButton ungroupButton;
5995
+ cButton compositeButton;
5996
+ cButton switchButton;
5997
+ cButton loopButton;
5998
+ cButton textureButton;
5999
+
6000
+ cButton skybox1Button;
6001
+ cButton skybox2Button;
6002
+ cButton skybox3Button;
6003
+ cButton skybox4Button;
6004
+ cButton skybox5Button;
6005
+ cButton skybox6Button;
6006
+ cButton skybox7Button;
6007
+
6008
+ cButton skybox11Button;
6009
+ cButton skybox12Button;
6010
+ cButton skybox13Button;
6011
+ cButton skybox14Button;
6012
+ cButton skybox15Button;
6013
+ cButton skybox16Button;
6014
+ cButton skybox17Button;
6015
+
6016
+ cButton gridButton;
6017
+ cButton boxButton;
6018
+ cButton sphereButton;
6019
+ cButton coneButton;
6020
+ cButton torusButton;
6021
+ cButton superButton;
6022
+ cButton kleinButton;
6023
+ cButton particlesButton;
6024
+ cButton overlayButton;
6025
+ cButton lightButton;
51336026
51346027 cButton screenfitButton;
51356028 cButton screenfitpointButton;
....@@ -5142,14 +6035,6 @@
51426035
51436036 cButton setsupportButton;
51446037
5145
- cButton twoButton;
5146
- cButton sixButton;
5147
- cButton threeButton;
5148
- cButton sevenButton;
5149
- cButton fourButton; // full panel
5150
- cButton oneButton; // full XYZ
5151
- //cButton currentLayout;
5152
-
51536038 //
51546039 //Composite
51556040 Object3D // to do !!
....@@ -5159,11 +6044,11 @@
51596044 //JTree jTree;
51606045 private MenuItem lookAtItem;
51616046 private MenuItem lookFromItem;
5162
- private MenuItem switchItem;
6047
+ private MenuItem switchViewItem;
51636048 private MenuItem cutItem;
51646049 private MenuItem undoItem;
51656050 private MenuItem redoItem;
5166
- private MenuItem duplicateItem;
6051
+ private JMenuItem duplicateItem;
51676052 private MenuItem cloneItem;
51686053 private MenuItem cloneSupportItem;
51696054 private MenuItem overwriteGeoItem;
....@@ -5191,7 +6076,7 @@
51916076 private MenuItem pasteLinkItem;
51926077 private MenuItem pasteCloneItem;
51936078 private MenuItem pasteExpandItem;
5194
- private MenuItem clearItem;
6079
+ private MenuItem deleteItem;
51956080 private MenuItem clearAllItem;
51966081 private MenuItem genUVItem;
51976082 private MenuItem genNormalsMESHItem;
....@@ -5226,6 +6111,10 @@
52266111 private MenuItem showleavesItem;
52276112 private MenuItem markleavesItem;
52286113 private MenuItem unmarkleavesItem;
6114
+ private MenuItem rewindleavesItem;
6115
+ private MenuItem unrewindleavesItem;
6116
+ private MenuItem randomleavesItem;
6117
+ private MenuItem unrandomleavesItem;
52296118
52306119 private MenuItem flipVItem;
52316120 private MenuItem unflipVItem;
....@@ -5247,7 +6136,7 @@
52476136 private MenuItem frontItem;
52486137 private MenuItem cameraItem;
52496138 private MenuItem compositeItem;
5250
- private MenuItem randomItem;
6139
+ private MenuItem switchItem;
52516140 private MenuItem physicsItem;
52526141 private MenuItem frameselectorItem;
52536142 private MenuItem scriptNodeItem;
....@@ -5271,6 +6160,8 @@
52716160 private MenuItem attachBumpItem;
52726161 private MenuItem detachBumpItem;
52736162 private MenuItem pigmentBumpItem;
6163
+ private MenuItem embedTexturesItem;
6164
+ private MenuItem deEmbedTexturesItem;
52746165
52756166 private MenuItem particleItem;
52766167 private MenuItem ragdollItem;
....@@ -5321,5 +6212,5 @@
53216212
53226213 Menu cameraMenu;
53236214 MenuItem editCameraItem;
5324
- MenuItem revertCameraItem;
6215
+ MenuItem restoreCameraItem;
53256216 }