Normand Briere
2019-06-24 47cd0f0a3870d843cb758535316060d30f15c811
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);
....@@ -98,14 +98,14 @@
9898
9999 void CloneClipboard(boolean supports)
100100 {
101
- assert(GrafreeD.clipboard.parent == null);
102
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
103
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
104
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
105
- makeSomething(CloneObject(GrafreeD.clipboard.get(0), false));
101
+ assert(Grafreed.clipboard.parent == null);
102
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
103
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
104
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
105
+ makeSomething(CloneObject(Grafreed.clipboard.get(0), false));
106106 else
107
- makeSomething(CloneObject(GrafreeD.clipboard, false));
108
- GrafreeD.clipboard.get(0).parent = keepparent;
107
+ makeSomething(CloneObject(Grafreed.clipboard, false));
108
+ Grafreed.clipboard.get(0).parent = keepparent;
109109 }
110110
111111 static Object3D CloneObject(Object3D obj, boolean supports)
....@@ -119,7 +119,7 @@
119119 // obj.support = null;
120120 if (!supports)
121121 obj.SaveSupports();
122
- Object3D clone = (Object3D)GrafreeD.clone(obj);
122
+ Object3D clone = (Object3D)Grafreed.clone(obj);
123123 obj.parent = parent;
124124 // obj.support = support;
125125 // clone.support = support; // aout 2013
....@@ -148,28 +148,21 @@
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
-
153
+ oe.jTree = new cTree();
154
+
168155 Menu menu;
169156 oe.menuBar.add(menu = new Menu("Edit"));
170157 //editItem = menu.add(new MenuItem("Edit"));
171158 //editItem.addActionListener(this);
172
- duplicateItem = menu.add(new MenuItem("Duplicate"));
159
+
160
+// undoItem = menu.add(new MenuItem("Undo"));
161
+// undoItem.addActionListener(this);
162
+// redoItem = menu.add(new MenuItem("Redo"));
163
+// redoItem.addActionListener(this);
164
+// menu.add("-");
165
+ duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate"));
173166 duplicateItem.addActionListener(this);
174167 cloneItem = menu.add(new MenuItem("Clone"));
175168 cloneItem.addActionListener(this);
....@@ -185,7 +178,6 @@
185178 copyItem.addActionListener(this);
186179 pasteItem = menu.add(new MenuItem("Paste"));
187180 pasteItem.addActionListener(this);
188
- menu.add("-");
189181
190182 menu.add("-");
191183 pasteIntoItem = menu.add(new MenuItem("Paste into"));
....@@ -206,14 +198,97 @@
206198 clearAllItem = menu.add(new MenuItem("Clear All"));
207199 clearAllItem.addActionListener(this);
208200 }
201
+
202
+ menuBar.add(cameraMenu = new Menu("View"));
203
+ //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
204
+ //zBufferItem.addActionListener(this);
205
+ //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
206
+ //normalLensItem.addActionListener(this);
207
+ cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint"));
208
+ revertCameraItem.addActionListener(this);
209
+
210
+ cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
211
+ toggleFullScreenItem.addItemListener(this);
212
+ toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
213
+ cameraMenu.add("-");
214
+
215
+ cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
216
+ toggleTextureItem.addItemListener(this);
217
+ toggleTextureItem.setState(CameraPane.textureon);
218
+
219
+ cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
220
+ toggleSwitchItem.addItemListener(this);
221
+ toggleSwitchItem.setState(CameraPane.SWITCH);
222
+
223
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
224
+ toggleHandleItem.addItemListener(this);
225
+ toggleHandleItem.setState(CameraPane.HANDLES);
226
+
227
+ cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
228
+ togglePaintItem.addItemListener(this);
229
+ togglePaintItem.setState(CameraPane.PAINTMODE);
230
+
231
+ if (Globals.ADVANCED)
232
+ {
233
+ cameraMenu.add("-");
234
+ cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
235
+ toggleLiveItem.addItemListener(this);
236
+ toggleLiveItem.setState(Globals.isLIVE());
209237
238
+ cameraMenu.add(stepItem = new MenuItem("Step"));
239
+ stepItem.addActionListener(this);
240
+ // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
241
+ // toggleDLItem.addItemListener(this);
242
+ // toggleDLItem.setState(false);
243
+
244
+ cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
245
+ toggleRenderItem.addItemListener(this);
246
+ toggleRenderItem.setState(!CameraPane.frozen);
247
+
248
+ cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
249
+ toggleDebugItem.addItemListener(this);
250
+ toggleDebugItem.setState(Globals.DEBUG);
251
+
252
+ cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
253
+ toggleFrustumItem.addItemListener(this);
254
+ toggleFrustumItem.setState(CameraPane.FRUSTUM);
255
+
256
+ cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
257
+ toggleFootContactItem.addItemListener(this);
258
+ toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
259
+
260
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
261
+ toggleTimelineItem.addItemListener(this);
262
+ }
263
+
264
+// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
265
+// toggleRootItem.addItemListener(this);
266
+// toggleRootItem.setState(false);
267
+// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
268
+// animationItem.addItemListener(this);
269
+// animationItem.setState(CameraPane.ANIMATION);
270
+ cameraMenu.add("-");
271
+ cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint"));
272
+ editCameraItem.addActionListener(this);
273
+
274
+ if (Globals.ADVANCED)
275
+ {
276
+ oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
277
+ //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
278
+ //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
279
+ editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
280
+ oe.cameraMenu.add("-");
281
+ openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
282
+ openWindowItem.addActionListener(this);
283
+ editLeafItem.addActionListener(this);
284
+ lookAtItem.addActionListener(this);
285
+ //lookFromItem.addActinoListener(this);
286
+ //switchItem.addActionListener(this);
287
+ }
288
+
210289 oe.menuBar.add(menu = new Menu("Setting"));
211290 if (Globals.ADVANCED)
212291 {
213
- resetMeshItem = menu.add(new MenuItem("Reset All"));
214
- resetMeshItem.addActionListener(this);
215
- stepAllItem = menu.add(new MenuItem("Step All"));
216
- stepAllItem.addActionListener(this);
217292 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
218293 revertMeshItem.addActionListener(this);
219294 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
....@@ -261,13 +336,21 @@
261336 frontItem.addActionListener(this);
262337 compositeItem = menu.add(new MenuItem("Composite"));
263338 compositeItem.addActionListener(this);
339
+
340
+ if (Globals.ADVANCED)
341
+ {
264342 hideItem = menu.add(new MenuItem("Hidden Group"));
265343 hideItem.addActionListener(this);
344
+ }
266345 ungroupItem = menu.add(new MenuItem("Ungroup"));
267346 ungroupItem.addActionListener(this);
347
+
268348 menu.add("-");
349
+
269350 randomItem = menu.add(new MenuItem("Switch node"));
270351 randomItem.addActionListener(this);
352
+ if (Globals.ADVANCED)
353
+ {
271354 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
272355 switchGeoItem.addActionListener(this);
273356 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
....@@ -275,8 +358,6 @@
275358 morphItem = menu.add(new MenuItem("Morph Group"));
276359 morphItem.addActionListener(this);
277360
278
- if (Globals.ADVANCED)
279
- {
280361 menu.add("-");
281362 physicsItem = menu.add(new MenuItem("Physics"));
282363 physicsItem.addActionListener(this);
....@@ -295,11 +376,11 @@
295376 billboardItem.addActionListener(this);
296377 csgItem = menu.add(new MenuItem("CSG"));
297378 csgItem.addActionListener(this);
298
- shadowXItem = menu.add(new MenuItem("Shadow X"));
379
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
299380 shadowXItem.addActionListener(this);
300
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
381
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
301382 shadowYItem.addActionListener(this);
302
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
383
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
303384 shadowZItem.addActionListener(this);
304385 if (Globals.ADVANCED)
305386 {
....@@ -318,8 +399,12 @@
318399 resetTransformItem.addActionListener(this);
319400 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
320401 resetCentroidItem.addActionListener(this);
321
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
322
- transformgeometryItem.addActionListener(this);
402
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
403
+ resetCentroidXZItem.addActionListener(this);
404
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
405
+ transformGeometryItem.addActionListener(this);
406
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
407
+ transformChildrenItem.addActionListener(this);
323408
324409 oe.menuBar.add(menu = new Menu("Geometry"));
325410 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -368,6 +453,10 @@
368453 oe.menuBar.add(menu = new Menu("Attributes"));
369454 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
370455 clearMaterialsItem.addActionListener(this);
456
+ resetAllItem = menu.add(new MenuItem("Reset All"));
457
+ resetAllItem.addActionListener(this);
458
+ stepAllItem = menu.add(new MenuItem("Step All"));
459
+ stepAllItem.addActionListener(this);
371460 menu.add("-");
372461 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
373462 liveleavesItem.addActionListener(this);
....@@ -388,6 +477,14 @@
388477 markleavesItem.addActionListener(this);
389478 unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
390479 unmarkleavesItem.addActionListener(this);
480
+ rewindleavesItem = menu.add(new MenuItem("Rewind Leaves"));
481
+ rewindleavesItem.addActionListener(this);
482
+ unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves"));
483
+ unrewindleavesItem.addActionListener(this);
484
+ randomleavesItem = menu.add(new MenuItem("Random Leaves"));
485
+ randomleavesItem.addActionListener(this);
486
+ unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves"));
487
+ unrandomleavesItem.addActionListener(this);
391488 menu.add("-");
392489 flipVItem = menu.add(new MenuItem("Flip V"));
393490 flipVItem.addActionListener(this);
....@@ -422,38 +519,41 @@
422519 sortbysizeItem.addActionListener(this);
423520 sortbynameItem = menu.add(new MenuItem("Sort by name"));
424521 sortbynameItem.addActionListener(this);
522
+ menu.add("-");
523
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
524
+ shareGeometriesItem.addActionListener(this);
525
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
526
+ mergeGeometriesItem.addActionListener(this);
425527 if (Globals.ADVANCED)
426528 {
427
- menu.add("-");
529
+ // Pretty much the same as duplicate and clone.
428530 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
429531 extractGeometriesItem.addActionListener(this);
430532 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
431533 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);
436534 }
437535
438536 oe.menuBar.add(menu = new Menu("Insert"));
439537 buildCreateMenu(menu);
440538
441
- oe.menuBar.add(menu = new Menu("Include"));
442
- importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
443
- importGFDItem.addActionListener(this);
444
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
445
- importVRMLX3DItem.addActionListener(this);
446
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
447
- importOBJItem.addActionListener(this);
448
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
449
- import3DSItem.addActionListener(this);
450
-
451539 oe.menuBar.add(menu = new Menu("Tools"));
452540 buildToolsMenu(menu);
453541 }
454542
455543 void SetupUI2(ObjEditor oe)
456544 {
545
+ // June 2019
546
+ if (oe == null)
547
+ {
548
+ //super.SetupUI2(this);
549
+ //return;
550
+ }
551
+
552
+ if (copy != group)
553
+ {
554
+ //super.SetupUI2(this);
555
+ }
556
+
457557 //new Exception().printStackTrace();
458558
459559 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -484,23 +584,49 @@
484584 */
485585 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
486586
487
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
488
- liveCB.setToolTipText("Enabled animation");
587
+ //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
588
+ //minButton.setToolTipText("Minimize window");
589
+ //minButton.addActionListener(this);
590
+
591
+ oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
592
+ maxButton.setToolTipText("Maximize window");
593
+ maxButton.addActionListener(this);
594
+
595
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
596
+ fullButton.setToolTipText("Full-screen window");
597
+ fullButton.addActionListener(this);
598
+
599
+ oe.toolboxPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
600
+ undoButton.setToolTipText("Undo changes");
601
+ undoButton.addActionListener(this);
602
+
603
+ oe.toolboxPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
604
+ redoButton.setToolTipText("Redo changes");
605
+ redoButton.addActionListener(this);
606
+
607
+ oe.toolboxPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
608
+ saveButton.setToolTipText("Save changes");
609
+ saveButton.addActionListener(this);
610
+
611
+ oe.toolboxPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
612
+ liveCB.setToolTipText("Enable animation");
489613 liveCB.addItemListener(this);
490614
491
- oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
615
+ oe.toolboxPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
492616 oneStepButton.setToolTipText("Animate one step forward");
493617 oneStepButton.addActionListener(this);
494618
495
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
619
+ oe.toolboxPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
496620 fastCB.setToolTipText("Fast mode");
497621 fastCB.addItemListener(this);
498622
499
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
623
+ oe.toolboxPanel.Return();
624
+
625
+ oe.toolboxPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
500626 trackCB.setToolTipText("Enable tracking");
501627 trackCB.addItemListener(this);
502628
503
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
629
+ oe.toolboxPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
504630 screenfitButton.setToolTipText("Screen fit");
505631 screenfitButton.addActionListener(this);
506632
....@@ -509,70 +635,117 @@
509635
510636 if (Globals.ADVANCED)
511637 {
512
- oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
638
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
513639 snapobjectButton.addActionListener(this);
514640 snapobjectButton.setToolTipText("Snap Object");
515641 }
516642
517
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
518
- flashSelectionButton.setToolTipText("Show selection");
643
+ oe.toolboxPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
644
+ flashSelectionButton.setToolTipText("Highlight selection");
519645 flashSelectionButton.addActionListener(this);
520646
521
- oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
647
+ //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
522648
523
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
649
+ oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
524650 twoButton.setToolTipText("Show center view only");
525651 twoButton.addActionListener(this);
526
- oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
652
+ this.fullscreenLayout = twoButton;
653
+
654
+ oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
527655 fourButton.addActionListener(this);
528656 fourButton.setToolTipText("Show left panel only");
529
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
657
+ oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
530658 sixButton.setToolTipText("2-column layout left");
531659 sixButton.addActionListener(this);
532
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
660
+ oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
533661 threeButton.setToolTipText("2-column layout right");
534662 threeButton.addActionListener(this);
535
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
663
+ oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
536664 sevenButton.setToolTipText("3-column layout");
537665 sevenButton.addActionListener(this);
538666 //
539667
540
- oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
668
+ oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
541669 rootButton.setToolTipText("Edit selection in new tab");
542670 rootButton.addActionListener(this);
543671
544
- oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
672
+ oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
545673 closeButton.setToolTipText("Close tab");
546674 closeButton.addActionListener(this);
547675 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
548676 //clearButton.addActionListener(this);
549
-
550
- cGridBag commandsPanel = new cGridBag();
677
+
678
+ // INSERT
679
+ oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
680
+ gridButton.setToolTipText("Create grid");
681
+ gridButton.addActionListener(this);
682
+
683
+ oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
684
+ boxButton.setToolTipText("Create box");
685
+ boxButton.addActionListener(this);
686
+
687
+ oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
688
+ sphereButton.setToolTipText("Create sphere");
689
+ sphereButton.addActionListener(this);
690
+
691
+ oe.toolboxPanel.Return();
551692
552
- commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
693
+ oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
694
+ coneButton.setToolTipText("Create cone");
695
+ coneButton.addActionListener(this);
696
+
697
+ oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
698
+ torusButton.setToolTipText("Create torus");
699
+ torusButton.addActionListener(this);
700
+
701
+ oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
702
+ superButton.setToolTipText("Create superellipsoid");
703
+ superButton.addActionListener(this);
704
+
705
+ if (Globals.ADVANCED)
706
+ {
707
+ oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
708
+ kleinButton.setToolTipText("Create Klein bottle");
709
+ kleinButton.addActionListener(this);
710
+ }
711
+
712
+ oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
713
+ particlesButton.setToolTipText("Create particle system");
714
+ particlesButton.addActionListener(this);
715
+
716
+ oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
717
+ overlayButton.setToolTipText("Create overlay");
718
+ overlayButton.addActionListener(this);
719
+
720
+ oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
721
+ lightButton.setToolTipText("Create light");
722
+ lightButton.addActionListener(this);
723
+
724
+ // EDIT panel
725
+ editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
553726 editButton.setToolTipText("Edit selection");
554727 editButton.addActionListener(this);
555728
556
- commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
729
+ editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
557730 uneditButton.setToolTipText("Unedit selection");
558731 uneditButton.addActionListener(this);
559732
560
- commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
733
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
561734 allParamsButton.setToolTipText("Edit all params");
562735 allParamsButton.addActionListener(this);
563736
564
- commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
737
+ editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
565738 clearPanelButton.setToolTipText("Clear edit panel");
566739 clearPanelButton.addActionListener(this);
567740
568
- commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
741
+ editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
569742 unselectButton.setToolTipText("Unselect");
570743 unselectButton.addActionListener(this);
571744
572
- commandsPanel.preferredHeight = 1;
745
+ editCommandsPanel.preferredHeight = 1;
573746
574
- oe.treePanel.add(commandsPanel);
575
- oe.treePanel.Return();
747
+// oe.treePanel.add(commandsPanel);
748
+// oe.treePanel.Return();
576749
577750 // oe.aConstraints.gridx += 1;
578751 // oe.aConstraints.weighty = 0;
....@@ -589,7 +762,7 @@
589762
590763 JScrollPane jSP;
591764 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
592
- jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
765
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
593766 ResetModel();
594767
595768 oe.treePanel.add(jSPPanel);
....@@ -648,7 +821,7 @@
648821 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
649822 zoomBoxCB.addItemListener(this);
650823
651
- if (Globals.ADVANCED)
824
+ if (true) // Globals.ADVANCED)
652825 {
653826 panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
654827 supportCB.setToolTipText("Enable rigging");
....@@ -694,11 +867,23 @@
694867 // debugCB.addItemListener(this);
695868
696869 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
870
+ oeilCB.setToolTipText("Move camera when tracking target");
697871 oeilCB.addItemListener(this);
698872
873
+ panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
874
+ shadowCB.setToolTipText("Compute shadows when live");
875
+ shadowCB.addItemListener(this);
876
+
877
+ panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints);
878
+ autosaveCB.setToolTipText("Auto-save on structure change");
879
+ autosaveCB.addItemListener(this);
880
+
881
+ if (Globals.ADVANCED)
882
+ {
699883 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
700884 lookAtCB.setToolTipText("Look-at target");
701885 lookAtCB.addItemListener(this);
886
+ }
702887
703888 }
704889
....@@ -713,6 +898,14 @@
713898 void EditObject(Object3D obj)
714899 {
715900 cRadio radioButton = new cRadio(obj.name);
901
+
902
+ // Patch to avoid bug with transparency.
903
+ radioButton.hadMaterial = obj.material != null;
904
+ if (!radioButton.hadMaterial)
905
+ {
906
+ obj.material = new cMaterial();
907
+ }
908
+
716909 radioButton.SetObject(obj);
717910 radioButton.layout = sevenButton;
718911 radioButton.SetCamera(cameraView.renderCamera, false);
....@@ -721,8 +914,11 @@
721914 buttonGroup.add(radioButton);
722915 radioButton.doClick();
723916 }
917
+
724918 void SetupViews(ObjEditor oe)
725919 {
920
+ theFrame = this;
921
+
726922 oe.SetupViews();
727923
728924 System.out.println("SetupViews");
....@@ -731,23 +927,26 @@
731927 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
732928 }
733929
734
- JCheckBox liveCB;
735
- JCheckBox supportCB;
736
- JCheckBox localCB;
737
- JCheckBox crowdCB;
738
- JCheckBox smoothCB;
739
- JCheckBox fastCB;
740
- JCheckBox slowCB;
741
- JCheckBox boxCB;
742
- JCheckBox zoomBoxCB;
743
- JCheckBox trackCB;
744
- JCheckBox smoothfocusCB;
930
+ cToggleButton liveCB;
931
+ cCheckBox supportCB;
932
+ cCheckBox localCB;
933
+ cCheckBox crowdCB;
934
+ cCheckBox smoothCB;
935
+ cToggleButton fastCB;
936
+ cCheckBox slowCB;
937
+ cCheckBox boxCB;
938
+ cCheckBox zoomBoxCB;
939
+ cToggleButton trackCB;
940
+ cCheckBox smoothfocusCB;
745941 // JCheckBox speakerMocapCB;
746
- JCheckBox speakerCameraCB;
747
- JCheckBox speakerFocusCB;
748
- JCheckBox debugCB;
749
- JCheckBox oeilCB;
750
- JCheckBox lookAtCB;
942
+ cCheckBox speakerCameraCB;
943
+ cCheckBox speakerFocusCB;
944
+ cCheckBox debugCB;
945
+
946
+ cCheckBox oeilCB;
947
+ cCheckBox shadowCB;
948
+ cCheckBox autosaveCB;
949
+ cCheckBox lookAtCB;
751950
752951 // static int COLOR = 1;
753952 // static int MATERIAL = 2;
....@@ -755,9 +954,9 @@
755954
756955 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
757956
758
- JCheckBox colorCB;
759
- JCheckBox materialCB;
760
- JCheckBox textureCB;
957
+ cCheckBox colorCB;
958
+ cCheckBox materialCB;
959
+ cCheckBox textureCB;
761960
762961 public void itemStateChanged(ItemEvent e)
763962 {
....@@ -785,6 +984,7 @@
785984 } else if(e.getSource() == liveCB)
786985 {
787986 cameraView.ToggleLive();
987
+ refreshContents(false);
788988 }
789989 else if(e.getSource() == supportCB)
790990 {
....@@ -849,6 +1049,14 @@
8491049 {
8501050 cameraView.ToggleOeil();
8511051 }
1052
+ else if(e.getSource() == shadowCB)
1053
+ {
1054
+ Globals.COMPUTESHADOWWHENLIVE ^= true;
1055
+ }
1056
+ else if(e.getSource() == autosaveCB)
1057
+ {
1058
+ Globals.SAVEONMAKE ^= true;
1059
+ }
8521060 else if(e.getSource() == lookAtCB)
8531061 {
8541062 cameraView.ToggleLookAt();
....@@ -865,7 +1073,8 @@
8651073
8661074 /**/
8671075 //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this);
868
- TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1076
+ //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1077
+ TreePath path = objEditor.jTree.getSelectionPath();
8691078 if ((path == null) || (path.getPathCount() <= 1)) {
8701079 // We can't move the root node or an empty selection
8711080 return;
....@@ -937,7 +1146,9 @@
9371146 // objEditor.DropFile((java.io.File[]) object, true);
9381147 // return;
9391148 // }
940
- if (string.charAt(0) == '/')
1149
+
1150
+ // File path for Mac and Windows
1151
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
9411152 {
9421153 // file(s)
9431154 String[] names = string.split("\n");
....@@ -964,7 +1175,7 @@
9641175
9651176 flashIt = false;
9661177 CameraPane pane = (CameraPane) target;
967
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1178
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
9681179 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
9691180
9701181 if (group.selection.size() == 1)
....@@ -987,16 +1198,16 @@
9871198 return;
9881199 }
9891200
990
- if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
991
- {
1201
+// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1202
+// {
9921203 loadClipboard(true);
9931204 objEditor.jTree.setSelectionPath(destinationPath);
9941205 pasteInto(false, false);
995
- } else {
996
- loadClipboard(false);
997
- objEditor.jTree.setSelectionPath(destinationPath);
998
- pasteInto(false, false); // true); // ???
999
- }
1206
+// } else {
1207
+// loadClipboard(false);
1208
+// objEditor.jTree.setSelectionPath(destinationPath);
1209
+// pasteInto(false, false); // true); // ???
1210
+// }
10001211 }
10011212 public void dropActionChanged(DropTargetDragEvent dtde)
10021213 // Called if the user has modified the current drop gesture
....@@ -1190,7 +1401,7 @@
11901401 memoryItem.addActionListener(this);
11911402 menu.add(analyzeItem = new MenuItem("Analyze"));
11921403 analyzeItem.addActionListener(this);
1193
- menu.add(dumpItem = new MenuItem("Dump"));
1404
+ menu.add(dumpItem = new MenuItem("Print"));
11941405 dumpItem.addActionListener(this);
11951406 // menu.add(pathItem = new MenuItem("From-to path"));
11961407 // pathItem.addActionListener(this);
....@@ -1331,6 +1542,7 @@
13311542 shadow.material = new cMaterial(obj.material);
13321543 shadow.material.diffuse = 0.0001f;
13331544 shadow.material.specular = 0.0001f;
1545
+ //shadow.projectedVertices[1].x = 300;
13341546
13351547 makeSomething(shadow);
13361548 }
....@@ -1537,9 +1749,9 @@
15371749
15381750 void Overwrite(int mask)
15391751 {
1540
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1752
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
15411753 {
1542
- Object3D content = GrafreeD.clipboard.get(0);
1754
+ Object3D content = Grafreed.clipboard.get(0);
15431755
15441756 if (content instanceof cGroup && ((cGroup)content).transientlink )
15451757 content = ((cGroup)content).get(0);
....@@ -1587,11 +1799,11 @@
15871799 objEditor.cameraView.renderCamera.setAim(v2, v1);
15881800 objEditor.cameraView.repaint();
15891801 } else
1590
- if (source == rectoidItem)
1802
+ if (source == rectoidItem || source == boxButton)
15911803 {
15921804 makeSomething(new Box());
15931805 } else
1594
- if (source == particleItem)
1806
+ if (source == particleItem || source == particlesButton)
15951807 {
15961808 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15971809 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1670,27 +1882,27 @@
16701882
16711883 makeSomething(obj);
16721884 } else
1673
- if (source == gridItem)
1885
+ if (source == gridItem || source == gridButton)
16741886 {
16751887 makeSomething(new Grid());
16761888 } else
1677
- if (source == ellipsoidItem)
1889
+ if (source == ellipsoidItem || source == sphereButton)
16781890 {
16791891 makeSomething(new Sphere());
16801892 } else
1681
- if (source == coneItem)
1893
+ if (source == coneItem || source == coneButton)
16821894 {
16831895 makeSomething(new Cone());
16841896 } else
1685
- if (source == torusItem)
1897
+ if (source == torusItem || source == torusButton)
16861898 {
16871899 makeSomething(new Torus());
16881900 } else
1689
- if (source == superItem)
1901
+ if (source == superItem || source == superButton)
16901902 {
16911903 makeSomething(new Superellipsoid());
16921904 } else
1693
- if (source == kleinItem)
1905
+ if (source == kleinItem || source == kleinButton)
16941906 {
16951907 makeSomething(new Klein());
16961908 } else
....@@ -1710,7 +1922,7 @@
17101922 {
17111923 makeSomething(new BezierSurface());
17121924 } else
1713
- if (source == overlayItem)
1925
+ if (source == overlayItem || source == overlayButton)
17141926 {
17151927 /*
17161928 Object3D obj = new BezierSurface(5,8);
....@@ -1758,7 +1970,7 @@
17581970 s.setup();
17591971 makeSomething(s);
17601972 } else
1761
- if (source == lightItem)
1973
+ if (source == lightItem || source == lightButton)
17621974 {
17631975 makeSomething(new Light());
17641976 } else
....@@ -1844,23 +2056,6 @@
18442056 csg.addChild(child);
18452057 child.addChild(csg);
18462058 } else
1847
-
1848
- if (source == importGFDItem)
1849
- {
1850
- ImportGFD();
1851
- } else
1852
- if (source == importVRMLX3DItem)
1853
- {
1854
- ImportVRMLX3D();
1855
- } else
1856
- if (source == import3DSItem)
1857
- {
1858
- objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
1859
- } else
1860
- if (source == importOBJItem)
1861
- {
1862
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1863
- } else
18642059 if (source == computeAOItem)
18652060 {
18662061 Globals.drawMode = CameraPane.OCCLUSION;
....@@ -1879,7 +2074,7 @@
18792074 if (source == invariantsItem)
18802075 {
18812076 System.out.println("Invariants:");
1882
- GrafreeD.grafreeD.universe.invariants();
2077
+ Grafreed.grafreeD.universe.invariants();
18832078 } else
18842079 if (source == memoryItem)
18852080 {
....@@ -1897,6 +2092,30 @@
18972092 if (source == dumpItem)
18982093 {
18992094 DumpObject();
2095
+ } else
2096
+ if (source == minButton)
2097
+ {
2098
+ Minimize();
2099
+ } else
2100
+ if (source == maxButton)
2101
+ {
2102
+ Maximize();
2103
+ } else
2104
+ if (source == fullButton)
2105
+ {
2106
+ ToggleFullScreen();
2107
+ } else
2108
+ if (source == undoButton)
2109
+ {
2110
+ Undo();
2111
+ } else
2112
+ if (source == redoButton)
2113
+ {
2114
+ Redo();
2115
+ } else
2116
+ if (source == saveButton)
2117
+ {
2118
+ Save();
19002119 } else
19012120 if (source == oneStepButton)
19022121 {
....@@ -1952,12 +2171,20 @@
19522171 {
19532172 loadClipboard(true);
19542173 } else
2174
+ if (source == undoItem)
2175
+ {
2176
+ Undo();
2177
+ } else
2178
+ if (source == redoItem)
2179
+ {
2180
+ Redo();
2181
+ } else
19552182 if (source == duplicateItem)
19562183 {
1957
- Object3D keep = GrafreeD.clipboard;
2184
+ Object3D keep = Grafreed.clipboard;
19582185 loadClipboard(false);
19592186 paste(false);
1960
- GrafreeD.clipboard = keep;
2187
+ Grafreed.clipboard = keep;
19612188 } else
19622189 if (source == cloneItem)
19632190 {
....@@ -2177,9 +2404,9 @@
21772404 // group.selection.get(0).setMasterThis(content); // should be identity
21782405 // refreshContents();
21792406 // }
2180
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2407
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21812408 {
2182
- Object3D content = GrafreeD.clipboard.get(0);
2409
+ Object3D content = Grafreed.clipboard.get(0);
21832410
21842411 if (content instanceof cGroup && ((cGroup)content).transientlink )
21852412 content = ((cGroup)content).get(0);
....@@ -2229,9 +2456,9 @@
22292456 } else
22302457 if (source == setMasterItem)
22312458 {
2232
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2459
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
22332460 {
2234
- Object3D content = GrafreeD.clipboard.get(0);
2461
+ Object3D content = Grafreed.clipboard.get(0);
22352462
22362463 if (content instanceof cGroup && ((cGroup)content).transientlink )
22372464 content = ((cGroup)content).get(0);
....@@ -2244,9 +2471,9 @@
22442471 {
22452472 if (group.selection.size() == 1)
22462473 {
2247
- if (GrafreeD.clipboard.size() == 1)
2474
+ if (Grafreed.clipboard.size() == 1)
22482475 {
2249
- Object3D content = GrafreeD.clipboard.get(0);
2476
+ Object3D content = Grafreed.clipboard.get(0);
22502477
22512478 if (content instanceof cGroup && ((cGroup)content).transientlink )
22522479 content = ((cGroup)content).get(0);
....@@ -2263,7 +2490,7 @@
22632490 {
22642491 RevertMeshes();
22652492 } else
2266
- if (source == resetMeshItem)
2493
+ if (source == resetAllItem)
22672494 {
22682495 ResetAll();
22692496 } else
....@@ -2429,7 +2656,7 @@
24292656 {
24302657 CastShadow(2);
24312658 } else
2432
- if (source == ungroupItem)
2659
+ if (source == ungroupItem || source == ungroupButton)
24332660 {
24342661 //ungroup();
24352662 for (int i=0; i<group.selection.size(); i++)
....@@ -2451,7 +2678,7 @@
24512678 } else
24522679 if (source == genNormalsMESHItem)
24532680 {
2454
- GenNormals(true); // TODO
2681
+ GenNormalsMESH();
24552682 } else
24562683 if (source == genNormalsORGANItem)
24572684 {
....@@ -2516,6 +2743,22 @@
25162743 if (source == unmarkleavesItem)
25172744 {
25182745 MarkLeaves(false);
2746
+ } else
2747
+ if (source == rewindleavesItem)
2748
+ {
2749
+ RewindLeaves(true);
2750
+ } else
2751
+ if (source == unrewindleavesItem)
2752
+ {
2753
+ RewindLeaves(false);
2754
+ } else
2755
+ if (source == randomleavesItem)
2756
+ {
2757
+ RandomLeaves(true);
2758
+ } else
2759
+ if (source == unrandomleavesItem)
2760
+ {
2761
+ RandomLeaves(false);
25192762 } else
25202763 if (source == flipVItem)
25212764 {
....@@ -2601,9 +2844,13 @@
26012844 {
26022845 SmoothMesh();
26032846 } else
2604
- if (source == transformgeometryItem)
2847
+ if (source == transformGeometryItem)
26052848 {
26062849 TransformGeometry();
2850
+ } else
2851
+ if (source == transformChildrenItem)
2852
+ {
2853
+ TransformChildren();
26072854 } else
26082855 if (source == resetTransformItem)
26092856 {
....@@ -2611,7 +2858,11 @@
26112858 } else
26122859 if (source == resetCentroidItem)
26132860 {
2614
- ResetCentroid();
2861
+ ResetCentroid(true);
2862
+ } else
2863
+ if (source == resetCentroidXZItem)
2864
+ {
2865
+ ResetCentroid(false);
26152866 } else
26162867 if (source == resetParentItem)
26172868 {
....@@ -2743,6 +2994,10 @@
27432994 if (source == twoButton)
27442995 {
27452996 radio.layout = twoButton;
2997
+
2998
+ if (CameraPane.FULLSCREEN)
2999
+ fullscreenLayout = radio.layout;
3000
+
27463001 // bug
27473002 //gridPanel.setDividerLocation(1.0);
27483003 //bigPanel.setDividerLocation(0.0);
....@@ -2775,10 +3030,31 @@
27753030 bigThree.ClearUI();
27763031 bigThree.add(centralPanel);
27773032 bigThree.FlushUI();
3033
+
3034
+ cameraView.requestFocusInWindow();
3035
+
3036
+// refreshContents(true);
3037
+//
3038
+// try
3039
+// {
3040
+// java.awt.Robot bot = new java.awt.Robot();
3041
+// int mask = InputEvent.BUTTON1_MASK;
3042
+// bot.mouseMove(100, 100);
3043
+// bot.mousePress(mask);
3044
+// bot.mouseRelease(mask);
3045
+// }
3046
+// catch (Exception e)
3047
+// {
3048
+//
3049
+// }
3050
+
27783051 } else
27793052 if (source == threeButton)
27803053 {
27813054 radio.layout = threeButton;
3055
+
3056
+ if (CameraPane.FULLSCREEN)
3057
+ fullscreenLayout = radio.layout;
27823058
27833059 // bigThree.remove(scenePanel);
27843060 // bigThree.remove(centralPanel);
....@@ -2811,10 +3087,15 @@
28113087 bigThree.add(centralPanel);
28123088 bigThree.add(XYZPanel);
28133089 bigThree.FlushUI();
3090
+
3091
+ cameraView.requestFocusInWindow();
28143092 } else
28153093 if (source == fourButton)
28163094 {
28173095 radio.layout = fourButton;
3096
+
3097
+ if (CameraPane.FULLSCREEN)
3098
+ fullscreenLayout = radio.layout;
28183099
28193100 // bigThree.remove(scenePanel);
28203101 // bigThree.remove(centralPanel);
....@@ -2846,10 +3127,15 @@
28463127 bigThree.ClearUI();
28473128 bigThree.add(scenePanel);
28483129 bigThree.FlushUI();
3130
+
3131
+ cameraView.requestFocusInWindow();
28493132 } else
28503133 if (source == sixButton)
28513134 {
28523135 radio.layout = sixButton;
3136
+
3137
+ if (CameraPane.FULLSCREEN)
3138
+ fullscreenLayout = radio.layout;
28533139
28543140 // bigThree.remove(scenePanel);
28553141 // bigThree.remove(centralPanel);
....@@ -2882,10 +3168,15 @@
28823168 bigThree.add(scenePanel);
28833169 bigThree.add(centralPanel);
28843170 bigThree.FlushUI();
3171
+
3172
+ cameraView.requestFocusInWindow();
28853173 } else
28863174 if (source == sevenButton)
28873175 {
28883176 radio.layout = sevenButton;
3177
+
3178
+ if (CameraPane.FULLSCREEN)
3179
+ fullscreenLayout = radio.layout;
28893180
28903181 // bigThree.remove(scenePanel);
28913182 // bigThree.remove(centralPanel);
....@@ -2919,6 +3210,8 @@
29193210 bigThree.add(centralPanel);
29203211 bigThree.add(XYZPanel);
29213212 bigThree.FlushUI();
3213
+
3214
+ cameraView.requestFocusInWindow();
29223215 } else
29233216 if (source == rootButton)
29243217 {
....@@ -2930,6 +3223,7 @@
29303223 EditObject(obj);
29313224 }
29323225
3226
+ cameraView.requestFocusInWindow();
29333227 refreshContents(true);
29343228 } else
29353229 if (source == closeButton)
....@@ -2939,18 +3233,27 @@
29393233 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
29403234 {
29413235 ab = (cRadio)e.nextElement();
2942
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3236
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
29433237 {
3238
+ // Patch to avoid bug with transparency.
3239
+ if (!ab.hadMaterial)
3240
+ {
3241
+ ab.object.material = null;
3242
+ }
3243
+
29443244 buttonGroup.remove(ab);
29453245 radioPanel.remove(ab);
29463246
2947
- ab.GetObject().editWindow = null;
3247
+ //ab.GetObject().editWindow = null;
3248
+ ab.GetObject().manipWindow = null;
29483249 // ab.GetObject().objectUI = null; // ?????????
29493250
29503251 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
29513252 break;
29523253 }
29533254 }
3255
+
3256
+ cameraView.requestFocusInWindow();
29543257 refreshContents(true);
29553258 } else
29563259 if (source == editItem || source == editButton)
....@@ -2967,7 +3270,7 @@
29673270 child.CloseUI();
29683271 listUI.remove(child);
29693272
2970
- child.editWindow = null; // ???????????
3273
+ //child.editWindow = null; // ???????????
29713274 }
29723275 objEditor.ctrlPanel.FlushUI();
29733276 //objEditor.jTree.clearSelection();
....@@ -3053,7 +3356,11 @@
30533356 frontView.object = group;
30543357 sideView.object = group;
30553358 }
3056
- group.editWindow = this;
3359
+
3360
+// fix "+" issue
3361
+ //group.editWindow = this;
3362
+ group.manipWindow = this;
3363
+
30573364 /*
30583365 currentLayout = radio.layout;
30593366 if (currentLayout == null)
....@@ -3065,8 +3372,23 @@
30653372 //group.parent = null; // ROOT
30663373 //group.attributes = -1;
30673374 ResetModel();
3375
+
3376
+ cameraView.requestFocusInWindow();
30683377 refreshContents(true);
3069
- }
3378
+ } else if (event.getSource() == editCameraItem)
3379
+ {
3380
+ cameraView.ProtectCamera();
3381
+ cameraView.repaint();
3382
+ return;
3383
+ } else if (event.getSource() == revertCameraItem)
3384
+ {
3385
+ cameraView.RevertCamera();
3386
+ cameraView.repaint();
3387
+ return;
3388
+ // } else if (event.getSource() == textureButton)
3389
+ // {
3390
+ // return; // true;
3391
+ }
30703392 else
30713393 {
30723394 //return super.action(event, arg);
....@@ -3075,7 +3397,6 @@
30753397 }
30763398
30773399 boolean useclient = false;
3078
- cRadio radio;
30793400
30803401 void ToggleRoot()
30813402 {
....@@ -3127,6 +3448,28 @@
31273448 refreshContents();
31283449 }
31293450
3451
+ void TransformChildren()
3452
+ {
3453
+ Object3D obj;
3454
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3455
+ {
3456
+ obj = (Object3D)e.nextElement();
3457
+ obj.KeepTextureMatrices();
3458
+ obj.TransformChildren();
3459
+ obj.RestoreTextureMatrices();
3460
+
3461
+// if (obj.parent == null)
3462
+// {
3463
+// System.out.println("NULL PARENT!");
3464
+// new Exception().printStackTrace();
3465
+// }
3466
+// else
3467
+// TouchTransform(obj);
3468
+// //obj.parent.Touch();
3469
+ }
3470
+
3471
+ refreshContents();
3472
+ }
31303473
31313474 void ResetTransform()
31323475 {
....@@ -3239,7 +3582,7 @@
32393582 refreshContents();
32403583 }
32413584
3242
- void ResetCentroid()
3585
+ void ResetCentroid(boolean full)
32433586 {
32443587 Object3D obj;
32453588 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3254,12 +3597,16 @@
32543597 LA.matIdentity(Object3D.mat);
32553598 obj.getBounds(minima, maxima, false);
32563599 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3257
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3600
+ if (full)
3601
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
32583602 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
32593603 obj.TransformMesh(Object3D.mat);
3604
+
32603605 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3261
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3606
+ if (full)
3607
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
32623608 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3609
+
32633610 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
32643611 //Object3D.mat[3][0] = -Object3D.mat[3][0];
32653612 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3288,7 +3635,8 @@
32883635
32893636 int size = obj.MemorySize();
32903637
3291
- System.err.println((size/1024) + " KB is the size of " + obj);
3638
+ //System.err.println((size/1024) + " KB is the size of " + obj);
3639
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
32923640 }
32933641 }
32943642 catch (Exception e)
....@@ -3325,9 +3673,9 @@
33253673 obj = (Object3D)e.nextElement();
33263674
33273675 System.out.println("Object is: " + obj);
3328
- GrafreeD.AnalyzeObject(obj);
3676
+ Grafreed.AnalyzeObject(obj);
33293677 System.out.println("Boundary rep: " + obj.bRep);
3330
- GrafreeD.AnalyzeObject(obj.bRep);
3678
+ Grafreed.AnalyzeObject(obj.bRep);
33313679
33323680 // System.err.println((size/1024) + " KB is the size of " + obj);
33333681 }
....@@ -3369,6 +3717,13 @@
33693717 void GenNormals(boolean crease)
33703718 {
33713719 group.GenNormalsS(crease);
3720
+
3721
+ refreshContents();
3722
+ }
3723
+
3724
+ void GenNormalsMESH()
3725
+ {
3726
+ group.GenNormalsMeshS();
33723727
33733728 refreshContents();
33743729 }
....@@ -3541,8 +3896,8 @@
35413896
35423897 void ParseVertices()
35433898 {
3544
- boolean epsequal = GrafreeD.epsequal;
3545
- GrafreeD.epsequal = true;
3899
+ boolean epsequal = Grafreed.epsequal;
3900
+ Grafreed.epsequal = true;
35463901
35473902 for (int i=0; i<group.selection.size(); i++)
35483903 {
....@@ -3567,7 +3922,7 @@
35673922 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
35683923 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
35693924
3570
- g.add(GrafreeD.clipboard);
3925
+ g.add(Grafreed.clipboard);
35713926
35723927 buffer.add(g);
35733928 }
....@@ -3582,7 +3937,7 @@
35823937 makeSomething(buffer, i==group.selection.size()-1);
35833938 }
35843939
3585
- GrafreeD.epsequal = epsequal;
3940
+ Grafreed.epsequal = epsequal;
35863941
35873942 refreshContents();
35883943 }
....@@ -3600,7 +3955,16 @@
36003955 String pigment = Object3D.GetPigment(tex);
36013956 //String bump = Object3D.GetBump(tex);
36023957
3603
- com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3958
+ com.sun.opengl.util.texture.TextureData texturedata = null;
3959
+
3960
+ try
3961
+ {
3962
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3963
+ }
3964
+ catch (Exception e)
3965
+ {
3966
+ System.err.println("FAIL: " + node);
3967
+ }
36043968
36053969 double s = v.s;
36063970
....@@ -3732,7 +4096,7 @@
37324096 return;
37334097
37344098 Object3D poses = group.selection.get(0);
3735
- Object3D ref = GrafreeD.clipboard.get(0);
4099
+ Object3D ref = Grafreed.clipboard.get(0);
37364100
37374101 Object3D newgroup = new Object3D("Po:" + poses.name);
37384102
....@@ -3926,9 +4290,9 @@
39264290
39274291 void ClipMesh()
39284292 {
3929
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
4293
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
39304294 {
3931
- Object3D content = GrafreeD.clipboard.get(0);
4295
+ Object3D content = Grafreed.clipboard.get(0);
39324296
39334297 if (content instanceof cGroup && ((cGroup)content).transientlink )
39344298 content = ((cGroup)content).get(0);
....@@ -3937,7 +4301,7 @@
39374301 // {
39384302 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
39394303 // }
3940
- group.selection.ClipMesh(GrafreeD.clipboard);
4304
+ group.selection.ClipMesh(Grafreed.clipboard);
39414305 }
39424306 // group.selection.ClipMesh(GrafreeD.clipboard);
39434307 System.out.println("DONE.");
....@@ -3984,6 +4348,18 @@
39844348 void MarkLeaves(boolean hide)
39854349 {
39864350 group.selection.MarkLeaves(hide);
4351
+ refreshContents();
4352
+ }
4353
+
4354
+ void RewindLeaves(boolean hide)
4355
+ {
4356
+ group.selection.RewindLeaves(hide);
4357
+ refreshContents();
4358
+ }
4359
+
4360
+ void RandomLeaves(boolean hide)
4361
+ {
4362
+ group.selection.RandomLeaves(hide);
39874363 refreshContents();
39884364 }
39894365
....@@ -4069,10 +4445,10 @@
40694445 {
40704446 //System.out.println("edit : " + objectPanel.indexOfTab("Material"));
40714447 //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false);
4072
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
4448
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
40734449
40744450 Object3D elem = (Object3D)group.selection.elementAt(i);
4075
- if(elem != group)
4451
+ if(elem != group || !newWindow)
40764452 {
40774453 // if (!(elem instanceof Composite))
40784454 // newWindow = false;
....@@ -4162,7 +4538,6 @@
41624538 //case 702: // Event.LIST_DESELECT
41634539 group.deselectAll();
41644540 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4165
- objEditor.ClearInfo(); // .GetMaterial());
41664541 if (tps != null)
41674542 {
41684543 for (int i=0; i < tps.length; i++)
....@@ -4171,10 +4546,8 @@
41714546
41724547 //if (child.parent != null)
41734548 //child.parent.addSelectee(child);
4549
+ objEditor.SetMaterial(child);
41744550 group.addSelectee(child);
4175
- objEditor.SetMaterial(child); // .GetMaterial());
4176
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4177
- System.err.println("info : " + child.GetPath());
41784551 }
41794552 }
41804553 // else
....@@ -4184,16 +4557,17 @@
41844557 // System.err.println("info : " + group.GetPath());
41854558 // }
41864559
4187
- objEditor.SetText(); // jan 2014
4188
-
4189
- if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4560
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
41904561 CameraPane.flash = true;
41914562
4192
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4563
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
41934564 // a camera
41944565 {
4195
- CameraPane.camerachangeframe = 0; // don't refuse it
4196
- Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4566
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
4567
+ {
4568
+ CameraPane.camerachangeframe = 0; // don't refuse it
4569
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4570
+ }
41974571 // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
41984572 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
41994573 }
....@@ -4206,6 +4580,26 @@
42064580
42074581 freezemodel = false;
42084582 }
4583
+
4584
+ void refreshContents(boolean cp)
4585
+ {
4586
+ if (!Globals.MOUSEDRAGGED)
4587
+ {
4588
+ objEditor.ClearInfo(); // .GetMaterial());
4589
+
4590
+ for (int i=0; i < group.selection.Size(); i++)
4591
+ {
4592
+ Object3D child = (Object3D) group.selection.get(i);
4593
+
4594
+ objEditor.AddInfo(child, this, true);
4595
+ System.err.println("info : " + child.GetPath());
4596
+ }
4597
+
4598
+ objEditor.SetText(); // jan 2014
4599
+ }
4600
+
4601
+ super.refreshContents(cp);
4602
+ }
42094603
42104604 void linkSomething(Object3D thing)
42114605 {
....@@ -4277,16 +4671,19 @@
42774671 {
42784672 if (group.selection.isEmpty())
42794673 return;
4280
- GrafreeD.clipboardIsTempGroup = false;
4674
+
4675
+ Grafreed.clipboardIsTempGroup = false;
42814676 Composite tGroup = null;
42824677 if (group.selection.size() > 0) // 1)
42834678 {
42844679 tGroup = new cGroup();
4285
- GrafreeD.clipboardIsTempGroup = true;
4680
+ Grafreed.clipboardIsTempGroup = true;
42864681 }
42874682
42884683 if (cut)
42894684 {
4685
+ if (Globals.SAVEONMAKE)
4686
+ Save();
42904687 //int indices[] = jList.getSelectedIndices();
42914688 //for (int i = indices.length - 1; i >= 0; i--)
42924689 //jList.remove(indices[i]);
....@@ -4322,16 +4719,16 @@
43224719 //System.out.println("cut " + child);
43234720 //System.out.println("parent = " + child.parent);
43244721 // tmp.addChild(child);
4325
- if (GrafreeD.clipboardIsTempGroup)
4722
+ if (Grafreed.clipboardIsTempGroup)
43264723 tGroup.add/*Child*/(tmp);
43274724 else
4328
- GrafreeD.clipboard = tmp;
4725
+ Grafreed.clipboard = tmp;
43294726 }
43304727 else
4331
- if (GrafreeD.clipboardIsTempGroup)
4728
+ if (Grafreed.clipboardIsTempGroup)
43324729 tGroup.add/*Child*/(child);
43334730 else
4334
- GrafreeD.clipboard = child;
4731
+ Grafreed.clipboard = child;
43354732 }
43364733
43374734 //ResetModel();
....@@ -4363,21 +4760,23 @@
43634760 //System.out.println("cut " + elem);
43644761 //System.out.println("parent = " + elem.parent);
43654762 // tmp.addChild(elem);
4366
- if (GrafreeD.clipboardIsTempGroup)
4763
+ if (Grafreed.clipboardIsTempGroup)
43674764 tGroup.add/*Child*/(tmp);
43684765 else
4369
- GrafreeD.clipboard = tmp;
4766
+ Grafreed.clipboard = tmp;
43704767 }
43714768 else
4372
- if (GrafreeD.clipboardIsTempGroup)
4769
+ if (Grafreed.clipboardIsTempGroup)
43734770 tGroup.add/*Child*/(child);
43744771 else
4375
- GrafreeD.clipboard = child;
4772
+ Grafreed.clipboard = child;
43764773 }
43774774
43784775 }
4379
- if (GrafreeD.clipboardIsTempGroup)
4380
- GrafreeD.clipboard = tGroup;
4776
+
4777
+ if (Grafreed.clipboardIsTempGroup)
4778
+ Grafreed.clipboard = tGroup;
4779
+
43814780 if (cut)
43824781 {
43834782 ResetModel();
....@@ -4391,7 +4790,7 @@
43914790 // return;
43924791 boolean first = true;
43934792
4394
- if (GrafreeD.clipboardIsTempGroup)
4793
+ if (Grafreed.clipboardIsTempGroup)
43954794 {
43964795 Composite temp;
43974796
....@@ -4402,7 +4801,7 @@
44024801 temp = (Composite)Applet3D.clipboard.deepCopy();
44034802 */
44044803 Object3D elem;
4405
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4804
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
44064805 {
44074806 Object3D child = (Object3D)e.nextElement();
44084807
....@@ -4436,14 +4835,14 @@
44364835 //Object3D cb = Applet3D.clipboard;
44374836 //temp.addChild(cb);
44384837 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4439
- assert(GrafreeD.clipboard.parent == null);
4440
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4441
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4442
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4443
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
4838
+ assert(Grafreed.clipboard.parent == null);
4839
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4840
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4841
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4842
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
44444843 else
4445
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4446
- GrafreeD.clipboard.get(0).parent = keepparent;
4844
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4845
+ Grafreed.clipboard.get(0).parent = keepparent;
44474846 }
44484847
44494848 ResetModel();
....@@ -4492,9 +4891,9 @@
44924891 {
44934892 boolean first = true;
44944893
4495
- if (GrafreeD.clipboardIsTempGroup)
4894
+ if (Grafreed.clipboardIsTempGroup)
44964895 {
4497
- Composite temp = (Composite)GrafreeD.clipboard;
4896
+ Composite temp = (Composite)Grafreed.clipboard;
44984897 Object3D copy;
44994898 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
45004899 {
....@@ -4504,7 +4903,7 @@
45044903 }
45054904 } else
45064905 {
4507
- linkSomething(GrafreeD.clipboard); //.get(0));
4906
+ linkSomething(Grafreed.clipboard); //.get(0));
45084907 }
45094908 }
45104909 }
....@@ -4909,21 +5308,6 @@
49095308 }
49105309 */
49115310
4912
- void ImportGFD()
4913
- {
4914
- FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
4915
- browser.show();
4916
- String filename = browser.getFile();
4917
- if (filename != null && filename.length() > 0)
4918
- {
4919
- String fullname = browser.getDirectory() + filename;
4920
-
4921
- //Object3D readobj =
4922
- objEditor.ReadGFD(fullname, objEditor);
4923
- //makeSomething(readobj);
4924
- }
4925
- }
4926
-
49275311 /*
49285312 public void Callback(Object obj)
49295313 {
....@@ -4947,26 +5331,9 @@
49475331 }
49485332 */
49495333
4950
- void ImportVRMLX3D()
4951
- {
4952
- if (GrafreeD.standAlone)
4953
- {
4954
- /**/
4955
- FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
4956
- browser.show();
4957
- String filename = browser.getFile();
4958
- if (filename != null && filename.length() > 0)
4959
- {
4960
- String fullname = browser.getDirectory() + filename;
4961
- LoadVRMLX3D(fullname);
4962
- }
4963
- /**/
4964
- }
4965
- }
4966
-
49675334 String GetFile(String dialogName)
49685335 {
4969
- if (GrafreeD.standAlone)
5336
+ if (Grafreed.standAlone)
49705337 {
49715338 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
49725339 browser.show();
....@@ -5034,7 +5401,28 @@
50345401 cButton clearpanelButton;
50355402 cButton unselectButton;
50365403
5404
+ cButton minButton;
5405
+ cButton maxButton;
5406
+ cButton fullButton;
5407
+ cButton undoButton;
5408
+ cButton redoButton;
5409
+ cButton saveButton;
50375410 cButton oneStepButton;
5411
+
5412
+ cButton groupButton;
5413
+ cButton ungroupButton;
5414
+ cButton compositeButton;
5415
+
5416
+ cButton gridButton;
5417
+ cButton boxButton;
5418
+ cButton sphereButton;
5419
+ cButton coneButton;
5420
+ cButton torusButton;
5421
+ cButton superButton;
5422
+ cButton kleinButton;
5423
+ cButton particlesButton;
5424
+ cButton overlayButton;
5425
+ cButton lightButton;
50385426
50395427 cButton screenfitButton;
50405428 cButton screenfitpointButton;
....@@ -5047,14 +5435,6 @@
50475435
50485436 cButton setsupportButton;
50495437
5050
- cButton twoButton;
5051
- cButton sixButton;
5052
- cButton threeButton;
5053
- cButton sevenButton;
5054
- cButton fourButton; // full panel
5055
- cButton oneButton; // full XYZ
5056
- //cButton currentLayout;
5057
-
50585438 //
50595439 //Composite
50605440 Object3D // to do !!
....@@ -5066,7 +5446,9 @@
50665446 private MenuItem lookFromItem;
50675447 private MenuItem switchItem;
50685448 private MenuItem cutItem;
5069
- private MenuItem duplicateItem;
5449
+ private MenuItem undoItem;
5450
+ private MenuItem redoItem;
5451
+ private JMenuItem duplicateItem;
50705452 private MenuItem cloneItem;
50715453 private MenuItem cloneSupportItem;
50725454 private MenuItem overwriteGeoItem;
....@@ -5079,7 +5461,7 @@
50795461 private MenuItem linkverticesItem;
50805462 private MenuItem relinkverticesItem;
50815463 private MenuItem setMasterItem;
5082
- private MenuItem resetMeshItem;
5464
+ private MenuItem resetAllItem;
50835465 private MenuItem stepAllItem;
50845466 private MenuItem revertMeshItem;
50855467 private MenuItem poseMeshItem;
....@@ -5129,6 +5511,10 @@
51295511 private MenuItem showleavesItem;
51305512 private MenuItem markleavesItem;
51315513 private MenuItem unmarkleavesItem;
5514
+ private MenuItem rewindleavesItem;
5515
+ private MenuItem unrewindleavesItem;
5516
+ private MenuItem randomleavesItem;
5517
+ private MenuItem unrandomleavesItem;
51325518
51335519 private MenuItem flipVItem;
51345520 private MenuItem unflipVItem;
....@@ -5140,8 +5526,10 @@
51405526 private MenuItem panoTexturesItem;
51415527
51425528 private MenuItem resetCentroidItem;
5143
- private MenuItem transformgeometryItem;
5529
+ private MenuItem resetCentroidXZItem;
51445530 private MenuItem resetTransformItem;
5531
+ private MenuItem transformGeometryItem;
5532
+ private MenuItem transformChildrenItem;
51455533 private MenuItem hideItem;
51465534 private MenuItem grabItem;
51475535 private MenuItem backItem;
....@@ -5210,11 +5598,6 @@
52105598 private MenuItem doubleItem;
52115599 private MenuItem tripleItem;
52125600
5213
- private MenuItem importGFDItem;
5214
- private MenuItem importVRMLX3DItem;
5215
- private MenuItem import3DSItem;
5216
- private MenuItem importOBJItem;
5217
-
52185601 private MenuItem computeAOItem;
52195602 private MenuItem recompileItem;
52205603 private MenuItem editScriptItem;
....@@ -5224,4 +5607,8 @@
52245607 private MenuItem analyzeItem;
52255608 private MenuItem dumpItem;
52265609 //boolean freezemodel = false;
5610
+
5611
+ Menu cameraMenu;
5612
+ MenuItem editCameraItem;
5613
+ MenuItem revertCameraItem;
52275614 }