Normand Briere
2019-06-09 c5b599b48b333b34e554b464aefbca0b9bc66275
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,124 @@
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
+ duplicateItem = menu.add(new MenuItem("Duplicate"));
158
+ duplicateItem.addActionListener(this);
159
+ cloneItem = menu.add(new MenuItem("Clone"));
160
+ cloneItem.addActionListener(this);
161
+ if (Globals.ADVANCED)
162
+ {
163
+ cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
164
+ cloneSupportItem.addActionListener(this);
165
+ }
166
+ menu.add("-");
167
+ cutItem = menu.add(new MenuItem("Cut"));
168
+ cutItem.addActionListener(this);
169
+ copyItem = menu.add(new MenuItem("Copy"));
170
+ copyItem.addActionListener(this);
171
+ pasteItem = menu.add(new MenuItem("Paste"));
172
+ pasteItem.addActionListener(this);
173
+ menu.add("-");
174
+
175
+ menu.add("-");
176
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
177
+ pasteIntoItem.addActionListener(this);
178
+ pasteLinkItem = menu.add(new MenuItem("Paste link"));
179
+ pasteLinkItem.addActionListener(this);
180
+ pasteCloneItem = menu.add(new MenuItem("Paste clone"));
181
+ pasteCloneItem.addActionListener(this);
182
+// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
183
+// pasteExpandItem.addActionListener(this);
184
+ menu.add("-");
185
+ clearItem = menu.add(new MenuItem("Clear"));
186
+ clearItem.addActionListener(this);
187
+
188
+ if (Globals.ADVANCED)
189
+ {
190
+ // Deletes the cameras...
191
+ clearAllItem = menu.add(new MenuItem("Clear All"));
192
+ clearAllItem.addActionListener(this);
193
+ }
194
+
195
+ menuBar.add(cameraMenu = new Menu("View"));
196
+ //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
197
+ //zBufferItem.addActionListener(this);
198
+ //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
199
+ //normalLensItem.addActionListener(this);
200
+ cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera"));
201
+ revertCameraItem.addActionListener(this);
202
+
203
+ cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
204
+ toggleFullScreenItem.addItemListener(this);
205
+ toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
206
+ cameraMenu.add("-");
207
+
208
+ cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
209
+ toggleTextureItem.addItemListener(this);
210
+ toggleTextureItem.setState(CameraPane.textureon);
211
+
212
+ cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
213
+ toggleSwitchItem.addItemListener(this);
214
+ toggleSwitchItem.setState(CameraPane.SWITCH);
215
+
216
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
217
+ toggleHandleItem.addItemListener(this);
218
+ toggleHandleItem.setState(CameraPane.HANDLES);
219
+
220
+ cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
221
+ togglePaintItem.addItemListener(this);
222
+ togglePaintItem.setState(CameraPane.PAINTMODE);
223
+
224
+ if (Globals.ADVANCED)
225
+ {
226
+ cameraMenu.add("-");
227
+ cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
228
+ toggleLiveItem.addItemListener(this);
229
+ toggleLiveItem.setState(Globals.isLIVE());
230
+
231
+ cameraMenu.add(stepItem = new MenuItem("Step"));
232
+ stepItem.addActionListener(this);
233
+ // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
234
+ // toggleDLItem.addItemListener(this);
235
+ // toggleDLItem.setState(false);
236
+
237
+ cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
238
+ toggleRenderItem.addItemListener(this);
239
+ toggleRenderItem.setState(!CameraPane.frozen);
240
+
241
+ cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
242
+ toggleDebugItem.addItemListener(this);
243
+ toggleDebugItem.setState(CameraPane.DEBUG);
244
+
245
+ cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
246
+ toggleFrustumItem.addItemListener(this);
247
+ toggleFrustumItem.setState(CameraPane.FRUSTUM);
248
+
249
+ cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
250
+ toggleFootContactItem.addItemListener(this);
251
+ toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
252
+
253
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
254
+ toggleTimelineItem.addItemListener(this);
255
+ }
256
+
257
+// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
258
+// toggleRootItem.addItemListener(this);
259
+// toggleRootItem.setState(false);
260
+// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
261
+// animationItem.addItemListener(this);
262
+// animationItem.setState(CameraPane.ANIMATION);
263
+ cameraMenu.add("-");
264
+ cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera"));
265
+ editCameraItem.addActionListener(this);
266
+
267
+ if (Globals.ADVANCED)
268
+ {
152269 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
153270 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
154271 //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
....@@ -160,45 +277,17 @@
160277 lookAtItem.addActionListener(this);
161278 //lookFromItem.addActinoListener(this);
162279 //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
-
280
+ }
281
+
192282 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);
283
+ if (Globals.ADVANCED)
284
+ {
197285 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
198286 revertMeshItem.addActionListener(this);
199287 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
200288 resetreferencesItem.addActionListener(this);
201289 menu.add("-");
290
+ }
202291 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
203292 overwriteGeoItem.addActionListener(this);
204293 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -210,19 +299,26 @@
210299 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
211300 overwriteUVItem.addActionListener(this);
212301 menu.add("-");
302
+ if (Globals.ADVANCED)
303
+ {
213304 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
214305 generateMeshItem.addActionListener(this);
215306 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
216307 poseMeshItem.addActionListener(this);
217308 menu.add("-");
309
+ }
218310 resetsupportItem = menu.add(new MenuItem("Reset support"));
219311 resetsupportItem.addActionListener(this);
220312 linkverticesItem = menu.add(new MenuItem("Link to Support"));
221313 linkverticesItem.addActionListener(this);
222314 relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
223315 relinkverticesItem.addActionListener(this);
316
+
317
+ if (Globals.ADVANCED)
318
+ {
224319 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
225320 setMasterItem.addActionListener(this);
321
+ }
226322
227323 oe.menuBar.add(menu = new Menu("Group"));
228324 grabItem = menu.add(new MenuItem("Grab"));
....@@ -233,27 +329,32 @@
233329 frontItem.addActionListener(this);
234330 compositeItem = menu.add(new MenuItem("Composite"));
235331 compositeItem.addActionListener(this);
236
- hideItem = menu.add(new MenuItem("Hide"));
332
+ hideItem = menu.add(new MenuItem("Hidden Group"));
237333 hideItem.addActionListener(this);
238334 ungroupItem = menu.add(new MenuItem("Ungroup"));
239335 ungroupItem.addActionListener(this);
240336 menu.add("-");
241
- randomItem = menu.add(new MenuItem("Random"));
337
+ randomItem = menu.add(new MenuItem("Switch node"));
242338 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);
247339 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
248340 switchGeoItem.addActionListener(this);
249341 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
250342 switchTransfoItem.addActionListener(this);
251
- morphItem = menu.add(new MenuItem("Morph"));
343
+ morphItem = menu.add(new MenuItem("Morph Group"));
252344 morphItem.addActionListener(this);
345
+
346
+ if (Globals.ADVANCED)
347
+ {
348
+ menu.add("-");
349
+ physicsItem = menu.add(new MenuItem("Physics"));
350
+ physicsItem.addActionListener(this);
351
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
352
+ frameselectorItem.addActionListener(this);
253353 scriptNodeItem = menu.add(new MenuItem("Script Node"));
254354 scriptNodeItem.addActionListener(this);
255355 cameraItem = menu.add(new MenuItem("Camera"));
256356 cameraItem.addActionListener(this);
357
+ }
257358
258359 oe.menuBar.add(menu = new Menu("Object"));
259360 textureItem = menu.add(new MenuItem("Texture"));
....@@ -268,21 +369,29 @@
268369 shadowYItem.addActionListener(this);
269370 shadowZItem = menu.add(new MenuItem("Shadow Z"));
270371 shadowZItem.addActionListener(this);
372
+ if (Globals.ADVANCED)
373
+ {
374
+ menu.add("-");
271375 linkerItem = menu.add(new MenuItem("Linker"));
272376 linkerItem.addActionListener(this);
273
- templateItem = menu.add(new MenuItem("Template"));
274
- templateItem.addActionListener(this);
275377 attributeItem = menu.add(new MenuItem("Attribute"));
276378 attributeItem.addActionListener(this);
379
+ templateItem = menu.add(new MenuItem("Template"));
380
+ templateItem.addActionListener(this);
277381 pointflowItem = menu.add(new MenuItem("Point Flow"));
278382 pointflowItem.addActionListener(this);
383
+ }
279384 menu.add("-");
280385 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
281386 resetTransformItem.addActionListener(this);
282387 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
283388 resetCentroidItem.addActionListener(this);
284
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
285
- transformgeometryItem.addActionListener(this);
389
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
390
+ resetCentroidXZItem.addActionListener(this);
391
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
392
+ transformGeometryItem.addActionListener(this);
393
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
394
+ transformChildrenItem.addActionListener(this);
286395
287396 oe.menuBar.add(menu = new Menu("Geometry"));
288397 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -293,8 +402,11 @@
293402 genNormalsCADItem.addActionListener(this);
294403 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
295404 genNormalsMESHItem.addActionListener(this);
405
+ if (Globals.ADVANCED)
406
+ {
296407 genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
297408 genNormalsMINEItem.addActionListener(this);
409
+ }
298410 stripifyItem = menu.add(new MenuItem("Stripify"));
299411 stripifyItem.addActionListener(this);
300412 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -316,23 +428,34 @@
316428 reduce34MeshItem.addActionListener(this);
317429 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
318430 increaseMeshItem.addActionListener(this);
319
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
320
- smoothMeshItem.addActionListener(this);
321431 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
322432 clipMeshItem.addActionListener(this);
433
+
434
+ if (Globals.ADVANCED)
435
+ {
436
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
437
+ smoothMeshItem.addActionListener(this);
438
+ }
323439
324440 oe.menuBar.add(menu = new Menu("Attributes"));
325441 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
326442 clearMaterialsItem.addActionListener(this);
443
+ resetAllItem = menu.add(new MenuItem("Reset All"));
444
+ resetAllItem.addActionListener(this);
445
+ stepAllItem = menu.add(new MenuItem("Step All"));
446
+ stepAllItem.addActionListener(this);
327447 menu.add("-");
328448 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
329449 liveleavesItem.addActionListener(this);
330450 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
331451 unliveleavesItem.addActionListener(this);
452
+ if (Globals.ADVANCED)
453
+ {
332454 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
333455 supportleavesItem.addActionListener(this);
334456 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
335457 unsupportleavesItem.addActionListener(this);
458
+ }
336459 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
337460 hideleavesItem.addActionListener(this);
338461 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -376,29 +499,22 @@
376499 sortbynameItem = menu.add(new MenuItem("Sort by name"));
377500 sortbynameItem.addActionListener(this);
378501 menu.add("-");
502
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
503
+ shareGeometriesItem.addActionListener(this);
504
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
505
+ mergeGeometriesItem.addActionListener(this);
506
+ if (Globals.ADVANCED)
507
+ {
508
+ // Pretty much the same as duplicate and clone.
379509 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
380510 extractGeometriesItem.addActionListener(this);
381511 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
382512 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);
513
+ }
387514
388515 oe.menuBar.add(menu = new Menu("Insert"));
389516 buildCreateMenu(menu);
390517
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
-
402518 oe.menuBar.add(menu = new Menu("Tools"));
403519 buildToolsMenu(menu);
404520 }
....@@ -433,176 +549,98 @@
433549 oe.radioPanel.add(dummyButton);
434550 oe.buttonGroup.add(dummyButton);
435551 */
436
- aConstraints.gridy += 1;
437
- oe.aConstraints.gridwidth = 1;
438
- oe.aConstraints.gridx = 0;
552
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
439553
440
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
441
- liveCB.setToolTipText("Enabled animation");
554
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
555
+ liveCB.setToolTipText("Enable animation");
442556 liveCB.addItemListener(this);
443557
444
- oe.aConstraints.gridx += 1;
445
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints);
558
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
559
+ oneStepButton.setToolTipText("Animate one step forward");
560
+ oneStepButton.addActionListener(this);
561
+
562
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
446563 fastCB.setToolTipText("Fast mode");
447564 fastCB.addItemListener(this);
448
- oe.aConstraints.gridx += 1;
449
- oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints);
450
- supportCB.setToolTipText("Enabled rigging");
451
- supportCB.addItemListener(this);
452
-
453
- // oe.aConstraints.gridx += 1;
454
- // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints);
455
- // localCB.addItemListener(this);
456
-
457
- oe.aConstraints.gridx += 1;
458
- oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), oe.aConstraints);
459
- crowdCB.setToolTipText("Used for crowds");
460
- crowdCB.addItemListener(this);
461
-
462
- oe.aConstraints.gridx += 1;
463
- oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints);
464
- smoothCB.setToolTipText("Snapping delay");
465
- smoothCB.addItemListener(this);
466
-
467
- oe.aConstraints.gridx += 1;
468
- oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints);
469
- slowCB.setToolTipText("Smooth interpolation");
470
- slowCB.addItemListener(this);
471
- oe.aConstraints.gridx += 1;
472
- oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE), oe.aConstraints);
473
- boxCB.setToolTipText("Display bounding boxes");
474
- boxCB.addItemListener(this);
475
- oe.aConstraints.gridx += 1;
476
- oe.toolbarPanel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE), oe.aConstraints);
477
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
478
- zoomBoxCB.addItemListener(this);
479
-
480
-// oe.aConstraints.gridx += 1;
481
-// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints);
482
-// speakerMocapCB.addItemListener(this);
483
-
484
- if (false)
485
- {
486
- // handled in scripts
487
- oe.aConstraints.gridx += 1;
488
- oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints);
489
- speakerCameraCB.addItemListener(this);
490
-
491
- oe.aConstraints.gridx += 1;
492
- oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints);
493
- speakerFocusCB.addItemListener(this);
494
-
495
- oe.aConstraints.gridx += 1;
496
- oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints);
497
- smoothfocusCB.addItemListener(this);
498
- }
499
-
500
-//oe.aConstraints.gridx += 1;
501
-//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints);
502
-// debugCB.addItemListener(this);
503
-
504
- oe.aConstraints.gridx += 1;
505
- oe.toolbarPanel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL), oe.aConstraints);
506
- oeilCB.addItemListener(this);
507
-
508
- oe.aConstraints.gridx += 1;
509
- oe.toolbarPanel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT), oe.aConstraints);
510
- lookAtCB.setToolTipText("Look-at target");
511
- lookAtCB.addItemListener(this);
512
-
513
- oe.aConstraints.gridx += 1;
514
- oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints);
565
+
566
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
515567 trackCB.setToolTipText("Enable tracking");
516568 trackCB.addItemListener(this);
517569
518
- oe.aConstraints.gridx += 1;
519
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
570
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
520571 screenfitButton.setToolTipText("Screen fit");
521572 screenfitButton.addActionListener(this);
522
- oe.aConstraints.gridx += 1;
573
+
523574 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
524575 // screenfitpointButton.addActionListener(this);
525
-// oe.aConstraints.gridx += 1;
526
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
527
- snapobjectButton.addActionListener(this);
528
- snapobjectButton.setToolTipText("Snap Object");
529
- oe.aConstraints.gridx += 1;
530576
531
- //aConstraints.gridx = 0;
532
- //aConstraints.gridy += 1;
533
- oe.aConstraints.weighty = 0;
534
- oe.aConstraints.gridwidth = 1;
535
-
536
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
577
+ if (Globals.ADVANCED)
578
+ {
579
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
580
+ snapobjectButton.addActionListener(this);
581
+ snapobjectButton.setToolTipText("Snap Object");
582
+ }
583
+
584
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
537585 flashSelectionButton.setToolTipText("Show selection");
538586 flashSelectionButton.addActionListener(this);
539587
540
- oe.toolbarPanel.add(new cButton(" ", false));
588
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
541589
542
- oe.aConstraints.gridx += 1;
543
- oe.aConstraints.weighty = 0;
544
- oe.aConstraints.gridwidth = 1;
545
-
546
- //
547
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
590
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
548591 twoButton.setToolTipText("Show center view only");
549592 twoButton.addActionListener(this);
550
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
593
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
551594 fourButton.addActionListener(this);
552595 fourButton.setToolTipText("Show left panel only");
553
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
596
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
554597 sixButton.setToolTipText("2-column layout left");
555598 sixButton.addActionListener(this);
556
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
599
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
557600 threeButton.setToolTipText("2-column layout right");
558601 threeButton.addActionListener(this);
559
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
602
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
560603 sevenButton.setToolTipText("3-column layout");
561604 sevenButton.addActionListener(this);
562605 //
563606
564
- oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints);
565
- rootButton.setToolTipText("Edit object in new tab");
607
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
608
+ rootButton.setToolTipText("Edit selection in new tab");
566609 rootButton.addActionListener(this);
567
- oe.aConstraints.gridx += 1;
568
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
610
+
611
+ oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
569612 closeButton.setToolTipText("Close tab");
570613 closeButton.addActionListener(this);
571614 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
572615 //clearButton.addActionListener(this);
573
- oe.aConstraints.gridx += 1;
574616
575
- oe.aConstraints.gridx = 1; //
576
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
617
+ cGridBag commandsPanel = new cGridBag();
618
+
619
+ commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
620
+ editButton.setToolTipText("Edit selection");
577621 editButton.addActionListener(this);
578
- oe.aConstraints.gridx += 1;
579
- oe.aConstraints.weighty = 0;
580
- oe.aConstraints.gridwidth = 1;
581622
582
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
623
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
624
+ uneditButton.setToolTipText("Unedit selection");
583625 uneditButton.addActionListener(this);
584626
585
- oe.aConstraints.gridx += 1;
586
- oe.aConstraints.weighty = 0;
587
- oe.aConstraints.gridwidth = 1;
588
-
589
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
590
- clearPanelButton.addActionListener(this);
591
-
592
- oe.aConstraints.gridx += 1;
593
- oe.aConstraints.weighty = 0;
594
- oe.aConstraints.gridwidth = 1;
595
-
596
- oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints);
627
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
628
+ allParamsButton.setToolTipText("Edit all params");
597629 allParamsButton.addActionListener(this);
598630
599
- oe.aConstraints.gridx += 1;
600
- oe.aConstraints.weighty = 0;
601
- oe.aConstraints.gridwidth = 1;
602
-
603
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
631
+ commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
632
+ clearPanelButton.setToolTipText("Clear edit panel");
633
+ clearPanelButton.addActionListener(this);
634
+
635
+ commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
636
+ unselectButton.setToolTipText("Unselect");
604637 unselectButton.addActionListener(this);
605638
639
+ commandsPanel.preferredHeight = 1;
640
+
641
+ oe.treePanel.add(commandsPanel);
642
+ oe.treePanel.Return();
643
+
606644 // oe.aConstraints.gridx += 1;
607645 // oe.aConstraints.weighty = 0;
608646 // oe.aConstraints.gridwidth = 1;
....@@ -614,40 +652,37 @@
614652 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
615653 // gcButton.addActionListener(this);
616654
617
- oe.aConstraints.gridx = 0;
618
- oe.aConstraints.gridy += 1;
619
-
620
- //ctrlPanel.add(objList = new List(5, true));
621
- oe.aConstraints.gridwidth = 100;
622
- // oe.aConstraints.gridheight = 100;
623
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
624
- oe.aConstraints.gridheight = 1;
625
- oe.aConstraints.weighty = 0.5;
626
- oe.aConstraints.gridx = 0;
627
- JScrollPane jSP;
655
+ cGridBag jSPPanel = new cGridBag();
656
+
657
+ JScrollPane jSP;
628658 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
629
- oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints);
659
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
630660 ResetModel();
631
- oe.aConstraints.weighty = 0.5;
632
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
633
- oe.aConstraints.gridy += 1;
634
- oe.aConstraints.gridwidth = 1;
661
+
662
+ oe.treePanel.add(jSPPanel);
663
+ oe.treePanel.Return();
635664
636
- oe.aConstraints.weighty = 0;
637
- oe.aConstraints.gridwidth = 2;
638
-
639
- oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints);
665
+ cGridBag copyOptionsPanel = new cGridBag();
666
+
667
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
668
+ colorCB.setToolTipText("Copy color when dropped");
640669 colorCB.addItemListener(this);
641
- oe.aConstraints.gridx += 2;
642
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
670
+
671
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
672
+ materialCB.setToolTipText("Copy material when dropped");
643673 materialCB.addItemListener(this);
644
- oe.aConstraints.gridx += 2;
645
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
674
+
675
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
676
+ textureCB.setToolTipText("Copy texture when dropped");
646677 textureCB.addItemListener(this);
647678
648
- oe.aConstraints.gridx = 0;
649
- oe.aConstraints.gridy += 1;
679
+ copyOptionsPanel.preferredHeight = 1;
680
+ oe.treePanel.add(copyOptionsPanel);
681
+ oe.treePanel.Return();
650682
683
+// mainPanel.setDividerLocation(0.5); //1.0);
684
+// mainPanel.setResizeWeight(0.5);
685
+
651686 //jList.addListSelectionListener(this);
652687 oe.jTree.addTreeSelectionListener(this);
653688 //jTree.setRootVisible(false);
....@@ -669,6 +704,78 @@
669704 radio.layout = sevenButton;
670705 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
671706 }
707
+
708
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
709
+ {
710
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
711
+ boxCB.setToolTipText("Display bounding boxes");
712
+ boxCB.addItemListener(this);
713
+
714
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
715
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
716
+ zoomBoxCB.addItemListener(this);
717
+
718
+ if (true) // Globals.ADVANCED)
719
+ {
720
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
721
+ supportCB.setToolTipText("Enable rigging");
722
+ supportCB.addItemListener(this);
723
+
724
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
725
+ // localCB.addItemListener(this);
726
+
727
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
728
+ crowdCB.setToolTipText("Used for crowds");
729
+ crowdCB.addItemListener(this);
730
+
731
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
732
+ smoothCB.setToolTipText("Snapping delay");
733
+ smoothCB.addItemListener(this);
734
+
735
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
736
+ slowCB.setToolTipText("Smooth interpolation");
737
+ slowCB.addItemListener(this);
738
+
739
+// constraints.gridy += 1;
740
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
741
+// speakerMocapCB.addItemListener(this);
742
+
743
+ if (false)
744
+ {
745
+ // handled in scripts
746
+ //constraints.gridy += 1;
747
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
748
+ speakerCameraCB.addItemListener(this);
749
+
750
+ //constraints.gridy += 1;
751
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
752
+ speakerFocusCB.addItemListener(this);
753
+
754
+ //constraints.gridy += 1;
755
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
756
+ smoothfocusCB.addItemListener(this);
757
+ }
758
+
759
+//constraints.gridx += 1;
760
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
761
+// debugCB.addItemListener(this);
762
+
763
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
764
+ oeilCB.addItemListener(this);
765
+
766
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
767
+ lookAtCB.setToolTipText("Look-at target");
768
+ lookAtCB.addItemListener(this);
769
+
770
+ }
771
+
772
+ cGridBag fill = new cGridBag();
773
+
774
+ fill.preferredHeight = 200;
775
+
776
+ panel.add(fill);
777
+
778
+ }
672779
673780 void EditObject(Object3D obj)
674781 {
....@@ -681,6 +788,7 @@
681788 buttonGroup.add(radioButton);
682789 radioButton.doClick();
683790 }
791
+
684792 void SetupViews(ObjEditor oe)
685793 {
686794 oe.SetupViews();
....@@ -897,7 +1005,9 @@
8971005 // objEditor.DropFile((java.io.File[]) object, true);
8981006 // return;
8991007 // }
900
- if (string.charAt(0) == '/')
1008
+
1009
+ // File path for Mac and Windows
1010
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
9011011 {
9021012 // file(s)
9031013 String[] names = string.split("\n");
....@@ -924,7 +1034,7 @@
9241034
9251035 flashIt = false;
9261036 CameraPane pane = (CameraPane) target;
927
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1037
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
9281038 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
9291039
9301040 if (group.selection.size() == 1)
....@@ -951,11 +1061,11 @@
9511061 {
9521062 loadClipboard(true);
9531063 objEditor.jTree.setSelectionPath(destinationPath);
954
- pasteInto(false);
1064
+ pasteInto(false, false);
9551065 } else {
9561066 loadClipboard(false);
9571067 objEditor.jTree.setSelectionPath(destinationPath);
958
- pasteInto(false); // true); // ???
1068
+ pasteInto(false, false); // true); // ???
9591069 }
9601070 }
9611071 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1077,27 +1187,33 @@
10771187 kleinItem.addActionListener(this);
10781188 particleItem = menu.add(new MenuItem("Particle system"));
10791189 particleItem.addActionListener(this);
1190
+ if (Globals.ADVANCED)
1191
+ {
10801192 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10811193 ragdollItem.addActionListener(this);
10821194 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10831195 ragdoll2Item.addActionListener(this);
1196
+ }
10841197 menu.add("-");
1085
- meshItem = menu.add(new MenuItem("Mesh"));
1198
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10861199 meshItem.addActionListener(this);
10871200 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10881201 // meshGroupItem.addActionListener(this);
1202
+ if (Globals.ADVANCED)
1203
+ {
10891204 springItem = menu.add(new MenuItem("Spring"));
10901205 springItem.addActionListener(this);
10911206 flagItem = menu.add(new MenuItem("Flag"));
10921207 flagItem.addActionListener(this);
1093
- bezierItem = menu.add(new MenuItem("Patch"));
1094
- bezierItem.addActionListener(this);
1095
- checkerItem = menu.add(new MenuItem("Checker"));
1096
- checkerItem.addActionListener(this);
10971208 blobItem = menu.add(new MenuItem("Blob"));
10981209 blobItem.addActionListener(this);
10991210 latheItem = menu.add(new MenuItem("Lathe"));
11001211 latheItem.addActionListener(this);
1212
+ }
1213
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1214
+ bezierItem.addActionListener(this);
1215
+ overlayItem = menu.add(new MenuItem("Overlay"));
1216
+ overlayItem.addActionListener(this);
11011217 lightItem = menu.add(new MenuItem("Light"));
11021218 lightItem.addActionListener(this);
11031219 menu.add("-");
....@@ -1107,34 +1223,39 @@
11071223 loopItem.addActionListener(this);
11081224 doubleItem = menu.add(new MenuItem("Fork"));
11091225 doubleItem.addActionListener(this);
1226
+ if (Globals.ADVANCED)
1227
+ {
11101228 tripleItem = menu.add(new MenuItem("Trident"));
11111229 tripleItem.addActionListener(this);
1230
+ }
11121231 }
11131232
11141233 void buildToolsMenu(Menu menu)
11151234 {
11161235 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
11171236 animationItem.addItemListener(this);
1118
- animationItem.setState(CameraPane.ANIMATION);
1237
+ animationItem.setState(Globals.ANIMATION);
11191238
11201239 menu.add("-");
11211240 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
11221241 parseverticesItem.addActionListener(this);
11231242 textureFieldItem = menu.add(new MenuItem("Texture Field"));
11241243 textureFieldItem.addActionListener(this);
1125
- alignItem = menu.add(new MenuItem("Align"));
1244
+ alignItem = menu.add(new MenuItem("Align Objects"));
11261245 alignItem.addActionListener(this);
1127
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1128
- mirrorItem.addActionListener(this);
11291246 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11301247 reduceMorphItem.addActionListener(this);
11311248 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11321249 reduce34MorphItem.addActionListener(this);
1133
-
1250
+ menu.add("-");
11341251 menu.add(computeAOItem = new MenuItem("Compute AO"));
11351252 computeAOItem.addActionListener(this);
1136
- menu.add("-");
11371253
1254
+ if (Globals.ADVANCED)
1255
+ {
1256
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1257
+ mirrorItem.addActionListener(this);
1258
+ menu.add("-");
11381259 menu.add(memoryItem = new MenuItem("Memory Usage"));
11391260 memoryItem.addActionListener(this);
11401261 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1157,6 +1278,7 @@
11571278 menu.add("-");
11581279 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11591280 editScriptItem.addActionListener(this);
1281
+ }
11601282 }
11611283
11621284 void ScreenFit()
....@@ -1485,9 +1607,9 @@
14851607
14861608 void Overwrite(int mask)
14871609 {
1488
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1610
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14891611 {
1490
- Object3D content = GrafreeD.clipboard.get(0);
1612
+ Object3D content = Grafreed.clipboard.get(0);
14911613
14921614 if (content instanceof cGroup && ((cGroup)content).transientlink )
14931615 content = ((cGroup)content).get(0);
....@@ -1510,6 +1632,7 @@
15101632 //
15111633 public void actionPerformed(ActionEvent event) // , Object arg)
15121634 {
1635
+ Object source = event.getSource();
15131636 /*
15141637 if (event.getSource() == nameField)
15151638 {
....@@ -1521,11 +1644,11 @@
15211644 }
15221645 else
15231646 */
1524
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1647
+ if (source == lookAtItem || source == lookFromItem)
15251648 {
15261649 ScreenFit();
15271650 } else
1528
- if (event.getSource() == switchItem)
1651
+ if (source == switchItem)
15291652 {
15301653 cVector v1 = new cVector();
15311654 cVector v2 = new cVector();
....@@ -1534,11 +1657,11 @@
15341657 objEditor.cameraView.renderCamera.setAim(v2, v1);
15351658 objEditor.cameraView.repaint();
15361659 } else
1537
- if (event.getSource() == rectoidItem)
1660
+ if (source == rectoidItem)
15381661 {
15391662 makeSomething(new Box());
15401663 } else
1541
- if (event.getSource() == particleItem)
1664
+ if (source == particleItem)
15421665 {
15431666 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15441667 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1559,9 +1682,9 @@
15591682 applyExample(particleGeom, "SMOKE");
15601683 makeSomething(particleGeom);
15611684 } else
1562
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1685
+ if (source == ragdollItem || source == ragdoll2Item)
15631686 {
1564
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1687
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15651688
15661689 ragdoll.toParent = LA.newMatrix();
15671690 ragdoll.fromParent = LA.newMatrix();
....@@ -1579,7 +1702,7 @@
15791702 } else
15801703 /*
15811704 */
1582
- if (event.getSource() == heightFieldItem)
1705
+ if (source == heightFieldItem)
15831706 {
15841707 Object3D obj = new Object3D();
15851708
....@@ -1617,31 +1740,31 @@
16171740
16181741 makeSomething(obj);
16191742 } else
1620
- if (event.getSource() == gridItem)
1743
+ if (source == gridItem)
16211744 {
16221745 makeSomething(new Grid());
16231746 } else
1624
- if (event.getSource() == ellipsoidItem)
1747
+ if (source == ellipsoidItem)
16251748 {
16261749 makeSomething(new Sphere());
16271750 } else
1628
- if (event.getSource() == coneItem)
1751
+ if (source == coneItem)
16291752 {
16301753 makeSomething(new Cone());
16311754 } else
1632
- if (event.getSource() == torusItem)
1755
+ if (source == torusItem)
16331756 {
16341757 makeSomething(new Torus());
16351758 } else
1636
- if (event.getSource() == superItem)
1759
+ if (source == superItem)
16371760 {
16381761 makeSomething(new Superellipsoid());
16391762 } else
1640
- if (event.getSource() == kleinItem)
1763
+ if (source == kleinItem)
16411764 {
16421765 makeSomething(new Klein());
16431766 } else
1644
- if (event.getSource() == blobItem)
1767
+ if (source == blobItem)
16451768 {
16461769 Blob blob = new Blob();
16471770 BlobComponent comp = new BlobComponent();
....@@ -1649,15 +1772,15 @@
16491772 //blob.retile();
16501773 makeSomething(blob);
16511774 } else
1652
- if (event.getSource() == latheItem)
1775
+ if (source == latheItem)
16531776 {
16541777 makeSomething(new Lathe());
16551778 } else
1656
- if (event.getSource() == bezierItem)
1779
+ if (source == bezierItem)
16571780 {
16581781 makeSomething(new BezierSurface());
16591782 } else
1660
- if (event.getSource() == checkerItem)
1783
+ if (source == overlayItem)
16611784 {
16621785 /*
16631786 Object3D obj = new BezierSurface(5,8);
....@@ -1672,7 +1795,7 @@
16721795 */
16731796 makeSomething(new Checker());
16741797 } else
1675
- if (event.getSource() == meshItem)
1798
+ if (source == meshItem)
16761799 {
16771800 Object3D itemtomake = new Object3D();
16781801 Object3D child;
....@@ -1693,35 +1816,35 @@
16931816 makeSomething(child);
16941817 }
16951818 } else
1696
- if (event.getSource() == springItem)
1819
+ if (source == springItem)
16971820 {
16981821 cSpring s = new cSpring();
16991822 s.setup();
17001823 makeSomething(s);
17011824 } else
1702
- if (event.getSource() == flagItem)
1825
+ if (source == flagItem)
17031826 {
17041827 cSpring s = new cFlag();
17051828 s.setup();
17061829 makeSomething(s);
17071830 } else
1708
- if (event.getSource() == lightItem)
1831
+ if (source == lightItem)
17091832 {
17101833 makeSomething(new Light());
17111834 } else
1712
- if (event.getSource() == csgItem)
1835
+ if (source == csgItem)
17131836 {
17141837 group(new CSG());
17151838 } else
1716
- if (event.getSource() == templateItem)
1839
+ if (source == templateItem)
17171840 {
17181841 group(new cTemplate());
17191842 } else
1720
- if (event.getSource() == attributeItem)
1843
+ if (source == attributeItem)
17211844 {
17221845 makeSomething(new Attribute());
17231846 } else
1724
- if (event.getSource() == pointflowItem)
1847
+ if (source == pointflowItem)
17251848 {
17261849 makeSomething(new PointFlow());
17271850 } else
....@@ -1733,7 +1856,7 @@
17331856 } else
17341857 */
17351858
1736
- if (event.getSource() == superLoopItem)
1859
+ if (source == superLoopItem)
17371860 {
17381861 Composite g = new cGroup();
17391862 for (int i=0; i<15; i++)
....@@ -1755,7 +1878,7 @@
17551878
17561879 group(g);
17571880 } else
1758
- if (event.getSource() == loopItem)
1881
+ if (source == loopItem)
17591882 {
17601883 Composite csg = new GroupLeaf();
17611884 csg.count = 5;
....@@ -1764,7 +1887,7 @@
17641887 csg.addChild(child);
17651888 child.addChild(csg);
17661889 } else
1767
- if (event.getSource() == doubleItem)
1890
+ if (source == doubleItem)
17681891 {
17691892 Composite csg = new GroupLeaf();
17701893 csg.count = 5;
....@@ -1776,7 +1899,7 @@
17761899 csg.addChild(child);
17771900 child.addChild(csg);
17781901 } else
1779
- if (event.getSource() == tripleItem)
1902
+ if (source == tripleItem)
17801903 {
17811904 Composite csg = new GroupLeaf();
17821905 csg.count = 4;
....@@ -1791,71 +1914,59 @@
17911914 csg.addChild(child);
17921915 child.addChild(csg);
17931916 } else
1794
-
1795
- if (event.getSource() == importGFDItem)
1796
- {
1797
- ImportGFD();
1798
- } else
1799
- if (event.getSource() == importVRMLX3DItem)
1800
- {
1801
- ImportVRMLX3D();
1802
- } else
1803
- if (event.getSource() == import3DSItem)
1804
- {
1805
- objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
1806
- } else
1807
- if (event.getSource() == importOBJItem)
1808
- {
1809
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1810
- } else
1811
- if (event.getSource() == computeAOItem)
1917
+ if (source == computeAOItem)
18121918 {
18131919 Globals.drawMode = CameraPane.OCCLUSION;
18141920 Globals.theRenderer.repaint();
18151921 } else
1816
- if (event.getSource() == recompileItem)
1922
+ if (source == recompileItem)
18171923 {
18181924 Recompile();
18191925 refreshContents();
18201926 } else
1821
- if (event.getSource() == editScriptItem)
1927
+ if (source == editScriptItem)
18221928 {
18231929 OpenDialog();
18241930 refreshContents();
18251931 } else
1826
- if (event.getSource() == invariantsItem)
1932
+ if (source == invariantsItem)
18271933 {
18281934 System.out.println("Invariants:");
1829
- GrafreeD.grafreeD.universe.invariants();
1935
+ Grafreed.grafreeD.universe.invariants();
18301936 } else
1831
- if (event.getSource() == memoryItem)
1937
+ if (source == memoryItem)
18321938 {
18331939 //System.out.println("Invariants:");
18341940 PrintMemory();
18351941 } else
1836
- if (event.getSource() == pathItem)
1942
+ if (source == pathItem)
18371943 {
18381944 PrintPath();
18391945 } else
1840
- if (event.getSource() == analyzeItem)
1946
+ if (source == analyzeItem)
18411947 {
18421948 AnalyzeObject();
18431949 } else
1844
- if (event.getSource() == dumpItem)
1950
+ if (source == dumpItem)
18451951 {
18461952 DumpObject();
18471953 } else
1848
- if (event.getSource() == screenfitButton)
1954
+ if (source == oneStepButton)
1955
+ {
1956
+ Globals.ONESTEP = true;
1957
+ cameraView.repaint();
1958
+ } else
1959
+ if (source == screenfitButton)
18491960 {
18501961 //Reload(lastConverter, lastFilename, true);
18511962 ScreenFit();
18521963 } else
1853
- if (event.getSource() == screenfitpointButton)
1964
+ if (source == screenfitpointButton)
18541965 {
18551966 //Reload(lastConverter, lastFilename, true);
18561967 ScreenFitPoint();
18571968 } else
1858
- if (event.getSource() == snapobjectButton)
1969
+ if (source == snapobjectButton)
18591970 {
18601971 //Reload(lastConverter, lastFilename, true);
18611972 SnapObject();
....@@ -1866,13 +1977,13 @@
18661977 // Recompile();
18671978 // refreshContents();
18681979 // } else
1869
- if (event.getSource() == gcButton)
1980
+ if (source == gcButton)
18701981 {
18711982 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18721983 System.gc();
18731984 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18741985 } else
1875
- if (event.getSource() == editLeafItem)
1986
+ if (source == editLeafItem)
18761987 {
18771988 Object3D obj;
18781989 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1886,62 +1997,66 @@
18861997 }
18871998 refreshContents(true);
18881999 } else
1889
- if (event.getSource() == openWindowItem)
2000
+ if (source == openWindowItem)
18902001 {
18912002 EditSelection(true);
18922003 } else
1893
- if (event.getSource() == cutItem || event.getSource() == clearButton)
2004
+ if (source == cutItem || source == clearButton)
18942005 {
18952006 loadClipboard(true);
18962007 } else
1897
- if (event.getSource() == duplicateItem)
2008
+ if (source == duplicateItem)
18982009 {
1899
- Object3D keep = GrafreeD.clipboard;
2010
+ Object3D keep = Grafreed.clipboard;
19002011 loadClipboard(false);
19012012 paste(false);
1902
- GrafreeD.clipboard = keep;
2013
+ Grafreed.clipboard = keep;
19032014 } else
1904
- if (event.getSource() == cloneItem)
2015
+ if (source == cloneItem)
19052016 {
19062017 CloneSelection(false);
19072018 } else
1908
- if (event.getSource() == cloneSupportItem)
2019
+ if (source == cloneSupportItem)
19092020 {
19102021 CloneSelection(true);
19112022 } else
1912
- if (event.getSource() == copyItem)
2023
+ if (source == copyItem)
19132024 {
19142025 loadClipboard(false);
19152026 } else
1916
- if (event.getSource() == pasteItem)
2027
+ if (source == pasteItem)
19172028 {
19182029 paste(false);
19192030 } else
1920
- if (event.getSource() == pasteLinkItem)
2031
+ if (source == pasteIntoItem)
19212032 {
1922
- pasteInto(false);
2033
+ pasteInto(true, false);
19232034 } else
1924
- if (event.getSource() == pasteCloneItem)
2035
+ if (source == pasteLinkItem)
19252036 {
1926
- pasteInto(true);
2037
+ pasteInto(false, false);
19272038 } else
1928
- if (event.getSource() == pasteExpandItem)
2039
+ if (source == pasteCloneItem)
2040
+ {
2041
+ pasteInto(true, true);
2042
+ } else
2043
+ if (source == pasteExpandItem)
19292044 {
19302045 paste(true);
19312046 } else
1932
- if (event.getSource() == synchronizeItem)
2047
+ if (source == synchronizeItem)
19332048 {
19342049 Overwrite(Object3D.TRANSFORM);
19352050 } else
1936
- if (event.getSource() == overwriteNameItem)
2051
+ if (source == overwriteNameItem)
19372052 {
19382053 Overwrite(Object3D.NAME);
19392054 } else
1940
- if (event.getSource() == overwriteUVItem)
2055
+ if (source == overwriteUVItem)
19412056 {
19422057 Overwrite(Object3D.UV);
19432058 } else
1944
- if (event.getSource() == overwriteMatItem)
2059
+ if (source == overwriteMatItem)
19452060 {
19462061 /* july 2015
19472062 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1961,7 +2076,7 @@
19612076
19622077 Overwrite(dropAttributes);
19632078 }
1964
- if (event.getSource() == overwriteGeoItem)
2079
+ if (source == overwriteGeoItem)
19652080 {
19662081 Overwrite(Object3D.GEOMETRY);
19672082 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1978,7 +2093,7 @@
19782093 // refreshContents();
19792094 // }
19802095 } else
1981
- if (event.getSource() == generateMeshItem)
2096
+ if (source == generateMeshItem)
19822097 {
19832098 //if (group.selection.size() == 1)
19842099 // for (int i=0; i<group.selection.size(); i++)
....@@ -1989,7 +2104,7 @@
19892104 ResetModel();
19902105 refreshContents();
19912106 } else
1992
- if (event.getSource() == extractGeometriesItem)
2107
+ if (source == extractGeometriesItem)
19932108 {
19942109 boolean one = false;
19952110
....@@ -2016,7 +2131,7 @@
20162131 ResetModel();
20172132 refreshContents();
20182133 } else
2019
- if (event.getSource() == cloneGeometriesItem)
2134
+ if (source == cloneGeometriesItem)
20202135 {
20212136 boolean one = false;
20222137
....@@ -2042,7 +2157,7 @@
20422157 ResetModel();
20432158 refreshContents();
20442159 } else
2045
- if (event.getSource() == shareGeometriesItem)
2160
+ if (source == shareGeometriesItem)
20462161 {
20472162 boolean one = false;
20482163
....@@ -2072,7 +2187,7 @@
20722187 refreshContents();
20732188 }
20742189 } else
2075
- if (event.getSource() == mergeGeometriesItem)
2190
+ if (source == mergeGeometriesItem)
20762191 {
20772192 boolean one = false;
20782193
....@@ -2102,7 +2217,7 @@
21022217 ResetModel();
21032218 refreshContents();
21042219 } else
2105
- if (event.getSource() == linkverticesItem)
2220
+ if (source == linkverticesItem)
21062221 {
21072222 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21082223 // {
....@@ -2115,9 +2230,9 @@
21152230 // group.selection.get(0).setMasterThis(content); // should be identity
21162231 // refreshContents();
21172232 // }
2118
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2233
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21192234 {
2120
- Object3D content = GrafreeD.clipboard.get(0);
2235
+ Object3D content = Grafreed.clipboard.get(0);
21212236
21222237 if (content instanceof cGroup && ((cGroup)content).transientlink )
21232238 content = ((cGroup)content).get(0);
....@@ -2125,38 +2240,38 @@
21252240 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
21262241 for (int i=0; i<group.selection.size(); i++)
21272242 {
2128
- boolean random = CameraPane.RANDOM;
2129
- CameraPane.RANDOM = false; // parse all random nodes
2243
+ boolean random = CameraPane.SWITCH;
2244
+ CameraPane.SWITCH = false; // parse all random nodes
21302245 group.selection.get(i).linkVerticesThis(content);
21312246 // group.selection.get(i).setMasterThis(content); // should be identity
2132
- CameraPane.RANDOM = random;
2247
+ CameraPane.SWITCH = random;
21332248 }
21342249 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21352250 refreshContents();
21362251 }
21372252 } else
2138
- if (event.getSource() == resetsupportItem)
2253
+ if (source == resetsupportItem)
21392254 {
21402255 for (int i=0; i<group.selection.size(); i++)
21412256 {
2142
- boolean random = CameraPane.RANDOM;
2143
- CameraPane.RANDOM = false; // parse all random nodes
2257
+ boolean random = CameraPane.SWITCH;
2258
+ CameraPane.SWITCH = false; // parse all random nodes
21442259 group.selection.get(i).linkVerticesThis(null);
2145
- CameraPane.RANDOM = random;
2260
+ CameraPane.SWITCH = random;
21462261 }
21472262
21482263 refreshContents();
21492264 } else
2150
- if (event.getSource() == relinkverticesItem)
2265
+ if (source == relinkverticesItem)
21512266 {
2152
- boolean random = CameraPane.RANDOM;
2153
- CameraPane.RANDOM = false; // parse all random nodes
2267
+ boolean random = CameraPane.SWITCH;
2268
+ CameraPane.SWITCH = false; // parse all random nodes
21542269 group.selection.RelinkToSupport();
2155
- CameraPane.RANDOM = random;
2270
+ CameraPane.SWITCH = random;
21562271
21572272 refreshContents();
21582273 } else
2159
- if (event.getSource() == resetreferencesItem)
2274
+ if (source == resetreferencesItem)
21602275 {
21612276 for (int i=0; i<group.selection.size(); i++)
21622277 {
....@@ -2165,11 +2280,11 @@
21652280
21662281 refreshContents();
21672282 } else
2168
- if (event.getSource() == setMasterItem)
2283
+ if (source == setMasterItem)
21692284 {
2170
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2285
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21712286 {
2172
- Object3D content = GrafreeD.clipboard.get(0);
2287
+ Object3D content = Grafreed.clipboard.get(0);
21732288
21742289 if (content instanceof cGroup && ((cGroup)content).transientlink )
21752290 content = ((cGroup)content).get(0);
....@@ -2178,13 +2293,13 @@
21782293 refreshContents();
21792294 }
21802295 } else
2181
- if (event.getSource() == poseMeshItem)
2296
+ if (source == poseMeshItem)
21822297 {
21832298 if (group.selection.size() == 1)
21842299 {
2185
- if (GrafreeD.clipboard.size() == 1)
2300
+ if (Grafreed.clipboard.size() == 1)
21862301 {
2187
- Object3D content = GrafreeD.clipboard.get(0);
2302
+ Object3D content = Grafreed.clipboard.get(0);
21882303
21892304 if (content instanceof cGroup && ((cGroup)content).transientlink )
21902305 content = ((cGroup)content).get(0);
....@@ -2197,19 +2312,19 @@
21972312 }
21982313
21992314 } else
2200
- if (event.getSource() == revertMeshItem)
2315
+ if (source == revertMeshItem)
22012316 {
22022317 RevertMeshes();
22032318 } else
2204
- if (event.getSource() == resetMeshItem)
2319
+ if (source == resetAllItem)
22052320 {
22062321 ResetAll();
22072322 } else
2208
- if (event.getSource() == stepAllItem)
2323
+ if (source == stepAllItem)
22092324 {
22102325 StepAll();
22112326 } else
2212
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2327
+ if (source == clearItem) // || event.getSource() == clearButton)
22132328 {
22142329 //int indices[] = jList.getSelectedIndices();
22152330 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2217,46 +2332,46 @@
22172332
22182333 ClearSelection(false);
22192334 } else
2220
- if (event.getSource() == clearAllItem)
2335
+ if (source == clearAllItem)
22212336 {
22222337 ClearSelection(true);
22232338 } else
2224
- if (event.getSource() == grabItem)
2339
+ if (source == grabItem)
22252340 {
22262341 group(new cGroup(), true);
22272342 } else
2228
- if (event.getSource() == hideItem)
2343
+ if (source == hideItem)
22292344 {
22302345 group(new HiddenObject());
22312346 } else
2232
- if (event.getSource() == frontItem)
2347
+ if (source == frontItem)
22332348 {
22342349 front();
22352350 } else
2236
- if (event.getSource() == backItem)
2351
+ if (source == backItem)
22372352 {
22382353 back();
22392354 } else
2240
- if (event.getSource() == cameraItem)
2355
+ if (source == cameraItem)
22412356 {
22422357 makeSomething(new Camera());
22432358 } else
2244
- if (event.getSource() == compositeItem)
2359
+ if (source == compositeItem)
22452360 {
22462361 group(new Composite());
22472362 } else
2248
- if (event.getSource() == randomItem)
2363
+ if (source == randomItem)
22492364 {
22502365 RandomNode random = new RandomNode();
22512366 group(random);
22522367 if (random.size() > 0)
2253
- random.name = random.get(0).name + "Rnd";
2368
+ random.name = random.get(0).name + "Switch";
22542369 } else
2255
- if (event.getSource() == physicsItem)
2370
+ if (source == physicsItem)
22562371 {
22572372 group(new PhysicsNode());
22582373 } else
2259
- if (event.getSource() == frameselectorItem)
2374
+ if (source == frameselectorItem)
22602375 {
22612376 for (int i=0; i<group.selection.size(); i++)
22622377 {
....@@ -2268,7 +2383,7 @@
22682383 ResetModel();
22692384 refreshContents();
22702385 } else
2271
- if (event.getSource() == switchGeoItem)
2386
+ if (source == switchGeoItem)
22722387 {
22732388 for (int i=0; i<group.selection.size(); i++)
22742389 {
....@@ -2280,7 +2395,7 @@
22802395 ResetModel();
22812396 refreshContents();
22822397 } else
2283
- if (event.getSource() == switchTransfoItem)
2398
+ if (source == switchTransfoItem)
22842399 {
22852400 for (int i=0; i<group.selection.size(); i++)
22862401 {
....@@ -2292,7 +2407,7 @@
22922407 ResetModel();
22932408 refreshContents();
22942409 } else
2295
- if (event.getSource() == morphItem)
2410
+ if (source == morphItem)
22962411 {
22972412 for (int i=0; i<group.selection.size(); i++)
22982413 {
....@@ -2304,7 +2419,7 @@
23042419 ResetModel();
23052420 refreshContents();
23062421 } else
2307
- if (event.getSource() == scriptNodeItem)
2422
+ if (source == scriptNodeItem)
23082423 {
23092424 boolean atleastone = false;
23102425
....@@ -2343,31 +2458,31 @@
23432458 }
23442459 }
23452460 } else
2346
- if (event.getSource() == linkerItem)
2461
+ if (source == linkerItem)
23472462 {
23482463 group(new cLinker());
23492464 } else
2350
- if (event.getSource() == textureItem)
2465
+ if (source == textureItem)
23512466 {
23522467 group(new TextureNode());
23532468 } else
2354
- if (event.getSource() == billboardItem)
2469
+ if (source == billboardItem)
23552470 {
23562471 group(new BillboardNode());
23572472 } else
2358
- if (event.getSource() == shadowXItem)
2473
+ if (source == shadowXItem)
23592474 {
23602475 CastShadow(0);
23612476 } else
2362
- if (event.getSource() == shadowYItem)
2477
+ if (source == shadowYItem)
23632478 {
23642479 CastShadow(1);
23652480 } else
2366
- if (event.getSource() == shadowZItem)
2481
+ if (source == shadowZItem)
23672482 {
23682483 CastShadow(2);
23692484 } else
2370
- if (event.getSource() == ungroupItem)
2485
+ if (source == ungroupItem)
23712486 {
23722487 //ungroup();
23732488 for (int i=0; i<group.selection.size(); i++)
....@@ -2379,179 +2494,187 @@
23792494
23802495 refreshContents();
23812496 } else
2382
- if (event.getSource() == genUVItem)
2497
+ if (source == genUVItem)
23832498 {
23842499 GenUV();
23852500 } else
2386
- if (event.getSource() == genNormalsCADItem)
2501
+ if (source == genNormalsCADItem)
23872502 {
23882503 GenNormals(true);
23892504 } else
2390
- if (event.getSource() == genNormalsMESHItem)
2505
+ if (source == genNormalsMESHItem)
23912506 {
23922507 GenNormals(true); // TODO
23932508 } else
2394
- if (event.getSource() == genNormalsORGANItem)
2509
+ if (source == genNormalsORGANItem)
23952510 {
23962511 GenNormals(false);
23972512 } else
2398
- if (event.getSource() == genNormalsMINEItem)
2513
+ if (source == genNormalsMINEItem)
23992514 {
24002515 GenNormalsMINE();
24012516 } else
2402
- if (event.getSource() == stripifyItem)
2517
+ if (source == stripifyItem)
24032518 {
24042519 Stripify();
24052520 } else
2406
- if (event.getSource() == unstripifyItem)
2521
+ if (source == unstripifyItem)
24072522 {
24082523 Unstripify();
24092524 } else
2410
- if (event.getSource() == trimItem)
2525
+ if (source == trimItem)
24112526 {
24122527 Trim();
24132528 } else
2414
- if (event.getSource() == untrimItem)
2529
+ if (source == untrimItem)
24152530 {
24162531 Untrim();
24172532 } else
2418
- if (event.getSource() == clearColorsItem)
2533
+ if (source == clearColorsItem)
24192534 {
24202535 ClearColors();
24212536 } else
2422
- if (event.getSource() == clearMaterialsItem)
2537
+ if (source == clearMaterialsItem)
24232538 {
24242539 ClearMaterials();
24252540 } else
2426
- if (event.getSource() == liveleavesItem)
2541
+ if (source == liveleavesItem)
24272542 {
24282543 LiveLeaves(true);
24292544 } else
2430
- if (event.getSource() == unliveleavesItem)
2545
+ if (source == unliveleavesItem)
24312546 {
24322547 LiveLeaves(false);
24332548 } else
2434
- if (event.getSource() == supportleavesItem)
2549
+ if (source == supportleavesItem)
24352550 {
24362551 SupportLeaves(true);
24372552 } else
2438
- if (event.getSource() == unsupportleavesItem)
2553
+ if (source == unsupportleavesItem)
24392554 {
24402555 SupportLeaves(false);
24412556 } else
2442
- if (event.getSource() == hideleavesItem)
2557
+ if (source == hideleavesItem)
24432558 {
24442559 HideLeaves(true);
24452560 } else
2446
- if (event.getSource() == showleavesItem)
2561
+ if (source == showleavesItem)
24472562 {
24482563 HideLeaves(false);
24492564 } else
2450
- if (event.getSource() == markleavesItem)
2565
+ if (source == markleavesItem)
24512566 {
24522567 MarkLeaves(true);
24532568 } else
2454
- if (event.getSource() == unmarkleavesItem)
2569
+ if (source == unmarkleavesItem)
24552570 {
24562571 MarkLeaves(false);
24572572 } else
2458
- if (event.getSource() == flipVItem)
2573
+ if (source == flipVItem)
24592574 {
24602575 FlipV(true);
24612576 } else
2462
- if (event.getSource() == unflipVItem)
2577
+ if (source == unflipVItem)
24632578 {
24642579 FlipV(false);
24652580 } else
2466
- if (event.getSource() == lowTexturesItem)
2581
+ if (source == lowTexturesItem)
24672582 {
24682583 SetTexRes(0);
24692584 } else
2470
- if (event.getSource() == normalTexturesItem)
2585
+ if (source == normalTexturesItem)
24712586 {
24722587 SetTexRes(1);
24732588 } else
2474
- if (event.getSource() == highTexturesItem)
2589
+ if (source == highTexturesItem)
24752590 {
24762591 SetTexRes(2);
24772592 } else
2478
- if (event.getSource() == veryhighTexturesItem)
2593
+ if (source == veryhighTexturesItem)
24792594 {
24802595 SetTexRes(3);
24812596 } else
2482
- if (event.getSource() == maxTexturesItem)
2597
+ if (source == maxTexturesItem)
24832598 {
24842599 SetTexRes(4);
24852600 } else
2486
- if (event.getSource() == panoTexturesItem)
2601
+ if (source == panoTexturesItem)
24872602 {
24882603 SetTexRes(5);
24892604 } else
2490
- if (event.getSource() == reverseNormalsItem)
2605
+ if (source == reverseNormalsItem)
24912606 {
24922607 ReverseNormals();
24932608 } else
2494
- if (event.getSource() == parseverticesItem)
2609
+ if (source == parseverticesItem)
24952610 {
24962611 ParseVertices();
24972612 } else
2498
- if (event.getSource() == textureFieldItem)
2613
+ if (source == textureFieldItem)
24992614 {
25002615 TextureVertices();
25012616 } else
2502
- if (event.getSource() == alignItem)
2617
+ if (source == alignItem)
25032618 {
25042619 Align();
25052620 } else
2506
- if (event.getSource() == mirrorItem)
2621
+ if (source == mirrorItem)
25072622 {
25082623 MirrorPoses();
25092624 } else
2510
- if (event.getSource() == reduceMorphItem)
2625
+ if (source == reduceMorphItem)
25112626 {
25122627 MeshReduction(false);
25132628 } else
2514
- if (event.getSource() == reduce34MorphItem)
2629
+ if (source == reduce34MorphItem)
25152630 {
25162631 MeshReduction(true);
25172632 } else
2518
- if (event.getSource() == reverseTrianglesItem)
2633
+ if (source == reverseTrianglesItem)
25192634 {
25202635 ReverseTriangles();
25212636 } else
2522
- if (event.getSource() == reduceMeshItem)
2637
+ if (source == reduceMeshItem)
25232638 {
25242639 ReduceMesh(false);
25252640 } else
2526
- if (event.getSource() == reduce34MeshItem)
2641
+ if (source == reduce34MeshItem)
25272642 {
25282643 ReduceMesh(true);
25292644 } else
2530
- if (event.getSource() == increaseMeshItem)
2645
+ if (source == increaseMeshItem)
25312646 {
25322647 IncreaseMesh();
25332648 } else
2534
- if (event.getSource() == clipMeshItem)
2649
+ if (source == clipMeshItem)
25352650 {
25362651 ClipMesh();
25372652 } else
2538
- if (event.getSource() == smoothMeshItem)
2653
+ if (source == smoothMeshItem)
25392654 {
25402655 SmoothMesh();
25412656 } else
2542
- if (event.getSource() == transformgeometryItem)
2657
+ if (source == transformGeometryItem)
25432658 {
25442659 TransformGeometry();
25452660 } else
2546
- if (event.getSource() == resetTransformItem)
2661
+ if (source == transformChildrenItem)
2662
+ {
2663
+ TransformChildren();
2664
+ } else
2665
+ if (source == resetTransformItem)
25472666 {
25482667 ResetTransform();
25492668 } else
2550
- if (event.getSource() == resetCentroidItem)
2669
+ if (source == resetCentroidItem)
25512670 {
2552
- ResetCentroid();
2671
+ ResetCentroid(true);
25532672 } else
2554
- if (event.getSource() == resetParentItem)
2673
+ if (source == resetCentroidXZItem)
2674
+ {
2675
+ ResetCentroid(false);
2676
+ } else
2677
+ if (source == resetParentItem)
25552678 {
25562679 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25572680 {
....@@ -2561,7 +2684,7 @@
25612684
25622685 refreshContents();
25632686 } else
2564
- if (event.getSource() == repairParentItem)
2687
+ if (source == repairParentItem)
25652688 {
25662689 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25672690 {
....@@ -2575,7 +2698,7 @@
25752698
25762699 refreshContents();
25772700 } else
2578
- if (event.getSource() == repairShadowItem)
2701
+ if (source == repairShadowItem)
25792702 {
25802703 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25812704 {
....@@ -2589,7 +2712,7 @@
25892712
25902713 refreshContents();
25912714 } else
2592
- if (event.getSource() == sortbysizeItem)
2715
+ if (source == sortbysizeItem)
25932716 {
25942717 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25952718 {
....@@ -2601,7 +2724,7 @@
26012724 ResetModel();
26022725 refreshContents();
26032726 } else
2604
- if (event.getSource() == sortbynameItem)
2727
+ if (source == sortbynameItem)
26052728 {
26062729 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
26072730 {
....@@ -2613,7 +2736,7 @@
26132736 ResetModel();
26142737 refreshContents();
26152738 } else
2616
- if (event.getSource() == attachPigmentItem)
2739
+ if (source == attachPigmentItem)
26172740 {
26182741 String texture = GetFile("Attach pigment");
26192742 Object3D obj;
....@@ -2625,7 +2748,7 @@
26252748
26262749 refreshContents();
26272750 } else
2628
- if (event.getSource() == detachPigmentItem)
2751
+ if (source == detachPigmentItem)
26292752 {
26302753 Object3D obj;
26312754 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2636,7 +2759,7 @@
26362759
26372760 refreshContents();
26382761 } else
2639
- if (event.getSource() == attachBumpItem)
2762
+ if (source == attachBumpItem)
26402763 {
26412764 String texture = GetFile("Attach bump");
26422765 Object3D obj;
....@@ -2648,7 +2771,7 @@
26482771
26492772 refreshContents();
26502773 } else
2651
- if (event.getSource() == detachBumpItem)
2774
+ if (source == detachBumpItem)
26522775 {
26532776 Object3D obj;
26542777 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2659,7 +2782,7 @@
26592782
26602783 refreshContents();
26612784 } else
2662
- if (event.getSource() == pigmentBumpItem)
2785
+ if (source == pigmentBumpItem)
26632786 {
26642787 Object3D obj;
26652788 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2670,158 +2793,195 @@
26702793
26712794 refreshContents();
26722795 } else
2673
- if (event.getSource() == flashSelectionButton)
2796
+ if (source == flashSelectionButton)
26742797 {
26752798 CameraPane.flash = true;
26762799 refreshContents();
26772800 } else
2678
- if (event.getSource() == oneButton)
2801
+ if (source == oneButton)
26792802 {
26802803 } else
2681
- if (event.getSource() == twoButton)
2804
+ if (source == twoButton)
26822805 {
26832806 radio.layout = twoButton;
26842807 // bug
26852808 //gridPanel.setDividerLocation(1.0);
26862809 //bigPanel.setDividerLocation(0.0);
2687
- bigThree.remove(scenePanel);
2688
- bigThree.remove(centralPanel);
2689
- bigThree.remove(XYZPanel);
2690
- aWindowConstraints.gridx = 0;
2691
- aWindowConstraints.gridy = 0;
2692
- aWindowConstraints.gridwidth = 1;
2693
- // aConstraints.gridheight = 3;
2694
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2695
- aWindowConstraints.weightx = 0;
2696
- aWindowConstraints.weighty = 1;
2697
- //bigThree.add(jtp, aWindowConstraints);
2698
- aWindowConstraints.weightx = 1;
2699
- aWindowConstraints.gridwidth = 3;
2700
- // aConstraints.gridheight = 3;
2701
- aWindowConstraints.gridx = 1;
2702
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2703
- bigThree.add(centralPanel, aWindowConstraints);
2704
- aWindowConstraints.weightx = 0;
2705
- aWindowConstraints.gridx = 4;
2706
- aWindowConstraints.gridwidth = 1;
2707
- // aConstraints.gridheight = 3;
2708
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2709
- //bigThree.add(XYZPanel, aWindowConstraints);
2710
- bigThree.revalidate();
2810
+// bigThree.remove(scenePanel);
2811
+// bigThree.remove(centralPanel);
2812
+// bigThree.remove(XYZPanel);
2813
+// aWindowConstraints.gridx = 0;
2814
+// aWindowConstraints.gridy = 0;
2815
+// aWindowConstraints.gridwidth = 1;
2816
+// // aConstraints.gridheight = 3;
2817
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2818
+// aWindowConstraints.weightx = 0;
2819
+// aWindowConstraints.weighty = 1;
2820
+// //bigThree.add(jtp, aWindowConstraints);
2821
+// aWindowConstraints.weightx = 1;
2822
+// aWindowConstraints.gridwidth = 3;
2823
+// // aConstraints.gridheight = 3;
2824
+// aWindowConstraints.gridx = 1;
2825
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2826
+// bigThree.add(centralPanel, aWindowConstraints);
2827
+// aWindowConstraints.weightx = 0;
2828
+// aWindowConstraints.gridx = 4;
2829
+// aWindowConstraints.gridwidth = 1;
2830
+// // aConstraints.gridheight = 3;
2831
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2832
+// //bigThree.add(XYZPanel, aWindowConstraints);
2833
+// scenePanel.setVisible(false);
2834
+// centralPanel.setVisible(true);
2835
+// XYZPanel.setVisible(false);
2836
+ bigThree.ClearUI();
2837
+ bigThree.add(centralPanel);
2838
+ bigThree.FlushUI();
27112839 } else
2712
- if (event.getSource() == threeButton)
2840
+ if (source == threeButton)
27132841 {
27142842 radio.layout = threeButton;
2715
- bigThree.remove(scenePanel);
2716
- bigThree.remove(centralPanel);
2717
- bigThree.remove(XYZPanel);
2718
- aWindowConstraints.gridx = 0;
2719
- aWindowConstraints.gridy = 0;
2720
- aWindowConstraints.gridwidth = 1;
2721
- // aConstraints.gridheight = 3;
2722
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2723
- aWindowConstraints.weightx = 0;
2724
- aWindowConstraints.weighty = 1;
2725
- //bigThree.add(jtp, aWindowConstraints);
2726
- aWindowConstraints.weightx = 1;
2727
- aWindowConstraints.gridwidth = 3;
2728
- // aConstraints.gridheight = 3;
2729
- aWindowConstraints.gridx = 1;
2730
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2731
- bigThree.add(centralPanel, aWindowConstraints);
2732
- aWindowConstraints.weightx = 0;
2733
- aWindowConstraints.gridx = 4;
2734
- aWindowConstraints.gridwidth = 1;
2735
- // aConstraints.gridheight = 3;
2736
- aConstraints.fill = GridBagConstraints.VERTICAL;
2737
- bigThree.add(XYZPanel, aWindowConstraints);
2738
- bigThree.revalidate();
2843
+
2844
+// bigThree.remove(scenePanel);
2845
+// bigThree.remove(centralPanel);
2846
+// bigThree.remove(XYZPanel);
2847
+// aWindowConstraints.gridx = 0;
2848
+// aWindowConstraints.gridy = 0;
2849
+// aWindowConstraints.gridwidth = 1;
2850
+// // aConstraints.gridheight = 3;
2851
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2852
+// aWindowConstraints.weightx = 0;
2853
+// aWindowConstraints.weighty = 1;
2854
+// //bigThree.add(jtp, aWindowConstraints);
2855
+// aWindowConstraints.weightx = 1;
2856
+// aWindowConstraints.gridwidth = 3;
2857
+// // aConstraints.gridheight = 3;
2858
+// aWindowConstraints.gridx = 1;
2859
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2860
+// bigThree.add(centralPanel, aWindowConstraints);
2861
+// aWindowConstraints.weightx = 0;
2862
+// aWindowConstraints.gridx = 4;
2863
+// aWindowConstraints.gridwidth = 1;
2864
+// // aConstraints.gridheight = 3;
2865
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2866
+// bigThree.add(XYZPanel, aWindowConstraints);
2867
+// bigThree.validate();
2868
+// scenePanel.setVisible(false);
2869
+// centralPanel.setVisible(true);
2870
+// XYZPanel.setVisible(true);
2871
+ bigThree.ClearUI();
2872
+ bigThree.add(centralPanel);
2873
+ bigThree.add(XYZPanel);
2874
+ bigThree.FlushUI();
27392875 } else
2740
- if (event.getSource() == fourButton)
2876
+ if (source == fourButton)
27412877 {
27422878 radio.layout = fourButton;
2743
- bigThree.remove(scenePanel);
2744
- bigThree.remove(centralPanel);
2745
- bigThree.remove(XYZPanel);
2746
- aWindowConstraints.gridx = 0;
2747
- aWindowConstraints.gridy = 0;
2748
- aWindowConstraints.gridwidth = 1;
2749
- // aWindowConstraints.gridheight = 3;
2750
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2751
- aWindowConstraints.weightx = 1;
2752
- aWindowConstraints.weighty = 1;
2753
- bigThree.add(scenePanel, aWindowConstraints);
2754
- aWindowConstraints.weightx = 1;
2755
- aWindowConstraints.gridwidth = 3;
2756
- // aConstraints.gridheight = 3;
2757
- aWindowConstraints.gridx = 1;
2758
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2759
- //bigThree.add(cameraPanel, aWindowConstraints);
2760
- aWindowConstraints.weightx = 0;
2761
- aWindowConstraints.gridx = 4;
2762
- aWindowConstraints.gridwidth = 1;
2763
- // aWindowConstraints.gridheight = 3;
2764
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2765
- //bigThree.add(XYZPanel, aWindowConstraints);
2766
- bigThree.revalidate();
2879
+
2880
+// bigThree.remove(scenePanel);
2881
+// bigThree.remove(centralPanel);
2882
+// bigThree.remove(XYZPanel);
2883
+// aWindowConstraints.gridx = 0;
2884
+// aWindowConstraints.gridy = 0;
2885
+// aWindowConstraints.gridwidth = 1;
2886
+// // aWindowConstraints.gridheight = 3;
2887
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2888
+// aWindowConstraints.weightx = 1;
2889
+// aWindowConstraints.weighty = 1;
2890
+// bigThree.add(scenePanel, aWindowConstraints);
2891
+// aWindowConstraints.weightx = 1;
2892
+// aWindowConstraints.gridwidth = 3;
2893
+// // aConstraints.gridheight = 3;
2894
+// aWindowConstraints.gridx = 1;
2895
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2896
+// //bigThree.add(cameraPanel, aWindowConstraints);
2897
+// aWindowConstraints.weightx = 0;
2898
+// aWindowConstraints.gridx = 4;
2899
+// aWindowConstraints.gridwidth = 1;
2900
+// // aWindowConstraints.gridheight = 3;
2901
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2902
+// //bigThree.add(XYZPanel, aWindowConstraints);
2903
+// bigThree.validate();
2904
+// scenePanel.setVisible(true);
2905
+// centralPanel.setVisible(false);
2906
+// XYZPanel.setVisible(false);
2907
+ bigThree.ClearUI();
2908
+ bigThree.add(scenePanel);
2909
+ bigThree.FlushUI();
27672910 } else
2768
- if (event.getSource() == sixButton)
2911
+ if (source == sixButton)
27692912 {
27702913 radio.layout = sixButton;
2771
- bigThree.remove(scenePanel);
2772
- bigThree.remove(centralPanel);
2773
- bigThree.remove(XYZPanel);
2774
- aWindowConstraints.gridx = 0;
2775
- aWindowConstraints.gridy = 0;
2776
- aWindowConstraints.gridwidth = 1;
2777
- // aConstraints.gridheight = 3;
2778
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2779
- aWindowConstraints.weightx = 0;
2780
- aWindowConstraints.weighty = 1;
2781
- bigThree.add(scenePanel, aWindowConstraints);
2782
- aWindowConstraints.weightx = 1;
2783
- aWindowConstraints.gridwidth = 3;
2784
- // aWindowConstraints.gridheight = 3;
2785
- aWindowConstraints.gridx = 1;
2786
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2787
- bigThree.add(centralPanel, aWindowConstraints);
2788
- aWindowConstraints.weightx = 0;
2789
- aWindowConstraints.gridx = 4;
2790
- aWindowConstraints.gridwidth = 1;
2791
- // aWindowConstraints.gridheight = 3;
2792
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2793
- //bigThree.add(XYZPanel, aConstraints);
2794
- bigThree.revalidate();
2914
+
2915
+// bigThree.remove(scenePanel);
2916
+// bigThree.remove(centralPanel);
2917
+// bigThree.remove(XYZPanel);
2918
+// aWindowConstraints.gridx = 0;
2919
+// aWindowConstraints.gridy = 0;
2920
+// aWindowConstraints.gridwidth = 1;
2921
+// // aConstraints.gridheight = 3;
2922
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2923
+// aWindowConstraints.weightx = 0;
2924
+// aWindowConstraints.weighty = 1;
2925
+// bigThree.add(scenePanel, aWindowConstraints);
2926
+// aWindowConstraints.weightx = 1;
2927
+// aWindowConstraints.gridwidth = 3;
2928
+// // aWindowConstraints.gridheight = 3;
2929
+// aWindowConstraints.gridx = 1;
2930
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2931
+// bigThree.add(centralPanel, aWindowConstraints);
2932
+// aWindowConstraints.weightx = 0;
2933
+// aWindowConstraints.gridx = 4;
2934
+// aWindowConstraints.gridwidth = 1;
2935
+// // aWindowConstraints.gridheight = 3;
2936
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2937
+// //bigThree.add(XYZPanel, aConstraints);
2938
+// bigThree.validate();
2939
+// scenePanel.setVisible(true);
2940
+// centralPanel.setVisible(true);
2941
+// XYZPanel.setVisible(false);
2942
+ bigThree.ClearUI();
2943
+ bigThree.add(scenePanel);
2944
+ bigThree.add(centralPanel);
2945
+ bigThree.FlushUI();
27952946 } else
2796
- if (event.getSource() == sevenButton)
2947
+ if (source == sevenButton)
27972948 {
27982949 radio.layout = sevenButton;
2799
- bigThree.remove(scenePanel);
2800
- bigThree.remove(centralPanel);
2801
- bigThree.remove(XYZPanel);
2802
- aWindowConstraints.gridx = 0;
2803
- aWindowConstraints.gridy = 0;
2804
- aWindowConstraints.gridwidth = 1;
2805
- // aWindowConstraints.gridheight = 3;
2806
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2807
- aWindowConstraints.weightx = 0;
2808
- aWindowConstraints.weighty = 1;
2809
- bigThree.add(scenePanel, aWindowConstraints);
2810
- aWindowConstraints.weightx = 1;
2811
- aWindowConstraints.gridwidth = 3;
2812
- // aWindowConstraints.gridheight = 3;
2813
- aWindowConstraints.gridx = 1;
2814
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2815
- bigThree.add(centralPanel, aWindowConstraints);
2816
- aWindowConstraints.weightx = 0;
2817
- aWindowConstraints.gridx = 4;
2818
- aWindowConstraints.gridwidth = 1;
2819
- // aConstraints.gridheight = 3;
2820
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2821
- bigThree.add(XYZPanel, aWindowConstraints);
2822
- bigThree.revalidate();
2950
+
2951
+// bigThree.remove(scenePanel);
2952
+// bigThree.remove(centralPanel);
2953
+// bigThree.remove(XYZPanel);
2954
+// aWindowConstraints.gridx = 0;
2955
+// aWindowConstraints.gridy = 0;
2956
+// aWindowConstraints.gridwidth = 1;
2957
+// // aWindowConstraints.gridheight = 3;
2958
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2959
+// aWindowConstraints.weightx = 0;
2960
+// aWindowConstraints.weighty = 1;
2961
+// bigThree.add(scenePanel, aWindowConstraints);
2962
+// aWindowConstraints.weightx = 1;
2963
+// aWindowConstraints.gridwidth = 3;
2964
+// // aWindowConstraints.gridheight = 3;
2965
+// aWindowConstraints.gridx = 1;
2966
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2967
+// bigThree.add(centralPanel, aWindowConstraints);
2968
+// aWindowConstraints.weightx = 0;
2969
+// aWindowConstraints.gridx = 4;
2970
+// aWindowConstraints.gridwidth = 1;
2971
+// // aConstraints.gridheight = 3;
2972
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2973
+// bigThree.add(XYZPanel, aWindowConstraints);
2974
+// bigThree.validate();
2975
+// scenePanel.setVisible(true);
2976
+// centralPanel.setVisible(true);
2977
+// XYZPanel.setVisible(true);
2978
+ bigThree.ClearUI();
2979
+ bigThree.add(scenePanel);
2980
+ bigThree.add(centralPanel);
2981
+ bigThree.add(XYZPanel);
2982
+ bigThree.FlushUI();
28232983 } else
2824
- if (event.getSource() == rootButton)
2984
+ if (source == rootButton)
28252985 {
28262986 Object3D obj;
28272987 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2833,7 +2993,7 @@
28332993
28342994 refreshContents(true);
28352995 } else
2836
- if (event.getSource() == closeButton)
2996
+ if (source == closeButton)
28372997 {
28382998 //System.out.println("CLOSE: " + buttonGroup.getSelection());
28392999 cRadio ab;
....@@ -2854,11 +3014,11 @@
28543014 }
28553015 refreshContents(true);
28563016 } else
2857
- if (event.getSource() == editItem || event.getSource() == editButton)
3017
+ if (source == editItem || source == editButton)
28583018 {
28593019 EditSelection(false);
28603020 } else
2861
- if (event.getSource() == uneditButton)
3021
+ if (source == uneditButton)
28623022 {
28633023 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28643024 {
....@@ -2870,12 +3030,12 @@
28703030
28713031 child.editWindow = null; // ???????????
28723032 }
2873
- objEditor.ctrlPanel.revalidate();
3033
+ objEditor.ctrlPanel.FlushUI();
28743034 //objEditor.jTree.clearSelection();
28753035 //objEditor.ResetSliders();
28763036 refreshContents(true);
28773037 } else
2878
- if (event.getSource() == clearPanelButton)
3038
+ if (source == clearPanelButton)
28793039 {
28803040 assert(copy == group);
28813041 //copy.ClearUI();
....@@ -2886,7 +3046,7 @@
28863046 listUI.clear();
28873047 refreshContents(true);
28883048 } else
2889
- if (event.getSource() == allParamsButton)
3049
+ if (source == allParamsButton)
28903050 {
28913051 assert(copy == group);
28923052
....@@ -2907,19 +3067,19 @@
29073067
29083068 refreshContents(true);
29093069 } else
2910
- if (event.getSource() == unselectButton)
3070
+ if (source == unselectButton)
29113071 {
29123072 objEditor.jTree.clearSelection();
29133073 // ?? oct 2012 GrafreeD.clipboard.clear();
29143074 objEditor.ResetSliders();
29153075 refreshContents(true);
29163076 } else
2917
- if(event.getSource() instanceof cRadio)
3077
+ if(source instanceof cRadio)
29183078 {
29193079 group.parent = keepparent;
29203080 group.attributes = 0;
29213081 //group.editWindow = null;
2922
- /*cRadio*/ radio = (cRadio)event.getSource();
3082
+ /*cRadio*/ radio = (cRadio)source;
29233083 Object3D obj = radio.GetObject();
29243084 System.out.println("Edit " + obj);
29253085 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2954,7 +3114,9 @@
29543114 frontView.object = group;
29553115 sideView.object = group;
29563116 }
2957
- group.editWindow = this;
3117
+
3118
+// fix "+" issue group.editWindow = this;
3119
+
29583120 /*
29593121 currentLayout = radio.layout;
29603122 if (currentLayout == null)
....@@ -2967,7 +3129,20 @@
29673129 //group.attributes = -1;
29683130 ResetModel();
29693131 refreshContents(true);
2970
- }
3132
+ } else if (event.getSource() == editCameraItem)
3133
+ {
3134
+ cameraView.ProtectCamera();
3135
+ cameraView.repaint();
3136
+ return;
3137
+ } else if (event.getSource() == revertCameraItem)
3138
+ {
3139
+ cameraView.RevertCamera();
3140
+ cameraView.repaint();
3141
+ return;
3142
+ // } else if (event.getSource() == textureButton)
3143
+ // {
3144
+ // return; // true;
3145
+ }
29713146 else
29723147 {
29733148 //return super.action(event, arg);
....@@ -3028,6 +3203,28 @@
30283203 refreshContents();
30293204 }
30303205
3206
+ void TransformChildren()
3207
+ {
3208
+ Object3D obj;
3209
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3210
+ {
3211
+ obj = (Object3D)e.nextElement();
3212
+ obj.KeepTextureMatrices();
3213
+ obj.TransformChildren();
3214
+ obj.RestoreTextureMatrices();
3215
+
3216
+// if (obj.parent == null)
3217
+// {
3218
+// System.out.println("NULL PARENT!");
3219
+// new Exception().printStackTrace();
3220
+// }
3221
+// else
3222
+// TouchTransform(obj);
3223
+// //obj.parent.Touch();
3224
+ }
3225
+
3226
+ refreshContents();
3227
+ }
30313228
30323229 void ResetTransform()
30333230 {
....@@ -3140,7 +3337,7 @@
31403337 refreshContents();
31413338 }
31423339
3143
- void ResetCentroid()
3340
+ void ResetCentroid(boolean full)
31443341 {
31453342 Object3D obj;
31463343 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3155,12 +3352,16 @@
31553352 LA.matIdentity(Object3D.mat);
31563353 obj.getBounds(minima, maxima, false);
31573354 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3158
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3355
+ if (full)
3356
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
31593357 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
31603358 obj.TransformMesh(Object3D.mat);
3359
+
31613360 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3162
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3361
+ if (full)
3362
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
31633363 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3364
+
31643365 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
31653366 //Object3D.mat[3][0] = -Object3D.mat[3][0];
31663367 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3226,9 +3427,9 @@
32263427 obj = (Object3D)e.nextElement();
32273428
32283429 System.out.println("Object is: " + obj);
3229
- GrafreeD.AnalyzeObject(obj);
3430
+ Grafreed.AnalyzeObject(obj);
32303431 System.out.println("Boundary rep: " + obj.bRep);
3231
- GrafreeD.AnalyzeObject(obj.bRep);
3432
+ Grafreed.AnalyzeObject(obj.bRep);
32323433
32333434 // System.err.println((size/1024) + " KB is the size of " + obj);
32343435 }
....@@ -3442,8 +3643,8 @@
34423643
34433644 void ParseVertices()
34443645 {
3445
- boolean epsequal = GrafreeD.epsequal;
3446
- GrafreeD.epsequal = true;
3646
+ boolean epsequal = Grafreed.epsequal;
3647
+ Grafreed.epsequal = true;
34473648
34483649 for (int i=0; i<group.selection.size(); i++)
34493650 {
....@@ -3468,7 +3669,7 @@
34683669 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
34693670 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
34703671
3471
- g.add(GrafreeD.clipboard);
3672
+ g.add(Grafreed.clipboard);
34723673
34733674 buffer.add(g);
34743675 }
....@@ -3483,7 +3684,7 @@
34833684 makeSomething(buffer, i==group.selection.size()-1);
34843685 }
34853686
3486
- GrafreeD.epsequal = epsequal;
3687
+ Grafreed.epsequal = epsequal;
34873688
34883689 refreshContents();
34893690 }
....@@ -3501,7 +3702,16 @@
35013702 String pigment = Object3D.GetPigment(tex);
35023703 //String bump = Object3D.GetBump(tex);
35033704
3504
- com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3705
+ com.sun.opengl.util.texture.TextureData texturedata = null;
3706
+
3707
+ try
3708
+ {
3709
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3710
+ }
3711
+ catch (Exception e)
3712
+ {
3713
+ System.err.println("FAIL: " + node);
3714
+ }
35053715
35063716 double s = v.s;
35073717
....@@ -3589,11 +3799,11 @@
35893799
35903800 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
35913801
3592
- boolean random = CameraPane.RANDOM;
3593
- CameraPane.RANDOM = false; // parse all random nodes
3802
+ boolean random = CameraPane.SWITCH;
3803
+ CameraPane.SWITCH = false; // parse all random nodes
35943804 lowres.linkVerticesThis(null);
35953805 lowres.linkVerticesThis(sn);
3596
- CameraPane.RANDOM = random;
3806
+ CameraPane.SWITCH = random;
35973807
35983808 System.err.flush();
35993809
....@@ -3633,7 +3843,7 @@
36333843 return;
36343844
36353845 Object3D poses = group.selection.get(0);
3636
- Object3D ref = GrafreeD.clipboard.get(0);
3846
+ Object3D ref = Grafreed.clipboard.get(0);
36373847
36383848 Object3D newgroup = new Object3D("Po:" + poses.name);
36393849
....@@ -3827,9 +4037,9 @@
38274037
38284038 void ClipMesh()
38294039 {
3830
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
4040
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
38314041 {
3832
- Object3D content = GrafreeD.clipboard.get(0);
4042
+ Object3D content = Grafreed.clipboard.get(0);
38334043
38344044 if (content instanceof cGroup && ((cGroup)content).transientlink )
38354045 content = ((cGroup)content).get(0);
....@@ -3838,7 +4048,7 @@
38384048 // {
38394049 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
38404050 // }
3841
- group.selection.ClipMesh(GrafreeD.clipboard);
4051
+ group.selection.ClipMesh(Grafreed.clipboard);
38424052 }
38434053 // group.selection.ClipMesh(GrafreeD.clipboard);
38444054 System.out.println("DONE.");
....@@ -3973,7 +4183,7 @@
39734183 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
39744184
39754185 Object3D elem = (Object3D)group.selection.elementAt(i);
3976
- if(elem != group)
4186
+ if(elem != group || !newWindow)
39774187 {
39784188 // if (!(elem instanceof Composite))
39794189 // newWindow = false;
....@@ -4078,12 +4288,12 @@
40784288 System.err.println("info : " + child.GetPath());
40794289 }
40804290 }
4081
- else
4082
- {
4083
- objEditor.SetMaterial(group); // .GetMaterial());
4084
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4085
- System.err.println("info : " + group.GetPath());
4086
- }
4291
+// else
4292
+// {
4293
+// objEditor.SetMaterial(group); // .GetMaterial());
4294
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4295
+// System.err.println("info : " + group.GetPath());
4296
+// }
40874297
40884298 objEditor.SetText(); // jan 2014
40894299
....@@ -4178,12 +4388,12 @@
41784388 {
41794389 if (group.selection.isEmpty())
41804390 return;
4181
- GrafreeD.clipboardIsTempGroup = false;
4391
+ Grafreed.clipboardIsTempGroup = false;
41824392 Composite tGroup = null;
41834393 if (group.selection.size() > 0) // 1)
41844394 {
41854395 tGroup = new cGroup();
4186
- GrafreeD.clipboardIsTempGroup = true;
4396
+ Grafreed.clipboardIsTempGroup = true;
41874397 }
41884398
41894399 if (cut)
....@@ -4223,16 +4433,16 @@
42234433 //System.out.println("cut " + child);
42244434 //System.out.println("parent = " + child.parent);
42254435 // tmp.addChild(child);
4226
- if (GrafreeD.clipboardIsTempGroup)
4436
+ if (Grafreed.clipboardIsTempGroup)
42274437 tGroup.add/*Child*/(tmp);
42284438 else
4229
- GrafreeD.clipboard = tmp;
4439
+ Grafreed.clipboard = tmp;
42304440 }
42314441 else
4232
- if (GrafreeD.clipboardIsTempGroup)
4442
+ if (Grafreed.clipboardIsTempGroup)
42334443 tGroup.add/*Child*/(child);
42344444 else
4235
- GrafreeD.clipboard = child;
4445
+ Grafreed.clipboard = child;
42364446 }
42374447
42384448 //ResetModel();
....@@ -4264,21 +4474,21 @@
42644474 //System.out.println("cut " + elem);
42654475 //System.out.println("parent = " + elem.parent);
42664476 // tmp.addChild(elem);
4267
- if (GrafreeD.clipboardIsTempGroup)
4477
+ if (Grafreed.clipboardIsTempGroup)
42684478 tGroup.add/*Child*/(tmp);
42694479 else
4270
- GrafreeD.clipboard = tmp;
4480
+ Grafreed.clipboard = tmp;
42714481 }
42724482 else
4273
- if (GrafreeD.clipboardIsTempGroup)
4483
+ if (Grafreed.clipboardIsTempGroup)
42744484 tGroup.add/*Child*/(child);
42754485 else
4276
- GrafreeD.clipboard = child;
4486
+ Grafreed.clipboard = child;
42774487 }
42784488
42794489 }
4280
- if (GrafreeD.clipboardIsTempGroup)
4281
- GrafreeD.clipboard = tGroup;
4490
+ if (Grafreed.clipboardIsTempGroup)
4491
+ Grafreed.clipboard = tGroup;
42824492 if (cut)
42834493 {
42844494 ResetModel();
....@@ -4292,7 +4502,7 @@
42924502 // return;
42934503 boolean first = true;
42944504
4295
- if (GrafreeD.clipboardIsTempGroup)
4505
+ if (Grafreed.clipboardIsTempGroup)
42964506 {
42974507 Composite temp;
42984508
....@@ -4303,7 +4513,7 @@
43034513 temp = (Composite)Applet3D.clipboard.deepCopy();
43044514 */
43054515 Object3D elem;
4306
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4516
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
43074517 {
43084518 Object3D child = (Object3D)e.nextElement();
43094519
....@@ -4337,21 +4547,21 @@
43374547 //Object3D cb = Applet3D.clipboard;
43384548 //temp.addChild(cb);
43394549 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4340
- assert(GrafreeD.clipboard.parent == null);
4341
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4342
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4343
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4344
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
4550
+ assert(Grafreed.clipboard.parent == null);
4551
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4552
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4553
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4554
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
43454555 else
4346
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4347
- GrafreeD.clipboard.get(0).parent = keepparent;
4556
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4557
+ Grafreed.clipboard.get(0).parent = keepparent;
43484558 }
43494559
43504560 ResetModel();
43514561 refreshContents();
43524562 }
43534563
4354
- void pasteInto(boolean copyit)
4564
+ void pasteInto(boolean copyit, boolean clone)
43554565 {
43564566 // if (GrafreeD.clipboard == null)
43574567 // return;
....@@ -4380,15 +4590,22 @@
43804590 if (copyit)
43814591 {
43824592 // paste(false);
4383
- CloneClipboard(false); // sept 2014
4593
+ if (clone)
4594
+ {
4595
+ CloneClipboard(false); // sept 2014
4596
+ }
4597
+ else
4598
+ {
4599
+ paste(false);
4600
+ }
43844601 }
43854602 else
43864603 {
43874604 boolean first = true;
43884605
4389
- if (GrafreeD.clipboardIsTempGroup)
4606
+ if (Grafreed.clipboardIsTempGroup)
43904607 {
4391
- Composite temp = (Composite)GrafreeD.clipboard;
4608
+ Composite temp = (Composite)Grafreed.clipboard;
43924609 Object3D copy;
43934610 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
43944611 {
....@@ -4398,7 +4615,7 @@
43984615 }
43994616 } else
44004617 {
4401
- linkSomething(GrafreeD.clipboard); //.get(0));
4618
+ linkSomething(Grafreed.clipboard); //.get(0));
44024619 }
44034620 }
44044621 }
....@@ -4803,21 +5020,6 @@
48035020 }
48045021 */
48055022
4806
- void ImportGFD()
4807
- {
4808
- FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
4809
- browser.show();
4810
- String filename = browser.getFile();
4811
- if (filename != null && filename.length() > 0)
4812
- {
4813
- String fullname = browser.getDirectory() + filename;
4814
-
4815
- //Object3D readobj =
4816
- objEditor.ReadGFD(fullname, objEditor);
4817
- //makeSomething(readobj);
4818
- }
4819
- }
4820
-
48215023 /*
48225024 public void Callback(Object obj)
48235025 {
....@@ -4841,26 +5043,9 @@
48415043 }
48425044 */
48435045
4844
- void ImportVRMLX3D()
4845
- {
4846
- if (GrafreeD.standAlone)
4847
- {
4848
- /**/
4849
- FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
4850
- browser.show();
4851
- String filename = browser.getFile();
4852
- if (filename != null && filename.length() > 0)
4853
- {
4854
- String fullname = browser.getDirectory() + filename;
4855
- LoadVRMLX3D(fullname);
4856
- }
4857
- /**/
4858
- }
4859
- }
4860
-
48615046 String GetFile(String dialogName)
48625047 {
4863
- if (GrafreeD.standAlone)
5048
+ if (Grafreed.standAlone)
48645049 {
48655050 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
48665051 browser.show();
....@@ -4924,10 +5109,12 @@
49245109 cButton flashSelectionButton;
49255110 cButton editButton;
49265111 cButton uneditButton;
5112
+ JCheckBox allParamsButton;
49275113 cButton clearpanelButton;
4928
- cButton allParamsButton;
49295114 cButton unselectButton;
49305115
5116
+ cButton oneStepButton;
5117
+
49315118 cButton screenfitButton;
49325119 cButton screenfitpointButton;
49335120 cButton snapobjectButton;
....@@ -4971,7 +5158,7 @@
49715158 private MenuItem linkverticesItem;
49725159 private MenuItem relinkverticesItem;
49735160 private MenuItem setMasterItem;
4974
- private MenuItem resetMeshItem;
5161
+ private MenuItem resetAllItem;
49755162 private MenuItem stepAllItem;
49765163 private MenuItem revertMeshItem;
49775164 private MenuItem poseMeshItem;
....@@ -4982,6 +5169,7 @@
49825169 private MenuItem mergeGeometriesItem;
49835170 private MenuItem copyItem;
49845171 private MenuItem pasteItem;
5172
+ private MenuItem pasteIntoItem;
49855173 private MenuItem pasteLinkItem;
49865174 private MenuItem pasteCloneItem;
49875175 private MenuItem pasteExpandItem;
....@@ -5031,8 +5219,10 @@
50315219 private MenuItem panoTexturesItem;
50325220
50335221 private MenuItem resetCentroidItem;
5034
- private MenuItem transformgeometryItem;
5222
+ private MenuItem resetCentroidXZItem;
50355223 private MenuItem resetTransformItem;
5224
+ private MenuItem transformGeometryItem;
5225
+ private MenuItem transformChildrenItem;
50365226 private MenuItem hideItem;
50375227 private MenuItem grabItem;
50385228 private MenuItem backItem;
....@@ -5079,7 +5269,7 @@
50795269 private MenuItem blobItem;
50805270 private MenuItem latheItem;
50815271 private MenuItem bezierItem;
5082
- private MenuItem checkerItem;
5272
+ private MenuItem overlayItem;
50835273 private MenuItem meshItem;
50845274 // private MenuItem meshGroupItem;
50855275 private MenuItem springItem;
....@@ -5101,11 +5291,6 @@
51015291 private MenuItem doubleItem;
51025292 private MenuItem tripleItem;
51035293
5104
- private MenuItem importGFDItem;
5105
- private MenuItem importVRMLX3DItem;
5106
- private MenuItem import3DSItem;
5107
- private MenuItem importOBJItem;
5108
-
51095294 private MenuItem computeAOItem;
51105295 private MenuItem recompileItem;
51115296 private MenuItem editScriptItem;
....@@ -5115,4 +5300,8 @@
51155300 private MenuItem analyzeItem;
51165301 private MenuItem dumpItem;
51175302 //boolean freezemodel = false;
5303
+
5304
+ Menu cameraMenu;
5305
+ MenuItem editCameraItem;
5306
+ MenuItem revertCameraItem;
51185307 }