Normand Briere
2019-06-29 a69bb4474a3264a9a7a7f8b8d8154ea771f167c8
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(restoreCameraItem = new MenuItem("Restore Viewpoint"));
208
+ restoreCameraItem.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("Show 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(switchViewItem = 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
+ //switchViewItem.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"));
....@@ -253,21 +328,29 @@
253328 }
254329
255330 oe.menuBar.add(menu = new Menu("Group"));
256
- grabItem = menu.add(new MenuItem("Grab"));
257
- grabItem.addActionListener(this);
331
+// grabItem = menu.add(new MenuItem("Grab"));
332
+// grabItem.addActionListener(this);
258333 backItem = menu.add(new MenuItem("Back"));
259334 backItem.addActionListener(this);
260335 frontItem = menu.add(new MenuItem("Front"));
261336 frontItem.addActionListener(this);
262
- compositeItem = menu.add(new MenuItem("Composite"));
263
- compositeItem.addActionListener(this);
337
+// compositeItem = menu.add(new MenuItem("Composite"));
338
+// 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);
268
- menu.add("-");
269
- randomItem = menu.add(new MenuItem("Switch node"));
270
- randomItem.addActionListener(this);
347
+
348
+// menu.add("-");
349
+//
350
+// switchItem = menu.add(new MenuItem("Switch node"));
351
+// switchItem.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);
....@@ -284,22 +365,20 @@
284365 frameselectorItem.addActionListener(this);
285366 scriptNodeItem = menu.add(new MenuItem("Script Node"));
286367 scriptNodeItem.addActionListener(this);
287
- cameraItem = menu.add(new MenuItem("Camera"));
288
- cameraItem.addActionListener(this);
289368 }
290369
291370 oe.menuBar.add(menu = new Menu("Object"));
292
- textureItem = menu.add(new MenuItem("Texture"));
293
- textureItem.addActionListener(this);
371
+// textureItem = menu.add(new MenuItem("Texture"));
372
+// textureItem.addActionListener(this);
294373 billboardItem = menu.add(new MenuItem("Billboard"));
295374 billboardItem.addActionListener(this);
296375 csgItem = menu.add(new MenuItem("CSG"));
297376 csgItem.addActionListener(this);
298
- shadowXItem = menu.add(new MenuItem("Shadow X"));
377
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
299378 shadowXItem.addActionListener(this);
300
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
379
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
301380 shadowYItem.addActionListener(this);
302
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
381
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
303382 shadowZItem.addActionListener(this);
304383 if (Globals.ADVANCED)
305384 {
....@@ -318,8 +397,12 @@
318397 resetTransformItem.addActionListener(this);
319398 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
320399 resetCentroidItem.addActionListener(this);
321
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
322
- transformgeometryItem.addActionListener(this);
400
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
401
+ resetCentroidXZItem.addActionListener(this);
402
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
403
+ transformGeometryItem.addActionListener(this);
404
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
405
+ transformChildrenItem.addActionListener(this);
323406
324407 oe.menuBar.add(menu = new Menu("Geometry"));
325408 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -368,6 +451,10 @@
368451 oe.menuBar.add(menu = new Menu("Attributes"));
369452 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
370453 clearMaterialsItem.addActionListener(this);
454
+ resetAllItem = menu.add(new MenuItem("Reset All"));
455
+ resetAllItem.addActionListener(this);
456
+ stepAllItem = menu.add(new MenuItem("Step All"));
457
+ stepAllItem.addActionListener(this);
371458 menu.add("-");
372459 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
373460 liveleavesItem.addActionListener(this);
....@@ -388,6 +475,14 @@
388475 markleavesItem.addActionListener(this);
389476 unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
390477 unmarkleavesItem.addActionListener(this);
478
+ rewindleavesItem = menu.add(new MenuItem("Rewind Leaves"));
479
+ rewindleavesItem.addActionListener(this);
480
+ unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves"));
481
+ unrewindleavesItem.addActionListener(this);
482
+ randomleavesItem = menu.add(new MenuItem("Random Leaves"));
483
+ randomleavesItem.addActionListener(this);
484
+ unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves"));
485
+ unrandomleavesItem.addActionListener(this);
391486 menu.add("-");
392487 flipVItem = menu.add(new MenuItem("Flip V"));
393488 flipVItem.addActionListener(this);
....@@ -422,38 +517,41 @@
422517 sortbysizeItem.addActionListener(this);
423518 sortbynameItem = menu.add(new MenuItem("Sort by name"));
424519 sortbynameItem.addActionListener(this);
520
+ menu.add("-");
521
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
522
+ shareGeometriesItem.addActionListener(this);
523
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
524
+ mergeGeometriesItem.addActionListener(this);
425525 if (Globals.ADVANCED)
426526 {
427
- menu.add("-");
527
+ // Pretty much the same as duplicate and clone.
428528 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
429529 extractGeometriesItem.addActionListener(this);
430530 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
431531 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);
436532 }
437533
438534 oe.menuBar.add(menu = new Menu("Insert"));
439535 buildCreateMenu(menu);
440536
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
-
451537 oe.menuBar.add(menu = new Menu("Tools"));
452538 buildToolsMenu(menu);
453539 }
454540
455541 void SetupUI2(ObjEditor oe)
456542 {
543
+ // June 2019
544
+ if (oe == null)
545
+ {
546
+ //super.SetupUI2(this);
547
+ //return;
548
+ }
549
+
550
+ if (copy != group)
551
+ {
552
+ //super.SetupUI2(this);
553
+ }
554
+
457555 //new Exception().printStackTrace();
458556
459557 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -482,97 +580,213 @@
482580 oe.radioPanel.add(dummyButton);
483581 oe.buttonGroup.add(dummyButton);
484582 */
583
+ cGridBag copyOptionsPanel = new cGridBag();
584
+
585
+ copyOptionsPanel.preferredHeight = 1;
586
+
485587 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
486588
487
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
488
- liveCB.setToolTipText("Enabled animation");
589
+ //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
590
+ //minButton.setToolTipText("Minimize window");
591
+ //minButton.addActionListener(this);
592
+
593
+ oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
594
+ maxButton.setToolTipText("Maximize window");
595
+ maxButton.addActionListener(this);
596
+
597
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
598
+ fullButton.setToolTipText("Full-screen window");
599
+ fullButton.addActionListener(this);
600
+
601
+ oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
602
+ restoreCameraButton.setToolTipText("Restore viewpoint");
603
+ restoreCameraButton.addActionListener(this);
604
+
605
+ copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
606
+ undoButton.setToolTipText("Undo changes");
607
+ undoButton.addActionListener(this);
608
+ undoButton.setEnabled(false);
609
+
610
+ copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
611
+ redoButton.setToolTipText("Redo changes");
612
+ redoButton.addActionListener(this);
613
+ redoButton.setEnabled(false);
614
+
615
+ copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
616
+ saveButton.setToolTipText("Save changes");
617
+ saveButton.addActionListener(this);
618
+
619
+ copyOptionsPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
620
+ liveCB.setToolTipText("Enable animation");
489621 liveCB.addItemListener(this);
490622
491
- oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
623
+ copyOptionsPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
492624 oneStepButton.setToolTipText("Animate one step forward");
493625 oneStepButton.addActionListener(this);
494626
495
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
627
+ copyOptionsPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
496628 fastCB.setToolTipText("Fast mode");
497629 fastCB.addItemListener(this);
498630
499
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
500
- trackCB.setToolTipText("Enable tracking");
501
- trackCB.addItemListener(this);
502
-
503
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
631
+ //oe.toolboxPanel.Return();
632
+
633
+ copyOptionsPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
504634 screenfitButton.setToolTipText("Screen fit");
505635 screenfitButton.addActionListener(this);
636
+
637
+// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
638
+// trackCB.setToolTipText("Enable tracking");
639
+// trackCB.addItemListener(this);
506640
507641 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
508642 // screenfitpointButton.addActionListener(this);
509643
510644 if (Globals.ADVANCED)
511645 {
512
- oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
646
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
513647 snapobjectButton.addActionListener(this);
514648 snapobjectButton.setToolTipText("Snap Object");
515649 }
516650
517
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
518
- flashSelectionButton.setToolTipText("Show selection");
519
- flashSelectionButton.addActionListener(this);
651
+ //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
520652
521
- oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
522
-
523
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
653
+ oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
524654 twoButton.setToolTipText("Show center view only");
525655 twoButton.addActionListener(this);
526
- oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
656
+ this.fullscreenLayout = twoButton;
657
+
658
+ oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
527659 fourButton.addActionListener(this);
528660 fourButton.setToolTipText("Show left panel only");
529
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
661
+ oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
530662 sixButton.setToolTipText("2-column layout left");
531663 sixButton.addActionListener(this);
532
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
664
+ oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
533665 threeButton.setToolTipText("2-column layout right");
534666 threeButton.addActionListener(this);
535
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
667
+ oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
536668 sevenButton.setToolTipText("3-column layout");
537669 sevenButton.addActionListener(this);
538670 //
539671
540
- oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
672
+ oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
541673 rootButton.setToolTipText("Edit selection in new tab");
542674 rootButton.addActionListener(this);
543675
544
- oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
676
+ oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
545677 closeButton.setToolTipText("Close tab");
546678 closeButton.addActionListener(this);
547679 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
548680 //clearButton.addActionListener(this);
549
-
550
- cGridBag commandsPanel = new cGridBag();
681
+
682
+ // INSERT
683
+ oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
684
+ gridButton.setToolTipText("Create grid");
685
+ gridButton.addActionListener(this);
686
+
687
+ oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
688
+ boxButton.setToolTipText("Create box");
689
+ boxButton.addActionListener(this);
690
+
691
+ oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
692
+ sphereButton.setToolTipText("Create sphere");
693
+ sphereButton.addActionListener(this);
694
+
695
+ oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
696
+ coneButton.setToolTipText("Create cone");
697
+ coneButton.addActionListener(this);
698
+
699
+ oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
700
+ torusButton.setToolTipText("Create torus");
701
+ torusButton.addActionListener(this);
702
+
703
+ oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
704
+ superButton.setToolTipText("Create superellipsoid");
705
+ superButton.addActionListener(this);
706
+
707
+ if (Globals.ADVANCED)
708
+ {
709
+ oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
710
+ kleinButton.setToolTipText("Create Klein bottle");
711
+ kleinButton.addActionListener(this);
712
+ }
551713
552
- commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
553
- editButton.setToolTipText("Edit selection");
714
+ oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
715
+ particlesButton.setToolTipText("Create particle system");
716
+ particlesButton.addActionListener(this);
717
+
718
+ oe.toolboxPanel.Return();
719
+
720
+ oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
721
+ groupButton.setToolTipText("Create group");
722
+ groupButton.addActionListener(this);
723
+
724
+ oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
725
+ compositeButton.setToolTipText("Create composite");
726
+ compositeButton.addActionListener(this);
727
+
728
+ oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
729
+ switchButton.setToolTipText("Create item switcher");
730
+ switchButton.addActionListener(this);
731
+
732
+ oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
733
+ loopButton.setToolTipText("Create loop");
734
+ loopButton.addActionListener(this);
735
+
736
+ oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
737
+ textureButton.setToolTipText("Create texture");
738
+ textureButton.addActionListener(this);
739
+
740
+ oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
741
+ overlayButton.setToolTipText("Create overlay");
742
+ overlayButton.addActionListener(this);
743
+
744
+ oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
745
+ lightButton.setToolTipText("Create light");
746
+ lightButton.addActionListener(this);
747
+
748
+ for (int i=6; --i>=0;)
749
+ {
750
+ oe.toolboxPanel.Return();
751
+ oe.toolboxPanel.add(new cGridBag());
752
+ oe.toolboxPanel.add(new cGridBag());
753
+ oe.toolboxPanel.add(new cGridBag());
754
+ oe.toolboxPanel.add(new cGridBag());
755
+ oe.toolboxPanel.add(new cGridBag());
756
+ oe.toolboxPanel.add(new cGridBag());
757
+ oe.toolboxPanel.add(new cGridBag());
758
+ }
759
+
760
+ // EDIT panel
761
+ editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
762
+ editButton.setToolTipText("Pin selection controls");
554763 editButton.addActionListener(this);
555764
556
- commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
557
- uneditButton.setToolTipText("Unedit selection");
765
+ editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
766
+ uneditButton.setToolTipText("Remove selection controls");
558767 uneditButton.addActionListener(this);
559768
560
- commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
561
- allParamsButton.setToolTipText("Edit all params");
769
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
770
+ allParamsButton.setToolTipText("Show all controle");
562771 allParamsButton.addActionListener(this);
563772
564
- commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
773
+ editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
565774 clearPanelButton.setToolTipText("Clear edit panel");
566775 clearPanelButton.addActionListener(this);
567776
568
- commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
777
+ editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
569778 unselectButton.setToolTipText("Unselect");
570779 unselectButton.addActionListener(this);
571780
572
- commandsPanel.preferredHeight = 1;
781
+ editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
782
+ flashSelectionButton.setToolTipText("Highlight selection");
783
+ flashSelectionButton.addActionListener(this);
573784
574
- oe.treePanel.add(commandsPanel);
575
- oe.treePanel.Return();
785
+ editCommandsPanel.preferredHeight = 1;
786
+
787
+ SetPinStates(false);
788
+// oe.treePanel.add(commandsPanel);
789
+// oe.treePanel.Return();
576790
577791 // oe.aConstraints.gridx += 1;
578792 // oe.aConstraints.weighty = 0;
....@@ -589,27 +803,12 @@
589803
590804 JScrollPane jSP;
591805 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
592
- jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
806
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
593807 ResetModel();
594808
595809 oe.treePanel.add(jSPPanel);
596810 oe.treePanel.Return();
597811
598
- cGridBag copyOptionsPanel = new cGridBag();
599
-
600
- copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
601
- colorCB.setToolTipText("Copy color when dropped");
602
- colorCB.addItemListener(this);
603
-
604
- copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
605
- materialCB.setToolTipText("Copy material when dropped");
606
- materialCB.addItemListener(this);
607
-
608
- copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
609
- textureCB.setToolTipText("Copy texture when dropped");
610
- textureCB.addItemListener(this);
611
-
612
- copyOptionsPanel.preferredHeight = 1;
613812 oe.treePanel.add(copyOptionsPanel);
614813 oe.treePanel.Return();
615814
....@@ -640,23 +839,43 @@
640839
641840 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
642841 {
842
+ panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
843
+ colorCB.setToolTipText("Copy color when dropped");
844
+ colorCB.addItemListener(this);
845
+
846
+ panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
847
+ materialCB.setToolTipText("Copy material when dropped");
848
+ materialCB.addItemListener(this);
849
+
850
+ panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
851
+ textureCB.setToolTipText("Copy texture when dropped");
852
+ textureCB.addItemListener(this);
853
+
854
+ panel.Return();
855
+
643856 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
644857 boxCB.setToolTipText("Display bounding boxes");
645858 boxCB.addItemListener(this);
646859
647860 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
648
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
861
+ zoomBoxCB.setToolTipText("Display only for wheel");
649862 zoomBoxCB.addItemListener(this);
650863
651
- if (Globals.ADVANCED)
864
+ if (true) // Globals.ADVANCED)
652865 {
653
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
654
- supportCB.setToolTipText("Enable rigging");
655
- supportCB.addItemListener(this);
866
+// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
867
+// supportCB.setToolTipText("Enable rigging");
868
+// supportCB.addItemListener(this);
869
+
870
+ panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints);
871
+ freezeCB.setToolTipText("Fast moving camera");
872
+ freezeCB.addItemListener(this);
656873
657874 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
658875 // localCB.addItemListener(this);
659876
877
+ panel.Return();
878
+
660879 panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
661880 crowdCB.setToolTipText("Used for crowds");
662881 crowdCB.addItemListener(this);
....@@ -673,6 +892,8 @@
673892 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
674893 // speakerMocapCB.addItemListener(this);
675894
895
+ panel.Return();
896
+
676897 if (false)
677898 {
678899 // handled in scripts
....@@ -687,32 +908,72 @@
687908 //constraints.gridy += 1;
688909 panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
689910 smoothfocusCB.addItemListener(this);
911
+ panel.Return();
690912 }
691913
692914 //constraints.gridx += 1;
693915 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
694916 // debugCB.addItemListener(this);
695917
918
+ panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
919
+ trackCB.setToolTipText("Enable tracking target");
920
+ trackCB.addItemListener(this);
921
+
696922 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
923
+ oeilCB.setToolTipText("Move camera when tracking");
697924 oeilCB.addItemListener(this);
698925
926
+ panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
927
+ shadowCB.setToolTipText("When live compute shadows");
928
+ shadowCB.addItemListener(this);
929
+
930
+ panel.Return();
931
+ panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints);
932
+ toggleTextureCB.setToolTipText("Load textures");
933
+ toggleTextureCB.addItemListener(this);
934
+
935
+ panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints);
936
+ toggleSwitchCB.setToolTipText("Choose a single item");
937
+ toggleSwitchCB.addItemListener(this);
938
+
939
+ panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints);
940
+ autosaveCB.setToolTipText("On structure change");
941
+ autosaveCB.addItemListener(this);
942
+
943
+ panel.Return();
944
+ if (Globals.ADVANCED)
945
+ {
699946 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
700947 lookAtCB.setToolTipText("Look-at target");
701948 lookAtCB.addItemListener(this);
949
+ }
702950
703951 }
704952
705953 cGridBag fill = new cGridBag();
706
-
707954 fill.preferredHeight = 200;
955
+ cGridBag fill2 = new cGridBag();
956
+ fill2.preferredHeight = 200;
957
+ cGridBag fill3 = new cGridBag();
958
+ fill3.preferredHeight = 200;
708959
709960 panel.add(fill);
961
+ panel.add(fill2);
962
+ panel.add(fill3);
710963
711964 }
712965
713966 void EditObject(Object3D obj)
714967 {
715968 cRadio radioButton = new cRadio(obj.name);
969
+
970
+ // Patch to avoid bug with transparency.
971
+ radioButton.hadMaterial = obj.material != null;
972
+ if (!radioButton.hadMaterial)
973
+ {
974
+ obj.material = new cMaterial();
975
+ }
976
+
716977 radioButton.SetObject(obj);
717978 radioButton.layout = sevenButton;
718979 radioButton.SetCamera(cameraView.renderCamera, false);
....@@ -721,8 +982,11 @@
721982 buttonGroup.add(radioButton);
722983 radioButton.doClick();
723984 }
985
+
724986 void SetupViews(ObjEditor oe)
725987 {
988
+ theFrame = this;
989
+
726990 oe.SetupViews();
727991
728992 System.out.println("SetupViews");
....@@ -731,23 +995,28 @@
731995 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
732996 }
733997
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;
998
+ cToggleButton liveCB;
999
+ cCheckBox supportCB;
1000
+ cCheckBox localCB;
1001
+ cCheckBox crowdCB;
1002
+ cCheckBox smoothCB;
1003
+ cToggleButton fastCB;
1004
+ cCheckBox slowCB;
1005
+ cCheckBox boxCB;
1006
+ cCheckBox zoomBoxCB;
1007
+ cCheckBox freezeCB;
1008
+ //cToggleButton trackCB;
1009
+ cCheckBox trackCB;
1010
+ cCheckBox smoothfocusCB;
7451011 // JCheckBox speakerMocapCB;
746
- JCheckBox speakerCameraCB;
747
- JCheckBox speakerFocusCB;
748
- JCheckBox debugCB;
749
- JCheckBox oeilCB;
750
- JCheckBox lookAtCB;
1012
+ cCheckBox speakerCameraCB;
1013
+ cCheckBox speakerFocusCB;
1014
+ cCheckBox debugCB;
1015
+
1016
+ cCheckBox oeilCB;
1017
+ cCheckBox shadowCB;
1018
+ cCheckBox autosaveCB;
1019
+ cCheckBox lookAtCB;
7511020
7521021 // static int COLOR = 1;
7531022 // static int MATERIAL = 2;
....@@ -755,9 +1024,9 @@
7551024
7561025 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
7571026
758
- JCheckBox colorCB;
759
- JCheckBox materialCB;
760
- JCheckBox textureCB;
1027
+ cCheckBox colorCB;
1028
+ cCheckBox materialCB;
1029
+ cCheckBox textureCB;
7611030
7621031 public void itemStateChanged(ItemEvent e)
7631032 {
....@@ -785,6 +1054,7 @@
7851054 } else if(e.getSource() == liveCB)
7861055 {
7871056 cameraView.ToggleLive();
1057
+ refreshContents(false);
7881058 }
7891059 else if(e.getSource() == supportCB)
7901060 {
....@@ -849,6 +1119,18 @@
8491119 {
8501120 cameraView.ToggleOeil();
8511121 }
1122
+ else if(e.getSource() == shadowCB)
1123
+ {
1124
+ Globals.COMPUTESHADOWWHENLIVE ^= true;
1125
+ }
1126
+ else if(e.getSource() == freezeCB)
1127
+ {
1128
+ Globals.FREEZEONMOVE ^= true;
1129
+ }
1130
+ else if(e.getSource() == autosaveCB)
1131
+ {
1132
+ Globals.SAVEONMAKE ^= true;
1133
+ }
8521134 else if(e.getSource() == lookAtCB)
8531135 {
8541136 cameraView.ToggleLookAt();
....@@ -865,7 +1147,8 @@
8651147
8661148 /**/
8671149 //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this);
868
- TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1150
+ //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1151
+ TreePath path = objEditor.jTree.getSelectionPath();
8691152 if ((path == null) || (path.getPathCount() <= 1)) {
8701153 // We can't move the root node or an empty selection
8711154 return;
....@@ -937,7 +1220,9 @@
9371220 // objEditor.DropFile((java.io.File[]) object, true);
9381221 // return;
9391222 // }
940
- if (string.charAt(0) == '/')
1223
+
1224
+ // File path for Mac and Windows
1225
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
9411226 {
9421227 // file(s)
9431228 String[] names = string.split("\n");
....@@ -964,7 +1249,7 @@
9641249
9651250 flashIt = false;
9661251 CameraPane pane = (CameraPane) target;
967
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1252
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
9681253 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
9691254
9701255 if (group.selection.size() == 1)
....@@ -980,23 +1265,33 @@
9801265
9811266 assert target == objEditor.jTree;
9821267 TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y);
1268
+ Object3D destinationLeaf;
9831269 try {
984
- Object3D dummy = (Composite) destinationPath.getLastPathComponent();
1270
+ destinationLeaf = (Composite) destinationPath.getLastPathComponent();
9851271 } catch (Exception e) {
9861272 System.out.println("destinationPath : " + destinationPath);
9871273 return;
9881274 }
9891275
990
- if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1276
+ for (int i=group.selection.size(); --i>=0;)
9911277 {
1278
+ Object3D child = (Object3D)group.selection.elementAt(i);
1279
+
1280
+ // Cannot move into itself
1281
+ if (child == destinationLeaf)
1282
+ return;
1283
+ }
1284
+
1285
+// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1286
+// {
9921287 loadClipboard(true);
9931288 objEditor.jTree.setSelectionPath(destinationPath);
9941289 pasteInto(false, false);
995
- } else {
996
- loadClipboard(false);
997
- objEditor.jTree.setSelectionPath(destinationPath);
998
- pasteInto(false, false); // true); // ???
999
- }
1290
+// } else {
1291
+// loadClipboard(false);
1292
+// objEditor.jTree.setSelectionPath(destinationPath);
1293
+// pasteInto(false, false); // true); // ???
1294
+// }
10001295 }
10011296 public void dropActionChanged(DropTargetDragEvent dtde)
10021297 // Called if the user has modified the current drop gesture
....@@ -1101,22 +1396,30 @@
11011396 {
11021397 //heightFieldItem = menu.add(new MenuItem("Height Field"));
11031398 //heightFieldItem.addActionListener(this);
1104
- gridItem = menu.add(new MenuItem("Grid"));
1105
- gridItem.addActionListener(this);
1106
- rectoidItem = menu.add(new MenuItem("Box"));
1107
- rectoidItem.addActionListener(this);
1108
- ellipsoidItem = menu.add(new MenuItem("Sphere"));
1109
- ellipsoidItem.addActionListener(this);
1110
- coneItem = menu.add(new MenuItem("Cone"));
1111
- coneItem.addActionListener(this);
1112
- torusItem = menu.add(new MenuItem("Torus"));
1113
- torusItem.addActionListener(this);
1114
- superItem = menu.add(new MenuItem("Superellipsoid"));
1115
- superItem.addActionListener(this);
1399
+// gridItem = menu.add(new MenuItem("Grid"));
1400
+// gridItem.addActionListener(this);
1401
+// rectoidItem = menu.add(new MenuItem("Box"));
1402
+// rectoidItem.addActionListener(this);
1403
+// ellipsoidItem = menu.add(new MenuItem("Sphere"));
1404
+// ellipsoidItem.addActionListener(this);
1405
+// coneItem = menu.add(new MenuItem("Cone"));
1406
+// coneItem.addActionListener(this);
1407
+// torusItem = menu.add(new MenuItem("Torus"));
1408
+// torusItem.addActionListener(this);
1409
+// superItem = menu.add(new MenuItem("Superellipsoid"));
1410
+// superItem.addActionListener(this);
1411
+
1412
+ cameraItem = menu.add(new MenuItem("Camera"));
1413
+ cameraItem.addActionListener(this);
1414
+
1415
+ if (!Globals.ADVANCED)
1416
+ {
11161417 kleinItem = menu.add(new MenuItem("Klein Bottle"));
11171418 kleinItem.addActionListener(this);
1118
- particleItem = menu.add(new MenuItem("Particle system"));
1119
- particleItem.addActionListener(this);
1419
+ }
1420
+
1421
+// particleItem = menu.add(new MenuItem("Particle system"));
1422
+// particleItem.addActionListener(this);
11201423 if (Globals.ADVANCED)
11211424 {
11221425 ragdollItem = menu.add(new MenuItem("Rag Walk"));
....@@ -1142,15 +1445,15 @@
11421445 }
11431446 bezierItem = menu.add(new MenuItem("Bezier Patch"));
11441447 bezierItem.addActionListener(this);
1145
- overlayItem = menu.add(new MenuItem("Overlay"));
1146
- overlayItem.addActionListener(this);
1147
- lightItem = menu.add(new MenuItem("Light"));
1148
- lightItem.addActionListener(this);
1448
+// overlayItem = menu.add(new MenuItem("Overlay"));
1449
+// overlayItem.addActionListener(this);
1450
+// lightItem = menu.add(new MenuItem("Light"));
1451
+// lightItem.addActionListener(this);
11491452 menu.add("-");
11501453 //superLoopItem = menu.add(new MenuItem("Super Loop"));
11511454 //superLoopItem.addActionListener(this);
1152
- loopItem = menu.add(new MenuItem("Loop"));
1153
- loopItem.addActionListener(this);
1455
+// loopItem = menu.add(new MenuItem("Loop"));
1456
+// loopItem.addActionListener(this);
11541457 doubleItem = menu.add(new MenuItem("Fork"));
11551458 doubleItem.addActionListener(this);
11561459 if (Globals.ADVANCED)
....@@ -1190,7 +1493,7 @@
11901493 memoryItem.addActionListener(this);
11911494 menu.add(analyzeItem = new MenuItem("Analyze"));
11921495 analyzeItem.addActionListener(this);
1193
- menu.add(dumpItem = new MenuItem("Dump"));
1496
+ menu.add(dumpItem = new MenuItem("Print"));
11941497 dumpItem.addActionListener(this);
11951498 // menu.add(pathItem = new MenuItem("From-to path"));
11961499 // pathItem.addActionListener(this);
....@@ -1331,9 +1634,24 @@
13311634 shadow.material = new cMaterial(obj.material);
13321635 shadow.material.diffuse = 0.0001f;
13331636 shadow.material.specular = 0.0001f;
1637
+ //shadow.projectedVertices[1].x = 300;
13341638
13351639 makeSomething(shadow);
13361640 }
1641
+
1642
+ private void ClearUnpinned()
1643
+ {
1644
+ //for (Object3D obj : listUI)
1645
+ for (int i=listUI.size(); --i>=0;)
1646
+ {
1647
+ Object3D obj = listUI.elementAt(i);
1648
+ if (!obj.pinned)
1649
+ {
1650
+ obj.CloseUI();
1651
+ listUI.remove(i);
1652
+ }
1653
+ }
1654
+ }
13371655
13381656 /**
13391657 * applyExample
....@@ -1537,9 +1855,9 @@
15371855
15381856 void Overwrite(int mask)
15391857 {
1540
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1858
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
15411859 {
1542
- Object3D content = GrafreeD.clipboard.get(0);
1860
+ Object3D content = Grafreed.clipboard.get(0);
15431861
15441862 if (content instanceof cGroup && ((cGroup)content).transientlink )
15451863 content = ((cGroup)content).get(0);
....@@ -1578,7 +1896,7 @@
15781896 {
15791897 ScreenFit();
15801898 } else
1581
- if (source == switchItem)
1899
+ if (source == switchViewItem)
15821900 {
15831901 cVector v1 = new cVector();
15841902 cVector v2 = new cVector();
....@@ -1587,11 +1905,11 @@
15871905 objEditor.cameraView.renderCamera.setAim(v2, v1);
15881906 objEditor.cameraView.repaint();
15891907 } else
1590
- if (source == rectoidItem)
1908
+ if (source == rectoidItem || source == boxButton)
15911909 {
15921910 makeSomething(new Box());
15931911 } else
1594
- if (source == particleItem)
1912
+ if (source == particleItem || source == particlesButton)
15951913 {
15961914 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15971915 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1670,27 +1988,27 @@
16701988
16711989 makeSomething(obj);
16721990 } else
1673
- if (source == gridItem)
1991
+ if (source == gridItem || source == gridButton)
16741992 {
16751993 makeSomething(new Grid());
16761994 } else
1677
- if (source == ellipsoidItem)
1995
+ if (source == ellipsoidItem || source == sphereButton)
16781996 {
16791997 makeSomething(new Sphere());
16801998 } else
1681
- if (source == coneItem)
1999
+ if (source == coneItem || source == coneButton)
16822000 {
16832001 makeSomething(new Cone());
16842002 } else
1685
- if (source == torusItem)
2003
+ if (source == torusItem || source == torusButton)
16862004 {
16872005 makeSomething(new Torus());
16882006 } else
1689
- if (source == superItem)
2007
+ if (source == superItem || source == superButton)
16902008 {
16912009 makeSomething(new Superellipsoid());
16922010 } else
1693
- if (source == kleinItem)
2011
+ if (source == kleinItem || source == kleinButton)
16942012 {
16952013 makeSomething(new Klein());
16962014 } else
....@@ -1710,7 +2028,7 @@
17102028 {
17112029 makeSomething(new BezierSurface());
17122030 } else
1713
- if (source == overlayItem)
2031
+ if (source == overlayItem || source == overlayButton)
17142032 {
17152033 /*
17162034 Object3D obj = new BezierSurface(5,8);
....@@ -1758,7 +2076,7 @@
17582076 s.setup();
17592077 makeSomething(s);
17602078 } else
1761
- if (source == lightItem)
2079
+ if (source == lightItem || source == lightButton)
17622080 {
17632081 makeSomething(new Light());
17642082 } else
....@@ -1808,30 +2126,30 @@
18082126
18092127 group(g);
18102128 } else
1811
- if (source == loopItem)
2129
+ if (source == loopItem || source == loopButton)
18122130 {
18132131 Composite csg = new GroupLeaf();
18142132 csg.count = 5;
18152133 group(csg);
1816
- Composite child = new cGroup();
2134
+ Composite child = new cGroup("Branch");
18172135 csg.addChild(child);
18182136 child.addChild(csg);
18192137 } else
18202138 if (source == doubleItem)
18212139 {
1822
- Composite csg = new GroupLeaf();
2140
+ Composite csg = new GroupLeaf("Fork");
18232141 csg.count = 5;
18242142 group(csg);
1825
- Composite child = new cGroup();
2143
+ Composite child = new cGroup("Branch A");
18262144 csg.addChild(child);
18272145 child.addChild(csg);
1828
- child = new cGroup();
2146
+ child = new cGroup("Branch B");
18292147 csg.addChild(child);
18302148 child.addChild(csg);
18312149 } else
18322150 if (source == tripleItem)
18332151 {
1834
- Composite csg = new GroupLeaf();
2152
+ Composite csg = new GroupLeaf("Trident");
18352153 csg.count = 4;
18362154 group(csg);
18372155 Composite child = new cGroup();
....@@ -1843,23 +2161,6 @@
18432161 child = new cGroup();
18442162 csg.addChild(child);
18452163 child.addChild(csg);
1846
- } 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");
18632164 } else
18642165 if (source == computeAOItem)
18652166 {
....@@ -1879,7 +2180,7 @@
18792180 if (source == invariantsItem)
18802181 {
18812182 System.out.println("Invariants:");
1882
- GrafreeD.grafreeD.universe.invariants();
2183
+ Grafreed.grafreeD.universe.invariants();
18832184 } else
18842185 if (source == memoryItem)
18852186 {
....@@ -1897,6 +2198,30 @@
18972198 if (source == dumpItem)
18982199 {
18992200 DumpObject();
2201
+ } else
2202
+ if (source == minButton)
2203
+ {
2204
+ Minimize();
2205
+ } else
2206
+ if (source == maxButton)
2207
+ {
2208
+ Maximize();
2209
+ } else
2210
+ if (source == fullButton)
2211
+ {
2212
+ ToggleFullScreen();
2213
+ } else
2214
+ if (source == undoButton)
2215
+ {
2216
+ Undo();
2217
+ } else
2218
+ if (source == redoButton)
2219
+ {
2220
+ Redo();
2221
+ } else
2222
+ if (source == saveButton)
2223
+ {
2224
+ Save();
19002225 } else
19012226 if (source == oneStepButton)
19022227 {
....@@ -1952,12 +2277,20 @@
19522277 {
19532278 loadClipboard(true);
19542279 } else
2280
+ if (source == undoItem)
2281
+ {
2282
+ Undo();
2283
+ } else
2284
+ if (source == redoItem)
2285
+ {
2286
+ Redo();
2287
+ } else
19552288 if (source == duplicateItem)
19562289 {
1957
- Object3D keep = GrafreeD.clipboard;
2290
+ Object3D keep = Grafreed.clipboard;
19582291 loadClipboard(false);
19592292 paste(false);
1960
- GrafreeD.clipboard = keep;
2293
+ Grafreed.clipboard = keep;
19612294 } else
19622295 if (source == cloneItem)
19632296 {
....@@ -2177,9 +2510,9 @@
21772510 // group.selection.get(0).setMasterThis(content); // should be identity
21782511 // refreshContents();
21792512 // }
2180
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2513
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21812514 {
2182
- Object3D content = GrafreeD.clipboard.get(0);
2515
+ Object3D content = Grafreed.clipboard.get(0);
21832516
21842517 if (content instanceof cGroup && ((cGroup)content).transientlink )
21852518 content = ((cGroup)content).get(0);
....@@ -2229,9 +2562,9 @@
22292562 } else
22302563 if (source == setMasterItem)
22312564 {
2232
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2565
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
22332566 {
2234
- Object3D content = GrafreeD.clipboard.get(0);
2567
+ Object3D content = Grafreed.clipboard.get(0);
22352568
22362569 if (content instanceof cGroup && ((cGroup)content).transientlink )
22372570 content = ((cGroup)content).get(0);
....@@ -2244,9 +2577,9 @@
22442577 {
22452578 if (group.selection.size() == 1)
22462579 {
2247
- if (GrafreeD.clipboard.size() == 1)
2580
+ if (Grafreed.clipboard.size() == 1)
22482581 {
2249
- Object3D content = GrafreeD.clipboard.get(0);
2582
+ Object3D content = Grafreed.clipboard.get(0);
22502583
22512584 if (content instanceof cGroup && ((cGroup)content).transientlink )
22522585 content = ((cGroup)content).get(0);
....@@ -2263,7 +2596,7 @@
22632596 {
22642597 RevertMeshes();
22652598 } else
2266
- if (source == resetMeshItem)
2599
+ if (source == resetAllItem)
22672600 {
22682601 ResetAll();
22692602 } else
....@@ -2283,9 +2616,9 @@
22832616 {
22842617 ClearSelection(true);
22852618 } else
2286
- if (source == grabItem)
2619
+ if (source == grabItem || source == groupButton)
22872620 {
2288
- group(new cGroup(), true);
2621
+ group(new cGroup(), false); // true);
22892622 } else
22902623 if (source == hideItem)
22912624 {
....@@ -2303,11 +2636,11 @@
23032636 {
23042637 makeSomething(new Camera());
23052638 } else
2306
- if (source == compositeItem)
2639
+ if (source == compositeItem || source == compositeButton)
23072640 {
23082641 group(new Composite());
23092642 } else
2310
- if (source == randomItem)
2643
+ if (source == switchItem || source == switchButton)
23112644 {
23122645 RandomNode random = new RandomNode();
23132646 group(random);
....@@ -2409,7 +2742,7 @@
24092742 {
24102743 group(new cLinker());
24112744 } else
2412
- if (source == textureItem)
2745
+ if (source == textureItem || source == textureButton)
24132746 {
24142747 group(new TextureNode());
24152748 } else
....@@ -2429,17 +2762,30 @@
24292762 {
24302763 CastShadow(2);
24312764 } else
2432
- if (source == ungroupItem)
2765
+ if (source == ungroupItem || source == ungroupButton)
24332766 {
2434
- //ungroup();
2767
+ boolean hasRoot = false;
2768
+
24352769 for (int i=0; i<group.selection.size(); i++)
24362770 {
2437
- Ungroup(group.selection.get(i));
2771
+ if (group.selection.get(i) == group)
2772
+ {
2773
+ hasRoot = true;
2774
+ break;
2775
+ }
24382776 }
24392777
2440
- ClearSelection(false);
2441
-
2442
- refreshContents();
2778
+ if (!hasRoot)
2779
+ {
2780
+ for (int i=0; i<group.selection.size(); i++)
2781
+ {
2782
+ Ungroup(group.selection.get(i));
2783
+ }
2784
+
2785
+ ClearSelection(false);
2786
+
2787
+ refreshContents();
2788
+ }
24432789 } else
24442790 if (source == genUVItem)
24452791 {
....@@ -2451,7 +2797,7 @@
24512797 } else
24522798 if (source == genNormalsMESHItem)
24532799 {
2454
- GenNormals(true); // TODO
2800
+ GenNormalsMESH();
24552801 } else
24562802 if (source == genNormalsORGANItem)
24572803 {
....@@ -2516,6 +2862,22 @@
25162862 if (source == unmarkleavesItem)
25172863 {
25182864 MarkLeaves(false);
2865
+ } else
2866
+ if (source == rewindleavesItem)
2867
+ {
2868
+ RewindLeaves(true);
2869
+ } else
2870
+ if (source == unrewindleavesItem)
2871
+ {
2872
+ RewindLeaves(false);
2873
+ } else
2874
+ if (source == randomleavesItem)
2875
+ {
2876
+ RandomLeaves(true);
2877
+ } else
2878
+ if (source == unrandomleavesItem)
2879
+ {
2880
+ RandomLeaves(false);
25192881 } else
25202882 if (source == flipVItem)
25212883 {
....@@ -2601,9 +2963,13 @@
26012963 {
26022964 SmoothMesh();
26032965 } else
2604
- if (source == transformgeometryItem)
2966
+ if (source == transformGeometryItem)
26052967 {
26062968 TransformGeometry();
2969
+ } else
2970
+ if (source == transformChildrenItem)
2971
+ {
2972
+ TransformChildren();
26072973 } else
26082974 if (source == resetTransformItem)
26092975 {
....@@ -2611,7 +2977,11 @@
26112977 } else
26122978 if (source == resetCentroidItem)
26132979 {
2614
- ResetCentroid();
2980
+ ResetCentroid(true);
2981
+ } else
2982
+ if (source == resetCentroidXZItem)
2983
+ {
2984
+ ResetCentroid(false);
26152985 } else
26162986 if (source == resetParentItem)
26172987 {
....@@ -2743,6 +3113,10 @@
27433113 if (source == twoButton)
27443114 {
27453115 radio.layout = twoButton;
3116
+
3117
+ if (CameraPane.FULLSCREEN)
3118
+ fullscreenLayout = radio.layout;
3119
+
27463120 // bug
27473121 //gridPanel.setDividerLocation(1.0);
27483122 //bigPanel.setDividerLocation(0.0);
....@@ -2775,10 +3149,31 @@
27753149 bigThree.ClearUI();
27763150 bigThree.add(centralPanel);
27773151 bigThree.FlushUI();
3152
+
3153
+ cameraView.requestFocusInWindow();
3154
+
3155
+// refreshContents(true);
3156
+//
3157
+// try
3158
+// {
3159
+// java.awt.Robot bot = new java.awt.Robot();
3160
+// int mask = InputEvent.BUTTON1_MASK;
3161
+// bot.mouseMove(100, 100);
3162
+// bot.mousePress(mask);
3163
+// bot.mouseRelease(mask);
3164
+// }
3165
+// catch (Exception e)
3166
+// {
3167
+//
3168
+// }
3169
+
27783170 } else
27793171 if (source == threeButton)
27803172 {
27813173 radio.layout = threeButton;
3174
+
3175
+ if (CameraPane.FULLSCREEN)
3176
+ fullscreenLayout = radio.layout;
27823177
27833178 // bigThree.remove(scenePanel);
27843179 // bigThree.remove(centralPanel);
....@@ -2811,10 +3206,15 @@
28113206 bigThree.add(centralPanel);
28123207 bigThree.add(XYZPanel);
28133208 bigThree.FlushUI();
3209
+
3210
+ cameraView.requestFocusInWindow();
28143211 } else
28153212 if (source == fourButton)
28163213 {
28173214 radio.layout = fourButton;
3215
+
3216
+ if (CameraPane.FULLSCREEN)
3217
+ fullscreenLayout = radio.layout;
28183218
28193219 // bigThree.remove(scenePanel);
28203220 // bigThree.remove(centralPanel);
....@@ -2846,10 +3246,15 @@
28463246 bigThree.ClearUI();
28473247 bigThree.add(scenePanel);
28483248 bigThree.FlushUI();
3249
+
3250
+ cameraView.requestFocusInWindow();
28493251 } else
28503252 if (source == sixButton)
28513253 {
28523254 radio.layout = sixButton;
3255
+
3256
+ if (CameraPane.FULLSCREEN)
3257
+ fullscreenLayout = radio.layout;
28533258
28543259 // bigThree.remove(scenePanel);
28553260 // bigThree.remove(centralPanel);
....@@ -2882,10 +3287,15 @@
28823287 bigThree.add(scenePanel);
28833288 bigThree.add(centralPanel);
28843289 bigThree.FlushUI();
3290
+
3291
+ cameraView.requestFocusInWindow();
28853292 } else
28863293 if (source == sevenButton)
28873294 {
28883295 radio.layout = sevenButton;
3296
+
3297
+ if (CameraPane.FULLSCREEN)
3298
+ fullscreenLayout = radio.layout;
28893299
28903300 // bigThree.remove(scenePanel);
28913301 // bigThree.remove(centralPanel);
....@@ -2919,6 +3329,8 @@
29193329 bigThree.add(centralPanel);
29203330 bigThree.add(XYZPanel);
29213331 bigThree.FlushUI();
3332
+
3333
+ cameraView.requestFocusInWindow();
29223334 } else
29233335 if (source == rootButton)
29243336 {
....@@ -2930,6 +3342,7 @@
29303342 EditObject(obj);
29313343 }
29323344
3345
+ cameraView.requestFocusInWindow();
29333346 refreshContents(true);
29343347 } else
29353348 if (source == closeButton)
....@@ -2939,22 +3352,37 @@
29393352 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
29403353 {
29413354 ab = (cRadio)e.nextElement();
2942
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3355
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
29433356 {
3357
+ // Patch to avoid bug with transparency.
3358
+ if (!ab.hadMaterial)
3359
+ {
3360
+ ab.object.material = null;
3361
+ }
3362
+
29443363 buttonGroup.remove(ab);
29453364 radioPanel.remove(ab);
29463365
2947
- ab.GetObject().editWindow = null;
3366
+ //ab.GetObject().editWindow = null;
3367
+ ab.GetObject().manipWindow = null;
29483368 // ab.GetObject().objectUI = null; // ?????????
29493369
29503370 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
29513371 break;
29523372 }
29533373 }
3374
+
3375
+ cameraView.requestFocusInWindow();
29543376 refreshContents(true);
29553377 } else
29563378 if (source == editItem || source == editButton)
29573379 {
3380
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3381
+ {
3382
+ Object3D child = (Object3D)e.nextElement();
3383
+ child.pinned = true;
3384
+ }
3385
+
29583386 EditSelection(false);
29593387 } else
29603388 if (source == uneditButton)
....@@ -2964,10 +3392,11 @@
29643392 Object3D child = (Object3D)e.nextElement();
29653393 if(child.editWindow != null)
29663394 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3395
+ child.pinned = false;
29673396 child.CloseUI();
29683397 listUI.remove(child);
29693398
2970
- child.editWindow = null; // ???????????
3399
+ //child.editWindow = null; // ???????????
29713400 }
29723401 objEditor.ctrlPanel.FlushUI();
29733402 //objEditor.jTree.clearSelection();
....@@ -2980,6 +3409,7 @@
29803409 //copy.ClearUI();
29813410 for (Object3D obj : listUI)
29823411 {
3412
+ obj.pinned = false;
29833413 obj.CloseUI();
29843414 }
29853415 listUI.clear();
....@@ -2989,7 +3419,7 @@
29893419 {
29903420 assert(copy == group);
29913421
2992
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3422
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
29933423
29943424 for (Object3D obj : listUI)
29953425 {
....@@ -3053,20 +3483,44 @@
30533483 frontView.object = group;
30543484 sideView.object = group;
30553485 }
3056
- group.editWindow = this;
3486
+
3487
+// fix "+" issue
3488
+ //group.editWindow = this;
3489
+ group.manipWindow = this;
3490
+
30573491 /*
30583492 currentLayout = radio.layout;
30593493 if (currentLayout == null)
30603494 currentLayout = sevenButton;
30613495 */
30623496 radio.layout.doClick();
3497
+
3498
+ ClearUnpinned();
3499
+ SetPinStates(group.selection.size() > 0);
3500
+ if (group.selection.size() == 1)
3501
+ EditSelection(false);
30633502 keepparent = group.parent;
30643503 // PARENT = NULL or not???
30653504 //group.parent = null; // ROOT
30663505 //group.attributes = -1;
30673506 ResetModel();
3507
+
3508
+ cameraView.requestFocusInWindow();
30683509 refreshContents(true);
3069
- }
3510
+ } else if (event.getSource() == editCameraItem)
3511
+ {
3512
+ cameraView.ProtectCamera();
3513
+ cameraView.repaint();
3514
+ return;
3515
+ } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton)
3516
+ {
3517
+ cameraView.RevertCamera();
3518
+ cameraView.repaint();
3519
+ return;
3520
+ // } else if (event.getSource() == textureButton)
3521
+ // {
3522
+ // return; // true;
3523
+ }
30703524 else
30713525 {
30723526 //return super.action(event, arg);
....@@ -3075,7 +3529,6 @@
30753529 }
30763530
30773531 boolean useclient = false;
3078
- cRadio radio;
30793532
30803533 void ToggleRoot()
30813534 {
....@@ -3127,6 +3580,28 @@
31273580 refreshContents();
31283581 }
31293582
3583
+ void TransformChildren()
3584
+ {
3585
+ Object3D obj;
3586
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3587
+ {
3588
+ obj = (Object3D)e.nextElement();
3589
+ obj.KeepTextureMatrices();
3590
+ obj.TransformChildren();
3591
+ obj.RestoreTextureMatrices();
3592
+
3593
+// if (obj.parent == null)
3594
+// {
3595
+// System.out.println("NULL PARENT!");
3596
+// new Exception().printStackTrace();
3597
+// }
3598
+// else
3599
+// TouchTransform(obj);
3600
+// //obj.parent.Touch();
3601
+ }
3602
+
3603
+ refreshContents();
3604
+ }
31303605
31313606 void ResetTransform()
31323607 {
....@@ -3239,7 +3714,7 @@
32393714 refreshContents();
32403715 }
32413716
3242
- void ResetCentroid()
3717
+ void ResetCentroid(boolean full)
32433718 {
32443719 Object3D obj;
32453720 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3254,12 +3729,16 @@
32543729 LA.matIdentity(Object3D.mat);
32553730 obj.getBounds(minima, maxima, false);
32563731 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3257
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3732
+ if (full)
3733
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
32583734 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
32593735 obj.TransformMesh(Object3D.mat);
3736
+
32603737 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3261
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3738
+ if (full)
3739
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
32623740 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3741
+
32633742 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
32643743 //Object3D.mat[3][0] = -Object3D.mat[3][0];
32653744 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3288,7 +3767,8 @@
32883767
32893768 int size = obj.MemorySize();
32903769
3291
- System.err.println((size/1024) + " KB is the size of " + obj);
3770
+ //System.err.println((size/1024) + " KB is the size of " + obj);
3771
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
32923772 }
32933773 }
32943774 catch (Exception e)
....@@ -3325,9 +3805,9 @@
33253805 obj = (Object3D)e.nextElement();
33263806
33273807 System.out.println("Object is: " + obj);
3328
- GrafreeD.AnalyzeObject(obj);
3808
+ Grafreed.AnalyzeObject(obj);
33293809 System.out.println("Boundary rep: " + obj.bRep);
3330
- GrafreeD.AnalyzeObject(obj.bRep);
3810
+ Grafreed.AnalyzeObject(obj.bRep);
33313811
33323812 // System.err.println((size/1024) + " KB is the size of " + obj);
33333813 }
....@@ -3369,6 +3849,13 @@
33693849 void GenNormals(boolean crease)
33703850 {
33713851 group.GenNormalsS(crease);
3852
+
3853
+ refreshContents();
3854
+ }
3855
+
3856
+ void GenNormalsMESH()
3857
+ {
3858
+ group.GenNormalsMeshS();
33723859
33733860 refreshContents();
33743861 }
....@@ -3541,8 +4028,8 @@
35414028
35424029 void ParseVertices()
35434030 {
3544
- boolean epsequal = GrafreeD.epsequal;
3545
- GrafreeD.epsequal = true;
4031
+ boolean epsequal = Grafreed.epsequal;
4032
+ Grafreed.epsequal = true;
35464033
35474034 for (int i=0; i<group.selection.size(); i++)
35484035 {
....@@ -3567,7 +4054,7 @@
35674054 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
35684055 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
35694056
3570
- g.add(GrafreeD.clipboard);
4057
+ g.add(Grafreed.clipboard);
35714058
35724059 buffer.add(g);
35734060 }
....@@ -3582,7 +4069,7 @@
35824069 makeSomething(buffer, i==group.selection.size()-1);
35834070 }
35844071
3585
- GrafreeD.epsequal = epsequal;
4072
+ Grafreed.epsequal = epsequal;
35864073
35874074 refreshContents();
35884075 }
....@@ -3600,7 +4087,16 @@
36004087 String pigment = Object3D.GetPigment(tex);
36014088 //String bump = Object3D.GetBump(tex);
36024089
3603
- com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
4090
+ com.sun.opengl.util.texture.TextureData texturedata = null;
4091
+
4092
+ try
4093
+ {
4094
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
4095
+ }
4096
+ catch (Exception e)
4097
+ {
4098
+ System.err.println("FAIL: " + node);
4099
+ }
36044100
36054101 double s = v.s;
36064102
....@@ -3732,7 +4228,7 @@
37324228 return;
37334229
37344230 Object3D poses = group.selection.get(0);
3735
- Object3D ref = GrafreeD.clipboard.get(0);
4231
+ Object3D ref = Grafreed.clipboard.get(0);
37364232
37374233 Object3D newgroup = new Object3D("Po:" + poses.name);
37384234
....@@ -3926,9 +4422,9 @@
39264422
39274423 void ClipMesh()
39284424 {
3929
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
4425
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
39304426 {
3931
- Object3D content = GrafreeD.clipboard.get(0);
4427
+ Object3D content = Grafreed.clipboard.get(0);
39324428
39334429 if (content instanceof cGroup && ((cGroup)content).transientlink )
39344430 content = ((cGroup)content).get(0);
....@@ -3937,7 +4433,7 @@
39374433 // {
39384434 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
39394435 // }
3940
- group.selection.ClipMesh(GrafreeD.clipboard);
4436
+ group.selection.ClipMesh(Grafreed.clipboard);
39414437 }
39424438 // group.selection.ClipMesh(GrafreeD.clipboard);
39434439 System.out.println("DONE.");
....@@ -3984,6 +4480,18 @@
39844480 void MarkLeaves(boolean hide)
39854481 {
39864482 group.selection.MarkLeaves(hide);
4483
+ refreshContents();
4484
+ }
4485
+
4486
+ void RewindLeaves(boolean hide)
4487
+ {
4488
+ group.selection.RewindLeaves(hide);
4489
+ refreshContents();
4490
+ }
4491
+
4492
+ void RandomLeaves(boolean hide)
4493
+ {
4494
+ group.selection.RandomLeaves(hide);
39874495 refreshContents();
39884496 }
39894497
....@@ -4058,10 +4566,6 @@
40584566 // }
40594567 // }
40604568
4061
- static boolean allparams = true;
4062
-
4063
- static Vector<Object3D> listUI = new Vector<Object3D>();
4064
-
40654569 void EditSelection(boolean newWindow)
40664570 {
40674571 // aConstraints.gridy = 0;
....@@ -4069,10 +4573,10 @@
40694573 {
40704574 //System.out.println("edit : " + objectPanel.indexOfTab("Material"));
40714575 //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false);
4072
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
4576
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
40734577
40744578 Object3D elem = (Object3D)group.selection.elementAt(i);
4075
- if(elem != group)
4579
+ if(elem != group || !newWindow)
40764580 {
40774581 // if (!(elem instanceof Composite))
40784582 // newWindow = false;
....@@ -4154,7 +4658,8 @@
41544658 //new Exception().printStackTrace();
41554659
41564660 freezemodel = true;
4157
-
4661
+ ClearUnpinned();
4662
+
41584663 /**/
41594664 //switch (event.id)
41604665 {
....@@ -4162,7 +4667,6 @@
41624667 //case 702: // Event.LIST_DESELECT
41634668 group.deselectAll();
41644669 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4165
- objEditor.ClearInfo(); // .GetMaterial());
41664670 if (tps != null)
41674671 {
41684672 for (int i=0; i < tps.length; i++)
....@@ -4171,10 +4675,8 @@
41714675
41724676 //if (child.parent != null)
41734677 //child.parent.addSelectee(child);
4678
+ objEditor.SetMaterial(child);
41744679 group.addSelectee(child);
4175
- objEditor.SetMaterial(child); // .GetMaterial());
4176
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4177
- System.err.println("info : " + child.GetPath());
41784680 }
41794681 }
41804682 // else
....@@ -4184,20 +4686,28 @@
41844686 // System.err.println("info : " + group.GetPath());
41854687 // }
41864688
4187
- objEditor.SetText(); // jan 2014
4188
-
4189
- if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4689
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
41904690 CameraPane.flash = true;
41914691
4192
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4692
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
41934693 // a camera
41944694 {
4195
- CameraPane.camerachangeframe = 0; // don't refuse it
4196
- Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4695
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace
4696
+ {
4697
+ CameraPane.camerachangeframe = 0; // don't refuse it
4698
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4699
+ }
41974700 // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
41984701 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
41994702 }
42004703
4704
+ if (tps != null && tps.length == 1)
4705
+ {
4706
+ EditSelection(false);
4707
+ }
4708
+
4709
+ SetPinStates(tps != null && tps.length > 0);
4710
+
42014711 refreshContents();
42024712 //return true;
42034713 }
....@@ -4206,6 +4716,35 @@
42064716
42074717 freezemodel = false;
42084718 }
4719
+
4720
+ void SetPinStates(boolean enabled)
4721
+ {
4722
+ editButton.setEnabled(enabled);
4723
+ uneditButton.setEnabled(enabled);
4724
+ unselectButton.setEnabled(enabled);
4725
+ flashSelectionButton.setEnabled(enabled);
4726
+ }
4727
+
4728
+ void refreshContents(boolean cp)
4729
+ {
4730
+ if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info"))
4731
+ if (!Globals.MOUSEDRAGGED) // && !Globals.TIMERRUNNING)
4732
+ {
4733
+ objEditor.ClearInfo(); // .GetMaterial());
4734
+
4735
+ for (int i=0; i < group.selection.Size(); i++)
4736
+ {
4737
+ Object3D child = (Object3D) group.selection.get(i);
4738
+
4739
+ objEditor.AddInfo(child, this, true);
4740
+ System.err.println("info : " + child.GetPath());
4741
+ }
4742
+
4743
+ objEditor.SetText(); // jan 2014
4744
+ }
4745
+
4746
+ super.refreshContents(cp);
4747
+ }
42094748
42104749 void linkSomething(Object3D thing)
42114750 {
....@@ -4277,16 +4816,19 @@
42774816 {
42784817 if (group.selection.isEmpty())
42794818 return;
4280
- GrafreeD.clipboardIsTempGroup = false;
4819
+
4820
+ Grafreed.clipboardIsTempGroup = false;
42814821 Composite tGroup = null;
42824822 if (group.selection.size() > 0) // 1)
42834823 {
42844824 tGroup = new cGroup();
4285
- GrafreeD.clipboardIsTempGroup = true;
4825
+ Grafreed.clipboardIsTempGroup = true;
42864826 }
42874827
42884828 if (cut)
42894829 {
4830
+ if (Globals.SAVEONMAKE)
4831
+ Save();
42904832 //int indices[] = jList.getSelectedIndices();
42914833 //for (int i = indices.length - 1; i >= 0; i--)
42924834 //jList.remove(indices[i]);
....@@ -4322,16 +4864,16 @@
43224864 //System.out.println("cut " + child);
43234865 //System.out.println("parent = " + child.parent);
43244866 // tmp.addChild(child);
4325
- if (GrafreeD.clipboardIsTempGroup)
4867
+ if (Grafreed.clipboardIsTempGroup)
43264868 tGroup.add/*Child*/(tmp);
43274869 else
4328
- GrafreeD.clipboard = tmp;
4870
+ Grafreed.clipboard = tmp;
43294871 }
43304872 else
4331
- if (GrafreeD.clipboardIsTempGroup)
4873
+ if (Grafreed.clipboardIsTempGroup)
43324874 tGroup.add/*Child*/(child);
43334875 else
4334
- GrafreeD.clipboard = child;
4876
+ Grafreed.clipboard = child;
43354877 }
43364878
43374879 //ResetModel();
....@@ -4363,21 +4905,23 @@
43634905 //System.out.println("cut " + elem);
43644906 //System.out.println("parent = " + elem.parent);
43654907 // tmp.addChild(elem);
4366
- if (GrafreeD.clipboardIsTempGroup)
4908
+ if (Grafreed.clipboardIsTempGroup)
43674909 tGroup.add/*Child*/(tmp);
43684910 else
4369
- GrafreeD.clipboard = tmp;
4911
+ Grafreed.clipboard = tmp;
43704912 }
43714913 else
4372
- if (GrafreeD.clipboardIsTempGroup)
4914
+ if (Grafreed.clipboardIsTempGroup)
43734915 tGroup.add/*Child*/(child);
43744916 else
4375
- GrafreeD.clipboard = child;
4917
+ Grafreed.clipboard = child;
43764918 }
43774919
43784920 }
4379
- if (GrafreeD.clipboardIsTempGroup)
4380
- GrafreeD.clipboard = tGroup;
4921
+
4922
+ if (Grafreed.clipboardIsTempGroup)
4923
+ Grafreed.clipboard = tGroup;
4924
+
43814925 if (cut)
43824926 {
43834927 ResetModel();
....@@ -4391,7 +4935,7 @@
43914935 // return;
43924936 boolean first = true;
43934937
4394
- if (GrafreeD.clipboardIsTempGroup)
4938
+ if (Grafreed.clipboardIsTempGroup)
43954939 {
43964940 Composite temp;
43974941
....@@ -4402,7 +4946,7 @@
44024946 temp = (Composite)Applet3D.clipboard.deepCopy();
44034947 */
44044948 Object3D elem;
4405
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4949
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
44064950 {
44074951 Object3D child = (Object3D)e.nextElement();
44084952
....@@ -4436,14 +4980,14 @@
44364980 //Object3D cb = Applet3D.clipboard;
44374981 //temp.addChild(cb);
44384982 //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());
4983
+ assert(Grafreed.clipboard.parent == null);
4984
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4985
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4986
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4987
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
44444988 else
4445
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4446
- GrafreeD.clipboard.get(0).parent = keepparent;
4989
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4990
+ Grafreed.clipboard.get(0).parent = keepparent;
44474991 }
44484992
44494993 ResetModel();
....@@ -4492,9 +5036,9 @@
44925036 {
44935037 boolean first = true;
44945038
4495
- if (GrafreeD.clipboardIsTempGroup)
5039
+ if (Grafreed.clipboardIsTempGroup)
44965040 {
4497
- Composite temp = (Composite)GrafreeD.clipboard;
5041
+ Composite temp = (Composite)Grafreed.clipboard;
44985042 Object3D copy;
44995043 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
45005044 {
....@@ -4504,7 +5048,7 @@
45045048 }
45055049 } else
45065050 {
4507
- linkSomething(GrafreeD.clipboard); //.get(0));
5051
+ linkSomething(Grafreed.clipboard); //.get(0));
45085052 }
45095053 }
45105054 }
....@@ -4909,21 +5453,6 @@
49095453 }
49105454 */
49115455
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
-
49275456 /*
49285457 public void Callback(Object obj)
49295458 {
....@@ -4947,26 +5476,9 @@
49475476 }
49485477 */
49495478
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
-
49675479 String GetFile(String dialogName)
49685480 {
4969
- if (GrafreeD.standAlone)
5481
+ if (Grafreed.standAlone)
49705482 {
49715483 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
49725484 browser.show();
....@@ -5034,7 +5546,28 @@
50345546 cButton clearpanelButton;
50355547 cButton unselectButton;
50365548
5549
+ cButton restoreCameraButton;
5550
+
5551
+ cButton saveButton;
50375552 cButton oneStepButton;
5553
+
5554
+ cButton groupButton;
5555
+ cButton ungroupButton;
5556
+ cButton compositeButton;
5557
+ cButton switchButton;
5558
+ cButton loopButton;
5559
+ cButton textureButton;
5560
+
5561
+ cButton gridButton;
5562
+ cButton boxButton;
5563
+ cButton sphereButton;
5564
+ cButton coneButton;
5565
+ cButton torusButton;
5566
+ cButton superButton;
5567
+ cButton kleinButton;
5568
+ cButton particlesButton;
5569
+ cButton overlayButton;
5570
+ cButton lightButton;
50385571
50395572 cButton screenfitButton;
50405573 cButton screenfitpointButton;
....@@ -5047,14 +5580,6 @@
50475580
50485581 cButton setsupportButton;
50495582
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
-
50585583 //
50595584 //Composite
50605585 Object3D // to do !!
....@@ -5064,9 +5589,11 @@
50645589 //JTree jTree;
50655590 private MenuItem lookAtItem;
50665591 private MenuItem lookFromItem;
5067
- private MenuItem switchItem;
5592
+ private MenuItem switchViewItem;
50685593 private MenuItem cutItem;
5069
- private MenuItem duplicateItem;
5594
+ private MenuItem undoItem;
5595
+ private MenuItem redoItem;
5596
+ private JMenuItem duplicateItem;
50705597 private MenuItem cloneItem;
50715598 private MenuItem cloneSupportItem;
50725599 private MenuItem overwriteGeoItem;
....@@ -5079,7 +5606,7 @@
50795606 private MenuItem linkverticesItem;
50805607 private MenuItem relinkverticesItem;
50815608 private MenuItem setMasterItem;
5082
- private MenuItem resetMeshItem;
5609
+ private MenuItem resetAllItem;
50835610 private MenuItem stepAllItem;
50845611 private MenuItem revertMeshItem;
50855612 private MenuItem poseMeshItem;
....@@ -5129,6 +5656,10 @@
51295656 private MenuItem showleavesItem;
51305657 private MenuItem markleavesItem;
51315658 private MenuItem unmarkleavesItem;
5659
+ private MenuItem rewindleavesItem;
5660
+ private MenuItem unrewindleavesItem;
5661
+ private MenuItem randomleavesItem;
5662
+ private MenuItem unrandomleavesItem;
51325663
51335664 private MenuItem flipVItem;
51345665 private MenuItem unflipVItem;
....@@ -5140,15 +5671,17 @@
51405671 private MenuItem panoTexturesItem;
51415672
51425673 private MenuItem resetCentroidItem;
5143
- private MenuItem transformgeometryItem;
5674
+ private MenuItem resetCentroidXZItem;
51445675 private MenuItem resetTransformItem;
5676
+ private MenuItem transformGeometryItem;
5677
+ private MenuItem transformChildrenItem;
51455678 private MenuItem hideItem;
51465679 private MenuItem grabItem;
51475680 private MenuItem backItem;
51485681 private MenuItem frontItem;
51495682 private MenuItem cameraItem;
51505683 private MenuItem compositeItem;
5151
- private MenuItem randomItem;
5684
+ private MenuItem switchItem;
51525685 private MenuItem physicsItem;
51535686 private MenuItem frameselectorItem;
51545687 private MenuItem scriptNodeItem;
....@@ -5210,11 +5743,6 @@
52105743 private MenuItem doubleItem;
52115744 private MenuItem tripleItem;
52125745
5213
- private MenuItem importGFDItem;
5214
- private MenuItem importVRMLX3DItem;
5215
- private MenuItem import3DSItem;
5216
- private MenuItem importOBJItem;
5217
-
52185746 private MenuItem computeAOItem;
52195747 private MenuItem recompileItem;
52205748 private MenuItem editScriptItem;
....@@ -5224,4 +5752,8 @@
52245752 private MenuItem analyzeItem;
52255753 private MenuItem dumpItem;
52265754 //boolean freezemodel = false;
5755
+
5756
+ Menu cameraMenu;
5757
+ MenuItem editCameraItem;
5758
+ MenuItem restoreCameraItem;
52275759 }