Normand Briere
2019-06-23 8088590686a45e71278f9a52bb9cc37943dc0c37
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,8 +148,130 @@
148148
149149 //JTextField nameField;
150150
151
- void SetupMenu2(ObjEditor oe)
151
+ void SetupMenu2(GroupEditor oe)
152152 {
153
+ Menu menu;
154
+ oe.menuBar.add(menu = new Menu("Edit"));
155
+ //editItem = menu.add(new MenuItem("Edit"));
156
+ //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("-");
163
+ duplicateItem = menu.add(new MenuItem("Duplicate"));
164
+ 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("-");
173
+ cutItem = menu.add(new MenuItem("Cut"));
174
+ cutItem.addActionListener(this);
175
+ copyItem = menu.add(new MenuItem("Copy"));
176
+ copyItem.addActionListener(this);
177
+ pasteItem = menu.add(new MenuItem("Paste"));
178
+ pasteItem.addActionListener(this);
179
+ menu.add("-");
180
+
181
+ menu.add("-");
182
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
183
+ pasteIntoItem.addActionListener(this);
184
+ pasteLinkItem = menu.add(new MenuItem("Paste link"));
185
+ pasteLinkItem.addActionListener(this);
186
+ pasteCloneItem = menu.add(new MenuItem("Paste clone"));
187
+ pasteCloneItem.addActionListener(this);
188
+// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
189
+// pasteExpandItem.addActionListener(this);
190
+ menu.add("-");
191
+ clearItem = menu.add(new MenuItem("Clear"));
192
+ clearItem.addActionListener(this);
193
+
194
+ if (Globals.ADVANCED)
195
+ {
196
+ // Deletes the cameras...
197
+ clearAllItem = menu.add(new MenuItem("Clear All"));
198
+ clearAllItem.addActionListener(this);
199
+ }
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());
236
+
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(Globals.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
+ {
153275 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
154276 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
155277 //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
....@@ -161,45 +283,17 @@
161283 lookAtItem.addActionListener(this);
162284 //lookFromItem.addActinoListener(this);
163285 //switchItem.addActionListener(this);
164
- Menu menu;
165
- oe.menuBar.add(menu = new Menu("Edit"));
166
- //editItem = menu.add(new MenuItem("Edit"));
167
- //editItem.addActionListener(this);
168
- duplicateItem = menu.add(new MenuItem("Duplicate"));
169
- duplicateItem.addActionListener(this);
170
- menu.add("-");
171
- cloneItem = menu.add(new MenuItem("Clone"));
172
- cloneItem.addActionListener(this);
173
- cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
174
- cloneSupportItem.addActionListener(this);
175
- menu.add("-");
176
- cutItem = menu.add(new MenuItem("Cut"));
177
- cutItem.addActionListener(this);
178
- copyItem = menu.add(new MenuItem("Copy"));
179
- copyItem.addActionListener(this);
180
- pasteItem = menu.add(new MenuItem("Paste"));
181
- pasteItem.addActionListener(this);
182
- pasteLinkItem = menu.add(new MenuItem("Paste link"));
183
- pasteLinkItem.addActionListener(this);
184
- pasteCloneItem = menu.add(new MenuItem("Paste clone"));
185
- pasteCloneItem.addActionListener(this);
186
-// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
187
-// pasteExpandItem.addActionListener(this);
188
- clearItem = menu.add(new MenuItem("Clear"));
189
- clearItem.addActionListener(this);
190
- clearAllItem = menu.add(new MenuItem("Clear All"));
191
- clearAllItem.addActionListener(this);
192
-
286
+ }
287
+
193288 oe.menuBar.add(menu = new Menu("Setting"));
194
- resetMeshItem = menu.add(new MenuItem("Reset All"));
195
- resetMeshItem.addActionListener(this);
196
- stepAllItem = menu.add(new MenuItem("Step All"));
197
- stepAllItem.addActionListener(this);
289
+ if (Globals.ADVANCED)
290
+ {
198291 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
199292 revertMeshItem.addActionListener(this);
200293 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
201294 resetreferencesItem.addActionListener(this);
202295 menu.add("-");
296
+ }
203297 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
204298 overwriteGeoItem.addActionListener(this);
205299 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -211,19 +305,26 @@
211305 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
212306 overwriteUVItem.addActionListener(this);
213307 menu.add("-");
308
+ if (Globals.ADVANCED)
309
+ {
214310 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
215311 generateMeshItem.addActionListener(this);
216312 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
217313 poseMeshItem.addActionListener(this);
218314 menu.add("-");
315
+ }
219316 resetsupportItem = menu.add(new MenuItem("Reset support"));
220317 resetsupportItem.addActionListener(this);
221318 linkverticesItem = menu.add(new MenuItem("Link to Support"));
222319 linkverticesItem.addActionListener(this);
223320 relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
224321 relinkverticesItem.addActionListener(this);
322
+
323
+ if (Globals.ADVANCED)
324
+ {
225325 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
226326 setMasterItem.addActionListener(this);
327
+ }
227328
228329 oe.menuBar.add(menu = new Menu("Group"));
229330 grabItem = menu.add(new MenuItem("Grab"));
....@@ -234,7 +335,7 @@
234335 frontItem.addActionListener(this);
235336 compositeItem = menu.add(new MenuItem("Composite"));
236337 compositeItem.addActionListener(this);
237
- hideItem = menu.add(new MenuItem("Hide"));
338
+ hideItem = menu.add(new MenuItem("Hidden Group"));
238339 hideItem.addActionListener(this);
239340 ungroupItem = menu.add(new MenuItem("Ungroup"));
240341 ungroupItem.addActionListener(this);
....@@ -245,16 +346,21 @@
245346 switchGeoItem.addActionListener(this);
246347 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
247348 switchTransfoItem.addActionListener(this);
349
+ morphItem = menu.add(new MenuItem("Morph Group"));
350
+ morphItem.addActionListener(this);
351
+
352
+ if (Globals.ADVANCED)
353
+ {
354
+ menu.add("-");
248355 physicsItem = menu.add(new MenuItem("Physics"));
249356 physicsItem.addActionListener(this);
250357 frameselectorItem = menu.add(new MenuItem("Frame Selector"));
251358 frameselectorItem.addActionListener(this);
252
- morphItem = menu.add(new MenuItem("Morph"));
253
- morphItem.addActionListener(this);
254359 scriptNodeItem = menu.add(new MenuItem("Script Node"));
255360 scriptNodeItem.addActionListener(this);
256361 cameraItem = menu.add(new MenuItem("Camera"));
257362 cameraItem.addActionListener(this);
363
+ }
258364
259365 oe.menuBar.add(menu = new Menu("Object"));
260366 textureItem = menu.add(new MenuItem("Texture"));
....@@ -269,21 +375,29 @@
269375 shadowYItem.addActionListener(this);
270376 shadowZItem = menu.add(new MenuItem("Shadow Z"));
271377 shadowZItem.addActionListener(this);
378
+ if (Globals.ADVANCED)
379
+ {
380
+ menu.add("-");
272381 linkerItem = menu.add(new MenuItem("Linker"));
273382 linkerItem.addActionListener(this);
274
- templateItem = menu.add(new MenuItem("Template"));
275
- templateItem.addActionListener(this);
276383 attributeItem = menu.add(new MenuItem("Attribute"));
277384 attributeItem.addActionListener(this);
385
+ templateItem = menu.add(new MenuItem("Template"));
386
+ templateItem.addActionListener(this);
278387 pointflowItem = menu.add(new MenuItem("Point Flow"));
279388 pointflowItem.addActionListener(this);
389
+ }
280390 menu.add("-");
281391 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
282392 resetTransformItem.addActionListener(this);
283393 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
284394 resetCentroidItem.addActionListener(this);
285
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
286
- 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);
287401
288402 oe.menuBar.add(menu = new Menu("Geometry"));
289403 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -294,8 +408,11 @@
294408 genNormalsCADItem.addActionListener(this);
295409 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
296410 genNormalsMESHItem.addActionListener(this);
411
+ if (Globals.ADVANCED)
412
+ {
297413 genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
298414 genNormalsMINEItem.addActionListener(this);
415
+ }
299416 stripifyItem = menu.add(new MenuItem("Stripify"));
300417 stripifyItem.addActionListener(this);
301418 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -317,23 +434,34 @@
317434 reduce34MeshItem.addActionListener(this);
318435 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
319436 increaseMeshItem.addActionListener(this);
320
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
321
- smoothMeshItem.addActionListener(this);
322437 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
323438 clipMeshItem.addActionListener(this);
439
+
440
+ if (Globals.ADVANCED)
441
+ {
442
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
443
+ smoothMeshItem.addActionListener(this);
444
+ }
324445
325446 oe.menuBar.add(menu = new Menu("Attributes"));
326447 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
327448 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);
328453 menu.add("-");
329454 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
330455 liveleavesItem.addActionListener(this);
331456 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
332457 unliveleavesItem.addActionListener(this);
458
+ if (Globals.ADVANCED)
459
+ {
333460 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
334461 supportleavesItem.addActionListener(this);
335462 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
336463 unsupportleavesItem.addActionListener(this);
464
+ }
337465 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
338466 hideleavesItem.addActionListener(this);
339467 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -342,6 +470,14 @@
342470 markleavesItem.addActionListener(this);
343471 unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
344472 unmarkleavesItem.addActionListener(this);
473
+ rewindleavesItem = menu.add(new MenuItem("Rewind Leaves"));
474
+ rewindleavesItem.addActionListener(this);
475
+ unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves"));
476
+ unrewindleavesItem.addActionListener(this);
477
+ randomleavesItem = menu.add(new MenuItem("Random Leaves"));
478
+ randomleavesItem.addActionListener(this);
479
+ unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves"));
480
+ unrandomleavesItem.addActionListener(this);
345481 menu.add("-");
346482 flipVItem = menu.add(new MenuItem("Flip V"));
347483 flipVItem.addActionListener(this);
....@@ -377,35 +513,40 @@
377513 sortbynameItem = menu.add(new MenuItem("Sort by name"));
378514 sortbynameItem.addActionListener(this);
379515 menu.add("-");
516
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
517
+ shareGeometriesItem.addActionListener(this);
518
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
519
+ mergeGeometriesItem.addActionListener(this);
520
+ if (Globals.ADVANCED)
521
+ {
522
+ // Pretty much the same as duplicate and clone.
380523 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
381524 extractGeometriesItem.addActionListener(this);
382525 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
383526 cloneGeometriesItem.addActionListener(this);
384
- shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
385
- shareGeometriesItem.addActionListener(this);
386
- mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
387
- mergeGeometriesItem.addActionListener(this);
527
+ }
388528
389529 oe.menuBar.add(menu = new Menu("Insert"));
390530 buildCreateMenu(menu);
391531
392
-
393
- oe.menuBar.add(menu = new Menu("Include"));
394
- importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
395
- importGFDItem.addActionListener(this);
396
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
397
- importVRMLX3DItem.addActionListener(this);
398
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
399
- importOBJItem.addActionListener(this);
400
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
401
- import3DSItem.addActionListener(this);
402
-
403532 oe.menuBar.add(menu = new Menu("Tools"));
404533 buildToolsMenu(menu);
405534 }
406535
407536 void SetupUI2(ObjEditor oe)
408537 {
538
+ // June 2019
539
+ if (oe == null)
540
+ {
541
+ //super.SetupUI2(this);
542
+ //return;
543
+ }
544
+
545
+ if (copy != group)
546
+ {
547
+ //super.SetupUI2(this);
548
+ }
549
+
409550 //new Exception().printStackTrace();
410551
411552 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -436,19 +577,47 @@
436577 */
437578 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
438579
580
+ //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
581
+ //minButton.setToolTipText("Minimize window");
582
+ //minButton.addActionListener(this);
583
+
584
+ oe.toolbarPanel.add(maxButton = new cButton("\u271A", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
585
+ maxButton.setToolTipText("Maximize window");
586
+ maxButton.addActionListener(this);
587
+
588
+ oe.toolbarPanel.add(fullButton = new cButton("\u2b1c", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
589
+ fullButton.setToolTipText("Full-screen window");
590
+ fullButton.addActionListener(this);
591
+
592
+ oe.toolbarPanel.add(undoButton = new cButton("\u21a9", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
593
+ undoButton.setToolTipText("Undo changes");
594
+ undoButton.addActionListener(this);
595
+
596
+ oe.toolbarPanel.add(redoButton = new cButton("\u21aa", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
597
+ redoButton.setToolTipText("Redo changes");
598
+ redoButton.addActionListener(this);
599
+
600
+ oe.toolbarPanel.add(saveButton = new cButton("\u21e3", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
601
+ saveButton.setToolTipText("Save changes");
602
+ saveButton.addActionListener(this);
603
+
439604 oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
440
- liveCB.setToolTipText("Enabled animation");
605
+ liveCB.setToolTipText("Enable animation");
441606 liveCB.addItemListener(this);
442607
608
+ oe.toolbarPanel.add(oneStepButton = new cButton("\u29f4", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
609
+ oneStepButton.setToolTipText("Animate one step forward");
610
+ oneStepButton.addActionListener(this);
611
+
443612 oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
444613 fastCB.setToolTipText("Fast mode");
445614 fastCB.addItemListener(this);
446615
447
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
616
+ oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK)); //, oe.aConstraints);
448617 trackCB.setToolTipText("Enable tracking");
449618 trackCB.addItemListener(this);
450619
451
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
620
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
452621 screenfitButton.setToolTipText("Screen fit");
453622 screenfitButton.addActionListener(this);
454623
....@@ -457,39 +626,39 @@
457626
458627 if (Globals.ADVANCED)
459628 {
460
- oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
629
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
461630 snapobjectButton.addActionListener(this);
462631 snapobjectButton.setToolTipText("Snap Object");
463632 }
464633
465
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
634
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
466635 flashSelectionButton.setToolTipText("Show selection");
467636 flashSelectionButton.addActionListener(this);
468637
469638 oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
470639
471
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
640
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
472641 twoButton.setToolTipText("Show center view only");
473642 twoButton.addActionListener(this);
474
- oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
643
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
475644 fourButton.addActionListener(this);
476645 fourButton.setToolTipText("Show left panel only");
477
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
646
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
478647 sixButton.setToolTipText("2-column layout left");
479648 sixButton.addActionListener(this);
480
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
649
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
481650 threeButton.setToolTipText("2-column layout right");
482651 threeButton.addActionListener(this);
483
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
652
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
484653 sevenButton.setToolTipText("3-column layout");
485654 sevenButton.addActionListener(this);
486655 //
487656
488
- oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
657
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
489658 rootButton.setToolTipText("Edit selection in new tab");
490659 rootButton.addActionListener(this);
491660
492
- oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
661
+ oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
493662 closeButton.setToolTipText("Close tab");
494663 closeButton.addActionListener(this);
495664 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
....@@ -497,23 +666,23 @@
497666
498667 cGridBag commandsPanel = new cGridBag();
499668
500
- commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
669
+ commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
501670 editButton.setToolTipText("Edit selection");
502671 editButton.addActionListener(this);
503672
504
- commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
673
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
505674 uneditButton.setToolTipText("Unedit selection");
506675 uneditButton.addActionListener(this);
507676
508
- commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
677
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
678
+ allParamsButton.setToolTipText("Edit all params");
679
+ allParamsButton.addActionListener(this);
680
+
681
+ commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
509682 clearPanelButton.setToolTipText("Clear edit panel");
510683 clearPanelButton.addActionListener(this);
511684
512
- commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
513
- allParamsButton.setToolTipText("All params??");
514
- allParamsButton.addActionListener(this);
515
-
516
- commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
685
+ commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
517686 unselectButton.setToolTipText("Unselect");
518687 unselectButton.addActionListener(this);
519688
....@@ -588,8 +757,18 @@
588757
589758 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
590759 {
760
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
761
+ boxCB.setToolTipText("Display bounding boxes");
762
+ boxCB.addItemListener(this);
763
+
764
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
765
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
766
+ zoomBoxCB.addItemListener(this);
767
+
768
+ if (true) // Globals.ADVANCED)
769
+ {
591770 panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
592
- supportCB.setToolTipText("Enabled rigging");
771
+ supportCB.setToolTipText("Enable rigging");
593772 supportCB.addItemListener(this);
594773
595774 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
....@@ -607,14 +786,6 @@
607786 slowCB.setToolTipText("Smooth interpolation");
608787 slowCB.addItemListener(this);
609788
610
- panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
611
- boxCB.setToolTipText("Display bounding boxes");
612
- boxCB.addItemListener(this);
613
-
614
- panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
615
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
616
- zoomBoxCB.addItemListener(this);
617
-
618789 // constraints.gridy += 1;
619790 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
620791 // speakerMocapCB.addItemListener(this);
....@@ -645,6 +816,8 @@
645816 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
646817 lookAtCB.setToolTipText("Look-at target");
647818 lookAtCB.addItemListener(this);
819
+
820
+ }
648821
649822 cGridBag fill = new cGridBag();
650823
....@@ -665,8 +838,11 @@
665838 buttonGroup.add(radioButton);
666839 radioButton.doClick();
667840 }
841
+
668842 void SetupViews(ObjEditor oe)
669843 {
844
+ theFrame = this;
845
+
670846 oe.SetupViews();
671847
672848 System.out.println("SetupViews");
....@@ -729,6 +905,7 @@
729905 } else if(e.getSource() == liveCB)
730906 {
731907 cameraView.ToggleLive();
908
+ refreshContents(false);
732909 }
733910 else if(e.getSource() == supportCB)
734911 {
....@@ -881,7 +1058,9 @@
8811058 // objEditor.DropFile((java.io.File[]) object, true);
8821059 // return;
8831060 // }
884
- if (string.charAt(0) == '/')
1061
+
1062
+ // File path for Mac and Windows
1063
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
8851064 {
8861065 // file(s)
8871066 String[] names = string.split("\n");
....@@ -908,7 +1087,7 @@
9081087
9091088 flashIt = false;
9101089 CameraPane pane = (CameraPane) target;
911
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1090
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
9121091 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
9131092
9141093 if (group.selection.size() == 1)
....@@ -935,11 +1114,11 @@
9351114 {
9361115 loadClipboard(true);
9371116 objEditor.jTree.setSelectionPath(destinationPath);
938
- pasteInto(false);
1117
+ pasteInto(false, false);
9391118 } else {
9401119 loadClipboard(false);
9411120 objEditor.jTree.setSelectionPath(destinationPath);
942
- pasteInto(false); // true); // ???
1121
+ pasteInto(false, false); // true); // ???
9431122 }
9441123 }
9451124 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1061,27 +1240,33 @@
10611240 kleinItem.addActionListener(this);
10621241 particleItem = menu.add(new MenuItem("Particle system"));
10631242 particleItem.addActionListener(this);
1243
+ if (Globals.ADVANCED)
1244
+ {
10641245 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10651246 ragdollItem.addActionListener(this);
10661247 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10671248 ragdoll2Item.addActionListener(this);
1249
+ }
10681250 menu.add("-");
1069
- meshItem = menu.add(new MenuItem("Mesh"));
1251
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10701252 meshItem.addActionListener(this);
10711253 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10721254 // meshGroupItem.addActionListener(this);
1255
+ if (Globals.ADVANCED)
1256
+ {
10731257 springItem = menu.add(new MenuItem("Spring"));
10741258 springItem.addActionListener(this);
10751259 flagItem = menu.add(new MenuItem("Flag"));
10761260 flagItem.addActionListener(this);
1077
- bezierItem = menu.add(new MenuItem("Patch"));
1078
- bezierItem.addActionListener(this);
1079
- checkerItem = menu.add(new MenuItem("Checker"));
1080
- checkerItem.addActionListener(this);
10811261 blobItem = menu.add(new MenuItem("Blob"));
10821262 blobItem.addActionListener(this);
10831263 latheItem = menu.add(new MenuItem("Lathe"));
10841264 latheItem.addActionListener(this);
1265
+ }
1266
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1267
+ bezierItem.addActionListener(this);
1268
+ overlayItem = menu.add(new MenuItem("Overlay"));
1269
+ overlayItem.addActionListener(this);
10851270 lightItem = menu.add(new MenuItem("Light"));
10861271 lightItem.addActionListener(this);
10871272 menu.add("-");
....@@ -1091,8 +1276,11 @@
10911276 loopItem.addActionListener(this);
10921277 doubleItem = menu.add(new MenuItem("Fork"));
10931278 doubleItem.addActionListener(this);
1279
+ if (Globals.ADVANCED)
1280
+ {
10941281 tripleItem = menu.add(new MenuItem("Trident"));
10951282 tripleItem.addActionListener(this);
1283
+ }
10961284 }
10971285
10981286 void buildToolsMenu(Menu menu)
....@@ -1106,24 +1294,26 @@
11061294 parseverticesItem.addActionListener(this);
11071295 textureFieldItem = menu.add(new MenuItem("Texture Field"));
11081296 textureFieldItem.addActionListener(this);
1109
- alignItem = menu.add(new MenuItem("Align"));
1297
+ alignItem = menu.add(new MenuItem("Align Objects"));
11101298 alignItem.addActionListener(this);
1111
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1112
- mirrorItem.addActionListener(this);
11131299 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11141300 reduceMorphItem.addActionListener(this);
11151301 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11161302 reduce34MorphItem.addActionListener(this);
1117
-
1303
+ menu.add("-");
11181304 menu.add(computeAOItem = new MenuItem("Compute AO"));
11191305 computeAOItem.addActionListener(this);
1120
- menu.add("-");
11211306
1307
+ if (Globals.ADVANCED)
1308
+ {
1309
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1310
+ mirrorItem.addActionListener(this);
1311
+ menu.add("-");
11221312 menu.add(memoryItem = new MenuItem("Memory Usage"));
11231313 memoryItem.addActionListener(this);
11241314 menu.add(analyzeItem = new MenuItem("Analyze"));
11251315 analyzeItem.addActionListener(this);
1126
- menu.add(dumpItem = new MenuItem("Dump"));
1316
+ menu.add(dumpItem = new MenuItem("Print"));
11271317 dumpItem.addActionListener(this);
11281318 // menu.add(pathItem = new MenuItem("From-to path"));
11291319 // pathItem.addActionListener(this);
....@@ -1141,6 +1331,7 @@
11411331 menu.add("-");
11421332 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11431333 editScriptItem.addActionListener(this);
1334
+ }
11441335 }
11451336
11461337 void ScreenFit()
....@@ -1469,9 +1660,9 @@
14691660
14701661 void Overwrite(int mask)
14711662 {
1472
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1663
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14731664 {
1474
- Object3D content = GrafreeD.clipboard.get(0);
1665
+ Object3D content = Grafreed.clipboard.get(0);
14751666
14761667 if (content instanceof cGroup && ((cGroup)content).transientlink )
14771668 content = ((cGroup)content).get(0);
....@@ -1642,7 +1833,7 @@
16421833 {
16431834 makeSomething(new BezierSurface());
16441835 } else
1645
- if (source == checkerItem)
1836
+ if (source == overlayItem)
16461837 {
16471838 /*
16481839 Object3D obj = new BezierSurface(5,8);
....@@ -1776,23 +1967,6 @@
17761967 csg.addChild(child);
17771968 child.addChild(csg);
17781969 } else
1779
-
1780
- if (source == importGFDItem)
1781
- {
1782
- ImportGFD();
1783
- } else
1784
- if (source == importVRMLX3DItem)
1785
- {
1786
- ImportVRMLX3D();
1787
- } else
1788
- if (source == import3DSItem)
1789
- {
1790
- objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
1791
- } else
1792
- if (source == importOBJItem)
1793
- {
1794
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1795
- } else
17961970 if (source == computeAOItem)
17971971 {
17981972 Globals.drawMode = CameraPane.OCCLUSION;
....@@ -1811,7 +1985,7 @@
18111985 if (source == invariantsItem)
18121986 {
18131987 System.out.println("Invariants:");
1814
- GrafreeD.grafreeD.universe.invariants();
1988
+ Grafreed.grafreeD.universe.invariants();
18151989 } else
18161990 if (source == memoryItem)
18171991 {
....@@ -1829,6 +2003,35 @@
18292003 if (source == dumpItem)
18302004 {
18312005 DumpObject();
2006
+ } else
2007
+ if (source == minButton)
2008
+ {
2009
+ Minimize();
2010
+ } else
2011
+ if (source == maxButton)
2012
+ {
2013
+ Maximize();
2014
+ } else
2015
+ if (source == fullButton)
2016
+ {
2017
+ ToggleFullScreen();
2018
+ } else
2019
+ if (source == undoButton)
2020
+ {
2021
+ Undo();
2022
+ } else
2023
+ if (source == redoButton)
2024
+ {
2025
+ Redo();
2026
+ } else
2027
+ if (source == saveButton)
2028
+ {
2029
+ Save();
2030
+ } else
2031
+ if (source == oneStepButton)
2032
+ {
2033
+ Globals.ONESTEP = true;
2034
+ cameraView.repaint();
18322035 } else
18332036 if (source == screenfitButton)
18342037 {
....@@ -1879,12 +2082,20 @@
18792082 {
18802083 loadClipboard(true);
18812084 } else
2085
+ if (source == undoItem)
2086
+ {
2087
+ Undo();
2088
+ } else
2089
+ if (source == redoItem)
2090
+ {
2091
+ Redo();
2092
+ } else
18822093 if (source == duplicateItem)
18832094 {
1884
- Object3D keep = GrafreeD.clipboard;
2095
+ Object3D keep = Grafreed.clipboard;
18852096 loadClipboard(false);
18862097 paste(false);
1887
- GrafreeD.clipboard = keep;
2098
+ Grafreed.clipboard = keep;
18882099 } else
18892100 if (source == cloneItem)
18902101 {
....@@ -1902,13 +2113,17 @@
19022113 {
19032114 paste(false);
19042115 } else
2116
+ if (source == pasteIntoItem)
2117
+ {
2118
+ pasteInto(true, false);
2119
+ } else
19052120 if (source == pasteLinkItem)
19062121 {
1907
- pasteInto(false);
2122
+ pasteInto(false, false);
19082123 } else
19092124 if (source == pasteCloneItem)
19102125 {
1911
- pasteInto(true);
2126
+ pasteInto(true, true);
19122127 } else
19132128 if (source == pasteExpandItem)
19142129 {
....@@ -2100,9 +2315,9 @@
21002315 // group.selection.get(0).setMasterThis(content); // should be identity
21012316 // refreshContents();
21022317 // }
2103
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2318
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21042319 {
2105
- Object3D content = GrafreeD.clipboard.get(0);
2320
+ Object3D content = Grafreed.clipboard.get(0);
21062321
21072322 if (content instanceof cGroup && ((cGroup)content).transientlink )
21082323 content = ((cGroup)content).get(0);
....@@ -2110,11 +2325,11 @@
21102325 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
21112326 for (int i=0; i<group.selection.size(); i++)
21122327 {
2113
- boolean random = CameraPane.RANDOM;
2114
- CameraPane.RANDOM = false; // parse all random nodes
2328
+ boolean random = CameraPane.SWITCH;
2329
+ CameraPane.SWITCH = false; // parse all random nodes
21152330 group.selection.get(i).linkVerticesThis(content);
21162331 // group.selection.get(i).setMasterThis(content); // should be identity
2117
- CameraPane.RANDOM = random;
2332
+ CameraPane.SWITCH = random;
21182333 }
21192334 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21202335 refreshContents();
....@@ -2124,20 +2339,20 @@
21242339 {
21252340 for (int i=0; i<group.selection.size(); i++)
21262341 {
2127
- boolean random = CameraPane.RANDOM;
2128
- CameraPane.RANDOM = false; // parse all random nodes
2342
+ boolean random = CameraPane.SWITCH;
2343
+ CameraPane.SWITCH = false; // parse all random nodes
21292344 group.selection.get(i).linkVerticesThis(null);
2130
- CameraPane.RANDOM = random;
2345
+ CameraPane.SWITCH = random;
21312346 }
21322347
21332348 refreshContents();
21342349 } else
21352350 if (source == relinkverticesItem)
21362351 {
2137
- boolean random = CameraPane.RANDOM;
2138
- CameraPane.RANDOM = false; // parse all random nodes
2352
+ boolean random = CameraPane.SWITCH;
2353
+ CameraPane.SWITCH = false; // parse all random nodes
21392354 group.selection.RelinkToSupport();
2140
- CameraPane.RANDOM = random;
2355
+ CameraPane.SWITCH = random;
21412356
21422357 refreshContents();
21432358 } else
....@@ -2152,9 +2367,9 @@
21522367 } else
21532368 if (source == setMasterItem)
21542369 {
2155
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2370
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21562371 {
2157
- Object3D content = GrafreeD.clipboard.get(0);
2372
+ Object3D content = Grafreed.clipboard.get(0);
21582373
21592374 if (content instanceof cGroup && ((cGroup)content).transientlink )
21602375 content = ((cGroup)content).get(0);
....@@ -2167,9 +2382,9 @@
21672382 {
21682383 if (group.selection.size() == 1)
21692384 {
2170
- if (GrafreeD.clipboard.size() == 1)
2385
+ if (Grafreed.clipboard.size() == 1)
21712386 {
2172
- Object3D content = GrafreeD.clipboard.get(0);
2387
+ Object3D content = Grafreed.clipboard.get(0);
21732388
21742389 if (content instanceof cGroup && ((cGroup)content).transientlink )
21752390 content = ((cGroup)content).get(0);
....@@ -2186,7 +2401,7 @@
21862401 {
21872402 RevertMeshes();
21882403 } else
2189
- if (source == resetMeshItem)
2404
+ if (source == resetAllItem)
21902405 {
21912406 ResetAll();
21922407 } else
....@@ -2374,7 +2589,7 @@
23742589 } else
23752590 if (source == genNormalsMESHItem)
23762591 {
2377
- GenNormals(true); // TODO
2592
+ GenNormalsMESH();
23782593 } else
23792594 if (source == genNormalsORGANItem)
23802595 {
....@@ -2439,6 +2654,22 @@
24392654 if (source == unmarkleavesItem)
24402655 {
24412656 MarkLeaves(false);
2657
+ } else
2658
+ if (source == rewindleavesItem)
2659
+ {
2660
+ RewindLeaves(true);
2661
+ } else
2662
+ if (source == unrewindleavesItem)
2663
+ {
2664
+ RewindLeaves(false);
2665
+ } else
2666
+ if (source == randomleavesItem)
2667
+ {
2668
+ RandomLeaves(true);
2669
+ } else
2670
+ if (source == unrandomleavesItem)
2671
+ {
2672
+ RandomLeaves(false);
24422673 } else
24432674 if (source == flipVItem)
24442675 {
....@@ -2524,9 +2755,13 @@
25242755 {
25252756 SmoothMesh();
25262757 } else
2527
- if (source == transformgeometryItem)
2758
+ if (source == transformGeometryItem)
25282759 {
25292760 TransformGeometry();
2761
+ } else
2762
+ if (source == transformChildrenItem)
2763
+ {
2764
+ TransformChildren();
25302765 } else
25312766 if (source == resetTransformItem)
25322767 {
....@@ -2534,7 +2769,11 @@
25342769 } else
25352770 if (source == resetCentroidItem)
25362771 {
2537
- ResetCentroid();
2772
+ ResetCentroid(true);
2773
+ } else
2774
+ if (source == resetCentroidXZItem)
2775
+ {
2776
+ ResetCentroid(false);
25382777 } else
25392778 if (source == resetParentItem)
25402779 {
....@@ -2698,6 +2937,24 @@
26982937 bigThree.ClearUI();
26992938 bigThree.add(centralPanel);
27002939 bigThree.FlushUI();
2940
+
2941
+ cameraView.requestFocusInWindow();
2942
+
2943
+// refreshContents(true);
2944
+//
2945
+// try
2946
+// {
2947
+// java.awt.Robot bot = new java.awt.Robot();
2948
+// int mask = InputEvent.BUTTON1_MASK;
2949
+// bot.mouseMove(100, 100);
2950
+// bot.mousePress(mask);
2951
+// bot.mouseRelease(mask);
2952
+// }
2953
+// catch (Exception e)
2954
+// {
2955
+//
2956
+// }
2957
+
27012958 } else
27022959 if (source == threeButton)
27032960 {
....@@ -2734,6 +2991,8 @@
27342991 bigThree.add(centralPanel);
27352992 bigThree.add(XYZPanel);
27362993 bigThree.FlushUI();
2994
+
2995
+ cameraView.requestFocusInWindow();
27372996 } else
27382997 if (source == fourButton)
27392998 {
....@@ -2769,6 +3028,8 @@
27693028 bigThree.ClearUI();
27703029 bigThree.add(scenePanel);
27713030 bigThree.FlushUI();
3031
+
3032
+ cameraView.requestFocusInWindow();
27723033 } else
27733034 if (source == sixButton)
27743035 {
....@@ -2805,6 +3066,8 @@
28053066 bigThree.add(scenePanel);
28063067 bigThree.add(centralPanel);
28073068 bigThree.FlushUI();
3069
+
3070
+ cameraView.requestFocusInWindow();
28083071 } else
28093072 if (source == sevenButton)
28103073 {
....@@ -2842,6 +3105,8 @@
28423105 bigThree.add(centralPanel);
28433106 bigThree.add(XYZPanel);
28443107 bigThree.FlushUI();
3108
+
3109
+ cameraView.requestFocusInWindow();
28453110 } else
28463111 if (source == rootButton)
28473112 {
....@@ -2853,6 +3118,7 @@
28533118 EditObject(obj);
28543119 }
28553120
3121
+ cameraView.requestFocusInWindow();
28563122 refreshContents(true);
28573123 } else
28583124 if (source == closeButton)
....@@ -2874,6 +3140,8 @@
28743140 break;
28753141 }
28763142 }
3143
+
3144
+ cameraView.requestFocusInWindow();
28773145 refreshContents(true);
28783146 } else
28793147 if (source == editItem || source == editButton)
....@@ -2890,9 +3158,9 @@
28903158 child.CloseUI();
28913159 listUI.remove(child);
28923160
2893
- child.editWindow = null; // ???????????
3161
+ //child.editWindow = null; // ???????????
28943162 }
2895
- objEditor.ctrlPanel.validate();
3163
+ objEditor.ctrlPanel.FlushUI();
28963164 //objEditor.jTree.clearSelection();
28973165 //objEditor.ResetSliders();
28983166 refreshContents(true);
....@@ -2976,7 +3244,10 @@
29763244 frontView.object = group;
29773245 sideView.object = group;
29783246 }
2979
- group.editWindow = this;
3247
+
3248
+// fix "+" issue
3249
+ //group.editWindow = this;
3250
+
29803251 /*
29813252 currentLayout = radio.layout;
29823253 if (currentLayout == null)
....@@ -2988,8 +3259,23 @@
29883259 //group.parent = null; // ROOT
29893260 //group.attributes = -1;
29903261 ResetModel();
3262
+
3263
+ cameraView.requestFocusInWindow();
29913264 refreshContents(true);
2992
- }
3265
+ } else if (event.getSource() == editCameraItem)
3266
+ {
3267
+ cameraView.ProtectCamera();
3268
+ cameraView.repaint();
3269
+ return;
3270
+ } else if (event.getSource() == revertCameraItem)
3271
+ {
3272
+ cameraView.RevertCamera();
3273
+ cameraView.repaint();
3274
+ return;
3275
+ // } else if (event.getSource() == textureButton)
3276
+ // {
3277
+ // return; // true;
3278
+ }
29933279 else
29943280 {
29953281 //return super.action(event, arg);
....@@ -2998,7 +3284,6 @@
29983284 }
29993285
30003286 boolean useclient = false;
3001
- cRadio radio;
30023287
30033288 void ToggleRoot()
30043289 {
....@@ -3050,6 +3335,28 @@
30503335 refreshContents();
30513336 }
30523337
3338
+ void TransformChildren()
3339
+ {
3340
+ Object3D obj;
3341
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3342
+ {
3343
+ obj = (Object3D)e.nextElement();
3344
+ obj.KeepTextureMatrices();
3345
+ obj.TransformChildren();
3346
+ obj.RestoreTextureMatrices();
3347
+
3348
+// if (obj.parent == null)
3349
+// {
3350
+// System.out.println("NULL PARENT!");
3351
+// new Exception().printStackTrace();
3352
+// }
3353
+// else
3354
+// TouchTransform(obj);
3355
+// //obj.parent.Touch();
3356
+ }
3357
+
3358
+ refreshContents();
3359
+ }
30533360
30543361 void ResetTransform()
30553362 {
....@@ -3162,7 +3469,7 @@
31623469 refreshContents();
31633470 }
31643471
3165
- void ResetCentroid()
3472
+ void ResetCentroid(boolean full)
31663473 {
31673474 Object3D obj;
31683475 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3177,12 +3484,16 @@
31773484 LA.matIdentity(Object3D.mat);
31783485 obj.getBounds(minima, maxima, false);
31793486 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3180
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3487
+ if (full)
3488
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
31813489 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
31823490 obj.TransformMesh(Object3D.mat);
3491
+
31833492 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3184
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3493
+ if (full)
3494
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
31853495 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3496
+
31863497 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
31873498 //Object3D.mat[3][0] = -Object3D.mat[3][0];
31883499 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3211,7 +3522,8 @@
32113522
32123523 int size = obj.MemorySize();
32133524
3214
- System.err.println((size/1024) + " KB is the size of " + obj);
3525
+ //System.err.println((size/1024) + " KB is the size of " + obj);
3526
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
32153527 }
32163528 }
32173529 catch (Exception e)
....@@ -3248,9 +3560,9 @@
32483560 obj = (Object3D)e.nextElement();
32493561
32503562 System.out.println("Object is: " + obj);
3251
- GrafreeD.AnalyzeObject(obj);
3563
+ Grafreed.AnalyzeObject(obj);
32523564 System.out.println("Boundary rep: " + obj.bRep);
3253
- GrafreeD.AnalyzeObject(obj.bRep);
3565
+ Grafreed.AnalyzeObject(obj.bRep);
32543566
32553567 // System.err.println((size/1024) + " KB is the size of " + obj);
32563568 }
....@@ -3292,6 +3604,13 @@
32923604 void GenNormals(boolean crease)
32933605 {
32943606 group.GenNormalsS(crease);
3607
+
3608
+ refreshContents();
3609
+ }
3610
+
3611
+ void GenNormalsMESH()
3612
+ {
3613
+ group.GenNormalsMeshS();
32953614
32963615 refreshContents();
32973616 }
....@@ -3464,8 +3783,8 @@
34643783
34653784 void ParseVertices()
34663785 {
3467
- boolean epsequal = GrafreeD.epsequal;
3468
- GrafreeD.epsequal = true;
3786
+ boolean epsequal = Grafreed.epsequal;
3787
+ Grafreed.epsequal = true;
34693788
34703789 for (int i=0; i<group.selection.size(); i++)
34713790 {
....@@ -3490,7 +3809,7 @@
34903809 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
34913810 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
34923811
3493
- g.add(GrafreeD.clipboard);
3812
+ g.add(Grafreed.clipboard);
34943813
34953814 buffer.add(g);
34963815 }
....@@ -3505,7 +3824,7 @@
35053824 makeSomething(buffer, i==group.selection.size()-1);
35063825 }
35073826
3508
- GrafreeD.epsequal = epsequal;
3827
+ Grafreed.epsequal = epsequal;
35093828
35103829 refreshContents();
35113830 }
....@@ -3523,7 +3842,16 @@
35233842 String pigment = Object3D.GetPigment(tex);
35243843 //String bump = Object3D.GetBump(tex);
35253844
3526
- com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3845
+ com.sun.opengl.util.texture.TextureData texturedata = null;
3846
+
3847
+ try
3848
+ {
3849
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3850
+ }
3851
+ catch (Exception e)
3852
+ {
3853
+ System.err.println("FAIL: " + node);
3854
+ }
35273855
35283856 double s = v.s;
35293857
....@@ -3611,11 +3939,11 @@
36113939
36123940 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
36133941
3614
- boolean random = CameraPane.RANDOM;
3615
- CameraPane.RANDOM = false; // parse all random nodes
3942
+ boolean random = CameraPane.SWITCH;
3943
+ CameraPane.SWITCH = false; // parse all random nodes
36163944 lowres.linkVerticesThis(null);
36173945 lowres.linkVerticesThis(sn);
3618
- CameraPane.RANDOM = random;
3946
+ CameraPane.SWITCH = random;
36193947
36203948 System.err.flush();
36213949
....@@ -3655,7 +3983,7 @@
36553983 return;
36563984
36573985 Object3D poses = group.selection.get(0);
3658
- Object3D ref = GrafreeD.clipboard.get(0);
3986
+ Object3D ref = Grafreed.clipboard.get(0);
36593987
36603988 Object3D newgroup = new Object3D("Po:" + poses.name);
36613989
....@@ -3849,9 +4177,9 @@
38494177
38504178 void ClipMesh()
38514179 {
3852
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
4180
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
38534181 {
3854
- Object3D content = GrafreeD.clipboard.get(0);
4182
+ Object3D content = Grafreed.clipboard.get(0);
38554183
38564184 if (content instanceof cGroup && ((cGroup)content).transientlink )
38574185 content = ((cGroup)content).get(0);
....@@ -3860,7 +4188,7 @@
38604188 // {
38614189 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
38624190 // }
3863
- group.selection.ClipMesh(GrafreeD.clipboard);
4191
+ group.selection.ClipMesh(Grafreed.clipboard);
38644192 }
38654193 // group.selection.ClipMesh(GrafreeD.clipboard);
38664194 System.out.println("DONE.");
....@@ -3907,6 +4235,18 @@
39074235 void MarkLeaves(boolean hide)
39084236 {
39094237 group.selection.MarkLeaves(hide);
4238
+ refreshContents();
4239
+ }
4240
+
4241
+ void RewindLeaves(boolean hide)
4242
+ {
4243
+ group.selection.RewindLeaves(hide);
4244
+ refreshContents();
4245
+ }
4246
+
4247
+ void RandomLeaves(boolean hide)
4248
+ {
4249
+ group.selection.RandomLeaves(hide);
39104250 refreshContents();
39114251 }
39124252
....@@ -3995,7 +4335,7 @@
39954335 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
39964336
39974337 Object3D elem = (Object3D)group.selection.elementAt(i);
3998
- if(elem != group)
4338
+ if(elem != group || !newWindow)
39994339 {
40004340 // if (!(elem instanceof Composite))
40014341 // newWindow = false;
....@@ -4085,7 +4425,6 @@
40854425 //case 702: // Event.LIST_DESELECT
40864426 group.deselectAll();
40874427 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4088
- objEditor.ClearInfo(); // .GetMaterial());
40894428 if (tps != null)
40904429 {
40914430 for (int i=0; i < tps.length; i++)
....@@ -4094,10 +4433,8 @@
40944433
40954434 //if (child.parent != null)
40964435 //child.parent.addSelectee(child);
4436
+ objEditor.SetMaterial(child);
40974437 group.addSelectee(child);
4098
- objEditor.SetMaterial(child); // .GetMaterial());
4099
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4100
- System.err.println("info : " + child.GetPath());
41014438 }
41024439 }
41034440 // else
....@@ -4107,16 +4444,17 @@
41074444 // System.err.println("info : " + group.GetPath());
41084445 // }
41094446
4110
- objEditor.SetText(); // jan 2014
4111
-
4112
- if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4447
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
41134448 CameraPane.flash = true;
41144449
4115
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4450
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
41164451 // a camera
41174452 {
4118
- CameraPane.camerachangeframe = 0; // don't refuse it
4119
- Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4453
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
4454
+ {
4455
+ CameraPane.camerachangeframe = 0; // don't refuse it
4456
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4457
+ }
41204458 // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
41214459 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
41224460 }
....@@ -4129,6 +4467,26 @@
41294467
41304468 freezemodel = false;
41314469 }
4470
+
4471
+ void refreshContents(boolean cp)
4472
+ {
4473
+ if (!Globals.MOUSEDRAGGED)
4474
+ {
4475
+ objEditor.ClearInfo(); // .GetMaterial());
4476
+
4477
+ for (int i=0; i < group.selection.Size(); i++)
4478
+ {
4479
+ Object3D child = (Object3D) group.selection.get(i);
4480
+
4481
+ objEditor.AddInfo(child, this, true);
4482
+ System.err.println("info : " + child.GetPath());
4483
+ }
4484
+
4485
+ objEditor.SetText(); // jan 2014
4486
+ }
4487
+
4488
+ super.refreshContents(cp);
4489
+ }
41324490
41334491 void linkSomething(Object3D thing)
41344492 {
....@@ -4200,16 +4558,18 @@
42004558 {
42014559 if (group.selection.isEmpty())
42024560 return;
4203
- GrafreeD.clipboardIsTempGroup = false;
4561
+
4562
+ Grafreed.clipboardIsTempGroup = false;
42044563 Composite tGroup = null;
42054564 if (group.selection.size() > 0) // 1)
42064565 {
42074566 tGroup = new cGroup();
4208
- GrafreeD.clipboardIsTempGroup = true;
4567
+ Grafreed.clipboardIsTempGroup = true;
42094568 }
42104569
42114570 if (cut)
42124571 {
4572
+ Save();
42134573 //int indices[] = jList.getSelectedIndices();
42144574 //for (int i = indices.length - 1; i >= 0; i--)
42154575 //jList.remove(indices[i]);
....@@ -4245,16 +4605,16 @@
42454605 //System.out.println("cut " + child);
42464606 //System.out.println("parent = " + child.parent);
42474607 // tmp.addChild(child);
4248
- if (GrafreeD.clipboardIsTempGroup)
4608
+ if (Grafreed.clipboardIsTempGroup)
42494609 tGroup.add/*Child*/(tmp);
42504610 else
4251
- GrafreeD.clipboard = tmp;
4611
+ Grafreed.clipboard = tmp;
42524612 }
42534613 else
4254
- if (GrafreeD.clipboardIsTempGroup)
4614
+ if (Grafreed.clipboardIsTempGroup)
42554615 tGroup.add/*Child*/(child);
42564616 else
4257
- GrafreeD.clipboard = child;
4617
+ Grafreed.clipboard = child;
42584618 }
42594619
42604620 //ResetModel();
....@@ -4286,21 +4646,23 @@
42864646 //System.out.println("cut " + elem);
42874647 //System.out.println("parent = " + elem.parent);
42884648 // tmp.addChild(elem);
4289
- if (GrafreeD.clipboardIsTempGroup)
4649
+ if (Grafreed.clipboardIsTempGroup)
42904650 tGroup.add/*Child*/(tmp);
42914651 else
4292
- GrafreeD.clipboard = tmp;
4652
+ Grafreed.clipboard = tmp;
42934653 }
42944654 else
4295
- if (GrafreeD.clipboardIsTempGroup)
4655
+ if (Grafreed.clipboardIsTempGroup)
42964656 tGroup.add/*Child*/(child);
42974657 else
4298
- GrafreeD.clipboard = child;
4658
+ Grafreed.clipboard = child;
42994659 }
43004660
43014661 }
4302
- if (GrafreeD.clipboardIsTempGroup)
4303
- GrafreeD.clipboard = tGroup;
4662
+
4663
+ if (Grafreed.clipboardIsTempGroup)
4664
+ Grafreed.clipboard = tGroup;
4665
+
43044666 if (cut)
43054667 {
43064668 ResetModel();
....@@ -4314,7 +4676,7 @@
43144676 // return;
43154677 boolean first = true;
43164678
4317
- if (GrafreeD.clipboardIsTempGroup)
4679
+ if (Grafreed.clipboardIsTempGroup)
43184680 {
43194681 Composite temp;
43204682
....@@ -4325,7 +4687,7 @@
43254687 temp = (Composite)Applet3D.clipboard.deepCopy();
43264688 */
43274689 Object3D elem;
4328
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4690
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
43294691 {
43304692 Object3D child = (Object3D)e.nextElement();
43314693
....@@ -4359,21 +4721,21 @@
43594721 //Object3D cb = Applet3D.clipboard;
43604722 //temp.addChild(cb);
43614723 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4362
- assert(GrafreeD.clipboard.parent == null);
4363
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4364
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4365
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4366
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
4724
+ assert(Grafreed.clipboard.parent == null);
4725
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4726
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4727
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4728
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
43674729 else
4368
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4369
- GrafreeD.clipboard.get(0).parent = keepparent;
4730
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4731
+ Grafreed.clipboard.get(0).parent = keepparent;
43704732 }
43714733
43724734 ResetModel();
43734735 refreshContents();
43744736 }
43754737
4376
- void pasteInto(boolean copyit)
4738
+ void pasteInto(boolean copyit, boolean clone)
43774739 {
43784740 // if (GrafreeD.clipboard == null)
43794741 // return;
....@@ -4402,15 +4764,22 @@
44024764 if (copyit)
44034765 {
44044766 // paste(false);
4405
- CloneClipboard(false); // sept 2014
4767
+ if (clone)
4768
+ {
4769
+ CloneClipboard(false); // sept 2014
4770
+ }
4771
+ else
4772
+ {
4773
+ paste(false);
4774
+ }
44064775 }
44074776 else
44084777 {
44094778 boolean first = true;
44104779
4411
- if (GrafreeD.clipboardIsTempGroup)
4780
+ if (Grafreed.clipboardIsTempGroup)
44124781 {
4413
- Composite temp = (Composite)GrafreeD.clipboard;
4782
+ Composite temp = (Composite)Grafreed.clipboard;
44144783 Object3D copy;
44154784 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
44164785 {
....@@ -4420,7 +4789,7 @@
44204789 }
44214790 } else
44224791 {
4423
- linkSomething(GrafreeD.clipboard); //.get(0));
4792
+ linkSomething(Grafreed.clipboard); //.get(0));
44244793 }
44254794 }
44264795 }
....@@ -4825,21 +5194,6 @@
48255194 }
48265195 */
48275196
4828
- void ImportGFD()
4829
- {
4830
- FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
4831
- browser.show();
4832
- String filename = browser.getFile();
4833
- if (filename != null && filename.length() > 0)
4834
- {
4835
- String fullname = browser.getDirectory() + filename;
4836
-
4837
- //Object3D readobj =
4838
- objEditor.ReadGFD(fullname, objEditor);
4839
- //makeSomething(readobj);
4840
- }
4841
- }
4842
-
48435197 /*
48445198 public void Callback(Object obj)
48455199 {
....@@ -4863,26 +5217,9 @@
48635217 }
48645218 */
48655219
4866
- void ImportVRMLX3D()
4867
- {
4868
- if (GrafreeD.standAlone)
4869
- {
4870
- /**/
4871
- FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
4872
- browser.show();
4873
- String filename = browser.getFile();
4874
- if (filename != null && filename.length() > 0)
4875
- {
4876
- String fullname = browser.getDirectory() + filename;
4877
- LoadVRMLX3D(fullname);
4878
- }
4879
- /**/
4880
- }
4881
- }
4882
-
48835220 String GetFile(String dialogName)
48845221 {
4885
- if (GrafreeD.standAlone)
5222
+ if (Grafreed.standAlone)
48865223 {
48875224 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
48885225 browser.show();
....@@ -4946,10 +5283,18 @@
49465283 cButton flashSelectionButton;
49475284 cButton editButton;
49485285 cButton uneditButton;
5286
+ JCheckBox allParamsButton;
49495287 cButton clearpanelButton;
4950
- cButton allParamsButton;
49515288 cButton unselectButton;
49525289
5290
+ cButton minButton;
5291
+ cButton maxButton;
5292
+ cButton fullButton;
5293
+ cButton undoButton;
5294
+ cButton redoButton;
5295
+ cButton saveButton;
5296
+ cButton oneStepButton;
5297
+
49535298 cButton screenfitButton;
49545299 cButton screenfitpointButton;
49555300 cButton snapobjectButton;
....@@ -4960,14 +5305,6 @@
49605305 cButton closeButton;
49615306
49625307 cButton setsupportButton;
4963
-
4964
- cButton twoButton;
4965
- cButton sixButton;
4966
- cButton threeButton;
4967
- cButton sevenButton;
4968
- cButton fourButton; // full panel
4969
- cButton oneButton; // full XYZ
4970
- //cButton currentLayout;
49715308
49725309 //
49735310 //Composite
....@@ -4980,6 +5317,8 @@
49805317 private MenuItem lookFromItem;
49815318 private MenuItem switchItem;
49825319 private MenuItem cutItem;
5320
+ private MenuItem undoItem;
5321
+ private MenuItem redoItem;
49835322 private MenuItem duplicateItem;
49845323 private MenuItem cloneItem;
49855324 private MenuItem cloneSupportItem;
....@@ -4993,7 +5332,7 @@
49935332 private MenuItem linkverticesItem;
49945333 private MenuItem relinkverticesItem;
49955334 private MenuItem setMasterItem;
4996
- private MenuItem resetMeshItem;
5335
+ private MenuItem resetAllItem;
49975336 private MenuItem stepAllItem;
49985337 private MenuItem revertMeshItem;
49995338 private MenuItem poseMeshItem;
....@@ -5004,6 +5343,7 @@
50045343 private MenuItem mergeGeometriesItem;
50055344 private MenuItem copyItem;
50065345 private MenuItem pasteItem;
5346
+ private MenuItem pasteIntoItem;
50075347 private MenuItem pasteLinkItem;
50085348 private MenuItem pasteCloneItem;
50095349 private MenuItem pasteExpandItem;
....@@ -5042,6 +5382,10 @@
50425382 private MenuItem showleavesItem;
50435383 private MenuItem markleavesItem;
50445384 private MenuItem unmarkleavesItem;
5385
+ private MenuItem rewindleavesItem;
5386
+ private MenuItem unrewindleavesItem;
5387
+ private MenuItem randomleavesItem;
5388
+ private MenuItem unrandomleavesItem;
50455389
50465390 private MenuItem flipVItem;
50475391 private MenuItem unflipVItem;
....@@ -5053,8 +5397,10 @@
50535397 private MenuItem panoTexturesItem;
50545398
50555399 private MenuItem resetCentroidItem;
5056
- private MenuItem transformgeometryItem;
5400
+ private MenuItem resetCentroidXZItem;
50575401 private MenuItem resetTransformItem;
5402
+ private MenuItem transformGeometryItem;
5403
+ private MenuItem transformChildrenItem;
50585404 private MenuItem hideItem;
50595405 private MenuItem grabItem;
50605406 private MenuItem backItem;
....@@ -5101,7 +5447,7 @@
51015447 private MenuItem blobItem;
51025448 private MenuItem latheItem;
51035449 private MenuItem bezierItem;
5104
- private MenuItem checkerItem;
5450
+ private MenuItem overlayItem;
51055451 private MenuItem meshItem;
51065452 // private MenuItem meshGroupItem;
51075453 private MenuItem springItem;
....@@ -5123,11 +5469,6 @@
51235469 private MenuItem doubleItem;
51245470 private MenuItem tripleItem;
51255471
5126
- private MenuItem importGFDItem;
5127
- private MenuItem importVRMLX3DItem;
5128
- private MenuItem import3DSItem;
5129
- private MenuItem importOBJItem;
5130
-
51315472 private MenuItem computeAOItem;
51325473 private MenuItem recompileItem;
51335474 private MenuItem editScriptItem;
....@@ -5137,4 +5478,8 @@
51375478 private MenuItem analyzeItem;
51385479 private MenuItem dumpItem;
51395480 //boolean freezemodel = false;
5481
+
5482
+ Menu cameraMenu;
5483
+ MenuItem editCameraItem;
5484
+ MenuItem revertCameraItem;
51405485 }