Normand Briere
2019-08-07 59de607850161a26863f92961d53caae7a2dabc8
GroupEditor.java
....@@ -16,6 +16,7 @@
1616 //import buoy.widget.BFileChooser;
1717
1818 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
19
+ Grafreed.iResourceCallBack,
1920 ObjectUI,
2021 Runnable,
2122 ActionListener,
....@@ -23,6 +24,314 @@
2324 DragGestureListener, DragSourceListener, DropTargetListener,
2425 ItemListener // ListSelectionListener
2526 {
27
+
28
+ public void AddSkyboxButton(String f, String s, cGridBag row)
29
+ {
30
+ cButton skyboxButton;
31
+ final String path = "cubemaps/" + f + "-skyboxes/" + s;
32
+ row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.NIMBUSLAF));
33
+ //row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF));
34
+ skyboxButton.setToolTipText(s);
35
+ skyboxButton.addActionListener(new ActionListener()
36
+ {
37
+ @Override
38
+ public void actionPerformed(ActionEvent e)
39
+ {
40
+ ChangeSkybox(path);
41
+ }
42
+ });
43
+ }
44
+
45
+ public void AddSkyboxTab0(JTabbedPane skyboxpanel)
46
+ {
47
+ cGridBag tab0 = new cGridBag().setVertical(true);
48
+
49
+ tab0.setName("Urban");
50
+ skyboxpanel.add(tab0);
51
+
52
+ cGridBag row0 = new cGridBag();
53
+ cGridBag row1 = new cGridBag();
54
+ cGridBag row2 = new cGridBag();
55
+ cGridBag row3 = new cGridBag();
56
+ cGridBag row4 = new cGridBag();
57
+ cGridBag row5 = new cGridBag();
58
+ cGridBag row6 = new cGridBag();
59
+
60
+ AddSkyboxButton("default", "rgb", row0);
61
+ //AddSkyboxButton("default", "cornell", row0);
62
+ AddSkyboxButton("penguins", "dust", row0);
63
+ AddSkyboxButton("penguins", "tropic", row0);
64
+ AddSkyboxButton("penguins", "yonder", row0);
65
+
66
+ AddSkyboxButton("default", "uffizi", row1);
67
+ AddSkyboxButton("bridge", "Bridge", row1);
68
+ AddSkyboxButton("bridge", "Bridge2", row1);
69
+ AddSkyboxButton("urban", "GamlaStan2", row1);
70
+
71
+ AddSkyboxButton("urban", "Parliament", row2);
72
+ AddSkyboxButton("urban", "Roundabout", row2);
73
+ AddSkyboxButton("urban", "SaintLazarusChurch", row2);
74
+ AddSkyboxButton("urban", "SaintLazarusChurch2", row2);
75
+
76
+ AddSkyboxButton("urban", "SaintLazarusChurch3", row3);
77
+ AddSkyboxButton("urban", "UnionSquare", row3);
78
+ AddSkyboxButton("urban", "Medborgarplatsen", row3);
79
+ AddSkyboxButton("park", "BerzeliiPark", row3);
80
+
81
+ AddSkyboxButton("park", "Buddha", row4);
82
+ AddSkyboxButton("park", "CNTower2", row4);
83
+ AddSkyboxButton("park", "NiagaraFalls1", row4);
84
+ AddSkyboxButton("park", "NiagaraFalls3", row4);
85
+
86
+ AddSkyboxButton("park", "Park", row5);
87
+ AddSkyboxButton("park", "Pond", row5);
88
+ AddSkyboxButton("park", "Skansen", row5);
89
+ AddSkyboxButton("park", "Skansen2", row5);
90
+
91
+ AddSkyboxButton("park", "Skansen3", row6);
92
+ AddSkyboxButton("park", "Skansen4", row6);
93
+ AddSkyboxButton("park", "Skansen5", row6);
94
+ AddSkyboxButton("persson", "VancouverConventionCentre", row6);
95
+
96
+ tab0.add(row0);
97
+ tab0.add(row1);
98
+ tab0.add(row2);
99
+ tab0.add(row3);
100
+ tab0.add(row4);
101
+ tab0.add(row5);
102
+ tab0.add(row6);
103
+
104
+ for (int i=5; --i>=0;)
105
+ {
106
+ //oe.toolboxPanel.Return();
107
+ //tab0.add(new cGridBag());
108
+ }
109
+ }
110
+
111
+ public void AddSkyboxTab1(JTabbedPane skyboxpanel)
112
+ {
113
+ cGridBag tab0 = new cGridBag().setVertical(true);
114
+
115
+ tab0.setName("Nature");
116
+ skyboxpanel.add(tab0);
117
+
118
+ cGridBag row0 = new cGridBag();
119
+ cGridBag row1 = new cGridBag();
120
+ cGridBag row2 = new cGridBag();
121
+ cGridBag row3 = new cGridBag();
122
+ cGridBag row4 = new cGridBag();
123
+ cGridBag row5 = new cGridBag();
124
+ cGridBag row6 = new cGridBag();
125
+
126
+ AddSkyboxButton("beach", "HeartInTheSand", row0);
127
+ AddSkyboxButton("beach", "LarnacaBeach", row0);
128
+ AddSkyboxButton("beach", "PalmTrees", row0);
129
+ AddSkyboxButton("beach", "Tenerife", row0);
130
+
131
+ AddSkyboxButton("beach", "Tenerife2", row1);
132
+ AddSkyboxButton("beach", "Tenerife3", row1);
133
+ AddSkyboxButton("field", "FishPond", row1);
134
+ AddSkyboxButton("field", "Footballfield", row1);
135
+
136
+ AddSkyboxButton("field", "Meadow", row2);
137
+ AddSkyboxButton("field", "Sorsele", row2);
138
+ AddSkyboxButton("field", "Sorsele2", row2);
139
+ AddSkyboxButton("field", "Sorsele3", row2);
140
+
141
+ AddSkyboxButton("forest", "Brudslojan", row3);
142
+ AddSkyboxButton("forest", "Langholmen2", row3);
143
+ AddSkyboxButton("forest", "Plants", row3);
144
+ AddSkyboxButton("mountain", "Maskonaive", row3);
145
+
146
+ AddSkyboxButton("mountain", "Maskonaive2", row4);
147
+ AddSkyboxButton("mountain", "Maskonaive3", row4);
148
+ AddSkyboxButton("mountain", "Teide", row4);
149
+ AddSkyboxButton("park", "Tantolunden4", row4);
150
+
151
+ AddSkyboxButton("park", "Stairs", row5);
152
+ AddSkyboxButton("default", "skycube", row6);
153
+ AddSkyboxButton("rocky", "Langholmen", row5);
154
+ AddSkyboxButton("rocky", "Skinnarviksberget", row5);
155
+
156
+ AddSkyboxButton("rocky", "Tantolunden6", row5);
157
+ AddSkyboxButton("default", "CloudyHills", row6);
158
+ AddSkyboxButton("daz", "Autumn", row6);
159
+ AddSkyboxButton("daz", "MountainTrail", row6);
160
+ /*
161
+Autumn
162
+Greenlands
163
+MountainTrail
164
+Oasis
165
+TheRock
166
+TopOfTheWorld
167
+Winter
168
+ */
169
+
170
+ tab0.add(row0);
171
+ tab0.add(row1);
172
+ tab0.add(row2);
173
+ tab0.add(row3);
174
+ tab0.add(row4);
175
+ tab0.add(row5);
176
+ tab0.add(row6);
177
+
178
+ for (int i=5; --i>=0;)
179
+ {
180
+ //oe.toolboxPanel.Return();
181
+ //tab0.add(new cGridBag());
182
+ }
183
+ }
184
+
185
+ public void AddSkyboxTab2(JTabbedPane skyboxpanel)
186
+ {
187
+ cGridBag tab0 = new cGridBag().setVertical(true);
188
+
189
+ tab0.setName("Night");
190
+ skyboxpanel.add(tab0);
191
+
192
+ cGridBag row0 = new cGridBag();
193
+ cGridBag row1 = new cGridBag();
194
+ cGridBag row2 = new cGridBag();
195
+ cGridBag row3 = new cGridBag();
196
+ cGridBag row4 = new cGridBag();
197
+ cGridBag row5 = new cGridBag();
198
+ cGridBag row6 = new cGridBag();
199
+
200
+ AddSkyboxButton("night", "NightPath", row0);
201
+ AddSkyboxButton("night", "PondNight", row0);
202
+ AddSkyboxButton("night", "Powerlines", row0);
203
+ AddSkyboxButton("night", "SwedishRoyalCastle", row0);
204
+
205
+ AddSkyboxButton("urban", "CNTower", row1);
206
+ AddSkyboxButton("bridge", "ArstaBridge", row1);
207
+ AddSkyboxButton("rocky", "Riddarfjarden", row1);
208
+ AddSkyboxButton("penguins", "sleepyhollow", row1);
209
+
210
+ AddSkyboxButton("penguins", "kenon_star", row2);
211
+ AddSkyboxButton("persson", "corona", row2);
212
+ AddSkyboxButton("persson", "spaceskybox", row2);
213
+ AddSkyboxButton("indoors", "Vasa", row2);
214
+
215
+ AddSkyboxButton("winter", "Backyard", row3);
216
+ AddSkyboxButton("winter", "Creek", row3);
217
+ AddSkyboxButton("winter", "FootballField3", row3);
218
+ AddSkyboxButton("winter", "Forest", row3);
219
+
220
+ AddSkyboxButton("winter", "HornstullsStrand2", row4);
221
+ AddSkyboxButton("winter", "House", row4);
222
+ AddSkyboxButton("winter", "IceLake", row4);
223
+ AddSkyboxButton("winter", "IceRiver", row4);
224
+
225
+ AddSkyboxButton("winter", "Park3", row5);
226
+ AddSkyboxButton("winter", "PondWinter", row5);
227
+ AddSkyboxButton("winter", "Tantolunden5", row5);
228
+ AddSkyboxButton("winter", "Vindelalven", row5);
229
+
230
+ AddSkyboxButton("daz", "TheRock", row6);
231
+ AddSkyboxButton("daz", "TopOfTheWorld", row6);
232
+ AddSkyboxButton("daz", "Winter", row6);
233
+ AddSkyboxButton("mountain", "Ryfjallet", row6);
234
+
235
+ tab0.add(row0);
236
+ tab0.add(row1);
237
+ tab0.add(row2);
238
+ tab0.add(row3);
239
+ tab0.add(row4);
240
+ tab0.add(row5);
241
+ tab0.add(row6);
242
+
243
+ for (int i=5; --i>=0;)
244
+ {
245
+ //oe.toolboxPanel.Return();
246
+ //tab0.add(new cGridBag());
247
+ }
248
+ }
249
+
250
+ public void AddSkyboxTab3(JTabbedPane skyboxpanel)
251
+ {
252
+ cGridBag tab0 = new cGridBag().setVertical(true);
253
+
254
+ tab0.setName("Others");
255
+ skyboxpanel.add(tab0);
256
+
257
+ cGridBag row0 = new cGridBag();
258
+ cGridBag row1 = new cGridBag();
259
+ cGridBag row2 = new cGridBag();
260
+ cGridBag row3 = new cGridBag();
261
+ cGridBag row4 = new cGridBag();
262
+ cGridBag row5 = new cGridBag();
263
+ cGridBag row6 = new cGridBag();
264
+
265
+ AddSkyboxButton("mayhem", "afterrain", row0);
266
+ AddSkyboxButton("mayhem", "aqua4", row0);
267
+ AddSkyboxButton("mayhem", "aqua9", row0);
268
+ AddSkyboxButton("mayhem", "flame", row0);
269
+
270
+ AddSkyboxButton("mayhem", "h2s", row1);
271
+ AddSkyboxButton("mayhem", "prehistoric", row1);
272
+ AddSkyboxButton("mayhem", "scorched", row1);
273
+ AddSkyboxButton("penguins", "desertdawn", row1);
274
+
275
+ AddSkyboxButton("persson", "Citadella", row2);
276
+ AddSkyboxButton("persson", "Citadella2", row2);
277
+ AddSkyboxButton("persson", "clouds1", row2);
278
+ AddSkyboxButton("penguins", "wrath", row2);
279
+
280
+ AddSkyboxButton("persson", "FishermansBastion", row3);
281
+ AddSkyboxButton("persson", "HeroesSquare", row3);
282
+ AddSkyboxButton("indoors", "DallasW", row3);
283
+ AddSkyboxButton("indoors", "MarriottMadisonWest", row3);
284
+
285
+ AddSkyboxButton("persson", "LancellottiChapel", row4);
286
+ AddSkyboxButton("persson", "PereaBeach1", row4);
287
+ AddSkyboxButton("persson", "PereaBeach2", row4);
288
+ AddSkyboxButton("persson", "redeclipse", row4);
289
+
290
+ AddSkyboxButton("daz", "Greenlands", row5);
291
+ AddSkyboxButton("daz", "Oasis", row5);
292
+ AddSkyboxButton("elyvisions", "arch3", row5);
293
+ AddSkyboxButton("elyvisions", "calm_sea", row5);
294
+
295
+ AddSkyboxButton("elyvisions", "rainbow", row6);
296
+ AddSkyboxButton("elyvisions", "distant_sunset", row6);
297
+ AddSkyboxButton("elyvisions", "heaven", row6);
298
+ AddSkyboxButton("elyvisions", "hot", row6);
299
+
300
+ tab0.add(row0);
301
+ tab0.add(row1);
302
+ tab0.add(row2);
303
+ tab0.add(row3);
304
+ tab0.add(row4);
305
+ tab0.add(row5);
306
+ tab0.add(row6);
307
+
308
+ for (int i=5; --i>=0;)
309
+ {
310
+ //oe.toolboxPanel.Return();
311
+ //tab0.add(new cGridBag());
312
+ }
313
+ }
314
+
315
+ public void CallBack(String[] path)
316
+ {
317
+ for (int i = 0; i < path.length; i++)
318
+ {
319
+ System.out.print(path[i] + "/");
320
+ }
321
+
322
+ System.out.println();
323
+ }
324
+
325
+ public void ChangeSkybox(String skybox)
326
+ {
327
+ //cameraView.envyoff = false;
328
+ group.skyboxname = skybox;
329
+ group.skyboxext = "jpg";
330
+ cameraView.repaint();
331
+
332
+ Grafreed.ParseResources("textures", this);
333
+ }
334
+
26335 //ObjEditor objEditor;
27336 public void closeUI2()
28337 {
....@@ -60,6 +369,12 @@
60369 this.copy = this.group = group;
61370 //selectees = this.group.selectees;
62371
372
+ if (copy.versionlist == null)
373
+ {
374
+ copy.versionlist = new Object3D[100];
375
+ copy.versionindex = -1;
376
+ }
377
+
63378 if(ui)
64379 SetupUI(objEditor);
65380 }
....@@ -80,10 +395,22 @@
80395 SetupViews(objEditor);
81396
82397 ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true);
398
+
399
+ if (copy.versionlist == null)
400
+ {
401
+ copy.versionlist = new Object3D[100];
402
+ copy.versionindex = -1;
403
+
404
+ Save(true);
405
+ }
83406 }
84407
85408 void CloneSelection(boolean supports)
86409 {
410
+ if (Globals.REPLACEONMAKE)
411
+ Save();
412
+ boolean keep = Globals.REPLACEONMAKE;
413
+ Globals.REPLACEONMAKE = false;
87414 // Object3D keep = GrafreeD.clipboard;
88415 //Object3D obj;
89416 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -94,6 +421,7 @@
94421
95422 makeSomething(clone, i==group.selection.size()-1);
96423 }
424
+ Globals.REPLACEONMAKE = keep;
97425 }
98426
99427 void CloneClipboard(boolean supports)
....@@ -150,6 +478,8 @@
150478
151479 void SetupMenu2(GroupEditor oe)
152480 {
481
+ oe.jTree = new cTree();
482
+
153483 Menu menu;
154484 oe.menuBar.add(menu = new Menu("Edit"));
155485 //editItem = menu.add(new MenuItem("Edit"));
....@@ -160,7 +490,7 @@
160490 // redoItem = menu.add(new MenuItem("Redo"));
161491 // redoItem.addActionListener(this);
162492 // menu.add("-");
163
- duplicateItem = menu.add(new MenuItem("Duplicate"));
493
+ duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate"));
164494 duplicateItem.addActionListener(this);
165495 cloneItem = menu.add(new MenuItem("Clone"));
166496 cloneItem.addActionListener(this);
....@@ -176,7 +506,6 @@
176506 copyItem.addActionListener(this);
177507 pasteItem = menu.add(new MenuItem("Paste"));
178508 pasteItem.addActionListener(this);
179
- menu.add("-");
180509
181510 menu.add("-");
182511 pasteIntoItem = menu.add(new MenuItem("Paste into"));
....@@ -188,8 +517,8 @@
188517 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
189518 // pasteExpandItem.addActionListener(this);
190519 menu.add("-");
191
- clearItem = menu.add(new MenuItem("Clear"));
192
- clearItem.addActionListener(this);
520
+ deleteItem = menu.add(new MenuItem("Delete"));
521
+ deleteItem.addActionListener(this);
193522
194523 if (Globals.ADVANCED)
195524 {
....@@ -203,23 +532,23 @@
203532 //zBufferItem.addActionListener(this);
204533 //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
205534 //normalLensItem.addActionListener(this);
206
- cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint"));
207
- revertCameraItem.addActionListener(this);
535
+ cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint"));
536
+ restoreCameraItem.addActionListener(this);
208537
209
- cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
210
- toggleFullScreenItem.addItemListener(this);
211
- toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
212
- cameraMenu.add("-");
538
+// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
539
+// toggleFullScreenItem.addItemListener(this);
540
+// toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
541
+// cameraMenu.add("-");
542
+//
543
+// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
544
+// toggleTextureItem.addItemListener(this);
545
+// toggleTextureItem.setState(CameraPane.textureon);
546
+//
547
+// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
548
+// toggleSwitchItem.addItemListener(this);
549
+// toggleSwitchItem.setState(CameraPane.SWITCH);
213550
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"));
551
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles"));
223552 toggleHandleItem.addItemListener(this);
224553 toggleHandleItem.setState(CameraPane.HANDLES);
225554
....@@ -246,7 +575,7 @@
246575
247576 cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
248577 toggleDebugItem.addItemListener(this);
249
- toggleDebugItem.setState(CameraPane.DEBUG);
578
+ toggleDebugItem.setState(Globals.DEBUG);
250579
251580 cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
252581 toggleFrustumItem.addItemListener(this);
....@@ -274,7 +603,7 @@
274603 {
275604 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
276605 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
277
- //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
606
+ //cameraMenu.add(switchViewItem = new MenuItem("Reverse View"));
278607 editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
279608 oe.cameraMenu.add("-");
280609 openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
....@@ -282,7 +611,7 @@
282611 editLeafItem.addActionListener(this);
283612 lookAtItem.addActionListener(this);
284613 //lookFromItem.addActinoListener(this);
285
- //switchItem.addActionListener(this);
614
+ //switchViewItem.addActionListener(this);
286615 }
287616
288617 oe.menuBar.add(menu = new Menu("Setting"));
....@@ -327,21 +656,29 @@
327656 }
328657
329658 oe.menuBar.add(menu = new Menu("Group"));
330
- grabItem = menu.add(new MenuItem("Grab"));
331
- grabItem.addActionListener(this);
659
+// grabItem = menu.add(new MenuItem("Grab"));
660
+// grabItem.addActionListener(this);
332661 backItem = menu.add(new MenuItem("Back"));
333662 backItem.addActionListener(this);
334663 frontItem = menu.add(new MenuItem("Front"));
335664 frontItem.addActionListener(this);
336
- compositeItem = menu.add(new MenuItem("Composite"));
337
- compositeItem.addActionListener(this);
665
+// compositeItem = menu.add(new MenuItem("Composite"));
666
+// compositeItem.addActionListener(this);
667
+
668
+ if (Globals.ADVANCED)
669
+ {
338670 hideItem = menu.add(new MenuItem("Hidden Group"));
339671 hideItem.addActionListener(this);
672
+ }
340673 ungroupItem = menu.add(new MenuItem("Ungroup"));
341674 ungroupItem.addActionListener(this);
342
- menu.add("-");
343
- randomItem = menu.add(new MenuItem("Switch node"));
344
- randomItem.addActionListener(this);
675
+
676
+// menu.add("-");
677
+//
678
+// switchItem = menu.add(new MenuItem("Switch node"));
679
+// switchItem.addActionListener(this);
680
+ if (Globals.ADVANCED)
681
+ {
345682 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
346683 switchGeoItem.addActionListener(this);
347684 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
....@@ -349,8 +686,6 @@
349686 morphItem = menu.add(new MenuItem("Morph Group"));
350687 morphItem.addActionListener(this);
351688
352
- if (Globals.ADVANCED)
353
- {
354689 menu.add("-");
355690 physicsItem = menu.add(new MenuItem("Physics"));
356691 physicsItem.addActionListener(this);
....@@ -358,30 +693,29 @@
358693 frameselectorItem.addActionListener(this);
359694 scriptNodeItem = menu.add(new MenuItem("Script Node"));
360695 scriptNodeItem.addActionListener(this);
361
- cameraItem = menu.add(new MenuItem("Camera"));
362
- cameraItem.addActionListener(this);
363696 }
364697
365698 oe.menuBar.add(menu = new Menu("Object"));
366
- textureItem = menu.add(new MenuItem("Texture"));
367
- textureItem.addActionListener(this);
699
+// textureItem = menu.add(new MenuItem("Texture"));
700
+// textureItem.addActionListener(this);
368701 billboardItem = menu.add(new MenuItem("Billboard"));
369702 billboardItem.addActionListener(this);
370703 csgItem = menu.add(new MenuItem("CSG"));
371704 csgItem.addActionListener(this);
372
- shadowXItem = menu.add(new MenuItem("Shadow X"));
705
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
373706 shadowXItem.addActionListener(this);
374
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
707
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
375708 shadowYItem.addActionListener(this);
376
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
709
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
377710 shadowZItem.addActionListener(this);
711
+ attributeItem = menu.add(new MenuItem("Attribute"));
712
+ attributeItem.addActionListener(this);
713
+
378714 if (Globals.ADVANCED)
379715 {
380716 menu.add("-");
381717 linkerItem = menu.add(new MenuItem("Linker"));
382718 linkerItem.addActionListener(this);
383
- attributeItem = menu.add(new MenuItem("Attribute"));
384
- attributeItem.addActionListener(this);
385719 templateItem = menu.add(new MenuItem("Template"));
386720 templateItem.addActionListener(this);
387721 pointflowItem = menu.add(new MenuItem("Point Flow"));
....@@ -410,7 +744,7 @@
410744 genNormalsMESHItem.addActionListener(this);
411745 if (Globals.ADVANCED)
412746 {
413
- genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
747
+ genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals"));
414748 genNormalsMINEItem.addActionListener(this);
415749 }
416750 stripifyItem = menu.add(new MenuItem("Stripify"));
....@@ -503,10 +837,15 @@
503837 attachBumpItem.addActionListener(this);
504838 pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump"));
505839 pigmentBumpItem.addActionListener(this);
840
+ //embedTexturesItem
506841 detachPigmentItem = menu.add(new MenuItem("Detach Pigment"));
507842 detachPigmentItem.addActionListener(this);
508843 detachBumpItem = menu.add(new MenuItem("Detach Bump"));
509844 detachBumpItem.addActionListener(this);
845
+ embedTexturesItem = menu.add(new MenuItem("Embed Textures"));
846
+ embedTexturesItem.addActionListener(this);
847
+ deEmbedTexturesItem = menu.add(new MenuItem("De-embed Textures"));
848
+ deEmbedTexturesItem.addActionListener(this);
510849 menu.add("-");
511850 sortbysizeItem = menu.add(new MenuItem("Sort by size"));
512851 sortbysizeItem.addActionListener(this);
....@@ -533,8 +872,21 @@
533872 buildToolsMenu(menu);
534873 }
535874
875
+
536876 void SetupUI2(ObjEditor oe)
537877 {
878
+ // June 2019
879
+ if (oe == null)
880
+ {
881
+ //super.SetupUI2(this);
882
+ //return;
883
+ }
884
+
885
+ if (copy != group)
886
+ {
887
+ //super.SetupUI2(this);
888
+ }
889
+
538890 //new Exception().printStackTrace();
539891
540892 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -563,39 +915,83 @@
563915 oe.radioPanel.add(dummyButton);
564916 oe.buttonGroup.add(dummyButton);
565917 */
918
+ cGridBag copyOptionsPanel = new cGridBag();
919
+
920
+ copyOptionsPanel.preferredHeight = 2;
921
+
566922 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
567923
568
- oe.toolbarPanel.add(undoButton = new cButton("Undo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
569
- undoButton.setToolTipText("Undo changes");
570
- undoButton.addActionListener(this);
924
+ //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
925
+ //minButton.setToolTipText("Minimize window");
926
+ //minButton.addActionListener(this);
571927
572
- oe.toolbarPanel.add(redoButton = new cButton("Redo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
573
- redoButton.setToolTipText("Redo changes");
574
- redoButton.addActionListener(this);
928
+ if (Globals.ADVANCED)
929
+ {
930
+ oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
931
+ maxButton.setToolTipText("Maximize window");
932
+ maxButton.addActionListener(this);
933
+ }
575934
576
- oe.toolbarPanel.add(saveButton = new cButton("Save", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
577
- saveButton.setToolTipText("Save changes");
578
- saveButton.addActionListener(this);
935
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
936
+ fullButton.setToolTipText("Full-screen window");
937
+ fullButton.addActionListener(this);
579938
580
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
939
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
940
+ screenfitButton.setToolTipText("Screen fit");
941
+ screenfitButton.addActionListener(this);
942
+
943
+ oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
944
+ restoreCameraButton.setToolTipText("Restore viewpoint");
945
+ restoreCameraButton.addActionListener(this);
946
+
947
+ copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
948
+ saveVersionButton.setToolTipText("Duplicate current version");
949
+ saveVersionButton.addActionListener(this);
950
+
951
+ copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
952
+ deleteVersionButton.setToolTipText("Delete current version");
953
+ deleteVersionButton.addActionListener(this);
954
+
955
+ copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
956
+ previousVersionButton.setToolTipText("Previous version");
957
+ previousVersionButton.addActionListener(this);
958
+ previousVersionButton.setEnabled(false);
959
+
960
+ cGridBag updown = new cGridBag().setVertical(true);
961
+ updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
962
+ restoreButton.setToolTipText("Undo (restore current version)");
963
+ restoreButton.addActionListener(this);
964
+ //restoreButton.setEnabled(false);
965
+
966
+ updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
967
+ replaceButton.setToolTipText("Save (replace current version)");
968
+ replaceButton.addActionListener(this);
969
+ //replaceButton.setEnabled(false);
970
+
971
+ copyOptionsPanel.add(updown);
972
+
973
+ copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
974
+ nextVersionButton.setToolTipText("Next version");
975
+ nextVersionButton.addActionListener(this);
976
+ nextVersionButton.setEnabled(false);
977
+
978
+ oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
581979 liveCB.setToolTipText("Enable animation");
582980 liveCB.addItemListener(this);
583981
584
- oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
982
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
585983 oneStepButton.setToolTipText("Animate one step forward");
586984 oneStepButton.addActionListener(this);
587985
588
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
986
+ oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
589987 fastCB.setToolTipText("Fast mode");
590988 fastCB.addItemListener(this);
591989
592
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
593
- trackCB.setToolTipText("Enable tracking");
594
- trackCB.addItemListener(this);
595
-
596
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
597
- screenfitButton.setToolTipText("Screen fit");
598
- screenfitButton.addActionListener(this);
990
+ //oe.toolboxPanel.Return();
991
+
992
+// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
993
+// trackCB.setToolTipText("Enable tracking");
994
+// trackCB.addItemListener(this);
599995
600996 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
601997 // screenfitpointButton.addActionListener(this);
....@@ -605,67 +1001,156 @@
6051001 oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
6061002 snapobjectButton.addActionListener(this);
6071003 snapobjectButton.setToolTipText("Snap Object");
1004
+
1005
+ oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1006
+ fourButton.addActionListener(this);
1007
+ fourButton.setToolTipText("Show control panel only");
6081008 }
6091009
610
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
611
- flashSelectionButton.setToolTipText("Show selection");
612
- flashSelectionButton.addActionListener(this);
1010
+ //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
6131011
614
- oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
615
-
616
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
617
- twoButton.setToolTipText("Show center view only");
1012
+ oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1013
+ twoButton.setToolTipText("Show 3D view only");
6181014 twoButton.addActionListener(this);
619
- oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
620
- fourButton.addActionListener(this);
621
- fourButton.setToolTipText("Show left panel only");
622
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
623
- sixButton.setToolTipText("2-column layout left");
624
- sixButton.addActionListener(this);
625
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
626
- threeButton.setToolTipText("2-column layout right");
1015
+ this.fullscreenLayout = twoButton;
1016
+
1017
+ oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1018
+ threeButton.setToolTipText("Show controls and 3D view");
6271019 threeButton.addActionListener(this);
628
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
629
- sevenButton.setToolTipText("3-column layout");
630
- sevenButton.addActionListener(this);
1020
+ oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1021
+ sixButton.setToolTipText("Show 3D view and controls");
1022
+ sixButton.addActionListener(this);
1023
+// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1024
+// sevenButton.setToolTipText("3-column layout");
1025
+// sevenButton.addActionListener(this);
6311026 //
6321027
633
- oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
634
- rootButton.setToolTipText("Edit selection in new tab");
1028
+ oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1029
+ rootButton.setToolTipText("Open selection in new tab");
6351030 rootButton.addActionListener(this);
6361031
637
- oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1032
+ oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
6381033 closeButton.setToolTipText("Close tab");
6391034 closeButton.addActionListener(this);
6401035 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
6411036 //clearButton.addActionListener(this);
642
-
643
- cGridBag commandsPanel = new cGridBag();
1037
+
1038
+ cGridBag row1 = new cGridBag();
6441039
645
- commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
646
- editButton.setToolTipText("Edit selection");
1040
+ // INSERT
1041
+ row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1042
+ gridButton.setToolTipText("Create grid");
1043
+ gridButton.addActionListener(this);
1044
+
1045
+ row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1046
+ boxButton.setToolTipText("Create box");
1047
+ boxButton.addActionListener(this);
1048
+
1049
+ row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1050
+ sphereButton.setToolTipText("Create sphere");
1051
+ sphereButton.addActionListener(this);
1052
+
1053
+ row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1054
+ coneButton.setToolTipText("Create cone");
1055
+ coneButton.addActionListener(this);
1056
+
1057
+ row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1058
+ torusButton.setToolTipText("Create torus");
1059
+ torusButton.addActionListener(this);
1060
+
1061
+ row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1062
+ superButton.setToolTipText("Create superellipsoid");
1063
+ superButton.addActionListener(this);
1064
+
1065
+ if (Globals.ADVANCED)
1066
+ {
1067
+ oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1068
+ kleinButton.setToolTipText("Create Klein bottle");
1069
+ kleinButton.addActionListener(this);
1070
+ }
1071
+
1072
+ row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1073
+ particlesButton.setToolTipText("Create particle system");
1074
+ particlesButton.addActionListener(this);
1075
+
1076
+ oe.toolboxPanel.add(row1);
1077
+
1078
+ cGridBag row2 = new cGridBag();
1079
+
1080
+ row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1081
+ groupButton.setToolTipText("Create group");
1082
+ groupButton.addActionListener(this);
1083
+
1084
+ row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1085
+ compositeButton.setToolTipText("Create composite");
1086
+ compositeButton.addActionListener(this);
1087
+
1088
+ row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1089
+ switchButton.setToolTipText("Create item switcher");
1090
+ switchButton.addActionListener(this);
1091
+
1092
+ row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1093
+ loopButton.setToolTipText("Create loop");
1094
+ loopButton.addActionListener(this);
1095
+
1096
+ row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1097
+ textureButton.setToolTipText("Create texture");
1098
+ textureButton.addActionListener(this);
1099
+
1100
+ row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1101
+ overlayButton.setToolTipText("Create overlay");
1102
+ overlayButton.addActionListener(this);
1103
+
1104
+ row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1105
+ lightButton.setToolTipText("Create light");
1106
+ lightButton.addActionListener(this);
1107
+
1108
+ oe.toolboxPanel.add(row2);
1109
+
1110
+ // ENVYMAPS
1111
+ cGridBag skyboxpane = new cGridBag();
1112
+ skyboxpane.preferredHeight = 100;
1113
+
1114
+ oe.skyboxPanel.add(skyboxpane);
1115
+
1116
+ JTabbedPane skyboxpanel = new JTabbedPane();
1117
+ skyboxpane.add(skyboxpanel);
1118
+
1119
+ AddSkyboxTab0(skyboxpanel);
1120
+ AddSkyboxTab1(skyboxpanel);
1121
+ AddSkyboxTab2(skyboxpanel);
1122
+ AddSkyboxTab3(skyboxpanel);
1123
+
1124
+ // EDIT panel
1125
+ editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1126
+ editButton.setToolTipText("Pin selection controls");
6471127 editButton.addActionListener(this);
6481128
649
- commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
650
- uneditButton.setToolTipText("Unedit selection");
1129
+ editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1130
+ uneditButton.setToolTipText("Unpin and remove selection controls");
6511131 uneditButton.addActionListener(this);
6521132
653
- commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
654
- allParamsButton.setToolTipText("Edit all params");
1133
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
1134
+ allParamsButton.setToolTipText("Show all controle");
6551135 allParamsButton.addActionListener(this);
6561136
657
- commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1137
+ editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
6581138 clearPanelButton.setToolTipText("Clear edit panel");
6591139 clearPanelButton.addActionListener(this);
6601140
661
- commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
662
- unselectButton.setToolTipText("Unselect");
663
- unselectButton.addActionListener(this);
1141
+ //editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1142
+ //unselectButton.setToolTipText("Unselect");
1143
+ //unselectButton.addActionListener(this);
6641144
665
- commandsPanel.preferredHeight = 1;
1145
+ editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1146
+ flashSelectionButton.setToolTipText("Highlight selection");
1147
+ flashSelectionButton.addActionListener(this);
6661148
667
- oe.treePanel.add(commandsPanel);
668
- oe.treePanel.Return();
1149
+ editCommandsPanel.preferredHeight = 1;
1150
+
1151
+ SetPinStates(false);
1152
+// oe.treePanel.add(commandsPanel);
1153
+// oe.treePanel.Return();
6691154
6701155 // oe.aConstraints.gridx += 1;
6711156 // oe.aConstraints.weighty = 0;
....@@ -682,32 +1167,20 @@
6821167
6831168 JScrollPane jSP;
6841169 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
685
- jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
1170
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
6861171 ResetModel();
6871172
6881173 oe.treePanel.add(jSPPanel);
6891174 oe.treePanel.Return();
6901175
691
- cGridBag copyOptionsPanel = new cGridBag();
692
-
693
- copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
694
- colorCB.setToolTipText("Copy color when dropped");
695
- colorCB.addItemListener(this);
696
-
697
- copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
698
- materialCB.setToolTipText("Copy material when dropped");
699
- materialCB.addItemListener(this);
700
-
701
- copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
702
- textureCB.setToolTipText("Copy texture when dropped");
703
- textureCB.addItemListener(this);
704
-
705
- copyOptionsPanel.preferredHeight = 1;
7061176 oe.treePanel.add(copyOptionsPanel);
7071177 oe.treePanel.Return();
1178
+ cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
1179
+ versionSlider = (cNumberSlider)sliderPane.getComponent(1);
1180
+ sliderPane.preferredHeight = 1;
7081181
709
-// mainPanel.setDividerLocation(0.5); //1.0);
710
-// mainPanel.setResizeWeight(0.5);
1182
+// mainPanel.setDividerLocation(0.1); //1.0);
1183
+ mainPanel.setResizeWeight(0.4);
7111184
7121185 //jList.addListSelectionListener(this);
7131186 oe.jTree.addTreeSelectionListener(this);
....@@ -715,7 +1188,7 @@
7151188 //jTree.setEditable(true);
7161189 oe.jTree.setDragEnabled(true);
7171190 //jTree.setPreferredSize(new Dimension(10,10));
718
- jSP.setPreferredSize(new Dimension(100,200));
1191
+ //jSP.setPreferredSize(new Dimension(100,200));
7191192
7201193 oe.jTree.setCellRenderer(new cTreeModel.Renderer());
7211194
....@@ -727,29 +1200,49 @@
7271200 dgr.addDragGestureListener(this);
7281201 }catch(Exception e) {}
7291202 */
730
- radio.layout = sevenButton;
1203
+ radio.layout = threeButton; // sixButton;
7311204 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
7321205 }
7331206
7341207 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
7351208 {
1209
+ panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
1210
+ colorCB.setToolTipText("Copy color when dropped");
1211
+ colorCB.addItemListener(this);
1212
+
1213
+ panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
1214
+ materialCB.setToolTipText("Copy material when dropped");
1215
+ materialCB.addItemListener(this);
1216
+
1217
+ panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
1218
+ textureCB.setToolTipText("Copy texture when dropped");
1219
+ textureCB.addItemListener(this);
1220
+
1221
+ panel.Return();
1222
+
7361223 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
7371224 boxCB.setToolTipText("Display bounding boxes");
7381225 boxCB.addItemListener(this);
7391226
7401227 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
741
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
1228
+ zoomBoxCB.setToolTipText("Display only for wheel");
7421229 zoomBoxCB.addItemListener(this);
7431230
7441231 if (true) // Globals.ADVANCED)
7451232 {
746
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
747
- supportCB.setToolTipText("Enable rigging");
748
- supportCB.addItemListener(this);
1233
+// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
1234
+// supportCB.setToolTipText("Enable rigging");
1235
+// supportCB.addItemListener(this);
1236
+
1237
+ panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints);
1238
+ freezeCB.setToolTipText("Fast moving camera");
1239
+ freezeCB.addItemListener(this);
7491240
7501241 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
7511242 // localCB.addItemListener(this);
7521243
1244
+ panel.Return();
1245
+
7531246 panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
7541247 crowdCB.setToolTipText("Used for crowds");
7551248 crowdCB.addItemListener(this);
....@@ -758,14 +1251,19 @@
7581251 smoothCB.setToolTipText("Snapping delay");
7591252 smoothCB.addItemListener(this);
7601253
761
- panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
762
- slowCB.setToolTipText("Smooth interpolation");
763
- slowCB.addItemListener(this);
1254
+// panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
1255
+// slowCB.setToolTipText("Smooth interpolation");
1256
+// slowCB.addItemListener(this);
1257
+ panel.add(minshaderCB = new cCheckBox("Min shader", Globals.MINSHADER)); //, constraints);
1258
+ minshaderCB.setToolTipText("Minimal fast shader");
1259
+ minshaderCB.addItemListener(this);
7641260
7651261 // constraints.gridy += 1;
7661262 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
7671263 // speakerMocapCB.addItemListener(this);
7681264
1265
+ panel.Return();
1266
+
7691267 if (false)
7701268 {
7711269 // handled in scripts
....@@ -780,34 +1278,74 @@
7801278 //constraints.gridy += 1;
7811279 panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
7821280 smoothfocusCB.addItemListener(this);
1281
+ panel.Return();
7831282 }
7841283
7851284 //constraints.gridx += 1;
7861285 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
7871286 // debugCB.addItemListener(this);
7881287
1288
+ panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
1289
+ trackCB.setToolTipText("Enable tracking target");
1290
+ trackCB.addItemListener(this);
1291
+
7891292 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
1293
+ oeilCB.setToolTipText("Move camera when tracking");
7901294 oeilCB.addItemListener(this);
7911295
1296
+ panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
1297
+ shadowCB.setToolTipText("When live compute shadows");
1298
+ shadowCB.addItemListener(this);
1299
+
1300
+ panel.Return();
1301
+ panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints);
1302
+ toggleTextureCB.setToolTipText("Load textures");
1303
+ toggleTextureCB.addItemListener(this);
1304
+
1305
+ panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints);
1306
+ toggleSwitchCB.setToolTipText("Choose a single item");
1307
+ toggleSwitchCB.addItemListener(this);
1308
+
1309
+ panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints);
1310
+ autokeepCB.setToolTipText("On structure change");
1311
+ autokeepCB.addItemListener(this);
1312
+
1313
+ panel.Return();
1314
+ if (Globals.ADVANCED)
1315
+ {
7921316 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
7931317 lookAtCB.setToolTipText("Look-at target");
7941318 lookAtCB.addItemListener(this);
1319
+ }
7951320
7961321 }
7971322
7981323 cGridBag fill = new cGridBag();
799
-
8001324 fill.preferredHeight = 200;
1325
+ cGridBag fill2 = new cGridBag();
1326
+ fill2.preferredHeight = 200;
1327
+ cGridBag fill3 = new cGridBag();
1328
+ fill3.preferredHeight = 200;
8011329
8021330 panel.add(fill);
1331
+ panel.add(fill2);
1332
+ panel.add(fill3);
8031333
8041334 }
8051335
8061336 void EditObject(Object3D obj)
8071337 {
8081338 cRadio radioButton = new cRadio(obj.name);
1339
+
1340
+ // June 2019. Patch to avoid bug with transparency.
1341
+ radioButton.hadMaterial = obj.material != null;
1342
+ if (!radioButton.hadMaterial)
1343
+ {
1344
+ obj.material = new cMaterial();
1345
+ }
1346
+
8091347 radioButton.SetObject(obj);
810
- radioButton.layout = sevenButton;
1348
+ radioButton.layout = threeButton; // sixButton;
8111349 radioButton.SetCamera(cameraView.renderCamera, false);
8121350 radioButton.addActionListener(this);
8131351 radioPanel.add(radioButton);
....@@ -817,6 +1355,8 @@
8171355
8181356 void SetupViews(ObjEditor oe)
8191357 {
1358
+ theFrame = this;
1359
+
8201360 oe.SetupViews();
8211361
8221362 System.out.println("SetupViews");
....@@ -825,23 +1365,30 @@
8251365 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
8261366 }
8271367
828
- JCheckBox liveCB;
829
- JCheckBox supportCB;
830
- JCheckBox localCB;
831
- JCheckBox crowdCB;
832
- JCheckBox smoothCB;
833
- JCheckBox fastCB;
834
- JCheckBox slowCB;
835
- JCheckBox boxCB;
836
- JCheckBox zoomBoxCB;
837
- JCheckBox trackCB;
838
- JCheckBox smoothfocusCB;
1368
+ cToggleButton liveCB;
1369
+ cCheckBox supportCB;
1370
+ cCheckBox localCB;
1371
+ cCheckBox crowdCB;
1372
+ cCheckBox smoothCB;
1373
+ cCheckBox minshaderCB;
1374
+
1375
+ cToggleButton fastCB;
1376
+ cCheckBox slowCB;
1377
+ cCheckBox boxCB;
1378
+ cCheckBox zoomBoxCB;
1379
+ cCheckBox freezeCB;
1380
+ //cToggleButton trackCB;
1381
+ cCheckBox trackCB;
1382
+ cCheckBox smoothfocusCB;
8391383 // JCheckBox speakerMocapCB;
840
- JCheckBox speakerCameraCB;
841
- JCheckBox speakerFocusCB;
842
- JCheckBox debugCB;
843
- JCheckBox oeilCB;
844
- JCheckBox lookAtCB;
1384
+ cCheckBox speakerCameraCB;
1385
+ cCheckBox speakerFocusCB;
1386
+ cCheckBox debugCB;
1387
+
1388
+ cCheckBox oeilCB;
1389
+ cCheckBox shadowCB;
1390
+ cCheckBox autokeepCB;
1391
+ cCheckBox lookAtCB;
8451392
8461393 // static int COLOR = 1;
8471394 // static int MATERIAL = 2;
....@@ -849,9 +1396,9 @@
8491396
8501397 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
8511398
852
- JCheckBox colorCB;
853
- JCheckBox materialCB;
854
- JCheckBox textureCB;
1399
+ cCheckBox colorCB;
1400
+ cCheckBox materialCB;
1401
+ cCheckBox textureCB;
8551402
8561403 public void itemStateChanged(ItemEvent e)
8571404 {
....@@ -895,6 +1442,12 @@
8951442 {
8961443 cameraView.ToggleInertia();
8971444 cameraView.repaint();
1445
+ }
1446
+ else if(e.getSource() == minshaderCB)
1447
+ {
1448
+ Globals.MINSHADER ^= true;
1449
+ cameraView.programInitialized = false;
1450
+ cameraView.repaint();
8981451 }
8991452 else if(e.getSource() == localCB)
9001453 {
....@@ -944,6 +1497,18 @@
9441497 {
9451498 cameraView.ToggleOeil();
9461499 }
1500
+ else if(e.getSource() == shadowCB)
1501
+ {
1502
+ Globals.COMPUTESHADOWWHENLIVE ^= true;
1503
+ }
1504
+ else if(e.getSource() == freezeCB)
1505
+ {
1506
+ Globals.FREEZEONMOVE ^= true;
1507
+ }
1508
+ else if(e.getSource() == autokeepCB)
1509
+ {
1510
+ Globals.REPLACEONMAKE ^= true;
1511
+ }
9471512 else if(e.getSource() == lookAtCB)
9481513 {
9491514 cameraView.ToggleLookAt();
....@@ -960,7 +1525,8 @@
9601525
9611526 /**/
9621527 //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this);
963
- TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1528
+ //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1529
+ TreePath path = objEditor.jTree.getSelectionPath();
9641530 if ((path == null) || (path.getPathCount() <= 1)) {
9651531 // We can't move the root node or an empty selection
9661532 return;
....@@ -1023,8 +1589,6 @@
10231589 }
10241590 }
10251591
1026
- String string = (String) object;
1027
-
10281592 System.out.println("Transfer = " + object + "; drop : " + target);
10291593 // if( object instanceof java.io.File[])
10301594 // {
....@@ -1032,6 +1596,8 @@
10321596 // objEditor.DropFile((java.io.File[]) object, true);
10331597 // return;
10341598 // }
1599
+
1600
+ String string = object.toString();
10351601
10361602 // File path for Mac and Windows
10371603 if (string.charAt(0) == '/' || string.charAt(1) == ':')
....@@ -1077,23 +1643,33 @@
10771643
10781644 assert target == objEditor.jTree;
10791645 TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y);
1646
+ Object3D destinationLeaf;
10801647 try {
1081
- Object3D dummy = (Composite) destinationPath.getLastPathComponent();
1648
+ destinationLeaf = (Composite) destinationPath.getLastPathComponent();
10821649 } catch (Exception e) {
10831650 System.out.println("destinationPath : " + destinationPath);
10841651 return;
10851652 }
10861653
1087
- if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1654
+ for (int i=group.selection.size(); --i>=0;)
10881655 {
1656
+ Object3D child = (Object3D)group.selection.elementAt(i);
1657
+
1658
+ // Cannot move into itself
1659
+ if (child == destinationLeaf)
1660
+ return;
1661
+ }
1662
+
1663
+// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1664
+// {
10891665 loadClipboard(true);
10901666 objEditor.jTree.setSelectionPath(destinationPath);
10911667 pasteInto(false, false);
1092
- } else {
1093
- loadClipboard(false);
1094
- objEditor.jTree.setSelectionPath(destinationPath);
1095
- pasteInto(false, false); // true); // ???
1096
- }
1668
+// } else {
1669
+// loadClipboard(false);
1670
+// objEditor.jTree.setSelectionPath(destinationPath);
1671
+// pasteInto(false, false); // true); // ???
1672
+// }
10971673 }
10981674 public void dropActionChanged(DropTargetDragEvent dtde)
10991675 // Called if the user has modified the current drop gesture
....@@ -1198,22 +1774,30 @@
11981774 {
11991775 //heightFieldItem = menu.add(new MenuItem("Height Field"));
12001776 //heightFieldItem.addActionListener(this);
1201
- gridItem = menu.add(new MenuItem("Grid"));
1202
- gridItem.addActionListener(this);
1203
- rectoidItem = menu.add(new MenuItem("Box"));
1204
- rectoidItem.addActionListener(this);
1205
- ellipsoidItem = menu.add(new MenuItem("Sphere"));
1206
- ellipsoidItem.addActionListener(this);
1207
- coneItem = menu.add(new MenuItem("Cone"));
1208
- coneItem.addActionListener(this);
1209
- torusItem = menu.add(new MenuItem("Torus"));
1210
- torusItem.addActionListener(this);
1211
- superItem = menu.add(new MenuItem("Superellipsoid"));
1212
- superItem.addActionListener(this);
1777
+// gridItem = menu.add(new MenuItem("Grid"));
1778
+// gridItem.addActionListener(this);
1779
+// rectoidItem = menu.add(new MenuItem("Box"));
1780
+// rectoidItem.addActionListener(this);
1781
+// ellipsoidItem = menu.add(new MenuItem("Sphere"));
1782
+// ellipsoidItem.addActionListener(this);
1783
+// coneItem = menu.add(new MenuItem("Cone"));
1784
+// coneItem.addActionListener(this);
1785
+// torusItem = menu.add(new MenuItem("Torus"));
1786
+// torusItem.addActionListener(this);
1787
+// superItem = menu.add(new MenuItem("Superellipsoid"));
1788
+// superItem.addActionListener(this);
1789
+
1790
+ cameraItem = menu.add(new MenuItem("Camera"));
1791
+ cameraItem.addActionListener(this);
1792
+
1793
+ if (!Globals.ADVANCED)
1794
+ {
12131795 kleinItem = menu.add(new MenuItem("Klein Bottle"));
12141796 kleinItem.addActionListener(this);
1215
- particleItem = menu.add(new MenuItem("Particle system"));
1216
- particleItem.addActionListener(this);
1797
+ }
1798
+
1799
+// particleItem = menu.add(new MenuItem("Particle system"));
1800
+// particleItem.addActionListener(this);
12171801 if (Globals.ADVANCED)
12181802 {
12191803 ragdollItem = menu.add(new MenuItem("Rag Walk"));
....@@ -1239,15 +1823,15 @@
12391823 }
12401824 bezierItem = menu.add(new MenuItem("Bezier Patch"));
12411825 bezierItem.addActionListener(this);
1242
- overlayItem = menu.add(new MenuItem("Overlay"));
1243
- overlayItem.addActionListener(this);
1244
- lightItem = menu.add(new MenuItem("Light"));
1245
- lightItem.addActionListener(this);
1826
+// overlayItem = menu.add(new MenuItem("Overlay"));
1827
+// overlayItem.addActionListener(this);
1828
+// lightItem = menu.add(new MenuItem("Light"));
1829
+// lightItem.addActionListener(this);
12461830 menu.add("-");
12471831 //superLoopItem = menu.add(new MenuItem("Super Loop"));
12481832 //superLoopItem.addActionListener(this);
1249
- loopItem = menu.add(new MenuItem("Loop"));
1250
- loopItem.addActionListener(this);
1833
+// loopItem = menu.add(new MenuItem("Loop"));
1834
+// loopItem.addActionListener(this);
12511835 doubleItem = menu.add(new MenuItem("Fork"));
12521836 doubleItem.addActionListener(this);
12531837 if (Globals.ADVANCED)
....@@ -1263,6 +1847,9 @@
12631847 animationItem.addItemListener(this);
12641848 animationItem.setState(Globals.ANIMATION);
12651849
1850
+ menu.add(archiveItem = new MenuItem("Archive3D..."));
1851
+ archiveItem.addActionListener(this);
1852
+
12661853 menu.add("-");
12671854 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
12681855 parseverticesItem.addActionListener(this);
....@@ -1275,6 +1862,8 @@
12751862 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
12761863 reduce34MorphItem.addActionListener(this);
12771864 menu.add("-");
1865
+ menu.add(memoryItem = new MenuItem("Memory Usage"));
1866
+ memoryItem.addActionListener(this);
12781867 menu.add(computeAOItem = new MenuItem("Compute AO"));
12791868 computeAOItem.addActionListener(this);
12801869
....@@ -1283,8 +1872,6 @@
12831872 mirrorItem = menu.add(new MenuItem("Mirror Poses"));
12841873 mirrorItem.addActionListener(this);
12851874 menu.add("-");
1286
- menu.add(memoryItem = new MenuItem("Memory Usage"));
1287
- memoryItem.addActionListener(this);
12881875 menu.add(analyzeItem = new MenuItem("Analyze"));
12891876 analyzeItem.addActionListener(this);
12901877 menu.add(dumpItem = new MenuItem("Print"));
....@@ -1428,9 +2015,34 @@
14282015 shadow.material = new cMaterial(obj.material);
14292016 shadow.material.diffuse = 0.0001f;
14302017 shadow.material.specular = 0.0001f;
2018
+ //shadow.projectedVertices[1].x = 300;
14312019
14322020 makeSomething(shadow);
14332021 }
2022
+
2023
+ private void ClearUnpinned()
2024
+ {
2025
+ //for (Object3D obj : listUI)
2026
+ for (int i=listUI.size(); --i>=0;)
2027
+ {
2028
+ Object3D obj = listUI.elementAt(i);
2029
+ if (!obj.pinned)
2030
+ {
2031
+ obj.CloseUI();
2032
+ listUI.remove(i);
2033
+ }
2034
+ }
2035
+ }
2036
+
2037
+ private void EditElement(Object3D elem, boolean newWindow)
2038
+ {
2039
+ // if (!(elem instanceof Composite))
2040
+ // newWindow = false;
2041
+ listUI.add(elem);
2042
+ elem.openEditWindow(this, newWindow); //, false);
2043
+ System.out.println("edit : " + elem);
2044
+ elem.editWindow.refreshContents(true); // ? new
2045
+ }
14342046
14352047 /**
14362048 * applyExample
....@@ -1675,7 +2287,7 @@
16752287 {
16762288 ScreenFit();
16772289 } else
1678
- if (source == switchItem)
2290
+ if (source == switchViewItem)
16792291 {
16802292 cVector v1 = new cVector();
16812293 cVector v2 = new cVector();
....@@ -1684,11 +2296,11 @@
16842296 objEditor.cameraView.renderCamera.setAim(v2, v1);
16852297 objEditor.cameraView.repaint();
16862298 } else
1687
- if (source == rectoidItem)
2299
+ if (source == rectoidItem || source == boxButton)
16882300 {
16892301 makeSomething(new Box());
16902302 } else
1691
- if (source == particleItem)
2303
+ if (source == particleItem || source == particlesButton)
16922304 {
16932305 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
16942306 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1767,27 +2379,27 @@
17672379
17682380 makeSomething(obj);
17692381 } else
1770
- if (source == gridItem)
2382
+ if (source == gridItem || source == gridButton)
17712383 {
17722384 makeSomething(new Grid());
17732385 } else
1774
- if (source == ellipsoidItem)
2386
+ if (source == ellipsoidItem || source == sphereButton)
17752387 {
17762388 makeSomething(new Sphere());
17772389 } else
1778
- if (source == coneItem)
2390
+ if (source == coneItem || source == coneButton)
17792391 {
17802392 makeSomething(new Cone());
17812393 } else
1782
- if (source == torusItem)
2394
+ if (source == torusItem || source == torusButton)
17832395 {
17842396 makeSomething(new Torus());
17852397 } else
1786
- if (source == superItem)
2398
+ if (source == superItem || source == superButton)
17872399 {
17882400 makeSomething(new Superellipsoid());
17892401 } else
1790
- if (source == kleinItem)
2402
+ if (source == kleinItem || source == kleinButton)
17912403 {
17922404 makeSomething(new Klein());
17932405 } else
....@@ -1807,7 +2419,7 @@
18072419 {
18082420 makeSomething(new BezierSurface());
18092421 } else
1810
- if (source == overlayItem)
2422
+ if (source == overlayItem || source == overlayButton)
18112423 {
18122424 /*
18132425 Object3D obj = new BezierSurface(5,8);
....@@ -1855,10 +2467,27 @@
18552467 s.setup();
18562468 makeSomething(s);
18572469 } else
1858
- if (source == lightItem)
2470
+ if (source == lightItem || source == lightButton)
18592471 {
18602472 makeSomething(new Light());
18612473 } else
2474
+// if (source == skybox1Button ||
2475
+// source == skybox2Button ||
2476
+// source == skybox3Button ||
2477
+// source == skybox4Button ||
2478
+// source == skybox5Button ||
2479
+// source == skybox6Button ||
2480
+// source == skybox7Button ||
2481
+// source == skybox11Button ||
2482
+// source == skybox12Button ||
2483
+// source == skybox13Button ||
2484
+// source == skybox14Button ||
2485
+// source == skybox15Button ||
2486
+// source == skybox16Button ||
2487
+// source == skybox17Button)
2488
+// {
2489
+// ChangeSkybox(source);
2490
+// } else
18622491 if (source == csgItem)
18632492 {
18642493 group(new CSG());
....@@ -1905,30 +2534,30 @@
19052534
19062535 group(g);
19072536 } else
1908
- if (source == loopItem)
2537
+ if (source == loopItem || source == loopButton)
19092538 {
19102539 Composite csg = new GroupLeaf();
19112540 csg.count = 5;
19122541 group(csg);
1913
- Composite child = new cGroup();
2542
+ Composite child = new cGroup("Branch");
19142543 csg.addChild(child);
19152544 child.addChild(csg);
19162545 } else
19172546 if (source == doubleItem)
19182547 {
1919
- Composite csg = new GroupLeaf();
2548
+ Composite csg = new GroupLeaf("Fork");
19202549 csg.count = 5;
19212550 group(csg);
1922
- Composite child = new cGroup();
2551
+ Composite child = new cGroup("Branch A");
19232552 csg.addChild(child);
19242553 child.addChild(csg);
1925
- child = new cGroup();
2554
+ child = new cGroup("Branch B");
19262555 csg.addChild(child);
19272556 child.addChild(csg);
19282557 } else
19292558 if (source == tripleItem)
19302559 {
1931
- Composite csg = new GroupLeaf();
2560
+ Composite csg = new GroupLeaf("Trident");
19322561 csg.count = 4;
19332562 group(csg);
19342563 Composite child = new cGroup();
....@@ -1944,7 +2573,7 @@
19442573 if (source == computeAOItem)
19452574 {
19462575 Globals.drawMode = CameraPane.OCCLUSION;
1947
- Globals.theRenderer.repaint();
2576
+ cameraView.repaint();
19482577 } else
19492578 if (source == recompileItem)
19502579 {
....@@ -1959,7 +2588,7 @@
19592588 if (source == invariantsItem)
19602589 {
19612590 System.out.println("Invariants:");
1962
- Grafreed.grafreeD.universe.invariants();
2591
+ Grafreed.grafreed.universe.invariants();
19632592 } else
19642593 if (source == memoryItem)
19652594 {
....@@ -1978,17 +2607,52 @@
19782607 {
19792608 DumpObject();
19802609 } else
1981
- if (source == undoButton)
2610
+ if (source == minButton)
19822611 {
1983
- Undo();
2612
+ Minimize();
19842613 } else
1985
- if (source == redoButton)
2614
+ if (source == maxButton)
19862615 {
1987
- Redo();
2616
+ Maximize();
19882617 } else
1989
- if (source == saveButton)
2618
+ if (source == fullButton)
19902619 {
1991
- Save();
2620
+ ToggleFullScreen();
2621
+ } else
2622
+ if (source == previousVersionButton)
2623
+ {
2624
+ // Go to previous version
2625
+ //if (!Undo())
2626
+ //java.awt.Toolkit.getDefaultToolkit().beep();
2627
+ PreviousVersion();
2628
+ } else
2629
+ if (source == restoreButton)
2630
+ {
2631
+ // Restore current version
2632
+ Restore();
2633
+ //restoreButton.setEnabled(false);
2634
+ } else
2635
+ if (source == replaceButton)
2636
+ {
2637
+ // Overwrite current version
2638
+ Replace();
2639
+ //replaceButton.setEnabled(false);
2640
+ } else
2641
+ if (source == nextVersionButton)
2642
+ {
2643
+ // Go to next version
2644
+ NextVersion();
2645
+ } else
2646
+ if (source == saveVersionButton)
2647
+ {
2648
+ // Save a new version
2649
+ if (!Save(true))
2650
+ java.awt.Toolkit.getDefaultToolkit().beep();
2651
+ } else
2652
+ if (source == deleteVersionButton)
2653
+ {
2654
+ // Delete a new version
2655
+ DeleteVersion();
19922656 } else
19932657 if (source == oneStepButton)
19942658 {
....@@ -1997,17 +2661,14 @@
19972661 } else
19982662 if (source == screenfitButton)
19992663 {
2000
- //Reload(lastConverter, lastFilename, true);
20012664 ScreenFit();
20022665 } else
20032666 if (source == screenfitpointButton)
20042667 {
2005
- //Reload(lastConverter, lastFilename, true);
20062668 ScreenFitPoint();
20072669 } else
20082670 if (source == snapobjectButton)
20092671 {
2010
- //Reload(lastConverter, lastFilename, true);
20112672 SnapObject();
20122673 } else
20132674 // if (event.getSource() == recompileButton)
....@@ -2046,11 +2707,11 @@
20462707 } else
20472708 if (source == undoItem)
20482709 {
2049
- Undo();
2710
+ PreviousVersion();
20502711 } else
20512712 if (source == redoItem)
20522713 {
2053
- Redo();
2714
+ NextVersion();
20542715 } else
20552716 if (source == duplicateItem)
20562717 {
....@@ -2371,7 +3032,7 @@
23713032 {
23723033 StepAll();
23733034 } else
2374
- if (source == clearItem) // || event.getSource() == clearButton)
3035
+ if (source == deleteItem) // || event.getSource() == clearButton)
23753036 {
23763037 //int indices[] = jList.getSelectedIndices();
23773038 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2383,9 +3044,9 @@
23833044 {
23843045 ClearSelection(true);
23853046 } else
2386
- if (source == grabItem)
3047
+ if (source == grabItem || source == groupButton)
23873048 {
2388
- group(new cGroup(), true);
3049
+ group(new cGroup(), false); // true);
23893050 } else
23903051 if (source == hideItem)
23913052 {
....@@ -2403,11 +3064,11 @@
24033064 {
24043065 makeSomething(new Camera());
24053066 } else
2406
- if (source == compositeItem)
3067
+ if (source == compositeItem || source == compositeButton)
24073068 {
24083069 group(new Composite());
24093070 } else
2410
- if (source == randomItem)
3071
+ if (source == switchItem || source == switchButton)
24113072 {
24123073 RandomNode random = new RandomNode();
24133074 group(random);
....@@ -2509,7 +3170,7 @@
25093170 {
25103171 group(new cLinker());
25113172 } else
2512
- if (source == textureItem)
3173
+ if (source == textureItem || source == textureButton)
25133174 {
25143175 group(new TextureNode());
25153176 } else
....@@ -2529,17 +3190,30 @@
25293190 {
25303191 CastShadow(2);
25313192 } else
2532
- if (source == ungroupItem)
3193
+ if (source == ungroupItem || source == ungroupButton)
25333194 {
2534
- //ungroup();
3195
+ boolean hasRoot = false;
3196
+
25353197 for (int i=0; i<group.selection.size(); i++)
25363198 {
2537
- Ungroup(group.selection.get(i));
3199
+ if (group.selection.get(i) == group)
3200
+ {
3201
+ hasRoot = true;
3202
+ break;
3203
+ }
25383204 }
25393205
2540
- ClearSelection(false);
2541
-
2542
- refreshContents();
3206
+ if (!hasRoot)
3207
+ {
3208
+ for (int i=0; i<group.selection.size(); i++)
3209
+ {
3210
+ Ungroup(group.selection.get(i));
3211
+ }
3212
+
3213
+ ClearSelection(false);
3214
+
3215
+ refreshContents();
3216
+ }
25433217 } else
25443218 if (source == genUVItem)
25453219 {
....@@ -2840,7 +3514,7 @@
28403514 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28413515 {
28423516 obj = (Object3D)e.nextElement();
2843
- obj.SetBumpTexture(null);
3517
+ obj.ResetBumpTexture();
28443518 }
28453519
28463520 refreshContents();
....@@ -2856,6 +3530,31 @@
28563530
28573531 refreshContents();
28583532 } else
3533
+ if (source == embedTexturesItem)
3534
+ {
3535
+ Object3D obj;
3536
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3537
+ {
3538
+ obj = (Object3D)e.nextElement();
3539
+ obj.EmbedTextures(true);
3540
+ }
3541
+
3542
+ refreshContents();
3543
+ } else
3544
+ if (source == deEmbedTexturesItem)
3545
+ {
3546
+ Object3D obj;
3547
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3548
+ {
3549
+ obj = (Object3D)e.nextElement();
3550
+ obj.EmbedTextures(false);
3551
+ }
3552
+
3553
+ CameraPane.texturepigment.clear();
3554
+ CameraPane.texturebump.clear();
3555
+
3556
+ refreshContents();
3557
+ } else
28593558 if (source == flashSelectionButton)
28603559 {
28613560 CameraPane.flash = true;
....@@ -2867,6 +3566,10 @@
28673566 if (source == twoButton)
28683567 {
28693568 radio.layout = twoButton;
3569
+
3570
+ if (CameraPane.FULLSCREEN)
3571
+ fullscreenLayout = radio.layout;
3572
+
28703573 // bug
28713574 //gridPanel.setDividerLocation(1.0);
28723575 //bigPanel.setDividerLocation(0.0);
....@@ -2899,10 +3602,31 @@
28993602 bigThree.ClearUI();
29003603 bigThree.add(centralPanel);
29013604 bigThree.FlushUI();
3605
+
3606
+ cameraView.requestFocusInWindow();
3607
+
3608
+// refreshContents(true);
3609
+//
3610
+// try
3611
+// {
3612
+// java.awt.Robot bot = new java.awt.Robot();
3613
+// int mask = InputEvent.BUTTON1_MASK;
3614
+// bot.mouseMove(100, 100);
3615
+// bot.mousePress(mask);
3616
+// bot.mouseRelease(mask);
3617
+// }
3618
+// catch (Exception e)
3619
+// {
3620
+//
3621
+// }
3622
+
29023623 } else
29033624 if (source == threeButton)
29043625 {
29053626 radio.layout = threeButton;
3627
+
3628
+ if (CameraPane.FULLSCREEN)
3629
+ fullscreenLayout = radio.layout;
29063630
29073631 // bigThree.remove(scenePanel);
29083632 // bigThree.remove(centralPanel);
....@@ -2932,13 +3656,18 @@
29323656 // centralPanel.setVisible(true);
29333657 // XYZPanel.setVisible(true);
29343658 bigThree.ClearUI();
3659
+ bigThree.add(scenePanel);
29353660 bigThree.add(centralPanel);
2936
- bigThree.add(XYZPanel);
29373661 bigThree.FlushUI();
3662
+
3663
+ cameraView.requestFocusInWindow();
29383664 } else
29393665 if (source == fourButton)
29403666 {
29413667 radio.layout = fourButton;
3668
+
3669
+ if (CameraPane.FULLSCREEN)
3670
+ fullscreenLayout = radio.layout;
29423671
29433672 // bigThree.remove(scenePanel);
29443673 // bigThree.remove(centralPanel);
....@@ -2970,10 +3699,15 @@
29703699 bigThree.ClearUI();
29713700 bigThree.add(scenePanel);
29723701 bigThree.FlushUI();
3702
+
3703
+ cameraView.requestFocusInWindow();
29733704 } else
29743705 if (source == sixButton)
29753706 {
29763707 radio.layout = sixButton;
3708
+
3709
+ if (CameraPane.FULLSCREEN)
3710
+ fullscreenLayout = radio.layout;
29773711
29783712 // bigThree.remove(scenePanel);
29793713 // bigThree.remove(centralPanel);
....@@ -3003,13 +3737,18 @@
30033737 // centralPanel.setVisible(true);
30043738 // XYZPanel.setVisible(false);
30053739 bigThree.ClearUI();
3006
- bigThree.add(scenePanel);
30073740 bigThree.add(centralPanel);
3741
+ bigThree.add(scenePanel);
30083742 bigThree.FlushUI();
3743
+
3744
+ cameraView.requestFocusInWindow();
30093745 } else
30103746 if (source == sevenButton)
30113747 {
30123748 radio.layout = sevenButton;
3749
+
3750
+ if (CameraPane.FULLSCREEN)
3751
+ fullscreenLayout = radio.layout;
30133752
30143753 // bigThree.remove(scenePanel);
30153754 // bigThree.remove(centralPanel);
....@@ -3043,6 +3782,8 @@
30433782 bigThree.add(centralPanel);
30443783 bigThree.add(XYZPanel);
30453784 bigThree.FlushUI();
3785
+
3786
+ cameraView.requestFocusInWindow();
30463787 } else
30473788 if (source == rootButton)
30483789 {
....@@ -3054,6 +3795,7 @@
30543795 EditObject(obj);
30553796 }
30563797
3798
+ cameraView.requestFocusInWindow();
30573799 refreshContents(true);
30583800 } else
30593801 if (source == closeButton)
....@@ -3063,22 +3805,37 @@
30633805 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
30643806 {
30653807 ab = (cRadio)e.nextElement();
3066
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3808
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
30673809 {
3810
+ // Patch to avoid bug with transparency.
3811
+ if (!ab.hadMaterial)
3812
+ {
3813
+ ab.object.material = null;
3814
+ }
3815
+
30683816 buttonGroup.remove(ab);
30693817 radioPanel.remove(ab);
30703818
3071
- ab.GetObject().editWindow = null;
3819
+ //ab.GetObject().editWindow = null;
3820
+ ab.GetObject().manipWindow = null;
30723821 // ab.GetObject().objectUI = null; // ?????????
30733822
30743823 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
30753824 break;
30763825 }
30773826 }
3827
+
3828
+ cameraView.requestFocusInWindow();
30783829 refreshContents(true);
30793830 } else
30803831 if (source == editItem || source == editButton)
30813832 {
3833
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3834
+ {
3835
+ Object3D child = (Object3D)e.nextElement();
3836
+ child.pinned = true;
3837
+ }
3838
+
30823839 EditSelection(false);
30833840 } else
30843841 if (source == uneditButton)
....@@ -3087,9 +3844,10 @@
30873844 {
30883845 Object3D child = (Object3D)e.nextElement();
30893846 if(child.editWindow != null)
3090
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3847
+ child.pinned = false;
30913848 child.CloseUI();
30923849 listUI.remove(child);
3850
+// objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
30933851
30943852 //child.editWindow = null; // ???????????
30953853 }
....@@ -3104,16 +3862,18 @@
31043862 //copy.ClearUI();
31053863 for (Object3D obj : listUI)
31063864 {
3865
+ obj.pinned = false;
31073866 obj.CloseUI();
31083867 }
31093868 listUI.clear();
3869
+ SetPinStates(group.selection.size() > 0);
31103870 refreshContents(true);
31113871 } else
31123872 if (source == allParamsButton)
31133873 {
31143874 assert(copy == group);
31153875
3116
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3876
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
31173877
31183878 for (Object3D obj : listUI)
31193879 {
....@@ -3162,6 +3922,9 @@
31623922 }
31633923
31643924 copy = group;
3925
+
3926
+ SetUndoStates();
3927
+
31653928 //Globals.theRenderer.object = group;
31663929 if(!useclient)
31673930 {
....@@ -3179,7 +3942,8 @@
31793942 }
31803943
31813944 // fix "+" issue
3182
- group.editWindow = this;
3945
+ //group.editWindow = this;
3946
+ group.manipWindow = this;
31833947
31843948 /*
31853949 currentLayout = radio.layout;
....@@ -3187,20 +3951,32 @@
31873951 currentLayout = sevenButton;
31883952 */
31893953 radio.layout.doClick();
3954
+
3955
+ ClearUnpinned();
3956
+
3957
+ //Grafreed.Assert(group != null);
3958
+ //Grafreed.Assert(group.selection != null);
3959
+ SetPinStates(group.selection == null || group.selection.size() > 0);
3960
+ if (group.selection == null || group.selection.size() == 1)
3961
+ EditSelection(false);
31903962 keepparent = group.parent;
31913963 // PARENT = NULL or not???
31923964 //group.parent = null; // ROOT
31933965 //group.attributes = -1;
31943966 ResetModel();
3967
+
3968
+ cameraView.requestFocusInWindow();
31953969 refreshContents(true);
31963970 } else if (event.getSource() == editCameraItem)
31973971 {
31983972 cameraView.ProtectCamera();
3973
+ cameraView.requestFocusInWindow();
31993974 cameraView.repaint();
32003975 return;
3201
- } else if (event.getSource() == revertCameraItem)
3976
+ } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton)
32023977 {
32033978 cameraView.RevertCamera();
3979
+ cameraView.requestFocusInWindow();
32043980 cameraView.repaint();
32053981 return;
32063982 // } else if (event.getSource() == textureButton)
....@@ -3215,7 +3991,6 @@
32153991 }
32163992
32173993 boolean useclient = false;
3218
- cRadio radio;
32193994
32203995 void ToggleRoot()
32213996 {
....@@ -3778,7 +4553,7 @@
37784553
37794554 try
37804555 {
3781
- texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
4556
+ texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres);
37824557 }
37834558 catch (Exception e)
37844559 {
....@@ -4253,28 +5028,25 @@
42535028 // }
42545029 // }
42555030
4256
- static boolean allparams = true;
4257
-
4258
- static Vector<Object3D> listUI = new Vector<Object3D>();
4259
-
42605031 void EditSelection(boolean newWindow)
42615032 {
5033
+ if (group.selection == null)
5034
+ {
5035
+ EditElement(group, newWindow); // ? new
5036
+ return;
5037
+ }
5038
+
42625039 // aConstraints.gridy = 0;
42635040 for (int i=0; i<group.selection.size(); i++)
42645041 {
42655042 //System.out.println("edit : " + objectPanel.indexOfTab("Material"));
42665043 //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false);
4267
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
5044
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
42685045
42695046 Object3D elem = (Object3D)group.selection.elementAt(i);
42705047 if(elem != group || !newWindow)
42715048 {
4272
- // if (!(elem instanceof Composite))
4273
- // newWindow = false;
4274
- listUI.add(elem);
4275
- elem.openEditWindow(this, newWindow); //, false);
4276
- System.out.println("edit : " + elem);
4277
- elem.editWindow.refreshContents(true); // ? new
5049
+ EditElement(elem, newWindow); // ? new
42785050 }
42795051 }
42805052 }
....@@ -4337,9 +5109,7 @@
43375109
43385110 freezemodel = false;
43395111 }
4340
-
4341
- boolean flashIt = true;
4342
-
5112
+
43435113 public void valueChanged(TreeSelectionEvent e)
43445114 //public boolean handleEvent(Event event)
43455115 {
....@@ -4349,7 +5119,8 @@
43495119 //new Exception().printStackTrace();
43505120
43515121 freezemodel = true;
4352
-
5122
+ ClearUnpinned();
5123
+
43535124 /**/
43545125 //switch (event.id)
43555126 {
....@@ -4382,7 +5153,7 @@
43825153 if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
43835154 // a camera
43845155 {
4385
- if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
5156
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace
43865157 {
43875158 CameraPane.camerachangeframe = 0; // don't refuse it
43885159 Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
....@@ -4391,6 +5162,13 @@
43915162 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
43925163 }
43935164
5165
+ if (tps != null && tps.length == 1)
5166
+ {
5167
+ EditSelection(false);
5168
+ }
5169
+
5170
+ SetPinStates(tps != null && tps.length > 0);
5171
+
43945172 refreshContents();
43955173 //return true;
43965174 }
....@@ -4400,9 +5178,20 @@
44005178 freezemodel = false;
44015179 }
44025180
5181
+ void SetPinStates(boolean enabled)
5182
+ {
5183
+ editButton.setEnabled(enabled);
5184
+ uneditButton.setEnabled(enabled);
5185
+ //unselectButton.setEnabled(enabled);
5186
+ flashSelectionButton.setEnabled(enabled);
5187
+
5188
+ clearPanelButton.setEnabled(!listUI.isEmpty());
5189
+ }
5190
+
44035191 void refreshContents(boolean cp)
44045192 {
4405
- if (!Globals.MOUSEDRAGGED)
5193
+ //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
5194
+ if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
44065195 {
44075196 objEditor.ClearInfo(); // .GetMaterial());
44085197
....@@ -4501,7 +5290,8 @@
45015290
45025291 if (cut)
45035292 {
4504
- Save();
5293
+// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save.
5294
+// Save();
45055295 //int indices[] = jList.getSelectedIndices();
45065296 //for (int i = indices.length - 1; i >= 0; i--)
45075297 //jList.remove(indices[i]);
....@@ -4604,6 +5394,10 @@
46045394
46055395 void paste(boolean expand)
46065396 {
5397
+ if (Globals.REPLACEONMAKE)
5398
+ Save();
5399
+ boolean keep = Globals.REPLACEONMAKE;
5400
+ Globals.REPLACEONMAKE = false;
46075401 // if (GrafreeD.clipboard == null)
46085402 // return;
46095403 boolean first = true;
....@@ -4663,6 +5457,7 @@
46635457 Grafreed.clipboard.get(0).parent = keepparent;
46645458 }
46655459
5460
+ Globals.REPLACEONMAKE = keep;
46665461 ResetModel();
46675462 refreshContents();
46685463 }
....@@ -4798,6 +5593,10 @@
47985593
47995594 void group(Object3D csg, boolean grab)
48005595 {
5596
+ if (Globals.REPLACEONMAKE)
5597
+ Save();
5598
+ boolean keep = Globals.REPLACEONMAKE;
5599
+ Globals.REPLACEONMAKE = false;
48015600 if (//false) // why??
48025601 !group.selection.isEmpty())
48035602 {
....@@ -4911,10 +5710,15 @@
49115710 //node.add(csg);
49125711 //makeSomething(node);
49135712 makeSomething(csg);
5713
+ Globals.REPLACEONMAKE = keep;
49145714 }
49155715
49165716 void Ungroup(Object3D g)
49175717 {
5718
+ if (Globals.REPLACEONMAKE)
5719
+ Save();
5720
+ boolean keep = Globals.REPLACEONMAKE;
5721
+ Globals.REPLACEONMAKE = false;
49185722 if (g instanceof HiddenObject)
49195723 {
49205724 HiddenObject h = (HiddenObject) g;
....@@ -4931,6 +5735,7 @@
49315735 objEditor.makeSomething(g.get(i), false);
49325736 }
49335737 }
5738
+ Globals.REPLACEONMAKE = keep;
49345739 }
49355740
49365741 void ungroup()
....@@ -5219,10 +6024,43 @@
52196024 cButton clearpanelButton;
52206025 cButton unselectButton;
52216026
5222
- cButton saveButton;
5223
- cButton undoButton;
5224
- cButton redoButton;
6027
+ cButton restoreCameraButton;
6028
+
52256029 cButton oneStepButton;
6030
+
6031
+ cButton groupButton;
6032
+ cButton ungroupButton;
6033
+ cButton compositeButton;
6034
+ cButton switchButton;
6035
+ cButton loopButton;
6036
+ cButton textureButton;
6037
+
6038
+ cButton skybox1Button;
6039
+ cButton skybox2Button;
6040
+ cButton skybox3Button;
6041
+ cButton skybox4Button;
6042
+ cButton skybox5Button;
6043
+ cButton skybox6Button;
6044
+ cButton skybox7Button;
6045
+
6046
+ cButton skybox11Button;
6047
+ cButton skybox12Button;
6048
+ cButton skybox13Button;
6049
+ cButton skybox14Button;
6050
+ cButton skybox15Button;
6051
+ cButton skybox16Button;
6052
+ cButton skybox17Button;
6053
+
6054
+ cButton gridButton;
6055
+ cButton boxButton;
6056
+ cButton sphereButton;
6057
+ cButton coneButton;
6058
+ cButton torusButton;
6059
+ cButton superButton;
6060
+ cButton kleinButton;
6061
+ cButton particlesButton;
6062
+ cButton overlayButton;
6063
+ cButton lightButton;
52266064
52276065 cButton screenfitButton;
52286066 cButton screenfitpointButton;
....@@ -5235,14 +6073,6 @@
52356073
52366074 cButton setsupportButton;
52376075
5238
- cButton twoButton;
5239
- cButton sixButton;
5240
- cButton threeButton;
5241
- cButton sevenButton;
5242
- cButton fourButton; // full panel
5243
- cButton oneButton; // full XYZ
5244
- //cButton currentLayout;
5245
-
52466076 //
52476077 //Composite
52486078 Object3D // to do !!
....@@ -5252,11 +6082,11 @@
52526082 //JTree jTree;
52536083 private MenuItem lookAtItem;
52546084 private MenuItem lookFromItem;
5255
- private MenuItem switchItem;
6085
+ private MenuItem switchViewItem;
52566086 private MenuItem cutItem;
52576087 private MenuItem undoItem;
52586088 private MenuItem redoItem;
5259
- private MenuItem duplicateItem;
6089
+ private JMenuItem duplicateItem;
52606090 private MenuItem cloneItem;
52616091 private MenuItem cloneSupportItem;
52626092 private MenuItem overwriteGeoItem;
....@@ -5284,7 +6114,7 @@
52846114 private MenuItem pasteLinkItem;
52856115 private MenuItem pasteCloneItem;
52866116 private MenuItem pasteExpandItem;
5287
- private MenuItem clearItem;
6117
+ private MenuItem deleteItem;
52886118 private MenuItem clearAllItem;
52896119 private MenuItem genUVItem;
52906120 private MenuItem genNormalsMESHItem;
....@@ -5344,7 +6174,7 @@
53446174 private MenuItem frontItem;
53456175 private MenuItem cameraItem;
53466176 private MenuItem compositeItem;
5347
- private MenuItem randomItem;
6177
+ private MenuItem switchItem;
53486178 private MenuItem physicsItem;
53496179 private MenuItem frameselectorItem;
53506180 private MenuItem scriptNodeItem;
....@@ -5368,6 +6198,8 @@
53686198 private MenuItem attachBumpItem;
53696199 private MenuItem detachBumpItem;
53706200 private MenuItem pigmentBumpItem;
6201
+ private MenuItem embedTexturesItem;
6202
+ private MenuItem deEmbedTexturesItem;
53716203
53726204 private MenuItem particleItem;
53736205 private MenuItem ragdollItem;
....@@ -5418,5 +6250,5 @@
54186250
54196251 Menu cameraMenu;
54206252 MenuItem editCameraItem;
5421
- MenuItem revertCameraItem;
6253
+ MenuItem restoreCameraItem;
54226254 }