Normand Briere
2019-06-11 5e6a6f3319f0c4c687fe71952ac9ecc17792b83a
GroupEditor.java
....@@ -12,6 +12,7 @@
1212 import com.jme.math.Vector3f;
1313 import com.jme.renderer.ColorRGBA;
1414
15
+import grafeme.ui.*;
1516 //import buoy.widget.BFileChooser;
1617
1718 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
....@@ -73,7 +74,7 @@
7374 this.copy = this.group = copy;
7475 //selectees = this.group.selectees;
7576
76
- SetupMenu2(objEditor);
77
+ SetupMenu2(this); //objEditor);
7778 SetupUI2(objEditor);
7879 objEditor.SetupUI(true);
7980 SetupViews(objEditor);
....@@ -97,14 +98,14 @@
9798
9899 void CloneClipboard(boolean supports)
99100 {
100
- assert(GrafreeD.clipboard.parent == null);
101
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
102
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
103
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
104
- 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));
105106 else
106
- makeSomething(CloneObject(GrafreeD.clipboard, false));
107
- GrafreeD.clipboard.get(0).parent = keepparent;
107
+ makeSomething(CloneObject(Grafreed.clipboard, false));
108
+ Grafreed.clipboard.get(0).parent = keepparent;
108109 }
109110
110111 static Object3D CloneObject(Object3D obj, boolean supports)
....@@ -118,7 +119,7 @@
118119 // obj.support = null;
119120 if (!supports)
120121 obj.SaveSupports();
121
- Object3D clone = (Object3D)GrafreeD.clone(obj);
122
+ Object3D clone = (Object3D)Grafreed.clone(obj);
122123 obj.parent = parent;
123124 // obj.support = support;
124125 // clone.support = support; // aout 2013
....@@ -147,8 +148,129 @@
147148
148149 //JTextField nameField;
149150
150
- void SetupMenu2(ObjEditor oe)
151
+ void SetupMenu2(GroupEditor oe)
151152 {
153
+ Menu menu;
154
+ oe.menuBar.add(menu = new Menu("Edit"));
155
+ //editItem = menu.add(new MenuItem("Edit"));
156
+ //editItem.addActionListener(this);
157
+ undoItem = menu.add(new MenuItem("Undo"));
158
+ undoItem.addActionListener(this);
159
+ redoItem = menu.add(new MenuItem("Redo"));
160
+ redoItem.addActionListener(this);
161
+ menu.add("-");
162
+ duplicateItem = menu.add(new MenuItem("Duplicate"));
163
+ duplicateItem.addActionListener(this);
164
+ cloneItem = menu.add(new MenuItem("Clone"));
165
+ cloneItem.addActionListener(this);
166
+ if (Globals.ADVANCED)
167
+ {
168
+ cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
169
+ cloneSupportItem.addActionListener(this);
170
+ }
171
+ menu.add("-");
172
+ cutItem = menu.add(new MenuItem("Cut"));
173
+ cutItem.addActionListener(this);
174
+ copyItem = menu.add(new MenuItem("Copy"));
175
+ copyItem.addActionListener(this);
176
+ pasteItem = menu.add(new MenuItem("Paste"));
177
+ pasteItem.addActionListener(this);
178
+ menu.add("-");
179
+
180
+ menu.add("-");
181
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
182
+ pasteIntoItem.addActionListener(this);
183
+ pasteLinkItem = menu.add(new MenuItem("Paste link"));
184
+ pasteLinkItem.addActionListener(this);
185
+ pasteCloneItem = menu.add(new MenuItem("Paste clone"));
186
+ pasteCloneItem.addActionListener(this);
187
+// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
188
+// pasteExpandItem.addActionListener(this);
189
+ menu.add("-");
190
+ clearItem = menu.add(new MenuItem("Clear"));
191
+ clearItem.addActionListener(this);
192
+
193
+ if (Globals.ADVANCED)
194
+ {
195
+ // Deletes the cameras...
196
+ clearAllItem = menu.add(new MenuItem("Clear All"));
197
+ clearAllItem.addActionListener(this);
198
+ }
199
+
200
+ menuBar.add(cameraMenu = new Menu("View"));
201
+ //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
202
+ //zBufferItem.addActionListener(this);
203
+ //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
204
+ //normalLensItem.addActionListener(this);
205
+ cameraMenu.add(revertCameraItem = new MenuItem("Restore Camera"));
206
+ revertCameraItem.addActionListener(this);
207
+
208
+ cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
209
+ toggleFullScreenItem.addItemListener(this);
210
+ toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
211
+ cameraMenu.add("-");
212
+
213
+ cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
214
+ toggleTextureItem.addItemListener(this);
215
+ toggleTextureItem.setState(CameraPane.textureon);
216
+
217
+ cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
218
+ toggleSwitchItem.addItemListener(this);
219
+ toggleSwitchItem.setState(CameraPane.SWITCH);
220
+
221
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
222
+ toggleHandleItem.addItemListener(this);
223
+ toggleHandleItem.setState(CameraPane.HANDLES);
224
+
225
+ cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
226
+ togglePaintItem.addItemListener(this);
227
+ togglePaintItem.setState(CameraPane.PAINTMODE);
228
+
229
+ if (Globals.ADVANCED)
230
+ {
231
+ cameraMenu.add("-");
232
+ cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
233
+ toggleLiveItem.addItemListener(this);
234
+ toggleLiveItem.setState(Globals.isLIVE());
235
+
236
+ cameraMenu.add(stepItem = new MenuItem("Step"));
237
+ stepItem.addActionListener(this);
238
+ // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
239
+ // toggleDLItem.addItemListener(this);
240
+ // toggleDLItem.setState(false);
241
+
242
+ cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
243
+ toggleRenderItem.addItemListener(this);
244
+ toggleRenderItem.setState(!CameraPane.frozen);
245
+
246
+ cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
247
+ toggleDebugItem.addItemListener(this);
248
+ toggleDebugItem.setState(CameraPane.DEBUG);
249
+
250
+ cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
251
+ toggleFrustumItem.addItemListener(this);
252
+ toggleFrustumItem.setState(CameraPane.FRUSTUM);
253
+
254
+ cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
255
+ toggleFootContactItem.addItemListener(this);
256
+ toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
257
+
258
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
259
+ toggleTimelineItem.addItemListener(this);
260
+ }
261
+
262
+// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
263
+// toggleRootItem.addItemListener(this);
264
+// toggleRootItem.setState(false);
265
+// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
266
+// animationItem.addItemListener(this);
267
+// animationItem.setState(CameraPane.ANIMATION);
268
+ cameraMenu.add("-");
269
+ cameraMenu.add(editCameraItem = new MenuItem("Save Camera"));
270
+ editCameraItem.addActionListener(this);
271
+
272
+ if (Globals.ADVANCED)
273
+ {
152274 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
153275 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
154276 //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
....@@ -160,45 +282,17 @@
160282 lookAtItem.addActionListener(this);
161283 //lookFromItem.addActinoListener(this);
162284 //switchItem.addActionListener(this);
163
- Menu menu;
164
- oe.menuBar.add(menu = new Menu("Edit"));
165
- //editItem = menu.add(new MenuItem("Edit"));
166
- //editItem.addActionListener(this);
167
- duplicateItem = menu.add(new MenuItem("Duplicate"));
168
- duplicateItem.addActionListener(this);
169
- menu.add("-");
170
- cloneItem = menu.add(new MenuItem("Clone"));
171
- cloneItem.addActionListener(this);
172
- cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
173
- cloneSupportItem.addActionListener(this);
174
- menu.add("-");
175
- cutItem = menu.add(new MenuItem("Cut"));
176
- cutItem.addActionListener(this);
177
- copyItem = menu.add(new MenuItem("Copy"));
178
- copyItem.addActionListener(this);
179
- pasteItem = menu.add(new MenuItem("Paste"));
180
- pasteItem.addActionListener(this);
181
- pasteLinkItem = menu.add(new MenuItem("Paste link"));
182
- pasteLinkItem.addActionListener(this);
183
- pasteCloneItem = menu.add(new MenuItem("Paste clone"));
184
- pasteCloneItem.addActionListener(this);
185
-// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
186
-// pasteExpandItem.addActionListener(this);
187
- clearItem = menu.add(new MenuItem("Clear"));
188
- clearItem.addActionListener(this);
189
- clearAllItem = menu.add(new MenuItem("Clear All"));
190
- clearAllItem.addActionListener(this);
191
-
285
+ }
286
+
192287 oe.menuBar.add(menu = new Menu("Setting"));
193
- resetMeshItem = menu.add(new MenuItem("Reset All"));
194
- resetMeshItem.addActionListener(this);
195
- stepAllItem = menu.add(new MenuItem("Step All"));
196
- stepAllItem.addActionListener(this);
288
+ if (Globals.ADVANCED)
289
+ {
197290 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
198291 revertMeshItem.addActionListener(this);
199292 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
200293 resetreferencesItem.addActionListener(this);
201294 menu.add("-");
295
+ }
202296 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
203297 overwriteGeoItem.addActionListener(this);
204298 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -210,19 +304,26 @@
210304 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
211305 overwriteUVItem.addActionListener(this);
212306 menu.add("-");
307
+ if (Globals.ADVANCED)
308
+ {
213309 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
214310 generateMeshItem.addActionListener(this);
215311 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
216312 poseMeshItem.addActionListener(this);
217313 menu.add("-");
314
+ }
218315 resetsupportItem = menu.add(new MenuItem("Reset support"));
219316 resetsupportItem.addActionListener(this);
220317 linkverticesItem = menu.add(new MenuItem("Link to Support"));
221318 linkverticesItem.addActionListener(this);
222319 relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
223320 relinkverticesItem.addActionListener(this);
321
+
322
+ if (Globals.ADVANCED)
323
+ {
224324 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
225325 setMasterItem.addActionListener(this);
326
+ }
226327
227328 oe.menuBar.add(menu = new Menu("Group"));
228329 grabItem = menu.add(new MenuItem("Grab"));
....@@ -233,27 +334,32 @@
233334 frontItem.addActionListener(this);
234335 compositeItem = menu.add(new MenuItem("Composite"));
235336 compositeItem.addActionListener(this);
236
- hideItem = menu.add(new MenuItem("Hide"));
337
+ hideItem = menu.add(new MenuItem("Hidden Group"));
237338 hideItem.addActionListener(this);
238339 ungroupItem = menu.add(new MenuItem("Ungroup"));
239340 ungroupItem.addActionListener(this);
240341 menu.add("-");
241
- randomItem = menu.add(new MenuItem("Random"));
342
+ randomItem = menu.add(new MenuItem("Switch node"));
242343 randomItem.addActionListener(this);
243
- physicsItem = menu.add(new MenuItem("Physics"));
244
- physicsItem.addActionListener(this);
245
- frameselectorItem = menu.add(new MenuItem("Frame Selector"));
246
- frameselectorItem.addActionListener(this);
247344 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
248345 switchGeoItem.addActionListener(this);
249346 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
250347 switchTransfoItem.addActionListener(this);
251
- morphItem = menu.add(new MenuItem("Morph"));
348
+ morphItem = menu.add(new MenuItem("Morph Group"));
252349 morphItem.addActionListener(this);
350
+
351
+ if (Globals.ADVANCED)
352
+ {
353
+ menu.add("-");
354
+ physicsItem = menu.add(new MenuItem("Physics"));
355
+ physicsItem.addActionListener(this);
356
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
357
+ frameselectorItem.addActionListener(this);
253358 scriptNodeItem = menu.add(new MenuItem("Script Node"));
254359 scriptNodeItem.addActionListener(this);
255360 cameraItem = menu.add(new MenuItem("Camera"));
256361 cameraItem.addActionListener(this);
362
+ }
257363
258364 oe.menuBar.add(menu = new Menu("Object"));
259365 textureItem = menu.add(new MenuItem("Texture"));
....@@ -268,21 +374,29 @@
268374 shadowYItem.addActionListener(this);
269375 shadowZItem = menu.add(new MenuItem("Shadow Z"));
270376 shadowZItem.addActionListener(this);
377
+ if (Globals.ADVANCED)
378
+ {
379
+ menu.add("-");
271380 linkerItem = menu.add(new MenuItem("Linker"));
272381 linkerItem.addActionListener(this);
273
- templateItem = menu.add(new MenuItem("Template"));
274
- templateItem.addActionListener(this);
275382 attributeItem = menu.add(new MenuItem("Attribute"));
276383 attributeItem.addActionListener(this);
384
+ templateItem = menu.add(new MenuItem("Template"));
385
+ templateItem.addActionListener(this);
277386 pointflowItem = menu.add(new MenuItem("Point Flow"));
278387 pointflowItem.addActionListener(this);
388
+ }
279389 menu.add("-");
280390 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
281391 resetTransformItem.addActionListener(this);
282392 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
283393 resetCentroidItem.addActionListener(this);
284
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
285
- transformgeometryItem.addActionListener(this);
394
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
395
+ resetCentroidXZItem.addActionListener(this);
396
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
397
+ transformGeometryItem.addActionListener(this);
398
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
399
+ transformChildrenItem.addActionListener(this);
286400
287401 oe.menuBar.add(menu = new Menu("Geometry"));
288402 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -293,8 +407,11 @@
293407 genNormalsCADItem.addActionListener(this);
294408 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
295409 genNormalsMESHItem.addActionListener(this);
410
+ if (Globals.ADVANCED)
411
+ {
296412 genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
297413 genNormalsMINEItem.addActionListener(this);
414
+ }
298415 stripifyItem = menu.add(new MenuItem("Stripify"));
299416 stripifyItem.addActionListener(this);
300417 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -316,23 +433,34 @@
316433 reduce34MeshItem.addActionListener(this);
317434 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
318435 increaseMeshItem.addActionListener(this);
319
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
320
- smoothMeshItem.addActionListener(this);
321436 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
322437 clipMeshItem.addActionListener(this);
438
+
439
+ if (Globals.ADVANCED)
440
+ {
441
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
442
+ smoothMeshItem.addActionListener(this);
443
+ }
323444
324445 oe.menuBar.add(menu = new Menu("Attributes"));
325446 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
326447 clearMaterialsItem.addActionListener(this);
448
+ resetAllItem = menu.add(new MenuItem("Reset All"));
449
+ resetAllItem.addActionListener(this);
450
+ stepAllItem = menu.add(new MenuItem("Step All"));
451
+ stepAllItem.addActionListener(this);
327452 menu.add("-");
328453 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
329454 liveleavesItem.addActionListener(this);
330455 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
331456 unliveleavesItem.addActionListener(this);
457
+ if (Globals.ADVANCED)
458
+ {
332459 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
333460 supportleavesItem.addActionListener(this);
334461 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
335462 unsupportleavesItem.addActionListener(this);
463
+ }
336464 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
337465 hideleavesItem.addActionListener(this);
338466 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -376,29 +504,22 @@
376504 sortbynameItem = menu.add(new MenuItem("Sort by name"));
377505 sortbynameItem.addActionListener(this);
378506 menu.add("-");
507
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
508
+ shareGeometriesItem.addActionListener(this);
509
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
510
+ mergeGeometriesItem.addActionListener(this);
511
+ if (Globals.ADVANCED)
512
+ {
513
+ // Pretty much the same as duplicate and clone.
379514 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
380515 extractGeometriesItem.addActionListener(this);
381516 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
382517 cloneGeometriesItem.addActionListener(this);
383
- shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
384
- shareGeometriesItem.addActionListener(this);
385
- mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
386
- mergeGeometriesItem.addActionListener(this);
518
+ }
387519
388520 oe.menuBar.add(menu = new Menu("Insert"));
389521 buildCreateMenu(menu);
390522
391
-
392
- oe.menuBar.add(menu = new Menu("Include"));
393
- importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
394
- importGFDItem.addActionListener(this);
395
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
396
- importVRMLX3DItem.addActionListener(this);
397
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
398
- importOBJItem.addActionListener(this);
399
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
400
- import3DSItem.addActionListener(this);
401
-
402523 oe.menuBar.add(menu = new Menu("Tools"));
403524 buildToolsMenu(menu);
404525 }
....@@ -433,110 +554,98 @@
433554 oe.radioPanel.add(dummyButton);
434555 oe.buttonGroup.add(dummyButton);
435556 */
436
- aConstraints.gridy += 1;
437
-
438557 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
439558
440
- oe.aConstraints.gridwidth = 1;
441
- oe.aConstraints.gridx = 0;
442
-
443
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
444
- liveCB.setToolTipText("Enabled animation");
559
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
560
+ liveCB.setToolTipText("Enable animation");
445561 liveCB.addItemListener(this);
446562
447
- oe.aConstraints.gridx += 1;
448
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints);
563
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
564
+ oneStepButton.setToolTipText("Animate one step forward");
565
+ oneStepButton.addActionListener(this);
566
+
567
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
568
+ fastCB.setToolTipText("Fast mode");
569
+ fastCB.addItemListener(this);
570
+
571
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
449572 trackCB.setToolTipText("Enable tracking");
450573 trackCB.addItemListener(this);
451574
452
- oe.aConstraints.gridx += 1;
453
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
575
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
454576 screenfitButton.setToolTipText("Screen fit");
455577 screenfitButton.addActionListener(this);
456
- oe.aConstraints.gridx += 1;
578
+
457579 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
458580 // screenfitpointButton.addActionListener(this);
459
-// oe.aConstraints.gridx += 1;
460
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
461
- snapobjectButton.addActionListener(this);
462
- snapobjectButton.setToolTipText("Snap Object");
463
- oe.aConstraints.gridx += 1;
464581
465
- //aConstraints.gridx = 0;
466
- //aConstraints.gridy += 1;
467
- oe.aConstraints.weighty = 0;
468
- oe.aConstraints.gridwidth = 1;
469
-
470
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
582
+ if (Globals.ADVANCED)
583
+ {
584
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
585
+ snapobjectButton.addActionListener(this);
586
+ snapobjectButton.setToolTipText("Snap Object");
587
+ }
588
+
589
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
471590 flashSelectionButton.setToolTipText("Show selection");
472591 flashSelectionButton.addActionListener(this);
473592
474
- oe.toolbarPanel.add(new cButton(" ", false));
593
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
475594
476
- oe.aConstraints.gridx += 1;
477
- oe.aConstraints.weighty = 0;
478
- oe.aConstraints.gridwidth = 1;
479
-
480
- //
481
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
595
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
482596 twoButton.setToolTipText("Show center view only");
483597 twoButton.addActionListener(this);
484
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
598
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
485599 fourButton.addActionListener(this);
486600 fourButton.setToolTipText("Show left panel only");
487
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
601
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
488602 sixButton.setToolTipText("2-column layout left");
489603 sixButton.addActionListener(this);
490
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
604
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
491605 threeButton.setToolTipText("2-column layout right");
492606 threeButton.addActionListener(this);
493
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
607
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
494608 sevenButton.setToolTipText("3-column layout");
495609 sevenButton.addActionListener(this);
496610 //
497611
498
- oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints);
499
- rootButton.setToolTipText("Edit object in new tab");
612
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
613
+ rootButton.setToolTipText("Edit selection in new tab");
500614 rootButton.addActionListener(this);
501
- oe.aConstraints.gridx += 1;
502
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
615
+
616
+ oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
503617 closeButton.setToolTipText("Close tab");
504618 closeButton.addActionListener(this);
505619 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
506620 //clearButton.addActionListener(this);
507
- oe.aConstraints.gridx += 1;
508621
509
- oe.aConstraints.gridx = 1; //
510
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
622
+ cGridBag commandsPanel = new cGridBag();
623
+
624
+ commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
625
+ editButton.setToolTipText("Edit selection");
511626 editButton.addActionListener(this);
512
- oe.aConstraints.gridx += 1;
513
- oe.aConstraints.weighty = 0;
514
- oe.aConstraints.gridwidth = 1;
515627
516
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
628
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
629
+ uneditButton.setToolTipText("Unedit selection");
517630 uneditButton.addActionListener(this);
518631
519
- oe.aConstraints.gridx += 1;
520
- oe.aConstraints.weighty = 0;
521
- oe.aConstraints.gridwidth = 1;
522
-
523
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
524
- clearPanelButton.addActionListener(this);
525
-
526
- oe.aConstraints.gridx += 1;
527
- oe.aConstraints.weighty = 0;
528
- oe.aConstraints.gridwidth = 1;
529
-
530
- oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints);
632
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
633
+ allParamsButton.setToolTipText("Edit all params");
531634 allParamsButton.addActionListener(this);
532635
533
- oe.aConstraints.gridx += 1;
534
- oe.aConstraints.weighty = 0;
535
- oe.aConstraints.gridwidth = 1;
536
-
537
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
636
+ commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
637
+ clearPanelButton.setToolTipText("Clear edit panel");
638
+ clearPanelButton.addActionListener(this);
639
+
640
+ commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
641
+ unselectButton.setToolTipText("Unselect");
538642 unselectButton.addActionListener(this);
539643
644
+ commandsPanel.preferredHeight = 1;
645
+
646
+ oe.treePanel.add(commandsPanel);
647
+ oe.treePanel.Return();
648
+
540649 // oe.aConstraints.gridx += 1;
541650 // oe.aConstraints.weighty = 0;
542651 // oe.aConstraints.gridwidth = 1;
....@@ -548,40 +657,37 @@
548657 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
549658 // gcButton.addActionListener(this);
550659
551
- oe.aConstraints.gridx = 0;
552
- oe.aConstraints.gridy += 1;
553
-
554
- //ctrlPanel.add(objList = new List(5, true));
555
- oe.aConstraints.gridwidth = 100;
556
- // oe.aConstraints.gridheight = 100;
557
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
558
- oe.aConstraints.gridheight = 1;
559
- oe.aConstraints.weighty = 0.5;
560
- oe.aConstraints.gridx = 0;
561
- JScrollPane jSP;
660
+ cGridBag jSPPanel = new cGridBag();
661
+
662
+ JScrollPane jSP;
562663 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
563
- oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints);
664
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
564665 ResetModel();
565
- oe.aConstraints.weighty = 0.5;
566
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
567
- oe.aConstraints.gridy += 1;
568
- oe.aConstraints.gridwidth = 1;
666
+
667
+ oe.treePanel.add(jSPPanel);
668
+ oe.treePanel.Return();
569669
570
- oe.aConstraints.weighty = 0;
571
- oe.aConstraints.gridwidth = 2;
572
-
573
- oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints);
670
+ cGridBag copyOptionsPanel = new cGridBag();
671
+
672
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
673
+ colorCB.setToolTipText("Copy color when dropped");
574674 colorCB.addItemListener(this);
575
- oe.aConstraints.gridx += 2;
576
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
675
+
676
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
677
+ materialCB.setToolTipText("Copy material when dropped");
577678 materialCB.addItemListener(this);
578
- oe.aConstraints.gridx += 2;
579
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
679
+
680
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
681
+ textureCB.setToolTipText("Copy texture when dropped");
580682 textureCB.addItemListener(this);
581683
582
- oe.aConstraints.gridx = 0;
583
- oe.aConstraints.gridy += 1;
684
+ copyOptionsPanel.preferredHeight = 1;
685
+ oe.treePanel.add(copyOptionsPanel);
686
+ oe.treePanel.Return();
584687
688
+// mainPanel.setDividerLocation(0.5); //1.0);
689
+// mainPanel.setResizeWeight(0.5);
690
+
585691 //jList.addListSelectionListener(this);
586692 oe.jTree.addTreeSelectionListener(this);
587693 //jTree.setRootVisible(false);
....@@ -604,45 +710,37 @@
604710 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
605711 }
606712
607
- void AddOptions(JPanel panel, GridBagConstraints constraints)
713
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
608714 {
609
- constraints.gridx = 0;
610
- constraints.gridy = 0;
611
- panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), constraints);
612
- fastCB.setToolTipText("Fast mode");
613
- fastCB.addItemListener(this);
614
- constraints.gridy += 1;
615
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), constraints);
616
- supportCB.setToolTipText("Enabled rigging");
617
- supportCB.addItemListener(this);
618
-
619
- // constraints.gridy += 1;
620
- // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
621
- // localCB.addItemListener(this);
622
-
623
- constraints.gridy += 1;
624
- panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), constraints);
625
- crowdCB.setToolTipText("Used for crowds");
626
- crowdCB.addItemListener(this);
627
-
628
- constraints.gridy += 1;
629
- panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), constraints);
630
- smoothCB.setToolTipText("Snapping delay");
631
- smoothCB.addItemListener(this);
632
-
633
- constraints.gridy += 1;
634
- panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), constraints);
635
- slowCB.setToolTipText("Smooth interpolation");
636
- slowCB.addItemListener(this);
637
- constraints.gridy += 1;
638
- panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE), constraints);
715
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
639716 boxCB.setToolTipText("Display bounding boxes");
640717 boxCB.addItemListener(this);
641
- constraints.gridy += 1;
642
- panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE), constraints);
718
+
719
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
643720 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
644721 zoomBoxCB.addItemListener(this);
645722
723
+ if (true) // Globals.ADVANCED)
724
+ {
725
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
726
+ supportCB.setToolTipText("Enable rigging");
727
+ supportCB.addItemListener(this);
728
+
729
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
730
+ // localCB.addItemListener(this);
731
+
732
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
733
+ crowdCB.setToolTipText("Used for crowds");
734
+ crowdCB.addItemListener(this);
735
+
736
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
737
+ smoothCB.setToolTipText("Snapping delay");
738
+ smoothCB.addItemListener(this);
739
+
740
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
741
+ slowCB.setToolTipText("Smooth interpolation");
742
+ slowCB.addItemListener(this);
743
+
646744 // constraints.gridy += 1;
647745 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
648746 // speakerMocapCB.addItemListener(this);
....@@ -650,16 +748,16 @@
650748 if (false)
651749 {
652750 // handled in scripts
653
- constraints.gridy += 1;
654
- panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), constraints);
751
+ //constraints.gridy += 1;
752
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
655753 speakerCameraCB.addItemListener(this);
656754
657
- constraints.gridy += 1;
658
- panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), constraints);
755
+ //constraints.gridy += 1;
756
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
659757 speakerFocusCB.addItemListener(this);
660758
661
- constraints.gridy += 1;
662
- panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), constraints);
759
+ //constraints.gridy += 1;
760
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
663761 smoothfocusCB.addItemListener(this);
664762 }
665763
....@@ -667,14 +765,20 @@
667765 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
668766 // debugCB.addItemListener(this);
669767
670
- constraints.gridy += 1;
671
- panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL), constraints);
768
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
672769 oeilCB.addItemListener(this);
673770
674
- constraints.gridy += 1;
675
- panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT), constraints);
771
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
676772 lookAtCB.setToolTipText("Look-at target");
677773 lookAtCB.addItemListener(this);
774
+
775
+ }
776
+
777
+ cGridBag fill = new cGridBag();
778
+
779
+ fill.preferredHeight = 200;
780
+
781
+ panel.add(fill);
678782
679783 }
680784
....@@ -689,6 +793,7 @@
689793 buttonGroup.add(radioButton);
690794 radioButton.doClick();
691795 }
796
+
692797 void SetupViews(ObjEditor oe)
693798 {
694799 oe.SetupViews();
....@@ -905,7 +1010,9 @@
9051010 // objEditor.DropFile((java.io.File[]) object, true);
9061011 // return;
9071012 // }
908
- if (string.charAt(0) == '/')
1013
+
1014
+ // File path for Mac and Windows
1015
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
9091016 {
9101017 // file(s)
9111018 String[] names = string.split("\n");
....@@ -932,7 +1039,7 @@
9321039
9331040 flashIt = false;
9341041 CameraPane pane = (CameraPane) target;
935
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1042
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
9361043 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
9371044
9381045 if (group.selection.size() == 1)
....@@ -959,11 +1066,11 @@
9591066 {
9601067 loadClipboard(true);
9611068 objEditor.jTree.setSelectionPath(destinationPath);
962
- pasteInto(false);
1069
+ pasteInto(false, false);
9631070 } else {
9641071 loadClipboard(false);
9651072 objEditor.jTree.setSelectionPath(destinationPath);
966
- pasteInto(false); // true); // ???
1073
+ pasteInto(false, false); // true); // ???
9671074 }
9681075 }
9691076 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1085,27 +1192,33 @@
10851192 kleinItem.addActionListener(this);
10861193 particleItem = menu.add(new MenuItem("Particle system"));
10871194 particleItem.addActionListener(this);
1195
+ if (Globals.ADVANCED)
1196
+ {
10881197 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10891198 ragdollItem.addActionListener(this);
10901199 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10911200 ragdoll2Item.addActionListener(this);
1201
+ }
10921202 menu.add("-");
1093
- meshItem = menu.add(new MenuItem("Mesh"));
1203
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10941204 meshItem.addActionListener(this);
10951205 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10961206 // meshGroupItem.addActionListener(this);
1207
+ if (Globals.ADVANCED)
1208
+ {
10971209 springItem = menu.add(new MenuItem("Spring"));
10981210 springItem.addActionListener(this);
10991211 flagItem = menu.add(new MenuItem("Flag"));
11001212 flagItem.addActionListener(this);
1101
- bezierItem = menu.add(new MenuItem("Patch"));
1102
- bezierItem.addActionListener(this);
1103
- checkerItem = menu.add(new MenuItem("Checker"));
1104
- checkerItem.addActionListener(this);
11051213 blobItem = menu.add(new MenuItem("Blob"));
11061214 blobItem.addActionListener(this);
11071215 latheItem = menu.add(new MenuItem("Lathe"));
11081216 latheItem.addActionListener(this);
1217
+ }
1218
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1219
+ bezierItem.addActionListener(this);
1220
+ overlayItem = menu.add(new MenuItem("Overlay"));
1221
+ overlayItem.addActionListener(this);
11091222 lightItem = menu.add(new MenuItem("Light"));
11101223 lightItem.addActionListener(this);
11111224 menu.add("-");
....@@ -1115,34 +1228,39 @@
11151228 loopItem.addActionListener(this);
11161229 doubleItem = menu.add(new MenuItem("Fork"));
11171230 doubleItem.addActionListener(this);
1231
+ if (Globals.ADVANCED)
1232
+ {
11181233 tripleItem = menu.add(new MenuItem("Trident"));
11191234 tripleItem.addActionListener(this);
1235
+ }
11201236 }
11211237
11221238 void buildToolsMenu(Menu menu)
11231239 {
11241240 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
11251241 animationItem.addItemListener(this);
1126
- animationItem.setState(CameraPane.ANIMATION);
1242
+ animationItem.setState(Globals.ANIMATION);
11271243
11281244 menu.add("-");
11291245 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
11301246 parseverticesItem.addActionListener(this);
11311247 textureFieldItem = menu.add(new MenuItem("Texture Field"));
11321248 textureFieldItem.addActionListener(this);
1133
- alignItem = menu.add(new MenuItem("Align"));
1249
+ alignItem = menu.add(new MenuItem("Align Objects"));
11341250 alignItem.addActionListener(this);
1135
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1136
- mirrorItem.addActionListener(this);
11371251 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11381252 reduceMorphItem.addActionListener(this);
11391253 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11401254 reduce34MorphItem.addActionListener(this);
1141
-
1255
+ menu.add("-");
11421256 menu.add(computeAOItem = new MenuItem("Compute AO"));
11431257 computeAOItem.addActionListener(this);
1144
- menu.add("-");
11451258
1259
+ if (Globals.ADVANCED)
1260
+ {
1261
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1262
+ mirrorItem.addActionListener(this);
1263
+ menu.add("-");
11461264 menu.add(memoryItem = new MenuItem("Memory Usage"));
11471265 memoryItem.addActionListener(this);
11481266 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1165,6 +1283,7 @@
11651283 menu.add("-");
11661284 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11671285 editScriptItem.addActionListener(this);
1286
+ }
11681287 }
11691288
11701289 void ScreenFit()
....@@ -1493,9 +1612,9 @@
14931612
14941613 void Overwrite(int mask)
14951614 {
1496
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1615
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14971616 {
1498
- Object3D content = GrafreeD.clipboard.get(0);
1617
+ Object3D content = Grafreed.clipboard.get(0);
14991618
15001619 if (content instanceof cGroup && ((cGroup)content).transientlink )
15011620 content = ((cGroup)content).get(0);
....@@ -1518,6 +1637,7 @@
15181637 //
15191638 public void actionPerformed(ActionEvent event) // , Object arg)
15201639 {
1640
+ Object source = event.getSource();
15211641 /*
15221642 if (event.getSource() == nameField)
15231643 {
....@@ -1529,11 +1649,11 @@
15291649 }
15301650 else
15311651 */
1532
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1652
+ if (source == lookAtItem || source == lookFromItem)
15331653 {
15341654 ScreenFit();
15351655 } else
1536
- if (event.getSource() == switchItem)
1656
+ if (source == switchItem)
15371657 {
15381658 cVector v1 = new cVector();
15391659 cVector v2 = new cVector();
....@@ -1542,11 +1662,11 @@
15421662 objEditor.cameraView.renderCamera.setAim(v2, v1);
15431663 objEditor.cameraView.repaint();
15441664 } else
1545
- if (event.getSource() == rectoidItem)
1665
+ if (source == rectoidItem)
15461666 {
15471667 makeSomething(new Box());
15481668 } else
1549
- if (event.getSource() == particleItem)
1669
+ if (source == particleItem)
15501670 {
15511671 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15521672 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1567,9 +1687,9 @@
15671687 applyExample(particleGeom, "SMOKE");
15681688 makeSomething(particleGeom);
15691689 } else
1570
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1690
+ if (source == ragdollItem || source == ragdoll2Item)
15711691 {
1572
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1692
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15731693
15741694 ragdoll.toParent = LA.newMatrix();
15751695 ragdoll.fromParent = LA.newMatrix();
....@@ -1587,7 +1707,7 @@
15871707 } else
15881708 /*
15891709 */
1590
- if (event.getSource() == heightFieldItem)
1710
+ if (source == heightFieldItem)
15911711 {
15921712 Object3D obj = new Object3D();
15931713
....@@ -1625,31 +1745,31 @@
16251745
16261746 makeSomething(obj);
16271747 } else
1628
- if (event.getSource() == gridItem)
1748
+ if (source == gridItem)
16291749 {
16301750 makeSomething(new Grid());
16311751 } else
1632
- if (event.getSource() == ellipsoidItem)
1752
+ if (source == ellipsoidItem)
16331753 {
16341754 makeSomething(new Sphere());
16351755 } else
1636
- if (event.getSource() == coneItem)
1756
+ if (source == coneItem)
16371757 {
16381758 makeSomething(new Cone());
16391759 } else
1640
- if (event.getSource() == torusItem)
1760
+ if (source == torusItem)
16411761 {
16421762 makeSomething(new Torus());
16431763 } else
1644
- if (event.getSource() == superItem)
1764
+ if (source == superItem)
16451765 {
16461766 makeSomething(new Superellipsoid());
16471767 } else
1648
- if (event.getSource() == kleinItem)
1768
+ if (source == kleinItem)
16491769 {
16501770 makeSomething(new Klein());
16511771 } else
1652
- if (event.getSource() == blobItem)
1772
+ if (source == blobItem)
16531773 {
16541774 Blob blob = new Blob();
16551775 BlobComponent comp = new BlobComponent();
....@@ -1657,15 +1777,15 @@
16571777 //blob.retile();
16581778 makeSomething(blob);
16591779 } else
1660
- if (event.getSource() == latheItem)
1780
+ if (source == latheItem)
16611781 {
16621782 makeSomething(new Lathe());
16631783 } else
1664
- if (event.getSource() == bezierItem)
1784
+ if (source == bezierItem)
16651785 {
16661786 makeSomething(new BezierSurface());
16671787 } else
1668
- if (event.getSource() == checkerItem)
1788
+ if (source == overlayItem)
16691789 {
16701790 /*
16711791 Object3D obj = new BezierSurface(5,8);
....@@ -1680,7 +1800,7 @@
16801800 */
16811801 makeSomething(new Checker());
16821802 } else
1683
- if (event.getSource() == meshItem)
1803
+ if (source == meshItem)
16841804 {
16851805 Object3D itemtomake = new Object3D();
16861806 Object3D child;
....@@ -1701,35 +1821,35 @@
17011821 makeSomething(child);
17021822 }
17031823 } else
1704
- if (event.getSource() == springItem)
1824
+ if (source == springItem)
17051825 {
17061826 cSpring s = new cSpring();
17071827 s.setup();
17081828 makeSomething(s);
17091829 } else
1710
- if (event.getSource() == flagItem)
1830
+ if (source == flagItem)
17111831 {
17121832 cSpring s = new cFlag();
17131833 s.setup();
17141834 makeSomething(s);
17151835 } else
1716
- if (event.getSource() == lightItem)
1836
+ if (source == lightItem)
17171837 {
17181838 makeSomething(new Light());
17191839 } else
1720
- if (event.getSource() == csgItem)
1840
+ if (source == csgItem)
17211841 {
17221842 group(new CSG());
17231843 } else
1724
- if (event.getSource() == templateItem)
1844
+ if (source == templateItem)
17251845 {
17261846 group(new cTemplate());
17271847 } else
1728
- if (event.getSource() == attributeItem)
1848
+ if (source == attributeItem)
17291849 {
17301850 makeSomething(new Attribute());
17311851 } else
1732
- if (event.getSource() == pointflowItem)
1852
+ if (source == pointflowItem)
17331853 {
17341854 makeSomething(new PointFlow());
17351855 } else
....@@ -1741,7 +1861,7 @@
17411861 } else
17421862 */
17431863
1744
- if (event.getSource() == superLoopItem)
1864
+ if (source == superLoopItem)
17451865 {
17461866 Composite g = new cGroup();
17471867 for (int i=0; i<15; i++)
....@@ -1763,7 +1883,7 @@
17631883
17641884 group(g);
17651885 } else
1766
- if (event.getSource() == loopItem)
1886
+ if (source == loopItem)
17671887 {
17681888 Composite csg = new GroupLeaf();
17691889 csg.count = 5;
....@@ -1772,7 +1892,7 @@
17721892 csg.addChild(child);
17731893 child.addChild(csg);
17741894 } else
1775
- if (event.getSource() == doubleItem)
1895
+ if (source == doubleItem)
17761896 {
17771897 Composite csg = new GroupLeaf();
17781898 csg.count = 5;
....@@ -1784,7 +1904,7 @@
17841904 csg.addChild(child);
17851905 child.addChild(csg);
17861906 } else
1787
- if (event.getSource() == tripleItem)
1907
+ if (source == tripleItem)
17881908 {
17891909 Composite csg = new GroupLeaf();
17901910 csg.count = 4;
....@@ -1799,71 +1919,59 @@
17991919 csg.addChild(child);
18001920 child.addChild(csg);
18011921 } else
1802
-
1803
- if (event.getSource() == importGFDItem)
1804
- {
1805
- ImportGFD();
1806
- } else
1807
- if (event.getSource() == importVRMLX3DItem)
1808
- {
1809
- ImportVRMLX3D();
1810
- } else
1811
- if (event.getSource() == import3DSItem)
1812
- {
1813
- objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
1814
- } else
1815
- if (event.getSource() == importOBJItem)
1816
- {
1817
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1818
- } else
1819
- if (event.getSource() == computeAOItem)
1922
+ if (source == computeAOItem)
18201923 {
18211924 Globals.drawMode = CameraPane.OCCLUSION;
18221925 Globals.theRenderer.repaint();
18231926 } else
1824
- if (event.getSource() == recompileItem)
1927
+ if (source == recompileItem)
18251928 {
18261929 Recompile();
18271930 refreshContents();
18281931 } else
1829
- if (event.getSource() == editScriptItem)
1932
+ if (source == editScriptItem)
18301933 {
18311934 OpenDialog();
18321935 refreshContents();
18331936 } else
1834
- if (event.getSource() == invariantsItem)
1937
+ if (source == invariantsItem)
18351938 {
18361939 System.out.println("Invariants:");
1837
- GrafreeD.grafreeD.universe.invariants();
1940
+ Grafreed.grafreeD.universe.invariants();
18381941 } else
1839
- if (event.getSource() == memoryItem)
1942
+ if (source == memoryItem)
18401943 {
18411944 //System.out.println("Invariants:");
18421945 PrintMemory();
18431946 } else
1844
- if (event.getSource() == pathItem)
1947
+ if (source == pathItem)
18451948 {
18461949 PrintPath();
18471950 } else
1848
- if (event.getSource() == analyzeItem)
1951
+ if (source == analyzeItem)
18491952 {
18501953 AnalyzeObject();
18511954 } else
1852
- if (event.getSource() == dumpItem)
1955
+ if (source == dumpItem)
18531956 {
18541957 DumpObject();
18551958 } else
1856
- if (event.getSource() == screenfitButton)
1959
+ if (source == oneStepButton)
1960
+ {
1961
+ Globals.ONESTEP = true;
1962
+ cameraView.repaint();
1963
+ } else
1964
+ if (source == screenfitButton)
18571965 {
18581966 //Reload(lastConverter, lastFilename, true);
18591967 ScreenFit();
18601968 } else
1861
- if (event.getSource() == screenfitpointButton)
1969
+ if (source == screenfitpointButton)
18621970 {
18631971 //Reload(lastConverter, lastFilename, true);
18641972 ScreenFitPoint();
18651973 } else
1866
- if (event.getSource() == snapobjectButton)
1974
+ if (source == snapobjectButton)
18671975 {
18681976 //Reload(lastConverter, lastFilename, true);
18691977 SnapObject();
....@@ -1874,13 +1982,13 @@
18741982 // Recompile();
18751983 // refreshContents();
18761984 // } else
1877
- if (event.getSource() == gcButton)
1985
+ if (source == gcButton)
18781986 {
18791987 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18801988 System.gc();
18811989 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18821990 } else
1883
- if (event.getSource() == editLeafItem)
1991
+ if (source == editLeafItem)
18841992 {
18851993 Object3D obj;
18861994 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1894,62 +2002,74 @@
18942002 }
18952003 refreshContents(true);
18962004 } else
1897
- if (event.getSource() == openWindowItem)
2005
+ if (source == openWindowItem)
18982006 {
18992007 EditSelection(true);
19002008 } else
1901
- if (event.getSource() == cutItem || event.getSource() == clearButton)
2009
+ if (source == cutItem || source == clearButton)
19022010 {
19032011 loadClipboard(true);
19042012 } else
1905
- if (event.getSource() == duplicateItem)
2013
+ if (source == undoItem)
19062014 {
1907
- Object3D keep = GrafreeD.clipboard;
2015
+ Undo();
2016
+ } else
2017
+ if (source == redoItem)
2018
+ {
2019
+ Redo();
2020
+ } else
2021
+ if (source == duplicateItem)
2022
+ {
2023
+ Object3D keep = Grafreed.clipboard;
19082024 loadClipboard(false);
19092025 paste(false);
1910
- GrafreeD.clipboard = keep;
2026
+ Grafreed.clipboard = keep;
19112027 } else
1912
- if (event.getSource() == cloneItem)
2028
+ if (source == cloneItem)
19132029 {
19142030 CloneSelection(false);
19152031 } else
1916
- if (event.getSource() == cloneSupportItem)
2032
+ if (source == cloneSupportItem)
19172033 {
19182034 CloneSelection(true);
19192035 } else
1920
- if (event.getSource() == copyItem)
2036
+ if (source == copyItem)
19212037 {
19222038 loadClipboard(false);
19232039 } else
1924
- if (event.getSource() == pasteItem)
2040
+ if (source == pasteItem)
19252041 {
19262042 paste(false);
19272043 } else
1928
- if (event.getSource() == pasteLinkItem)
2044
+ if (source == pasteIntoItem)
19292045 {
1930
- pasteInto(false);
2046
+ pasteInto(true, false);
19312047 } else
1932
- if (event.getSource() == pasteCloneItem)
2048
+ if (source == pasteLinkItem)
19332049 {
1934
- pasteInto(true);
2050
+ pasteInto(false, false);
19352051 } else
1936
- if (event.getSource() == pasteExpandItem)
2052
+ if (source == pasteCloneItem)
2053
+ {
2054
+ pasteInto(true, true);
2055
+ } else
2056
+ if (source == pasteExpandItem)
19372057 {
19382058 paste(true);
19392059 } else
1940
- if (event.getSource() == synchronizeItem)
2060
+ if (source == synchronizeItem)
19412061 {
19422062 Overwrite(Object3D.TRANSFORM);
19432063 } else
1944
- if (event.getSource() == overwriteNameItem)
2064
+ if (source == overwriteNameItem)
19452065 {
19462066 Overwrite(Object3D.NAME);
19472067 } else
1948
- if (event.getSource() == overwriteUVItem)
2068
+ if (source == overwriteUVItem)
19492069 {
19502070 Overwrite(Object3D.UV);
19512071 } else
1952
- if (event.getSource() == overwriteMatItem)
2072
+ if (source == overwriteMatItem)
19532073 {
19542074 /* july 2015
19552075 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1969,7 +2089,7 @@
19692089
19702090 Overwrite(dropAttributes);
19712091 }
1972
- if (event.getSource() == overwriteGeoItem)
2092
+ if (source == overwriteGeoItem)
19732093 {
19742094 Overwrite(Object3D.GEOMETRY);
19752095 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1986,7 +2106,7 @@
19862106 // refreshContents();
19872107 // }
19882108 } else
1989
- if (event.getSource() == generateMeshItem)
2109
+ if (source == generateMeshItem)
19902110 {
19912111 //if (group.selection.size() == 1)
19922112 // for (int i=0; i<group.selection.size(); i++)
....@@ -1997,7 +2117,7 @@
19972117 ResetModel();
19982118 refreshContents();
19992119 } else
2000
- if (event.getSource() == extractGeometriesItem)
2120
+ if (source == extractGeometriesItem)
20012121 {
20022122 boolean one = false;
20032123
....@@ -2024,7 +2144,7 @@
20242144 ResetModel();
20252145 refreshContents();
20262146 } else
2027
- if (event.getSource() == cloneGeometriesItem)
2147
+ if (source == cloneGeometriesItem)
20282148 {
20292149 boolean one = false;
20302150
....@@ -2050,7 +2170,7 @@
20502170 ResetModel();
20512171 refreshContents();
20522172 } else
2053
- if (event.getSource() == shareGeometriesItem)
2173
+ if (source == shareGeometriesItem)
20542174 {
20552175 boolean one = false;
20562176
....@@ -2080,7 +2200,7 @@
20802200 refreshContents();
20812201 }
20822202 } else
2083
- if (event.getSource() == mergeGeometriesItem)
2203
+ if (source == mergeGeometriesItem)
20842204 {
20852205 boolean one = false;
20862206
....@@ -2110,7 +2230,7 @@
21102230 ResetModel();
21112231 refreshContents();
21122232 } else
2113
- if (event.getSource() == linkverticesItem)
2233
+ if (source == linkverticesItem)
21142234 {
21152235 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21162236 // {
....@@ -2123,9 +2243,9 @@
21232243 // group.selection.get(0).setMasterThis(content); // should be identity
21242244 // refreshContents();
21252245 // }
2126
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2246
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21272247 {
2128
- Object3D content = GrafreeD.clipboard.get(0);
2248
+ Object3D content = Grafreed.clipboard.get(0);
21292249
21302250 if (content instanceof cGroup && ((cGroup)content).transientlink )
21312251 content = ((cGroup)content).get(0);
....@@ -2133,38 +2253,38 @@
21332253 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
21342254 for (int i=0; i<group.selection.size(); i++)
21352255 {
2136
- boolean random = CameraPane.RANDOM;
2137
- CameraPane.RANDOM = false; // parse all random nodes
2256
+ boolean random = CameraPane.SWITCH;
2257
+ CameraPane.SWITCH = false; // parse all random nodes
21382258 group.selection.get(i).linkVerticesThis(content);
21392259 // group.selection.get(i).setMasterThis(content); // should be identity
2140
- CameraPane.RANDOM = random;
2260
+ CameraPane.SWITCH = random;
21412261 }
21422262 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21432263 refreshContents();
21442264 }
21452265 } else
2146
- if (event.getSource() == resetsupportItem)
2266
+ if (source == resetsupportItem)
21472267 {
21482268 for (int i=0; i<group.selection.size(); i++)
21492269 {
2150
- boolean random = CameraPane.RANDOM;
2151
- CameraPane.RANDOM = false; // parse all random nodes
2270
+ boolean random = CameraPane.SWITCH;
2271
+ CameraPane.SWITCH = false; // parse all random nodes
21522272 group.selection.get(i).linkVerticesThis(null);
2153
- CameraPane.RANDOM = random;
2273
+ CameraPane.SWITCH = random;
21542274 }
21552275
21562276 refreshContents();
21572277 } else
2158
- if (event.getSource() == relinkverticesItem)
2278
+ if (source == relinkverticesItem)
21592279 {
2160
- boolean random = CameraPane.RANDOM;
2161
- CameraPane.RANDOM = false; // parse all random nodes
2280
+ boolean random = CameraPane.SWITCH;
2281
+ CameraPane.SWITCH = false; // parse all random nodes
21622282 group.selection.RelinkToSupport();
2163
- CameraPane.RANDOM = random;
2283
+ CameraPane.SWITCH = random;
21642284
21652285 refreshContents();
21662286 } else
2167
- if (event.getSource() == resetreferencesItem)
2287
+ if (source == resetreferencesItem)
21682288 {
21692289 for (int i=0; i<group.selection.size(); i++)
21702290 {
....@@ -2173,11 +2293,11 @@
21732293
21742294 refreshContents();
21752295 } else
2176
- if (event.getSource() == setMasterItem)
2296
+ if (source == setMasterItem)
21772297 {
2178
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2298
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21792299 {
2180
- Object3D content = GrafreeD.clipboard.get(0);
2300
+ Object3D content = Grafreed.clipboard.get(0);
21812301
21822302 if (content instanceof cGroup && ((cGroup)content).transientlink )
21832303 content = ((cGroup)content).get(0);
....@@ -2186,13 +2306,13 @@
21862306 refreshContents();
21872307 }
21882308 } else
2189
- if (event.getSource() == poseMeshItem)
2309
+ if (source == poseMeshItem)
21902310 {
21912311 if (group.selection.size() == 1)
21922312 {
2193
- if (GrafreeD.clipboard.size() == 1)
2313
+ if (Grafreed.clipboard.size() == 1)
21942314 {
2195
- Object3D content = GrafreeD.clipboard.get(0);
2315
+ Object3D content = Grafreed.clipboard.get(0);
21962316
21972317 if (content instanceof cGroup && ((cGroup)content).transientlink )
21982318 content = ((cGroup)content).get(0);
....@@ -2205,19 +2325,19 @@
22052325 }
22062326
22072327 } else
2208
- if (event.getSource() == revertMeshItem)
2328
+ if (source == revertMeshItem)
22092329 {
22102330 RevertMeshes();
22112331 } else
2212
- if (event.getSource() == resetMeshItem)
2332
+ if (source == resetAllItem)
22132333 {
22142334 ResetAll();
22152335 } else
2216
- if (event.getSource() == stepAllItem)
2336
+ if (source == stepAllItem)
22172337 {
22182338 StepAll();
22192339 } else
2220
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2340
+ if (source == clearItem) // || event.getSource() == clearButton)
22212341 {
22222342 //int indices[] = jList.getSelectedIndices();
22232343 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2225,46 +2345,46 @@
22252345
22262346 ClearSelection(false);
22272347 } else
2228
- if (event.getSource() == clearAllItem)
2348
+ if (source == clearAllItem)
22292349 {
22302350 ClearSelection(true);
22312351 } else
2232
- if (event.getSource() == grabItem)
2352
+ if (source == grabItem)
22332353 {
22342354 group(new cGroup(), true);
22352355 } else
2236
- if (event.getSource() == hideItem)
2356
+ if (source == hideItem)
22372357 {
22382358 group(new HiddenObject());
22392359 } else
2240
- if (event.getSource() == frontItem)
2360
+ if (source == frontItem)
22412361 {
22422362 front();
22432363 } else
2244
- if (event.getSource() == backItem)
2364
+ if (source == backItem)
22452365 {
22462366 back();
22472367 } else
2248
- if (event.getSource() == cameraItem)
2368
+ if (source == cameraItem)
22492369 {
22502370 makeSomething(new Camera());
22512371 } else
2252
- if (event.getSource() == compositeItem)
2372
+ if (source == compositeItem)
22532373 {
22542374 group(new Composite());
22552375 } else
2256
- if (event.getSource() == randomItem)
2376
+ if (source == randomItem)
22572377 {
22582378 RandomNode random = new RandomNode();
22592379 group(random);
22602380 if (random.size() > 0)
2261
- random.name = random.get(0).name + "Rnd";
2381
+ random.name = random.get(0).name + "Switch";
22622382 } else
2263
- if (event.getSource() == physicsItem)
2383
+ if (source == physicsItem)
22642384 {
22652385 group(new PhysicsNode());
22662386 } else
2267
- if (event.getSource() == frameselectorItem)
2387
+ if (source == frameselectorItem)
22682388 {
22692389 for (int i=0; i<group.selection.size(); i++)
22702390 {
....@@ -2276,7 +2396,7 @@
22762396 ResetModel();
22772397 refreshContents();
22782398 } else
2279
- if (event.getSource() == switchGeoItem)
2399
+ if (source == switchGeoItem)
22802400 {
22812401 for (int i=0; i<group.selection.size(); i++)
22822402 {
....@@ -2288,7 +2408,7 @@
22882408 ResetModel();
22892409 refreshContents();
22902410 } else
2291
- if (event.getSource() == switchTransfoItem)
2411
+ if (source == switchTransfoItem)
22922412 {
22932413 for (int i=0; i<group.selection.size(); i++)
22942414 {
....@@ -2300,7 +2420,7 @@
23002420 ResetModel();
23012421 refreshContents();
23022422 } else
2303
- if (event.getSource() == morphItem)
2423
+ if (source == morphItem)
23042424 {
23052425 for (int i=0; i<group.selection.size(); i++)
23062426 {
....@@ -2312,7 +2432,7 @@
23122432 ResetModel();
23132433 refreshContents();
23142434 } else
2315
- if (event.getSource() == scriptNodeItem)
2435
+ if (source == scriptNodeItem)
23162436 {
23172437 boolean atleastone = false;
23182438
....@@ -2351,31 +2471,31 @@
23512471 }
23522472 }
23532473 } else
2354
- if (event.getSource() == linkerItem)
2474
+ if (source == linkerItem)
23552475 {
23562476 group(new cLinker());
23572477 } else
2358
- if (event.getSource() == textureItem)
2478
+ if (source == textureItem)
23592479 {
23602480 group(new TextureNode());
23612481 } else
2362
- if (event.getSource() == billboardItem)
2482
+ if (source == billboardItem)
23632483 {
23642484 group(new BillboardNode());
23652485 } else
2366
- if (event.getSource() == shadowXItem)
2486
+ if (source == shadowXItem)
23672487 {
23682488 CastShadow(0);
23692489 } else
2370
- if (event.getSource() == shadowYItem)
2490
+ if (source == shadowYItem)
23712491 {
23722492 CastShadow(1);
23732493 } else
2374
- if (event.getSource() == shadowZItem)
2494
+ if (source == shadowZItem)
23752495 {
23762496 CastShadow(2);
23772497 } else
2378
- if (event.getSource() == ungroupItem)
2498
+ if (source == ungroupItem)
23792499 {
23802500 //ungroup();
23812501 for (int i=0; i<group.selection.size(); i++)
....@@ -2387,179 +2507,187 @@
23872507
23882508 refreshContents();
23892509 } else
2390
- if (event.getSource() == genUVItem)
2510
+ if (source == genUVItem)
23912511 {
23922512 GenUV();
23932513 } else
2394
- if (event.getSource() == genNormalsCADItem)
2514
+ if (source == genNormalsCADItem)
23952515 {
23962516 GenNormals(true);
23972517 } else
2398
- if (event.getSource() == genNormalsMESHItem)
2518
+ if (source == genNormalsMESHItem)
23992519 {
24002520 GenNormals(true); // TODO
24012521 } else
2402
- if (event.getSource() == genNormalsORGANItem)
2522
+ if (source == genNormalsORGANItem)
24032523 {
24042524 GenNormals(false);
24052525 } else
2406
- if (event.getSource() == genNormalsMINEItem)
2526
+ if (source == genNormalsMINEItem)
24072527 {
24082528 GenNormalsMINE();
24092529 } else
2410
- if (event.getSource() == stripifyItem)
2530
+ if (source == stripifyItem)
24112531 {
24122532 Stripify();
24132533 } else
2414
- if (event.getSource() == unstripifyItem)
2534
+ if (source == unstripifyItem)
24152535 {
24162536 Unstripify();
24172537 } else
2418
- if (event.getSource() == trimItem)
2538
+ if (source == trimItem)
24192539 {
24202540 Trim();
24212541 } else
2422
- if (event.getSource() == untrimItem)
2542
+ if (source == untrimItem)
24232543 {
24242544 Untrim();
24252545 } else
2426
- if (event.getSource() == clearColorsItem)
2546
+ if (source == clearColorsItem)
24272547 {
24282548 ClearColors();
24292549 } else
2430
- if (event.getSource() == clearMaterialsItem)
2550
+ if (source == clearMaterialsItem)
24312551 {
24322552 ClearMaterials();
24332553 } else
2434
- if (event.getSource() == liveleavesItem)
2554
+ if (source == liveleavesItem)
24352555 {
24362556 LiveLeaves(true);
24372557 } else
2438
- if (event.getSource() == unliveleavesItem)
2558
+ if (source == unliveleavesItem)
24392559 {
24402560 LiveLeaves(false);
24412561 } else
2442
- if (event.getSource() == supportleavesItem)
2562
+ if (source == supportleavesItem)
24432563 {
24442564 SupportLeaves(true);
24452565 } else
2446
- if (event.getSource() == unsupportleavesItem)
2566
+ if (source == unsupportleavesItem)
24472567 {
24482568 SupportLeaves(false);
24492569 } else
2450
- if (event.getSource() == hideleavesItem)
2570
+ if (source == hideleavesItem)
24512571 {
24522572 HideLeaves(true);
24532573 } else
2454
- if (event.getSource() == showleavesItem)
2574
+ if (source == showleavesItem)
24552575 {
24562576 HideLeaves(false);
24572577 } else
2458
- if (event.getSource() == markleavesItem)
2578
+ if (source == markleavesItem)
24592579 {
24602580 MarkLeaves(true);
24612581 } else
2462
- if (event.getSource() == unmarkleavesItem)
2582
+ if (source == unmarkleavesItem)
24632583 {
24642584 MarkLeaves(false);
24652585 } else
2466
- if (event.getSource() == flipVItem)
2586
+ if (source == flipVItem)
24672587 {
24682588 FlipV(true);
24692589 } else
2470
- if (event.getSource() == unflipVItem)
2590
+ if (source == unflipVItem)
24712591 {
24722592 FlipV(false);
24732593 } else
2474
- if (event.getSource() == lowTexturesItem)
2594
+ if (source == lowTexturesItem)
24752595 {
24762596 SetTexRes(0);
24772597 } else
2478
- if (event.getSource() == normalTexturesItem)
2598
+ if (source == normalTexturesItem)
24792599 {
24802600 SetTexRes(1);
24812601 } else
2482
- if (event.getSource() == highTexturesItem)
2602
+ if (source == highTexturesItem)
24832603 {
24842604 SetTexRes(2);
24852605 } else
2486
- if (event.getSource() == veryhighTexturesItem)
2606
+ if (source == veryhighTexturesItem)
24872607 {
24882608 SetTexRes(3);
24892609 } else
2490
- if (event.getSource() == maxTexturesItem)
2610
+ if (source == maxTexturesItem)
24912611 {
24922612 SetTexRes(4);
24932613 } else
2494
- if (event.getSource() == panoTexturesItem)
2614
+ if (source == panoTexturesItem)
24952615 {
24962616 SetTexRes(5);
24972617 } else
2498
- if (event.getSource() == reverseNormalsItem)
2618
+ if (source == reverseNormalsItem)
24992619 {
25002620 ReverseNormals();
25012621 } else
2502
- if (event.getSource() == parseverticesItem)
2622
+ if (source == parseverticesItem)
25032623 {
25042624 ParseVertices();
25052625 } else
2506
- if (event.getSource() == textureFieldItem)
2626
+ if (source == textureFieldItem)
25072627 {
25082628 TextureVertices();
25092629 } else
2510
- if (event.getSource() == alignItem)
2630
+ if (source == alignItem)
25112631 {
25122632 Align();
25132633 } else
2514
- if (event.getSource() == mirrorItem)
2634
+ if (source == mirrorItem)
25152635 {
25162636 MirrorPoses();
25172637 } else
2518
- if (event.getSource() == reduceMorphItem)
2638
+ if (source == reduceMorphItem)
25192639 {
25202640 MeshReduction(false);
25212641 } else
2522
- if (event.getSource() == reduce34MorphItem)
2642
+ if (source == reduce34MorphItem)
25232643 {
25242644 MeshReduction(true);
25252645 } else
2526
- if (event.getSource() == reverseTrianglesItem)
2646
+ if (source == reverseTrianglesItem)
25272647 {
25282648 ReverseTriangles();
25292649 } else
2530
- if (event.getSource() == reduceMeshItem)
2650
+ if (source == reduceMeshItem)
25312651 {
25322652 ReduceMesh(false);
25332653 } else
2534
- if (event.getSource() == reduce34MeshItem)
2654
+ if (source == reduce34MeshItem)
25352655 {
25362656 ReduceMesh(true);
25372657 } else
2538
- if (event.getSource() == increaseMeshItem)
2658
+ if (source == increaseMeshItem)
25392659 {
25402660 IncreaseMesh();
25412661 } else
2542
- if (event.getSource() == clipMeshItem)
2662
+ if (source == clipMeshItem)
25432663 {
25442664 ClipMesh();
25452665 } else
2546
- if (event.getSource() == smoothMeshItem)
2666
+ if (source == smoothMeshItem)
25472667 {
25482668 SmoothMesh();
25492669 } else
2550
- if (event.getSource() == transformgeometryItem)
2670
+ if (source == transformGeometryItem)
25512671 {
25522672 TransformGeometry();
25532673 } else
2554
- if (event.getSource() == resetTransformItem)
2674
+ if (source == transformChildrenItem)
2675
+ {
2676
+ TransformChildren();
2677
+ } else
2678
+ if (source == resetTransformItem)
25552679 {
25562680 ResetTransform();
25572681 } else
2558
- if (event.getSource() == resetCentroidItem)
2682
+ if (source == resetCentroidItem)
25592683 {
2560
- ResetCentroid();
2684
+ ResetCentroid(true);
25612685 } else
2562
- if (event.getSource() == resetParentItem)
2686
+ if (source == resetCentroidXZItem)
2687
+ {
2688
+ ResetCentroid(false);
2689
+ } else
2690
+ if (source == resetParentItem)
25632691 {
25642692 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25652693 {
....@@ -2569,7 +2697,7 @@
25692697
25702698 refreshContents();
25712699 } else
2572
- if (event.getSource() == repairParentItem)
2700
+ if (source == repairParentItem)
25732701 {
25742702 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25752703 {
....@@ -2583,7 +2711,7 @@
25832711
25842712 refreshContents();
25852713 } else
2586
- if (event.getSource() == repairShadowItem)
2714
+ if (source == repairShadowItem)
25872715 {
25882716 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25892717 {
....@@ -2597,7 +2725,7 @@
25972725
25982726 refreshContents();
25992727 } else
2600
- if (event.getSource() == sortbysizeItem)
2728
+ if (source == sortbysizeItem)
26012729 {
26022730 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
26032731 {
....@@ -2609,7 +2737,7 @@
26092737 ResetModel();
26102738 refreshContents();
26112739 } else
2612
- if (event.getSource() == sortbynameItem)
2740
+ if (source == sortbynameItem)
26132741 {
26142742 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
26152743 {
....@@ -2621,7 +2749,7 @@
26212749 ResetModel();
26222750 refreshContents();
26232751 } else
2624
- if (event.getSource() == attachPigmentItem)
2752
+ if (source == attachPigmentItem)
26252753 {
26262754 String texture = GetFile("Attach pigment");
26272755 Object3D obj;
....@@ -2633,7 +2761,7 @@
26332761
26342762 refreshContents();
26352763 } else
2636
- if (event.getSource() == detachPigmentItem)
2764
+ if (source == detachPigmentItem)
26372765 {
26382766 Object3D obj;
26392767 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2644,7 +2772,7 @@
26442772
26452773 refreshContents();
26462774 } else
2647
- if (event.getSource() == attachBumpItem)
2775
+ if (source == attachBumpItem)
26482776 {
26492777 String texture = GetFile("Attach bump");
26502778 Object3D obj;
....@@ -2656,7 +2784,7 @@
26562784
26572785 refreshContents();
26582786 } else
2659
- if (event.getSource() == detachBumpItem)
2787
+ if (source == detachBumpItem)
26602788 {
26612789 Object3D obj;
26622790 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2667,7 +2795,7 @@
26672795
26682796 refreshContents();
26692797 } else
2670
- if (event.getSource() == pigmentBumpItem)
2798
+ if (source == pigmentBumpItem)
26712799 {
26722800 Object3D obj;
26732801 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2678,158 +2806,195 @@
26782806
26792807 refreshContents();
26802808 } else
2681
- if (event.getSource() == flashSelectionButton)
2809
+ if (source == flashSelectionButton)
26822810 {
26832811 CameraPane.flash = true;
26842812 refreshContents();
26852813 } else
2686
- if (event.getSource() == oneButton)
2814
+ if (source == oneButton)
26872815 {
26882816 } else
2689
- if (event.getSource() == twoButton)
2817
+ if (source == twoButton)
26902818 {
26912819 radio.layout = twoButton;
26922820 // bug
26932821 //gridPanel.setDividerLocation(1.0);
26942822 //bigPanel.setDividerLocation(0.0);
2695
- bigThree.remove(scenePanel);
2696
- bigThree.remove(centralPanel);
2697
- bigThree.remove(XYZPanel);
2698
- aWindowConstraints.gridx = 0;
2699
- aWindowConstraints.gridy = 0;
2700
- aWindowConstraints.gridwidth = 1;
2701
- // aConstraints.gridheight = 3;
2702
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2703
- aWindowConstraints.weightx = 0;
2704
- aWindowConstraints.weighty = 1;
2705
- //bigThree.add(jtp, aWindowConstraints);
2706
- aWindowConstraints.weightx = 1;
2707
- aWindowConstraints.gridwidth = 3;
2708
- // aConstraints.gridheight = 3;
2709
- aWindowConstraints.gridx = 1;
2710
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2711
- bigThree.add(centralPanel, aWindowConstraints);
2712
- aWindowConstraints.weightx = 0;
2713
- aWindowConstraints.gridx = 4;
2714
- aWindowConstraints.gridwidth = 1;
2715
- // aConstraints.gridheight = 3;
2716
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2717
- //bigThree.add(XYZPanel, aWindowConstraints);
2718
- bigThree.revalidate();
2823
+// bigThree.remove(scenePanel);
2824
+// bigThree.remove(centralPanel);
2825
+// bigThree.remove(XYZPanel);
2826
+// aWindowConstraints.gridx = 0;
2827
+// aWindowConstraints.gridy = 0;
2828
+// aWindowConstraints.gridwidth = 1;
2829
+// // aConstraints.gridheight = 3;
2830
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2831
+// aWindowConstraints.weightx = 0;
2832
+// aWindowConstraints.weighty = 1;
2833
+// //bigThree.add(jtp, aWindowConstraints);
2834
+// aWindowConstraints.weightx = 1;
2835
+// aWindowConstraints.gridwidth = 3;
2836
+// // aConstraints.gridheight = 3;
2837
+// aWindowConstraints.gridx = 1;
2838
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2839
+// bigThree.add(centralPanel, aWindowConstraints);
2840
+// aWindowConstraints.weightx = 0;
2841
+// aWindowConstraints.gridx = 4;
2842
+// aWindowConstraints.gridwidth = 1;
2843
+// // aConstraints.gridheight = 3;
2844
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2845
+// //bigThree.add(XYZPanel, aWindowConstraints);
2846
+// scenePanel.setVisible(false);
2847
+// centralPanel.setVisible(true);
2848
+// XYZPanel.setVisible(false);
2849
+ bigThree.ClearUI();
2850
+ bigThree.add(centralPanel);
2851
+ bigThree.FlushUI();
27192852 } else
2720
- if (event.getSource() == threeButton)
2853
+ if (source == threeButton)
27212854 {
27222855 radio.layout = threeButton;
2723
- bigThree.remove(scenePanel);
2724
- bigThree.remove(centralPanel);
2725
- bigThree.remove(XYZPanel);
2726
- aWindowConstraints.gridx = 0;
2727
- aWindowConstraints.gridy = 0;
2728
- aWindowConstraints.gridwidth = 1;
2729
- // aConstraints.gridheight = 3;
2730
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2731
- aWindowConstraints.weightx = 0;
2732
- aWindowConstraints.weighty = 1;
2733
- //bigThree.add(jtp, aWindowConstraints);
2734
- aWindowConstraints.weightx = 1;
2735
- aWindowConstraints.gridwidth = 3;
2736
- // aConstraints.gridheight = 3;
2737
- aWindowConstraints.gridx = 1;
2738
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2739
- bigThree.add(centralPanel, aWindowConstraints);
2740
- aWindowConstraints.weightx = 0;
2741
- aWindowConstraints.gridx = 4;
2742
- aWindowConstraints.gridwidth = 1;
2743
- // aConstraints.gridheight = 3;
2744
- aConstraints.fill = GridBagConstraints.VERTICAL;
2745
- bigThree.add(XYZPanel, aWindowConstraints);
2746
- bigThree.revalidate();
2856
+
2857
+// bigThree.remove(scenePanel);
2858
+// bigThree.remove(centralPanel);
2859
+// bigThree.remove(XYZPanel);
2860
+// aWindowConstraints.gridx = 0;
2861
+// aWindowConstraints.gridy = 0;
2862
+// aWindowConstraints.gridwidth = 1;
2863
+// // aConstraints.gridheight = 3;
2864
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2865
+// aWindowConstraints.weightx = 0;
2866
+// aWindowConstraints.weighty = 1;
2867
+// //bigThree.add(jtp, aWindowConstraints);
2868
+// aWindowConstraints.weightx = 1;
2869
+// aWindowConstraints.gridwidth = 3;
2870
+// // aConstraints.gridheight = 3;
2871
+// aWindowConstraints.gridx = 1;
2872
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2873
+// bigThree.add(centralPanel, aWindowConstraints);
2874
+// aWindowConstraints.weightx = 0;
2875
+// aWindowConstraints.gridx = 4;
2876
+// aWindowConstraints.gridwidth = 1;
2877
+// // aConstraints.gridheight = 3;
2878
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2879
+// bigThree.add(XYZPanel, aWindowConstraints);
2880
+// bigThree.validate();
2881
+// scenePanel.setVisible(false);
2882
+// centralPanel.setVisible(true);
2883
+// XYZPanel.setVisible(true);
2884
+ bigThree.ClearUI();
2885
+ bigThree.add(centralPanel);
2886
+ bigThree.add(XYZPanel);
2887
+ bigThree.FlushUI();
27472888 } else
2748
- if (event.getSource() == fourButton)
2889
+ if (source == fourButton)
27492890 {
27502891 radio.layout = fourButton;
2751
- bigThree.remove(scenePanel);
2752
- bigThree.remove(centralPanel);
2753
- bigThree.remove(XYZPanel);
2754
- aWindowConstraints.gridx = 0;
2755
- aWindowConstraints.gridy = 0;
2756
- aWindowConstraints.gridwidth = 1;
2757
- // aWindowConstraints.gridheight = 3;
2758
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2759
- aWindowConstraints.weightx = 1;
2760
- aWindowConstraints.weighty = 1;
2761
- bigThree.add(scenePanel, aWindowConstraints);
2762
- aWindowConstraints.weightx = 1;
2763
- aWindowConstraints.gridwidth = 3;
2764
- // aConstraints.gridheight = 3;
2765
- aWindowConstraints.gridx = 1;
2766
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2767
- //bigThree.add(cameraPanel, aWindowConstraints);
2768
- aWindowConstraints.weightx = 0;
2769
- aWindowConstraints.gridx = 4;
2770
- aWindowConstraints.gridwidth = 1;
2771
- // aWindowConstraints.gridheight = 3;
2772
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2773
- //bigThree.add(XYZPanel, aWindowConstraints);
2774
- bigThree.revalidate();
2892
+
2893
+// bigThree.remove(scenePanel);
2894
+// bigThree.remove(centralPanel);
2895
+// bigThree.remove(XYZPanel);
2896
+// aWindowConstraints.gridx = 0;
2897
+// aWindowConstraints.gridy = 0;
2898
+// aWindowConstraints.gridwidth = 1;
2899
+// // aWindowConstraints.gridheight = 3;
2900
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2901
+// aWindowConstraints.weightx = 1;
2902
+// aWindowConstraints.weighty = 1;
2903
+// bigThree.add(scenePanel, aWindowConstraints);
2904
+// aWindowConstraints.weightx = 1;
2905
+// aWindowConstraints.gridwidth = 3;
2906
+// // aConstraints.gridheight = 3;
2907
+// aWindowConstraints.gridx = 1;
2908
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2909
+// //bigThree.add(cameraPanel, aWindowConstraints);
2910
+// aWindowConstraints.weightx = 0;
2911
+// aWindowConstraints.gridx = 4;
2912
+// aWindowConstraints.gridwidth = 1;
2913
+// // aWindowConstraints.gridheight = 3;
2914
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2915
+// //bigThree.add(XYZPanel, aWindowConstraints);
2916
+// bigThree.validate();
2917
+// scenePanel.setVisible(true);
2918
+// centralPanel.setVisible(false);
2919
+// XYZPanel.setVisible(false);
2920
+ bigThree.ClearUI();
2921
+ bigThree.add(scenePanel);
2922
+ bigThree.FlushUI();
27752923 } else
2776
- if (event.getSource() == sixButton)
2924
+ if (source == sixButton)
27772925 {
27782926 radio.layout = sixButton;
2779
- bigThree.remove(scenePanel);
2780
- bigThree.remove(centralPanel);
2781
- bigThree.remove(XYZPanel);
2782
- aWindowConstraints.gridx = 0;
2783
- aWindowConstraints.gridy = 0;
2784
- aWindowConstraints.gridwidth = 1;
2785
- // aConstraints.gridheight = 3;
2786
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2787
- aWindowConstraints.weightx = 0;
2788
- aWindowConstraints.weighty = 1;
2789
- bigThree.add(scenePanel, aWindowConstraints);
2790
- aWindowConstraints.weightx = 1;
2791
- aWindowConstraints.gridwidth = 3;
2792
- // aWindowConstraints.gridheight = 3;
2793
- aWindowConstraints.gridx = 1;
2794
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2795
- bigThree.add(centralPanel, aWindowConstraints);
2796
- aWindowConstraints.weightx = 0;
2797
- aWindowConstraints.gridx = 4;
2798
- aWindowConstraints.gridwidth = 1;
2799
- // aWindowConstraints.gridheight = 3;
2800
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2801
- //bigThree.add(XYZPanel, aConstraints);
2802
- bigThree.revalidate();
2927
+
2928
+// bigThree.remove(scenePanel);
2929
+// bigThree.remove(centralPanel);
2930
+// bigThree.remove(XYZPanel);
2931
+// aWindowConstraints.gridx = 0;
2932
+// aWindowConstraints.gridy = 0;
2933
+// aWindowConstraints.gridwidth = 1;
2934
+// // aConstraints.gridheight = 3;
2935
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2936
+// aWindowConstraints.weightx = 0;
2937
+// aWindowConstraints.weighty = 1;
2938
+// bigThree.add(scenePanel, aWindowConstraints);
2939
+// aWindowConstraints.weightx = 1;
2940
+// aWindowConstraints.gridwidth = 3;
2941
+// // aWindowConstraints.gridheight = 3;
2942
+// aWindowConstraints.gridx = 1;
2943
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2944
+// bigThree.add(centralPanel, aWindowConstraints);
2945
+// aWindowConstraints.weightx = 0;
2946
+// aWindowConstraints.gridx = 4;
2947
+// aWindowConstraints.gridwidth = 1;
2948
+// // aWindowConstraints.gridheight = 3;
2949
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2950
+// //bigThree.add(XYZPanel, aConstraints);
2951
+// bigThree.validate();
2952
+// scenePanel.setVisible(true);
2953
+// centralPanel.setVisible(true);
2954
+// XYZPanel.setVisible(false);
2955
+ bigThree.ClearUI();
2956
+ bigThree.add(scenePanel);
2957
+ bigThree.add(centralPanel);
2958
+ bigThree.FlushUI();
28032959 } else
2804
- if (event.getSource() == sevenButton)
2960
+ if (source == sevenButton)
28052961 {
28062962 radio.layout = sevenButton;
2807
- bigThree.remove(scenePanel);
2808
- bigThree.remove(centralPanel);
2809
- bigThree.remove(XYZPanel);
2810
- aWindowConstraints.gridx = 0;
2811
- aWindowConstraints.gridy = 0;
2812
- aWindowConstraints.gridwidth = 1;
2813
- // aWindowConstraints.gridheight = 3;
2814
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2815
- aWindowConstraints.weightx = 0;
2816
- aWindowConstraints.weighty = 1;
2817
- bigThree.add(scenePanel, aWindowConstraints);
2818
- aWindowConstraints.weightx = 1;
2819
- aWindowConstraints.gridwidth = 3;
2820
- // aWindowConstraints.gridheight = 3;
2821
- aWindowConstraints.gridx = 1;
2822
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2823
- bigThree.add(centralPanel, aWindowConstraints);
2824
- aWindowConstraints.weightx = 0;
2825
- aWindowConstraints.gridx = 4;
2826
- aWindowConstraints.gridwidth = 1;
2827
- // aConstraints.gridheight = 3;
2828
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2829
- bigThree.add(XYZPanel, aWindowConstraints);
2830
- bigThree.revalidate();
2963
+
2964
+// bigThree.remove(scenePanel);
2965
+// bigThree.remove(centralPanel);
2966
+// bigThree.remove(XYZPanel);
2967
+// aWindowConstraints.gridx = 0;
2968
+// aWindowConstraints.gridy = 0;
2969
+// aWindowConstraints.gridwidth = 1;
2970
+// // aWindowConstraints.gridheight = 3;
2971
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2972
+// aWindowConstraints.weightx = 0;
2973
+// aWindowConstraints.weighty = 1;
2974
+// bigThree.add(scenePanel, aWindowConstraints);
2975
+// aWindowConstraints.weightx = 1;
2976
+// aWindowConstraints.gridwidth = 3;
2977
+// // aWindowConstraints.gridheight = 3;
2978
+// aWindowConstraints.gridx = 1;
2979
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2980
+// bigThree.add(centralPanel, aWindowConstraints);
2981
+// aWindowConstraints.weightx = 0;
2982
+// aWindowConstraints.gridx = 4;
2983
+// aWindowConstraints.gridwidth = 1;
2984
+// // aConstraints.gridheight = 3;
2985
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2986
+// bigThree.add(XYZPanel, aWindowConstraints);
2987
+// bigThree.validate();
2988
+// scenePanel.setVisible(true);
2989
+// centralPanel.setVisible(true);
2990
+// XYZPanel.setVisible(true);
2991
+ bigThree.ClearUI();
2992
+ bigThree.add(scenePanel);
2993
+ bigThree.add(centralPanel);
2994
+ bigThree.add(XYZPanel);
2995
+ bigThree.FlushUI();
28312996 } else
2832
- if (event.getSource() == rootButton)
2997
+ if (source == rootButton)
28332998 {
28342999 Object3D obj;
28353000 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2841,7 +3006,7 @@
28413006
28423007 refreshContents(true);
28433008 } else
2844
- if (event.getSource() == closeButton)
3009
+ if (source == closeButton)
28453010 {
28463011 //System.out.println("CLOSE: " + buttonGroup.getSelection());
28473012 cRadio ab;
....@@ -2862,11 +3027,11 @@
28623027 }
28633028 refreshContents(true);
28643029 } else
2865
- if (event.getSource() == editItem || event.getSource() == editButton)
3030
+ if (source == editItem || source == editButton)
28663031 {
28673032 EditSelection(false);
28683033 } else
2869
- if (event.getSource() == uneditButton)
3034
+ if (source == uneditButton)
28703035 {
28713036 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28723037 {
....@@ -2876,14 +3041,14 @@
28763041 child.CloseUI();
28773042 listUI.remove(child);
28783043
2879
- child.editWindow = null; // ???????????
3044
+ //child.editWindow = null; // ???????????
28803045 }
2881
- objEditor.ctrlPanel.revalidate();
3046
+ objEditor.ctrlPanel.FlushUI();
28823047 //objEditor.jTree.clearSelection();
28833048 //objEditor.ResetSliders();
28843049 refreshContents(true);
28853050 } else
2886
- if (event.getSource() == clearPanelButton)
3051
+ if (source == clearPanelButton)
28873052 {
28883053 assert(copy == group);
28893054 //copy.ClearUI();
....@@ -2894,7 +3059,7 @@
28943059 listUI.clear();
28953060 refreshContents(true);
28963061 } else
2897
- if (event.getSource() == allParamsButton)
3062
+ if (source == allParamsButton)
28983063 {
28993064 assert(copy == group);
29003065
....@@ -2915,19 +3080,19 @@
29153080
29163081 refreshContents(true);
29173082 } else
2918
- if (event.getSource() == unselectButton)
3083
+ if (source == unselectButton)
29193084 {
29203085 objEditor.jTree.clearSelection();
29213086 // ?? oct 2012 GrafreeD.clipboard.clear();
29223087 objEditor.ResetSliders();
29233088 refreshContents(true);
29243089 } else
2925
- if(event.getSource() instanceof cRadio)
3090
+ if(source instanceof cRadio)
29263091 {
29273092 group.parent = keepparent;
29283093 group.attributes = 0;
29293094 //group.editWindow = null;
2930
- /*cRadio*/ radio = (cRadio)event.getSource();
3095
+ /*cRadio*/ radio = (cRadio)source;
29313096 Object3D obj = radio.GetObject();
29323097 System.out.println("Edit " + obj);
29333098 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2962,7 +3127,9 @@
29623127 frontView.object = group;
29633128 sideView.object = group;
29643129 }
2965
- group.editWindow = this;
3130
+
3131
+// fix "+" issue group.editWindow = this;
3132
+
29663133 /*
29673134 currentLayout = radio.layout;
29683135 if (currentLayout == null)
....@@ -2975,7 +3142,20 @@
29753142 //group.attributes = -1;
29763143 ResetModel();
29773144 refreshContents(true);
2978
- }
3145
+ } else if (event.getSource() == editCameraItem)
3146
+ {
3147
+ cameraView.ProtectCamera();
3148
+ cameraView.repaint();
3149
+ return;
3150
+ } else if (event.getSource() == revertCameraItem)
3151
+ {
3152
+ cameraView.RevertCamera();
3153
+ cameraView.repaint();
3154
+ return;
3155
+ // } else if (event.getSource() == textureButton)
3156
+ // {
3157
+ // return; // true;
3158
+ }
29793159 else
29803160 {
29813161 //return super.action(event, arg);
....@@ -3036,6 +3216,28 @@
30363216 refreshContents();
30373217 }
30383218
3219
+ void TransformChildren()
3220
+ {
3221
+ Object3D obj;
3222
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3223
+ {
3224
+ obj = (Object3D)e.nextElement();
3225
+ obj.KeepTextureMatrices();
3226
+ obj.TransformChildren();
3227
+ obj.RestoreTextureMatrices();
3228
+
3229
+// if (obj.parent == null)
3230
+// {
3231
+// System.out.println("NULL PARENT!");
3232
+// new Exception().printStackTrace();
3233
+// }
3234
+// else
3235
+// TouchTransform(obj);
3236
+// //obj.parent.Touch();
3237
+ }
3238
+
3239
+ refreshContents();
3240
+ }
30393241
30403242 void ResetTransform()
30413243 {
....@@ -3148,7 +3350,7 @@
31483350 refreshContents();
31493351 }
31503352
3151
- void ResetCentroid()
3353
+ void ResetCentroid(boolean full)
31523354 {
31533355 Object3D obj;
31543356 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3163,12 +3365,16 @@
31633365 LA.matIdentity(Object3D.mat);
31643366 obj.getBounds(minima, maxima, false);
31653367 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3166
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3368
+ if (full)
3369
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
31673370 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
31683371 obj.TransformMesh(Object3D.mat);
3372
+
31693373 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3170
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3374
+ if (full)
3375
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
31713376 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3377
+
31723378 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
31733379 //Object3D.mat[3][0] = -Object3D.mat[3][0];
31743380 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3234,9 +3440,9 @@
32343440 obj = (Object3D)e.nextElement();
32353441
32363442 System.out.println("Object is: " + obj);
3237
- GrafreeD.AnalyzeObject(obj);
3443
+ Grafreed.AnalyzeObject(obj);
32383444 System.out.println("Boundary rep: " + obj.bRep);
3239
- GrafreeD.AnalyzeObject(obj.bRep);
3445
+ Grafreed.AnalyzeObject(obj.bRep);
32403446
32413447 // System.err.println((size/1024) + " KB is the size of " + obj);
32423448 }
....@@ -3450,8 +3656,8 @@
34503656
34513657 void ParseVertices()
34523658 {
3453
- boolean epsequal = GrafreeD.epsequal;
3454
- GrafreeD.epsequal = true;
3659
+ boolean epsequal = Grafreed.epsequal;
3660
+ Grafreed.epsequal = true;
34553661
34563662 for (int i=0; i<group.selection.size(); i++)
34573663 {
....@@ -3476,7 +3682,7 @@
34763682 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
34773683 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
34783684
3479
- g.add(GrafreeD.clipboard);
3685
+ g.add(Grafreed.clipboard);
34803686
34813687 buffer.add(g);
34823688 }
....@@ -3491,7 +3697,7 @@
34913697 makeSomething(buffer, i==group.selection.size()-1);
34923698 }
34933699
3494
- GrafreeD.epsequal = epsequal;
3700
+ Grafreed.epsequal = epsequal;
34953701
34963702 refreshContents();
34973703 }
....@@ -3509,7 +3715,16 @@
35093715 String pigment = Object3D.GetPigment(tex);
35103716 //String bump = Object3D.GetBump(tex);
35113717
3512
- com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3718
+ com.sun.opengl.util.texture.TextureData texturedata = null;
3719
+
3720
+ try
3721
+ {
3722
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3723
+ }
3724
+ catch (Exception e)
3725
+ {
3726
+ System.err.println("FAIL: " + node);
3727
+ }
35133728
35143729 double s = v.s;
35153730
....@@ -3597,11 +3812,11 @@
35973812
35983813 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
35993814
3600
- boolean random = CameraPane.RANDOM;
3601
- CameraPane.RANDOM = false; // parse all random nodes
3815
+ boolean random = CameraPane.SWITCH;
3816
+ CameraPane.SWITCH = false; // parse all random nodes
36023817 lowres.linkVerticesThis(null);
36033818 lowres.linkVerticesThis(sn);
3604
- CameraPane.RANDOM = random;
3819
+ CameraPane.SWITCH = random;
36053820
36063821 System.err.flush();
36073822
....@@ -3641,7 +3856,7 @@
36413856 return;
36423857
36433858 Object3D poses = group.selection.get(0);
3644
- Object3D ref = GrafreeD.clipboard.get(0);
3859
+ Object3D ref = Grafreed.clipboard.get(0);
36453860
36463861 Object3D newgroup = new Object3D("Po:" + poses.name);
36473862
....@@ -3835,9 +4050,9 @@
38354050
38364051 void ClipMesh()
38374052 {
3838
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
4053
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
38394054 {
3840
- Object3D content = GrafreeD.clipboard.get(0);
4055
+ Object3D content = Grafreed.clipboard.get(0);
38414056
38424057 if (content instanceof cGroup && ((cGroup)content).transientlink )
38434058 content = ((cGroup)content).get(0);
....@@ -3846,7 +4061,7 @@
38464061 // {
38474062 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
38484063 // }
3849
- group.selection.ClipMesh(GrafreeD.clipboard);
4064
+ group.selection.ClipMesh(Grafreed.clipboard);
38504065 }
38514066 // group.selection.ClipMesh(GrafreeD.clipboard);
38524067 System.out.println("DONE.");
....@@ -3981,7 +4196,7 @@
39814196 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
39824197
39834198 Object3D elem = (Object3D)group.selection.elementAt(i);
3984
- if(elem != group)
4199
+ if(elem != group || !newWindow)
39854200 {
39864201 // if (!(elem instanceof Composite))
39874202 // newWindow = false;
....@@ -4086,23 +4301,26 @@
40864301 System.err.println("info : " + child.GetPath());
40874302 }
40884303 }
4089
- else
4090
- {
4091
- objEditor.SetMaterial(group); // .GetMaterial());
4092
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4093
- System.err.println("info : " + group.GetPath());
4094
- }
4304
+// else
4305
+// {
4306
+// objEditor.SetMaterial(group); // .GetMaterial());
4307
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4308
+// System.err.println("info : " + group.GetPath());
4309
+// }
40954310
40964311 objEditor.SetText(); // jan 2014
40974312
4098
- if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4313
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
40994314 CameraPane.flash = true;
41004315
4101
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4316
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
41024317 // a camera
41034318 {
4104
- CameraPane.camerachangeframe = 0; // don't refuse it
4105
- Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4319
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
4320
+ {
4321
+ CameraPane.camerachangeframe = 0; // don't refuse it
4322
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4323
+ }
41064324 // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
41074325 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
41084326 }
....@@ -4186,12 +4404,12 @@
41864404 {
41874405 if (group.selection.isEmpty())
41884406 return;
4189
- GrafreeD.clipboardIsTempGroup = false;
4407
+ Grafreed.clipboardIsTempGroup = false;
41904408 Composite tGroup = null;
41914409 if (group.selection.size() > 0) // 1)
41924410 {
41934411 tGroup = new cGroup();
4194
- GrafreeD.clipboardIsTempGroup = true;
4412
+ Grafreed.clipboardIsTempGroup = true;
41954413 }
41964414
41974415 if (cut)
....@@ -4231,16 +4449,16 @@
42314449 //System.out.println("cut " + child);
42324450 //System.out.println("parent = " + child.parent);
42334451 // tmp.addChild(child);
4234
- if (GrafreeD.clipboardIsTempGroup)
4452
+ if (Grafreed.clipboardIsTempGroup)
42354453 tGroup.add/*Child*/(tmp);
42364454 else
4237
- GrafreeD.clipboard = tmp;
4455
+ Grafreed.clipboard = tmp;
42384456 }
42394457 else
4240
- if (GrafreeD.clipboardIsTempGroup)
4458
+ if (Grafreed.clipboardIsTempGroup)
42414459 tGroup.add/*Child*/(child);
42424460 else
4243
- GrafreeD.clipboard = child;
4461
+ Grafreed.clipboard = child;
42444462 }
42454463
42464464 //ResetModel();
....@@ -4272,21 +4490,21 @@
42724490 //System.out.println("cut " + elem);
42734491 //System.out.println("parent = " + elem.parent);
42744492 // tmp.addChild(elem);
4275
- if (GrafreeD.clipboardIsTempGroup)
4493
+ if (Grafreed.clipboardIsTempGroup)
42764494 tGroup.add/*Child*/(tmp);
42774495 else
4278
- GrafreeD.clipboard = tmp;
4496
+ Grafreed.clipboard = tmp;
42794497 }
42804498 else
4281
- if (GrafreeD.clipboardIsTempGroup)
4499
+ if (Grafreed.clipboardIsTempGroup)
42824500 tGroup.add/*Child*/(child);
42834501 else
4284
- GrafreeD.clipboard = child;
4502
+ Grafreed.clipboard = child;
42854503 }
42864504
42874505 }
4288
- if (GrafreeD.clipboardIsTempGroup)
4289
- GrafreeD.clipboard = tGroup;
4506
+ if (Grafreed.clipboardIsTempGroup)
4507
+ Grafreed.clipboard = tGroup;
42904508 if (cut)
42914509 {
42924510 ResetModel();
....@@ -4300,7 +4518,7 @@
43004518 // return;
43014519 boolean first = true;
43024520
4303
- if (GrafreeD.clipboardIsTempGroup)
4521
+ if (Grafreed.clipboardIsTempGroup)
43044522 {
43054523 Composite temp;
43064524
....@@ -4311,7 +4529,7 @@
43114529 temp = (Composite)Applet3D.clipboard.deepCopy();
43124530 */
43134531 Object3D elem;
4314
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4532
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
43154533 {
43164534 Object3D child = (Object3D)e.nextElement();
43174535
....@@ -4345,21 +4563,21 @@
43454563 //Object3D cb = Applet3D.clipboard;
43464564 //temp.addChild(cb);
43474565 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4348
- assert(GrafreeD.clipboard.parent == null);
4349
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4350
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4351
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4352
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
4566
+ assert(Grafreed.clipboard.parent == null);
4567
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4568
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4569
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4570
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
43534571 else
4354
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4355
- GrafreeD.clipboard.get(0).parent = keepparent;
4572
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4573
+ Grafreed.clipboard.get(0).parent = keepparent;
43564574 }
43574575
43584576 ResetModel();
43594577 refreshContents();
43604578 }
43614579
4362
- void pasteInto(boolean copyit)
4580
+ void pasteInto(boolean copyit, boolean clone)
43634581 {
43644582 // if (GrafreeD.clipboard == null)
43654583 // return;
....@@ -4388,15 +4606,22 @@
43884606 if (copyit)
43894607 {
43904608 // paste(false);
4391
- CloneClipboard(false); // sept 2014
4609
+ if (clone)
4610
+ {
4611
+ CloneClipboard(false); // sept 2014
4612
+ }
4613
+ else
4614
+ {
4615
+ paste(false);
4616
+ }
43924617 }
43934618 else
43944619 {
43954620 boolean first = true;
43964621
4397
- if (GrafreeD.clipboardIsTempGroup)
4622
+ if (Grafreed.clipboardIsTempGroup)
43984623 {
4399
- Composite temp = (Composite)GrafreeD.clipboard;
4624
+ Composite temp = (Composite)Grafreed.clipboard;
44004625 Object3D copy;
44014626 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
44024627 {
....@@ -4406,7 +4631,7 @@
44064631 }
44074632 } else
44084633 {
4409
- linkSomething(GrafreeD.clipboard); //.get(0));
4634
+ linkSomething(Grafreed.clipboard); //.get(0));
44104635 }
44114636 }
44124637 }
....@@ -4811,21 +5036,6 @@
48115036 }
48125037 */
48135038
4814
- void ImportGFD()
4815
- {
4816
- FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
4817
- browser.show();
4818
- String filename = browser.getFile();
4819
- if (filename != null && filename.length() > 0)
4820
- {
4821
- String fullname = browser.getDirectory() + filename;
4822
-
4823
- //Object3D readobj =
4824
- objEditor.ReadGFD(fullname, objEditor);
4825
- //makeSomething(readobj);
4826
- }
4827
- }
4828
-
48295039 /*
48305040 public void Callback(Object obj)
48315041 {
....@@ -4849,26 +5059,9 @@
48495059 }
48505060 */
48515061
4852
- void ImportVRMLX3D()
4853
- {
4854
- if (GrafreeD.standAlone)
4855
- {
4856
- /**/
4857
- FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
4858
- browser.show();
4859
- String filename = browser.getFile();
4860
- if (filename != null && filename.length() > 0)
4861
- {
4862
- String fullname = browser.getDirectory() + filename;
4863
- LoadVRMLX3D(fullname);
4864
- }
4865
- /**/
4866
- }
4867
- }
4868
-
48695062 String GetFile(String dialogName)
48705063 {
4871
- if (GrafreeD.standAlone)
5064
+ if (Grafreed.standAlone)
48725065 {
48735066 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
48745067 browser.show();
....@@ -4932,10 +5125,12 @@
49325125 cButton flashSelectionButton;
49335126 cButton editButton;
49345127 cButton uneditButton;
5128
+ JCheckBox allParamsButton;
49355129 cButton clearpanelButton;
4936
- cButton allParamsButton;
49375130 cButton unselectButton;
49385131
5132
+ cButton oneStepButton;
5133
+
49395134 cButton screenfitButton;
49405135 cButton screenfitpointButton;
49415136 cButton snapobjectButton;
....@@ -4966,6 +5161,8 @@
49665161 private MenuItem lookFromItem;
49675162 private MenuItem switchItem;
49685163 private MenuItem cutItem;
5164
+ private MenuItem undoItem;
5165
+ private MenuItem redoItem;
49695166 private MenuItem duplicateItem;
49705167 private MenuItem cloneItem;
49715168 private MenuItem cloneSupportItem;
....@@ -4979,7 +5176,7 @@
49795176 private MenuItem linkverticesItem;
49805177 private MenuItem relinkverticesItem;
49815178 private MenuItem setMasterItem;
4982
- private MenuItem resetMeshItem;
5179
+ private MenuItem resetAllItem;
49835180 private MenuItem stepAllItem;
49845181 private MenuItem revertMeshItem;
49855182 private MenuItem poseMeshItem;
....@@ -4990,6 +5187,7 @@
49905187 private MenuItem mergeGeometriesItem;
49915188 private MenuItem copyItem;
49925189 private MenuItem pasteItem;
5190
+ private MenuItem pasteIntoItem;
49935191 private MenuItem pasteLinkItem;
49945192 private MenuItem pasteCloneItem;
49955193 private MenuItem pasteExpandItem;
....@@ -5039,8 +5237,10 @@
50395237 private MenuItem panoTexturesItem;
50405238
50415239 private MenuItem resetCentroidItem;
5042
- private MenuItem transformgeometryItem;
5240
+ private MenuItem resetCentroidXZItem;
50435241 private MenuItem resetTransformItem;
5242
+ private MenuItem transformGeometryItem;
5243
+ private MenuItem transformChildrenItem;
50445244 private MenuItem hideItem;
50455245 private MenuItem grabItem;
50465246 private MenuItem backItem;
....@@ -5087,7 +5287,7 @@
50875287 private MenuItem blobItem;
50885288 private MenuItem latheItem;
50895289 private MenuItem bezierItem;
5090
- private MenuItem checkerItem;
5290
+ private MenuItem overlayItem;
50915291 private MenuItem meshItem;
50925292 // private MenuItem meshGroupItem;
50935293 private MenuItem springItem;
....@@ -5109,11 +5309,6 @@
51095309 private MenuItem doubleItem;
51105310 private MenuItem tripleItem;
51115311
5112
- private MenuItem importGFDItem;
5113
- private MenuItem importVRMLX3DItem;
5114
- private MenuItem import3DSItem;
5115
- private MenuItem importOBJItem;
5116
-
51175312 private MenuItem computeAOItem;
51185313 private MenuItem recompileItem;
51195314 private MenuItem editScriptItem;
....@@ -5123,4 +5318,8 @@
51235318 private MenuItem analyzeItem;
51245319 private MenuItem dumpItem;
51255320 //boolean freezemodel = false;
5321
+
5322
+ Menu cameraMenu;
5323
+ MenuItem editCameraItem;
5324
+ MenuItem revertCameraItem;
51265325 }