Normand Briere
2019-06-09 8558ae86e65457c512a26339d3660d79eee16ae6
GroupEditor.java
....@@ -12,6 +12,7 @@
1212 import com.jme.math.Vector3f;
1313 import com.jme.renderer.ColorRGBA;
1414
15
+import grafeme.ui.*;
1516 //import buoy.widget.BFileChooser;
1617
1718 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
....@@ -73,7 +74,7 @@
7374 this.copy = this.group = copy;
7475 //selectees = this.group.selectees;
7576
76
- SetupMenu2(objEditor);
77
+ SetupMenu2(this); //objEditor);
7778 SetupUI2(objEditor);
7879 objEditor.SetupUI(true);
7980 SetupViews(objEditor);
....@@ -97,14 +98,14 @@
9798
9899 void CloneClipboard(boolean supports)
99100 {
100
- assert(GrafreeD.clipboard.parent == null);
101
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
102
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
103
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
104
- makeSomething(CloneObject(GrafreeD.clipboard.get(0), false));
101
+ assert(Grafreed.clipboard.parent == null);
102
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
103
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
104
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
105
+ makeSomething(CloneObject(Grafreed.clipboard.get(0), false));
105106 else
106
- makeSomething(CloneObject(GrafreeD.clipboard, false));
107
- GrafreeD.clipboard.get(0).parent = keepparent;
107
+ makeSomething(CloneObject(Grafreed.clipboard, false));
108
+ Grafreed.clipboard.get(0).parent = keepparent;
108109 }
109110
110111 static Object3D CloneObject(Object3D obj, boolean supports)
....@@ -118,7 +119,7 @@
118119 // obj.support = null;
119120 if (!supports)
120121 obj.SaveSupports();
121
- Object3D clone = (Object3D)GrafreeD.clone(obj);
122
+ Object3D clone = (Object3D)Grafreed.clone(obj);
122123 obj.parent = parent;
123124 // obj.support = support;
124125 // clone.support = support; // aout 2013
....@@ -147,8 +148,129 @@
147148
148149 //JTextField nameField;
149150
150
- void SetupMenu2(ObjEditor oe)
151
+ void SetupMenu2(GroupEditor oe)
151152 {
153
+ Menu menu;
154
+ oe.menuBar.add(menu = new Menu("Edit"));
155
+ //editItem = menu.add(new MenuItem("Edit"));
156
+ //editItem.addActionListener(this);
157
+ undoItem = menu.add(new MenuItem("Undo"));
158
+ undoItem.addActionListener(this);
159
+ redoItem = menu.add(new MenuItem("Redo"));
160
+ redoItem.addActionListener(this);
161
+ menu.add("-");
162
+ duplicateItem = menu.add(new MenuItem("Duplicate"));
163
+ duplicateItem.addActionListener(this);
164
+ cloneItem = menu.add(new MenuItem("Clone"));
165
+ cloneItem.addActionListener(this);
166
+ if (Globals.ADVANCED)
167
+ {
168
+ cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
169
+ cloneSupportItem.addActionListener(this);
170
+ }
171
+ menu.add("-");
172
+ cutItem = menu.add(new MenuItem("Cut"));
173
+ cutItem.addActionListener(this);
174
+ copyItem = menu.add(new MenuItem("Copy"));
175
+ copyItem.addActionListener(this);
176
+ pasteItem = menu.add(new MenuItem("Paste"));
177
+ pasteItem.addActionListener(this);
178
+ menu.add("-");
179
+
180
+ menu.add("-");
181
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
182
+ pasteIntoItem.addActionListener(this);
183
+ pasteLinkItem = menu.add(new MenuItem("Paste link"));
184
+ pasteLinkItem.addActionListener(this);
185
+ pasteCloneItem = menu.add(new MenuItem("Paste clone"));
186
+ pasteCloneItem.addActionListener(this);
187
+// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
188
+// pasteExpandItem.addActionListener(this);
189
+ menu.add("-");
190
+ clearItem = menu.add(new MenuItem("Clear"));
191
+ clearItem.addActionListener(this);
192
+
193
+ if (Globals.ADVANCED)
194
+ {
195
+ // Deletes the cameras...
196
+ clearAllItem = menu.add(new MenuItem("Clear All"));
197
+ clearAllItem.addActionListener(this);
198
+ }
199
+
200
+ menuBar.add(cameraMenu = new Menu("View"));
201
+ //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
202
+ //zBufferItem.addActionListener(this);
203
+ //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
204
+ //normalLensItem.addActionListener(this);
205
+ cameraMenu.add(revertCameraItem = new MenuItem("Restore Camera"));
206
+ revertCameraItem.addActionListener(this);
207
+
208
+ cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
209
+ toggleFullScreenItem.addItemListener(this);
210
+ toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
211
+ cameraMenu.add("-");
212
+
213
+ cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
214
+ toggleTextureItem.addItemListener(this);
215
+ toggleTextureItem.setState(CameraPane.textureon);
216
+
217
+ cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
218
+ toggleSwitchItem.addItemListener(this);
219
+ toggleSwitchItem.setState(CameraPane.SWITCH);
220
+
221
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
222
+ toggleHandleItem.addItemListener(this);
223
+ toggleHandleItem.setState(CameraPane.HANDLES);
224
+
225
+ cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
226
+ togglePaintItem.addItemListener(this);
227
+ togglePaintItem.setState(CameraPane.PAINTMODE);
228
+
229
+ if (Globals.ADVANCED)
230
+ {
231
+ cameraMenu.add("-");
232
+ cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
233
+ toggleLiveItem.addItemListener(this);
234
+ toggleLiveItem.setState(Globals.isLIVE());
235
+
236
+ cameraMenu.add(stepItem = new MenuItem("Step"));
237
+ stepItem.addActionListener(this);
238
+ // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
239
+ // toggleDLItem.addItemListener(this);
240
+ // toggleDLItem.setState(false);
241
+
242
+ cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
243
+ toggleRenderItem.addItemListener(this);
244
+ toggleRenderItem.setState(!CameraPane.frozen);
245
+
246
+ cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
247
+ toggleDebugItem.addItemListener(this);
248
+ toggleDebugItem.setState(CameraPane.DEBUG);
249
+
250
+ cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
251
+ toggleFrustumItem.addItemListener(this);
252
+ toggleFrustumItem.setState(CameraPane.FRUSTUM);
253
+
254
+ cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
255
+ toggleFootContactItem.addItemListener(this);
256
+ toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
257
+
258
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
259
+ toggleTimelineItem.addItemListener(this);
260
+ }
261
+
262
+// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
263
+// toggleRootItem.addItemListener(this);
264
+// toggleRootItem.setState(false);
265
+// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
266
+// animationItem.addItemListener(this);
267
+// animationItem.setState(CameraPane.ANIMATION);
268
+ cameraMenu.add("-");
269
+ cameraMenu.add(editCameraItem = new MenuItem("Save Camera"));
270
+ editCameraItem.addActionListener(this);
271
+
272
+ if (Globals.ADVANCED)
273
+ {
152274 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
153275 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
154276 //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
....@@ -160,45 +282,17 @@
160282 lookAtItem.addActionListener(this);
161283 //lookFromItem.addActinoListener(this);
162284 //switchItem.addActionListener(this);
163
- Menu menu;
164
- oe.menuBar.add(menu = new Menu("Edit"));
165
- //editItem = menu.add(new MenuItem("Edit"));
166
- //editItem.addActionListener(this);
167
- duplicateItem = menu.add(new MenuItem("Duplicate"));
168
- duplicateItem.addActionListener(this);
169
- menu.add("-");
170
- cloneItem = menu.add(new MenuItem("Clone"));
171
- cloneItem.addActionListener(this);
172
- cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
173
- cloneSupportItem.addActionListener(this);
174
- menu.add("-");
175
- cutItem = menu.add(new MenuItem("Cut"));
176
- cutItem.addActionListener(this);
177
- copyItem = menu.add(new MenuItem("Copy"));
178
- copyItem.addActionListener(this);
179
- pasteItem = menu.add(new MenuItem("Paste"));
180
- pasteItem.addActionListener(this);
181
- pasteLinkItem = menu.add(new MenuItem("Paste link"));
182
- pasteLinkItem.addActionListener(this);
183
- pasteCloneItem = menu.add(new MenuItem("Paste clone"));
184
- pasteCloneItem.addActionListener(this);
185
-// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
186
-// pasteExpandItem.addActionListener(this);
187
- clearItem = menu.add(new MenuItem("Clear"));
188
- clearItem.addActionListener(this);
189
- clearAllItem = menu.add(new MenuItem("Clear All"));
190
- clearAllItem.addActionListener(this);
191
-
285
+ }
286
+
192287 oe.menuBar.add(menu = new Menu("Setting"));
193
- resetMeshItem = menu.add(new MenuItem("Reset All"));
194
- resetMeshItem.addActionListener(this);
195
- stepAllItem = menu.add(new MenuItem("Step All"));
196
- stepAllItem.addActionListener(this);
288
+ if (Globals.ADVANCED)
289
+ {
197290 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
198291 revertMeshItem.addActionListener(this);
199292 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
200293 resetreferencesItem.addActionListener(this);
201294 menu.add("-");
295
+ }
202296 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
203297 overwriteGeoItem.addActionListener(this);
204298 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -210,19 +304,26 @@
210304 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
211305 overwriteUVItem.addActionListener(this);
212306 menu.add("-");
307
+ if (Globals.ADVANCED)
308
+ {
213309 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
214310 generateMeshItem.addActionListener(this);
215311 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
216312 poseMeshItem.addActionListener(this);
217313 menu.add("-");
314
+ }
218315 resetsupportItem = menu.add(new MenuItem("Reset support"));
219316 resetsupportItem.addActionListener(this);
220317 linkverticesItem = menu.add(new MenuItem("Link to Support"));
221318 linkverticesItem.addActionListener(this);
222319 relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
223320 relinkverticesItem.addActionListener(this);
321
+
322
+ if (Globals.ADVANCED)
323
+ {
224324 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
225325 setMasterItem.addActionListener(this);
326
+ }
226327
227328 oe.menuBar.add(menu = new Menu("Group"));
228329 grabItem = menu.add(new MenuItem("Grab"));
....@@ -233,27 +334,32 @@
233334 frontItem.addActionListener(this);
234335 compositeItem = menu.add(new MenuItem("Composite"));
235336 compositeItem.addActionListener(this);
236
- hideItem = menu.add(new MenuItem("Hide"));
337
+ hideItem = menu.add(new MenuItem("Hidden Group"));
237338 hideItem.addActionListener(this);
238339 ungroupItem = menu.add(new MenuItem("Ungroup"));
239340 ungroupItem.addActionListener(this);
240341 menu.add("-");
241
- randomItem = menu.add(new MenuItem("Random"));
342
+ randomItem = menu.add(new MenuItem("Switch node"));
242343 randomItem.addActionListener(this);
243
- physicsItem = menu.add(new MenuItem("Physics"));
244
- physicsItem.addActionListener(this);
245
- frameselectorItem = menu.add(new MenuItem("Frame Selector"));
246
- frameselectorItem.addActionListener(this);
247344 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
248345 switchGeoItem.addActionListener(this);
249346 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
250347 switchTransfoItem.addActionListener(this);
251
- morphItem = menu.add(new MenuItem("Morph"));
348
+ morphItem = menu.add(new MenuItem("Morph Group"));
252349 morphItem.addActionListener(this);
350
+
351
+ if (Globals.ADVANCED)
352
+ {
353
+ menu.add("-");
354
+ physicsItem = menu.add(new MenuItem("Physics"));
355
+ physicsItem.addActionListener(this);
356
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
357
+ frameselectorItem.addActionListener(this);
253358 scriptNodeItem = menu.add(new MenuItem("Script Node"));
254359 scriptNodeItem.addActionListener(this);
255360 cameraItem = menu.add(new MenuItem("Camera"));
256361 cameraItem.addActionListener(this);
362
+ }
257363
258364 oe.menuBar.add(menu = new Menu("Object"));
259365 textureItem = menu.add(new MenuItem("Texture"));
....@@ -268,21 +374,29 @@
268374 shadowYItem.addActionListener(this);
269375 shadowZItem = menu.add(new MenuItem("Shadow Z"));
270376 shadowZItem.addActionListener(this);
377
+ if (Globals.ADVANCED)
378
+ {
379
+ menu.add("-");
271380 linkerItem = menu.add(new MenuItem("Linker"));
272381 linkerItem.addActionListener(this);
273
- templateItem = menu.add(new MenuItem("Template"));
274
- templateItem.addActionListener(this);
275382 attributeItem = menu.add(new MenuItem("Attribute"));
276383 attributeItem.addActionListener(this);
384
+ templateItem = menu.add(new MenuItem("Template"));
385
+ templateItem.addActionListener(this);
277386 pointflowItem = menu.add(new MenuItem("Point Flow"));
278387 pointflowItem.addActionListener(this);
388
+ }
279389 menu.add("-");
280390 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
281391 resetTransformItem.addActionListener(this);
282392 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
283393 resetCentroidItem.addActionListener(this);
284
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
285
- transformgeometryItem.addActionListener(this);
394
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
395
+ resetCentroidXZItem.addActionListener(this);
396
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
397
+ transformGeometryItem.addActionListener(this);
398
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
399
+ transformChildrenItem.addActionListener(this);
286400
287401 oe.menuBar.add(menu = new Menu("Geometry"));
288402 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -293,8 +407,11 @@
293407 genNormalsCADItem.addActionListener(this);
294408 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
295409 genNormalsMESHItem.addActionListener(this);
410
+ if (Globals.ADVANCED)
411
+ {
296412 genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
297413 genNormalsMINEItem.addActionListener(this);
414
+ }
298415 stripifyItem = menu.add(new MenuItem("Stripify"));
299416 stripifyItem.addActionListener(this);
300417 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -316,23 +433,34 @@
316433 reduce34MeshItem.addActionListener(this);
317434 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
318435 increaseMeshItem.addActionListener(this);
319
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
320
- smoothMeshItem.addActionListener(this);
321436 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
322437 clipMeshItem.addActionListener(this);
438
+
439
+ if (Globals.ADVANCED)
440
+ {
441
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
442
+ smoothMeshItem.addActionListener(this);
443
+ }
323444
324445 oe.menuBar.add(menu = new Menu("Attributes"));
325446 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
326447 clearMaterialsItem.addActionListener(this);
448
+ resetAllItem = menu.add(new MenuItem("Reset All"));
449
+ resetAllItem.addActionListener(this);
450
+ stepAllItem = menu.add(new MenuItem("Step All"));
451
+ stepAllItem.addActionListener(this);
327452 menu.add("-");
328453 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
329454 liveleavesItem.addActionListener(this);
330455 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
331456 unliveleavesItem.addActionListener(this);
457
+ if (Globals.ADVANCED)
458
+ {
332459 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
333460 supportleavesItem.addActionListener(this);
334461 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
335462 unsupportleavesItem.addActionListener(this);
463
+ }
336464 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
337465 hideleavesItem.addActionListener(this);
338466 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -376,29 +504,22 @@
376504 sortbynameItem = menu.add(new MenuItem("Sort by name"));
377505 sortbynameItem.addActionListener(this);
378506 menu.add("-");
507
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
508
+ shareGeometriesItem.addActionListener(this);
509
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
510
+ mergeGeometriesItem.addActionListener(this);
511
+ if (Globals.ADVANCED)
512
+ {
513
+ // Pretty much the same as duplicate and clone.
379514 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
380515 extractGeometriesItem.addActionListener(this);
381516 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
382517 cloneGeometriesItem.addActionListener(this);
383
- shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
384
- shareGeometriesItem.addActionListener(this);
385
- mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
386
- mergeGeometriesItem.addActionListener(this);
518
+ }
387519
388520 oe.menuBar.add(menu = new Menu("Insert"));
389521 buildCreateMenu(menu);
390522
391
-
392
- oe.menuBar.add(menu = new Menu("Include"));
393
- importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
394
- importGFDItem.addActionListener(this);
395
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
396
- importVRMLX3DItem.addActionListener(this);
397
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
398
- importOBJItem.addActionListener(this);
399
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
400
- import3DSItem.addActionListener(this);
401
-
402523 oe.menuBar.add(menu = new Menu("Tools"));
403524 buildToolsMenu(menu);
404525 }
....@@ -433,176 +554,98 @@
433554 oe.radioPanel.add(dummyButton);
434555 oe.buttonGroup.add(dummyButton);
435556 */
436
- aConstraints.gridy += 1;
437
- oe.aConstraints.gridwidth = 1;
438
- oe.aConstraints.gridx = 0;
557
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
439558
440
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
441
- liveCB.setToolTipText("Enabled animation");
559
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
560
+ liveCB.setToolTipText("Enable animation");
442561 liveCB.addItemListener(this);
443562
444
- oe.aConstraints.gridx += 1;
445
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints);
563
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
564
+ oneStepButton.setToolTipText("Animate one step forward");
565
+ oneStepButton.addActionListener(this);
566
+
567
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
446568 fastCB.setToolTipText("Fast mode");
447569 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);
570
+
571
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
515572 trackCB.setToolTipText("Enable tracking");
516573 trackCB.addItemListener(this);
517574
518
- oe.aConstraints.gridx += 1;
519
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
575
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
520576 screenfitButton.setToolTipText("Screen fit");
521577 screenfitButton.addActionListener(this);
522
- oe.aConstraints.gridx += 1;
578
+
523579 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
524580 // 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;
530581
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);
582
+ if (Globals.ADVANCED)
583
+ {
584
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
585
+ snapobjectButton.addActionListener(this);
586
+ snapobjectButton.setToolTipText("Snap Object");
587
+ }
588
+
589
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
537590 flashSelectionButton.setToolTipText("Show selection");
538591 flashSelectionButton.addActionListener(this);
539592
540
- oe.toolbarPanel.add(new cButton(" ", false));
593
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
541594
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);
595
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
548596 twoButton.setToolTipText("Show center view only");
549597 twoButton.addActionListener(this);
550
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
598
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
551599 fourButton.addActionListener(this);
552600 fourButton.setToolTipText("Show left panel only");
553
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
601
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
554602 sixButton.setToolTipText("2-column layout left");
555603 sixButton.addActionListener(this);
556
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
604
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
557605 threeButton.setToolTipText("2-column layout right");
558606 threeButton.addActionListener(this);
559
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
607
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
560608 sevenButton.setToolTipText("3-column layout");
561609 sevenButton.addActionListener(this);
562610 //
563611
564
- oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints);
565
- rootButton.setToolTipText("Edit object in new tab");
612
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
613
+ rootButton.setToolTipText("Edit selection in new tab");
566614 rootButton.addActionListener(this);
567
- oe.aConstraints.gridx += 1;
568
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
615
+
616
+ oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
569617 closeButton.setToolTipText("Close tab");
570618 closeButton.addActionListener(this);
571619 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
572620 //clearButton.addActionListener(this);
573
- oe.aConstraints.gridx += 1;
574621
575
- oe.aConstraints.gridx = 1; //
576
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
622
+ cGridBag commandsPanel = new cGridBag();
623
+
624
+ commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
625
+ editButton.setToolTipText("Edit selection");
577626 editButton.addActionListener(this);
578
- oe.aConstraints.gridx += 1;
579
- oe.aConstraints.weighty = 0;
580
- oe.aConstraints.gridwidth = 1;
581627
582
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
628
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
629
+ uneditButton.setToolTipText("Unedit selection");
583630 uneditButton.addActionListener(this);
584631
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);
632
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
633
+ allParamsButton.setToolTipText("Edit all params");
597634 allParamsButton.addActionListener(this);
598635
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);
636
+ commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
637
+ clearPanelButton.setToolTipText("Clear edit panel");
638
+ clearPanelButton.addActionListener(this);
639
+
640
+ commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
641
+ unselectButton.setToolTipText("Unselect");
604642 unselectButton.addActionListener(this);
605643
644
+ commandsPanel.preferredHeight = 1;
645
+
646
+ oe.treePanel.add(commandsPanel);
647
+ oe.treePanel.Return();
648
+
606649 // oe.aConstraints.gridx += 1;
607650 // oe.aConstraints.weighty = 0;
608651 // oe.aConstraints.gridwidth = 1;
....@@ -614,40 +657,37 @@
614657 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
615658 // gcButton.addActionListener(this);
616659
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;
660
+ cGridBag jSPPanel = new cGridBag();
661
+
662
+ JScrollPane jSP;
628663 //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);
664
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
630665 ResetModel();
631
- oe.aConstraints.weighty = 0.5;
632
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
633
- oe.aConstraints.gridy += 1;
634
- oe.aConstraints.gridwidth = 1;
666
+
667
+ oe.treePanel.add(jSPPanel);
668
+ oe.treePanel.Return();
635669
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);
670
+ cGridBag copyOptionsPanel = new cGridBag();
671
+
672
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
673
+ colorCB.setToolTipText("Copy color when dropped");
640674 colorCB.addItemListener(this);
641
- oe.aConstraints.gridx += 2;
642
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
675
+
676
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
677
+ materialCB.setToolTipText("Copy material when dropped");
643678 materialCB.addItemListener(this);
644
- oe.aConstraints.gridx += 2;
645
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
679
+
680
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
681
+ textureCB.setToolTipText("Copy texture when dropped");
646682 textureCB.addItemListener(this);
647683
648
- oe.aConstraints.gridx = 0;
649
- oe.aConstraints.gridy += 1;
684
+ copyOptionsPanel.preferredHeight = 1;
685
+ oe.treePanel.add(copyOptionsPanel);
686
+ oe.treePanel.Return();
650687
688
+// mainPanel.setDividerLocation(0.5); //1.0);
689
+// mainPanel.setResizeWeight(0.5);
690
+
651691 //jList.addListSelectionListener(this);
652692 oe.jTree.addTreeSelectionListener(this);
653693 //jTree.setRootVisible(false);
....@@ -669,6 +709,78 @@
669709 radio.layout = sevenButton;
670710 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
671711 }
712
+
713
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
714
+ {
715
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
716
+ boxCB.setToolTipText("Display bounding boxes");
717
+ boxCB.addItemListener(this);
718
+
719
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
720
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
721
+ zoomBoxCB.addItemListener(this);
722
+
723
+ if (true) // Globals.ADVANCED)
724
+ {
725
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
726
+ supportCB.setToolTipText("Enable rigging");
727
+ supportCB.addItemListener(this);
728
+
729
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
730
+ // localCB.addItemListener(this);
731
+
732
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
733
+ crowdCB.setToolTipText("Used for crowds");
734
+ crowdCB.addItemListener(this);
735
+
736
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
737
+ smoothCB.setToolTipText("Snapping delay");
738
+ smoothCB.addItemListener(this);
739
+
740
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
741
+ slowCB.setToolTipText("Smooth interpolation");
742
+ slowCB.addItemListener(this);
743
+
744
+// constraints.gridy += 1;
745
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
746
+// speakerMocapCB.addItemListener(this);
747
+
748
+ if (false)
749
+ {
750
+ // handled in scripts
751
+ //constraints.gridy += 1;
752
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
753
+ speakerCameraCB.addItemListener(this);
754
+
755
+ //constraints.gridy += 1;
756
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
757
+ speakerFocusCB.addItemListener(this);
758
+
759
+ //constraints.gridy += 1;
760
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
761
+ smoothfocusCB.addItemListener(this);
762
+ }
763
+
764
+//constraints.gridx += 1;
765
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
766
+// debugCB.addItemListener(this);
767
+
768
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
769
+ oeilCB.addItemListener(this);
770
+
771
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
772
+ lookAtCB.setToolTipText("Look-at target");
773
+ lookAtCB.addItemListener(this);
774
+
775
+ }
776
+
777
+ cGridBag fill = new cGridBag();
778
+
779
+ fill.preferredHeight = 200;
780
+
781
+ panel.add(fill);
782
+
783
+ }
672784
673785 void EditObject(Object3D obj)
674786 {
....@@ -681,6 +793,7 @@
681793 buttonGroup.add(radioButton);
682794 radioButton.doClick();
683795 }
796
+
684797 void SetupViews(ObjEditor oe)
685798 {
686799 oe.SetupViews();
....@@ -897,7 +1010,9 @@
8971010 // objEditor.DropFile((java.io.File[]) object, true);
8981011 // return;
8991012 // }
900
- if (string.charAt(0) == '/')
1013
+
1014
+ // File path for Mac and Windows
1015
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
9011016 {
9021017 // file(s)
9031018 String[] names = string.split("\n");
....@@ -924,7 +1039,7 @@
9241039
9251040 flashIt = false;
9261041 CameraPane pane = (CameraPane) target;
927
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1042
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
9281043 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
9291044
9301045 if (group.selection.size() == 1)
....@@ -951,11 +1066,11 @@
9511066 {
9521067 loadClipboard(true);
9531068 objEditor.jTree.setSelectionPath(destinationPath);
954
- pasteInto(false);
1069
+ pasteInto(false, false);
9551070 } else {
9561071 loadClipboard(false);
9571072 objEditor.jTree.setSelectionPath(destinationPath);
958
- pasteInto(false); // true); // ???
1073
+ pasteInto(false, false); // true); // ???
9591074 }
9601075 }
9611076 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1077,27 +1192,33 @@
10771192 kleinItem.addActionListener(this);
10781193 particleItem = menu.add(new MenuItem("Particle system"));
10791194 particleItem.addActionListener(this);
1195
+ if (Globals.ADVANCED)
1196
+ {
10801197 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10811198 ragdollItem.addActionListener(this);
10821199 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10831200 ragdoll2Item.addActionListener(this);
1201
+ }
10841202 menu.add("-");
1085
- meshItem = menu.add(new MenuItem("Mesh"));
1203
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10861204 meshItem.addActionListener(this);
10871205 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10881206 // meshGroupItem.addActionListener(this);
1207
+ if (Globals.ADVANCED)
1208
+ {
10891209 springItem = menu.add(new MenuItem("Spring"));
10901210 springItem.addActionListener(this);
10911211 flagItem = menu.add(new MenuItem("Flag"));
10921212 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);
10971213 blobItem = menu.add(new MenuItem("Blob"));
10981214 blobItem.addActionListener(this);
10991215 latheItem = menu.add(new MenuItem("Lathe"));
11001216 latheItem.addActionListener(this);
1217
+ }
1218
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1219
+ bezierItem.addActionListener(this);
1220
+ overlayItem = menu.add(new MenuItem("Overlay"));
1221
+ overlayItem.addActionListener(this);
11011222 lightItem = menu.add(new MenuItem("Light"));
11021223 lightItem.addActionListener(this);
11031224 menu.add("-");
....@@ -1107,34 +1228,39 @@
11071228 loopItem.addActionListener(this);
11081229 doubleItem = menu.add(new MenuItem("Fork"));
11091230 doubleItem.addActionListener(this);
1231
+ if (Globals.ADVANCED)
1232
+ {
11101233 tripleItem = menu.add(new MenuItem("Trident"));
11111234 tripleItem.addActionListener(this);
1235
+ }
11121236 }
11131237
11141238 void buildToolsMenu(Menu menu)
11151239 {
11161240 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
11171241 animationItem.addItemListener(this);
1118
- animationItem.setState(CameraPane.ANIMATION);
1242
+ animationItem.setState(Globals.ANIMATION);
11191243
11201244 menu.add("-");
11211245 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
11221246 parseverticesItem.addActionListener(this);
11231247 textureFieldItem = menu.add(new MenuItem("Texture Field"));
11241248 textureFieldItem.addActionListener(this);
1125
- alignItem = menu.add(new MenuItem("Align"));
1249
+ alignItem = menu.add(new MenuItem("Align Objects"));
11261250 alignItem.addActionListener(this);
1127
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1128
- mirrorItem.addActionListener(this);
11291251 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11301252 reduceMorphItem.addActionListener(this);
11311253 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11321254 reduce34MorphItem.addActionListener(this);
1133
-
1255
+ menu.add("-");
11341256 menu.add(computeAOItem = new MenuItem("Compute AO"));
11351257 computeAOItem.addActionListener(this);
1136
- menu.add("-");
11371258
1259
+ if (Globals.ADVANCED)
1260
+ {
1261
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1262
+ mirrorItem.addActionListener(this);
1263
+ menu.add("-");
11381264 menu.add(memoryItem = new MenuItem("Memory Usage"));
11391265 memoryItem.addActionListener(this);
11401266 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1157,6 +1283,7 @@
11571283 menu.add("-");
11581284 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11591285 editScriptItem.addActionListener(this);
1286
+ }
11601287 }
11611288
11621289 void ScreenFit()
....@@ -1485,9 +1612,9 @@
14851612
14861613 void Overwrite(int mask)
14871614 {
1488
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1615
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14891616 {
1490
- Object3D content = GrafreeD.clipboard.get(0);
1617
+ Object3D content = Grafreed.clipboard.get(0);
14911618
14921619 if (content instanceof cGroup && ((cGroup)content).transientlink )
14931620 content = ((cGroup)content).get(0);
....@@ -1510,6 +1637,7 @@
15101637 //
15111638 public void actionPerformed(ActionEvent event) // , Object arg)
15121639 {
1640
+ Object source = event.getSource();
15131641 /*
15141642 if (event.getSource() == nameField)
15151643 {
....@@ -1521,11 +1649,11 @@
15211649 }
15221650 else
15231651 */
1524
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1652
+ if (source == lookAtItem || source == lookFromItem)
15251653 {
15261654 ScreenFit();
15271655 } else
1528
- if (event.getSource() == switchItem)
1656
+ if (source == switchItem)
15291657 {
15301658 cVector v1 = new cVector();
15311659 cVector v2 = new cVector();
....@@ -1534,11 +1662,11 @@
15341662 objEditor.cameraView.renderCamera.setAim(v2, v1);
15351663 objEditor.cameraView.repaint();
15361664 } else
1537
- if (event.getSource() == rectoidItem)
1665
+ if (source == rectoidItem)
15381666 {
15391667 makeSomething(new Box());
15401668 } else
1541
- if (event.getSource() == particleItem)
1669
+ if (source == particleItem)
15421670 {
15431671 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15441672 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1559,9 +1687,9 @@
15591687 applyExample(particleGeom, "SMOKE");
15601688 makeSomething(particleGeom);
15611689 } else
1562
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1690
+ if (source == ragdollItem || source == ragdoll2Item)
15631691 {
1564
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1692
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15651693
15661694 ragdoll.toParent = LA.newMatrix();
15671695 ragdoll.fromParent = LA.newMatrix();
....@@ -1579,7 +1707,7 @@
15791707 } else
15801708 /*
15811709 */
1582
- if (event.getSource() == heightFieldItem)
1710
+ if (source == heightFieldItem)
15831711 {
15841712 Object3D obj = new Object3D();
15851713
....@@ -1617,31 +1745,31 @@
16171745
16181746 makeSomething(obj);
16191747 } else
1620
- if (event.getSource() == gridItem)
1748
+ if (source == gridItem)
16211749 {
16221750 makeSomething(new Grid());
16231751 } else
1624
- if (event.getSource() == ellipsoidItem)
1752
+ if (source == ellipsoidItem)
16251753 {
16261754 makeSomething(new Sphere());
16271755 } else
1628
- if (event.getSource() == coneItem)
1756
+ if (source == coneItem)
16291757 {
16301758 makeSomething(new Cone());
16311759 } else
1632
- if (event.getSource() == torusItem)
1760
+ if (source == torusItem)
16331761 {
16341762 makeSomething(new Torus());
16351763 } else
1636
- if (event.getSource() == superItem)
1764
+ if (source == superItem)
16371765 {
16381766 makeSomething(new Superellipsoid());
16391767 } else
1640
- if (event.getSource() == kleinItem)
1768
+ if (source == kleinItem)
16411769 {
16421770 makeSomething(new Klein());
16431771 } else
1644
- if (event.getSource() == blobItem)
1772
+ if (source == blobItem)
16451773 {
16461774 Blob blob = new Blob();
16471775 BlobComponent comp = new BlobComponent();
....@@ -1649,15 +1777,15 @@
16491777 //blob.retile();
16501778 makeSomething(blob);
16511779 } else
1652
- if (event.getSource() == latheItem)
1780
+ if (source == latheItem)
16531781 {
16541782 makeSomething(new Lathe());
16551783 } else
1656
- if (event.getSource() == bezierItem)
1784
+ if (source == bezierItem)
16571785 {
16581786 makeSomething(new BezierSurface());
16591787 } else
1660
- if (event.getSource() == checkerItem)
1788
+ if (source == overlayItem)
16611789 {
16621790 /*
16631791 Object3D obj = new BezierSurface(5,8);
....@@ -1672,7 +1800,7 @@
16721800 */
16731801 makeSomething(new Checker());
16741802 } else
1675
- if (event.getSource() == meshItem)
1803
+ if (source == meshItem)
16761804 {
16771805 Object3D itemtomake = new Object3D();
16781806 Object3D child;
....@@ -1693,35 +1821,35 @@
16931821 makeSomething(child);
16941822 }
16951823 } else
1696
- if (event.getSource() == springItem)
1824
+ if (source == springItem)
16971825 {
16981826 cSpring s = new cSpring();
16991827 s.setup();
17001828 makeSomething(s);
17011829 } else
1702
- if (event.getSource() == flagItem)
1830
+ if (source == flagItem)
17031831 {
17041832 cSpring s = new cFlag();
17051833 s.setup();
17061834 makeSomething(s);
17071835 } else
1708
- if (event.getSource() == lightItem)
1836
+ if (source == lightItem)
17091837 {
17101838 makeSomething(new Light());
17111839 } else
1712
- if (event.getSource() == csgItem)
1840
+ if (source == csgItem)
17131841 {
17141842 group(new CSG());
17151843 } else
1716
- if (event.getSource() == templateItem)
1844
+ if (source == templateItem)
17171845 {
17181846 group(new cTemplate());
17191847 } else
1720
- if (event.getSource() == attributeItem)
1848
+ if (source == attributeItem)
17211849 {
17221850 makeSomething(new Attribute());
17231851 } else
1724
- if (event.getSource() == pointflowItem)
1852
+ if (source == pointflowItem)
17251853 {
17261854 makeSomething(new PointFlow());
17271855 } else
....@@ -1733,7 +1861,7 @@
17331861 } else
17341862 */
17351863
1736
- if (event.getSource() == superLoopItem)
1864
+ if (source == superLoopItem)
17371865 {
17381866 Composite g = new cGroup();
17391867 for (int i=0; i<15; i++)
....@@ -1755,7 +1883,7 @@
17551883
17561884 group(g);
17571885 } else
1758
- if (event.getSource() == loopItem)
1886
+ if (source == loopItem)
17591887 {
17601888 Composite csg = new GroupLeaf();
17611889 csg.count = 5;
....@@ -1764,7 +1892,7 @@
17641892 csg.addChild(child);
17651893 child.addChild(csg);
17661894 } else
1767
- if (event.getSource() == doubleItem)
1895
+ if (source == doubleItem)
17681896 {
17691897 Composite csg = new GroupLeaf();
17701898 csg.count = 5;
....@@ -1776,7 +1904,7 @@
17761904 csg.addChild(child);
17771905 child.addChild(csg);
17781906 } else
1779
- if (event.getSource() == tripleItem)
1907
+ if (source == tripleItem)
17801908 {
17811909 Composite csg = new GroupLeaf();
17821910 csg.count = 4;
....@@ -1791,71 +1919,59 @@
17911919 csg.addChild(child);
17921920 child.addChild(csg);
17931921 } 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)
1922
+ if (source == computeAOItem)
18121923 {
18131924 Globals.drawMode = CameraPane.OCCLUSION;
18141925 Globals.theRenderer.repaint();
18151926 } else
1816
- if (event.getSource() == recompileItem)
1927
+ if (source == recompileItem)
18171928 {
18181929 Recompile();
18191930 refreshContents();
18201931 } else
1821
- if (event.getSource() == editScriptItem)
1932
+ if (source == editScriptItem)
18221933 {
18231934 OpenDialog();
18241935 refreshContents();
18251936 } else
1826
- if (event.getSource() == invariantsItem)
1937
+ if (source == invariantsItem)
18271938 {
18281939 System.out.println("Invariants:");
1829
- GrafreeD.grafreeD.universe.invariants();
1940
+ Grafreed.grafreeD.universe.invariants();
18301941 } else
1831
- if (event.getSource() == memoryItem)
1942
+ if (source == memoryItem)
18321943 {
18331944 //System.out.println("Invariants:");
18341945 PrintMemory();
18351946 } else
1836
- if (event.getSource() == pathItem)
1947
+ if (source == pathItem)
18371948 {
18381949 PrintPath();
18391950 } else
1840
- if (event.getSource() == analyzeItem)
1951
+ if (source == analyzeItem)
18411952 {
18421953 AnalyzeObject();
18431954 } else
1844
- if (event.getSource() == dumpItem)
1955
+ if (source == dumpItem)
18451956 {
18461957 DumpObject();
18471958 } else
1848
- if (event.getSource() == screenfitButton)
1959
+ if (source == oneStepButton)
1960
+ {
1961
+ Globals.ONESTEP = true;
1962
+ cameraView.repaint();
1963
+ } else
1964
+ if (source == screenfitButton)
18491965 {
18501966 //Reload(lastConverter, lastFilename, true);
18511967 ScreenFit();
18521968 } else
1853
- if (event.getSource() == screenfitpointButton)
1969
+ if (source == screenfitpointButton)
18541970 {
18551971 //Reload(lastConverter, lastFilename, true);
18561972 ScreenFitPoint();
18571973 } else
1858
- if (event.getSource() == snapobjectButton)
1974
+ if (source == snapobjectButton)
18591975 {
18601976 //Reload(lastConverter, lastFilename, true);
18611977 SnapObject();
....@@ -1866,13 +1982,13 @@
18661982 // Recompile();
18671983 // refreshContents();
18681984 // } else
1869
- if (event.getSource() == gcButton)
1985
+ if (source == gcButton)
18701986 {
18711987 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18721988 System.gc();
18731989 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18741990 } else
1875
- if (event.getSource() == editLeafItem)
1991
+ if (source == editLeafItem)
18761992 {
18771993 Object3D obj;
18781994 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1886,62 +2002,74 @@
18862002 }
18872003 refreshContents(true);
18882004 } else
1889
- if (event.getSource() == openWindowItem)
2005
+ if (source == openWindowItem)
18902006 {
18912007 EditSelection(true);
18922008 } else
1893
- if (event.getSource() == cutItem || event.getSource() == clearButton)
2009
+ if (source == cutItem || source == clearButton)
18942010 {
18952011 loadClipboard(true);
18962012 } else
1897
- if (event.getSource() == duplicateItem)
2013
+ if (source == undoItem)
18982014 {
1899
- Object3D keep = GrafreeD.clipboard;
2015
+ Undo();
2016
+ } else
2017
+ if (source == redoItem)
2018
+ {
2019
+ Redo();
2020
+ } else
2021
+ if (source == duplicateItem)
2022
+ {
2023
+ Object3D keep = Grafreed.clipboard;
19002024 loadClipboard(false);
19012025 paste(false);
1902
- GrafreeD.clipboard = keep;
2026
+ Grafreed.clipboard = keep;
19032027 } else
1904
- if (event.getSource() == cloneItem)
2028
+ if (source == cloneItem)
19052029 {
19062030 CloneSelection(false);
19072031 } else
1908
- if (event.getSource() == cloneSupportItem)
2032
+ if (source == cloneSupportItem)
19092033 {
19102034 CloneSelection(true);
19112035 } else
1912
- if (event.getSource() == copyItem)
2036
+ if (source == copyItem)
19132037 {
19142038 loadClipboard(false);
19152039 } else
1916
- if (event.getSource() == pasteItem)
2040
+ if (source == pasteItem)
19172041 {
19182042 paste(false);
19192043 } else
1920
- if (event.getSource() == pasteLinkItem)
2044
+ if (source == pasteIntoItem)
19212045 {
1922
- pasteInto(false);
2046
+ pasteInto(true, false);
19232047 } else
1924
- if (event.getSource() == pasteCloneItem)
2048
+ if (source == pasteLinkItem)
19252049 {
1926
- pasteInto(true);
2050
+ pasteInto(false, false);
19272051 } else
1928
- if (event.getSource() == pasteExpandItem)
2052
+ if (source == pasteCloneItem)
2053
+ {
2054
+ pasteInto(true, true);
2055
+ } else
2056
+ if (source == pasteExpandItem)
19292057 {
19302058 paste(true);
19312059 } else
1932
- if (event.getSource() == synchronizeItem)
2060
+ if (source == synchronizeItem)
19332061 {
19342062 Overwrite(Object3D.TRANSFORM);
19352063 } else
1936
- if (event.getSource() == overwriteNameItem)
2064
+ if (source == overwriteNameItem)
19372065 {
19382066 Overwrite(Object3D.NAME);
19392067 } else
1940
- if (event.getSource() == overwriteUVItem)
2068
+ if (source == overwriteUVItem)
19412069 {
19422070 Overwrite(Object3D.UV);
19432071 } else
1944
- if (event.getSource() == overwriteMatItem)
2072
+ if (source == overwriteMatItem)
19452073 {
19462074 /* july 2015
19472075 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1961,7 +2089,7 @@
19612089
19622090 Overwrite(dropAttributes);
19632091 }
1964
- if (event.getSource() == overwriteGeoItem)
2092
+ if (source == overwriteGeoItem)
19652093 {
19662094 Overwrite(Object3D.GEOMETRY);
19672095 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1978,7 +2106,7 @@
19782106 // refreshContents();
19792107 // }
19802108 } else
1981
- if (event.getSource() == generateMeshItem)
2109
+ if (source == generateMeshItem)
19822110 {
19832111 //if (group.selection.size() == 1)
19842112 // for (int i=0; i<group.selection.size(); i++)
....@@ -1989,7 +2117,7 @@
19892117 ResetModel();
19902118 refreshContents();
19912119 } else
1992
- if (event.getSource() == extractGeometriesItem)
2120
+ if (source == extractGeometriesItem)
19932121 {
19942122 boolean one = false;
19952123
....@@ -2016,7 +2144,7 @@
20162144 ResetModel();
20172145 refreshContents();
20182146 } else
2019
- if (event.getSource() == cloneGeometriesItem)
2147
+ if (source == cloneGeometriesItem)
20202148 {
20212149 boolean one = false;
20222150
....@@ -2042,7 +2170,7 @@
20422170 ResetModel();
20432171 refreshContents();
20442172 } else
2045
- if (event.getSource() == shareGeometriesItem)
2173
+ if (source == shareGeometriesItem)
20462174 {
20472175 boolean one = false;
20482176
....@@ -2072,7 +2200,7 @@
20722200 refreshContents();
20732201 }
20742202 } else
2075
- if (event.getSource() == mergeGeometriesItem)
2203
+ if (source == mergeGeometriesItem)
20762204 {
20772205 boolean one = false;
20782206
....@@ -2102,7 +2230,7 @@
21022230 ResetModel();
21032231 refreshContents();
21042232 } else
2105
- if (event.getSource() == linkverticesItem)
2233
+ if (source == linkverticesItem)
21062234 {
21072235 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21082236 // {
....@@ -2115,9 +2243,9 @@
21152243 // group.selection.get(0).setMasterThis(content); // should be identity
21162244 // refreshContents();
21172245 // }
2118
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2246
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21192247 {
2120
- Object3D content = GrafreeD.clipboard.get(0);
2248
+ Object3D content = Grafreed.clipboard.get(0);
21212249
21222250 if (content instanceof cGroup && ((cGroup)content).transientlink )
21232251 content = ((cGroup)content).get(0);
....@@ -2125,38 +2253,38 @@
21252253 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
21262254 for (int i=0; i<group.selection.size(); i++)
21272255 {
2128
- boolean random = CameraPane.RANDOM;
2129
- CameraPane.RANDOM = false; // parse all random nodes
2256
+ boolean random = CameraPane.SWITCH;
2257
+ CameraPane.SWITCH = false; // parse all random nodes
21302258 group.selection.get(i).linkVerticesThis(content);
21312259 // group.selection.get(i).setMasterThis(content); // should be identity
2132
- CameraPane.RANDOM = random;
2260
+ CameraPane.SWITCH = random;
21332261 }
21342262 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21352263 refreshContents();
21362264 }
21372265 } else
2138
- if (event.getSource() == resetsupportItem)
2266
+ if (source == resetsupportItem)
21392267 {
21402268 for (int i=0; i<group.selection.size(); i++)
21412269 {
2142
- boolean random = CameraPane.RANDOM;
2143
- CameraPane.RANDOM = false; // parse all random nodes
2270
+ boolean random = CameraPane.SWITCH;
2271
+ CameraPane.SWITCH = false; // parse all random nodes
21442272 group.selection.get(i).linkVerticesThis(null);
2145
- CameraPane.RANDOM = random;
2273
+ CameraPane.SWITCH = random;
21462274 }
21472275
21482276 refreshContents();
21492277 } else
2150
- if (event.getSource() == relinkverticesItem)
2278
+ if (source == relinkverticesItem)
21512279 {
2152
- boolean random = CameraPane.RANDOM;
2153
- CameraPane.RANDOM = false; // parse all random nodes
2280
+ boolean random = CameraPane.SWITCH;
2281
+ CameraPane.SWITCH = false; // parse all random nodes
21542282 group.selection.RelinkToSupport();
2155
- CameraPane.RANDOM = random;
2283
+ CameraPane.SWITCH = random;
21562284
21572285 refreshContents();
21582286 } else
2159
- if (event.getSource() == resetreferencesItem)
2287
+ if (source == resetreferencesItem)
21602288 {
21612289 for (int i=0; i<group.selection.size(); i++)
21622290 {
....@@ -2165,11 +2293,11 @@
21652293
21662294 refreshContents();
21672295 } else
2168
- if (event.getSource() == setMasterItem)
2296
+ if (source == setMasterItem)
21692297 {
2170
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2298
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21712299 {
2172
- Object3D content = GrafreeD.clipboard.get(0);
2300
+ Object3D content = Grafreed.clipboard.get(0);
21732301
21742302 if (content instanceof cGroup && ((cGroup)content).transientlink )
21752303 content = ((cGroup)content).get(0);
....@@ -2178,13 +2306,13 @@
21782306 refreshContents();
21792307 }
21802308 } else
2181
- if (event.getSource() == poseMeshItem)
2309
+ if (source == poseMeshItem)
21822310 {
21832311 if (group.selection.size() == 1)
21842312 {
2185
- if (GrafreeD.clipboard.size() == 1)
2313
+ if (Grafreed.clipboard.size() == 1)
21862314 {
2187
- Object3D content = GrafreeD.clipboard.get(0);
2315
+ Object3D content = Grafreed.clipboard.get(0);
21882316
21892317 if (content instanceof cGroup && ((cGroup)content).transientlink )
21902318 content = ((cGroup)content).get(0);
....@@ -2197,19 +2325,19 @@
21972325 }
21982326
21992327 } else
2200
- if (event.getSource() == revertMeshItem)
2328
+ if (source == revertMeshItem)
22012329 {
22022330 RevertMeshes();
22032331 } else
2204
- if (event.getSource() == resetMeshItem)
2332
+ if (source == resetAllItem)
22052333 {
22062334 ResetAll();
22072335 } else
2208
- if (event.getSource() == stepAllItem)
2336
+ if (source == stepAllItem)
22092337 {
22102338 StepAll();
22112339 } else
2212
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2340
+ if (source == clearItem) // || event.getSource() == clearButton)
22132341 {
22142342 //int indices[] = jList.getSelectedIndices();
22152343 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2217,46 +2345,46 @@
22172345
22182346 ClearSelection(false);
22192347 } else
2220
- if (event.getSource() == clearAllItem)
2348
+ if (source == clearAllItem)
22212349 {
22222350 ClearSelection(true);
22232351 } else
2224
- if (event.getSource() == grabItem)
2352
+ if (source == grabItem)
22252353 {
22262354 group(new cGroup(), true);
22272355 } else
2228
- if (event.getSource() == hideItem)
2356
+ if (source == hideItem)
22292357 {
22302358 group(new HiddenObject());
22312359 } else
2232
- if (event.getSource() == frontItem)
2360
+ if (source == frontItem)
22332361 {
22342362 front();
22352363 } else
2236
- if (event.getSource() == backItem)
2364
+ if (source == backItem)
22372365 {
22382366 back();
22392367 } else
2240
- if (event.getSource() == cameraItem)
2368
+ if (source == cameraItem)
22412369 {
22422370 makeSomething(new Camera());
22432371 } else
2244
- if (event.getSource() == compositeItem)
2372
+ if (source == compositeItem)
22452373 {
22462374 group(new Composite());
22472375 } else
2248
- if (event.getSource() == randomItem)
2376
+ if (source == randomItem)
22492377 {
22502378 RandomNode random = new RandomNode();
22512379 group(random);
22522380 if (random.size() > 0)
2253
- random.name = random.get(0).name + "Rnd";
2381
+ random.name = random.get(0).name + "Switch";
22542382 } else
2255
- if (event.getSource() == physicsItem)
2383
+ if (source == physicsItem)
22562384 {
22572385 group(new PhysicsNode());
22582386 } else
2259
- if (event.getSource() == frameselectorItem)
2387
+ if (source == frameselectorItem)
22602388 {
22612389 for (int i=0; i<group.selection.size(); i++)
22622390 {
....@@ -2268,7 +2396,7 @@
22682396 ResetModel();
22692397 refreshContents();
22702398 } else
2271
- if (event.getSource() == switchGeoItem)
2399
+ if (source == switchGeoItem)
22722400 {
22732401 for (int i=0; i<group.selection.size(); i++)
22742402 {
....@@ -2280,7 +2408,7 @@
22802408 ResetModel();
22812409 refreshContents();
22822410 } else
2283
- if (event.getSource() == switchTransfoItem)
2411
+ if (source == switchTransfoItem)
22842412 {
22852413 for (int i=0; i<group.selection.size(); i++)
22862414 {
....@@ -2292,7 +2420,7 @@
22922420 ResetModel();
22932421 refreshContents();
22942422 } else
2295
- if (event.getSource() == morphItem)
2423
+ if (source == morphItem)
22962424 {
22972425 for (int i=0; i<group.selection.size(); i++)
22982426 {
....@@ -2304,7 +2432,7 @@
23042432 ResetModel();
23052433 refreshContents();
23062434 } else
2307
- if (event.getSource() == scriptNodeItem)
2435
+ if (source == scriptNodeItem)
23082436 {
23092437 boolean atleastone = false;
23102438
....@@ -2343,31 +2471,31 @@
23432471 }
23442472 }
23452473 } else
2346
- if (event.getSource() == linkerItem)
2474
+ if (source == linkerItem)
23472475 {
23482476 group(new cLinker());
23492477 } else
2350
- if (event.getSource() == textureItem)
2478
+ if (source == textureItem)
23512479 {
23522480 group(new TextureNode());
23532481 } else
2354
- if (event.getSource() == billboardItem)
2482
+ if (source == billboardItem)
23552483 {
23562484 group(new BillboardNode());
23572485 } else
2358
- if (event.getSource() == shadowXItem)
2486
+ if (source == shadowXItem)
23592487 {
23602488 CastShadow(0);
23612489 } else
2362
- if (event.getSource() == shadowYItem)
2490
+ if (source == shadowYItem)
23632491 {
23642492 CastShadow(1);
23652493 } else
2366
- if (event.getSource() == shadowZItem)
2494
+ if (source == shadowZItem)
23672495 {
23682496 CastShadow(2);
23692497 } else
2370
- if (event.getSource() == ungroupItem)
2498
+ if (source == ungroupItem)
23712499 {
23722500 //ungroup();
23732501 for (int i=0; i<group.selection.size(); i++)
....@@ -2379,179 +2507,187 @@
23792507
23802508 refreshContents();
23812509 } else
2382
- if (event.getSource() == genUVItem)
2510
+ if (source == genUVItem)
23832511 {
23842512 GenUV();
23852513 } else
2386
- if (event.getSource() == genNormalsCADItem)
2514
+ if (source == genNormalsCADItem)
23872515 {
23882516 GenNormals(true);
23892517 } else
2390
- if (event.getSource() == genNormalsMESHItem)
2518
+ if (source == genNormalsMESHItem)
23912519 {
23922520 GenNormals(true); // TODO
23932521 } else
2394
- if (event.getSource() == genNormalsORGANItem)
2522
+ if (source == genNormalsORGANItem)
23952523 {
23962524 GenNormals(false);
23972525 } else
2398
- if (event.getSource() == genNormalsMINEItem)
2526
+ if (source == genNormalsMINEItem)
23992527 {
24002528 GenNormalsMINE();
24012529 } else
2402
- if (event.getSource() == stripifyItem)
2530
+ if (source == stripifyItem)
24032531 {
24042532 Stripify();
24052533 } else
2406
- if (event.getSource() == unstripifyItem)
2534
+ if (source == unstripifyItem)
24072535 {
24082536 Unstripify();
24092537 } else
2410
- if (event.getSource() == trimItem)
2538
+ if (source == trimItem)
24112539 {
24122540 Trim();
24132541 } else
2414
- if (event.getSource() == untrimItem)
2542
+ if (source == untrimItem)
24152543 {
24162544 Untrim();
24172545 } else
2418
- if (event.getSource() == clearColorsItem)
2546
+ if (source == clearColorsItem)
24192547 {
24202548 ClearColors();
24212549 } else
2422
- if (event.getSource() == clearMaterialsItem)
2550
+ if (source == clearMaterialsItem)
24232551 {
24242552 ClearMaterials();
24252553 } else
2426
- if (event.getSource() == liveleavesItem)
2554
+ if (source == liveleavesItem)
24272555 {
24282556 LiveLeaves(true);
24292557 } else
2430
- if (event.getSource() == unliveleavesItem)
2558
+ if (source == unliveleavesItem)
24312559 {
24322560 LiveLeaves(false);
24332561 } else
2434
- if (event.getSource() == supportleavesItem)
2562
+ if (source == supportleavesItem)
24352563 {
24362564 SupportLeaves(true);
24372565 } else
2438
- if (event.getSource() == unsupportleavesItem)
2566
+ if (source == unsupportleavesItem)
24392567 {
24402568 SupportLeaves(false);
24412569 } else
2442
- if (event.getSource() == hideleavesItem)
2570
+ if (source == hideleavesItem)
24432571 {
24442572 HideLeaves(true);
24452573 } else
2446
- if (event.getSource() == showleavesItem)
2574
+ if (source == showleavesItem)
24472575 {
24482576 HideLeaves(false);
24492577 } else
2450
- if (event.getSource() == markleavesItem)
2578
+ if (source == markleavesItem)
24512579 {
24522580 MarkLeaves(true);
24532581 } else
2454
- if (event.getSource() == unmarkleavesItem)
2582
+ if (source == unmarkleavesItem)
24552583 {
24562584 MarkLeaves(false);
24572585 } else
2458
- if (event.getSource() == flipVItem)
2586
+ if (source == flipVItem)
24592587 {
24602588 FlipV(true);
24612589 } else
2462
- if (event.getSource() == unflipVItem)
2590
+ if (source == unflipVItem)
24632591 {
24642592 FlipV(false);
24652593 } else
2466
- if (event.getSource() == lowTexturesItem)
2594
+ if (source == lowTexturesItem)
24672595 {
24682596 SetTexRes(0);
24692597 } else
2470
- if (event.getSource() == normalTexturesItem)
2598
+ if (source == normalTexturesItem)
24712599 {
24722600 SetTexRes(1);
24732601 } else
2474
- if (event.getSource() == highTexturesItem)
2602
+ if (source == highTexturesItem)
24752603 {
24762604 SetTexRes(2);
24772605 } else
2478
- if (event.getSource() == veryhighTexturesItem)
2606
+ if (source == veryhighTexturesItem)
24792607 {
24802608 SetTexRes(3);
24812609 } else
2482
- if (event.getSource() == maxTexturesItem)
2610
+ if (source == maxTexturesItem)
24832611 {
24842612 SetTexRes(4);
24852613 } else
2486
- if (event.getSource() == panoTexturesItem)
2614
+ if (source == panoTexturesItem)
24872615 {
24882616 SetTexRes(5);
24892617 } else
2490
- if (event.getSource() == reverseNormalsItem)
2618
+ if (source == reverseNormalsItem)
24912619 {
24922620 ReverseNormals();
24932621 } else
2494
- if (event.getSource() == parseverticesItem)
2622
+ if (source == parseverticesItem)
24952623 {
24962624 ParseVertices();
24972625 } else
2498
- if (event.getSource() == textureFieldItem)
2626
+ if (source == textureFieldItem)
24992627 {
25002628 TextureVertices();
25012629 } else
2502
- if (event.getSource() == alignItem)
2630
+ if (source == alignItem)
25032631 {
25042632 Align();
25052633 } else
2506
- if (event.getSource() == mirrorItem)
2634
+ if (source == mirrorItem)
25072635 {
25082636 MirrorPoses();
25092637 } else
2510
- if (event.getSource() == reduceMorphItem)
2638
+ if (source == reduceMorphItem)
25112639 {
25122640 MeshReduction(false);
25132641 } else
2514
- if (event.getSource() == reduce34MorphItem)
2642
+ if (source == reduce34MorphItem)
25152643 {
25162644 MeshReduction(true);
25172645 } else
2518
- if (event.getSource() == reverseTrianglesItem)
2646
+ if (source == reverseTrianglesItem)
25192647 {
25202648 ReverseTriangles();
25212649 } else
2522
- if (event.getSource() == reduceMeshItem)
2650
+ if (source == reduceMeshItem)
25232651 {
25242652 ReduceMesh(false);
25252653 } else
2526
- if (event.getSource() == reduce34MeshItem)
2654
+ if (source == reduce34MeshItem)
25272655 {
25282656 ReduceMesh(true);
25292657 } else
2530
- if (event.getSource() == increaseMeshItem)
2658
+ if (source == increaseMeshItem)
25312659 {
25322660 IncreaseMesh();
25332661 } else
2534
- if (event.getSource() == clipMeshItem)
2662
+ if (source == clipMeshItem)
25352663 {
25362664 ClipMesh();
25372665 } else
2538
- if (event.getSource() == smoothMeshItem)
2666
+ if (source == smoothMeshItem)
25392667 {
25402668 SmoothMesh();
25412669 } else
2542
- if (event.getSource() == transformgeometryItem)
2670
+ if (source == transformGeometryItem)
25432671 {
25442672 TransformGeometry();
25452673 } else
2546
- if (event.getSource() == resetTransformItem)
2674
+ if (source == transformChildrenItem)
2675
+ {
2676
+ TransformChildren();
2677
+ } else
2678
+ if (source == resetTransformItem)
25472679 {
25482680 ResetTransform();
25492681 } else
2550
- if (event.getSource() == resetCentroidItem)
2682
+ if (source == resetCentroidItem)
25512683 {
2552
- ResetCentroid();
2684
+ ResetCentroid(true);
25532685 } else
2554
- if (event.getSource() == resetParentItem)
2686
+ if (source == resetCentroidXZItem)
2687
+ {
2688
+ ResetCentroid(false);
2689
+ } else
2690
+ if (source == resetParentItem)
25552691 {
25562692 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25572693 {
....@@ -2561,7 +2697,7 @@
25612697
25622698 refreshContents();
25632699 } else
2564
- if (event.getSource() == repairParentItem)
2700
+ if (source == repairParentItem)
25652701 {
25662702 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25672703 {
....@@ -2575,7 +2711,7 @@
25752711
25762712 refreshContents();
25772713 } else
2578
- if (event.getSource() == repairShadowItem)
2714
+ if (source == repairShadowItem)
25792715 {
25802716 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25812717 {
....@@ -2589,7 +2725,7 @@
25892725
25902726 refreshContents();
25912727 } else
2592
- if (event.getSource() == sortbysizeItem)
2728
+ if (source == sortbysizeItem)
25932729 {
25942730 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25952731 {
....@@ -2601,7 +2737,7 @@
26012737 ResetModel();
26022738 refreshContents();
26032739 } else
2604
- if (event.getSource() == sortbynameItem)
2740
+ if (source == sortbynameItem)
26052741 {
26062742 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
26072743 {
....@@ -2613,7 +2749,7 @@
26132749 ResetModel();
26142750 refreshContents();
26152751 } else
2616
- if (event.getSource() == attachPigmentItem)
2752
+ if (source == attachPigmentItem)
26172753 {
26182754 String texture = GetFile("Attach pigment");
26192755 Object3D obj;
....@@ -2625,7 +2761,7 @@
26252761
26262762 refreshContents();
26272763 } else
2628
- if (event.getSource() == detachPigmentItem)
2764
+ if (source == detachPigmentItem)
26292765 {
26302766 Object3D obj;
26312767 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2636,7 +2772,7 @@
26362772
26372773 refreshContents();
26382774 } else
2639
- if (event.getSource() == attachBumpItem)
2775
+ if (source == attachBumpItem)
26402776 {
26412777 String texture = GetFile("Attach bump");
26422778 Object3D obj;
....@@ -2648,7 +2784,7 @@
26482784
26492785 refreshContents();
26502786 } else
2651
- if (event.getSource() == detachBumpItem)
2787
+ if (source == detachBumpItem)
26522788 {
26532789 Object3D obj;
26542790 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2659,7 +2795,7 @@
26592795
26602796 refreshContents();
26612797 } else
2662
- if (event.getSource() == pigmentBumpItem)
2798
+ if (source == pigmentBumpItem)
26632799 {
26642800 Object3D obj;
26652801 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2670,158 +2806,195 @@
26702806
26712807 refreshContents();
26722808 } else
2673
- if (event.getSource() == flashSelectionButton)
2809
+ if (source == flashSelectionButton)
26742810 {
26752811 CameraPane.flash = true;
26762812 refreshContents();
26772813 } else
2678
- if (event.getSource() == oneButton)
2814
+ if (source == oneButton)
26792815 {
26802816 } else
2681
- if (event.getSource() == twoButton)
2817
+ if (source == twoButton)
26822818 {
26832819 radio.layout = twoButton;
26842820 // bug
26852821 //gridPanel.setDividerLocation(1.0);
26862822 //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();
2823
+// bigThree.remove(scenePanel);
2824
+// bigThree.remove(centralPanel);
2825
+// bigThree.remove(XYZPanel);
2826
+// aWindowConstraints.gridx = 0;
2827
+// aWindowConstraints.gridy = 0;
2828
+// aWindowConstraints.gridwidth = 1;
2829
+// // aConstraints.gridheight = 3;
2830
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2831
+// aWindowConstraints.weightx = 0;
2832
+// aWindowConstraints.weighty = 1;
2833
+// //bigThree.add(jtp, aWindowConstraints);
2834
+// aWindowConstraints.weightx = 1;
2835
+// aWindowConstraints.gridwidth = 3;
2836
+// // aConstraints.gridheight = 3;
2837
+// aWindowConstraints.gridx = 1;
2838
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2839
+// bigThree.add(centralPanel, aWindowConstraints);
2840
+// aWindowConstraints.weightx = 0;
2841
+// aWindowConstraints.gridx = 4;
2842
+// aWindowConstraints.gridwidth = 1;
2843
+// // aConstraints.gridheight = 3;
2844
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2845
+// //bigThree.add(XYZPanel, aWindowConstraints);
2846
+// scenePanel.setVisible(false);
2847
+// centralPanel.setVisible(true);
2848
+// XYZPanel.setVisible(false);
2849
+ bigThree.ClearUI();
2850
+ bigThree.add(centralPanel);
2851
+ bigThree.FlushUI();
27112852 } else
2712
- if (event.getSource() == threeButton)
2853
+ if (source == threeButton)
27132854 {
27142855 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();
2856
+
2857
+// bigThree.remove(scenePanel);
2858
+// bigThree.remove(centralPanel);
2859
+// bigThree.remove(XYZPanel);
2860
+// aWindowConstraints.gridx = 0;
2861
+// aWindowConstraints.gridy = 0;
2862
+// aWindowConstraints.gridwidth = 1;
2863
+// // aConstraints.gridheight = 3;
2864
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2865
+// aWindowConstraints.weightx = 0;
2866
+// aWindowConstraints.weighty = 1;
2867
+// //bigThree.add(jtp, aWindowConstraints);
2868
+// aWindowConstraints.weightx = 1;
2869
+// aWindowConstraints.gridwidth = 3;
2870
+// // aConstraints.gridheight = 3;
2871
+// aWindowConstraints.gridx = 1;
2872
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2873
+// bigThree.add(centralPanel, aWindowConstraints);
2874
+// aWindowConstraints.weightx = 0;
2875
+// aWindowConstraints.gridx = 4;
2876
+// aWindowConstraints.gridwidth = 1;
2877
+// // aConstraints.gridheight = 3;
2878
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2879
+// bigThree.add(XYZPanel, aWindowConstraints);
2880
+// bigThree.validate();
2881
+// scenePanel.setVisible(false);
2882
+// centralPanel.setVisible(true);
2883
+// XYZPanel.setVisible(true);
2884
+ bigThree.ClearUI();
2885
+ bigThree.add(centralPanel);
2886
+ bigThree.add(XYZPanel);
2887
+ bigThree.FlushUI();
27392888 } else
2740
- if (event.getSource() == fourButton)
2889
+ if (source == fourButton)
27412890 {
27422891 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();
2892
+
2893
+// bigThree.remove(scenePanel);
2894
+// bigThree.remove(centralPanel);
2895
+// bigThree.remove(XYZPanel);
2896
+// aWindowConstraints.gridx = 0;
2897
+// aWindowConstraints.gridy = 0;
2898
+// aWindowConstraints.gridwidth = 1;
2899
+// // aWindowConstraints.gridheight = 3;
2900
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2901
+// aWindowConstraints.weightx = 1;
2902
+// aWindowConstraints.weighty = 1;
2903
+// bigThree.add(scenePanel, aWindowConstraints);
2904
+// aWindowConstraints.weightx = 1;
2905
+// aWindowConstraints.gridwidth = 3;
2906
+// // aConstraints.gridheight = 3;
2907
+// aWindowConstraints.gridx = 1;
2908
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2909
+// //bigThree.add(cameraPanel, aWindowConstraints);
2910
+// aWindowConstraints.weightx = 0;
2911
+// aWindowConstraints.gridx = 4;
2912
+// aWindowConstraints.gridwidth = 1;
2913
+// // aWindowConstraints.gridheight = 3;
2914
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2915
+// //bigThree.add(XYZPanel, aWindowConstraints);
2916
+// bigThree.validate();
2917
+// scenePanel.setVisible(true);
2918
+// centralPanel.setVisible(false);
2919
+// XYZPanel.setVisible(false);
2920
+ bigThree.ClearUI();
2921
+ bigThree.add(scenePanel);
2922
+ bigThree.FlushUI();
27672923 } else
2768
- if (event.getSource() == sixButton)
2924
+ if (source == sixButton)
27692925 {
27702926 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();
2927
+
2928
+// bigThree.remove(scenePanel);
2929
+// bigThree.remove(centralPanel);
2930
+// bigThree.remove(XYZPanel);
2931
+// aWindowConstraints.gridx = 0;
2932
+// aWindowConstraints.gridy = 0;
2933
+// aWindowConstraints.gridwidth = 1;
2934
+// // aConstraints.gridheight = 3;
2935
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2936
+// aWindowConstraints.weightx = 0;
2937
+// aWindowConstraints.weighty = 1;
2938
+// bigThree.add(scenePanel, aWindowConstraints);
2939
+// aWindowConstraints.weightx = 1;
2940
+// aWindowConstraints.gridwidth = 3;
2941
+// // aWindowConstraints.gridheight = 3;
2942
+// aWindowConstraints.gridx = 1;
2943
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2944
+// bigThree.add(centralPanel, aWindowConstraints);
2945
+// aWindowConstraints.weightx = 0;
2946
+// aWindowConstraints.gridx = 4;
2947
+// aWindowConstraints.gridwidth = 1;
2948
+// // aWindowConstraints.gridheight = 3;
2949
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2950
+// //bigThree.add(XYZPanel, aConstraints);
2951
+// bigThree.validate();
2952
+// scenePanel.setVisible(true);
2953
+// centralPanel.setVisible(true);
2954
+// XYZPanel.setVisible(false);
2955
+ bigThree.ClearUI();
2956
+ bigThree.add(scenePanel);
2957
+ bigThree.add(centralPanel);
2958
+ bigThree.FlushUI();
27952959 } else
2796
- if (event.getSource() == sevenButton)
2960
+ if (source == sevenButton)
27972961 {
27982962 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();
2963
+
2964
+// bigThree.remove(scenePanel);
2965
+// bigThree.remove(centralPanel);
2966
+// bigThree.remove(XYZPanel);
2967
+// aWindowConstraints.gridx = 0;
2968
+// aWindowConstraints.gridy = 0;
2969
+// aWindowConstraints.gridwidth = 1;
2970
+// // aWindowConstraints.gridheight = 3;
2971
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2972
+// aWindowConstraints.weightx = 0;
2973
+// aWindowConstraints.weighty = 1;
2974
+// bigThree.add(scenePanel, aWindowConstraints);
2975
+// aWindowConstraints.weightx = 1;
2976
+// aWindowConstraints.gridwidth = 3;
2977
+// // aWindowConstraints.gridheight = 3;
2978
+// aWindowConstraints.gridx = 1;
2979
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2980
+// bigThree.add(centralPanel, aWindowConstraints);
2981
+// aWindowConstraints.weightx = 0;
2982
+// aWindowConstraints.gridx = 4;
2983
+// aWindowConstraints.gridwidth = 1;
2984
+// // aConstraints.gridheight = 3;
2985
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2986
+// bigThree.add(XYZPanel, aWindowConstraints);
2987
+// bigThree.validate();
2988
+// scenePanel.setVisible(true);
2989
+// centralPanel.setVisible(true);
2990
+// XYZPanel.setVisible(true);
2991
+ bigThree.ClearUI();
2992
+ bigThree.add(scenePanel);
2993
+ bigThree.add(centralPanel);
2994
+ bigThree.add(XYZPanel);
2995
+ bigThree.FlushUI();
28232996 } else
2824
- if (event.getSource() == rootButton)
2997
+ if (source == rootButton)
28252998 {
28262999 Object3D obj;
28273000 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2833,7 +3006,7 @@
28333006
28343007 refreshContents(true);
28353008 } else
2836
- if (event.getSource() == closeButton)
3009
+ if (source == closeButton)
28373010 {
28383011 //System.out.println("CLOSE: " + buttonGroup.getSelection());
28393012 cRadio ab;
....@@ -2854,11 +3027,11 @@
28543027 }
28553028 refreshContents(true);
28563029 } else
2857
- if (event.getSource() == editItem || event.getSource() == editButton)
3030
+ if (source == editItem || source == editButton)
28583031 {
28593032 EditSelection(false);
28603033 } else
2861
- if (event.getSource() == uneditButton)
3034
+ if (source == uneditButton)
28623035 {
28633036 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28643037 {
....@@ -2868,14 +3041,14 @@
28683041 child.CloseUI();
28693042 listUI.remove(child);
28703043
2871
- child.editWindow = null; // ???????????
3044
+ //child.editWindow = null; // ???????????
28723045 }
2873
- objEditor.ctrlPanel.revalidate();
3046
+ objEditor.ctrlPanel.FlushUI();
28743047 //objEditor.jTree.clearSelection();
28753048 //objEditor.ResetSliders();
28763049 refreshContents(true);
28773050 } else
2878
- if (event.getSource() == clearPanelButton)
3051
+ if (source == clearPanelButton)
28793052 {
28803053 assert(copy == group);
28813054 //copy.ClearUI();
....@@ -2886,7 +3059,7 @@
28863059 listUI.clear();
28873060 refreshContents(true);
28883061 } else
2889
- if (event.getSource() == allParamsButton)
3062
+ if (source == allParamsButton)
28903063 {
28913064 assert(copy == group);
28923065
....@@ -2907,19 +3080,19 @@
29073080
29083081 refreshContents(true);
29093082 } else
2910
- if (event.getSource() == unselectButton)
3083
+ if (source == unselectButton)
29113084 {
29123085 objEditor.jTree.clearSelection();
29133086 // ?? oct 2012 GrafreeD.clipboard.clear();
29143087 objEditor.ResetSliders();
29153088 refreshContents(true);
29163089 } else
2917
- if(event.getSource() instanceof cRadio)
3090
+ if(source instanceof cRadio)
29183091 {
29193092 group.parent = keepparent;
29203093 group.attributes = 0;
29213094 //group.editWindow = null;
2922
- /*cRadio*/ radio = (cRadio)event.getSource();
3095
+ /*cRadio*/ radio = (cRadio)source;
29233096 Object3D obj = radio.GetObject();
29243097 System.out.println("Edit " + obj);
29253098 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2954,7 +3127,9 @@
29543127 frontView.object = group;
29553128 sideView.object = group;
29563129 }
2957
- group.editWindow = this;
3130
+
3131
+// fix "+" issue group.editWindow = this;
3132
+
29583133 /*
29593134 currentLayout = radio.layout;
29603135 if (currentLayout == null)
....@@ -2967,7 +3142,20 @@
29673142 //group.attributes = -1;
29683143 ResetModel();
29693144 refreshContents(true);
2970
- }
3145
+ } else if (event.getSource() == editCameraItem)
3146
+ {
3147
+ cameraView.ProtectCamera();
3148
+ cameraView.repaint();
3149
+ return;
3150
+ } else if (event.getSource() == revertCameraItem)
3151
+ {
3152
+ cameraView.RevertCamera();
3153
+ cameraView.repaint();
3154
+ return;
3155
+ // } else if (event.getSource() == textureButton)
3156
+ // {
3157
+ // return; // true;
3158
+ }
29713159 else
29723160 {
29733161 //return super.action(event, arg);
....@@ -3028,6 +3216,28 @@
30283216 refreshContents();
30293217 }
30303218
3219
+ void TransformChildren()
3220
+ {
3221
+ Object3D obj;
3222
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3223
+ {
3224
+ obj = (Object3D)e.nextElement();
3225
+ obj.KeepTextureMatrices();
3226
+ obj.TransformChildren();
3227
+ obj.RestoreTextureMatrices();
3228
+
3229
+// if (obj.parent == null)
3230
+// {
3231
+// System.out.println("NULL PARENT!");
3232
+// new Exception().printStackTrace();
3233
+// }
3234
+// else
3235
+// TouchTransform(obj);
3236
+// //obj.parent.Touch();
3237
+ }
3238
+
3239
+ refreshContents();
3240
+ }
30313241
30323242 void ResetTransform()
30333243 {
....@@ -3140,7 +3350,7 @@
31403350 refreshContents();
31413351 }
31423352
3143
- void ResetCentroid()
3353
+ void ResetCentroid(boolean full)
31443354 {
31453355 Object3D obj;
31463356 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3155,12 +3365,16 @@
31553365 LA.matIdentity(Object3D.mat);
31563366 obj.getBounds(minima, maxima, false);
31573367 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3158
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3368
+ if (full)
3369
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
31593370 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
31603371 obj.TransformMesh(Object3D.mat);
3372
+
31613373 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3162
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3374
+ if (full)
3375
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
31633376 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3377
+
31643378 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
31653379 //Object3D.mat[3][0] = -Object3D.mat[3][0];
31663380 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3226,9 +3440,9 @@
32263440 obj = (Object3D)e.nextElement();
32273441
32283442 System.out.println("Object is: " + obj);
3229
- GrafreeD.AnalyzeObject(obj);
3443
+ Grafreed.AnalyzeObject(obj);
32303444 System.out.println("Boundary rep: " + obj.bRep);
3231
- GrafreeD.AnalyzeObject(obj.bRep);
3445
+ Grafreed.AnalyzeObject(obj.bRep);
32323446
32333447 // System.err.println((size/1024) + " KB is the size of " + obj);
32343448 }
....@@ -3442,8 +3656,8 @@
34423656
34433657 void ParseVertices()
34443658 {
3445
- boolean epsequal = GrafreeD.epsequal;
3446
- GrafreeD.epsequal = true;
3659
+ boolean epsequal = Grafreed.epsequal;
3660
+ Grafreed.epsequal = true;
34473661
34483662 for (int i=0; i<group.selection.size(); i++)
34493663 {
....@@ -3468,7 +3682,7 @@
34683682 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
34693683 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
34703684
3471
- g.add(GrafreeD.clipboard);
3685
+ g.add(Grafreed.clipboard);
34723686
34733687 buffer.add(g);
34743688 }
....@@ -3483,7 +3697,7 @@
34833697 makeSomething(buffer, i==group.selection.size()-1);
34843698 }
34853699
3486
- GrafreeD.epsequal = epsequal;
3700
+ Grafreed.epsequal = epsequal;
34873701
34883702 refreshContents();
34893703 }
....@@ -3501,7 +3715,16 @@
35013715 String pigment = Object3D.GetPigment(tex);
35023716 //String bump = Object3D.GetBump(tex);
35033717
3504
- com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3718
+ com.sun.opengl.util.texture.TextureData texturedata = null;
3719
+
3720
+ try
3721
+ {
3722
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3723
+ }
3724
+ catch (Exception e)
3725
+ {
3726
+ System.err.println("FAIL: " + node);
3727
+ }
35053728
35063729 double s = v.s;
35073730
....@@ -3589,11 +3812,11 @@
35893812
35903813 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
35913814
3592
- boolean random = CameraPane.RANDOM;
3593
- CameraPane.RANDOM = false; // parse all random nodes
3815
+ boolean random = CameraPane.SWITCH;
3816
+ CameraPane.SWITCH = false; // parse all random nodes
35943817 lowres.linkVerticesThis(null);
35953818 lowres.linkVerticesThis(sn);
3596
- CameraPane.RANDOM = random;
3819
+ CameraPane.SWITCH = random;
35973820
35983821 System.err.flush();
35993822
....@@ -3633,7 +3856,7 @@
36333856 return;
36343857
36353858 Object3D poses = group.selection.get(0);
3636
- Object3D ref = GrafreeD.clipboard.get(0);
3859
+ Object3D ref = Grafreed.clipboard.get(0);
36373860
36383861 Object3D newgroup = new Object3D("Po:" + poses.name);
36393862
....@@ -3827,9 +4050,9 @@
38274050
38284051 void ClipMesh()
38294052 {
3830
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
4053
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
38314054 {
3832
- Object3D content = GrafreeD.clipboard.get(0);
4055
+ Object3D content = Grafreed.clipboard.get(0);
38334056
38344057 if (content instanceof cGroup && ((cGroup)content).transientlink )
38354058 content = ((cGroup)content).get(0);
....@@ -3838,7 +4061,7 @@
38384061 // {
38394062 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
38404063 // }
3841
- group.selection.ClipMesh(GrafreeD.clipboard);
4064
+ group.selection.ClipMesh(Grafreed.clipboard);
38424065 }
38434066 // group.selection.ClipMesh(GrafreeD.clipboard);
38444067 System.out.println("DONE.");
....@@ -3973,7 +4196,7 @@
39734196 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
39744197
39754198 Object3D elem = (Object3D)group.selection.elementAt(i);
3976
- if(elem != group)
4199
+ if(elem != group || !newWindow)
39774200 {
39784201 // if (!(elem instanceof Composite))
39794202 // newWindow = false;
....@@ -4078,23 +4301,26 @@
40784301 System.err.println("info : " + child.GetPath());
40794302 }
40804303 }
4081
- else
4082
- {
4083
- objEditor.SetMaterial(group); // .GetMaterial());
4084
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4085
- System.err.println("info : " + group.GetPath());
4086
- }
4304
+// else
4305
+// {
4306
+// objEditor.SetMaterial(group); // .GetMaterial());
4307
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4308
+// System.err.println("info : " + group.GetPath());
4309
+// }
40874310
40884311 objEditor.SetText(); // jan 2014
40894312
4090
- if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4313
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
40914314 CameraPane.flash = true;
40924315
4093
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4316
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
40944317 // a camera
40954318 {
4096
- CameraPane.camerachangeframe = 0; // don't refuse it
4097
- Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4319
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
4320
+ {
4321
+ CameraPane.camerachangeframe = 0; // don't refuse it
4322
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4323
+ }
40984324 // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
40994325 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
41004326 }
....@@ -4178,12 +4404,12 @@
41784404 {
41794405 if (group.selection.isEmpty())
41804406 return;
4181
- GrafreeD.clipboardIsTempGroup = false;
4407
+ Grafreed.clipboardIsTempGroup = false;
41824408 Composite tGroup = null;
41834409 if (group.selection.size() > 0) // 1)
41844410 {
41854411 tGroup = new cGroup();
4186
- GrafreeD.clipboardIsTempGroup = true;
4412
+ Grafreed.clipboardIsTempGroup = true;
41874413 }
41884414
41894415 if (cut)
....@@ -4223,16 +4449,16 @@
42234449 //System.out.println("cut " + child);
42244450 //System.out.println("parent = " + child.parent);
42254451 // tmp.addChild(child);
4226
- if (GrafreeD.clipboardIsTempGroup)
4452
+ if (Grafreed.clipboardIsTempGroup)
42274453 tGroup.add/*Child*/(tmp);
42284454 else
4229
- GrafreeD.clipboard = tmp;
4455
+ Grafreed.clipboard = tmp;
42304456 }
42314457 else
4232
- if (GrafreeD.clipboardIsTempGroup)
4458
+ if (Grafreed.clipboardIsTempGroup)
42334459 tGroup.add/*Child*/(child);
42344460 else
4235
- GrafreeD.clipboard = child;
4461
+ Grafreed.clipboard = child;
42364462 }
42374463
42384464 //ResetModel();
....@@ -4264,21 +4490,21 @@
42644490 //System.out.println("cut " + elem);
42654491 //System.out.println("parent = " + elem.parent);
42664492 // tmp.addChild(elem);
4267
- if (GrafreeD.clipboardIsTempGroup)
4493
+ if (Grafreed.clipboardIsTempGroup)
42684494 tGroup.add/*Child*/(tmp);
42694495 else
4270
- GrafreeD.clipboard = tmp;
4496
+ Grafreed.clipboard = tmp;
42714497 }
42724498 else
4273
- if (GrafreeD.clipboardIsTempGroup)
4499
+ if (Grafreed.clipboardIsTempGroup)
42744500 tGroup.add/*Child*/(child);
42754501 else
4276
- GrafreeD.clipboard = child;
4502
+ Grafreed.clipboard = child;
42774503 }
42784504
42794505 }
4280
- if (GrafreeD.clipboardIsTempGroup)
4281
- GrafreeD.clipboard = tGroup;
4506
+ if (Grafreed.clipboardIsTempGroup)
4507
+ Grafreed.clipboard = tGroup;
42824508 if (cut)
42834509 {
42844510 ResetModel();
....@@ -4292,7 +4518,7 @@
42924518 // return;
42934519 boolean first = true;
42944520
4295
- if (GrafreeD.clipboardIsTempGroup)
4521
+ if (Grafreed.clipboardIsTempGroup)
42964522 {
42974523 Composite temp;
42984524
....@@ -4303,7 +4529,7 @@
43034529 temp = (Composite)Applet3D.clipboard.deepCopy();
43044530 */
43054531 Object3D elem;
4306
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4532
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
43074533 {
43084534 Object3D child = (Object3D)e.nextElement();
43094535
....@@ -4337,21 +4563,21 @@
43374563 //Object3D cb = Applet3D.clipboard;
43384564 //temp.addChild(cb);
43394565 //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());
4566
+ assert(Grafreed.clipboard.parent == null);
4567
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4568
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4569
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4570
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
43454571 else
4346
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4347
- GrafreeD.clipboard.get(0).parent = keepparent;
4572
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4573
+ Grafreed.clipboard.get(0).parent = keepparent;
43484574 }
43494575
43504576 ResetModel();
43514577 refreshContents();
43524578 }
43534579
4354
- void pasteInto(boolean copyit)
4580
+ void pasteInto(boolean copyit, boolean clone)
43554581 {
43564582 // if (GrafreeD.clipboard == null)
43574583 // return;
....@@ -4380,15 +4606,22 @@
43804606 if (copyit)
43814607 {
43824608 // paste(false);
4383
- CloneClipboard(false); // sept 2014
4609
+ if (clone)
4610
+ {
4611
+ CloneClipboard(false); // sept 2014
4612
+ }
4613
+ else
4614
+ {
4615
+ paste(false);
4616
+ }
43844617 }
43854618 else
43864619 {
43874620 boolean first = true;
43884621
4389
- if (GrafreeD.clipboardIsTempGroup)
4622
+ if (Grafreed.clipboardIsTempGroup)
43904623 {
4391
- Composite temp = (Composite)GrafreeD.clipboard;
4624
+ Composite temp = (Composite)Grafreed.clipboard;
43924625 Object3D copy;
43934626 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
43944627 {
....@@ -4398,7 +4631,7 @@
43984631 }
43994632 } else
44004633 {
4401
- linkSomething(GrafreeD.clipboard); //.get(0));
4634
+ linkSomething(Grafreed.clipboard); //.get(0));
44024635 }
44034636 }
44044637 }
....@@ -4803,21 +5036,6 @@
48035036 }
48045037 */
48055038
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
-
48215039 /*
48225040 public void Callback(Object obj)
48235041 {
....@@ -4841,26 +5059,9 @@
48415059 }
48425060 */
48435061
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
-
48615062 String GetFile(String dialogName)
48625063 {
4863
- if (GrafreeD.standAlone)
5064
+ if (Grafreed.standAlone)
48645065 {
48655066 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
48665067 browser.show();
....@@ -4924,10 +5125,12 @@
49245125 cButton flashSelectionButton;
49255126 cButton editButton;
49265127 cButton uneditButton;
5128
+ JCheckBox allParamsButton;
49275129 cButton clearpanelButton;
4928
- cButton allParamsButton;
49295130 cButton unselectButton;
49305131
5132
+ cButton oneStepButton;
5133
+
49315134 cButton screenfitButton;
49325135 cButton screenfitpointButton;
49335136 cButton snapobjectButton;
....@@ -4958,6 +5161,8 @@
49585161 private MenuItem lookFromItem;
49595162 private MenuItem switchItem;
49605163 private MenuItem cutItem;
5164
+ private MenuItem undoItem;
5165
+ private MenuItem redoItem;
49615166 private MenuItem duplicateItem;
49625167 private MenuItem cloneItem;
49635168 private MenuItem cloneSupportItem;
....@@ -4971,7 +5176,7 @@
49715176 private MenuItem linkverticesItem;
49725177 private MenuItem relinkverticesItem;
49735178 private MenuItem setMasterItem;
4974
- private MenuItem resetMeshItem;
5179
+ private MenuItem resetAllItem;
49755180 private MenuItem stepAllItem;
49765181 private MenuItem revertMeshItem;
49775182 private MenuItem poseMeshItem;
....@@ -4982,6 +5187,7 @@
49825187 private MenuItem mergeGeometriesItem;
49835188 private MenuItem copyItem;
49845189 private MenuItem pasteItem;
5190
+ private MenuItem pasteIntoItem;
49855191 private MenuItem pasteLinkItem;
49865192 private MenuItem pasteCloneItem;
49875193 private MenuItem pasteExpandItem;
....@@ -5031,8 +5237,10 @@
50315237 private MenuItem panoTexturesItem;
50325238
50335239 private MenuItem resetCentroidItem;
5034
- private MenuItem transformgeometryItem;
5240
+ private MenuItem resetCentroidXZItem;
50355241 private MenuItem resetTransformItem;
5242
+ private MenuItem transformGeometryItem;
5243
+ private MenuItem transformChildrenItem;
50365244 private MenuItem hideItem;
50375245 private MenuItem grabItem;
50385246 private MenuItem backItem;
....@@ -5079,7 +5287,7 @@
50795287 private MenuItem blobItem;
50805288 private MenuItem latheItem;
50815289 private MenuItem bezierItem;
5082
- private MenuItem checkerItem;
5290
+ private MenuItem overlayItem;
50835291 private MenuItem meshItem;
50845292 // private MenuItem meshGroupItem;
50855293 private MenuItem springItem;
....@@ -5101,11 +5309,6 @@
51015309 private MenuItem doubleItem;
51025310 private MenuItem tripleItem;
51035311
5104
- private MenuItem importGFDItem;
5105
- private MenuItem importVRMLX3DItem;
5106
- private MenuItem import3DSItem;
5107
- private MenuItem importOBJItem;
5108
-
51095312 private MenuItem computeAOItem;
51105313 private MenuItem recompileItem;
51115314 private MenuItem editScriptItem;
....@@ -5115,4 +5318,8 @@
51155318 private MenuItem analyzeItem;
51165319 private MenuItem dumpItem;
51175320 //boolean freezemodel = false;
5321
+
5322
+ Menu cameraMenu;
5323
+ MenuItem editCameraItem;
5324
+ MenuItem revertCameraItem;
51185325 }