Normand Briere
2019-06-17 e36047725ce3217618d4e5807ac7c8769b9e3598
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,29 +148,28 @@
148148
149149 //JTextField nameField;
150150
151
- void SetupMenu2(ObjEditor oe)
151
+ void SetupMenu2(GroupEditor oe)
152152 {
153
- if (Globals.ADVANCED)
154
- {
155
- oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
156
- //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
157
- //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
158
- editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
159
- oe.cameraMenu.add("-");
160
- openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
161
- openWindowItem.addActionListener(this);
162
- editLeafItem.addActionListener(this);
163
- lookAtItem.addActionListener(this);
164
- //lookFromItem.addActinoListener(this);
165
- //switchItem.addActionListener(this);
166
- }
167
-
168153 Menu menu;
169154 oe.menuBar.add(menu = new Menu("Edit"));
170155 //editItem = menu.add(new MenuItem("Edit"));
171156 //editItem.addActionListener(this);
157
+
158
+// undoItem = menu.add(new MenuItem("Undo"));
159
+// undoItem.addActionListener(this);
160
+// redoItem = menu.add(new MenuItem("Redo"));
161
+// redoItem.addActionListener(this);
162
+// menu.add("-");
172163 duplicateItem = menu.add(new MenuItem("Duplicate"));
173164 duplicateItem.addActionListener(this);
165
+ cloneItem = menu.add(new MenuItem("Clone"));
166
+ cloneItem.addActionListener(this);
167
+ if (Globals.ADVANCED)
168
+ {
169
+ cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
170
+ cloneSupportItem.addActionListener(this);
171
+ }
172
+ menu.add("-");
174173 cutItem = menu.add(new MenuItem("Cut"));
175174 cutItem.addActionListener(this);
176175 copyItem = menu.add(new MenuItem("Copy"));
....@@ -178,10 +177,7 @@
178177 pasteItem = menu.add(new MenuItem("Paste"));
179178 pasteItem.addActionListener(this);
180179 menu.add("-");
181
- cloneItem = menu.add(new MenuItem("Clone"));
182
- cloneItem.addActionListener(this);
183
- cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
184
- cloneSupportItem.addActionListener(this);
180
+
185181 menu.add("-");
186182 pasteIntoItem = menu.add(new MenuItem("Paste into"));
187183 pasteIntoItem.addActionListener(this);
....@@ -201,14 +197,97 @@
201197 clearAllItem = menu.add(new MenuItem("Clear All"));
202198 clearAllItem.addActionListener(this);
203199 }
200
+
201
+ menuBar.add(cameraMenu = new Menu("View"));
202
+ //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
203
+ //zBufferItem.addActionListener(this);
204
+ //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
205
+ //normalLensItem.addActionListener(this);
206
+ cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint"));
207
+ revertCameraItem.addActionListener(this);
208
+
209
+ cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
210
+ toggleFullScreenItem.addItemListener(this);
211
+ toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
212
+ cameraMenu.add("-");
213
+
214
+ cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
215
+ toggleTextureItem.addItemListener(this);
216
+ toggleTextureItem.setState(CameraPane.textureon);
217
+
218
+ cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
219
+ toggleSwitchItem.addItemListener(this);
220
+ toggleSwitchItem.setState(CameraPane.SWITCH);
221
+
222
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
223
+ toggleHandleItem.addItemListener(this);
224
+ toggleHandleItem.setState(CameraPane.HANDLES);
225
+
226
+ cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
227
+ togglePaintItem.addItemListener(this);
228
+ togglePaintItem.setState(CameraPane.PAINTMODE);
229
+
230
+ if (Globals.ADVANCED)
231
+ {
232
+ cameraMenu.add("-");
233
+ cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
234
+ toggleLiveItem.addItemListener(this);
235
+ toggleLiveItem.setState(Globals.isLIVE());
204236
237
+ cameraMenu.add(stepItem = new MenuItem("Step"));
238
+ stepItem.addActionListener(this);
239
+ // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
240
+ // toggleDLItem.addItemListener(this);
241
+ // toggleDLItem.setState(false);
242
+
243
+ cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
244
+ toggleRenderItem.addItemListener(this);
245
+ toggleRenderItem.setState(!CameraPane.frozen);
246
+
247
+ cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
248
+ toggleDebugItem.addItemListener(this);
249
+ toggleDebugItem.setState(CameraPane.DEBUG);
250
+
251
+ cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
252
+ toggleFrustumItem.addItemListener(this);
253
+ toggleFrustumItem.setState(CameraPane.FRUSTUM);
254
+
255
+ cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
256
+ toggleFootContactItem.addItemListener(this);
257
+ toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
258
+
259
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
260
+ toggleTimelineItem.addItemListener(this);
261
+ }
262
+
263
+// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
264
+// toggleRootItem.addItemListener(this);
265
+// toggleRootItem.setState(false);
266
+// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
267
+// animationItem.addItemListener(this);
268
+// animationItem.setState(CameraPane.ANIMATION);
269
+ cameraMenu.add("-");
270
+ cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint"));
271
+ editCameraItem.addActionListener(this);
272
+
273
+ if (Globals.ADVANCED)
274
+ {
275
+ oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
276
+ //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
277
+ //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
278
+ editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
279
+ oe.cameraMenu.add("-");
280
+ openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
281
+ openWindowItem.addActionListener(this);
282
+ editLeafItem.addActionListener(this);
283
+ lookAtItem.addActionListener(this);
284
+ //lookFromItem.addActinoListener(this);
285
+ //switchItem.addActionListener(this);
286
+ }
287
+
205288 oe.menuBar.add(menu = new Menu("Setting"));
206289 if (Globals.ADVANCED)
207290 {
208
- resetMeshItem = menu.add(new MenuItem("Reset All"));
209
- resetMeshItem.addActionListener(this);
210
- stepAllItem = menu.add(new MenuItem("Step All"));
211
- stepAllItem.addActionListener(this);
212291 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
213292 revertMeshItem.addActionListener(this);
214293 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
....@@ -272,6 +351,7 @@
272351
273352 if (Globals.ADVANCED)
274353 {
354
+ menu.add("-");
275355 physicsItem = menu.add(new MenuItem("Physics"));
276356 physicsItem.addActionListener(this);
277357 frameselectorItem = menu.add(new MenuItem("Frame Selector"));
....@@ -297,6 +377,7 @@
297377 shadowZItem.addActionListener(this);
298378 if (Globals.ADVANCED)
299379 {
380
+ menu.add("-");
300381 linkerItem = menu.add(new MenuItem("Linker"));
301382 linkerItem.addActionListener(this);
302383 attributeItem = menu.add(new MenuItem("Attribute"));
....@@ -305,14 +386,18 @@
305386 templateItem.addActionListener(this);
306387 pointflowItem = menu.add(new MenuItem("Point Flow"));
307388 pointflowItem.addActionListener(this);
308
- menu.add("-");
309389 }
390
+ menu.add("-");
310391 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
311392 resetTransformItem.addActionListener(this);
312393 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
313394 resetCentroidItem.addActionListener(this);
314
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
315
- transformgeometryItem.addActionListener(this);
395
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
396
+ resetCentroidXZItem.addActionListener(this);
397
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
398
+ transformGeometryItem.addActionListener(this);
399
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
400
+ transformChildrenItem.addActionListener(this);
316401
317402 oe.menuBar.add(menu = new Menu("Geometry"));
318403 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -361,6 +446,10 @@
361446 oe.menuBar.add(menu = new Menu("Attributes"));
362447 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
363448 clearMaterialsItem.addActionListener(this);
449
+ resetAllItem = menu.add(new MenuItem("Reset All"));
450
+ resetAllItem.addActionListener(this);
451
+ stepAllItem = menu.add(new MenuItem("Step All"));
452
+ stepAllItem.addActionListener(this);
364453 menu.add("-");
365454 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
366455 liveleavesItem.addActionListener(this);
....@@ -415,32 +504,23 @@
415504 sortbysizeItem.addActionListener(this);
416505 sortbynameItem = menu.add(new MenuItem("Sort by name"));
417506 sortbynameItem.addActionListener(this);
507
+ menu.add("-");
508
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
509
+ shareGeometriesItem.addActionListener(this);
510
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
511
+ mergeGeometriesItem.addActionListener(this);
418512 if (Globals.ADVANCED)
419513 {
420
- menu.add("-");
514
+ // Pretty much the same as duplicate and clone.
421515 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
422516 extractGeometriesItem.addActionListener(this);
423517 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
424518 cloneGeometriesItem.addActionListener(this);
425
- shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
426
- shareGeometriesItem.addActionListener(this);
427
- mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
428
- mergeGeometriesItem.addActionListener(this);
429519 }
430520
431521 oe.menuBar.add(menu = new Menu("Insert"));
432522 buildCreateMenu(menu);
433523
434
- oe.menuBar.add(menu = new Menu("Include"));
435
- importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
436
- importGFDItem.addActionListener(this);
437
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
438
- importVRMLX3DItem.addActionListener(this);
439
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
440
- importOBJItem.addActionListener(this);
441
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
442
- import3DSItem.addActionListener(this);
443
-
444524 oe.menuBar.add(menu = new Menu("Tools"));
445525 buildToolsMenu(menu);
446526 }
....@@ -477,11 +557,23 @@
477557 */
478558 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
479559
560
+ oe.toolbarPanel.add(undoButton = new cButton("Undo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
561
+ undoButton.setToolTipText("Undo changes");
562
+ undoButton.addActionListener(this);
563
+
564
+ oe.toolbarPanel.add(redoButton = new cButton("Redo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
565
+ redoButton.setToolTipText("Redo changes");
566
+ redoButton.addActionListener(this);
567
+
568
+ oe.toolbarPanel.add(saveButton = new cButton("Save", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
569
+ saveButton.setToolTipText("Save changes");
570
+ saveButton.addActionListener(this);
571
+
480572 oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
481
- liveCB.setToolTipText("Enabled animation");
573
+ liveCB.setToolTipText("Enable animation");
482574 liveCB.addItemListener(this);
483575
484
- oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
576
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
485577 oneStepButton.setToolTipText("Animate one step forward");
486578 oneStepButton.addActionListener(this);
487579
....@@ -493,7 +585,7 @@
493585 trackCB.setToolTipText("Enable tracking");
494586 trackCB.addItemListener(this);
495587
496
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
588
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
497589 screenfitButton.setToolTipText("Screen fit");
498590 screenfitButton.addActionListener(this);
499591
....@@ -502,39 +594,39 @@
502594
503595 if (Globals.ADVANCED)
504596 {
505
- oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
597
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
506598 snapobjectButton.addActionListener(this);
507599 snapobjectButton.setToolTipText("Snap Object");
508600 }
509601
510
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
602
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
511603 flashSelectionButton.setToolTipText("Show selection");
512604 flashSelectionButton.addActionListener(this);
513605
514606 oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
515607
516
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
608
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
517609 twoButton.setToolTipText("Show center view only");
518610 twoButton.addActionListener(this);
519
- oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
611
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
520612 fourButton.addActionListener(this);
521613 fourButton.setToolTipText("Show left panel only");
522
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
614
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
523615 sixButton.setToolTipText("2-column layout left");
524616 sixButton.addActionListener(this);
525
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
617
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
526618 threeButton.setToolTipText("2-column layout right");
527619 threeButton.addActionListener(this);
528
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
620
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
529621 sevenButton.setToolTipText("3-column layout");
530622 sevenButton.addActionListener(this);
531623 //
532624
533
- oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
625
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
534626 rootButton.setToolTipText("Edit selection in new tab");
535627 rootButton.addActionListener(this);
536628
537
- oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
629
+ oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
538630 closeButton.setToolTipText("Close tab");
539631 closeButton.addActionListener(this);
540632 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
....@@ -542,11 +634,11 @@
542634
543635 cGridBag commandsPanel = new cGridBag();
544636
545
- commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
637
+ commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
546638 editButton.setToolTipText("Edit selection");
547639 editButton.addActionListener(this);
548640
549
- commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
641
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
550642 uneditButton.setToolTipText("Unedit selection");
551643 uneditButton.addActionListener(this);
552644
....@@ -554,11 +646,11 @@
554646 allParamsButton.setToolTipText("Edit all params");
555647 allParamsButton.addActionListener(this);
556648
557
- commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
649
+ commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
558650 clearPanelButton.setToolTipText("Clear edit panel");
559651 clearPanelButton.addActionListener(this);
560652
561
- commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
653
+ commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
562654 unselectButton.setToolTipText("Unselect");
563655 unselectButton.addActionListener(this);
564656
....@@ -641,7 +733,7 @@
641733 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
642734 zoomBoxCB.addItemListener(this);
643735
644
- if (Globals.ADVANCED)
736
+ if (true) // Globals.ADVANCED)
645737 {
646738 panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
647739 supportCB.setToolTipText("Enable rigging");
....@@ -714,6 +806,7 @@
714806 buttonGroup.add(radioButton);
715807 radioButton.doClick();
716808 }
809
+
717810 void SetupViews(ObjEditor oe)
718811 {
719812 oe.SetupViews();
....@@ -778,6 +871,7 @@
778871 } else if(e.getSource() == liveCB)
779872 {
780873 cameraView.ToggleLive();
874
+ refreshContents(false);
781875 }
782876 else if(e.getSource() == supportCB)
783877 {
....@@ -930,7 +1024,9 @@
9301024 // objEditor.DropFile((java.io.File[]) object, true);
9311025 // return;
9321026 // }
933
- if (string.charAt(0) == '/')
1027
+
1028
+ // File path for Mac and Windows
1029
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
9341030 {
9351031 // file(s)
9361032 String[] names = string.split("\n");
....@@ -957,7 +1053,7 @@
9571053
9581054 flashIt = false;
9591055 CameraPane pane = (CameraPane) target;
960
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1056
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
9611057 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
9621058
9631059 if (group.selection.size() == 1)
....@@ -1164,13 +1260,13 @@
11641260 parseverticesItem.addActionListener(this);
11651261 textureFieldItem = menu.add(new MenuItem("Texture Field"));
11661262 textureFieldItem.addActionListener(this);
1167
- alignItem = menu.add(new MenuItem("Align Object"));
1263
+ alignItem = menu.add(new MenuItem("Align Objects"));
11681264 alignItem.addActionListener(this);
11691265 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11701266 reduceMorphItem.addActionListener(this);
11711267 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11721268 reduce34MorphItem.addActionListener(this);
1173
-
1269
+ menu.add("-");
11741270 menu.add(computeAOItem = new MenuItem("Compute AO"));
11751271 computeAOItem.addActionListener(this);
11761272
....@@ -1183,7 +1279,7 @@
11831279 memoryItem.addActionListener(this);
11841280 menu.add(analyzeItem = new MenuItem("Analyze"));
11851281 analyzeItem.addActionListener(this);
1186
- menu.add(dumpItem = new MenuItem("Dump"));
1282
+ menu.add(dumpItem = new MenuItem("Print"));
11871283 dumpItem.addActionListener(this);
11881284 // menu.add(pathItem = new MenuItem("From-to path"));
11891285 // pathItem.addActionListener(this);
....@@ -1530,9 +1626,9 @@
15301626
15311627 void Overwrite(int mask)
15321628 {
1533
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1629
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
15341630 {
1535
- Object3D content = GrafreeD.clipboard.get(0);
1631
+ Object3D content = Grafreed.clipboard.get(0);
15361632
15371633 if (content instanceof cGroup && ((cGroup)content).transientlink )
15381634 content = ((cGroup)content).get(0);
....@@ -1837,23 +1933,6 @@
18371933 csg.addChild(child);
18381934 child.addChild(csg);
18391935 } else
1840
-
1841
- if (source == importGFDItem)
1842
- {
1843
- ImportGFD();
1844
- } else
1845
- if (source == importVRMLX3DItem)
1846
- {
1847
- ImportVRMLX3D();
1848
- } else
1849
- if (source == import3DSItem)
1850
- {
1851
- objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
1852
- } else
1853
- if (source == importOBJItem)
1854
- {
1855
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1856
- } else
18571936 if (source == computeAOItem)
18581937 {
18591938 Globals.drawMode = CameraPane.OCCLUSION;
....@@ -1872,7 +1951,7 @@
18721951 if (source == invariantsItem)
18731952 {
18741953 System.out.println("Invariants:");
1875
- GrafreeD.grafreeD.universe.invariants();
1954
+ Grafreed.grafreeD.universe.invariants();
18761955 } else
18771956 if (source == memoryItem)
18781957 {
....@@ -1890,6 +1969,18 @@
18901969 if (source == dumpItem)
18911970 {
18921971 DumpObject();
1972
+ } else
1973
+ if (source == undoButton)
1974
+ {
1975
+ Undo();
1976
+ } else
1977
+ if (source == redoButton)
1978
+ {
1979
+ Redo();
1980
+ } else
1981
+ if (source == saveButton)
1982
+ {
1983
+ Save();
18931984 } else
18941985 if (source == oneStepButton)
18951986 {
....@@ -1945,12 +2036,20 @@
19452036 {
19462037 loadClipboard(true);
19472038 } else
2039
+ if (source == undoItem)
2040
+ {
2041
+ Undo();
2042
+ } else
2043
+ if (source == redoItem)
2044
+ {
2045
+ Redo();
2046
+ } else
19482047 if (source == duplicateItem)
19492048 {
1950
- Object3D keep = GrafreeD.clipboard;
2049
+ Object3D keep = Grafreed.clipboard;
19512050 loadClipboard(false);
19522051 paste(false);
1953
- GrafreeD.clipboard = keep;
2052
+ Grafreed.clipboard = keep;
19542053 } else
19552054 if (source == cloneItem)
19562055 {
....@@ -2170,9 +2269,9 @@
21702269 // group.selection.get(0).setMasterThis(content); // should be identity
21712270 // refreshContents();
21722271 // }
2173
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2272
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21742273 {
2175
- Object3D content = GrafreeD.clipboard.get(0);
2274
+ Object3D content = Grafreed.clipboard.get(0);
21762275
21772276 if (content instanceof cGroup && ((cGroup)content).transientlink )
21782277 content = ((cGroup)content).get(0);
....@@ -2222,9 +2321,9 @@
22222321 } else
22232322 if (source == setMasterItem)
22242323 {
2225
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2324
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
22262325 {
2227
- Object3D content = GrafreeD.clipboard.get(0);
2326
+ Object3D content = Grafreed.clipboard.get(0);
22282327
22292328 if (content instanceof cGroup && ((cGroup)content).transientlink )
22302329 content = ((cGroup)content).get(0);
....@@ -2237,9 +2336,9 @@
22372336 {
22382337 if (group.selection.size() == 1)
22392338 {
2240
- if (GrafreeD.clipboard.size() == 1)
2339
+ if (Grafreed.clipboard.size() == 1)
22412340 {
2242
- Object3D content = GrafreeD.clipboard.get(0);
2341
+ Object3D content = Grafreed.clipboard.get(0);
22432342
22442343 if (content instanceof cGroup && ((cGroup)content).transientlink )
22452344 content = ((cGroup)content).get(0);
....@@ -2256,7 +2355,7 @@
22562355 {
22572356 RevertMeshes();
22582357 } else
2259
- if (source == resetMeshItem)
2358
+ if (source == resetAllItem)
22602359 {
22612360 ResetAll();
22622361 } else
....@@ -2444,7 +2543,7 @@
24442543 } else
24452544 if (source == genNormalsMESHItem)
24462545 {
2447
- GenNormals(true); // TODO
2546
+ GenNormalsMESH();
24482547 } else
24492548 if (source == genNormalsORGANItem)
24502549 {
....@@ -2594,9 +2693,13 @@
25942693 {
25952694 SmoothMesh();
25962695 } else
2597
- if (source == transformgeometryItem)
2696
+ if (source == transformGeometryItem)
25982697 {
25992698 TransformGeometry();
2699
+ } else
2700
+ if (source == transformChildrenItem)
2701
+ {
2702
+ TransformChildren();
26002703 } else
26012704 if (source == resetTransformItem)
26022705 {
....@@ -2604,7 +2707,11 @@
26042707 } else
26052708 if (source == resetCentroidItem)
26062709 {
2607
- ResetCentroid();
2710
+ ResetCentroid(true);
2711
+ } else
2712
+ if (source == resetCentroidXZItem)
2713
+ {
2714
+ ResetCentroid(false);
26082715 } else
26092716 if (source == resetParentItem)
26102717 {
....@@ -2960,7 +3067,7 @@
29603067 child.CloseUI();
29613068 listUI.remove(child);
29623069
2963
- child.editWindow = null; // ???????????
3070
+ //child.editWindow = null; // ???????????
29643071 }
29653072 objEditor.ctrlPanel.FlushUI();
29663073 //objEditor.jTree.clearSelection();
....@@ -3046,7 +3153,10 @@
30463153 frontView.object = group;
30473154 sideView.object = group;
30483155 }
3156
+
3157
+// fix "+" issue
30493158 group.editWindow = this;
3159
+
30503160 /*
30513161 currentLayout = radio.layout;
30523162 if (currentLayout == null)
....@@ -3059,7 +3169,20 @@
30593169 //group.attributes = -1;
30603170 ResetModel();
30613171 refreshContents(true);
3062
- }
3172
+ } else if (event.getSource() == editCameraItem)
3173
+ {
3174
+ cameraView.ProtectCamera();
3175
+ cameraView.repaint();
3176
+ return;
3177
+ } else if (event.getSource() == revertCameraItem)
3178
+ {
3179
+ cameraView.RevertCamera();
3180
+ cameraView.repaint();
3181
+ return;
3182
+ // } else if (event.getSource() == textureButton)
3183
+ // {
3184
+ // return; // true;
3185
+ }
30633186 else
30643187 {
30653188 //return super.action(event, arg);
....@@ -3120,6 +3243,28 @@
31203243 refreshContents();
31213244 }
31223245
3246
+ void TransformChildren()
3247
+ {
3248
+ Object3D obj;
3249
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3250
+ {
3251
+ obj = (Object3D)e.nextElement();
3252
+ obj.KeepTextureMatrices();
3253
+ obj.TransformChildren();
3254
+ obj.RestoreTextureMatrices();
3255
+
3256
+// if (obj.parent == null)
3257
+// {
3258
+// System.out.println("NULL PARENT!");
3259
+// new Exception().printStackTrace();
3260
+// }
3261
+// else
3262
+// TouchTransform(obj);
3263
+// //obj.parent.Touch();
3264
+ }
3265
+
3266
+ refreshContents();
3267
+ }
31233268
31243269 void ResetTransform()
31253270 {
....@@ -3232,7 +3377,7 @@
32323377 refreshContents();
32333378 }
32343379
3235
- void ResetCentroid()
3380
+ void ResetCentroid(boolean full)
32363381 {
32373382 Object3D obj;
32383383 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3247,12 +3392,16 @@
32473392 LA.matIdentity(Object3D.mat);
32483393 obj.getBounds(minima, maxima, false);
32493394 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3250
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3395
+ if (full)
3396
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
32513397 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
32523398 obj.TransformMesh(Object3D.mat);
3399
+
32533400 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3254
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3401
+ if (full)
3402
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
32553403 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3404
+
32563405 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
32573406 //Object3D.mat[3][0] = -Object3D.mat[3][0];
32583407 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3281,7 +3430,8 @@
32813430
32823431 int size = obj.MemorySize();
32833432
3284
- System.err.println((size/1024) + " KB is the size of " + obj);
3433
+ //System.err.println((size/1024) + " KB is the size of " + obj);
3434
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
32853435 }
32863436 }
32873437 catch (Exception e)
....@@ -3318,9 +3468,9 @@
33183468 obj = (Object3D)e.nextElement();
33193469
33203470 System.out.println("Object is: " + obj);
3321
- GrafreeD.AnalyzeObject(obj);
3471
+ Grafreed.AnalyzeObject(obj);
33223472 System.out.println("Boundary rep: " + obj.bRep);
3323
- GrafreeD.AnalyzeObject(obj.bRep);
3473
+ Grafreed.AnalyzeObject(obj.bRep);
33243474
33253475 // System.err.println((size/1024) + " KB is the size of " + obj);
33263476 }
....@@ -3362,6 +3512,13 @@
33623512 void GenNormals(boolean crease)
33633513 {
33643514 group.GenNormalsS(crease);
3515
+
3516
+ refreshContents();
3517
+ }
3518
+
3519
+ void GenNormalsMESH()
3520
+ {
3521
+ group.GenNormalsMeshS();
33653522
33663523 refreshContents();
33673524 }
....@@ -3534,8 +3691,8 @@
35343691
35353692 void ParseVertices()
35363693 {
3537
- boolean epsequal = GrafreeD.epsequal;
3538
- GrafreeD.epsequal = true;
3694
+ boolean epsequal = Grafreed.epsequal;
3695
+ Grafreed.epsequal = true;
35393696
35403697 for (int i=0; i<group.selection.size(); i++)
35413698 {
....@@ -3560,7 +3717,7 @@
35603717 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
35613718 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
35623719
3563
- g.add(GrafreeD.clipboard);
3720
+ g.add(Grafreed.clipboard);
35643721
35653722 buffer.add(g);
35663723 }
....@@ -3575,7 +3732,7 @@
35753732 makeSomething(buffer, i==group.selection.size()-1);
35763733 }
35773734
3578
- GrafreeD.epsequal = epsequal;
3735
+ Grafreed.epsequal = epsequal;
35793736
35803737 refreshContents();
35813738 }
....@@ -3593,7 +3750,16 @@
35933750 String pigment = Object3D.GetPigment(tex);
35943751 //String bump = Object3D.GetBump(tex);
35953752
3596
- com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3753
+ com.sun.opengl.util.texture.TextureData texturedata = null;
3754
+
3755
+ try
3756
+ {
3757
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3758
+ }
3759
+ catch (Exception e)
3760
+ {
3761
+ System.err.println("FAIL: " + node);
3762
+ }
35973763
35983764 double s = v.s;
35993765
....@@ -3725,7 +3891,7 @@
37253891 return;
37263892
37273893 Object3D poses = group.selection.get(0);
3728
- Object3D ref = GrafreeD.clipboard.get(0);
3894
+ Object3D ref = Grafreed.clipboard.get(0);
37293895
37303896 Object3D newgroup = new Object3D("Po:" + poses.name);
37313897
....@@ -3919,9 +4085,9 @@
39194085
39204086 void ClipMesh()
39214087 {
3922
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
4088
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
39234089 {
3924
- Object3D content = GrafreeD.clipboard.get(0);
4090
+ Object3D content = Grafreed.clipboard.get(0);
39254091
39264092 if (content instanceof cGroup && ((cGroup)content).transientlink )
39274093 content = ((cGroup)content).get(0);
....@@ -3930,7 +4096,7 @@
39304096 // {
39314097 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
39324098 // }
3933
- group.selection.ClipMesh(GrafreeD.clipboard);
4099
+ group.selection.ClipMesh(Grafreed.clipboard);
39344100 }
39354101 // group.selection.ClipMesh(GrafreeD.clipboard);
39364102 System.out.println("DONE.");
....@@ -4065,7 +4231,7 @@
40654231 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
40664232
40674233 Object3D elem = (Object3D)group.selection.elementAt(i);
4068
- if(elem != group)
4234
+ if(elem != group || !newWindow)
40694235 {
40704236 // if (!(elem instanceof Composite))
40714237 // newWindow = false;
....@@ -4155,7 +4321,6 @@
41554321 //case 702: // Event.LIST_DESELECT
41564322 group.deselectAll();
41574323 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4158
- objEditor.ClearInfo(); // .GetMaterial());
41594324 if (tps != null)
41604325 {
41614326 for (int i=0; i < tps.length; i++)
....@@ -4164,10 +4329,8 @@
41644329
41654330 //if (child.parent != null)
41664331 //child.parent.addSelectee(child);
4332
+ objEditor.SetMaterial(child);
41674333 group.addSelectee(child);
4168
- objEditor.SetMaterial(child); // .GetMaterial());
4169
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4170
- System.err.println("info : " + child.GetPath());
41714334 }
41724335 }
41734336 // else
....@@ -4177,16 +4340,17 @@
41774340 // System.err.println("info : " + group.GetPath());
41784341 // }
41794342
4180
- objEditor.SetText(); // jan 2014
4181
-
4182
- if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4343
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
41834344 CameraPane.flash = true;
41844345
4185
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4346
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
41864347 // a camera
41874348 {
4188
- CameraPane.camerachangeframe = 0; // don't refuse it
4189
- Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4349
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
4350
+ {
4351
+ CameraPane.camerachangeframe = 0; // don't refuse it
4352
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4353
+ }
41904354 // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
41914355 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
41924356 }
....@@ -4199,6 +4363,26 @@
41994363
42004364 freezemodel = false;
42014365 }
4366
+
4367
+ void refreshContents(boolean cp)
4368
+ {
4369
+ if (!Globals.MOUSEDRAGGED)
4370
+ {
4371
+ objEditor.ClearInfo(); // .GetMaterial());
4372
+
4373
+ for (int i=0; i < group.selection.Size(); i++)
4374
+ {
4375
+ Object3D child = (Object3D) group.selection.get(i);
4376
+
4377
+ objEditor.AddInfo(child, this, true);
4378
+ System.err.println("info : " + child.GetPath());
4379
+ }
4380
+
4381
+ objEditor.SetText(); // jan 2014
4382
+ }
4383
+
4384
+ super.refreshContents(cp);
4385
+ }
42024386
42034387 void linkSomething(Object3D thing)
42044388 {
....@@ -4270,16 +4454,18 @@
42704454 {
42714455 if (group.selection.isEmpty())
42724456 return;
4273
- GrafreeD.clipboardIsTempGroup = false;
4457
+
4458
+ Grafreed.clipboardIsTempGroup = false;
42744459 Composite tGroup = null;
42754460 if (group.selection.size() > 0) // 1)
42764461 {
42774462 tGroup = new cGroup();
4278
- GrafreeD.clipboardIsTempGroup = true;
4463
+ Grafreed.clipboardIsTempGroup = true;
42794464 }
42804465
42814466 if (cut)
42824467 {
4468
+ Save();
42834469 //int indices[] = jList.getSelectedIndices();
42844470 //for (int i = indices.length - 1; i >= 0; i--)
42854471 //jList.remove(indices[i]);
....@@ -4315,16 +4501,16 @@
43154501 //System.out.println("cut " + child);
43164502 //System.out.println("parent = " + child.parent);
43174503 // tmp.addChild(child);
4318
- if (GrafreeD.clipboardIsTempGroup)
4504
+ if (Grafreed.clipboardIsTempGroup)
43194505 tGroup.add/*Child*/(tmp);
43204506 else
4321
- GrafreeD.clipboard = tmp;
4507
+ Grafreed.clipboard = tmp;
43224508 }
43234509 else
4324
- if (GrafreeD.clipboardIsTempGroup)
4510
+ if (Grafreed.clipboardIsTempGroup)
43254511 tGroup.add/*Child*/(child);
43264512 else
4327
- GrafreeD.clipboard = child;
4513
+ Grafreed.clipboard = child;
43284514 }
43294515
43304516 //ResetModel();
....@@ -4356,21 +4542,23 @@
43564542 //System.out.println("cut " + elem);
43574543 //System.out.println("parent = " + elem.parent);
43584544 // tmp.addChild(elem);
4359
- if (GrafreeD.clipboardIsTempGroup)
4545
+ if (Grafreed.clipboardIsTempGroup)
43604546 tGroup.add/*Child*/(tmp);
43614547 else
4362
- GrafreeD.clipboard = tmp;
4548
+ Grafreed.clipboard = tmp;
43634549 }
43644550 else
4365
- if (GrafreeD.clipboardIsTempGroup)
4551
+ if (Grafreed.clipboardIsTempGroup)
43664552 tGroup.add/*Child*/(child);
43674553 else
4368
- GrafreeD.clipboard = child;
4554
+ Grafreed.clipboard = child;
43694555 }
43704556
43714557 }
4372
- if (GrafreeD.clipboardIsTempGroup)
4373
- GrafreeD.clipboard = tGroup;
4558
+
4559
+ if (Grafreed.clipboardIsTempGroup)
4560
+ Grafreed.clipboard = tGroup;
4561
+
43744562 if (cut)
43754563 {
43764564 ResetModel();
....@@ -4384,7 +4572,7 @@
43844572 // return;
43854573 boolean first = true;
43864574
4387
- if (GrafreeD.clipboardIsTempGroup)
4575
+ if (Grafreed.clipboardIsTempGroup)
43884576 {
43894577 Composite temp;
43904578
....@@ -4395,7 +4583,7 @@
43954583 temp = (Composite)Applet3D.clipboard.deepCopy();
43964584 */
43974585 Object3D elem;
4398
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4586
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
43994587 {
44004588 Object3D child = (Object3D)e.nextElement();
44014589
....@@ -4429,14 +4617,14 @@
44294617 //Object3D cb = Applet3D.clipboard;
44304618 //temp.addChild(cb);
44314619 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4432
- assert(GrafreeD.clipboard.parent == null);
4433
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4434
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4435
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4436
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
4620
+ assert(Grafreed.clipboard.parent == null);
4621
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4622
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4623
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4624
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
44374625 else
4438
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4439
- GrafreeD.clipboard.get(0).parent = keepparent;
4626
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4627
+ Grafreed.clipboard.get(0).parent = keepparent;
44404628 }
44414629
44424630 ResetModel();
....@@ -4485,9 +4673,9 @@
44854673 {
44864674 boolean first = true;
44874675
4488
- if (GrafreeD.clipboardIsTempGroup)
4676
+ if (Grafreed.clipboardIsTempGroup)
44894677 {
4490
- Composite temp = (Composite)GrafreeD.clipboard;
4678
+ Composite temp = (Composite)Grafreed.clipboard;
44914679 Object3D copy;
44924680 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
44934681 {
....@@ -4497,7 +4685,7 @@
44974685 }
44984686 } else
44994687 {
4500
- linkSomething(GrafreeD.clipboard); //.get(0));
4688
+ linkSomething(Grafreed.clipboard); //.get(0));
45014689 }
45024690 }
45034691 }
....@@ -4902,21 +5090,6 @@
49025090 }
49035091 */
49045092
4905
- void ImportGFD()
4906
- {
4907
- FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
4908
- browser.show();
4909
- String filename = browser.getFile();
4910
- if (filename != null && filename.length() > 0)
4911
- {
4912
- String fullname = browser.getDirectory() + filename;
4913
-
4914
- //Object3D readobj =
4915
- objEditor.ReadGFD(fullname, objEditor);
4916
- //makeSomething(readobj);
4917
- }
4918
- }
4919
-
49205093 /*
49215094 public void Callback(Object obj)
49225095 {
....@@ -4940,26 +5113,9 @@
49405113 }
49415114 */
49425115
4943
- void ImportVRMLX3D()
4944
- {
4945
- if (GrafreeD.standAlone)
4946
- {
4947
- /**/
4948
- FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
4949
- browser.show();
4950
- String filename = browser.getFile();
4951
- if (filename != null && filename.length() > 0)
4952
- {
4953
- String fullname = browser.getDirectory() + filename;
4954
- LoadVRMLX3D(fullname);
4955
- }
4956
- /**/
4957
- }
4958
- }
4959
-
49605116 String GetFile(String dialogName)
49615117 {
4962
- if (GrafreeD.standAlone)
5118
+ if (Grafreed.standAlone)
49635119 {
49645120 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
49655121 browser.show();
....@@ -5027,6 +5183,9 @@
50275183 cButton clearpanelButton;
50285184 cButton unselectButton;
50295185
5186
+ cButton saveButton;
5187
+ cButton undoButton;
5188
+ cButton redoButton;
50305189 cButton oneStepButton;
50315190
50325191 cButton screenfitButton;
....@@ -5059,6 +5218,8 @@
50595218 private MenuItem lookFromItem;
50605219 private MenuItem switchItem;
50615220 private MenuItem cutItem;
5221
+ private MenuItem undoItem;
5222
+ private MenuItem redoItem;
50625223 private MenuItem duplicateItem;
50635224 private MenuItem cloneItem;
50645225 private MenuItem cloneSupportItem;
....@@ -5072,7 +5233,7 @@
50725233 private MenuItem linkverticesItem;
50735234 private MenuItem relinkverticesItem;
50745235 private MenuItem setMasterItem;
5075
- private MenuItem resetMeshItem;
5236
+ private MenuItem resetAllItem;
50765237 private MenuItem stepAllItem;
50775238 private MenuItem revertMeshItem;
50785239 private MenuItem poseMeshItem;
....@@ -5133,8 +5294,10 @@
51335294 private MenuItem panoTexturesItem;
51345295
51355296 private MenuItem resetCentroidItem;
5136
- private MenuItem transformgeometryItem;
5297
+ private MenuItem resetCentroidXZItem;
51375298 private MenuItem resetTransformItem;
5299
+ private MenuItem transformGeometryItem;
5300
+ private MenuItem transformChildrenItem;
51385301 private MenuItem hideItem;
51395302 private MenuItem grabItem;
51405303 private MenuItem backItem;
....@@ -5203,11 +5366,6 @@
52035366 private MenuItem doubleItem;
52045367 private MenuItem tripleItem;
52055368
5206
- private MenuItem importGFDItem;
5207
- private MenuItem importVRMLX3DItem;
5208
- private MenuItem import3DSItem;
5209
- private MenuItem importOBJItem;
5210
-
52115369 private MenuItem computeAOItem;
52125370 private MenuItem recompileItem;
52135371 private MenuItem editScriptItem;
....@@ -5217,4 +5375,8 @@
52175375 private MenuItem analyzeItem;
52185376 private MenuItem dumpItem;
52195377 //boolean freezemodel = false;
5378
+
5379
+ Menu cameraMenu;
5380
+ MenuItem editCameraItem;
5381
+ MenuItem revertCameraItem;
52205382 }