Normand Briere
2019-07-28 a434119e65146fe53d612c28e1ee7af532d1b70a
GroupEditor.java
....@@ -23,6 +23,31 @@
2323 DragGestureListener, DragSourceListener, DropTargetListener,
2424 ItemListener // ListSelectionListener
2525 {
26
+
27
+ public void AddSkyboxButton(String f, String s, cGridBag row3)
28
+ {
29
+ cButton skyboxButton;
30
+ final String path = "cubemaps/" + f + "-skyboxes/" + s;
31
+ row3.add(skyboxButton = GetButton(path + "/" + s + ".jpg", !Grafreed.NIMBUSLAF));
32
+ skyboxButton.setToolTipText(s);
33
+ skyboxButton.addActionListener(new ActionListener()
34
+ {
35
+ @Override
36
+ public void actionPerformed(ActionEvent e)
37
+ {
38
+ ChangeSkybox(path);
39
+ }
40
+ });
41
+ }
42
+
43
+ public void ChangeSkybox(String name)
44
+ {
45
+ cameraView.envyoff = false;
46
+ cameraView.skyboxname = name;
47
+ cameraView.skyboxext = "jpg";
48
+ cameraView.repaint();
49
+ }
50
+
2651 //ObjEditor objEditor;
2752 public void closeUI2()
2853 {
....@@ -60,6 +85,12 @@
6085 this.copy = this.group = group;
6186 //selectees = this.group.selectees;
6287
88
+ if (copy.versions == null)
89
+ {
90
+ copy.versions = new byte[100][];
91
+ copy.versionindex = -1;
92
+ }
93
+
6394 if(ui)
6495 SetupUI(objEditor);
6596 }
....@@ -74,16 +105,28 @@
74105 this.copy = this.group = copy;
75106 //selectees = this.group.selectees;
76107
77
- SetupMenu2(objEditor);
108
+ SetupMenu2(this); //objEditor);
78109 SetupUI2(objEditor);
79110 objEditor.SetupUI(true);
80111 SetupViews(objEditor);
81112
82113 ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true);
114
+
115
+ if (copy.versions == null)
116
+ {
117
+ copy.versions = new byte[100][];
118
+ copy.versionindex = -1;
119
+
120
+ Save(true);
121
+ }
83122 }
84123
85124 void CloneSelection(boolean supports)
86125 {
126
+ if (Globals.REPLACEONMAKE)
127
+ Save();
128
+ boolean keep = Globals.REPLACEONMAKE;
129
+ Globals.REPLACEONMAKE = false;
87130 // Object3D keep = GrafreeD.clipboard;
88131 //Object3D obj;
89132 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -94,6 +137,7 @@
94137
95138 makeSomething(clone, i==group.selection.size()-1);
96139 }
140
+ Globals.REPLACEONMAKE = keep;
97141 }
98142
99143 void CloneClipboard(boolean supports)
....@@ -148,28 +192,21 @@
148192
149193 //JTextField nameField;
150194
151
- void SetupMenu2(ObjEditor oe)
195
+ void SetupMenu2(GroupEditor oe)
152196 {
153
- if (Globals.ADVANCED)
154
- {
155
- oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
156
- //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
157
- //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
158
- editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
159
- oe.cameraMenu.add("-");
160
- openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
161
- openWindowItem.addActionListener(this);
162
- editLeafItem.addActionListener(this);
163
- lookAtItem.addActionListener(this);
164
- //lookFromItem.addActinoListener(this);
165
- //switchItem.addActionListener(this);
166
- }
167
-
197
+ oe.jTree = new cTree();
198
+
168199 Menu menu;
169200 oe.menuBar.add(menu = new Menu("Edit"));
170201 //editItem = menu.add(new MenuItem("Edit"));
171202 //editItem.addActionListener(this);
172
- duplicateItem = menu.add(new MenuItem("Duplicate"));
203
+
204
+// undoItem = menu.add(new MenuItem("Undo"));
205
+// undoItem.addActionListener(this);
206
+// redoItem = menu.add(new MenuItem("Redo"));
207
+// redoItem.addActionListener(this);
208
+// menu.add("-");
209
+ duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate"));
173210 duplicateItem.addActionListener(this);
174211 cloneItem = menu.add(new MenuItem("Clone"));
175212 cloneItem.addActionListener(this);
....@@ -185,7 +222,6 @@
185222 copyItem.addActionListener(this);
186223 pasteItem = menu.add(new MenuItem("Paste"));
187224 pasteItem.addActionListener(this);
188
- menu.add("-");
189225
190226 menu.add("-");
191227 pasteIntoItem = menu.add(new MenuItem("Paste into"));
....@@ -197,8 +233,8 @@
197233 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
198234 // pasteExpandItem.addActionListener(this);
199235 menu.add("-");
200
- clearItem = menu.add(new MenuItem("Clear"));
201
- clearItem.addActionListener(this);
236
+ deleteItem = menu.add(new MenuItem("Delete"));
237
+ deleteItem.addActionListener(this);
202238
203239 if (Globals.ADVANCED)
204240 {
....@@ -206,7 +242,94 @@
206242 clearAllItem = menu.add(new MenuItem("Clear All"));
207243 clearAllItem.addActionListener(this);
208244 }
245
+
246
+ menuBar.add(cameraMenu = new Menu("View"));
247
+ //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
248
+ //zBufferItem.addActionListener(this);
249
+ //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
250
+ //normalLensItem.addActionListener(this);
251
+ cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint"));
252
+ restoreCameraItem.addActionListener(this);
253
+
254
+// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
255
+// toggleFullScreenItem.addItemListener(this);
256
+// toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
257
+// cameraMenu.add("-");
258
+//
259
+// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
260
+// toggleTextureItem.addItemListener(this);
261
+// toggleTextureItem.setState(CameraPane.textureon);
262
+//
263
+// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
264
+// toggleSwitchItem.addItemListener(this);
265
+// toggleSwitchItem.setState(CameraPane.SWITCH);
266
+
267
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles"));
268
+ toggleHandleItem.addItemListener(this);
269
+ toggleHandleItem.setState(CameraPane.HANDLES);
270
+
271
+ cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
272
+ togglePaintItem.addItemListener(this);
273
+ togglePaintItem.setState(CameraPane.PAINTMODE);
274
+
275
+ if (Globals.ADVANCED)
276
+ {
277
+ cameraMenu.add("-");
278
+ cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
279
+ toggleLiveItem.addItemListener(this);
280
+ toggleLiveItem.setState(Globals.isLIVE());
209281
282
+ cameraMenu.add(stepItem = new MenuItem("Step"));
283
+ stepItem.addActionListener(this);
284
+ // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
285
+ // toggleDLItem.addItemListener(this);
286
+ // toggleDLItem.setState(false);
287
+
288
+ cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
289
+ toggleRenderItem.addItemListener(this);
290
+ toggleRenderItem.setState(!CameraPane.frozen);
291
+
292
+ cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
293
+ toggleDebugItem.addItemListener(this);
294
+ toggleDebugItem.setState(Globals.DEBUG);
295
+
296
+ cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
297
+ toggleFrustumItem.addItemListener(this);
298
+ toggleFrustumItem.setState(CameraPane.FRUSTUM);
299
+
300
+ cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
301
+ toggleFootContactItem.addItemListener(this);
302
+ toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
303
+
304
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
305
+ toggleTimelineItem.addItemListener(this);
306
+ }
307
+
308
+// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
309
+// toggleRootItem.addItemListener(this);
310
+// toggleRootItem.setState(false);
311
+// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
312
+// animationItem.addItemListener(this);
313
+// animationItem.setState(CameraPane.ANIMATION);
314
+ cameraMenu.add("-");
315
+ cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint"));
316
+ editCameraItem.addActionListener(this);
317
+
318
+ if (Globals.ADVANCED)
319
+ {
320
+ oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
321
+ //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
322
+ //cameraMenu.add(switchViewItem = new MenuItem("Reverse View"));
323
+ editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
324
+ oe.cameraMenu.add("-");
325
+ openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
326
+ openWindowItem.addActionListener(this);
327
+ editLeafItem.addActionListener(this);
328
+ lookAtItem.addActionListener(this);
329
+ //lookFromItem.addActinoListener(this);
330
+ //switchViewItem.addActionListener(this);
331
+ }
332
+
210333 oe.menuBar.add(menu = new Menu("Setting"));
211334 if (Globals.ADVANCED)
212335 {
....@@ -249,21 +372,29 @@
249372 }
250373
251374 oe.menuBar.add(menu = new Menu("Group"));
252
- grabItem = menu.add(new MenuItem("Grab"));
253
- grabItem.addActionListener(this);
375
+// grabItem = menu.add(new MenuItem("Grab"));
376
+// grabItem.addActionListener(this);
254377 backItem = menu.add(new MenuItem("Back"));
255378 backItem.addActionListener(this);
256379 frontItem = menu.add(new MenuItem("Front"));
257380 frontItem.addActionListener(this);
258
- compositeItem = menu.add(new MenuItem("Composite"));
259
- compositeItem.addActionListener(this);
381
+// compositeItem = menu.add(new MenuItem("Composite"));
382
+// compositeItem.addActionListener(this);
383
+
384
+ if (Globals.ADVANCED)
385
+ {
260386 hideItem = menu.add(new MenuItem("Hidden Group"));
261387 hideItem.addActionListener(this);
388
+ }
262389 ungroupItem = menu.add(new MenuItem("Ungroup"));
263390 ungroupItem.addActionListener(this);
264
- menu.add("-");
265
- randomItem = menu.add(new MenuItem("Switch node"));
266
- randomItem.addActionListener(this);
391
+
392
+// menu.add("-");
393
+//
394
+// switchItem = menu.add(new MenuItem("Switch node"));
395
+// switchItem.addActionListener(this);
396
+ if (Globals.ADVANCED)
397
+ {
267398 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
268399 switchGeoItem.addActionListener(this);
269400 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
....@@ -271,8 +402,6 @@
271402 morphItem = menu.add(new MenuItem("Morph Group"));
272403 morphItem.addActionListener(this);
273404
274
- if (Globals.ADVANCED)
275
- {
276405 menu.add("-");
277406 physicsItem = menu.add(new MenuItem("Physics"));
278407 physicsItem.addActionListener(this);
....@@ -280,30 +409,29 @@
280409 frameselectorItem.addActionListener(this);
281410 scriptNodeItem = menu.add(new MenuItem("Script Node"));
282411 scriptNodeItem.addActionListener(this);
283
- cameraItem = menu.add(new MenuItem("Camera"));
284
- cameraItem.addActionListener(this);
285412 }
286413
287414 oe.menuBar.add(menu = new Menu("Object"));
288
- textureItem = menu.add(new MenuItem("Texture"));
289
- textureItem.addActionListener(this);
415
+// textureItem = menu.add(new MenuItem("Texture"));
416
+// textureItem.addActionListener(this);
290417 billboardItem = menu.add(new MenuItem("Billboard"));
291418 billboardItem.addActionListener(this);
292419 csgItem = menu.add(new MenuItem("CSG"));
293420 csgItem.addActionListener(this);
294
- shadowXItem = menu.add(new MenuItem("Shadow X"));
421
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
295422 shadowXItem.addActionListener(this);
296
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
423
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
297424 shadowYItem.addActionListener(this);
298
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
425
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
299426 shadowZItem.addActionListener(this);
427
+ attributeItem = menu.add(new MenuItem("Attribute"));
428
+ attributeItem.addActionListener(this);
429
+
300430 if (Globals.ADVANCED)
301431 {
302432 menu.add("-");
303433 linkerItem = menu.add(new MenuItem("Linker"));
304434 linkerItem.addActionListener(this);
305
- attributeItem = menu.add(new MenuItem("Attribute"));
306
- attributeItem.addActionListener(this);
307435 templateItem = menu.add(new MenuItem("Template"));
308436 templateItem.addActionListener(this);
309437 pointflowItem = menu.add(new MenuItem("Point Flow"));
....@@ -332,7 +460,7 @@
332460 genNormalsMESHItem.addActionListener(this);
333461 if (Globals.ADVANCED)
334462 {
335
- genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
463
+ genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals"));
336464 genNormalsMINEItem.addActionListener(this);
337465 }
338466 stripifyItem = menu.add(new MenuItem("Stripify"));
....@@ -392,6 +520,14 @@
392520 markleavesItem.addActionListener(this);
393521 unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
394522 unmarkleavesItem.addActionListener(this);
523
+ rewindleavesItem = menu.add(new MenuItem("Rewind Leaves"));
524
+ rewindleavesItem.addActionListener(this);
525
+ unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves"));
526
+ unrewindleavesItem.addActionListener(this);
527
+ randomleavesItem = menu.add(new MenuItem("Random Leaves"));
528
+ randomleavesItem.addActionListener(this);
529
+ unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves"));
530
+ unrandomleavesItem.addActionListener(this);
395531 menu.add("-");
396532 flipVItem = menu.add(new MenuItem("Flip V"));
397533 flipVItem.addActionListener(this);
....@@ -417,10 +553,15 @@
417553 attachBumpItem.addActionListener(this);
418554 pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump"));
419555 pigmentBumpItem.addActionListener(this);
556
+ //embedTexturesItem
420557 detachPigmentItem = menu.add(new MenuItem("Detach Pigment"));
421558 detachPigmentItem.addActionListener(this);
422559 detachBumpItem = menu.add(new MenuItem("Detach Bump"));
423560 detachBumpItem.addActionListener(this);
561
+ embedTexturesItem = menu.add(new MenuItem("Embed Textures"));
562
+ embedTexturesItem.addActionListener(this);
563
+ deEmbedTexturesItem = menu.add(new MenuItem("De-embed Textures"));
564
+ deEmbedTexturesItem.addActionListener(this);
424565 menu.add("-");
425566 sortbysizeItem = menu.add(new MenuItem("Sort by size"));
426567 sortbysizeItem.addActionListener(this);
....@@ -443,25 +584,25 @@
443584 oe.menuBar.add(menu = new Menu("Insert"));
444585 buildCreateMenu(menu);
445586
446
- oe.menuBar.add(menu = new Menu("Include"));
447
- importOBJItem = menu.add(new MenuItem("OBJ file..."));
448
- importOBJItem.addActionListener(this);
449
- menu.add("-");
450
- import3DSItem = menu.add(new MenuItem("3DS file..."));
451
- import3DSItem.addActionListener(this);
452
- menu.add("-");
453
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file..."));
454
- importVRMLX3DItem.addActionListener(this);
455
- menu.add("-");
456
- importGFDItem = menu.add(new MenuItem("GrafreeD file..."));
457
- importGFDItem.addActionListener(this);
458
-
459587 oe.menuBar.add(menu = new Menu("Tools"));
460588 buildToolsMenu(menu);
461589 }
462590
591
+
463592 void SetupUI2(ObjEditor oe)
464593 {
594
+ // June 2019
595
+ if (oe == null)
596
+ {
597
+ //super.SetupUI2(this);
598
+ //return;
599
+ }
600
+
601
+ if (copy != group)
602
+ {
603
+ //super.SetupUI2(this);
604
+ }
605
+
465606 //new Exception().printStackTrace();
466607
467608 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -490,27 +631,79 @@
490631 oe.radioPanel.add(dummyButton);
491632 oe.buttonGroup.add(dummyButton);
492633 */
634
+ cGridBag copyOptionsPanel = new cGridBag();
635
+
636
+ copyOptionsPanel.preferredHeight = 2;
637
+
493638 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
494639
495
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
640
+ //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
641
+ //minButton.setToolTipText("Minimize window");
642
+ //minButton.addActionListener(this);
643
+
644
+ if (Globals.ADVANCED)
645
+ {
646
+ oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
647
+ maxButton.setToolTipText("Maximize window");
648
+ maxButton.addActionListener(this);
649
+ }
650
+
651
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
652
+ fullButton.setToolTipText("Full-screen window");
653
+ fullButton.addActionListener(this);
654
+
655
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
656
+ screenfitButton.setToolTipText("Screen fit");
657
+ screenfitButton.addActionListener(this);
658
+
659
+ oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
660
+ restoreCameraButton.setToolTipText("Restore viewpoint");
661
+ restoreCameraButton.addActionListener(this);
662
+
663
+ copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
664
+ saveButton.setToolTipText("New version");
665
+ saveButton.addActionListener(this);
666
+
667
+ copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
668
+ undoButton.setToolTipText("Previous version");
669
+ undoButton.addActionListener(this);
670
+ undoButton.setEnabled(false);
671
+
672
+ cGridBag updown = new cGridBag().setVertical(true);
673
+ updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
674
+ restoreButton.setToolTipText("Restore current");
675
+ restoreButton.addActionListener(this);
676
+ restoreButton.setEnabled(false);
677
+
678
+ updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
679
+ replaceButton.setToolTipText("Replace current");
680
+ replaceButton.addActionListener(this);
681
+ replaceButton.setEnabled(false);
682
+
683
+ copyOptionsPanel.add(updown);
684
+
685
+ copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
686
+ redoButton.setToolTipText("Next version");
687
+ redoButton.addActionListener(this);
688
+ redoButton.setEnabled(false);
689
+
690
+ oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
496691 liveCB.setToolTipText("Enable animation");
497692 liveCB.addItemListener(this);
498693
499
- oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
694
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
500695 oneStepButton.setToolTipText("Animate one step forward");
501696 oneStepButton.addActionListener(this);
502697
503
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
698
+ oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
504699 fastCB.setToolTipText("Fast mode");
505700 fastCB.addItemListener(this);
506701
507
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
508
- trackCB.setToolTipText("Enable tracking");
509
- trackCB.addItemListener(this);
510
-
511
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
512
- screenfitButton.setToolTipText("Screen fit");
513
- screenfitButton.addActionListener(this);
702
+ //oe.toolboxPanel.Return();
703
+
704
+// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
705
+// trackCB.setToolTipText("Enable tracking");
706
+// trackCB.addItemListener(this);
514707
515708 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
516709 // screenfitpointButton.addActionListener(this);
....@@ -520,67 +713,244 @@
520713 oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
521714 snapobjectButton.addActionListener(this);
522715 snapobjectButton.setToolTipText("Snap Object");
716
+
717
+ oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
718
+ fourButton.addActionListener(this);
719
+ fourButton.setToolTipText("Show control panel only");
523720 }
524721
525
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
526
- flashSelectionButton.setToolTipText("Show selection");
527
- flashSelectionButton.addActionListener(this);
722
+ //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
528723
529
- oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
530
-
531
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
532
- twoButton.setToolTipText("Show center view only");
724
+ oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
725
+ twoButton.setToolTipText("Show 3D view only");
533726 twoButton.addActionListener(this);
534
- oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
535
- fourButton.addActionListener(this);
536
- fourButton.setToolTipText("Show left panel only");
537
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
538
- sixButton.setToolTipText("2-column layout left");
539
- sixButton.addActionListener(this);
540
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
541
- threeButton.setToolTipText("2-column layout right");
727
+ this.fullscreenLayout = twoButton;
728
+
729
+ oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
730
+ threeButton.setToolTipText("Show controls and 3D view");
542731 threeButton.addActionListener(this);
543
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
544
- sevenButton.setToolTipText("3-column layout");
545
- sevenButton.addActionListener(this);
732
+ oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
733
+ sixButton.setToolTipText("Show 3D view and controls");
734
+ sixButton.addActionListener(this);
735
+// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
736
+// sevenButton.setToolTipText("3-column layout");
737
+// sevenButton.addActionListener(this);
546738 //
547739
548
- oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
549
- rootButton.setToolTipText("Edit selection in new tab");
740
+ oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
741
+ rootButton.setToolTipText("Open selection in new tab");
550742 rootButton.addActionListener(this);
551743
552
- oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
744
+ oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
553745 closeButton.setToolTipText("Close tab");
554746 closeButton.addActionListener(this);
555747 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
556748 //clearButton.addActionListener(this);
557
-
558
- cGridBag commandsPanel = new cGridBag();
749
+
750
+ cGridBag row1 = new cGridBag();
559751
560
- commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
561
- editButton.setToolTipText("Edit selection");
752
+ // INSERT
753
+ row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
754
+ gridButton.setToolTipText("Create grid");
755
+ gridButton.addActionListener(this);
756
+
757
+ row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
758
+ boxButton.setToolTipText("Create box");
759
+ boxButton.addActionListener(this);
760
+
761
+ row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
762
+ sphereButton.setToolTipText("Create sphere");
763
+ sphereButton.addActionListener(this);
764
+
765
+ row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
766
+ coneButton.setToolTipText("Create cone");
767
+ coneButton.addActionListener(this);
768
+
769
+ row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
770
+ torusButton.setToolTipText("Create torus");
771
+ torusButton.addActionListener(this);
772
+
773
+ row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
774
+ superButton.setToolTipText("Create superellipsoid");
775
+ superButton.addActionListener(this);
776
+
777
+ if (Globals.ADVANCED)
778
+ {
779
+ oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
780
+ kleinButton.setToolTipText("Create Klein bottle");
781
+ kleinButton.addActionListener(this);
782
+ }
783
+
784
+ row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
785
+ particlesButton.setToolTipText("Create particle system");
786
+ particlesButton.addActionListener(this);
787
+
788
+ oe.toolboxPanel.add(row1);
789
+
790
+ cGridBag row2 = new cGridBag();
791
+
792
+ row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
793
+ groupButton.setToolTipText("Create group");
794
+ groupButton.addActionListener(this);
795
+
796
+ row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
797
+ compositeButton.setToolTipText("Create composite");
798
+ compositeButton.addActionListener(this);
799
+
800
+ row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
801
+ switchButton.setToolTipText("Create item switcher");
802
+ switchButton.addActionListener(this);
803
+
804
+ row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
805
+ loopButton.setToolTipText("Create loop");
806
+ loopButton.addActionListener(this);
807
+
808
+ row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
809
+ textureButton.setToolTipText("Create texture");
810
+ textureButton.addActionListener(this);
811
+
812
+ row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
813
+ overlayButton.setToolTipText("Create overlay");
814
+ overlayButton.addActionListener(this);
815
+
816
+ row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
817
+ lightButton.setToolTipText("Create light");
818
+ lightButton.addActionListener(this);
819
+
820
+ oe.toolboxPanel.add(row2);
821
+
822
+ // ENVYMAPS
823
+ cGridBag row3 = new cGridBag();
824
+ row3.preferredHeight = 20;
825
+
826
+ AddSkyboxButton("default", "rgb", row3);
827
+ AddSkyboxButton("default", "cornell", row3);
828
+ AddSkyboxButton("default", "uffizi", row3);
829
+ AddSkyboxButton("default", "CloudyHills", row3);
830
+ AddSkyboxButton("default", "skycube", row3);
831
+
832
+ oe.toolboxPanel.add(row3);
833
+
834
+ cGridBag row4 = new cGridBag();
835
+ row4.preferredHeight = 20;
836
+
837
+ AddSkyboxButton("bridge", "Bridge2", row4);
838
+ AddSkyboxButton("urban", "GamlaStan2", row4);
839
+ AddSkyboxButton("urban", "Parliament", row4);
840
+ AddSkyboxButton("urban", "Roundabout", row4);
841
+
842
+ oe.toolboxPanel.add(row4);
843
+
844
+ cGridBag row5 = new cGridBag();
845
+ row5.preferredHeight = 20;
846
+
847
+ AddSkyboxButton("urban", "SaintLazarusChurch", row5);
848
+ AddSkyboxButton("urban", "SaintLazarusChurch2", row5);
849
+ AddSkyboxButton("urban", "SaintLazarusChurch3", row5);
850
+ AddSkyboxButton("urban", "UnionSquare", row5);
851
+
852
+ oe.toolboxPanel.add(row5);
853
+
854
+ cGridBag row6 = new cGridBag();
855
+ row6.preferredHeight = 20;
856
+
857
+ AddSkyboxButton("park", "BerzeliiPark", row6);
858
+ AddSkyboxButton("park", "Buddha", row6);
859
+ AddSkyboxButton("park", "CNTower2", row6);
860
+ //AddSkyboxButton("park", "Fatbursparken", row6);
861
+ AddSkyboxButton("park", "NiagaraFalls1", row6);
862
+
863
+ oe.toolboxPanel.add(row6);
864
+
865
+ cGridBag row7 = new cGridBag();
866
+ row7.preferredHeight = 20;
867
+
868
+ AddSkyboxButton("park", "NiagaraFalls3", row7);
869
+ AddSkyboxButton("park", "Park", row7);
870
+ //AddSkyboxButton("park", "Park2", row6);
871
+ //AddSkyboxButton("park", "Path", row6);
872
+ AddSkyboxButton("park", "Pond", row7);
873
+ AddSkyboxButton("park", "Skansen", row7);
874
+
875
+ oe.toolboxPanel.add(row7);
876
+
877
+ cGridBag row8 = new cGridBag();
878
+ row8.preferredHeight = 20;
879
+
880
+ AddSkyboxButton("park", "Skansen2", row8);
881
+ AddSkyboxButton("park", "Skansen3", row8);
882
+ AddSkyboxButton("park", "Skansen4", row8);
883
+ AddSkyboxButton("park", "Skansen5", row8);
884
+
885
+ oe.toolboxPanel.add(row8);
886
+
887
+ cGridBag row9 = new cGridBag();
888
+ row9.preferredHeight = 20;
889
+
890
+ AddSkyboxButton("park", "Stairs", row9);
891
+ //AddSkyboxButton("park", "Tantolunden", row6);
892
+ //AddSkyboxButton("park", "Tantolunden3", row6);
893
+ AddSkyboxButton("park", "Tantolunden4", row9);
894
+
895
+ oe.toolboxPanel.add(row9);
896
+/*
897
+BerzeliiPark
898
+Buddha
899
+CNTower2
900
+Fatbursparken
901
+NiagaraFalls1
902
+NiagaraFalls3
903
+Park
904
+Park2
905
+Path
906
+Pond
907
+Skansen
908
+Skansen2
909
+Skansen3
910
+Skansen4
911
+Skansen5
912
+Stairs
913
+Tantolunden
914
+Tantolunden3
915
+Tantolunden4
916
+ */
917
+
918
+ for (int i=1; --i>=0;)
919
+ {
920
+ //oe.toolboxPanel.Return();
921
+ oe.toolboxPanel.add(new cGridBag());
922
+ }
923
+
924
+ // EDIT panel
925
+ editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
926
+ editButton.setToolTipText("Pin selection controls");
562927 editButton.addActionListener(this);
563928
564
- commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
565
- uneditButton.setToolTipText("Unedit selection");
929
+ editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
930
+ uneditButton.setToolTipText("Remove selection controls");
566931 uneditButton.addActionListener(this);
567932
568
- commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
569
- allParamsButton.setToolTipText("Edit all params");
933
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
934
+ allParamsButton.setToolTipText("Show all controle");
570935 allParamsButton.addActionListener(this);
571936
572
- commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
937
+ editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
573938 clearPanelButton.setToolTipText("Clear edit panel");
574939 clearPanelButton.addActionListener(this);
575940
576
- commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
941
+ editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
577942 unselectButton.setToolTipText("Unselect");
578943 unselectButton.addActionListener(this);
579944
580
- commandsPanel.preferredHeight = 1;
945
+ editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
946
+ flashSelectionButton.setToolTipText("Highlight selection");
947
+ flashSelectionButton.addActionListener(this);
581948
582
- oe.treePanel.add(commandsPanel);
583
- oe.treePanel.Return();
949
+ editCommandsPanel.preferredHeight = 1;
950
+
951
+ SetPinStates(false);
952
+// oe.treePanel.add(commandsPanel);
953
+// oe.treePanel.Return();
584954
585955 // oe.aConstraints.gridx += 1;
586956 // oe.aConstraints.weighty = 0;
....@@ -597,32 +967,20 @@
597967
598968 JScrollPane jSP;
599969 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
600
- jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
970
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
601971 ResetModel();
602972
603973 oe.treePanel.add(jSPPanel);
604974 oe.treePanel.Return();
605975
606
- cGridBag copyOptionsPanel = new cGridBag();
607
-
608
- copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
609
- colorCB.setToolTipText("Copy color when dropped");
610
- colorCB.addItemListener(this);
611
-
612
- copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
613
- materialCB.setToolTipText("Copy material when dropped");
614
- materialCB.addItemListener(this);
615
-
616
- copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
617
- textureCB.setToolTipText("Copy texture when dropped");
618
- textureCB.addItemListener(this);
619
-
620
- copyOptionsPanel.preferredHeight = 1;
621976 oe.treePanel.add(copyOptionsPanel);
622977 oe.treePanel.Return();
978
+ cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
979
+ versionSlider = (cNumberSlider)sliderPane.getComponent(1);
980
+ sliderPane.preferredHeight = 1;
623981
624
-// mainPanel.setDividerLocation(0.5); //1.0);
625
-// mainPanel.setResizeWeight(0.5);
982
+// mainPanel.setDividerLocation(0.1); //1.0);
983
+ mainPanel.setResizeWeight(0.4);
626984
627985 //jList.addListSelectionListener(this);
628986 oe.jTree.addTreeSelectionListener(this);
....@@ -630,7 +988,7 @@
630988 //jTree.setEditable(true);
631989 oe.jTree.setDragEnabled(true);
632990 //jTree.setPreferredSize(new Dimension(10,10));
633
- jSP.setPreferredSize(new Dimension(100,200));
991
+ //jSP.setPreferredSize(new Dimension(100,200));
634992
635993 oe.jTree.setCellRenderer(new cTreeModel.Renderer());
636994
....@@ -642,29 +1000,49 @@
6421000 dgr.addDragGestureListener(this);
6431001 }catch(Exception e) {}
6441002 */
645
- radio.layout = sevenButton;
1003
+ radio.layout = sixButton; // sevenButton;
6461004 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
6471005 }
6481006
6491007 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
6501008 {
1009
+ panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
1010
+ colorCB.setToolTipText("Copy color when dropped");
1011
+ colorCB.addItemListener(this);
1012
+
1013
+ panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
1014
+ materialCB.setToolTipText("Copy material when dropped");
1015
+ materialCB.addItemListener(this);
1016
+
1017
+ panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
1018
+ textureCB.setToolTipText("Copy texture when dropped");
1019
+ textureCB.addItemListener(this);
1020
+
1021
+ panel.Return();
1022
+
6511023 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
6521024 boxCB.setToolTipText("Display bounding boxes");
6531025 boxCB.addItemListener(this);
6541026
6551027 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
656
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
1028
+ zoomBoxCB.setToolTipText("Display only for wheel");
6571029 zoomBoxCB.addItemListener(this);
6581030
6591031 if (true) // Globals.ADVANCED)
6601032 {
661
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
662
- supportCB.setToolTipText("Enable rigging");
663
- supportCB.addItemListener(this);
1033
+// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
1034
+// supportCB.setToolTipText("Enable rigging");
1035
+// supportCB.addItemListener(this);
1036
+
1037
+ panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints);
1038
+ freezeCB.setToolTipText("Fast moving camera");
1039
+ freezeCB.addItemListener(this);
6641040
6651041 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
6661042 // localCB.addItemListener(this);
6671043
1044
+ panel.Return();
1045
+
6681046 panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
6691047 crowdCB.setToolTipText("Used for crowds");
6701048 crowdCB.addItemListener(this);
....@@ -681,6 +1059,8 @@
6811059 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
6821060 // speakerMocapCB.addItemListener(this);
6831061
1062
+ panel.Return();
1063
+
6841064 if (false)
6851065 {
6861066 // handled in scripts
....@@ -695,34 +1075,74 @@
6951075 //constraints.gridy += 1;
6961076 panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
6971077 smoothfocusCB.addItemListener(this);
1078
+ panel.Return();
6981079 }
6991080
7001081 //constraints.gridx += 1;
7011082 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
7021083 // debugCB.addItemListener(this);
7031084
1085
+ panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
1086
+ trackCB.setToolTipText("Enable tracking target");
1087
+ trackCB.addItemListener(this);
1088
+
7041089 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
1090
+ oeilCB.setToolTipText("Move camera when tracking");
7051091 oeilCB.addItemListener(this);
7061092
1093
+ panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
1094
+ shadowCB.setToolTipText("When live compute shadows");
1095
+ shadowCB.addItemListener(this);
1096
+
1097
+ panel.Return();
1098
+ panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints);
1099
+ toggleTextureCB.setToolTipText("Load textures");
1100
+ toggleTextureCB.addItemListener(this);
1101
+
1102
+ panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints);
1103
+ toggleSwitchCB.setToolTipText("Choose a single item");
1104
+ toggleSwitchCB.addItemListener(this);
1105
+
1106
+ panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints);
1107
+ autokeepCB.setToolTipText("On structure change");
1108
+ autokeepCB.addItemListener(this);
1109
+
1110
+ panel.Return();
1111
+ if (Globals.ADVANCED)
1112
+ {
7071113 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
7081114 lookAtCB.setToolTipText("Look-at target");
7091115 lookAtCB.addItemListener(this);
1116
+ }
7101117
7111118 }
7121119
7131120 cGridBag fill = new cGridBag();
714
-
7151121 fill.preferredHeight = 200;
1122
+ cGridBag fill2 = new cGridBag();
1123
+ fill2.preferredHeight = 200;
1124
+ cGridBag fill3 = new cGridBag();
1125
+ fill3.preferredHeight = 200;
7161126
7171127 panel.add(fill);
1128
+ panel.add(fill2);
1129
+ panel.add(fill3);
7181130
7191131 }
7201132
7211133 void EditObject(Object3D obj)
7221134 {
7231135 cRadio radioButton = new cRadio(obj.name);
1136
+
1137
+ // June 2019. Patch to avoid bug with transparency.
1138
+ radioButton.hadMaterial = obj.material != null;
1139
+ if (!radioButton.hadMaterial)
1140
+ {
1141
+ obj.material = new cMaterial();
1142
+ }
1143
+
7241144 radioButton.SetObject(obj);
725
- radioButton.layout = sevenButton;
1145
+ radioButton.layout = sixButton; // sevenButton;
7261146 radioButton.SetCamera(cameraView.renderCamera, false);
7271147 radioButton.addActionListener(this);
7281148 radioPanel.add(radioButton);
....@@ -732,6 +1152,8 @@
7321152
7331153 void SetupViews(ObjEditor oe)
7341154 {
1155
+ theFrame = this;
1156
+
7351157 oe.SetupViews();
7361158
7371159 System.out.println("SetupViews");
....@@ -740,23 +1162,28 @@
7401162 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
7411163 }
7421164
743
- JCheckBox liveCB;
744
- JCheckBox supportCB;
745
- JCheckBox localCB;
746
- JCheckBox crowdCB;
747
- JCheckBox smoothCB;
748
- JCheckBox fastCB;
749
- JCheckBox slowCB;
750
- JCheckBox boxCB;
751
- JCheckBox zoomBoxCB;
752
- JCheckBox trackCB;
753
- JCheckBox smoothfocusCB;
1165
+ cToggleButton liveCB;
1166
+ cCheckBox supportCB;
1167
+ cCheckBox localCB;
1168
+ cCheckBox crowdCB;
1169
+ cCheckBox smoothCB;
1170
+ cToggleButton fastCB;
1171
+ cCheckBox slowCB;
1172
+ cCheckBox boxCB;
1173
+ cCheckBox zoomBoxCB;
1174
+ cCheckBox freezeCB;
1175
+ //cToggleButton trackCB;
1176
+ cCheckBox trackCB;
1177
+ cCheckBox smoothfocusCB;
7541178 // JCheckBox speakerMocapCB;
755
- JCheckBox speakerCameraCB;
756
- JCheckBox speakerFocusCB;
757
- JCheckBox debugCB;
758
- JCheckBox oeilCB;
759
- JCheckBox lookAtCB;
1179
+ cCheckBox speakerCameraCB;
1180
+ cCheckBox speakerFocusCB;
1181
+ cCheckBox debugCB;
1182
+
1183
+ cCheckBox oeilCB;
1184
+ cCheckBox shadowCB;
1185
+ cCheckBox autokeepCB;
1186
+ cCheckBox lookAtCB;
7601187
7611188 // static int COLOR = 1;
7621189 // static int MATERIAL = 2;
....@@ -764,9 +1191,9 @@
7641191
7651192 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
7661193
767
- JCheckBox colorCB;
768
- JCheckBox materialCB;
769
- JCheckBox textureCB;
1194
+ cCheckBox colorCB;
1195
+ cCheckBox materialCB;
1196
+ cCheckBox textureCB;
7701197
7711198 public void itemStateChanged(ItemEvent e)
7721199 {
....@@ -794,6 +1221,7 @@
7941221 } else if(e.getSource() == liveCB)
7951222 {
7961223 cameraView.ToggleLive();
1224
+ refreshContents(false);
7971225 }
7981226 else if(e.getSource() == supportCB)
7991227 {
....@@ -858,6 +1286,18 @@
8581286 {
8591287 cameraView.ToggleOeil();
8601288 }
1289
+ else if(e.getSource() == shadowCB)
1290
+ {
1291
+ Globals.COMPUTESHADOWWHENLIVE ^= true;
1292
+ }
1293
+ else if(e.getSource() == freezeCB)
1294
+ {
1295
+ Globals.FREEZEONMOVE ^= true;
1296
+ }
1297
+ else if(e.getSource() == autokeepCB)
1298
+ {
1299
+ Globals.REPLACEONMAKE ^= true;
1300
+ }
8611301 else if(e.getSource() == lookAtCB)
8621302 {
8631303 cameraView.ToggleLookAt();
....@@ -874,7 +1314,8 @@
8741314
8751315 /**/
8761316 //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this);
877
- TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1317
+ //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1318
+ TreePath path = objEditor.jTree.getSelectionPath();
8781319 if ((path == null) || (path.getPathCount() <= 1)) {
8791320 // We can't move the root node or an empty selection
8801321 return;
....@@ -937,8 +1378,6 @@
9371378 }
9381379 }
9391380
940
- String string = (String) object;
941
-
9421381 System.out.println("Transfer = " + object + "; drop : " + target);
9431382 // if( object instanceof java.io.File[])
9441383 // {
....@@ -946,6 +1385,8 @@
9461385 // objEditor.DropFile((java.io.File[]) object, true);
9471386 // return;
9481387 // }
1388
+
1389
+ String string = object.toString();
9491390
9501391 // File path for Mac and Windows
9511392 if (string.charAt(0) == '/' || string.charAt(1) == ':')
....@@ -991,23 +1432,33 @@
9911432
9921433 assert target == objEditor.jTree;
9931434 TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y);
1435
+ Object3D destinationLeaf;
9941436 try {
995
- Object3D dummy = (Composite) destinationPath.getLastPathComponent();
1437
+ destinationLeaf = (Composite) destinationPath.getLastPathComponent();
9961438 } catch (Exception e) {
9971439 System.out.println("destinationPath : " + destinationPath);
9981440 return;
9991441 }
10001442
1001
- if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1443
+ for (int i=group.selection.size(); --i>=0;)
10021444 {
1445
+ Object3D child = (Object3D)group.selection.elementAt(i);
1446
+
1447
+ // Cannot move into itself
1448
+ if (child == destinationLeaf)
1449
+ return;
1450
+ }
1451
+
1452
+// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1453
+// {
10031454 loadClipboard(true);
10041455 objEditor.jTree.setSelectionPath(destinationPath);
10051456 pasteInto(false, false);
1006
- } else {
1007
- loadClipboard(false);
1008
- objEditor.jTree.setSelectionPath(destinationPath);
1009
- pasteInto(false, false); // true); // ???
1010
- }
1457
+// } else {
1458
+// loadClipboard(false);
1459
+// objEditor.jTree.setSelectionPath(destinationPath);
1460
+// pasteInto(false, false); // true); // ???
1461
+// }
10111462 }
10121463 public void dropActionChanged(DropTargetDragEvent dtde)
10131464 // Called if the user has modified the current drop gesture
....@@ -1112,22 +1563,30 @@
11121563 {
11131564 //heightFieldItem = menu.add(new MenuItem("Height Field"));
11141565 //heightFieldItem.addActionListener(this);
1115
- gridItem = menu.add(new MenuItem("Grid"));
1116
- gridItem.addActionListener(this);
1117
- rectoidItem = menu.add(new MenuItem("Box"));
1118
- rectoidItem.addActionListener(this);
1119
- ellipsoidItem = menu.add(new MenuItem("Sphere"));
1120
- ellipsoidItem.addActionListener(this);
1121
- coneItem = menu.add(new MenuItem("Cone"));
1122
- coneItem.addActionListener(this);
1123
- torusItem = menu.add(new MenuItem("Torus"));
1124
- torusItem.addActionListener(this);
1125
- superItem = menu.add(new MenuItem("Superellipsoid"));
1126
- superItem.addActionListener(this);
1566
+// gridItem = menu.add(new MenuItem("Grid"));
1567
+// gridItem.addActionListener(this);
1568
+// rectoidItem = menu.add(new MenuItem("Box"));
1569
+// rectoidItem.addActionListener(this);
1570
+// ellipsoidItem = menu.add(new MenuItem("Sphere"));
1571
+// ellipsoidItem.addActionListener(this);
1572
+// coneItem = menu.add(new MenuItem("Cone"));
1573
+// coneItem.addActionListener(this);
1574
+// torusItem = menu.add(new MenuItem("Torus"));
1575
+// torusItem.addActionListener(this);
1576
+// superItem = menu.add(new MenuItem("Superellipsoid"));
1577
+// superItem.addActionListener(this);
1578
+
1579
+ cameraItem = menu.add(new MenuItem("Camera"));
1580
+ cameraItem.addActionListener(this);
1581
+
1582
+ if (!Globals.ADVANCED)
1583
+ {
11271584 kleinItem = menu.add(new MenuItem("Klein Bottle"));
11281585 kleinItem.addActionListener(this);
1129
- particleItem = menu.add(new MenuItem("Particle system"));
1130
- particleItem.addActionListener(this);
1586
+ }
1587
+
1588
+// particleItem = menu.add(new MenuItem("Particle system"));
1589
+// particleItem.addActionListener(this);
11311590 if (Globals.ADVANCED)
11321591 {
11331592 ragdollItem = menu.add(new MenuItem("Rag Walk"));
....@@ -1153,15 +1612,15 @@
11531612 }
11541613 bezierItem = menu.add(new MenuItem("Bezier Patch"));
11551614 bezierItem.addActionListener(this);
1156
- overlayItem = menu.add(new MenuItem("Overlay"));
1157
- overlayItem.addActionListener(this);
1158
- lightItem = menu.add(new MenuItem("Light"));
1159
- lightItem.addActionListener(this);
1615
+// overlayItem = menu.add(new MenuItem("Overlay"));
1616
+// overlayItem.addActionListener(this);
1617
+// lightItem = menu.add(new MenuItem("Light"));
1618
+// lightItem.addActionListener(this);
11601619 menu.add("-");
11611620 //superLoopItem = menu.add(new MenuItem("Super Loop"));
11621621 //superLoopItem.addActionListener(this);
1163
- loopItem = menu.add(new MenuItem("Loop"));
1164
- loopItem.addActionListener(this);
1622
+// loopItem = menu.add(new MenuItem("Loop"));
1623
+// loopItem.addActionListener(this);
11651624 doubleItem = menu.add(new MenuItem("Fork"));
11661625 doubleItem.addActionListener(this);
11671626 if (Globals.ADVANCED)
....@@ -1177,6 +1636,9 @@
11771636 animationItem.addItemListener(this);
11781637 animationItem.setState(Globals.ANIMATION);
11791638
1639
+ menu.add(archiveItem = new MenuItem("Archive3D..."));
1640
+ archiveItem.addActionListener(this);
1641
+
11801642 menu.add("-");
11811643 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
11821644 parseverticesItem.addActionListener(this);
....@@ -1189,6 +1651,8 @@
11891651 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11901652 reduce34MorphItem.addActionListener(this);
11911653 menu.add("-");
1654
+ menu.add(memoryItem = new MenuItem("Memory Usage"));
1655
+ memoryItem.addActionListener(this);
11921656 menu.add(computeAOItem = new MenuItem("Compute AO"));
11931657 computeAOItem.addActionListener(this);
11941658
....@@ -1197,11 +1661,9 @@
11971661 mirrorItem = menu.add(new MenuItem("Mirror Poses"));
11981662 mirrorItem.addActionListener(this);
11991663 menu.add("-");
1200
- menu.add(memoryItem = new MenuItem("Memory Usage"));
1201
- memoryItem.addActionListener(this);
12021664 menu.add(analyzeItem = new MenuItem("Analyze"));
12031665 analyzeItem.addActionListener(this);
1204
- menu.add(dumpItem = new MenuItem("Dump"));
1666
+ menu.add(dumpItem = new MenuItem("Print"));
12051667 dumpItem.addActionListener(this);
12061668 // menu.add(pathItem = new MenuItem("From-to path"));
12071669 // pathItem.addActionListener(this);
....@@ -1342,9 +1804,34 @@
13421804 shadow.material = new cMaterial(obj.material);
13431805 shadow.material.diffuse = 0.0001f;
13441806 shadow.material.specular = 0.0001f;
1807
+ //shadow.projectedVertices[1].x = 300;
13451808
13461809 makeSomething(shadow);
13471810 }
1811
+
1812
+ private void ClearUnpinned()
1813
+ {
1814
+ //for (Object3D obj : listUI)
1815
+ for (int i=listUI.size(); --i>=0;)
1816
+ {
1817
+ Object3D obj = listUI.elementAt(i);
1818
+ if (!obj.pinned)
1819
+ {
1820
+ obj.CloseUI();
1821
+ listUI.remove(i);
1822
+ }
1823
+ }
1824
+ }
1825
+
1826
+ private void EditElement(Object3D elem, boolean newWindow)
1827
+ {
1828
+ // if (!(elem instanceof Composite))
1829
+ // newWindow = false;
1830
+ listUI.add(elem);
1831
+ elem.openEditWindow(this, newWindow); //, false);
1832
+ System.out.println("edit : " + elem);
1833
+ elem.editWindow.refreshContents(true); // ? new
1834
+ }
13481835
13491836 /**
13501837 * applyExample
....@@ -1589,7 +2076,7 @@
15892076 {
15902077 ScreenFit();
15912078 } else
1592
- if (source == switchItem)
2079
+ if (source == switchViewItem)
15932080 {
15942081 cVector v1 = new cVector();
15952082 cVector v2 = new cVector();
....@@ -1598,11 +2085,11 @@
15982085 objEditor.cameraView.renderCamera.setAim(v2, v1);
15992086 objEditor.cameraView.repaint();
16002087 } else
1601
- if (source == rectoidItem)
2088
+ if (source == rectoidItem || source == boxButton)
16022089 {
16032090 makeSomething(new Box());
16042091 } else
1605
- if (source == particleItem)
2092
+ if (source == particleItem || source == particlesButton)
16062093 {
16072094 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
16082095 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1681,27 +2168,27 @@
16812168
16822169 makeSomething(obj);
16832170 } else
1684
- if (source == gridItem)
2171
+ if (source == gridItem || source == gridButton)
16852172 {
16862173 makeSomething(new Grid());
16872174 } else
1688
- if (source == ellipsoidItem)
2175
+ if (source == ellipsoidItem || source == sphereButton)
16892176 {
16902177 makeSomething(new Sphere());
16912178 } else
1692
- if (source == coneItem)
2179
+ if (source == coneItem || source == coneButton)
16932180 {
16942181 makeSomething(new Cone());
16952182 } else
1696
- if (source == torusItem)
2183
+ if (source == torusItem || source == torusButton)
16972184 {
16982185 makeSomething(new Torus());
16992186 } else
1700
- if (source == superItem)
2187
+ if (source == superItem || source == superButton)
17012188 {
17022189 makeSomething(new Superellipsoid());
17032190 } else
1704
- if (source == kleinItem)
2191
+ if (source == kleinItem || source == kleinButton)
17052192 {
17062193 makeSomething(new Klein());
17072194 } else
....@@ -1721,7 +2208,7 @@
17212208 {
17222209 makeSomething(new BezierSurface());
17232210 } else
1724
- if (source == overlayItem)
2211
+ if (source == overlayItem || source == overlayButton)
17252212 {
17262213 /*
17272214 Object3D obj = new BezierSurface(5,8);
....@@ -1769,10 +2256,27 @@
17692256 s.setup();
17702257 makeSomething(s);
17712258 } else
1772
- if (source == lightItem)
2259
+ if (source == lightItem || source == lightButton)
17732260 {
17742261 makeSomething(new Light());
17752262 } else
2263
+// if (source == skybox1Button ||
2264
+// source == skybox2Button ||
2265
+// source == skybox3Button ||
2266
+// source == skybox4Button ||
2267
+// source == skybox5Button ||
2268
+// source == skybox6Button ||
2269
+// source == skybox7Button ||
2270
+// source == skybox11Button ||
2271
+// source == skybox12Button ||
2272
+// source == skybox13Button ||
2273
+// source == skybox14Button ||
2274
+// source == skybox15Button ||
2275
+// source == skybox16Button ||
2276
+// source == skybox17Button)
2277
+// {
2278
+// ChangeSkybox(source);
2279
+// } else
17762280 if (source == csgItem)
17772281 {
17782282 group(new CSG());
....@@ -1819,30 +2323,30 @@
18192323
18202324 group(g);
18212325 } else
1822
- if (source == loopItem)
2326
+ if (source == loopItem || source == loopButton)
18232327 {
18242328 Composite csg = new GroupLeaf();
18252329 csg.count = 5;
18262330 group(csg);
1827
- Composite child = new cGroup();
2331
+ Composite child = new cGroup("Branch");
18282332 csg.addChild(child);
18292333 child.addChild(csg);
18302334 } else
18312335 if (source == doubleItem)
18322336 {
1833
- Composite csg = new GroupLeaf();
2337
+ Composite csg = new GroupLeaf("Fork");
18342338 csg.count = 5;
18352339 group(csg);
1836
- Composite child = new cGroup();
2340
+ Composite child = new cGroup("Branch A");
18372341 csg.addChild(child);
18382342 child.addChild(csg);
1839
- child = new cGroup();
2343
+ child = new cGroup("Branch B");
18402344 csg.addChild(child);
18412345 child.addChild(csg);
18422346 } else
18432347 if (source == tripleItem)
18442348 {
1845
- Composite csg = new GroupLeaf();
2349
+ Composite csg = new GroupLeaf("Trident");
18462350 csg.count = 4;
18472351 group(csg);
18482352 Composite child = new cGroup();
....@@ -1855,35 +2359,10 @@
18552359 csg.addChild(child);
18562360 child.addChild(csg);
18572361 } else
1858
-
1859
- if (source == importGFDItem)
1860
- {
1861
- ImportGFD();
1862
- } else
1863
- if (source == importVRMLX3DItem)
1864
- {
1865
- ImportVRMLX3D();
1866
- } else
1867
- if (source == import3DSItem)
1868
- {
1869
- objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
1870
- } else
1871
- if (source == importOBJItem)
1872
- {
1873
- //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1874
- FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD);
1875
- browser.setVisible(true);
1876
- String filename = browser.getFile();
1877
- if (filename != null && filename.length() > 0)
1878
- {
1879
- String fullname = browser.getDirectory() + filename;
1880
- makeSomething(ReadOBJ(fullname), true);
1881
- }
1882
- } else
18832362 if (source == computeAOItem)
18842363 {
18852364 Globals.drawMode = CameraPane.OCCLUSION;
1886
- Globals.theRenderer.repaint();
2365
+ cameraView.repaint();
18872366 } else
18882367 if (source == recompileItem)
18892368 {
....@@ -1917,6 +2396,46 @@
19172396 {
19182397 DumpObject();
19192398 } else
2399
+ if (source == minButton)
2400
+ {
2401
+ Minimize();
2402
+ } else
2403
+ if (source == maxButton)
2404
+ {
2405
+ Maximize();
2406
+ } else
2407
+ if (source == fullButton)
2408
+ {
2409
+ ToggleFullScreen();
2410
+ } else
2411
+ if (source == undoButton)
2412
+ {
2413
+ // Go to previous version
2414
+ //if (!Undo())
2415
+ //java.awt.Toolkit.getDefaultToolkit().beep();
2416
+ Undo();
2417
+ } else
2418
+ if (source == restoreButton)
2419
+ {
2420
+ // Restore current version
2421
+ Restore();
2422
+ } else
2423
+ if (source == replaceButton)
2424
+ {
2425
+ // Overwrite current version
2426
+ Replace();
2427
+ } else
2428
+ if (source == redoButton)
2429
+ {
2430
+ // Go to next version
2431
+ Redo();
2432
+ } else
2433
+ if (source == saveButton)
2434
+ {
2435
+ // Save a new version
2436
+ if (!Save(true))
2437
+ java.awt.Toolkit.getDefaultToolkit().beep();
2438
+ } else
19202439 if (source == oneStepButton)
19212440 {
19222441 Globals.ONESTEP = true;
....@@ -1924,17 +2443,14 @@
19242443 } else
19252444 if (source == screenfitButton)
19262445 {
1927
- //Reload(lastConverter, lastFilename, true);
19282446 ScreenFit();
19292447 } else
19302448 if (source == screenfitpointButton)
19312449 {
1932
- //Reload(lastConverter, lastFilename, true);
19332450 ScreenFitPoint();
19342451 } else
19352452 if (source == snapobjectButton)
19362453 {
1937
- //Reload(lastConverter, lastFilename, true);
19382454 SnapObject();
19392455 } else
19402456 // if (event.getSource() == recompileButton)
....@@ -1970,6 +2486,14 @@
19702486 if (source == cutItem || source == clearButton)
19712487 {
19722488 loadClipboard(true);
2489
+ } else
2490
+ if (source == undoItem)
2491
+ {
2492
+ Undo();
2493
+ } else
2494
+ if (source == redoItem)
2495
+ {
2496
+ Redo();
19732497 } else
19742498 if (source == duplicateItem)
19752499 {
....@@ -2290,7 +2814,7 @@
22902814 {
22912815 StepAll();
22922816 } else
2293
- if (source == clearItem) // || event.getSource() == clearButton)
2817
+ if (source == deleteItem) // || event.getSource() == clearButton)
22942818 {
22952819 //int indices[] = jList.getSelectedIndices();
22962820 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2302,9 +2826,9 @@
23022826 {
23032827 ClearSelection(true);
23042828 } else
2305
- if (source == grabItem)
2829
+ if (source == grabItem || source == groupButton)
23062830 {
2307
- group(new cGroup(), true);
2831
+ group(new cGroup(), false); // true);
23082832 } else
23092833 if (source == hideItem)
23102834 {
....@@ -2322,11 +2846,11 @@
23222846 {
23232847 makeSomething(new Camera());
23242848 } else
2325
- if (source == compositeItem)
2849
+ if (source == compositeItem || source == compositeButton)
23262850 {
23272851 group(new Composite());
23282852 } else
2329
- if (source == randomItem)
2853
+ if (source == switchItem || source == switchButton)
23302854 {
23312855 RandomNode random = new RandomNode();
23322856 group(random);
....@@ -2428,7 +2952,7 @@
24282952 {
24292953 group(new cLinker());
24302954 } else
2431
- if (source == textureItem)
2955
+ if (source == textureItem || source == textureButton)
24322956 {
24332957 group(new TextureNode());
24342958 } else
....@@ -2448,17 +2972,30 @@
24482972 {
24492973 CastShadow(2);
24502974 } else
2451
- if (source == ungroupItem)
2975
+ if (source == ungroupItem || source == ungroupButton)
24522976 {
2453
- //ungroup();
2977
+ boolean hasRoot = false;
2978
+
24542979 for (int i=0; i<group.selection.size(); i++)
24552980 {
2456
- Ungroup(group.selection.get(i));
2981
+ if (group.selection.get(i) == group)
2982
+ {
2983
+ hasRoot = true;
2984
+ break;
2985
+ }
24572986 }
24582987
2459
- ClearSelection(false);
2460
-
2461
- refreshContents();
2988
+ if (!hasRoot)
2989
+ {
2990
+ for (int i=0; i<group.selection.size(); i++)
2991
+ {
2992
+ Ungroup(group.selection.get(i));
2993
+ }
2994
+
2995
+ ClearSelection(false);
2996
+
2997
+ refreshContents();
2998
+ }
24622999 } else
24633000 if (source == genUVItem)
24643001 {
....@@ -2470,7 +3007,7 @@
24703007 } else
24713008 if (source == genNormalsMESHItem)
24723009 {
2473
- GenNormals(true); // TODO
3010
+ GenNormalsMESH();
24743011 } else
24753012 if (source == genNormalsORGANItem)
24763013 {
....@@ -2535,6 +3072,22 @@
25353072 if (source == unmarkleavesItem)
25363073 {
25373074 MarkLeaves(false);
3075
+ } else
3076
+ if (source == rewindleavesItem)
3077
+ {
3078
+ RewindLeaves(true);
3079
+ } else
3080
+ if (source == unrewindleavesItem)
3081
+ {
3082
+ RewindLeaves(false);
3083
+ } else
3084
+ if (source == randomleavesItem)
3085
+ {
3086
+ RandomLeaves(true);
3087
+ } else
3088
+ if (source == unrandomleavesItem)
3089
+ {
3090
+ RandomLeaves(false);
25383091 } else
25393092 if (source == flipVItem)
25403093 {
....@@ -2743,7 +3296,7 @@
27433296 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
27443297 {
27453298 obj = (Object3D)e.nextElement();
2746
- obj.SetBumpTexture(null);
3299
+ obj.ResetBumpTexture();
27473300 }
27483301
27493302 refreshContents();
....@@ -2759,6 +3312,31 @@
27593312
27603313 refreshContents();
27613314 } else
3315
+ if (source == embedTexturesItem)
3316
+ {
3317
+ Object3D obj;
3318
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3319
+ {
3320
+ obj = (Object3D)e.nextElement();
3321
+ obj.EmbedTextures(true);
3322
+ }
3323
+
3324
+ refreshContents();
3325
+ } else
3326
+ if (source == deEmbedTexturesItem)
3327
+ {
3328
+ Object3D obj;
3329
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3330
+ {
3331
+ obj = (Object3D)e.nextElement();
3332
+ obj.EmbedTextures(false);
3333
+ }
3334
+
3335
+ CameraPane.texturepigment.clear();
3336
+ CameraPane.texturebump.clear();
3337
+
3338
+ refreshContents();
3339
+ } else
27623340 if (source == flashSelectionButton)
27633341 {
27643342 CameraPane.flash = true;
....@@ -2770,6 +3348,10 @@
27703348 if (source == twoButton)
27713349 {
27723350 radio.layout = twoButton;
3351
+
3352
+ if (CameraPane.FULLSCREEN)
3353
+ fullscreenLayout = radio.layout;
3354
+
27733355 // bug
27743356 //gridPanel.setDividerLocation(1.0);
27753357 //bigPanel.setDividerLocation(0.0);
....@@ -2802,10 +3384,31 @@
28023384 bigThree.ClearUI();
28033385 bigThree.add(centralPanel);
28043386 bigThree.FlushUI();
3387
+
3388
+ cameraView.requestFocusInWindow();
3389
+
3390
+// refreshContents(true);
3391
+//
3392
+// try
3393
+// {
3394
+// java.awt.Robot bot = new java.awt.Robot();
3395
+// int mask = InputEvent.BUTTON1_MASK;
3396
+// bot.mouseMove(100, 100);
3397
+// bot.mousePress(mask);
3398
+// bot.mouseRelease(mask);
3399
+// }
3400
+// catch (Exception e)
3401
+// {
3402
+//
3403
+// }
3404
+
28053405 } else
28063406 if (source == threeButton)
28073407 {
28083408 radio.layout = threeButton;
3409
+
3410
+ if (CameraPane.FULLSCREEN)
3411
+ fullscreenLayout = radio.layout;
28093412
28103413 // bigThree.remove(scenePanel);
28113414 // bigThree.remove(centralPanel);
....@@ -2835,13 +3438,18 @@
28353438 // centralPanel.setVisible(true);
28363439 // XYZPanel.setVisible(true);
28373440 bigThree.ClearUI();
3441
+ bigThree.add(scenePanel);
28383442 bigThree.add(centralPanel);
2839
- bigThree.add(XYZPanel);
28403443 bigThree.FlushUI();
3444
+
3445
+ cameraView.requestFocusInWindow();
28413446 } else
28423447 if (source == fourButton)
28433448 {
28443449 radio.layout = fourButton;
3450
+
3451
+ if (CameraPane.FULLSCREEN)
3452
+ fullscreenLayout = radio.layout;
28453453
28463454 // bigThree.remove(scenePanel);
28473455 // bigThree.remove(centralPanel);
....@@ -2873,10 +3481,15 @@
28733481 bigThree.ClearUI();
28743482 bigThree.add(scenePanel);
28753483 bigThree.FlushUI();
3484
+
3485
+ cameraView.requestFocusInWindow();
28763486 } else
28773487 if (source == sixButton)
28783488 {
28793489 radio.layout = sixButton;
3490
+
3491
+ if (CameraPane.FULLSCREEN)
3492
+ fullscreenLayout = radio.layout;
28803493
28813494 // bigThree.remove(scenePanel);
28823495 // bigThree.remove(centralPanel);
....@@ -2906,13 +3519,18 @@
29063519 // centralPanel.setVisible(true);
29073520 // XYZPanel.setVisible(false);
29083521 bigThree.ClearUI();
2909
- bigThree.add(scenePanel);
29103522 bigThree.add(centralPanel);
3523
+ bigThree.add(scenePanel);
29113524 bigThree.FlushUI();
3525
+
3526
+ cameraView.requestFocusInWindow();
29123527 } else
29133528 if (source == sevenButton)
29143529 {
29153530 radio.layout = sevenButton;
3531
+
3532
+ if (CameraPane.FULLSCREEN)
3533
+ fullscreenLayout = radio.layout;
29163534
29173535 // bigThree.remove(scenePanel);
29183536 // bigThree.remove(centralPanel);
....@@ -2946,6 +3564,8 @@
29463564 bigThree.add(centralPanel);
29473565 bigThree.add(XYZPanel);
29483566 bigThree.FlushUI();
3567
+
3568
+ cameraView.requestFocusInWindow();
29493569 } else
29503570 if (source == rootButton)
29513571 {
....@@ -2957,6 +3577,7 @@
29573577 EditObject(obj);
29583578 }
29593579
3580
+ cameraView.requestFocusInWindow();
29603581 refreshContents(true);
29613582 } else
29623583 if (source == closeButton)
....@@ -2966,22 +3587,37 @@
29663587 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
29673588 {
29683589 ab = (cRadio)e.nextElement();
2969
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3590
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
29703591 {
3592
+ // Patch to avoid bug with transparency.
3593
+ if (!ab.hadMaterial)
3594
+ {
3595
+ ab.object.material = null;
3596
+ }
3597
+
29713598 buttonGroup.remove(ab);
29723599 radioPanel.remove(ab);
29733600
2974
- ab.GetObject().editWindow = null;
3601
+ //ab.GetObject().editWindow = null;
3602
+ ab.GetObject().manipWindow = null;
29753603 // ab.GetObject().objectUI = null; // ?????????
29763604
29773605 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
29783606 break;
29793607 }
29803608 }
3609
+
3610
+ cameraView.requestFocusInWindow();
29813611 refreshContents(true);
29823612 } else
29833613 if (source == editItem || source == editButton)
29843614 {
3615
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3616
+ {
3617
+ Object3D child = (Object3D)e.nextElement();
3618
+ child.pinned = true;
3619
+ }
3620
+
29853621 EditSelection(false);
29863622 } else
29873623 if (source == uneditButton)
....@@ -2991,10 +3627,11 @@
29913627 Object3D child = (Object3D)e.nextElement();
29923628 if(child.editWindow != null)
29933629 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3630
+ child.pinned = false;
29943631 child.CloseUI();
29953632 listUI.remove(child);
29963633
2997
- child.editWindow = null; // ???????????
3634
+ //child.editWindow = null; // ???????????
29983635 }
29993636 objEditor.ctrlPanel.FlushUI();
30003637 //objEditor.jTree.clearSelection();
....@@ -3007,6 +3644,7 @@
30073644 //copy.ClearUI();
30083645 for (Object3D obj : listUI)
30093646 {
3647
+ obj.pinned = false;
30103648 obj.CloseUI();
30113649 }
30123650 listUI.clear();
....@@ -3016,7 +3654,7 @@
30163654 {
30173655 assert(copy == group);
30183656
3019
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3657
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
30203658
30213659 for (Object3D obj : listUI)
30223660 {
....@@ -3065,6 +3703,9 @@
30653703 }
30663704
30673705 copy = group;
3706
+
3707
+ SetUndoStates();
3708
+
30683709 //Globals.theRenderer.object = group;
30693710 if(!useclient)
30703711 {
....@@ -3081,7 +3722,9 @@
30813722 sideView.object = group;
30823723 }
30833724
3084
-// fix "+" issue group.editWindow = this;
3725
+// fix "+" issue
3726
+ //group.editWindow = this;
3727
+ group.manipWindow = this;
30853728
30863729 /*
30873730 currentLayout = radio.layout;
....@@ -3089,13 +3732,35 @@
30893732 currentLayout = sevenButton;
30903733 */
30913734 radio.layout.doClick();
3735
+
3736
+ ClearUnpinned();
3737
+ //Grafreed.Assert(group != null);
3738
+ //Grafreed.Assert(group.selection != null);
3739
+ SetPinStates(group.selection == null || group.selection.size() > 0);
3740
+ if (group.selection == null || group.selection.size() == 1)
3741
+ EditSelection(false);
30923742 keepparent = group.parent;
30933743 // PARENT = NULL or not???
30943744 //group.parent = null; // ROOT
30953745 //group.attributes = -1;
30963746 ResetModel();
3747
+
3748
+ cameraView.requestFocusInWindow();
30973749 refreshContents(true);
3098
- }
3750
+ } else if (event.getSource() == editCameraItem)
3751
+ {
3752
+ cameraView.ProtectCamera();
3753
+ cameraView.repaint();
3754
+ return;
3755
+ } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton)
3756
+ {
3757
+ cameraView.RevertCamera();
3758
+ cameraView.repaint();
3759
+ return;
3760
+ // } else if (event.getSource() == textureButton)
3761
+ // {
3762
+ // return; // true;
3763
+ }
30993764 else
31003765 {
31013766 //return super.action(event, arg);
....@@ -3104,7 +3769,6 @@
31043769 }
31053770
31063771 boolean useclient = false;
3107
- cRadio radio;
31083772
31093773 void ToggleRoot()
31103774 {
....@@ -3343,7 +4007,8 @@
33434007
33444008 int size = obj.MemorySize();
33454009
3346
- System.err.println((size/1024) + " KB is the size of " + obj);
4010
+ //System.err.println((size/1024) + " KB is the size of " + obj);
4011
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
33474012 }
33484013 }
33494014 catch (Exception e)
....@@ -3424,6 +4089,13 @@
34244089 void GenNormals(boolean crease)
34254090 {
34264091 group.GenNormalsS(crease);
4092
+
4093
+ refreshContents();
4094
+ }
4095
+
4096
+ void GenNormalsMESH()
4097
+ {
4098
+ group.GenNormalsMeshS();
34274099
34284100 refreshContents();
34294101 }
....@@ -3659,7 +4331,7 @@
36594331
36604332 try
36614333 {
3662
- texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
4334
+ texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres);
36634335 }
36644336 catch (Exception e)
36654337 {
....@@ -4051,6 +4723,18 @@
40514723 refreshContents();
40524724 }
40534725
4726
+ void RewindLeaves(boolean hide)
4727
+ {
4728
+ group.selection.RewindLeaves(hide);
4729
+ refreshContents();
4730
+ }
4731
+
4732
+ void RandomLeaves(boolean hide)
4733
+ {
4734
+ group.selection.RandomLeaves(hide);
4735
+ refreshContents();
4736
+ }
4737
+
40544738 void SetTexRes(int tr)
40554739 {
40564740 group.selection.SetTexRes(tr);
....@@ -4122,28 +4806,25 @@
41224806 // }
41234807 // }
41244808
4125
- static boolean allparams = true;
4126
-
4127
- static Vector<Object3D> listUI = new Vector<Object3D>();
4128
-
41294809 void EditSelection(boolean newWindow)
41304810 {
4811
+ if (group.selection == null)
4812
+ {
4813
+ EditElement(group, newWindow); // ? new
4814
+ return;
4815
+ }
4816
+
41314817 // aConstraints.gridy = 0;
41324818 for (int i=0; i<group.selection.size(); i++)
41334819 {
41344820 //System.out.println("edit : " + objectPanel.indexOfTab("Material"));
41354821 //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false);
4136
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
4822
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
41374823
41384824 Object3D elem = (Object3D)group.selection.elementAt(i);
41394825 if(elem != group || !newWindow)
41404826 {
4141
- // if (!(elem instanceof Composite))
4142
- // newWindow = false;
4143
- listUI.add(elem);
4144
- elem.openEditWindow(this, newWindow); //, false);
4145
- System.out.println("edit : " + elem);
4146
- elem.editWindow.refreshContents(true); // ? new
4827
+ EditElement(elem, newWindow); // ? new
41474828 }
41484829 }
41494830 }
....@@ -4218,7 +4899,8 @@
42184899 //new Exception().printStackTrace();
42194900
42204901 freezemodel = true;
4221
-
4902
+ ClearUnpinned();
4903
+
42224904 /**/
42234905 //switch (event.id)
42244906 {
....@@ -4226,7 +4908,6 @@
42264908 //case 702: // Event.LIST_DESELECT
42274909 group.deselectAll();
42284910 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4229
- objEditor.ClearInfo(); // .GetMaterial());
42304911 if (tps != null)
42314912 {
42324913 for (int i=0; i < tps.length; i++)
....@@ -4235,10 +4916,8 @@
42354916
42364917 //if (child.parent != null)
42374918 //child.parent.addSelectee(child);
4919
+ objEditor.SetMaterial(child);
42384920 group.addSelectee(child);
4239
- objEditor.SetMaterial(child); // .GetMaterial());
4240
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4241
- System.err.println("info : " + child.GetPath());
42424921 }
42434922 }
42444923 // else
....@@ -4248,20 +4927,28 @@
42484927 // System.err.println("info : " + group.GetPath());
42494928 // }
42504929
4251
- objEditor.SetText(); // jan 2014
4252
-
4253
- if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4930
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
42544931 CameraPane.flash = true;
42554932
4256
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4933
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
42574934 // a camera
42584935 {
4259
- CameraPane.camerachangeframe = 0; // don't refuse it
4260
- Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4936
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace
4937
+ {
4938
+ CameraPane.camerachangeframe = 0; // don't refuse it
4939
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4940
+ }
42614941 // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
42624942 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
42634943 }
42644944
4945
+ if (tps != null && tps.length == 1)
4946
+ {
4947
+ EditSelection(false);
4948
+ }
4949
+
4950
+ SetPinStates(tps != null && tps.length > 0);
4951
+
42654952 refreshContents();
42664953 //return true;
42674954 }
....@@ -4270,6 +4957,35 @@
42704957
42714958 freezemodel = false;
42724959 }
4960
+
4961
+ void SetPinStates(boolean enabled)
4962
+ {
4963
+ editButton.setEnabled(enabled);
4964
+ uneditButton.setEnabled(enabled);
4965
+ unselectButton.setEnabled(enabled);
4966
+ flashSelectionButton.setEnabled(enabled);
4967
+ }
4968
+
4969
+ void refreshContents(boolean cp)
4970
+ {
4971
+ if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
4972
+ if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
4973
+ {
4974
+ objEditor.ClearInfo(); // .GetMaterial());
4975
+
4976
+ for (int i=0; i < group.selection.Size(); i++)
4977
+ {
4978
+ Object3D child = (Object3D) group.selection.get(i);
4979
+
4980
+ objEditor.AddInfo(child, this, true);
4981
+ System.err.println("info : " + child.GetPath());
4982
+ }
4983
+
4984
+ objEditor.SetText(); // jan 2014
4985
+ }
4986
+
4987
+ super.refreshContents(cp);
4988
+ }
42734989
42744990 void linkSomething(Object3D thing)
42754991 {
....@@ -4341,6 +5057,7 @@
43415057 {
43425058 if (group.selection.isEmpty())
43435059 return;
5060
+
43445061 Grafreed.clipboardIsTempGroup = false;
43455062 Composite tGroup = null;
43465063 if (group.selection.size() > 0) // 1)
....@@ -4351,6 +5068,8 @@
43515068
43525069 if (cut)
43535070 {
5071
+// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save.
5072
+// Save();
43545073 //int indices[] = jList.getSelectedIndices();
43555074 //for (int i = indices.length - 1; i >= 0; i--)
43565075 //jList.remove(indices[i]);
....@@ -4440,8 +5159,10 @@
44405159 }
44415160
44425161 }
5162
+
44435163 if (Grafreed.clipboardIsTempGroup)
44445164 Grafreed.clipboard = tGroup;
5165
+
44455166 if (cut)
44465167 {
44475168 ResetModel();
....@@ -4451,6 +5172,10 @@
44515172
44525173 void paste(boolean expand)
44535174 {
5175
+ if (Globals.REPLACEONMAKE)
5176
+ Save();
5177
+ boolean keep = Globals.REPLACEONMAKE;
5178
+ Globals.REPLACEONMAKE = false;
44545179 // if (GrafreeD.clipboard == null)
44555180 // return;
44565181 boolean first = true;
....@@ -4510,6 +5235,7 @@
45105235 Grafreed.clipboard.get(0).parent = keepparent;
45115236 }
45125237
5238
+ Globals.REPLACEONMAKE = keep;
45135239 ResetModel();
45145240 refreshContents();
45155241 }
....@@ -4645,6 +5371,10 @@
46455371
46465372 void group(Object3D csg, boolean grab)
46475373 {
5374
+ if (Globals.REPLACEONMAKE)
5375
+ Save();
5376
+ boolean keep = Globals.REPLACEONMAKE;
5377
+ Globals.REPLACEONMAKE = false;
46485378 if (//false) // why??
46495379 !group.selection.isEmpty())
46505380 {
....@@ -4758,10 +5488,15 @@
47585488 //node.add(csg);
47595489 //makeSomething(node);
47605490 makeSomething(csg);
5491
+ Globals.REPLACEONMAKE = keep;
47615492 }
47625493
47635494 void Ungroup(Object3D g)
47645495 {
5496
+ if (Globals.REPLACEONMAKE)
5497
+ Save();
5498
+ boolean keep = Globals.REPLACEONMAKE;
5499
+ Globals.REPLACEONMAKE = false;
47655500 if (g instanceof HiddenObject)
47665501 {
47675502 HiddenObject h = (HiddenObject) g;
....@@ -4778,6 +5513,7 @@
47785513 objEditor.makeSomething(g.get(i), false);
47795514 }
47805515 }
5516
+ Globals.REPLACEONMAKE = keep;
47815517 }
47825518
47835519 void ungroup()
....@@ -4973,21 +5709,6 @@
49735709 }
49745710 */
49755711
4976
- void ImportGFD()
4977
- {
4978
- FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
4979
- browser.show();
4980
- String filename = browser.getFile();
4981
- if (filename != null && filename.length() > 0)
4982
- {
4983
- String fullname = browser.getDirectory() + filename;
4984
-
4985
- //Object3D readobj =
4986
- objEditor.ReadGFD(fullname, objEditor);
4987
- //makeSomething(readobj);
4988
- }
4989
- }
4990
-
49915712 /*
49925713 public void Callback(Object obj)
49935714 {
....@@ -5011,23 +5732,6 @@
50115732 }
50125733 */
50135734
5014
- void ImportVRMLX3D()
5015
- {
5016
- if (Grafreed.standAlone)
5017
- {
5018
- /**/
5019
- FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
5020
- browser.show();
5021
- String filename = browser.getFile();
5022
- if (filename != null && filename.length() > 0)
5023
- {
5024
- String fullname = browser.getDirectory() + filename;
5025
- LoadVRMLX3D(fullname);
5026
- }
5027
- /**/
5028
- }
5029
- }
5030
-
50315735 String GetFile(String dialogName)
50325736 {
50335737 if (Grafreed.standAlone)
....@@ -5098,7 +5802,44 @@
50985802 cButton clearpanelButton;
50995803 cButton unselectButton;
51005804
5805
+ cButton restoreCameraButton;
5806
+
5807
+ cButton saveButton;
51015808 cButton oneStepButton;
5809
+
5810
+ cButton groupButton;
5811
+ cButton ungroupButton;
5812
+ cButton compositeButton;
5813
+ cButton switchButton;
5814
+ cButton loopButton;
5815
+ cButton textureButton;
5816
+
5817
+ cButton skybox1Button;
5818
+ cButton skybox2Button;
5819
+ cButton skybox3Button;
5820
+ cButton skybox4Button;
5821
+ cButton skybox5Button;
5822
+ cButton skybox6Button;
5823
+ cButton skybox7Button;
5824
+
5825
+ cButton skybox11Button;
5826
+ cButton skybox12Button;
5827
+ cButton skybox13Button;
5828
+ cButton skybox14Button;
5829
+ cButton skybox15Button;
5830
+ cButton skybox16Button;
5831
+ cButton skybox17Button;
5832
+
5833
+ cButton gridButton;
5834
+ cButton boxButton;
5835
+ cButton sphereButton;
5836
+ cButton coneButton;
5837
+ cButton torusButton;
5838
+ cButton superButton;
5839
+ cButton kleinButton;
5840
+ cButton particlesButton;
5841
+ cButton overlayButton;
5842
+ cButton lightButton;
51025843
51035844 cButton screenfitButton;
51045845 cButton screenfitpointButton;
....@@ -5111,14 +5852,6 @@
51115852
51125853 cButton setsupportButton;
51135854
5114
- cButton twoButton;
5115
- cButton sixButton;
5116
- cButton threeButton;
5117
- cButton sevenButton;
5118
- cButton fourButton; // full panel
5119
- cButton oneButton; // full XYZ
5120
- //cButton currentLayout;
5121
-
51225855 //
51235856 //Composite
51245857 Object3D // to do !!
....@@ -5128,9 +5861,11 @@
51285861 //JTree jTree;
51295862 private MenuItem lookAtItem;
51305863 private MenuItem lookFromItem;
5131
- private MenuItem switchItem;
5864
+ private MenuItem switchViewItem;
51325865 private MenuItem cutItem;
5133
- private MenuItem duplicateItem;
5866
+ private MenuItem undoItem;
5867
+ private MenuItem redoItem;
5868
+ private JMenuItem duplicateItem;
51345869 private MenuItem cloneItem;
51355870 private MenuItem cloneSupportItem;
51365871 private MenuItem overwriteGeoItem;
....@@ -5158,7 +5893,7 @@
51585893 private MenuItem pasteLinkItem;
51595894 private MenuItem pasteCloneItem;
51605895 private MenuItem pasteExpandItem;
5161
- private MenuItem clearItem;
5896
+ private MenuItem deleteItem;
51625897 private MenuItem clearAllItem;
51635898 private MenuItem genUVItem;
51645899 private MenuItem genNormalsMESHItem;
....@@ -5193,6 +5928,10 @@
51935928 private MenuItem showleavesItem;
51945929 private MenuItem markleavesItem;
51955930 private MenuItem unmarkleavesItem;
5931
+ private MenuItem rewindleavesItem;
5932
+ private MenuItem unrewindleavesItem;
5933
+ private MenuItem randomleavesItem;
5934
+ private MenuItem unrandomleavesItem;
51965935
51975936 private MenuItem flipVItem;
51985937 private MenuItem unflipVItem;
....@@ -5214,7 +5953,7 @@
52145953 private MenuItem frontItem;
52155954 private MenuItem cameraItem;
52165955 private MenuItem compositeItem;
5217
- private MenuItem randomItem;
5956
+ private MenuItem switchItem;
52185957 private MenuItem physicsItem;
52195958 private MenuItem frameselectorItem;
52205959 private MenuItem scriptNodeItem;
....@@ -5238,6 +5977,8 @@
52385977 private MenuItem attachBumpItem;
52395978 private MenuItem detachBumpItem;
52405979 private MenuItem pigmentBumpItem;
5980
+ private MenuItem embedTexturesItem;
5981
+ private MenuItem deEmbedTexturesItem;
52415982
52425983 private MenuItem particleItem;
52435984 private MenuItem ragdollItem;
....@@ -5276,11 +6017,6 @@
52766017 private MenuItem doubleItem;
52776018 private MenuItem tripleItem;
52786019
5279
- private MenuItem importGFDItem;
5280
- private MenuItem importVRMLX3DItem;
5281
- private MenuItem import3DSItem;
5282
- private MenuItem importOBJItem;
5283
-
52846020 private MenuItem computeAOItem;
52856021 private MenuItem recompileItem;
52866022 private MenuItem editScriptItem;
....@@ -5290,4 +6026,8 @@
52906026 private MenuItem analyzeItem;
52916027 private MenuItem dumpItem;
52926028 //boolean freezemodel = false;
6029
+
6030
+ Menu cameraMenu;
6031
+ MenuItem editCameraItem;
6032
+ MenuItem restoreCameraItem;
52936033 }