Normand Briere
2019-07-29 c6c3f0948bd31603547ef8ce47a7784a9a4d55c2
GroupEditor.java
....@@ -23,6 +23,240 @@
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("default", "skycube", 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("park", "Stairs", 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", "Ryfjallet", row4);
148
+ AddSkyboxButton("mountain", "Teide", row4);
149
+ AddSkyboxButton("park", "Tantolunden4", row4);
150
+
151
+ AddSkyboxButton("penguins", "wrath", row5);
152
+ AddSkyboxButton("penguins", "yonder", row5);
153
+ AddSkyboxButton("rocky", "Langholmen", row5);
154
+ AddSkyboxButton("rocky", "Skinnarviksberget", row5);
155
+ AddSkyboxButton("rocky", "Tantolunden6", row5);
156
+
157
+ AddSkyboxButton("default", "CloudyHills", row6);
158
+ AddSkyboxButton("daz", "Autumn", row6);
159
+ AddSkyboxButton("daz", "Greenlands", row6);
160
+ AddSkyboxButton("daz", "MountainTrail", row6);
161
+ AddSkyboxButton("daz", "Oasis", row6);
162
+ /*
163
+Autumn
164
+Greenlands
165
+MountainTrail
166
+Oasis
167
+TheRock
168
+TopOfTheWorld
169
+Winter
170
+ */
171
+
172
+ tab0.add(row0);
173
+ tab0.add(row1);
174
+ tab0.add(row2);
175
+ tab0.add(row3);
176
+ tab0.add(row4);
177
+ tab0.add(row5);
178
+ tab0.add(row6);
179
+
180
+ for (int i=5; --i>=0;)
181
+ {
182
+ //oe.toolboxPanel.Return();
183
+ //tab0.add(new cGridBag());
184
+ }
185
+ }
186
+
187
+ public void AddSkyboxTab2(JTabbedPane skyboxpanel)
188
+ {
189
+ cGridBag tab0 = new cGridBag().setVertical(true);
190
+
191
+ tab0.setName("Night");
192
+ skyboxpanel.add(tab0);
193
+
194
+ cGridBag row0 = new cGridBag();
195
+ cGridBag row1 = new cGridBag();
196
+ cGridBag row2 = new cGridBag();
197
+ cGridBag row3 = new cGridBag();
198
+ cGridBag row4 = new cGridBag();
199
+ cGridBag row5 = new cGridBag();
200
+ cGridBag row6 = new cGridBag();
201
+
202
+ AddSkyboxButton("night", "NightPath", row0);
203
+ AddSkyboxButton("night", "PondNight", row0);
204
+ AddSkyboxButton("night", "Powerlines", row0);
205
+ AddSkyboxButton("night", "SwedishRoyalCastle", row0);
206
+
207
+ AddSkyboxButton("urban", "CNTower", row1);
208
+ AddSkyboxButton("bridge", "ArstaBridge", row1);
209
+ AddSkyboxButton("rocky", "Riddarfjarden", row1);
210
+ AddSkyboxButton("penguins", "sleepyhollow", row1);
211
+
212
+ AddSkyboxButton("penguins", "kenon_star", row2);
213
+ AddSkyboxButton("indoors", "DallasW", row2);
214
+ AddSkyboxButton("indoors", "MarriottMadisonWest", row2);
215
+ AddSkyboxButton("indoors", "Vasa", row2);
216
+
217
+ AddSkyboxButton("winter", "Backyard", row3);
218
+ AddSkyboxButton("winter", "Creek", row3);
219
+ AddSkyboxButton("winter", "FootballField3", row3);
220
+ AddSkyboxButton("winter", "Forest", row3);
221
+
222
+ AddSkyboxButton("winter", "HornstullsStrand2", row4);
223
+ AddSkyboxButton("winter", "House", row4);
224
+ AddSkyboxButton("winter", "IceLake", row4);
225
+ AddSkyboxButton("winter", "IceRiver", row4);
226
+
227
+ AddSkyboxButton("winter", "Park3", row5);
228
+ AddSkyboxButton("winter", "PondWinter", row5);
229
+ AddSkyboxButton("winter", "Tantolunden5", row5);
230
+ AddSkyboxButton("winter", "Vindelalven", row5);
231
+
232
+ AddSkyboxButton("daz", "TheRock", row6);
233
+ AddSkyboxButton("daz", "TopOfTheWorld", row6);
234
+ AddSkyboxButton("daz", "Winter", row6);
235
+ AddSkyboxButton("penguins", "desertdawn", row6);
236
+
237
+ tab0.add(row0);
238
+ tab0.add(row1);
239
+ tab0.add(row2);
240
+ tab0.add(row3);
241
+ tab0.add(row4);
242
+ tab0.add(row5);
243
+ tab0.add(row6);
244
+
245
+ for (int i=5; --i>=0;)
246
+ {
247
+ //oe.toolboxPanel.Return();
248
+ //tab0.add(new cGridBag());
249
+ }
250
+ }
251
+
252
+ public void ChangeSkybox(String name)
253
+ {
254
+ cameraView.envyoff = false;
255
+ cameraView.skyboxname = name;
256
+ cameraView.skyboxext = "jpg";
257
+ cameraView.repaint();
258
+ }
259
+
26260 //ObjEditor objEditor;
27261 public void closeUI2()
28262 {
....@@ -60,6 +294,12 @@
60294 this.copy = this.group = group;
61295 //selectees = this.group.selectees;
62296
297
+ if (copy.versions == null)
298
+ {
299
+ copy.versions = new byte[100][];
300
+ copy.versionindex = -1;
301
+ }
302
+
63303 if(ui)
64304 SetupUI(objEditor);
65305 }
....@@ -80,10 +320,22 @@
80320 SetupViews(objEditor);
81321
82322 ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true);
323
+
324
+ if (copy.versions == null)
325
+ {
326
+ copy.versions = new byte[100][];
327
+ copy.versionindex = -1;
328
+
329
+ Save(true);
330
+ }
83331 }
84332
85333 void CloneSelection(boolean supports)
86334 {
335
+ if (Globals.REPLACEONMAKE)
336
+ Save();
337
+ boolean keep = Globals.REPLACEONMAKE;
338
+ Globals.REPLACEONMAKE = false;
87339 // Object3D keep = GrafreeD.clipboard;
88340 //Object3D obj;
89341 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -94,6 +346,7 @@
94346
95347 makeSomething(clone, i==group.selection.size()-1);
96348 }
349
+ Globals.REPLACEONMAKE = keep;
97350 }
98351
99352 void CloneClipboard(boolean supports)
....@@ -150,11 +403,19 @@
150403
151404 void SetupMenu2(GroupEditor oe)
152405 {
406
+ oe.jTree = new cTree();
407
+
153408 Menu menu;
154409 oe.menuBar.add(menu = new Menu("Edit"));
155410 //editItem = menu.add(new MenuItem("Edit"));
156411 //editItem.addActionListener(this);
157
- duplicateItem = menu.add(new MenuItem("Duplicate"));
412
+
413
+// undoItem = menu.add(new MenuItem("Undo"));
414
+// undoItem.addActionListener(this);
415
+// redoItem = menu.add(new MenuItem("Redo"));
416
+// redoItem.addActionListener(this);
417
+// menu.add("-");
418
+ duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate"));
158419 duplicateItem.addActionListener(this);
159420 cloneItem = menu.add(new MenuItem("Clone"));
160421 cloneItem.addActionListener(this);
....@@ -170,7 +431,6 @@
170431 copyItem.addActionListener(this);
171432 pasteItem = menu.add(new MenuItem("Paste"));
172433 pasteItem.addActionListener(this);
173
- menu.add("-");
174434
175435 menu.add("-");
176436 pasteIntoItem = menu.add(new MenuItem("Paste into"));
....@@ -182,8 +442,8 @@
182442 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
183443 // pasteExpandItem.addActionListener(this);
184444 menu.add("-");
185
- clearItem = menu.add(new MenuItem("Clear"));
186
- clearItem.addActionListener(this);
445
+ deleteItem = menu.add(new MenuItem("Delete"));
446
+ deleteItem.addActionListener(this);
187447
188448 if (Globals.ADVANCED)
189449 {
....@@ -197,23 +457,23 @@
197457 //zBufferItem.addActionListener(this);
198458 //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
199459 //normalLensItem.addActionListener(this);
200
- cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera"));
201
- revertCameraItem.addActionListener(this);
460
+ cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint"));
461
+ restoreCameraItem.addActionListener(this);
202462
203
- cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
204
- toggleFullScreenItem.addItemListener(this);
205
- toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
206
- cameraMenu.add("-");
463
+// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
464
+// toggleFullScreenItem.addItemListener(this);
465
+// toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
466
+// cameraMenu.add("-");
467
+//
468
+// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
469
+// toggleTextureItem.addItemListener(this);
470
+// toggleTextureItem.setState(CameraPane.textureon);
471
+//
472
+// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
473
+// toggleSwitchItem.addItemListener(this);
474
+// toggleSwitchItem.setState(CameraPane.SWITCH);
207475
208
- cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
209
- toggleTextureItem.addItemListener(this);
210
- toggleTextureItem.setState(CameraPane.textureon);
211
-
212
- cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
213
- toggleSwitchItem.addItemListener(this);
214
- toggleSwitchItem.setState(CameraPane.SWITCH);
215
-
216
- cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
476
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles"));
217477 toggleHandleItem.addItemListener(this);
218478 toggleHandleItem.setState(CameraPane.HANDLES);
219479
....@@ -240,7 +500,7 @@
240500
241501 cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
242502 toggleDebugItem.addItemListener(this);
243
- toggleDebugItem.setState(CameraPane.DEBUG);
503
+ toggleDebugItem.setState(Globals.DEBUG);
244504
245505 cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
246506 toggleFrustumItem.addItemListener(this);
....@@ -261,14 +521,14 @@
261521 // animationItem.addItemListener(this);
262522 // animationItem.setState(CameraPane.ANIMATION);
263523 cameraMenu.add("-");
264
- cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera"));
524
+ cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint"));
265525 editCameraItem.addActionListener(this);
266526
267527 if (Globals.ADVANCED)
268528 {
269529 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
270530 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
271
- //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
531
+ //cameraMenu.add(switchViewItem = new MenuItem("Reverse View"));
272532 editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
273533 oe.cameraMenu.add("-");
274534 openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
....@@ -276,7 +536,7 @@
276536 editLeafItem.addActionListener(this);
277537 lookAtItem.addActionListener(this);
278538 //lookFromItem.addActinoListener(this);
279
- //switchItem.addActionListener(this);
539
+ //switchViewItem.addActionListener(this);
280540 }
281541
282542 oe.menuBar.add(menu = new Menu("Setting"));
....@@ -321,21 +581,29 @@
321581 }
322582
323583 oe.menuBar.add(menu = new Menu("Group"));
324
- grabItem = menu.add(new MenuItem("Grab"));
325
- grabItem.addActionListener(this);
584
+// grabItem = menu.add(new MenuItem("Grab"));
585
+// grabItem.addActionListener(this);
326586 backItem = menu.add(new MenuItem("Back"));
327587 backItem.addActionListener(this);
328588 frontItem = menu.add(new MenuItem("Front"));
329589 frontItem.addActionListener(this);
330
- compositeItem = menu.add(new MenuItem("Composite"));
331
- compositeItem.addActionListener(this);
590
+// compositeItem = menu.add(new MenuItem("Composite"));
591
+// compositeItem.addActionListener(this);
592
+
593
+ if (Globals.ADVANCED)
594
+ {
332595 hideItem = menu.add(new MenuItem("Hidden Group"));
333596 hideItem.addActionListener(this);
597
+ }
334598 ungroupItem = menu.add(new MenuItem("Ungroup"));
335599 ungroupItem.addActionListener(this);
336
- menu.add("-");
337
- randomItem = menu.add(new MenuItem("Switch node"));
338
- randomItem.addActionListener(this);
600
+
601
+// menu.add("-");
602
+//
603
+// switchItem = menu.add(new MenuItem("Switch node"));
604
+// switchItem.addActionListener(this);
605
+ if (Globals.ADVANCED)
606
+ {
339607 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
340608 switchGeoItem.addActionListener(this);
341609 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
....@@ -343,8 +611,6 @@
343611 morphItem = menu.add(new MenuItem("Morph Group"));
344612 morphItem.addActionListener(this);
345613
346
- if (Globals.ADVANCED)
347
- {
348614 menu.add("-");
349615 physicsItem = menu.add(new MenuItem("Physics"));
350616 physicsItem.addActionListener(this);
....@@ -352,30 +618,29 @@
352618 frameselectorItem.addActionListener(this);
353619 scriptNodeItem = menu.add(new MenuItem("Script Node"));
354620 scriptNodeItem.addActionListener(this);
355
- cameraItem = menu.add(new MenuItem("Camera"));
356
- cameraItem.addActionListener(this);
357621 }
358622
359623 oe.menuBar.add(menu = new Menu("Object"));
360
- textureItem = menu.add(new MenuItem("Texture"));
361
- textureItem.addActionListener(this);
624
+// textureItem = menu.add(new MenuItem("Texture"));
625
+// textureItem.addActionListener(this);
362626 billboardItem = menu.add(new MenuItem("Billboard"));
363627 billboardItem.addActionListener(this);
364628 csgItem = menu.add(new MenuItem("CSG"));
365629 csgItem.addActionListener(this);
366
- shadowXItem = menu.add(new MenuItem("Shadow X"));
630
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
367631 shadowXItem.addActionListener(this);
368
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
632
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
369633 shadowYItem.addActionListener(this);
370
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
634
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
371635 shadowZItem.addActionListener(this);
636
+ attributeItem = menu.add(new MenuItem("Attribute"));
637
+ attributeItem.addActionListener(this);
638
+
372639 if (Globals.ADVANCED)
373640 {
374641 menu.add("-");
375642 linkerItem = menu.add(new MenuItem("Linker"));
376643 linkerItem.addActionListener(this);
377
- attributeItem = menu.add(new MenuItem("Attribute"));
378
- attributeItem.addActionListener(this);
379644 templateItem = menu.add(new MenuItem("Template"));
380645 templateItem.addActionListener(this);
381646 pointflowItem = menu.add(new MenuItem("Point Flow"));
....@@ -404,7 +669,7 @@
404669 genNormalsMESHItem.addActionListener(this);
405670 if (Globals.ADVANCED)
406671 {
407
- genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
672
+ genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals"));
408673 genNormalsMINEItem.addActionListener(this);
409674 }
410675 stripifyItem = menu.add(new MenuItem("Stripify"));
....@@ -464,6 +729,14 @@
464729 markleavesItem.addActionListener(this);
465730 unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
466731 unmarkleavesItem.addActionListener(this);
732
+ rewindleavesItem = menu.add(new MenuItem("Rewind Leaves"));
733
+ rewindleavesItem.addActionListener(this);
734
+ unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves"));
735
+ unrewindleavesItem.addActionListener(this);
736
+ randomleavesItem = menu.add(new MenuItem("Random Leaves"));
737
+ randomleavesItem.addActionListener(this);
738
+ unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves"));
739
+ unrandomleavesItem.addActionListener(this);
467740 menu.add("-");
468741 flipVItem = menu.add(new MenuItem("Flip V"));
469742 flipVItem.addActionListener(this);
....@@ -489,10 +762,15 @@
489762 attachBumpItem.addActionListener(this);
490763 pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump"));
491764 pigmentBumpItem.addActionListener(this);
765
+ //embedTexturesItem
492766 detachPigmentItem = menu.add(new MenuItem("Detach Pigment"));
493767 detachPigmentItem.addActionListener(this);
494768 detachBumpItem = menu.add(new MenuItem("Detach Bump"));
495769 detachBumpItem.addActionListener(this);
770
+ embedTexturesItem = menu.add(new MenuItem("Embed Textures"));
771
+ embedTexturesItem.addActionListener(this);
772
+ deEmbedTexturesItem = menu.add(new MenuItem("De-embed Textures"));
773
+ deEmbedTexturesItem.addActionListener(this);
496774 menu.add("-");
497775 sortbysizeItem = menu.add(new MenuItem("Sort by size"));
498776 sortbysizeItem.addActionListener(this);
....@@ -519,8 +797,21 @@
519797 buildToolsMenu(menu);
520798 }
521799
800
+
522801 void SetupUI2(ObjEditor oe)
523802 {
803
+ // June 2019
804
+ if (oe == null)
805
+ {
806
+ //super.SetupUI2(this);
807
+ //return;
808
+ }
809
+
810
+ if (copy != group)
811
+ {
812
+ //super.SetupUI2(this);
813
+ }
814
+
524815 //new Exception().printStackTrace();
525816
526817 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -549,27 +840,79 @@
549840 oe.radioPanel.add(dummyButton);
550841 oe.buttonGroup.add(dummyButton);
551842 */
843
+ cGridBag copyOptionsPanel = new cGridBag();
844
+
845
+ copyOptionsPanel.preferredHeight = 2;
846
+
552847 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
553848
554
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
849
+ //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
850
+ //minButton.setToolTipText("Minimize window");
851
+ //minButton.addActionListener(this);
852
+
853
+ if (Globals.ADVANCED)
854
+ {
855
+ oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
856
+ maxButton.setToolTipText("Maximize window");
857
+ maxButton.addActionListener(this);
858
+ }
859
+
860
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
861
+ fullButton.setToolTipText("Full-screen window");
862
+ fullButton.addActionListener(this);
863
+
864
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
865
+ screenfitButton.setToolTipText("Screen fit");
866
+ screenfitButton.addActionListener(this);
867
+
868
+ oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
869
+ restoreCameraButton.setToolTipText("Restore viewpoint");
870
+ restoreCameraButton.addActionListener(this);
871
+
872
+ copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
873
+ saveButton.setToolTipText("New version");
874
+ saveButton.addActionListener(this);
875
+
876
+ copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
877
+ undoButton.setToolTipText("Previous version");
878
+ undoButton.addActionListener(this);
879
+ undoButton.setEnabled(false);
880
+
881
+ cGridBag updown = new cGridBag().setVertical(true);
882
+ updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
883
+ restoreButton.setToolTipText("Restore current");
884
+ restoreButton.addActionListener(this);
885
+ restoreButton.setEnabled(false);
886
+
887
+ updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
888
+ replaceButton.setToolTipText("Replace current");
889
+ replaceButton.addActionListener(this);
890
+ replaceButton.setEnabled(false);
891
+
892
+ copyOptionsPanel.add(updown);
893
+
894
+ copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
895
+ redoButton.setToolTipText("Next version");
896
+ redoButton.addActionListener(this);
897
+ redoButton.setEnabled(false);
898
+
899
+ oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
555900 liveCB.setToolTipText("Enable animation");
556901 liveCB.addItemListener(this);
557902
558
- oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
903
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
559904 oneStepButton.setToolTipText("Animate one step forward");
560905 oneStepButton.addActionListener(this);
561906
562
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
907
+ oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
563908 fastCB.setToolTipText("Fast mode");
564909 fastCB.addItemListener(this);
565910
566
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
567
- trackCB.setToolTipText("Enable tracking");
568
- trackCB.addItemListener(this);
569
-
570
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
571
- screenfitButton.setToolTipText("Screen fit");
572
- screenfitButton.addActionListener(this);
911
+ //oe.toolboxPanel.Return();
912
+
913
+// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
914
+// trackCB.setToolTipText("Enable tracking");
915
+// trackCB.addItemListener(this);
573916
574917 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
575918 // screenfitpointButton.addActionListener(this);
....@@ -579,67 +922,155 @@
579922 oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
580923 snapobjectButton.addActionListener(this);
581924 snapobjectButton.setToolTipText("Snap Object");
925
+
926
+ oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
927
+ fourButton.addActionListener(this);
928
+ fourButton.setToolTipText("Show control panel only");
582929 }
583930
584
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
585
- flashSelectionButton.setToolTipText("Show selection");
586
- flashSelectionButton.addActionListener(this);
931
+ //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
587932
588
- oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
589
-
590
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
591
- twoButton.setToolTipText("Show center view only");
933
+ oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
934
+ twoButton.setToolTipText("Show 3D view only");
592935 twoButton.addActionListener(this);
593
- oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
594
- fourButton.addActionListener(this);
595
- fourButton.setToolTipText("Show left panel only");
596
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
597
- sixButton.setToolTipText("2-column layout left");
598
- sixButton.addActionListener(this);
599
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
600
- threeButton.setToolTipText("2-column layout right");
936
+ this.fullscreenLayout = twoButton;
937
+
938
+ oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
939
+ threeButton.setToolTipText("Show controls and 3D view");
601940 threeButton.addActionListener(this);
602
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
603
- sevenButton.setToolTipText("3-column layout");
604
- sevenButton.addActionListener(this);
941
+ oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
942
+ sixButton.setToolTipText("Show 3D view and controls");
943
+ sixButton.addActionListener(this);
944
+// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
945
+// sevenButton.setToolTipText("3-column layout");
946
+// sevenButton.addActionListener(this);
605947 //
606948
607
- oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
608
- rootButton.setToolTipText("Edit selection in new tab");
949
+ oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
950
+ rootButton.setToolTipText("Open selection in new tab");
609951 rootButton.addActionListener(this);
610952
611
- oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
953
+ oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
612954 closeButton.setToolTipText("Close tab");
613955 closeButton.addActionListener(this);
614956 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
615957 //clearButton.addActionListener(this);
616
-
617
- cGridBag commandsPanel = new cGridBag();
958
+
959
+ cGridBag row1 = new cGridBag();
618960
619
- commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
620
- editButton.setToolTipText("Edit selection");
961
+ // INSERT
962
+ row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
963
+ gridButton.setToolTipText("Create grid");
964
+ gridButton.addActionListener(this);
965
+
966
+ row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
967
+ boxButton.setToolTipText("Create box");
968
+ boxButton.addActionListener(this);
969
+
970
+ row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
971
+ sphereButton.setToolTipText("Create sphere");
972
+ sphereButton.addActionListener(this);
973
+
974
+ row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
975
+ coneButton.setToolTipText("Create cone");
976
+ coneButton.addActionListener(this);
977
+
978
+ row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
979
+ torusButton.setToolTipText("Create torus");
980
+ torusButton.addActionListener(this);
981
+
982
+ row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
983
+ superButton.setToolTipText("Create superellipsoid");
984
+ superButton.addActionListener(this);
985
+
986
+ if (Globals.ADVANCED)
987
+ {
988
+ oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
989
+ kleinButton.setToolTipText("Create Klein bottle");
990
+ kleinButton.addActionListener(this);
991
+ }
992
+
993
+ row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
994
+ particlesButton.setToolTipText("Create particle system");
995
+ particlesButton.addActionListener(this);
996
+
997
+ oe.toolboxPanel.add(row1);
998
+
999
+ cGridBag row2 = new cGridBag();
1000
+
1001
+ row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1002
+ groupButton.setToolTipText("Create group");
1003
+ groupButton.addActionListener(this);
1004
+
1005
+ row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1006
+ compositeButton.setToolTipText("Create composite");
1007
+ compositeButton.addActionListener(this);
1008
+
1009
+ row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1010
+ switchButton.setToolTipText("Create item switcher");
1011
+ switchButton.addActionListener(this);
1012
+
1013
+ row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1014
+ loopButton.setToolTipText("Create loop");
1015
+ loopButton.addActionListener(this);
1016
+
1017
+ row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1018
+ textureButton.setToolTipText("Create texture");
1019
+ textureButton.addActionListener(this);
1020
+
1021
+ row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1022
+ overlayButton.setToolTipText("Create overlay");
1023
+ overlayButton.addActionListener(this);
1024
+
1025
+ row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1026
+ lightButton.setToolTipText("Create light");
1027
+ lightButton.addActionListener(this);
1028
+
1029
+ oe.toolboxPanel.add(row2);
1030
+
1031
+ // ENVYMAPS
1032
+ cGridBag skyboxpane = new cGridBag();
1033
+ skyboxpane.preferredHeight = 100;
1034
+
1035
+ oe.toolboxPanel.add(skyboxpane);
1036
+
1037
+ JTabbedPane skyboxpanel = new JTabbedPane();
1038
+ skyboxpane.add(skyboxpanel);
1039
+
1040
+ AddSkyboxTab0(skyboxpanel);
1041
+ AddSkyboxTab1(skyboxpanel);
1042
+ AddSkyboxTab2(skyboxpanel);
1043
+
1044
+ // EDIT panel
1045
+ editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1046
+ editButton.setToolTipText("Pin selection controls");
6211047 editButton.addActionListener(this);
6221048
623
- commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
624
- uneditButton.setToolTipText("Unedit selection");
1049
+ editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1050
+ uneditButton.setToolTipText("Remove selection controls");
6251051 uneditButton.addActionListener(this);
6261052
627
- commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
628
- allParamsButton.setToolTipText("Edit all params");
1053
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
1054
+ allParamsButton.setToolTipText("Show all controle");
6291055 allParamsButton.addActionListener(this);
6301056
631
- commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1057
+ editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
6321058 clearPanelButton.setToolTipText("Clear edit panel");
6331059 clearPanelButton.addActionListener(this);
6341060
635
- commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1061
+ editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
6361062 unselectButton.setToolTipText("Unselect");
6371063 unselectButton.addActionListener(this);
6381064
639
- commandsPanel.preferredHeight = 1;
1065
+ editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1066
+ flashSelectionButton.setToolTipText("Highlight selection");
1067
+ flashSelectionButton.addActionListener(this);
6401068
641
- oe.treePanel.add(commandsPanel);
642
- oe.treePanel.Return();
1069
+ editCommandsPanel.preferredHeight = 1;
1070
+
1071
+ SetPinStates(false);
1072
+// oe.treePanel.add(commandsPanel);
1073
+// oe.treePanel.Return();
6431074
6441075 // oe.aConstraints.gridx += 1;
6451076 // oe.aConstraints.weighty = 0;
....@@ -656,32 +1087,20 @@
6561087
6571088 JScrollPane jSP;
6581089 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
659
- jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
1090
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
6601091 ResetModel();
6611092
6621093 oe.treePanel.add(jSPPanel);
6631094 oe.treePanel.Return();
6641095
665
- cGridBag copyOptionsPanel = new cGridBag();
666
-
667
- copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
668
- colorCB.setToolTipText("Copy color when dropped");
669
- colorCB.addItemListener(this);
670
-
671
- copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
672
- materialCB.setToolTipText("Copy material when dropped");
673
- materialCB.addItemListener(this);
674
-
675
- copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
676
- textureCB.setToolTipText("Copy texture when dropped");
677
- textureCB.addItemListener(this);
678
-
679
- copyOptionsPanel.preferredHeight = 1;
6801096 oe.treePanel.add(copyOptionsPanel);
6811097 oe.treePanel.Return();
1098
+ cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
1099
+ versionSlider = (cNumberSlider)sliderPane.getComponent(1);
1100
+ sliderPane.preferredHeight = 1;
6821101
683
-// mainPanel.setDividerLocation(0.5); //1.0);
684
-// mainPanel.setResizeWeight(0.5);
1102
+// mainPanel.setDividerLocation(0.1); //1.0);
1103
+ mainPanel.setResizeWeight(0.4);
6851104
6861105 //jList.addListSelectionListener(this);
6871106 oe.jTree.addTreeSelectionListener(this);
....@@ -689,7 +1108,7 @@
6891108 //jTree.setEditable(true);
6901109 oe.jTree.setDragEnabled(true);
6911110 //jTree.setPreferredSize(new Dimension(10,10));
692
- jSP.setPreferredSize(new Dimension(100,200));
1111
+ //jSP.setPreferredSize(new Dimension(100,200));
6931112
6941113 oe.jTree.setCellRenderer(new cTreeModel.Renderer());
6951114
....@@ -701,29 +1120,49 @@
7011120 dgr.addDragGestureListener(this);
7021121 }catch(Exception e) {}
7031122 */
704
- radio.layout = sevenButton;
1123
+ radio.layout = sixButton; // sevenButton;
7051124 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
7061125 }
7071126
7081127 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
7091128 {
1129
+ panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
1130
+ colorCB.setToolTipText("Copy color when dropped");
1131
+ colorCB.addItemListener(this);
1132
+
1133
+ panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
1134
+ materialCB.setToolTipText("Copy material when dropped");
1135
+ materialCB.addItemListener(this);
1136
+
1137
+ panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
1138
+ textureCB.setToolTipText("Copy texture when dropped");
1139
+ textureCB.addItemListener(this);
1140
+
1141
+ panel.Return();
1142
+
7101143 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
7111144 boxCB.setToolTipText("Display bounding boxes");
7121145 boxCB.addItemListener(this);
7131146
7141147 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
715
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
1148
+ zoomBoxCB.setToolTipText("Display only for wheel");
7161149 zoomBoxCB.addItemListener(this);
7171150
7181151 if (true) // Globals.ADVANCED)
7191152 {
720
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
721
- supportCB.setToolTipText("Enable rigging");
722
- supportCB.addItemListener(this);
1153
+// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
1154
+// supportCB.setToolTipText("Enable rigging");
1155
+// supportCB.addItemListener(this);
1156
+
1157
+ panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints);
1158
+ freezeCB.setToolTipText("Fast moving camera");
1159
+ freezeCB.addItemListener(this);
7231160
7241161 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
7251162 // localCB.addItemListener(this);
7261163
1164
+ panel.Return();
1165
+
7271166 panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
7281167 crowdCB.setToolTipText("Used for crowds");
7291168 crowdCB.addItemListener(this);
....@@ -740,6 +1179,8 @@
7401179 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
7411180 // speakerMocapCB.addItemListener(this);
7421181
1182
+ panel.Return();
1183
+
7431184 if (false)
7441185 {
7451186 // handled in scripts
....@@ -754,34 +1195,74 @@
7541195 //constraints.gridy += 1;
7551196 panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
7561197 smoothfocusCB.addItemListener(this);
1198
+ panel.Return();
7571199 }
7581200
7591201 //constraints.gridx += 1;
7601202 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
7611203 // debugCB.addItemListener(this);
7621204
1205
+ panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
1206
+ trackCB.setToolTipText("Enable tracking target");
1207
+ trackCB.addItemListener(this);
1208
+
7631209 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
1210
+ oeilCB.setToolTipText("Move camera when tracking");
7641211 oeilCB.addItemListener(this);
7651212
1213
+ panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
1214
+ shadowCB.setToolTipText("When live compute shadows");
1215
+ shadowCB.addItemListener(this);
1216
+
1217
+ panel.Return();
1218
+ panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints);
1219
+ toggleTextureCB.setToolTipText("Load textures");
1220
+ toggleTextureCB.addItemListener(this);
1221
+
1222
+ panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints);
1223
+ toggleSwitchCB.setToolTipText("Choose a single item");
1224
+ toggleSwitchCB.addItemListener(this);
1225
+
1226
+ panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints);
1227
+ autokeepCB.setToolTipText("On structure change");
1228
+ autokeepCB.addItemListener(this);
1229
+
1230
+ panel.Return();
1231
+ if (Globals.ADVANCED)
1232
+ {
7661233 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
7671234 lookAtCB.setToolTipText("Look-at target");
7681235 lookAtCB.addItemListener(this);
1236
+ }
7691237
7701238 }
7711239
7721240 cGridBag fill = new cGridBag();
773
-
7741241 fill.preferredHeight = 200;
1242
+ cGridBag fill2 = new cGridBag();
1243
+ fill2.preferredHeight = 200;
1244
+ cGridBag fill3 = new cGridBag();
1245
+ fill3.preferredHeight = 200;
7751246
7761247 panel.add(fill);
1248
+ panel.add(fill2);
1249
+ panel.add(fill3);
7771250
7781251 }
7791252
7801253 void EditObject(Object3D obj)
7811254 {
7821255 cRadio radioButton = new cRadio(obj.name);
1256
+
1257
+ // June 2019. Patch to avoid bug with transparency.
1258
+ radioButton.hadMaterial = obj.material != null;
1259
+ if (!radioButton.hadMaterial)
1260
+ {
1261
+ obj.material = new cMaterial();
1262
+ }
1263
+
7831264 radioButton.SetObject(obj);
784
- radioButton.layout = sevenButton;
1265
+ radioButton.layout = sixButton; // sevenButton;
7851266 radioButton.SetCamera(cameraView.renderCamera, false);
7861267 radioButton.addActionListener(this);
7871268 radioPanel.add(radioButton);
....@@ -791,6 +1272,8 @@
7911272
7921273 void SetupViews(ObjEditor oe)
7931274 {
1275
+ theFrame = this;
1276
+
7941277 oe.SetupViews();
7951278
7961279 System.out.println("SetupViews");
....@@ -799,23 +1282,28 @@
7991282 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
8001283 }
8011284
802
- JCheckBox liveCB;
803
- JCheckBox supportCB;
804
- JCheckBox localCB;
805
- JCheckBox crowdCB;
806
- JCheckBox smoothCB;
807
- JCheckBox fastCB;
808
- JCheckBox slowCB;
809
- JCheckBox boxCB;
810
- JCheckBox zoomBoxCB;
811
- JCheckBox trackCB;
812
- JCheckBox smoothfocusCB;
1285
+ cToggleButton liveCB;
1286
+ cCheckBox supportCB;
1287
+ cCheckBox localCB;
1288
+ cCheckBox crowdCB;
1289
+ cCheckBox smoothCB;
1290
+ cToggleButton fastCB;
1291
+ cCheckBox slowCB;
1292
+ cCheckBox boxCB;
1293
+ cCheckBox zoomBoxCB;
1294
+ cCheckBox freezeCB;
1295
+ //cToggleButton trackCB;
1296
+ cCheckBox trackCB;
1297
+ cCheckBox smoothfocusCB;
8131298 // JCheckBox speakerMocapCB;
814
- JCheckBox speakerCameraCB;
815
- JCheckBox speakerFocusCB;
816
- JCheckBox debugCB;
817
- JCheckBox oeilCB;
818
- JCheckBox lookAtCB;
1299
+ cCheckBox speakerCameraCB;
1300
+ cCheckBox speakerFocusCB;
1301
+ cCheckBox debugCB;
1302
+
1303
+ cCheckBox oeilCB;
1304
+ cCheckBox shadowCB;
1305
+ cCheckBox autokeepCB;
1306
+ cCheckBox lookAtCB;
8191307
8201308 // static int COLOR = 1;
8211309 // static int MATERIAL = 2;
....@@ -823,9 +1311,9 @@
8231311
8241312 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
8251313
826
- JCheckBox colorCB;
827
- JCheckBox materialCB;
828
- JCheckBox textureCB;
1314
+ cCheckBox colorCB;
1315
+ cCheckBox materialCB;
1316
+ cCheckBox textureCB;
8291317
8301318 public void itemStateChanged(ItemEvent e)
8311319 {
....@@ -853,6 +1341,7 @@
8531341 } else if(e.getSource() == liveCB)
8541342 {
8551343 cameraView.ToggleLive();
1344
+ refreshContents(false);
8561345 }
8571346 else if(e.getSource() == supportCB)
8581347 {
....@@ -917,6 +1406,18 @@
9171406 {
9181407 cameraView.ToggleOeil();
9191408 }
1409
+ else if(e.getSource() == shadowCB)
1410
+ {
1411
+ Globals.COMPUTESHADOWWHENLIVE ^= true;
1412
+ }
1413
+ else if(e.getSource() == freezeCB)
1414
+ {
1415
+ Globals.FREEZEONMOVE ^= true;
1416
+ }
1417
+ else if(e.getSource() == autokeepCB)
1418
+ {
1419
+ Globals.REPLACEONMAKE ^= true;
1420
+ }
9201421 else if(e.getSource() == lookAtCB)
9211422 {
9221423 cameraView.ToggleLookAt();
....@@ -933,7 +1434,8 @@
9331434
9341435 /**/
9351436 //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this);
936
- TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1437
+ //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1438
+ TreePath path = objEditor.jTree.getSelectionPath();
9371439 if ((path == null) || (path.getPathCount() <= 1)) {
9381440 // We can't move the root node or an empty selection
9391441 return;
....@@ -996,8 +1498,6 @@
9961498 }
9971499 }
9981500
999
- String string = (String) object;
1000
-
10011501 System.out.println("Transfer = " + object + "; drop : " + target);
10021502 // if( object instanceof java.io.File[])
10031503 // {
....@@ -1005,6 +1505,8 @@
10051505 // objEditor.DropFile((java.io.File[]) object, true);
10061506 // return;
10071507 // }
1508
+
1509
+ String string = object.toString();
10081510
10091511 // File path for Mac and Windows
10101512 if (string.charAt(0) == '/' || string.charAt(1) == ':')
....@@ -1050,23 +1552,33 @@
10501552
10511553 assert target == objEditor.jTree;
10521554 TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y);
1555
+ Object3D destinationLeaf;
10531556 try {
1054
- Object3D dummy = (Composite) destinationPath.getLastPathComponent();
1557
+ destinationLeaf = (Composite) destinationPath.getLastPathComponent();
10551558 } catch (Exception e) {
10561559 System.out.println("destinationPath : " + destinationPath);
10571560 return;
10581561 }
10591562
1060
- if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1563
+ for (int i=group.selection.size(); --i>=0;)
10611564 {
1565
+ Object3D child = (Object3D)group.selection.elementAt(i);
1566
+
1567
+ // Cannot move into itself
1568
+ if (child == destinationLeaf)
1569
+ return;
1570
+ }
1571
+
1572
+// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1573
+// {
10621574 loadClipboard(true);
10631575 objEditor.jTree.setSelectionPath(destinationPath);
10641576 pasteInto(false, false);
1065
- } else {
1066
- loadClipboard(false);
1067
- objEditor.jTree.setSelectionPath(destinationPath);
1068
- pasteInto(false, false); // true); // ???
1069
- }
1577
+// } else {
1578
+// loadClipboard(false);
1579
+// objEditor.jTree.setSelectionPath(destinationPath);
1580
+// pasteInto(false, false); // true); // ???
1581
+// }
10701582 }
10711583 public void dropActionChanged(DropTargetDragEvent dtde)
10721584 // Called if the user has modified the current drop gesture
....@@ -1171,22 +1683,30 @@
11711683 {
11721684 //heightFieldItem = menu.add(new MenuItem("Height Field"));
11731685 //heightFieldItem.addActionListener(this);
1174
- gridItem = menu.add(new MenuItem("Grid"));
1175
- gridItem.addActionListener(this);
1176
- rectoidItem = menu.add(new MenuItem("Box"));
1177
- rectoidItem.addActionListener(this);
1178
- ellipsoidItem = menu.add(new MenuItem("Sphere"));
1179
- ellipsoidItem.addActionListener(this);
1180
- coneItem = menu.add(new MenuItem("Cone"));
1181
- coneItem.addActionListener(this);
1182
- torusItem = menu.add(new MenuItem("Torus"));
1183
- torusItem.addActionListener(this);
1184
- superItem = menu.add(new MenuItem("Superellipsoid"));
1185
- superItem.addActionListener(this);
1686
+// gridItem = menu.add(new MenuItem("Grid"));
1687
+// gridItem.addActionListener(this);
1688
+// rectoidItem = menu.add(new MenuItem("Box"));
1689
+// rectoidItem.addActionListener(this);
1690
+// ellipsoidItem = menu.add(new MenuItem("Sphere"));
1691
+// ellipsoidItem.addActionListener(this);
1692
+// coneItem = menu.add(new MenuItem("Cone"));
1693
+// coneItem.addActionListener(this);
1694
+// torusItem = menu.add(new MenuItem("Torus"));
1695
+// torusItem.addActionListener(this);
1696
+// superItem = menu.add(new MenuItem("Superellipsoid"));
1697
+// superItem.addActionListener(this);
1698
+
1699
+ cameraItem = menu.add(new MenuItem("Camera"));
1700
+ cameraItem.addActionListener(this);
1701
+
1702
+ if (!Globals.ADVANCED)
1703
+ {
11861704 kleinItem = menu.add(new MenuItem("Klein Bottle"));
11871705 kleinItem.addActionListener(this);
1188
- particleItem = menu.add(new MenuItem("Particle system"));
1189
- particleItem.addActionListener(this);
1706
+ }
1707
+
1708
+// particleItem = menu.add(new MenuItem("Particle system"));
1709
+// particleItem.addActionListener(this);
11901710 if (Globals.ADVANCED)
11911711 {
11921712 ragdollItem = menu.add(new MenuItem("Rag Walk"));
....@@ -1212,15 +1732,15 @@
12121732 }
12131733 bezierItem = menu.add(new MenuItem("Bezier Patch"));
12141734 bezierItem.addActionListener(this);
1215
- overlayItem = menu.add(new MenuItem("Overlay"));
1216
- overlayItem.addActionListener(this);
1217
- lightItem = menu.add(new MenuItem("Light"));
1218
- lightItem.addActionListener(this);
1735
+// overlayItem = menu.add(new MenuItem("Overlay"));
1736
+// overlayItem.addActionListener(this);
1737
+// lightItem = menu.add(new MenuItem("Light"));
1738
+// lightItem.addActionListener(this);
12191739 menu.add("-");
12201740 //superLoopItem = menu.add(new MenuItem("Super Loop"));
12211741 //superLoopItem.addActionListener(this);
1222
- loopItem = menu.add(new MenuItem("Loop"));
1223
- loopItem.addActionListener(this);
1742
+// loopItem = menu.add(new MenuItem("Loop"));
1743
+// loopItem.addActionListener(this);
12241744 doubleItem = menu.add(new MenuItem("Fork"));
12251745 doubleItem.addActionListener(this);
12261746 if (Globals.ADVANCED)
....@@ -1236,6 +1756,9 @@
12361756 animationItem.addItemListener(this);
12371757 animationItem.setState(Globals.ANIMATION);
12381758
1759
+ menu.add(archiveItem = new MenuItem("Archive3D..."));
1760
+ archiveItem.addActionListener(this);
1761
+
12391762 menu.add("-");
12401763 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
12411764 parseverticesItem.addActionListener(this);
....@@ -1248,6 +1771,8 @@
12481771 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
12491772 reduce34MorphItem.addActionListener(this);
12501773 menu.add("-");
1774
+ menu.add(memoryItem = new MenuItem("Memory Usage"));
1775
+ memoryItem.addActionListener(this);
12511776 menu.add(computeAOItem = new MenuItem("Compute AO"));
12521777 computeAOItem.addActionListener(this);
12531778
....@@ -1256,11 +1781,9 @@
12561781 mirrorItem = menu.add(new MenuItem("Mirror Poses"));
12571782 mirrorItem.addActionListener(this);
12581783 menu.add("-");
1259
- menu.add(memoryItem = new MenuItem("Memory Usage"));
1260
- memoryItem.addActionListener(this);
12611784 menu.add(analyzeItem = new MenuItem("Analyze"));
12621785 analyzeItem.addActionListener(this);
1263
- menu.add(dumpItem = new MenuItem("Dump"));
1786
+ menu.add(dumpItem = new MenuItem("Print"));
12641787 dumpItem.addActionListener(this);
12651788 // menu.add(pathItem = new MenuItem("From-to path"));
12661789 // pathItem.addActionListener(this);
....@@ -1401,9 +1924,34 @@
14011924 shadow.material = new cMaterial(obj.material);
14021925 shadow.material.diffuse = 0.0001f;
14031926 shadow.material.specular = 0.0001f;
1927
+ //shadow.projectedVertices[1].x = 300;
14041928
14051929 makeSomething(shadow);
14061930 }
1931
+
1932
+ private void ClearUnpinned()
1933
+ {
1934
+ //for (Object3D obj : listUI)
1935
+ for (int i=listUI.size(); --i>=0;)
1936
+ {
1937
+ Object3D obj = listUI.elementAt(i);
1938
+ if (!obj.pinned)
1939
+ {
1940
+ obj.CloseUI();
1941
+ listUI.remove(i);
1942
+ }
1943
+ }
1944
+ }
1945
+
1946
+ private void EditElement(Object3D elem, boolean newWindow)
1947
+ {
1948
+ // if (!(elem instanceof Composite))
1949
+ // newWindow = false;
1950
+ listUI.add(elem);
1951
+ elem.openEditWindow(this, newWindow); //, false);
1952
+ System.out.println("edit : " + elem);
1953
+ elem.editWindow.refreshContents(true); // ? new
1954
+ }
14071955
14081956 /**
14091957 * applyExample
....@@ -1648,7 +2196,7 @@
16482196 {
16492197 ScreenFit();
16502198 } else
1651
- if (source == switchItem)
2199
+ if (source == switchViewItem)
16522200 {
16532201 cVector v1 = new cVector();
16542202 cVector v2 = new cVector();
....@@ -1657,11 +2205,11 @@
16572205 objEditor.cameraView.renderCamera.setAim(v2, v1);
16582206 objEditor.cameraView.repaint();
16592207 } else
1660
- if (source == rectoidItem)
2208
+ if (source == rectoidItem || source == boxButton)
16612209 {
16622210 makeSomething(new Box());
16632211 } else
1664
- if (source == particleItem)
2212
+ if (source == particleItem || source == particlesButton)
16652213 {
16662214 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
16672215 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1740,27 +2288,27 @@
17402288
17412289 makeSomething(obj);
17422290 } else
1743
- if (source == gridItem)
2291
+ if (source == gridItem || source == gridButton)
17442292 {
17452293 makeSomething(new Grid());
17462294 } else
1747
- if (source == ellipsoidItem)
2295
+ if (source == ellipsoidItem || source == sphereButton)
17482296 {
17492297 makeSomething(new Sphere());
17502298 } else
1751
- if (source == coneItem)
2299
+ if (source == coneItem || source == coneButton)
17522300 {
17532301 makeSomething(new Cone());
17542302 } else
1755
- if (source == torusItem)
2303
+ if (source == torusItem || source == torusButton)
17562304 {
17572305 makeSomething(new Torus());
17582306 } else
1759
- if (source == superItem)
2307
+ if (source == superItem || source == superButton)
17602308 {
17612309 makeSomething(new Superellipsoid());
17622310 } else
1763
- if (source == kleinItem)
2311
+ if (source == kleinItem || source == kleinButton)
17642312 {
17652313 makeSomething(new Klein());
17662314 } else
....@@ -1780,7 +2328,7 @@
17802328 {
17812329 makeSomething(new BezierSurface());
17822330 } else
1783
- if (source == overlayItem)
2331
+ if (source == overlayItem || source == overlayButton)
17842332 {
17852333 /*
17862334 Object3D obj = new BezierSurface(5,8);
....@@ -1828,10 +2376,27 @@
18282376 s.setup();
18292377 makeSomething(s);
18302378 } else
1831
- if (source == lightItem)
2379
+ if (source == lightItem || source == lightButton)
18322380 {
18332381 makeSomething(new Light());
18342382 } else
2383
+// if (source == skybox1Button ||
2384
+// source == skybox2Button ||
2385
+// source == skybox3Button ||
2386
+// source == skybox4Button ||
2387
+// source == skybox5Button ||
2388
+// source == skybox6Button ||
2389
+// source == skybox7Button ||
2390
+// source == skybox11Button ||
2391
+// source == skybox12Button ||
2392
+// source == skybox13Button ||
2393
+// source == skybox14Button ||
2394
+// source == skybox15Button ||
2395
+// source == skybox16Button ||
2396
+// source == skybox17Button)
2397
+// {
2398
+// ChangeSkybox(source);
2399
+// } else
18352400 if (source == csgItem)
18362401 {
18372402 group(new CSG());
....@@ -1878,30 +2443,30 @@
18782443
18792444 group(g);
18802445 } else
1881
- if (source == loopItem)
2446
+ if (source == loopItem || source == loopButton)
18822447 {
18832448 Composite csg = new GroupLeaf();
18842449 csg.count = 5;
18852450 group(csg);
1886
- Composite child = new cGroup();
2451
+ Composite child = new cGroup("Branch");
18872452 csg.addChild(child);
18882453 child.addChild(csg);
18892454 } else
18902455 if (source == doubleItem)
18912456 {
1892
- Composite csg = new GroupLeaf();
2457
+ Composite csg = new GroupLeaf("Fork");
18932458 csg.count = 5;
18942459 group(csg);
1895
- Composite child = new cGroup();
2460
+ Composite child = new cGroup("Branch A");
18962461 csg.addChild(child);
18972462 child.addChild(csg);
1898
- child = new cGroup();
2463
+ child = new cGroup("Branch B");
18992464 csg.addChild(child);
19002465 child.addChild(csg);
19012466 } else
19022467 if (source == tripleItem)
19032468 {
1904
- Composite csg = new GroupLeaf();
2469
+ Composite csg = new GroupLeaf("Trident");
19052470 csg.count = 4;
19062471 group(csg);
19072472 Composite child = new cGroup();
....@@ -1917,7 +2482,7 @@
19172482 if (source == computeAOItem)
19182483 {
19192484 Globals.drawMode = CameraPane.OCCLUSION;
1920
- Globals.theRenderer.repaint();
2485
+ cameraView.repaint();
19212486 } else
19222487 if (source == recompileItem)
19232488 {
....@@ -1951,6 +2516,46 @@
19512516 {
19522517 DumpObject();
19532518 } else
2519
+ if (source == minButton)
2520
+ {
2521
+ Minimize();
2522
+ } else
2523
+ if (source == maxButton)
2524
+ {
2525
+ Maximize();
2526
+ } else
2527
+ if (source == fullButton)
2528
+ {
2529
+ ToggleFullScreen();
2530
+ } else
2531
+ if (source == undoButton)
2532
+ {
2533
+ // Go to previous version
2534
+ //if (!Undo())
2535
+ //java.awt.Toolkit.getDefaultToolkit().beep();
2536
+ Undo();
2537
+ } else
2538
+ if (source == restoreButton)
2539
+ {
2540
+ // Restore current version
2541
+ Restore();
2542
+ } else
2543
+ if (source == replaceButton)
2544
+ {
2545
+ // Overwrite current version
2546
+ Replace();
2547
+ } else
2548
+ if (source == redoButton)
2549
+ {
2550
+ // Go to next version
2551
+ Redo();
2552
+ } else
2553
+ if (source == saveButton)
2554
+ {
2555
+ // Save a new version
2556
+ if (!Save(true))
2557
+ java.awt.Toolkit.getDefaultToolkit().beep();
2558
+ } else
19542559 if (source == oneStepButton)
19552560 {
19562561 Globals.ONESTEP = true;
....@@ -1958,17 +2563,14 @@
19582563 } else
19592564 if (source == screenfitButton)
19602565 {
1961
- //Reload(lastConverter, lastFilename, true);
19622566 ScreenFit();
19632567 } else
19642568 if (source == screenfitpointButton)
19652569 {
1966
- //Reload(lastConverter, lastFilename, true);
19672570 ScreenFitPoint();
19682571 } else
19692572 if (source == snapobjectButton)
19702573 {
1971
- //Reload(lastConverter, lastFilename, true);
19722574 SnapObject();
19732575 } else
19742576 // if (event.getSource() == recompileButton)
....@@ -2004,6 +2606,14 @@
20042606 if (source == cutItem || source == clearButton)
20052607 {
20062608 loadClipboard(true);
2609
+ } else
2610
+ if (source == undoItem)
2611
+ {
2612
+ Undo();
2613
+ } else
2614
+ if (source == redoItem)
2615
+ {
2616
+ Redo();
20072617 } else
20082618 if (source == duplicateItem)
20092619 {
....@@ -2324,7 +2934,7 @@
23242934 {
23252935 StepAll();
23262936 } else
2327
- if (source == clearItem) // || event.getSource() == clearButton)
2937
+ if (source == deleteItem) // || event.getSource() == clearButton)
23282938 {
23292939 //int indices[] = jList.getSelectedIndices();
23302940 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2336,9 +2946,9 @@
23362946 {
23372947 ClearSelection(true);
23382948 } else
2339
- if (source == grabItem)
2949
+ if (source == grabItem || source == groupButton)
23402950 {
2341
- group(new cGroup(), true);
2951
+ group(new cGroup(), false); // true);
23422952 } else
23432953 if (source == hideItem)
23442954 {
....@@ -2356,11 +2966,11 @@
23562966 {
23572967 makeSomething(new Camera());
23582968 } else
2359
- if (source == compositeItem)
2969
+ if (source == compositeItem || source == compositeButton)
23602970 {
23612971 group(new Composite());
23622972 } else
2363
- if (source == randomItem)
2973
+ if (source == switchItem || source == switchButton)
23642974 {
23652975 RandomNode random = new RandomNode();
23662976 group(random);
....@@ -2462,7 +3072,7 @@
24623072 {
24633073 group(new cLinker());
24643074 } else
2465
- if (source == textureItem)
3075
+ if (source == textureItem || source == textureButton)
24663076 {
24673077 group(new TextureNode());
24683078 } else
....@@ -2482,17 +3092,30 @@
24823092 {
24833093 CastShadow(2);
24843094 } else
2485
- if (source == ungroupItem)
3095
+ if (source == ungroupItem || source == ungroupButton)
24863096 {
2487
- //ungroup();
3097
+ boolean hasRoot = false;
3098
+
24883099 for (int i=0; i<group.selection.size(); i++)
24893100 {
2490
- Ungroup(group.selection.get(i));
3101
+ if (group.selection.get(i) == group)
3102
+ {
3103
+ hasRoot = true;
3104
+ break;
3105
+ }
24913106 }
24923107
2493
- ClearSelection(false);
2494
-
2495
- refreshContents();
3108
+ if (!hasRoot)
3109
+ {
3110
+ for (int i=0; i<group.selection.size(); i++)
3111
+ {
3112
+ Ungroup(group.selection.get(i));
3113
+ }
3114
+
3115
+ ClearSelection(false);
3116
+
3117
+ refreshContents();
3118
+ }
24963119 } else
24973120 if (source == genUVItem)
24983121 {
....@@ -2504,7 +3127,7 @@
25043127 } else
25053128 if (source == genNormalsMESHItem)
25063129 {
2507
- GenNormals(true); // TODO
3130
+ GenNormalsMESH();
25083131 } else
25093132 if (source == genNormalsORGANItem)
25103133 {
....@@ -2569,6 +3192,22 @@
25693192 if (source == unmarkleavesItem)
25703193 {
25713194 MarkLeaves(false);
3195
+ } else
3196
+ if (source == rewindleavesItem)
3197
+ {
3198
+ RewindLeaves(true);
3199
+ } else
3200
+ if (source == unrewindleavesItem)
3201
+ {
3202
+ RewindLeaves(false);
3203
+ } else
3204
+ if (source == randomleavesItem)
3205
+ {
3206
+ RandomLeaves(true);
3207
+ } else
3208
+ if (source == unrandomleavesItem)
3209
+ {
3210
+ RandomLeaves(false);
25723211 } else
25733212 if (source == flipVItem)
25743213 {
....@@ -2777,7 +3416,7 @@
27773416 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
27783417 {
27793418 obj = (Object3D)e.nextElement();
2780
- obj.SetBumpTexture(null);
3419
+ obj.ResetBumpTexture();
27813420 }
27823421
27833422 refreshContents();
....@@ -2793,6 +3432,31 @@
27933432
27943433 refreshContents();
27953434 } else
3435
+ if (source == embedTexturesItem)
3436
+ {
3437
+ Object3D obj;
3438
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3439
+ {
3440
+ obj = (Object3D)e.nextElement();
3441
+ obj.EmbedTextures(true);
3442
+ }
3443
+
3444
+ refreshContents();
3445
+ } else
3446
+ if (source == deEmbedTexturesItem)
3447
+ {
3448
+ Object3D obj;
3449
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3450
+ {
3451
+ obj = (Object3D)e.nextElement();
3452
+ obj.EmbedTextures(false);
3453
+ }
3454
+
3455
+ CameraPane.texturepigment.clear();
3456
+ CameraPane.texturebump.clear();
3457
+
3458
+ refreshContents();
3459
+ } else
27963460 if (source == flashSelectionButton)
27973461 {
27983462 CameraPane.flash = true;
....@@ -2804,6 +3468,10 @@
28043468 if (source == twoButton)
28053469 {
28063470 radio.layout = twoButton;
3471
+
3472
+ if (CameraPane.FULLSCREEN)
3473
+ fullscreenLayout = radio.layout;
3474
+
28073475 // bug
28083476 //gridPanel.setDividerLocation(1.0);
28093477 //bigPanel.setDividerLocation(0.0);
....@@ -2836,10 +3504,31 @@
28363504 bigThree.ClearUI();
28373505 bigThree.add(centralPanel);
28383506 bigThree.FlushUI();
3507
+
3508
+ cameraView.requestFocusInWindow();
3509
+
3510
+// refreshContents(true);
3511
+//
3512
+// try
3513
+// {
3514
+// java.awt.Robot bot = new java.awt.Robot();
3515
+// int mask = InputEvent.BUTTON1_MASK;
3516
+// bot.mouseMove(100, 100);
3517
+// bot.mousePress(mask);
3518
+// bot.mouseRelease(mask);
3519
+// }
3520
+// catch (Exception e)
3521
+// {
3522
+//
3523
+// }
3524
+
28393525 } else
28403526 if (source == threeButton)
28413527 {
28423528 radio.layout = threeButton;
3529
+
3530
+ if (CameraPane.FULLSCREEN)
3531
+ fullscreenLayout = radio.layout;
28433532
28443533 // bigThree.remove(scenePanel);
28453534 // bigThree.remove(centralPanel);
....@@ -2869,13 +3558,18 @@
28693558 // centralPanel.setVisible(true);
28703559 // XYZPanel.setVisible(true);
28713560 bigThree.ClearUI();
3561
+ bigThree.add(scenePanel);
28723562 bigThree.add(centralPanel);
2873
- bigThree.add(XYZPanel);
28743563 bigThree.FlushUI();
3564
+
3565
+ cameraView.requestFocusInWindow();
28753566 } else
28763567 if (source == fourButton)
28773568 {
28783569 radio.layout = fourButton;
3570
+
3571
+ if (CameraPane.FULLSCREEN)
3572
+ fullscreenLayout = radio.layout;
28793573
28803574 // bigThree.remove(scenePanel);
28813575 // bigThree.remove(centralPanel);
....@@ -2907,10 +3601,15 @@
29073601 bigThree.ClearUI();
29083602 bigThree.add(scenePanel);
29093603 bigThree.FlushUI();
3604
+
3605
+ cameraView.requestFocusInWindow();
29103606 } else
29113607 if (source == sixButton)
29123608 {
29133609 radio.layout = sixButton;
3610
+
3611
+ if (CameraPane.FULLSCREEN)
3612
+ fullscreenLayout = radio.layout;
29143613
29153614 // bigThree.remove(scenePanel);
29163615 // bigThree.remove(centralPanel);
....@@ -2940,13 +3639,18 @@
29403639 // centralPanel.setVisible(true);
29413640 // XYZPanel.setVisible(false);
29423641 bigThree.ClearUI();
2943
- bigThree.add(scenePanel);
29443642 bigThree.add(centralPanel);
3643
+ bigThree.add(scenePanel);
29453644 bigThree.FlushUI();
3645
+
3646
+ cameraView.requestFocusInWindow();
29463647 } else
29473648 if (source == sevenButton)
29483649 {
29493650 radio.layout = sevenButton;
3651
+
3652
+ if (CameraPane.FULLSCREEN)
3653
+ fullscreenLayout = radio.layout;
29503654
29513655 // bigThree.remove(scenePanel);
29523656 // bigThree.remove(centralPanel);
....@@ -2980,6 +3684,8 @@
29803684 bigThree.add(centralPanel);
29813685 bigThree.add(XYZPanel);
29823686 bigThree.FlushUI();
3687
+
3688
+ cameraView.requestFocusInWindow();
29833689 } else
29843690 if (source == rootButton)
29853691 {
....@@ -2991,6 +3697,7 @@
29913697 EditObject(obj);
29923698 }
29933699
3700
+ cameraView.requestFocusInWindow();
29943701 refreshContents(true);
29953702 } else
29963703 if (source == closeButton)
....@@ -3000,22 +3707,37 @@
30003707 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
30013708 {
30023709 ab = (cRadio)e.nextElement();
3003
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3710
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
30043711 {
3712
+ // Patch to avoid bug with transparency.
3713
+ if (!ab.hadMaterial)
3714
+ {
3715
+ ab.object.material = null;
3716
+ }
3717
+
30053718 buttonGroup.remove(ab);
30063719 radioPanel.remove(ab);
30073720
3008
- ab.GetObject().editWindow = null;
3721
+ //ab.GetObject().editWindow = null;
3722
+ ab.GetObject().manipWindow = null;
30093723 // ab.GetObject().objectUI = null; // ?????????
30103724
30113725 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
30123726 break;
30133727 }
30143728 }
3729
+
3730
+ cameraView.requestFocusInWindow();
30153731 refreshContents(true);
30163732 } else
30173733 if (source == editItem || source == editButton)
30183734 {
3735
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3736
+ {
3737
+ Object3D child = (Object3D)e.nextElement();
3738
+ child.pinned = true;
3739
+ }
3740
+
30193741 EditSelection(false);
30203742 } else
30213743 if (source == uneditButton)
....@@ -3025,10 +3747,11 @@
30253747 Object3D child = (Object3D)e.nextElement();
30263748 if(child.editWindow != null)
30273749 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3750
+ child.pinned = false;
30283751 child.CloseUI();
30293752 listUI.remove(child);
30303753
3031
- child.editWindow = null; // ???????????
3754
+ //child.editWindow = null; // ???????????
30323755 }
30333756 objEditor.ctrlPanel.FlushUI();
30343757 //objEditor.jTree.clearSelection();
....@@ -3041,6 +3764,7 @@
30413764 //copy.ClearUI();
30423765 for (Object3D obj : listUI)
30433766 {
3767
+ obj.pinned = false;
30443768 obj.CloseUI();
30453769 }
30463770 listUI.clear();
....@@ -3050,7 +3774,7 @@
30503774 {
30513775 assert(copy == group);
30523776
3053
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3777
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
30543778
30553779 for (Object3D obj : listUI)
30563780 {
....@@ -3099,6 +3823,9 @@
30993823 }
31003824
31013825 copy = group;
3826
+
3827
+ SetUndoStates();
3828
+
31023829 //Globals.theRenderer.object = group;
31033830 if(!useclient)
31043831 {
....@@ -3115,7 +3842,9 @@
31153842 sideView.object = group;
31163843 }
31173844
3118
-// fix "+" issue group.editWindow = this;
3845
+// fix "+" issue
3846
+ //group.editWindow = this;
3847
+ group.manipWindow = this;
31193848
31203849 /*
31213850 currentLayout = radio.layout;
....@@ -3123,18 +3852,27 @@
31233852 currentLayout = sevenButton;
31243853 */
31253854 radio.layout.doClick();
3855
+
3856
+ ClearUnpinned();
3857
+ //Grafreed.Assert(group != null);
3858
+ //Grafreed.Assert(group.selection != null);
3859
+ SetPinStates(group.selection == null || group.selection.size() > 0);
3860
+ if (group.selection == null || group.selection.size() == 1)
3861
+ EditSelection(false);
31263862 keepparent = group.parent;
31273863 // PARENT = NULL or not???
31283864 //group.parent = null; // ROOT
31293865 //group.attributes = -1;
31303866 ResetModel();
3867
+
3868
+ cameraView.requestFocusInWindow();
31313869 refreshContents(true);
31323870 } else if (event.getSource() == editCameraItem)
31333871 {
31343872 cameraView.ProtectCamera();
31353873 cameraView.repaint();
31363874 return;
3137
- } else if (event.getSource() == revertCameraItem)
3875
+ } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton)
31383876 {
31393877 cameraView.RevertCamera();
31403878 cameraView.repaint();
....@@ -3151,7 +3889,6 @@
31513889 }
31523890
31533891 boolean useclient = false;
3154
- cRadio radio;
31553892
31563893 void ToggleRoot()
31573894 {
....@@ -3390,7 +4127,8 @@
33904127
33914128 int size = obj.MemorySize();
33924129
3393
- System.err.println((size/1024) + " KB is the size of " + obj);
4130
+ //System.err.println((size/1024) + " KB is the size of " + obj);
4131
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
33944132 }
33954133 }
33964134 catch (Exception e)
....@@ -3471,6 +4209,13 @@
34714209 void GenNormals(boolean crease)
34724210 {
34734211 group.GenNormalsS(crease);
4212
+
4213
+ refreshContents();
4214
+ }
4215
+
4216
+ void GenNormalsMESH()
4217
+ {
4218
+ group.GenNormalsMeshS();
34744219
34754220 refreshContents();
34764221 }
....@@ -3706,7 +4451,7 @@
37064451
37074452 try
37084453 {
3709
- texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
4454
+ texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres);
37104455 }
37114456 catch (Exception e)
37124457 {
....@@ -4098,6 +4843,18 @@
40984843 refreshContents();
40994844 }
41004845
4846
+ void RewindLeaves(boolean hide)
4847
+ {
4848
+ group.selection.RewindLeaves(hide);
4849
+ refreshContents();
4850
+ }
4851
+
4852
+ void RandomLeaves(boolean hide)
4853
+ {
4854
+ group.selection.RandomLeaves(hide);
4855
+ refreshContents();
4856
+ }
4857
+
41014858 void SetTexRes(int tr)
41024859 {
41034860 group.selection.SetTexRes(tr);
....@@ -4169,28 +4926,25 @@
41694926 // }
41704927 // }
41714928
4172
- static boolean allparams = true;
4173
-
4174
- static Vector<Object3D> listUI = new Vector<Object3D>();
4175
-
41764929 void EditSelection(boolean newWindow)
41774930 {
4931
+ if (group.selection == null)
4932
+ {
4933
+ EditElement(group, newWindow); // ? new
4934
+ return;
4935
+ }
4936
+
41784937 // aConstraints.gridy = 0;
41794938 for (int i=0; i<group.selection.size(); i++)
41804939 {
41814940 //System.out.println("edit : " + objectPanel.indexOfTab("Material"));
41824941 //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false);
4183
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
4942
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
41844943
41854944 Object3D elem = (Object3D)group.selection.elementAt(i);
41864945 if(elem != group || !newWindow)
41874946 {
4188
- // if (!(elem instanceof Composite))
4189
- // newWindow = false;
4190
- listUI.add(elem);
4191
- elem.openEditWindow(this, newWindow); //, false);
4192
- System.out.println("edit : " + elem);
4193
- elem.editWindow.refreshContents(true); // ? new
4947
+ EditElement(elem, newWindow); // ? new
41944948 }
41954949 }
41964950 }
....@@ -4265,7 +5019,8 @@
42655019 //new Exception().printStackTrace();
42665020
42675021 freezemodel = true;
4268
-
5022
+ ClearUnpinned();
5023
+
42695024 /**/
42705025 //switch (event.id)
42715026 {
....@@ -4273,7 +5028,6 @@
42735028 //case 702: // Event.LIST_DESELECT
42745029 group.deselectAll();
42755030 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4276
- objEditor.ClearInfo(); // .GetMaterial());
42775031 if (tps != null)
42785032 {
42795033 for (int i=0; i < tps.length; i++)
....@@ -4282,10 +5036,8 @@
42825036
42835037 //if (child.parent != null)
42845038 //child.parent.addSelectee(child);
5039
+ objEditor.SetMaterial(child);
42855040 group.addSelectee(child);
4286
- objEditor.SetMaterial(child); // .GetMaterial());
4287
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4288
- System.err.println("info : " + child.GetPath());
42895041 }
42905042 }
42915043 // else
....@@ -4295,20 +5047,28 @@
42955047 // System.err.println("info : " + group.GetPath());
42965048 // }
42975049
4298
- objEditor.SetText(); // jan 2014
4299
-
4300
- if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
5050
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
43015051 CameraPane.flash = true;
43025052
4303
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
5053
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
43045054 // a camera
43055055 {
4306
- CameraPane.camerachangeframe = 0; // don't refuse it
4307
- Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
5056
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace
5057
+ {
5058
+ CameraPane.camerachangeframe = 0; // don't refuse it
5059
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
5060
+ }
43085061 // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
43095062 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
43105063 }
43115064
5065
+ if (tps != null && tps.length == 1)
5066
+ {
5067
+ EditSelection(false);
5068
+ }
5069
+
5070
+ SetPinStates(tps != null && tps.length > 0);
5071
+
43125072 refreshContents();
43135073 //return true;
43145074 }
....@@ -4317,6 +5077,35 @@
43175077
43185078 freezemodel = false;
43195079 }
5080
+
5081
+ void SetPinStates(boolean enabled)
5082
+ {
5083
+ editButton.setEnabled(enabled);
5084
+ uneditButton.setEnabled(enabled);
5085
+ unselectButton.setEnabled(enabled);
5086
+ flashSelectionButton.setEnabled(enabled);
5087
+ }
5088
+
5089
+ void refreshContents(boolean cp)
5090
+ {
5091
+ if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
5092
+ if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
5093
+ {
5094
+ objEditor.ClearInfo(); // .GetMaterial());
5095
+
5096
+ for (int i=0; i < group.selection.Size(); i++)
5097
+ {
5098
+ Object3D child = (Object3D) group.selection.get(i);
5099
+
5100
+ objEditor.AddInfo(child, this, true);
5101
+ System.err.println("info : " + child.GetPath());
5102
+ }
5103
+
5104
+ objEditor.SetText(); // jan 2014
5105
+ }
5106
+
5107
+ super.refreshContents(cp);
5108
+ }
43205109
43215110 void linkSomething(Object3D thing)
43225111 {
....@@ -4388,6 +5177,7 @@
43885177 {
43895178 if (group.selection.isEmpty())
43905179 return;
5180
+
43915181 Grafreed.clipboardIsTempGroup = false;
43925182 Composite tGroup = null;
43935183 if (group.selection.size() > 0) // 1)
....@@ -4398,6 +5188,8 @@
43985188
43995189 if (cut)
44005190 {
5191
+// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save.
5192
+// Save();
44015193 //int indices[] = jList.getSelectedIndices();
44025194 //for (int i = indices.length - 1; i >= 0; i--)
44035195 //jList.remove(indices[i]);
....@@ -4487,8 +5279,10 @@
44875279 }
44885280
44895281 }
5282
+
44905283 if (Grafreed.clipboardIsTempGroup)
44915284 Grafreed.clipboard = tGroup;
5285
+
44925286 if (cut)
44935287 {
44945288 ResetModel();
....@@ -4498,6 +5292,10 @@
44985292
44995293 void paste(boolean expand)
45005294 {
5295
+ if (Globals.REPLACEONMAKE)
5296
+ Save();
5297
+ boolean keep = Globals.REPLACEONMAKE;
5298
+ Globals.REPLACEONMAKE = false;
45015299 // if (GrafreeD.clipboard == null)
45025300 // return;
45035301 boolean first = true;
....@@ -4557,6 +5355,7 @@
45575355 Grafreed.clipboard.get(0).parent = keepparent;
45585356 }
45595357
5358
+ Globals.REPLACEONMAKE = keep;
45605359 ResetModel();
45615360 refreshContents();
45625361 }
....@@ -4692,6 +5491,10 @@
46925491
46935492 void group(Object3D csg, boolean grab)
46945493 {
5494
+ if (Globals.REPLACEONMAKE)
5495
+ Save();
5496
+ boolean keep = Globals.REPLACEONMAKE;
5497
+ Globals.REPLACEONMAKE = false;
46955498 if (//false) // why??
46965499 !group.selection.isEmpty())
46975500 {
....@@ -4805,10 +5608,15 @@
48055608 //node.add(csg);
48065609 //makeSomething(node);
48075610 makeSomething(csg);
5611
+ Globals.REPLACEONMAKE = keep;
48085612 }
48095613
48105614 void Ungroup(Object3D g)
48115615 {
5616
+ if (Globals.REPLACEONMAKE)
5617
+ Save();
5618
+ boolean keep = Globals.REPLACEONMAKE;
5619
+ Globals.REPLACEONMAKE = false;
48125620 if (g instanceof HiddenObject)
48135621 {
48145622 HiddenObject h = (HiddenObject) g;
....@@ -4825,6 +5633,7 @@
48255633 objEditor.makeSomething(g.get(i), false);
48265634 }
48275635 }
5636
+ Globals.REPLACEONMAKE = keep;
48285637 }
48295638
48305639 void ungroup()
....@@ -5113,7 +5922,44 @@
51135922 cButton clearpanelButton;
51145923 cButton unselectButton;
51155924
5925
+ cButton restoreCameraButton;
5926
+
5927
+ cButton saveButton;
51165928 cButton oneStepButton;
5929
+
5930
+ cButton groupButton;
5931
+ cButton ungroupButton;
5932
+ cButton compositeButton;
5933
+ cButton switchButton;
5934
+ cButton loopButton;
5935
+ cButton textureButton;
5936
+
5937
+ cButton skybox1Button;
5938
+ cButton skybox2Button;
5939
+ cButton skybox3Button;
5940
+ cButton skybox4Button;
5941
+ cButton skybox5Button;
5942
+ cButton skybox6Button;
5943
+ cButton skybox7Button;
5944
+
5945
+ cButton skybox11Button;
5946
+ cButton skybox12Button;
5947
+ cButton skybox13Button;
5948
+ cButton skybox14Button;
5949
+ cButton skybox15Button;
5950
+ cButton skybox16Button;
5951
+ cButton skybox17Button;
5952
+
5953
+ cButton gridButton;
5954
+ cButton boxButton;
5955
+ cButton sphereButton;
5956
+ cButton coneButton;
5957
+ cButton torusButton;
5958
+ cButton superButton;
5959
+ cButton kleinButton;
5960
+ cButton particlesButton;
5961
+ cButton overlayButton;
5962
+ cButton lightButton;
51175963
51185964 cButton screenfitButton;
51195965 cButton screenfitpointButton;
....@@ -5126,14 +5972,6 @@
51265972
51275973 cButton setsupportButton;
51285974
5129
- cButton twoButton;
5130
- cButton sixButton;
5131
- cButton threeButton;
5132
- cButton sevenButton;
5133
- cButton fourButton; // full panel
5134
- cButton oneButton; // full XYZ
5135
- //cButton currentLayout;
5136
-
51375975 //
51385976 //Composite
51395977 Object3D // to do !!
....@@ -5143,9 +5981,11 @@
51435981 //JTree jTree;
51445982 private MenuItem lookAtItem;
51455983 private MenuItem lookFromItem;
5146
- private MenuItem switchItem;
5984
+ private MenuItem switchViewItem;
51475985 private MenuItem cutItem;
5148
- private MenuItem duplicateItem;
5986
+ private MenuItem undoItem;
5987
+ private MenuItem redoItem;
5988
+ private JMenuItem duplicateItem;
51495989 private MenuItem cloneItem;
51505990 private MenuItem cloneSupportItem;
51515991 private MenuItem overwriteGeoItem;
....@@ -5173,7 +6013,7 @@
51736013 private MenuItem pasteLinkItem;
51746014 private MenuItem pasteCloneItem;
51756015 private MenuItem pasteExpandItem;
5176
- private MenuItem clearItem;
6016
+ private MenuItem deleteItem;
51776017 private MenuItem clearAllItem;
51786018 private MenuItem genUVItem;
51796019 private MenuItem genNormalsMESHItem;
....@@ -5208,6 +6048,10 @@
52086048 private MenuItem showleavesItem;
52096049 private MenuItem markleavesItem;
52106050 private MenuItem unmarkleavesItem;
6051
+ private MenuItem rewindleavesItem;
6052
+ private MenuItem unrewindleavesItem;
6053
+ private MenuItem randomleavesItem;
6054
+ private MenuItem unrandomleavesItem;
52116055
52126056 private MenuItem flipVItem;
52136057 private MenuItem unflipVItem;
....@@ -5229,7 +6073,7 @@
52296073 private MenuItem frontItem;
52306074 private MenuItem cameraItem;
52316075 private MenuItem compositeItem;
5232
- private MenuItem randomItem;
6076
+ private MenuItem switchItem;
52336077 private MenuItem physicsItem;
52346078 private MenuItem frameselectorItem;
52356079 private MenuItem scriptNodeItem;
....@@ -5253,6 +6097,8 @@
52536097 private MenuItem attachBumpItem;
52546098 private MenuItem detachBumpItem;
52556099 private MenuItem pigmentBumpItem;
6100
+ private MenuItem embedTexturesItem;
6101
+ private MenuItem deEmbedTexturesItem;
52566102
52576103 private MenuItem particleItem;
52586104 private MenuItem ragdollItem;
....@@ -5303,5 +6149,5 @@
53036149
53046150 Menu cameraMenu;
53056151 MenuItem editCameraItem;
5306
- MenuItem revertCameraItem;
6152
+ MenuItem restoreCameraItem;
53076153 }