Normand Briere
2019-06-24 914255f70cf047897212839cbf3a6722703f4457
GroupEditor.java
....@@ -74,7 +74,7 @@
7474 this.copy = this.group = copy;
7575 //selectees = this.group.selectees;
7676
77
- SetupMenu2(objEditor);
77
+ SetupMenu2(this); //objEditor);
7878 SetupUI2(objEditor);
7979 objEditor.SetupUI(true);
8080 SetupViews(objEditor);
....@@ -148,27 +148,18 @@
148148
149149 //JTextField nameField;
150150
151
- void SetupMenu2(ObjEditor oe)
151
+ void SetupMenu2(GroupEditor oe)
152152 {
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
-
168153 Menu menu;
169154 oe.menuBar.add(menu = new Menu("Edit"));
170155 //editItem = menu.add(new MenuItem("Edit"));
171156 //editItem.addActionListener(this);
157
+
158
+// undoItem = menu.add(new MenuItem("Undo"));
159
+// undoItem.addActionListener(this);
160
+// redoItem = menu.add(new MenuItem("Redo"));
161
+// redoItem.addActionListener(this);
162
+// menu.add("-");
172163 duplicateItem = menu.add(new MenuItem("Duplicate"));
173164 duplicateItem.addActionListener(this);
174165 cloneItem = menu.add(new MenuItem("Clone"));
....@@ -185,7 +176,6 @@
185176 copyItem.addActionListener(this);
186177 pasteItem = menu.add(new MenuItem("Paste"));
187178 pasteItem.addActionListener(this);
188
- menu.add("-");
189179
190180 menu.add("-");
191181 pasteIntoItem = menu.add(new MenuItem("Paste into"));
....@@ -206,14 +196,97 @@
206196 clearAllItem = menu.add(new MenuItem("Clear All"));
207197 clearAllItem.addActionListener(this);
208198 }
199
+
200
+ menuBar.add(cameraMenu = new Menu("View"));
201
+ //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
202
+ //zBufferItem.addActionListener(this);
203
+ //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
204
+ //normalLensItem.addActionListener(this);
205
+ cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint"));
206
+ revertCameraItem.addActionListener(this);
207
+
208
+ cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
209
+ toggleFullScreenItem.addItemListener(this);
210
+ toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
211
+ cameraMenu.add("-");
212
+
213
+ cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
214
+ toggleTextureItem.addItemListener(this);
215
+ toggleTextureItem.setState(CameraPane.textureon);
216
+
217
+ cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
218
+ toggleSwitchItem.addItemListener(this);
219
+ toggleSwitchItem.setState(CameraPane.SWITCH);
220
+
221
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
222
+ toggleHandleItem.addItemListener(this);
223
+ toggleHandleItem.setState(CameraPane.HANDLES);
224
+
225
+ cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
226
+ togglePaintItem.addItemListener(this);
227
+ togglePaintItem.setState(CameraPane.PAINTMODE);
228
+
229
+ if (Globals.ADVANCED)
230
+ {
231
+ cameraMenu.add("-");
232
+ cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
233
+ toggleLiveItem.addItemListener(this);
234
+ toggleLiveItem.setState(Globals.isLIVE());
209235
236
+ cameraMenu.add(stepItem = new MenuItem("Step"));
237
+ stepItem.addActionListener(this);
238
+ // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
239
+ // toggleDLItem.addItemListener(this);
240
+ // toggleDLItem.setState(false);
241
+
242
+ cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
243
+ toggleRenderItem.addItemListener(this);
244
+ toggleRenderItem.setState(!CameraPane.frozen);
245
+
246
+ cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
247
+ toggleDebugItem.addItemListener(this);
248
+ toggleDebugItem.setState(Globals.DEBUG);
249
+
250
+ cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
251
+ toggleFrustumItem.addItemListener(this);
252
+ toggleFrustumItem.setState(CameraPane.FRUSTUM);
253
+
254
+ cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
255
+ toggleFootContactItem.addItemListener(this);
256
+ toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
257
+
258
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
259
+ toggleTimelineItem.addItemListener(this);
260
+ }
261
+
262
+// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
263
+// toggleRootItem.addItemListener(this);
264
+// toggleRootItem.setState(false);
265
+// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
266
+// animationItem.addItemListener(this);
267
+// animationItem.setState(CameraPane.ANIMATION);
268
+ cameraMenu.add("-");
269
+ cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint"));
270
+ editCameraItem.addActionListener(this);
271
+
272
+ if (Globals.ADVANCED)
273
+ {
274
+ oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
275
+ //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
276
+ //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
277
+ editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
278
+ oe.cameraMenu.add("-");
279
+ openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
280
+ openWindowItem.addActionListener(this);
281
+ editLeafItem.addActionListener(this);
282
+ lookAtItem.addActionListener(this);
283
+ //lookFromItem.addActinoListener(this);
284
+ //switchItem.addActionListener(this);
285
+ }
286
+
210287 oe.menuBar.add(menu = new Menu("Setting"));
211288 if (Globals.ADVANCED)
212289 {
213
- resetMeshItem = menu.add(new MenuItem("Reset All"));
214
- resetMeshItem.addActionListener(this);
215
- stepAllItem = menu.add(new MenuItem("Step All"));
216
- stepAllItem.addActionListener(this);
217290 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
218291 revertMeshItem.addActionListener(this);
219292 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
....@@ -295,11 +368,11 @@
295368 billboardItem.addActionListener(this);
296369 csgItem = menu.add(new MenuItem("CSG"));
297370 csgItem.addActionListener(this);
298
- shadowXItem = menu.add(new MenuItem("Shadow X"));
371
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
299372 shadowXItem.addActionListener(this);
300
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
373
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
301374 shadowYItem.addActionListener(this);
302
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
375
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
303376 shadowZItem.addActionListener(this);
304377 if (Globals.ADVANCED)
305378 {
....@@ -318,8 +391,12 @@
318391 resetTransformItem.addActionListener(this);
319392 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
320393 resetCentroidItem.addActionListener(this);
321
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
322
- transformgeometryItem.addActionListener(this);
394
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
395
+ resetCentroidXZItem.addActionListener(this);
396
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
397
+ transformGeometryItem.addActionListener(this);
398
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
399
+ transformChildrenItem.addActionListener(this);
323400
324401 oe.menuBar.add(menu = new Menu("Geometry"));
325402 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -368,6 +445,10 @@
368445 oe.menuBar.add(menu = new Menu("Attributes"));
369446 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
370447 clearMaterialsItem.addActionListener(this);
448
+ resetAllItem = menu.add(new MenuItem("Reset All"));
449
+ resetAllItem.addActionListener(this);
450
+ stepAllItem = menu.add(new MenuItem("Step All"));
451
+ stepAllItem.addActionListener(this);
371452 menu.add("-");
372453 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
373454 liveleavesItem.addActionListener(this);
....@@ -388,6 +469,14 @@
388469 markleavesItem.addActionListener(this);
389470 unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
390471 unmarkleavesItem.addActionListener(this);
472
+ rewindleavesItem = menu.add(new MenuItem("Rewind Leaves"));
473
+ rewindleavesItem.addActionListener(this);
474
+ unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves"));
475
+ unrewindleavesItem.addActionListener(this);
476
+ randomleavesItem = menu.add(new MenuItem("Random Leaves"));
477
+ randomleavesItem.addActionListener(this);
478
+ unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves"));
479
+ unrandomleavesItem.addActionListener(this);
391480 menu.add("-");
392481 flipVItem = menu.add(new MenuItem("Flip V"));
393482 flipVItem.addActionListener(this);
....@@ -422,41 +511,41 @@
422511 sortbysizeItem.addActionListener(this);
423512 sortbynameItem = menu.add(new MenuItem("Sort by name"));
424513 sortbynameItem.addActionListener(this);
514
+ menu.add("-");
515
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
516
+ shareGeometriesItem.addActionListener(this);
517
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
518
+ mergeGeometriesItem.addActionListener(this);
425519 if (Globals.ADVANCED)
426520 {
427
- menu.add("-");
521
+ // Pretty much the same as duplicate and clone.
428522 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
429523 extractGeometriesItem.addActionListener(this);
430524 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
431525 cloneGeometriesItem.addActionListener(this);
432
- shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
433
- shareGeometriesItem.addActionListener(this);
434
- mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
435
- mergeGeometriesItem.addActionListener(this);
436526 }
437527
438528 oe.menuBar.add(menu = new Menu("Insert"));
439529 buildCreateMenu(menu);
440530
441
- oe.menuBar.add(menu = new Menu("Include"));
442
- importOBJItem = menu.add(new MenuItem("OBJ file..."));
443
- importOBJItem.addActionListener(this);
444
- menu.add("-");
445
- import3DSItem = menu.add(new MenuItem("3DS file..."));
446
- import3DSItem.addActionListener(this);
447
- menu.add("-");
448
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file..."));
449
- importVRMLX3DItem.addActionListener(this);
450
- menu.add("-");
451
- importGFDItem = menu.add(new MenuItem("GrafreeD file..."));
452
- importGFDItem.addActionListener(this);
453
-
454531 oe.menuBar.add(menu = new Menu("Tools"));
455532 buildToolsMenu(menu);
456533 }
457534
458535 void SetupUI2(ObjEditor oe)
459536 {
537
+ // June 2019
538
+ if (oe == null)
539
+ {
540
+ //super.SetupUI2(this);
541
+ //return;
542
+ }
543
+
544
+ if (copy != group)
545
+ {
546
+ //super.SetupUI2(this);
547
+ }
548
+
460549 //new Exception().printStackTrace();
461550
462551 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -487,23 +576,47 @@
487576 */
488577 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
489578
490
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
491
- liveCB.setToolTipText("Enabled animation");
579
+ //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
580
+ //minButton.setToolTipText("Minimize window");
581
+ //minButton.addActionListener(this);
582
+
583
+ oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
584
+ maxButton.setToolTipText("Maximize window");
585
+ maxButton.addActionListener(this);
586
+
587
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
588
+ fullButton.setToolTipText("Full-screen window");
589
+ fullButton.addActionListener(this);
590
+
591
+ oe.toolbarPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
592
+ undoButton.setToolTipText("Undo changes");
593
+ undoButton.addActionListener(this);
594
+
595
+ oe.toolbarPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
596
+ redoButton.setToolTipText("Redo changes");
597
+ redoButton.addActionListener(this);
598
+
599
+ oe.toolbarPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
600
+ saveButton.setToolTipText("Save changes");
601
+ saveButton.addActionListener(this);
602
+
603
+ oe.toolbarPanel.add(liveCB = GetCheckBox("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
604
+ liveCB.setToolTipText("Enable animation");
492605 liveCB.addItemListener(this);
493606
494
- oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
495
- oneStepButton.setToolTipText("Animate one step forward");
496
- oneStepButton.addActionListener(this);
497
-
498
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
607
+ oe.toolbarPanel.add(fastCB = GetCheckBox("icons/runfast.png", CameraPane.FAST)); //, constraints);
499608 fastCB.setToolTipText("Fast mode");
500609 fastCB.addItemListener(this);
501610
502
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
611
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
612
+ oneStepButton.setToolTipText("Animate one step forward");
613
+ oneStepButton.addActionListener(this);
614
+
615
+ oe.toolbarPanel.add(trackCB = GetCheckBox("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
503616 trackCB.setToolTipText("Enable tracking");
504617 trackCB.addItemListener(this);
505618
506
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
619
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
507620 screenfitButton.setToolTipText("Screen fit");
508621 screenfitButton.addActionListener(this);
509622
....@@ -517,25 +630,25 @@
517630 snapobjectButton.setToolTipText("Snap Object");
518631 }
519632
520
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
521
- flashSelectionButton.setToolTipText("Show selection");
633
+ oe.toolbarPanel.add(flashSelectionButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
634
+ flashSelectionButton.setToolTipText("Highlight selection");
522635 flashSelectionButton.addActionListener(this);
523636
524637 oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
525638
526
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
639
+ oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
527640 twoButton.setToolTipText("Show center view only");
528641 twoButton.addActionListener(this);
529
- oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
642
+ oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
530643 fourButton.addActionListener(this);
531644 fourButton.setToolTipText("Show left panel only");
532
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
645
+ oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
533646 sixButton.setToolTipText("2-column layout left");
534647 sixButton.addActionListener(this);
535
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
648
+ oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
536649 threeButton.setToolTipText("2-column layout right");
537650 threeButton.addActionListener(this);
538
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
651
+ oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
539652 sevenButton.setToolTipText("3-column layout");
540653 sevenButton.addActionListener(this);
541654 //
....@@ -550,32 +663,30 @@
550663 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
551664 //clearButton.addActionListener(this);
552665
553
- cGridBag commandsPanel = new cGridBag();
554
-
555
- commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
666
+ editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
556667 editButton.setToolTipText("Edit selection");
557668 editButton.addActionListener(this);
558669
559
- commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
670
+ editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
560671 uneditButton.setToolTipText("Unedit selection");
561672 uneditButton.addActionListener(this);
562673
563
- commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
674
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
564675 allParamsButton.setToolTipText("Edit all params");
565676 allParamsButton.addActionListener(this);
566677
567
- commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
678
+ editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
568679 clearPanelButton.setToolTipText("Clear edit panel");
569680 clearPanelButton.addActionListener(this);
570681
571
- commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
682
+ editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
572683 unselectButton.setToolTipText("Unselect");
573684 unselectButton.addActionListener(this);
574685
575
- commandsPanel.preferredHeight = 1;
686
+ editCommandsPanel.preferredHeight = 1;
576687
577
- oe.treePanel.add(commandsPanel);
578
- oe.treePanel.Return();
688
+// oe.treePanel.add(commandsPanel);
689
+// oe.treePanel.Return();
579690
580691 // oe.aConstraints.gridx += 1;
581692 // oe.aConstraints.weighty = 0;
....@@ -651,7 +762,7 @@
651762 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
652763 zoomBoxCB.addItemListener(this);
653764
654
- if (Globals.ADVANCED)
765
+ if (true) // Globals.ADVANCED)
655766 {
656767 panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
657768 supportCB.setToolTipText("Enable rigging");
....@@ -697,11 +808,23 @@
697808 // debugCB.addItemListener(this);
698809
699810 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
811
+ oeilCB.setToolTipText("Move camera when tracking target");
700812 oeilCB.addItemListener(this);
701813
814
+ panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
815
+ shadowCB.setToolTipText("Compute shadows when live");
816
+ shadowCB.addItemListener(this);
817
+
818
+ panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints);
819
+ autosaveCB.setToolTipText("Auto-save on structure change");
820
+ autosaveCB.addItemListener(this);
821
+
822
+ if (Globals.ADVANCED)
823
+ {
702824 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
703825 lookAtCB.setToolTipText("Look-at target");
704826 lookAtCB.addItemListener(this);
827
+ }
705828
706829 }
707830
....@@ -716,6 +839,14 @@
716839 void EditObject(Object3D obj)
717840 {
718841 cRadio radioButton = new cRadio(obj.name);
842
+
843
+ // Patch to avoid bug with transparency.
844
+ radioButton.hadMaterial = obj.material != null;
845
+ if (!radioButton.hadMaterial)
846
+ {
847
+ obj.material = new cMaterial();
848
+ }
849
+
719850 radioButton.SetObject(obj);
720851 radioButton.layout = sevenButton;
721852 radioButton.SetCamera(cameraView.renderCamera, false);
....@@ -724,8 +855,11 @@
724855 buttonGroup.add(radioButton);
725856 radioButton.doClick();
726857 }
858
+
727859 void SetupViews(ObjEditor oe)
728860 {
861
+ theFrame = this;
862
+
729863 oe.SetupViews();
730864
731865 System.out.println("SetupViews");
....@@ -734,23 +868,26 @@
734868 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
735869 }
736870
737
- JCheckBox liveCB;
738
- JCheckBox supportCB;
739
- JCheckBox localCB;
740
- JCheckBox crowdCB;
741
- JCheckBox smoothCB;
742
- JCheckBox fastCB;
743
- JCheckBox slowCB;
744
- JCheckBox boxCB;
745
- JCheckBox zoomBoxCB;
746
- JCheckBox trackCB;
747
- JCheckBox smoothfocusCB;
871
+ cCheckBox liveCB;
872
+ cCheckBox supportCB;
873
+ cCheckBox localCB;
874
+ cCheckBox crowdCB;
875
+ cCheckBox smoothCB;
876
+ cCheckBox fastCB;
877
+ cCheckBox slowCB;
878
+ cCheckBox boxCB;
879
+ cCheckBox zoomBoxCB;
880
+ cCheckBox trackCB;
881
+ cCheckBox smoothfocusCB;
748882 // JCheckBox speakerMocapCB;
749
- JCheckBox speakerCameraCB;
750
- JCheckBox speakerFocusCB;
751
- JCheckBox debugCB;
752
- JCheckBox oeilCB;
753
- JCheckBox lookAtCB;
883
+ cCheckBox speakerCameraCB;
884
+ cCheckBox speakerFocusCB;
885
+ cCheckBox debugCB;
886
+
887
+ cCheckBox oeilCB;
888
+ cCheckBox shadowCB;
889
+ cCheckBox autosaveCB;
890
+ cCheckBox lookAtCB;
754891
755892 // static int COLOR = 1;
756893 // static int MATERIAL = 2;
....@@ -758,9 +895,9 @@
758895
759896 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
760897
761
- JCheckBox colorCB;
762
- JCheckBox materialCB;
763
- JCheckBox textureCB;
898
+ cCheckBox colorCB;
899
+ cCheckBox materialCB;
900
+ cCheckBox textureCB;
764901
765902 public void itemStateChanged(ItemEvent e)
766903 {
....@@ -788,6 +925,7 @@
788925 } else if(e.getSource() == liveCB)
789926 {
790927 cameraView.ToggleLive();
928
+ refreshContents(false);
791929 }
792930 else if(e.getSource() == supportCB)
793931 {
....@@ -851,6 +989,14 @@
851989 else if(e.getSource() == oeilCB)
852990 {
853991 cameraView.ToggleOeil();
992
+ }
993
+ else if(e.getSource() == shadowCB)
994
+ {
995
+ Globals.COMPUTESHADOWWHENLIVE ^= true;
996
+ }
997
+ else if(e.getSource() == autosaveCB)
998
+ {
999
+ Globals.SAVEONMAKE ^= true;
8541000 }
8551001 else if(e.getSource() == lookAtCB)
8561002 {
....@@ -1195,7 +1341,7 @@
11951341 memoryItem.addActionListener(this);
11961342 menu.add(analyzeItem = new MenuItem("Analyze"));
11971343 analyzeItem.addActionListener(this);
1198
- menu.add(dumpItem = new MenuItem("Dump"));
1344
+ menu.add(dumpItem = new MenuItem("Print"));
11991345 dumpItem.addActionListener(this);
12001346 // menu.add(pathItem = new MenuItem("From-to path"));
12011347 // pathItem.addActionListener(this);
....@@ -1336,6 +1482,7 @@
13361482 shadow.material = new cMaterial(obj.material);
13371483 shadow.material.diffuse = 0.0001f;
13381484 shadow.material.specular = 0.0001f;
1485
+ //shadow.projectedVertices[1].x = 300;
13391486
13401487 makeSomething(shadow);
13411488 }
....@@ -1849,31 +1996,6 @@
18491996 csg.addChild(child);
18501997 child.addChild(csg);
18511998 } else
1852
-
1853
- if (source == importGFDItem)
1854
- {
1855
- ImportGFD();
1856
- } else
1857
- if (source == importVRMLX3DItem)
1858
- {
1859
- ImportVRMLX3D();
1860
- } else
1861
- if (source == import3DSItem)
1862
- {
1863
- objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
1864
- } else
1865
- if (source == importOBJItem)
1866
- {
1867
- //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1868
- FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD);
1869
- browser.setVisible(true);
1870
- String filename = browser.getFile();
1871
- if (filename != null && filename.length() > 0)
1872
- {
1873
- String fullname = browser.getDirectory() + filename;
1874
- makeSomething(ReadOBJ(fullname), true);
1875
- }
1876
- } else
18771999 if (source == computeAOItem)
18782000 {
18792001 Globals.drawMode = CameraPane.OCCLUSION;
....@@ -1910,6 +2032,30 @@
19102032 if (source == dumpItem)
19112033 {
19122034 DumpObject();
2035
+ } else
2036
+ if (source == minButton)
2037
+ {
2038
+ Minimize();
2039
+ } else
2040
+ if (source == maxButton)
2041
+ {
2042
+ Maximize();
2043
+ } else
2044
+ if (source == fullButton)
2045
+ {
2046
+ ToggleFullScreen();
2047
+ } else
2048
+ if (source == undoButton)
2049
+ {
2050
+ Undo();
2051
+ } else
2052
+ if (source == redoButton)
2053
+ {
2054
+ Redo();
2055
+ } else
2056
+ if (source == saveButton)
2057
+ {
2058
+ Save();
19132059 } else
19142060 if (source == oneStepButton)
19152061 {
....@@ -1964,6 +2110,14 @@
19642110 if (source == cutItem || source == clearButton)
19652111 {
19662112 loadClipboard(true);
2113
+ } else
2114
+ if (source == undoItem)
2115
+ {
2116
+ Undo();
2117
+ } else
2118
+ if (source == redoItem)
2119
+ {
2120
+ Redo();
19672121 } else
19682122 if (source == duplicateItem)
19692123 {
....@@ -2276,7 +2430,7 @@
22762430 {
22772431 RevertMeshes();
22782432 } else
2279
- if (source == resetMeshItem)
2433
+ if (source == resetAllItem)
22802434 {
22812435 ResetAll();
22822436 } else
....@@ -2464,7 +2618,7 @@
24642618 } else
24652619 if (source == genNormalsMESHItem)
24662620 {
2467
- GenNormals(true); // TODO
2621
+ GenNormalsMESH();
24682622 } else
24692623 if (source == genNormalsORGANItem)
24702624 {
....@@ -2529,6 +2683,22 @@
25292683 if (source == unmarkleavesItem)
25302684 {
25312685 MarkLeaves(false);
2686
+ } else
2687
+ if (source == rewindleavesItem)
2688
+ {
2689
+ RewindLeaves(true);
2690
+ } else
2691
+ if (source == unrewindleavesItem)
2692
+ {
2693
+ RewindLeaves(false);
2694
+ } else
2695
+ if (source == randomleavesItem)
2696
+ {
2697
+ RandomLeaves(true);
2698
+ } else
2699
+ if (source == unrandomleavesItem)
2700
+ {
2701
+ RandomLeaves(false);
25322702 } else
25332703 if (source == flipVItem)
25342704 {
....@@ -2614,9 +2784,13 @@
26142784 {
26152785 SmoothMesh();
26162786 } else
2617
- if (source == transformgeometryItem)
2787
+ if (source == transformGeometryItem)
26182788 {
26192789 TransformGeometry();
2790
+ } else
2791
+ if (source == transformChildrenItem)
2792
+ {
2793
+ TransformChildren();
26202794 } else
26212795 if (source == resetTransformItem)
26222796 {
....@@ -2624,7 +2798,11 @@
26242798 } else
26252799 if (source == resetCentroidItem)
26262800 {
2627
- ResetCentroid();
2801
+ ResetCentroid(true);
2802
+ } else
2803
+ if (source == resetCentroidXZItem)
2804
+ {
2805
+ ResetCentroid(false);
26282806 } else
26292807 if (source == resetParentItem)
26302808 {
....@@ -2788,6 +2966,24 @@
27882966 bigThree.ClearUI();
27892967 bigThree.add(centralPanel);
27902968 bigThree.FlushUI();
2969
+
2970
+ cameraView.requestFocusInWindow();
2971
+
2972
+// refreshContents(true);
2973
+//
2974
+// try
2975
+// {
2976
+// java.awt.Robot bot = new java.awt.Robot();
2977
+// int mask = InputEvent.BUTTON1_MASK;
2978
+// bot.mouseMove(100, 100);
2979
+// bot.mousePress(mask);
2980
+// bot.mouseRelease(mask);
2981
+// }
2982
+// catch (Exception e)
2983
+// {
2984
+//
2985
+// }
2986
+
27912987 } else
27922988 if (source == threeButton)
27932989 {
....@@ -2824,6 +3020,8 @@
28243020 bigThree.add(centralPanel);
28253021 bigThree.add(XYZPanel);
28263022 bigThree.FlushUI();
3023
+
3024
+ cameraView.requestFocusInWindow();
28273025 } else
28283026 if (source == fourButton)
28293027 {
....@@ -2859,6 +3057,8 @@
28593057 bigThree.ClearUI();
28603058 bigThree.add(scenePanel);
28613059 bigThree.FlushUI();
3060
+
3061
+ cameraView.requestFocusInWindow();
28623062 } else
28633063 if (source == sixButton)
28643064 {
....@@ -2895,6 +3095,8 @@
28953095 bigThree.add(scenePanel);
28963096 bigThree.add(centralPanel);
28973097 bigThree.FlushUI();
3098
+
3099
+ cameraView.requestFocusInWindow();
28983100 } else
28993101 if (source == sevenButton)
29003102 {
....@@ -2932,6 +3134,8 @@
29323134 bigThree.add(centralPanel);
29333135 bigThree.add(XYZPanel);
29343136 bigThree.FlushUI();
3137
+
3138
+ cameraView.requestFocusInWindow();
29353139 } else
29363140 if (source == rootButton)
29373141 {
....@@ -2943,6 +3147,7 @@
29433147 EditObject(obj);
29443148 }
29453149
3150
+ cameraView.requestFocusInWindow();
29463151 refreshContents(true);
29473152 } else
29483153 if (source == closeButton)
....@@ -2952,18 +3157,27 @@
29523157 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
29533158 {
29543159 ab = (cRadio)e.nextElement();
2955
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3160
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
29563161 {
3162
+ // Patch to avoid bug with transparency.
3163
+ if (!ab.hadMaterial)
3164
+ {
3165
+ ab.object.material = null;
3166
+ }
3167
+
29573168 buttonGroup.remove(ab);
29583169 radioPanel.remove(ab);
29593170
2960
- ab.GetObject().editWindow = null;
3171
+ //ab.GetObject().editWindow = null;
3172
+ ab.GetObject().manipWindow = null;
29613173 // ab.GetObject().objectUI = null; // ?????????
29623174
29633175 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
29643176 break;
29653177 }
29663178 }
3179
+
3180
+ cameraView.requestFocusInWindow();
29673181 refreshContents(true);
29683182 } else
29693183 if (source == editItem || source == editButton)
....@@ -2980,7 +3194,7 @@
29803194 child.CloseUI();
29813195 listUI.remove(child);
29823196
2983
- child.editWindow = null; // ???????????
3197
+ //child.editWindow = null; // ???????????
29843198 }
29853199 objEditor.ctrlPanel.FlushUI();
29863200 //objEditor.jTree.clearSelection();
....@@ -3066,7 +3280,11 @@
30663280 frontView.object = group;
30673281 sideView.object = group;
30683282 }
3069
- group.editWindow = this;
3283
+
3284
+// fix "+" issue
3285
+ //group.editWindow = this;
3286
+ group.manipWindow = this;
3287
+
30703288 /*
30713289 currentLayout = radio.layout;
30723290 if (currentLayout == null)
....@@ -3078,8 +3296,23 @@
30783296 //group.parent = null; // ROOT
30793297 //group.attributes = -1;
30803298 ResetModel();
3299
+
3300
+ cameraView.requestFocusInWindow();
30813301 refreshContents(true);
3082
- }
3302
+ } else if (event.getSource() == editCameraItem)
3303
+ {
3304
+ cameraView.ProtectCamera();
3305
+ cameraView.repaint();
3306
+ return;
3307
+ } else if (event.getSource() == revertCameraItem)
3308
+ {
3309
+ cameraView.RevertCamera();
3310
+ cameraView.repaint();
3311
+ return;
3312
+ // } else if (event.getSource() == textureButton)
3313
+ // {
3314
+ // return; // true;
3315
+ }
30833316 else
30843317 {
30853318 //return super.action(event, arg);
....@@ -3088,7 +3321,6 @@
30883321 }
30893322
30903323 boolean useclient = false;
3091
- cRadio radio;
30923324
30933325 void ToggleRoot()
30943326 {
....@@ -3140,6 +3372,28 @@
31403372 refreshContents();
31413373 }
31423374
3375
+ void TransformChildren()
3376
+ {
3377
+ Object3D obj;
3378
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3379
+ {
3380
+ obj = (Object3D)e.nextElement();
3381
+ obj.KeepTextureMatrices();
3382
+ obj.TransformChildren();
3383
+ obj.RestoreTextureMatrices();
3384
+
3385
+// if (obj.parent == null)
3386
+// {
3387
+// System.out.println("NULL PARENT!");
3388
+// new Exception().printStackTrace();
3389
+// }
3390
+// else
3391
+// TouchTransform(obj);
3392
+// //obj.parent.Touch();
3393
+ }
3394
+
3395
+ refreshContents();
3396
+ }
31433397
31443398 void ResetTransform()
31453399 {
....@@ -3252,7 +3506,7 @@
32523506 refreshContents();
32533507 }
32543508
3255
- void ResetCentroid()
3509
+ void ResetCentroid(boolean full)
32563510 {
32573511 Object3D obj;
32583512 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3267,12 +3521,16 @@
32673521 LA.matIdentity(Object3D.mat);
32683522 obj.getBounds(minima, maxima, false);
32693523 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3270
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3524
+ if (full)
3525
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
32713526 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
32723527 obj.TransformMesh(Object3D.mat);
3528
+
32733529 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3274
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3530
+ if (full)
3531
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
32753532 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3533
+
32763534 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
32773535 //Object3D.mat[3][0] = -Object3D.mat[3][0];
32783536 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3301,7 +3559,8 @@
33013559
33023560 int size = obj.MemorySize();
33033561
3304
- System.err.println((size/1024) + " KB is the size of " + obj);
3562
+ //System.err.println((size/1024) + " KB is the size of " + obj);
3563
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
33053564 }
33063565 }
33073566 catch (Exception e)
....@@ -3382,6 +3641,13 @@
33823641 void GenNormals(boolean crease)
33833642 {
33843643 group.GenNormalsS(crease);
3644
+
3645
+ refreshContents();
3646
+ }
3647
+
3648
+ void GenNormalsMESH()
3649
+ {
3650
+ group.GenNormalsMeshS();
33853651
33863652 refreshContents();
33873653 }
....@@ -3613,7 +3879,16 @@
36133879 String pigment = Object3D.GetPigment(tex);
36143880 //String bump = Object3D.GetBump(tex);
36153881
3616
- com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3882
+ com.sun.opengl.util.texture.TextureData texturedata = null;
3883
+
3884
+ try
3885
+ {
3886
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3887
+ }
3888
+ catch (Exception e)
3889
+ {
3890
+ System.err.println("FAIL: " + node);
3891
+ }
36173892
36183893 double s = v.s;
36193894
....@@ -4000,6 +4275,18 @@
40004275 refreshContents();
40014276 }
40024277
4278
+ void RewindLeaves(boolean hide)
4279
+ {
4280
+ group.selection.RewindLeaves(hide);
4281
+ refreshContents();
4282
+ }
4283
+
4284
+ void RandomLeaves(boolean hide)
4285
+ {
4286
+ group.selection.RandomLeaves(hide);
4287
+ refreshContents();
4288
+ }
4289
+
40034290 void SetTexRes(int tr)
40044291 {
40054292 group.selection.SetTexRes(tr);
....@@ -4085,7 +4372,7 @@
40854372 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
40864373
40874374 Object3D elem = (Object3D)group.selection.elementAt(i);
4088
- if(elem != group)
4375
+ if(elem != group || !newWindow)
40894376 {
40904377 // if (!(elem instanceof Composite))
40914378 // newWindow = false;
....@@ -4175,7 +4462,6 @@
41754462 //case 702: // Event.LIST_DESELECT
41764463 group.deselectAll();
41774464 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4178
- objEditor.ClearInfo(); // .GetMaterial());
41794465 if (tps != null)
41804466 {
41814467 for (int i=0; i < tps.length; i++)
....@@ -4184,10 +4470,8 @@
41844470
41854471 //if (child.parent != null)
41864472 //child.parent.addSelectee(child);
4473
+ objEditor.SetMaterial(child);
41874474 group.addSelectee(child);
4188
- objEditor.SetMaterial(child); // .GetMaterial());
4189
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4190
- System.err.println("info : " + child.GetPath());
41914475 }
41924476 }
41934477 // else
....@@ -4197,16 +4481,17 @@
41974481 // System.err.println("info : " + group.GetPath());
41984482 // }
41994483
4200
- objEditor.SetText(); // jan 2014
4201
-
4202
- if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4484
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
42034485 CameraPane.flash = true;
42044486
4205
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4487
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
42064488 // a camera
42074489 {
4208
- CameraPane.camerachangeframe = 0; // don't refuse it
4209
- Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4490
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
4491
+ {
4492
+ CameraPane.camerachangeframe = 0; // don't refuse it
4493
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4494
+ }
42104495 // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
42114496 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
42124497 }
....@@ -4219,6 +4504,26 @@
42194504
42204505 freezemodel = false;
42214506 }
4507
+
4508
+ void refreshContents(boolean cp)
4509
+ {
4510
+ if (!Globals.MOUSEDRAGGED)
4511
+ {
4512
+ objEditor.ClearInfo(); // .GetMaterial());
4513
+
4514
+ for (int i=0; i < group.selection.Size(); i++)
4515
+ {
4516
+ Object3D child = (Object3D) group.selection.get(i);
4517
+
4518
+ objEditor.AddInfo(child, this, true);
4519
+ System.err.println("info : " + child.GetPath());
4520
+ }
4521
+
4522
+ objEditor.SetText(); // jan 2014
4523
+ }
4524
+
4525
+ super.refreshContents(cp);
4526
+ }
42224527
42234528 void linkSomething(Object3D thing)
42244529 {
....@@ -4290,6 +4595,7 @@
42904595 {
42914596 if (group.selection.isEmpty())
42924597 return;
4598
+
42934599 Grafreed.clipboardIsTempGroup = false;
42944600 Composite tGroup = null;
42954601 if (group.selection.size() > 0) // 1)
....@@ -4300,6 +4606,8 @@
43004606
43014607 if (cut)
43024608 {
4609
+ if (Globals.SAVEONMAKE)
4610
+ Save();
43034611 //int indices[] = jList.getSelectedIndices();
43044612 //for (int i = indices.length - 1; i >= 0; i--)
43054613 //jList.remove(indices[i]);
....@@ -4389,8 +4697,10 @@
43894697 }
43904698
43914699 }
4700
+
43924701 if (Grafreed.clipboardIsTempGroup)
43934702 Grafreed.clipboard = tGroup;
4703
+
43944704 if (cut)
43954705 {
43964706 ResetModel();
....@@ -4922,21 +5232,6 @@
49225232 }
49235233 */
49245234
4925
- void ImportGFD()
4926
- {
4927
- FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
4928
- browser.show();
4929
- String filename = browser.getFile();
4930
- if (filename != null && filename.length() > 0)
4931
- {
4932
- String fullname = browser.getDirectory() + filename;
4933
-
4934
- //Object3D readobj =
4935
- objEditor.ReadGFD(fullname, objEditor);
4936
- //makeSomething(readobj);
4937
- }
4938
- }
4939
-
49405235 /*
49415236 public void Callback(Object obj)
49425237 {
....@@ -4960,23 +5255,6 @@
49605255 }
49615256 */
49625257
4963
- void ImportVRMLX3D()
4964
- {
4965
- if (Grafreed.standAlone)
4966
- {
4967
- /**/
4968
- FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
4969
- browser.show();
4970
- String filename = browser.getFile();
4971
- if (filename != null && filename.length() > 0)
4972
- {
4973
- String fullname = browser.getDirectory() + filename;
4974
- LoadVRMLX3D(fullname);
4975
- }
4976
- /**/
4977
- }
4978
- }
4979
-
49805258 String GetFile(String dialogName)
49815259 {
49825260 if (Grafreed.standAlone)
....@@ -5047,6 +5325,12 @@
50475325 cButton clearpanelButton;
50485326 cButton unselectButton;
50495327
5328
+ cButton minButton;
5329
+ cButton maxButton;
5330
+ cButton fullButton;
5331
+ cButton undoButton;
5332
+ cButton redoButton;
5333
+ cButton saveButton;
50505334 cButton oneStepButton;
50515335
50525336 cButton screenfitButton;
....@@ -5060,14 +5344,6 @@
50605344
50615345 cButton setsupportButton;
50625346
5063
- cButton twoButton;
5064
- cButton sixButton;
5065
- cButton threeButton;
5066
- cButton sevenButton;
5067
- cButton fourButton; // full panel
5068
- cButton oneButton; // full XYZ
5069
- //cButton currentLayout;
5070
-
50715347 //
50725348 //Composite
50735349 Object3D // to do !!
....@@ -5079,6 +5355,8 @@
50795355 private MenuItem lookFromItem;
50805356 private MenuItem switchItem;
50815357 private MenuItem cutItem;
5358
+ private MenuItem undoItem;
5359
+ private MenuItem redoItem;
50825360 private MenuItem duplicateItem;
50835361 private MenuItem cloneItem;
50845362 private MenuItem cloneSupportItem;
....@@ -5092,7 +5370,7 @@
50925370 private MenuItem linkverticesItem;
50935371 private MenuItem relinkverticesItem;
50945372 private MenuItem setMasterItem;
5095
- private MenuItem resetMeshItem;
5373
+ private MenuItem resetAllItem;
50965374 private MenuItem stepAllItem;
50975375 private MenuItem revertMeshItem;
50985376 private MenuItem poseMeshItem;
....@@ -5142,6 +5420,10 @@
51425420 private MenuItem showleavesItem;
51435421 private MenuItem markleavesItem;
51445422 private MenuItem unmarkleavesItem;
5423
+ private MenuItem rewindleavesItem;
5424
+ private MenuItem unrewindleavesItem;
5425
+ private MenuItem randomleavesItem;
5426
+ private MenuItem unrandomleavesItem;
51455427
51465428 private MenuItem flipVItem;
51475429 private MenuItem unflipVItem;
....@@ -5153,8 +5435,10 @@
51535435 private MenuItem panoTexturesItem;
51545436
51555437 private MenuItem resetCentroidItem;
5156
- private MenuItem transformgeometryItem;
5438
+ private MenuItem resetCentroidXZItem;
51575439 private MenuItem resetTransformItem;
5440
+ private MenuItem transformGeometryItem;
5441
+ private MenuItem transformChildrenItem;
51585442 private MenuItem hideItem;
51595443 private MenuItem grabItem;
51605444 private MenuItem backItem;
....@@ -5223,11 +5507,6 @@
52235507 private MenuItem doubleItem;
52245508 private MenuItem tripleItem;
52255509
5226
- private MenuItem importGFDItem;
5227
- private MenuItem importVRMLX3DItem;
5228
- private MenuItem import3DSItem;
5229
- private MenuItem importOBJItem;
5230
-
52315510 private MenuItem computeAOItem;
52325511 private MenuItem recompileItem;
52335512 private MenuItem editScriptItem;
....@@ -5237,4 +5516,8 @@
52375516 private MenuItem analyzeItem;
52385517 private MenuItem dumpItem;
52395518 //boolean freezemodel = false;
5519
+
5520
+ Menu cameraMenu;
5521
+ MenuItem editCameraItem;
5522
+ MenuItem revertCameraItem;
52405523 }