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,27 +335,32 @@
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);
241342 menu.add("-");
242
- randomItem = menu.add(new MenuItem("Random"));
343
+ randomItem = menu.add(new MenuItem("Switch node"));
243344 randomItem.addActionListener(this);
244
- physicsItem = menu.add(new MenuItem("Physics"));
245
- physicsItem.addActionListener(this);
246
- frameselectorItem = menu.add(new MenuItem("Frame Selector"));
247
- frameselectorItem.addActionListener(this);
248345 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
249346 switchGeoItem.addActionListener(this);
250347 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
251348 switchTransfoItem.addActionListener(this);
252
- morphItem = menu.add(new MenuItem("Morph"));
349
+ morphItem = menu.add(new MenuItem("Morph Group"));
253350 morphItem.addActionListener(this);
351
+
352
+ if (Globals.ADVANCED)
353
+ {
354
+ menu.add("-");
355
+ physicsItem = menu.add(new MenuItem("Physics"));
356
+ physicsItem.addActionListener(this);
357
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
358
+ frameselectorItem.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,63 +577,88 @@
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
455624 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
456625 // screenfitpointButton.addActionListener(this);
457
-// oe.aConstraints.gridx += 1;
458
- oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
459
- snapobjectButton.addActionListener(this);
460
- snapobjectButton.setToolTipText("Snap Object");
461
- oe.aConstraints.gridx += 1;
462626
463
- //aConstraints.gridx = 0;
464
- //aConstraints.gridy += 1;
465
- oe.aConstraints.weighty = 0;
466
- oe.aConstraints.gridwidth = 1;
467
-
468
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
627
+ if (Globals.ADVANCED)
628
+ {
629
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
630
+ snapobjectButton.addActionListener(this);
631
+ snapobjectButton.setToolTipText("Snap Object");
632
+ }
633
+
634
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
469635 flashSelectionButton.setToolTipText("Show selection");
470636 flashSelectionButton.addActionListener(this);
471637
472638 oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
473639
474
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
640
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
475641 twoButton.setToolTipText("Show center view only");
476642 twoButton.addActionListener(this);
477
- oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
643
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
478644 fourButton.addActionListener(this);
479645 fourButton.setToolTipText("Show left panel only");
480
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
646
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
481647 sixButton.setToolTipText("2-column layout left");
482648 sixButton.addActionListener(this);
483
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
649
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
484650 threeButton.setToolTipText("2-column layout right");
485651 threeButton.addActionListener(this);
486
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
652
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
487653 sevenButton.setToolTipText("3-column layout");
488654 sevenButton.addActionListener(this);
489655 //
490656
491
- 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);
492658 rootButton.setToolTipText("Edit selection in new tab");
493659 rootButton.addActionListener(this);
494660
495
- oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
661
+ oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
496662 closeButton.setToolTipText("Close tab");
497663 closeButton.addActionListener(this);
498664 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
....@@ -500,23 +666,23 @@
500666
501667 cGridBag commandsPanel = new cGridBag();
502668
503
- commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
669
+ commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
504670 editButton.setToolTipText("Edit selection");
505671 editButton.addActionListener(this);
506672
507
- commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
673
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
508674 uneditButton.setToolTipText("Unedit selection");
509675 uneditButton.addActionListener(this);
510676
511
- 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);
512682 clearPanelButton.setToolTipText("Clear edit panel");
513683 clearPanelButton.addActionListener(this);
514684
515
- commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
516
- allParamsButton.setToolTipText("All params??");
517
- allParamsButton.addActionListener(this);
518
-
519
- commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
685
+ commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
520686 unselectButton.setToolTipText("Unselect");
521687 unselectButton.addActionListener(this);
522688
....@@ -591,8 +757,18 @@
591757
592758 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
593759 {
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
+ {
594770 panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
595
- supportCB.setToolTipText("Enabled rigging");
771
+ supportCB.setToolTipText("Enable rigging");
596772 supportCB.addItemListener(this);
597773
598774 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
....@@ -610,14 +786,6 @@
610786 slowCB.setToolTipText("Smooth interpolation");
611787 slowCB.addItemListener(this);
612788
613
- panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
614
- boxCB.setToolTipText("Display bounding boxes");
615
- boxCB.addItemListener(this);
616
-
617
- panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
618
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
619
- zoomBoxCB.addItemListener(this);
620
-
621789 // constraints.gridy += 1;
622790 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
623791 // speakerMocapCB.addItemListener(this);
....@@ -648,6 +816,8 @@
648816 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
649817 lookAtCB.setToolTipText("Look-at target");
650818 lookAtCB.addItemListener(this);
819
+
820
+ }
651821
652822 cGridBag fill = new cGridBag();
653823
....@@ -668,8 +838,11 @@
668838 buttonGroup.add(radioButton);
669839 radioButton.doClick();
670840 }
841
+
671842 void SetupViews(ObjEditor oe)
672843 {
844
+ theFrame = this;
845
+
673846 oe.SetupViews();
674847
675848 System.out.println("SetupViews");
....@@ -732,6 +905,7 @@
732905 } else if(e.getSource() == liveCB)
733906 {
734907 cameraView.ToggleLive();
908
+ refreshContents(false);
735909 }
736910 else if(e.getSource() == supportCB)
737911 {
....@@ -884,7 +1058,9 @@
8841058 // objEditor.DropFile((java.io.File[]) object, true);
8851059 // return;
8861060 // }
887
- if (string.charAt(0) == '/')
1061
+
1062
+ // File path for Mac and Windows
1063
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
8881064 {
8891065 // file(s)
8901066 String[] names = string.split("\n");
....@@ -911,7 +1087,7 @@
9111087
9121088 flashIt = false;
9131089 CameraPane pane = (CameraPane) target;
914
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1090
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
9151091 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
9161092
9171093 if (group.selection.size() == 1)
....@@ -938,11 +1114,11 @@
9381114 {
9391115 loadClipboard(true);
9401116 objEditor.jTree.setSelectionPath(destinationPath);
941
- pasteInto(false);
1117
+ pasteInto(false, false);
9421118 } else {
9431119 loadClipboard(false);
9441120 objEditor.jTree.setSelectionPath(destinationPath);
945
- pasteInto(false); // true); // ???
1121
+ pasteInto(false, false); // true); // ???
9461122 }
9471123 }
9481124 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1064,27 +1240,33 @@
10641240 kleinItem.addActionListener(this);
10651241 particleItem = menu.add(new MenuItem("Particle system"));
10661242 particleItem.addActionListener(this);
1243
+ if (Globals.ADVANCED)
1244
+ {
10671245 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10681246 ragdollItem.addActionListener(this);
10691247 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10701248 ragdoll2Item.addActionListener(this);
1249
+ }
10711250 menu.add("-");
1072
- meshItem = menu.add(new MenuItem("Mesh"));
1251
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10731252 meshItem.addActionListener(this);
10741253 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10751254 // meshGroupItem.addActionListener(this);
1255
+ if (Globals.ADVANCED)
1256
+ {
10761257 springItem = menu.add(new MenuItem("Spring"));
10771258 springItem.addActionListener(this);
10781259 flagItem = menu.add(new MenuItem("Flag"));
10791260 flagItem.addActionListener(this);
1080
- bezierItem = menu.add(new MenuItem("Patch"));
1081
- bezierItem.addActionListener(this);
1082
- checkerItem = menu.add(new MenuItem("Checker"));
1083
- checkerItem.addActionListener(this);
10841261 blobItem = menu.add(new MenuItem("Blob"));
10851262 blobItem.addActionListener(this);
10861263 latheItem = menu.add(new MenuItem("Lathe"));
10871264 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);
10881270 lightItem = menu.add(new MenuItem("Light"));
10891271 lightItem.addActionListener(this);
10901272 menu.add("-");
....@@ -1094,8 +1276,11 @@
10941276 loopItem.addActionListener(this);
10951277 doubleItem = menu.add(new MenuItem("Fork"));
10961278 doubleItem.addActionListener(this);
1279
+ if (Globals.ADVANCED)
1280
+ {
10971281 tripleItem = menu.add(new MenuItem("Trident"));
10981282 tripleItem.addActionListener(this);
1283
+ }
10991284 }
11001285
11011286 void buildToolsMenu(Menu menu)
....@@ -1109,24 +1294,26 @@
11091294 parseverticesItem.addActionListener(this);
11101295 textureFieldItem = menu.add(new MenuItem("Texture Field"));
11111296 textureFieldItem.addActionListener(this);
1112
- alignItem = menu.add(new MenuItem("Align"));
1297
+ alignItem = menu.add(new MenuItem("Align Objects"));
11131298 alignItem.addActionListener(this);
1114
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1115
- mirrorItem.addActionListener(this);
11161299 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11171300 reduceMorphItem.addActionListener(this);
11181301 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11191302 reduce34MorphItem.addActionListener(this);
1120
-
1303
+ menu.add("-");
11211304 menu.add(computeAOItem = new MenuItem("Compute AO"));
11221305 computeAOItem.addActionListener(this);
1123
- menu.add("-");
11241306
1307
+ if (Globals.ADVANCED)
1308
+ {
1309
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1310
+ mirrorItem.addActionListener(this);
1311
+ menu.add("-");
11251312 menu.add(memoryItem = new MenuItem("Memory Usage"));
11261313 memoryItem.addActionListener(this);
11271314 menu.add(analyzeItem = new MenuItem("Analyze"));
11281315 analyzeItem.addActionListener(this);
1129
- menu.add(dumpItem = new MenuItem("Dump"));
1316
+ menu.add(dumpItem = new MenuItem("Print"));
11301317 dumpItem.addActionListener(this);
11311318 // menu.add(pathItem = new MenuItem("From-to path"));
11321319 // pathItem.addActionListener(this);
....@@ -1144,6 +1331,7 @@
11441331 menu.add("-");
11451332 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11461333 editScriptItem.addActionListener(this);
1334
+ }
11471335 }
11481336
11491337 void ScreenFit()
....@@ -1472,9 +1660,9 @@
14721660
14731661 void Overwrite(int mask)
14741662 {
1475
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1663
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14761664 {
1477
- Object3D content = GrafreeD.clipboard.get(0);
1665
+ Object3D content = Grafreed.clipboard.get(0);
14781666
14791667 if (content instanceof cGroup && ((cGroup)content).transientlink )
14801668 content = ((cGroup)content).get(0);
....@@ -1645,7 +1833,7 @@
16451833 {
16461834 makeSomething(new BezierSurface());
16471835 } else
1648
- if (source == checkerItem)
1836
+ if (source == overlayItem)
16491837 {
16501838 /*
16511839 Object3D obj = new BezierSurface(5,8);
....@@ -1779,23 +1967,6 @@
17791967 csg.addChild(child);
17801968 child.addChild(csg);
17811969 } else
1782
-
1783
- if (source == importGFDItem)
1784
- {
1785
- ImportGFD();
1786
- } else
1787
- if (source == importVRMLX3DItem)
1788
- {
1789
- ImportVRMLX3D();
1790
- } else
1791
- if (source == import3DSItem)
1792
- {
1793
- objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
1794
- } else
1795
- if (source == importOBJItem)
1796
- {
1797
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1798
- } else
17991970 if (source == computeAOItem)
18001971 {
18011972 Globals.drawMode = CameraPane.OCCLUSION;
....@@ -1814,7 +1985,7 @@
18141985 if (source == invariantsItem)
18151986 {
18161987 System.out.println("Invariants:");
1817
- GrafreeD.grafreeD.universe.invariants();
1988
+ Grafreed.grafreeD.universe.invariants();
18181989 } else
18191990 if (source == memoryItem)
18201991 {
....@@ -1832,6 +2003,35 @@
18322003 if (source == dumpItem)
18332004 {
18342005 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();
18352035 } else
18362036 if (source == screenfitButton)
18372037 {
....@@ -1882,12 +2082,20 @@
18822082 {
18832083 loadClipboard(true);
18842084 } else
2085
+ if (source == undoItem)
2086
+ {
2087
+ Undo();
2088
+ } else
2089
+ if (source == redoItem)
2090
+ {
2091
+ Redo();
2092
+ } else
18852093 if (source == duplicateItem)
18862094 {
1887
- Object3D keep = GrafreeD.clipboard;
2095
+ Object3D keep = Grafreed.clipboard;
18882096 loadClipboard(false);
18892097 paste(false);
1890
- GrafreeD.clipboard = keep;
2098
+ Grafreed.clipboard = keep;
18912099 } else
18922100 if (source == cloneItem)
18932101 {
....@@ -1905,13 +2113,17 @@
19052113 {
19062114 paste(false);
19072115 } else
2116
+ if (source == pasteIntoItem)
2117
+ {
2118
+ pasteInto(true, false);
2119
+ } else
19082120 if (source == pasteLinkItem)
19092121 {
1910
- pasteInto(false);
2122
+ pasteInto(false, false);
19112123 } else
19122124 if (source == pasteCloneItem)
19132125 {
1914
- pasteInto(true);
2126
+ pasteInto(true, true);
19152127 } else
19162128 if (source == pasteExpandItem)
19172129 {
....@@ -2103,9 +2315,9 @@
21032315 // group.selection.get(0).setMasterThis(content); // should be identity
21042316 // refreshContents();
21052317 // }
2106
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2318
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21072319 {
2108
- Object3D content = GrafreeD.clipboard.get(0);
2320
+ Object3D content = Grafreed.clipboard.get(0);
21092321
21102322 if (content instanceof cGroup && ((cGroup)content).transientlink )
21112323 content = ((cGroup)content).get(0);
....@@ -2113,11 +2325,11 @@
21132325 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
21142326 for (int i=0; i<group.selection.size(); i++)
21152327 {
2116
- boolean random = CameraPane.RANDOM;
2117
- CameraPane.RANDOM = false; // parse all random nodes
2328
+ boolean random = CameraPane.SWITCH;
2329
+ CameraPane.SWITCH = false; // parse all random nodes
21182330 group.selection.get(i).linkVerticesThis(content);
21192331 // group.selection.get(i).setMasterThis(content); // should be identity
2120
- CameraPane.RANDOM = random;
2332
+ CameraPane.SWITCH = random;
21212333 }
21222334 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21232335 refreshContents();
....@@ -2127,20 +2339,20 @@
21272339 {
21282340 for (int i=0; i<group.selection.size(); i++)
21292341 {
2130
- boolean random = CameraPane.RANDOM;
2131
- CameraPane.RANDOM = false; // parse all random nodes
2342
+ boolean random = CameraPane.SWITCH;
2343
+ CameraPane.SWITCH = false; // parse all random nodes
21322344 group.selection.get(i).linkVerticesThis(null);
2133
- CameraPane.RANDOM = random;
2345
+ CameraPane.SWITCH = random;
21342346 }
21352347
21362348 refreshContents();
21372349 } else
21382350 if (source == relinkverticesItem)
21392351 {
2140
- boolean random = CameraPane.RANDOM;
2141
- CameraPane.RANDOM = false; // parse all random nodes
2352
+ boolean random = CameraPane.SWITCH;
2353
+ CameraPane.SWITCH = false; // parse all random nodes
21422354 group.selection.RelinkToSupport();
2143
- CameraPane.RANDOM = random;
2355
+ CameraPane.SWITCH = random;
21442356
21452357 refreshContents();
21462358 } else
....@@ -2155,9 +2367,9 @@
21552367 } else
21562368 if (source == setMasterItem)
21572369 {
2158
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2370
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21592371 {
2160
- Object3D content = GrafreeD.clipboard.get(0);
2372
+ Object3D content = Grafreed.clipboard.get(0);
21612373
21622374 if (content instanceof cGroup && ((cGroup)content).transientlink )
21632375 content = ((cGroup)content).get(0);
....@@ -2170,9 +2382,9 @@
21702382 {
21712383 if (group.selection.size() == 1)
21722384 {
2173
- if (GrafreeD.clipboard.size() == 1)
2385
+ if (Grafreed.clipboard.size() == 1)
21742386 {
2175
- Object3D content = GrafreeD.clipboard.get(0);
2387
+ Object3D content = Grafreed.clipboard.get(0);
21762388
21772389 if (content instanceof cGroup && ((cGroup)content).transientlink )
21782390 content = ((cGroup)content).get(0);
....@@ -2189,7 +2401,7 @@
21892401 {
21902402 RevertMeshes();
21912403 } else
2192
- if (source == resetMeshItem)
2404
+ if (source == resetAllItem)
21932405 {
21942406 ResetAll();
21952407 } else
....@@ -2238,7 +2450,7 @@
22382450 RandomNode random = new RandomNode();
22392451 group(random);
22402452 if (random.size() > 0)
2241
- random.name = random.get(0).name + "Rnd";
2453
+ random.name = random.get(0).name + "Switch";
22422454 } else
22432455 if (source == physicsItem)
22442456 {
....@@ -2377,7 +2589,7 @@
23772589 } else
23782590 if (source == genNormalsMESHItem)
23792591 {
2380
- GenNormals(true); // TODO
2592
+ GenNormalsMESH();
23812593 } else
23822594 if (source == genNormalsORGANItem)
23832595 {
....@@ -2442,6 +2654,22 @@
24422654 if (source == unmarkleavesItem)
24432655 {
24442656 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);
24452673 } else
24462674 if (source == flipVItem)
24472675 {
....@@ -2527,9 +2755,13 @@
25272755 {
25282756 SmoothMesh();
25292757 } else
2530
- if (source == transformgeometryItem)
2758
+ if (source == transformGeometryItem)
25312759 {
25322760 TransformGeometry();
2761
+ } else
2762
+ if (source == transformChildrenItem)
2763
+ {
2764
+ TransformChildren();
25332765 } else
25342766 if (source == resetTransformItem)
25352767 {
....@@ -2537,7 +2769,11 @@
25372769 } else
25382770 if (source == resetCentroidItem)
25392771 {
2540
- ResetCentroid();
2772
+ ResetCentroid(true);
2773
+ } else
2774
+ if (source == resetCentroidXZItem)
2775
+ {
2776
+ ResetCentroid(false);
25412777 } else
25422778 if (source == resetParentItem)
25432779 {
....@@ -2701,6 +2937,24 @@
27012937 bigThree.ClearUI();
27022938 bigThree.add(centralPanel);
27032939 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
+
27042958 } else
27052959 if (source == threeButton)
27062960 {
....@@ -2737,6 +2991,8 @@
27372991 bigThree.add(centralPanel);
27382992 bigThree.add(XYZPanel);
27392993 bigThree.FlushUI();
2994
+
2995
+ cameraView.requestFocusInWindow();
27402996 } else
27412997 if (source == fourButton)
27422998 {
....@@ -2772,6 +3028,8 @@
27723028 bigThree.ClearUI();
27733029 bigThree.add(scenePanel);
27743030 bigThree.FlushUI();
3031
+
3032
+ cameraView.requestFocusInWindow();
27753033 } else
27763034 if (source == sixButton)
27773035 {
....@@ -2808,6 +3066,8 @@
28083066 bigThree.add(scenePanel);
28093067 bigThree.add(centralPanel);
28103068 bigThree.FlushUI();
3069
+
3070
+ cameraView.requestFocusInWindow();
28113071 } else
28123072 if (source == sevenButton)
28133073 {
....@@ -2845,6 +3105,8 @@
28453105 bigThree.add(centralPanel);
28463106 bigThree.add(XYZPanel);
28473107 bigThree.FlushUI();
3108
+
3109
+ cameraView.requestFocusInWindow();
28483110 } else
28493111 if (source == rootButton)
28503112 {
....@@ -2856,6 +3118,7 @@
28563118 EditObject(obj);
28573119 }
28583120
3121
+ cameraView.requestFocusInWindow();
28593122 refreshContents(true);
28603123 } else
28613124 if (source == closeButton)
....@@ -2877,6 +3140,8 @@
28773140 break;
28783141 }
28793142 }
3143
+
3144
+ cameraView.requestFocusInWindow();
28803145 refreshContents(true);
28813146 } else
28823147 if (source == editItem || source == editButton)
....@@ -2893,9 +3158,9 @@
28933158 child.CloseUI();
28943159 listUI.remove(child);
28953160
2896
- child.editWindow = null; // ???????????
3161
+ //child.editWindow = null; // ???????????
28973162 }
2898
- objEditor.ctrlPanel.validate();
3163
+ objEditor.ctrlPanel.FlushUI();
28993164 //objEditor.jTree.clearSelection();
29003165 //objEditor.ResetSliders();
29013166 refreshContents(true);
....@@ -2979,7 +3244,10 @@
29793244 frontView.object = group;
29803245 sideView.object = group;
29813246 }
2982
- group.editWindow = this;
3247
+
3248
+// fix "+" issue
3249
+ //group.editWindow = this;
3250
+
29833251 /*
29843252 currentLayout = radio.layout;
29853253 if (currentLayout == null)
....@@ -2991,8 +3259,23 @@
29913259 //group.parent = null; // ROOT
29923260 //group.attributes = -1;
29933261 ResetModel();
3262
+
3263
+ cameraView.requestFocusInWindow();
29943264 refreshContents(true);
2995
- }
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
+ }
29963279 else
29973280 {
29983281 //return super.action(event, arg);
....@@ -3001,7 +3284,6 @@
30013284 }
30023285
30033286 boolean useclient = false;
3004
- cRadio radio;
30053287
30063288 void ToggleRoot()
30073289 {
....@@ -3053,6 +3335,28 @@
30533335 refreshContents();
30543336 }
30553337
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
+ }
30563360
30573361 void ResetTransform()
30583362 {
....@@ -3165,7 +3469,7 @@
31653469 refreshContents();
31663470 }
31673471
3168
- void ResetCentroid()
3472
+ void ResetCentroid(boolean full)
31693473 {
31703474 Object3D obj;
31713475 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3180,12 +3484,16 @@
31803484 LA.matIdentity(Object3D.mat);
31813485 obj.getBounds(minima, maxima, false);
31823486 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3183
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3487
+ if (full)
3488
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
31843489 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
31853490 obj.TransformMesh(Object3D.mat);
3491
+
31863492 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3187
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3493
+ if (full)
3494
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
31883495 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3496
+
31893497 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
31903498 //Object3D.mat[3][0] = -Object3D.mat[3][0];
31913499 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3214,7 +3522,8 @@
32143522
32153523 int size = obj.MemorySize();
32163524
3217
- 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)");
32183527 }
32193528 }
32203529 catch (Exception e)
....@@ -3251,9 +3560,9 @@
32513560 obj = (Object3D)e.nextElement();
32523561
32533562 System.out.println("Object is: " + obj);
3254
- GrafreeD.AnalyzeObject(obj);
3563
+ Grafreed.AnalyzeObject(obj);
32553564 System.out.println("Boundary rep: " + obj.bRep);
3256
- GrafreeD.AnalyzeObject(obj.bRep);
3565
+ Grafreed.AnalyzeObject(obj.bRep);
32573566
32583567 // System.err.println((size/1024) + " KB is the size of " + obj);
32593568 }
....@@ -3295,6 +3604,13 @@
32953604 void GenNormals(boolean crease)
32963605 {
32973606 group.GenNormalsS(crease);
3607
+
3608
+ refreshContents();
3609
+ }
3610
+
3611
+ void GenNormalsMESH()
3612
+ {
3613
+ group.GenNormalsMeshS();
32983614
32993615 refreshContents();
33003616 }
....@@ -3467,8 +3783,8 @@
34673783
34683784 void ParseVertices()
34693785 {
3470
- boolean epsequal = GrafreeD.epsequal;
3471
- GrafreeD.epsequal = true;
3786
+ boolean epsequal = Grafreed.epsequal;
3787
+ Grafreed.epsequal = true;
34723788
34733789 for (int i=0; i<group.selection.size(); i++)
34743790 {
....@@ -3493,7 +3809,7 @@
34933809 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
34943810 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
34953811
3496
- g.add(GrafreeD.clipboard);
3812
+ g.add(Grafreed.clipboard);
34973813
34983814 buffer.add(g);
34993815 }
....@@ -3508,7 +3824,7 @@
35083824 makeSomething(buffer, i==group.selection.size()-1);
35093825 }
35103826
3511
- GrafreeD.epsequal = epsequal;
3827
+ Grafreed.epsequal = epsequal;
35123828
35133829 refreshContents();
35143830 }
....@@ -3526,7 +3842,16 @@
35263842 String pigment = Object3D.GetPigment(tex);
35273843 //String bump = Object3D.GetBump(tex);
35283844
3529
- 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
+ }
35303855
35313856 double s = v.s;
35323857
....@@ -3614,11 +3939,11 @@
36143939
36153940 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
36163941
3617
- boolean random = CameraPane.RANDOM;
3618
- CameraPane.RANDOM = false; // parse all random nodes
3942
+ boolean random = CameraPane.SWITCH;
3943
+ CameraPane.SWITCH = false; // parse all random nodes
36193944 lowres.linkVerticesThis(null);
36203945 lowres.linkVerticesThis(sn);
3621
- CameraPane.RANDOM = random;
3946
+ CameraPane.SWITCH = random;
36223947
36233948 System.err.flush();
36243949
....@@ -3658,7 +3983,7 @@
36583983 return;
36593984
36603985 Object3D poses = group.selection.get(0);
3661
- Object3D ref = GrafreeD.clipboard.get(0);
3986
+ Object3D ref = Grafreed.clipboard.get(0);
36623987
36633988 Object3D newgroup = new Object3D("Po:" + poses.name);
36643989
....@@ -3852,9 +4177,9 @@
38524177
38534178 void ClipMesh()
38544179 {
3855
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
4180
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
38564181 {
3857
- Object3D content = GrafreeD.clipboard.get(0);
4182
+ Object3D content = Grafreed.clipboard.get(0);
38584183
38594184 if (content instanceof cGroup && ((cGroup)content).transientlink )
38604185 content = ((cGroup)content).get(0);
....@@ -3863,7 +4188,7 @@
38634188 // {
38644189 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
38654190 // }
3866
- group.selection.ClipMesh(GrafreeD.clipboard);
4191
+ group.selection.ClipMesh(Grafreed.clipboard);
38674192 }
38684193 // group.selection.ClipMesh(GrafreeD.clipboard);
38694194 System.out.println("DONE.");
....@@ -3910,6 +4235,18 @@
39104235 void MarkLeaves(boolean hide)
39114236 {
39124237 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);
39134250 refreshContents();
39144251 }
39154252
....@@ -3998,7 +4335,7 @@
39984335 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
39994336
40004337 Object3D elem = (Object3D)group.selection.elementAt(i);
4001
- if(elem != group)
4338
+ if(elem != group || !newWindow)
40024339 {
40034340 // if (!(elem instanceof Composite))
40044341 // newWindow = false;
....@@ -4088,7 +4425,6 @@
40884425 //case 702: // Event.LIST_DESELECT
40894426 group.deselectAll();
40904427 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4091
- objEditor.ClearInfo(); // .GetMaterial());
40924428 if (tps != null)
40934429 {
40944430 for (int i=0; i < tps.length; i++)
....@@ -4097,10 +4433,8 @@
40974433
40984434 //if (child.parent != null)
40994435 //child.parent.addSelectee(child);
4436
+ objEditor.SetMaterial(child);
41004437 group.addSelectee(child);
4101
- objEditor.SetMaterial(child); // .GetMaterial());
4102
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4103
- System.err.println("info : " + child.GetPath());
41044438 }
41054439 }
41064440 // else
....@@ -4110,16 +4444,17 @@
41104444 // System.err.println("info : " + group.GetPath());
41114445 // }
41124446
4113
- objEditor.SetText(); // jan 2014
4114
-
4115
- 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))
41164448 CameraPane.flash = true;
41174449
4118
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4450
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
41194451 // a camera
41204452 {
4121
- CameraPane.camerachangeframe = 0; // don't refuse it
4122
- 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
+ }
41234458 // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
41244459 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
41254460 }
....@@ -4132,6 +4467,26 @@
41324467
41334468 freezemodel = false;
41344469 }
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
+ }
41354490
41364491 void linkSomething(Object3D thing)
41374492 {
....@@ -4203,16 +4558,18 @@
42034558 {
42044559 if (group.selection.isEmpty())
42054560 return;
4206
- GrafreeD.clipboardIsTempGroup = false;
4561
+
4562
+ Grafreed.clipboardIsTempGroup = false;
42074563 Composite tGroup = null;
42084564 if (group.selection.size() > 0) // 1)
42094565 {
42104566 tGroup = new cGroup();
4211
- GrafreeD.clipboardIsTempGroup = true;
4567
+ Grafreed.clipboardIsTempGroup = true;
42124568 }
42134569
42144570 if (cut)
42154571 {
4572
+ Save();
42164573 //int indices[] = jList.getSelectedIndices();
42174574 //for (int i = indices.length - 1; i >= 0; i--)
42184575 //jList.remove(indices[i]);
....@@ -4248,16 +4605,16 @@
42484605 //System.out.println("cut " + child);
42494606 //System.out.println("parent = " + child.parent);
42504607 // tmp.addChild(child);
4251
- if (GrafreeD.clipboardIsTempGroup)
4608
+ if (Grafreed.clipboardIsTempGroup)
42524609 tGroup.add/*Child*/(tmp);
42534610 else
4254
- GrafreeD.clipboard = tmp;
4611
+ Grafreed.clipboard = tmp;
42554612 }
42564613 else
4257
- if (GrafreeD.clipboardIsTempGroup)
4614
+ if (Grafreed.clipboardIsTempGroup)
42584615 tGroup.add/*Child*/(child);
42594616 else
4260
- GrafreeD.clipboard = child;
4617
+ Grafreed.clipboard = child;
42614618 }
42624619
42634620 //ResetModel();
....@@ -4289,21 +4646,23 @@
42894646 //System.out.println("cut " + elem);
42904647 //System.out.println("parent = " + elem.parent);
42914648 // tmp.addChild(elem);
4292
- if (GrafreeD.clipboardIsTempGroup)
4649
+ if (Grafreed.clipboardIsTempGroup)
42934650 tGroup.add/*Child*/(tmp);
42944651 else
4295
- GrafreeD.clipboard = tmp;
4652
+ Grafreed.clipboard = tmp;
42964653 }
42974654 else
4298
- if (GrafreeD.clipboardIsTempGroup)
4655
+ if (Grafreed.clipboardIsTempGroup)
42994656 tGroup.add/*Child*/(child);
43004657 else
4301
- GrafreeD.clipboard = child;
4658
+ Grafreed.clipboard = child;
43024659 }
43034660
43044661 }
4305
- if (GrafreeD.clipboardIsTempGroup)
4306
- GrafreeD.clipboard = tGroup;
4662
+
4663
+ if (Grafreed.clipboardIsTempGroup)
4664
+ Grafreed.clipboard = tGroup;
4665
+
43074666 if (cut)
43084667 {
43094668 ResetModel();
....@@ -4317,7 +4676,7 @@
43174676 // return;
43184677 boolean first = true;
43194678
4320
- if (GrafreeD.clipboardIsTempGroup)
4679
+ if (Grafreed.clipboardIsTempGroup)
43214680 {
43224681 Composite temp;
43234682
....@@ -4328,7 +4687,7 @@
43284687 temp = (Composite)Applet3D.clipboard.deepCopy();
43294688 */
43304689 Object3D elem;
4331
- 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))
43324691 {
43334692 Object3D child = (Object3D)e.nextElement();
43344693
....@@ -4362,21 +4721,21 @@
43624721 //Object3D cb = Applet3D.clipboard;
43634722 //temp.addChild(cb);
43644723 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4365
- assert(GrafreeD.clipboard.parent == null);
4366
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4367
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4368
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4369
- 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());
43704729 else
4371
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4372
- GrafreeD.clipboard.get(0).parent = keepparent;
4730
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4731
+ Grafreed.clipboard.get(0).parent = keepparent;
43734732 }
43744733
43754734 ResetModel();
43764735 refreshContents();
43774736 }
43784737
4379
- void pasteInto(boolean copyit)
4738
+ void pasteInto(boolean copyit, boolean clone)
43804739 {
43814740 // if (GrafreeD.clipboard == null)
43824741 // return;
....@@ -4405,15 +4764,22 @@
44054764 if (copyit)
44064765 {
44074766 // paste(false);
4408
- CloneClipboard(false); // sept 2014
4767
+ if (clone)
4768
+ {
4769
+ CloneClipboard(false); // sept 2014
4770
+ }
4771
+ else
4772
+ {
4773
+ paste(false);
4774
+ }
44094775 }
44104776 else
44114777 {
44124778 boolean first = true;
44134779
4414
- if (GrafreeD.clipboardIsTempGroup)
4780
+ if (Grafreed.clipboardIsTempGroup)
44154781 {
4416
- Composite temp = (Composite)GrafreeD.clipboard;
4782
+ Composite temp = (Composite)Grafreed.clipboard;
44174783 Object3D copy;
44184784 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
44194785 {
....@@ -4423,7 +4789,7 @@
44234789 }
44244790 } else
44254791 {
4426
- linkSomething(GrafreeD.clipboard); //.get(0));
4792
+ linkSomething(Grafreed.clipboard); //.get(0));
44274793 }
44284794 }
44294795 }
....@@ -4828,21 +5194,6 @@
48285194 }
48295195 */
48305196
4831
- void ImportGFD()
4832
- {
4833
- FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
4834
- browser.show();
4835
- String filename = browser.getFile();
4836
- if (filename != null && filename.length() > 0)
4837
- {
4838
- String fullname = browser.getDirectory() + filename;
4839
-
4840
- //Object3D readobj =
4841
- objEditor.ReadGFD(fullname, objEditor);
4842
- //makeSomething(readobj);
4843
- }
4844
- }
4845
-
48465197 /*
48475198 public void Callback(Object obj)
48485199 {
....@@ -4866,26 +5217,9 @@
48665217 }
48675218 */
48685219
4869
- void ImportVRMLX3D()
4870
- {
4871
- if (GrafreeD.standAlone)
4872
- {
4873
- /**/
4874
- FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
4875
- browser.show();
4876
- String filename = browser.getFile();
4877
- if (filename != null && filename.length() > 0)
4878
- {
4879
- String fullname = browser.getDirectory() + filename;
4880
- LoadVRMLX3D(fullname);
4881
- }
4882
- /**/
4883
- }
4884
- }
4885
-
48865220 String GetFile(String dialogName)
48875221 {
4888
- if (GrafreeD.standAlone)
5222
+ if (Grafreed.standAlone)
48895223 {
48905224 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
48915225 browser.show();
....@@ -4949,10 +5283,18 @@
49495283 cButton flashSelectionButton;
49505284 cButton editButton;
49515285 cButton uneditButton;
5286
+ JCheckBox allParamsButton;
49525287 cButton clearpanelButton;
4953
- cButton allParamsButton;
49545288 cButton unselectButton;
49555289
5290
+ cButton minButton;
5291
+ cButton maxButton;
5292
+ cButton fullButton;
5293
+ cButton undoButton;
5294
+ cButton redoButton;
5295
+ cButton saveButton;
5296
+ cButton oneStepButton;
5297
+
49565298 cButton screenfitButton;
49575299 cButton screenfitpointButton;
49585300 cButton snapobjectButton;
....@@ -4963,14 +5305,6 @@
49635305 cButton closeButton;
49645306
49655307 cButton setsupportButton;
4966
-
4967
- cButton twoButton;
4968
- cButton sixButton;
4969
- cButton threeButton;
4970
- cButton sevenButton;
4971
- cButton fourButton; // full panel
4972
- cButton oneButton; // full XYZ
4973
- //cButton currentLayout;
49745308
49755309 //
49765310 //Composite
....@@ -4983,6 +5317,8 @@
49835317 private MenuItem lookFromItem;
49845318 private MenuItem switchItem;
49855319 private MenuItem cutItem;
5320
+ private MenuItem undoItem;
5321
+ private MenuItem redoItem;
49865322 private MenuItem duplicateItem;
49875323 private MenuItem cloneItem;
49885324 private MenuItem cloneSupportItem;
....@@ -4996,7 +5332,7 @@
49965332 private MenuItem linkverticesItem;
49975333 private MenuItem relinkverticesItem;
49985334 private MenuItem setMasterItem;
4999
- private MenuItem resetMeshItem;
5335
+ private MenuItem resetAllItem;
50005336 private MenuItem stepAllItem;
50015337 private MenuItem revertMeshItem;
50025338 private MenuItem poseMeshItem;
....@@ -5007,6 +5343,7 @@
50075343 private MenuItem mergeGeometriesItem;
50085344 private MenuItem copyItem;
50095345 private MenuItem pasteItem;
5346
+ private MenuItem pasteIntoItem;
50105347 private MenuItem pasteLinkItem;
50115348 private MenuItem pasteCloneItem;
50125349 private MenuItem pasteExpandItem;
....@@ -5045,6 +5382,10 @@
50455382 private MenuItem showleavesItem;
50465383 private MenuItem markleavesItem;
50475384 private MenuItem unmarkleavesItem;
5385
+ private MenuItem rewindleavesItem;
5386
+ private MenuItem unrewindleavesItem;
5387
+ private MenuItem randomleavesItem;
5388
+ private MenuItem unrandomleavesItem;
50485389
50495390 private MenuItem flipVItem;
50505391 private MenuItem unflipVItem;
....@@ -5056,8 +5397,10 @@
50565397 private MenuItem panoTexturesItem;
50575398
50585399 private MenuItem resetCentroidItem;
5059
- private MenuItem transformgeometryItem;
5400
+ private MenuItem resetCentroidXZItem;
50605401 private MenuItem resetTransformItem;
5402
+ private MenuItem transformGeometryItem;
5403
+ private MenuItem transformChildrenItem;
50615404 private MenuItem hideItem;
50625405 private MenuItem grabItem;
50635406 private MenuItem backItem;
....@@ -5104,7 +5447,7 @@
51045447 private MenuItem blobItem;
51055448 private MenuItem latheItem;
51065449 private MenuItem bezierItem;
5107
- private MenuItem checkerItem;
5450
+ private MenuItem overlayItem;
51085451 private MenuItem meshItem;
51095452 // private MenuItem meshGroupItem;
51105453 private MenuItem springItem;
....@@ -5126,11 +5469,6 @@
51265469 private MenuItem doubleItem;
51275470 private MenuItem tripleItem;
51285471
5129
- private MenuItem importGFDItem;
5130
- private MenuItem importVRMLX3DItem;
5131
- private MenuItem import3DSItem;
5132
- private MenuItem importOBJItem;
5133
-
51345472 private MenuItem computeAOItem;
51355473 private MenuItem recompileItem;
51365474 private MenuItem editScriptItem;
....@@ -5140,4 +5478,8 @@
51405478 private MenuItem analyzeItem;
51415479 private MenuItem dumpItem;
51425480 //boolean freezemodel = false;
5481
+
5482
+ Menu cameraMenu;
5483
+ MenuItem editCameraItem;
5484
+ MenuItem revertCameraItem;
51435485 }