Normand Briere
2019-06-09 c5b599b48b333b34e554b464aefbca0b9bc66275
GroupEditor.java
....@@ -12,6 +12,7 @@
1212 import com.jme.math.Vector3f;
1313 import com.jme.renderer.ColorRGBA;
1414
15
+import grafeme.ui.*;
1516 //import buoy.widget.BFileChooser;
1617
1718 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
....@@ -73,7 +74,7 @@
7374 this.copy = this.group = copy;
7475 //selectees = this.group.selectees;
7576
76
- SetupMenu2(objEditor);
77
+ SetupMenu2(this); //objEditor);
7778 SetupUI2(objEditor);
7879 objEditor.SetupUI(true);
7980 SetupViews(objEditor);
....@@ -97,14 +98,14 @@
9798
9899 void CloneClipboard(boolean supports)
99100 {
100
- assert(GrafreeD.clipboard.parent == null);
101
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
102
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
103
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
104
- makeSomething(CloneObject(GrafreeD.clipboard.get(0), false));
101
+ assert(Grafreed.clipboard.parent == null);
102
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
103
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
104
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
105
+ makeSomething(CloneObject(Grafreed.clipboard.get(0), false));
105106 else
106
- makeSomething(CloneObject(GrafreeD.clipboard, false));
107
- GrafreeD.clipboard.get(0).parent = keepparent;
107
+ makeSomething(CloneObject(Grafreed.clipboard, false));
108
+ Grafreed.clipboard.get(0).parent = keepparent;
108109 }
109110
110111 static Object3D CloneObject(Object3D obj, boolean supports)
....@@ -118,7 +119,7 @@
118119 // obj.support = null;
119120 if (!supports)
120121 obj.SaveSupports();
121
- Object3D clone = (Object3D)GrafreeD.clone(obj);
122
+ Object3D clone = (Object3D)Grafreed.clone(obj);
122123 obj.parent = parent;
123124 // obj.support = support;
124125 // clone.support = support; // aout 2013
....@@ -147,8 +148,124 @@
147148
148149 //JTextField nameField;
149150
150
- void SetupMenu2(ObjEditor oe)
151
+ void SetupMenu2(GroupEditor oe)
151152 {
153
+ Menu menu;
154
+ oe.menuBar.add(menu = new Menu("Edit"));
155
+ //editItem = menu.add(new MenuItem("Edit"));
156
+ //editItem.addActionListener(this);
157
+ duplicateItem = menu.add(new MenuItem("Duplicate"));
158
+ duplicateItem.addActionListener(this);
159
+ cloneItem = menu.add(new MenuItem("Clone"));
160
+ cloneItem.addActionListener(this);
161
+ if (Globals.ADVANCED)
162
+ {
163
+ cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
164
+ cloneSupportItem.addActionListener(this);
165
+ }
166
+ menu.add("-");
167
+ cutItem = menu.add(new MenuItem("Cut"));
168
+ cutItem.addActionListener(this);
169
+ copyItem = menu.add(new MenuItem("Copy"));
170
+ copyItem.addActionListener(this);
171
+ pasteItem = menu.add(new MenuItem("Paste"));
172
+ pasteItem.addActionListener(this);
173
+ menu.add("-");
174
+
175
+ menu.add("-");
176
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
177
+ pasteIntoItem.addActionListener(this);
178
+ pasteLinkItem = menu.add(new MenuItem("Paste link"));
179
+ pasteLinkItem.addActionListener(this);
180
+ pasteCloneItem = menu.add(new MenuItem("Paste clone"));
181
+ pasteCloneItem.addActionListener(this);
182
+// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
183
+// pasteExpandItem.addActionListener(this);
184
+ menu.add("-");
185
+ clearItem = menu.add(new MenuItem("Clear"));
186
+ clearItem.addActionListener(this);
187
+
188
+ if (Globals.ADVANCED)
189
+ {
190
+ // Deletes the cameras...
191
+ clearAllItem = menu.add(new MenuItem("Clear All"));
192
+ clearAllItem.addActionListener(this);
193
+ }
194
+
195
+ menuBar.add(cameraMenu = new Menu("View"));
196
+ //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
197
+ //zBufferItem.addActionListener(this);
198
+ //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
199
+ //normalLensItem.addActionListener(this);
200
+ cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera"));
201
+ revertCameraItem.addActionListener(this);
202
+
203
+ cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
204
+ toggleFullScreenItem.addItemListener(this);
205
+ toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
206
+ cameraMenu.add("-");
207
+
208
+ cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
209
+ toggleTextureItem.addItemListener(this);
210
+ toggleTextureItem.setState(CameraPane.textureon);
211
+
212
+ cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
213
+ toggleSwitchItem.addItemListener(this);
214
+ toggleSwitchItem.setState(CameraPane.SWITCH);
215
+
216
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
217
+ toggleHandleItem.addItemListener(this);
218
+ toggleHandleItem.setState(CameraPane.HANDLES);
219
+
220
+ cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
221
+ togglePaintItem.addItemListener(this);
222
+ togglePaintItem.setState(CameraPane.PAINTMODE);
223
+
224
+ if (Globals.ADVANCED)
225
+ {
226
+ cameraMenu.add("-");
227
+ cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
228
+ toggleLiveItem.addItemListener(this);
229
+ toggleLiveItem.setState(Globals.isLIVE());
230
+
231
+ cameraMenu.add(stepItem = new MenuItem("Step"));
232
+ stepItem.addActionListener(this);
233
+ // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
234
+ // toggleDLItem.addItemListener(this);
235
+ // toggleDLItem.setState(false);
236
+
237
+ cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
238
+ toggleRenderItem.addItemListener(this);
239
+ toggleRenderItem.setState(!CameraPane.frozen);
240
+
241
+ cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
242
+ toggleDebugItem.addItemListener(this);
243
+ toggleDebugItem.setState(CameraPane.DEBUG);
244
+
245
+ cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
246
+ toggleFrustumItem.addItemListener(this);
247
+ toggleFrustumItem.setState(CameraPane.FRUSTUM);
248
+
249
+ cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
250
+ toggleFootContactItem.addItemListener(this);
251
+ toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
252
+
253
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
254
+ toggleTimelineItem.addItemListener(this);
255
+ }
256
+
257
+// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
258
+// toggleRootItem.addItemListener(this);
259
+// toggleRootItem.setState(false);
260
+// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
261
+// animationItem.addItemListener(this);
262
+// animationItem.setState(CameraPane.ANIMATION);
263
+ cameraMenu.add("-");
264
+ cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera"));
265
+ editCameraItem.addActionListener(this);
266
+
267
+ if (Globals.ADVANCED)
268
+ {
152269 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
153270 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
154271 //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
....@@ -160,45 +277,17 @@
160277 lookAtItem.addActionListener(this);
161278 //lookFromItem.addActinoListener(this);
162279 //switchItem.addActionListener(this);
163
- Menu menu;
164
- oe.menuBar.add(menu = new Menu("Edit"));
165
- //editItem = menu.add(new MenuItem("Edit"));
166
- //editItem.addActionListener(this);
167
- duplicateItem = menu.add(new MenuItem("Duplicate"));
168
- duplicateItem.addActionListener(this);
169
- menu.add("-");
170
- cloneItem = menu.add(new MenuItem("Clone"));
171
- cloneItem.addActionListener(this);
172
- cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
173
- cloneSupportItem.addActionListener(this);
174
- menu.add("-");
175
- cutItem = menu.add(new MenuItem("Cut"));
176
- cutItem.addActionListener(this);
177
- copyItem = menu.add(new MenuItem("Copy"));
178
- copyItem.addActionListener(this);
179
- pasteItem = menu.add(new MenuItem("Paste"));
180
- pasteItem.addActionListener(this);
181
- pasteLinkItem = menu.add(new MenuItem("Paste link"));
182
- pasteLinkItem.addActionListener(this);
183
- pasteCloneItem = menu.add(new MenuItem("Paste clone"));
184
- pasteCloneItem.addActionListener(this);
185
-// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
186
-// pasteExpandItem.addActionListener(this);
187
- clearItem = menu.add(new MenuItem("Clear"));
188
- clearItem.addActionListener(this);
189
- clearAllItem = menu.add(new MenuItem("Clear All"));
190
- clearAllItem.addActionListener(this);
191
-
280
+ }
281
+
192282 oe.menuBar.add(menu = new Menu("Setting"));
193
- resetMeshItem = menu.add(new MenuItem("Reset All"));
194
- resetMeshItem.addActionListener(this);
195
- stepAllItem = menu.add(new MenuItem("Step All"));
196
- stepAllItem.addActionListener(this);
283
+ if (Globals.ADVANCED)
284
+ {
197285 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
198286 revertMeshItem.addActionListener(this);
199287 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
200288 resetreferencesItem.addActionListener(this);
201289 menu.add("-");
290
+ }
202291 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
203292 overwriteGeoItem.addActionListener(this);
204293 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -210,19 +299,26 @@
210299 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
211300 overwriteUVItem.addActionListener(this);
212301 menu.add("-");
302
+ if (Globals.ADVANCED)
303
+ {
213304 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
214305 generateMeshItem.addActionListener(this);
215306 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
216307 poseMeshItem.addActionListener(this);
217308 menu.add("-");
309
+ }
218310 resetsupportItem = menu.add(new MenuItem("Reset support"));
219311 resetsupportItem.addActionListener(this);
220312 linkverticesItem = menu.add(new MenuItem("Link to Support"));
221313 linkverticesItem.addActionListener(this);
222314 relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
223315 relinkverticesItem.addActionListener(this);
316
+
317
+ if (Globals.ADVANCED)
318
+ {
224319 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
225320 setMasterItem.addActionListener(this);
321
+ }
226322
227323 oe.menuBar.add(menu = new Menu("Group"));
228324 grabItem = menu.add(new MenuItem("Grab"));
....@@ -233,27 +329,32 @@
233329 frontItem.addActionListener(this);
234330 compositeItem = menu.add(new MenuItem("Composite"));
235331 compositeItem.addActionListener(this);
236
- hideItem = menu.add(new MenuItem("Hide"));
332
+ hideItem = menu.add(new MenuItem("Hidden Group"));
237333 hideItem.addActionListener(this);
238334 ungroupItem = menu.add(new MenuItem("Ungroup"));
239335 ungroupItem.addActionListener(this);
240336 menu.add("-");
241
- randomItem = menu.add(new MenuItem("Random"));
337
+ randomItem = menu.add(new MenuItem("Switch node"));
242338 randomItem.addActionListener(this);
243
- physicsItem = menu.add(new MenuItem("Physics"));
244
- physicsItem.addActionListener(this);
245
- frameselectorItem = menu.add(new MenuItem("Frame Selector"));
246
- frameselectorItem.addActionListener(this);
247339 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
248340 switchGeoItem.addActionListener(this);
249341 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
250342 switchTransfoItem.addActionListener(this);
251
- morphItem = menu.add(new MenuItem("Morph"));
343
+ morphItem = menu.add(new MenuItem("Morph Group"));
252344 morphItem.addActionListener(this);
345
+
346
+ if (Globals.ADVANCED)
347
+ {
348
+ menu.add("-");
349
+ physicsItem = menu.add(new MenuItem("Physics"));
350
+ physicsItem.addActionListener(this);
351
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
352
+ frameselectorItem.addActionListener(this);
253353 scriptNodeItem = menu.add(new MenuItem("Script Node"));
254354 scriptNodeItem.addActionListener(this);
255355 cameraItem = menu.add(new MenuItem("Camera"));
256356 cameraItem.addActionListener(this);
357
+ }
257358
258359 oe.menuBar.add(menu = new Menu("Object"));
259360 textureItem = menu.add(new MenuItem("Texture"));
....@@ -268,21 +369,29 @@
268369 shadowYItem.addActionListener(this);
269370 shadowZItem = menu.add(new MenuItem("Shadow Z"));
270371 shadowZItem.addActionListener(this);
372
+ if (Globals.ADVANCED)
373
+ {
374
+ menu.add("-");
271375 linkerItem = menu.add(new MenuItem("Linker"));
272376 linkerItem.addActionListener(this);
273
- templateItem = menu.add(new MenuItem("Template"));
274
- templateItem.addActionListener(this);
275377 attributeItem = menu.add(new MenuItem("Attribute"));
276378 attributeItem.addActionListener(this);
379
+ templateItem = menu.add(new MenuItem("Template"));
380
+ templateItem.addActionListener(this);
277381 pointflowItem = menu.add(new MenuItem("Point Flow"));
278382 pointflowItem.addActionListener(this);
383
+ }
279384 menu.add("-");
280385 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
281386 resetTransformItem.addActionListener(this);
282387 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
283388 resetCentroidItem.addActionListener(this);
284
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
285
- transformgeometryItem.addActionListener(this);
389
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
390
+ resetCentroidXZItem.addActionListener(this);
391
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
392
+ transformGeometryItem.addActionListener(this);
393
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
394
+ transformChildrenItem.addActionListener(this);
286395
287396 oe.menuBar.add(menu = new Menu("Geometry"));
288397 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -293,8 +402,11 @@
293402 genNormalsCADItem.addActionListener(this);
294403 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
295404 genNormalsMESHItem.addActionListener(this);
405
+ if (Globals.ADVANCED)
406
+ {
296407 genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
297408 genNormalsMINEItem.addActionListener(this);
409
+ }
298410 stripifyItem = menu.add(new MenuItem("Stripify"));
299411 stripifyItem.addActionListener(this);
300412 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -316,23 +428,34 @@
316428 reduce34MeshItem.addActionListener(this);
317429 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
318430 increaseMeshItem.addActionListener(this);
319
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
320
- smoothMeshItem.addActionListener(this);
321431 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
322432 clipMeshItem.addActionListener(this);
433
+
434
+ if (Globals.ADVANCED)
435
+ {
436
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
437
+ smoothMeshItem.addActionListener(this);
438
+ }
323439
324440 oe.menuBar.add(menu = new Menu("Attributes"));
325441 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
326442 clearMaterialsItem.addActionListener(this);
443
+ resetAllItem = menu.add(new MenuItem("Reset All"));
444
+ resetAllItem.addActionListener(this);
445
+ stepAllItem = menu.add(new MenuItem("Step All"));
446
+ stepAllItem.addActionListener(this);
327447 menu.add("-");
328448 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
329449 liveleavesItem.addActionListener(this);
330450 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
331451 unliveleavesItem.addActionListener(this);
452
+ if (Globals.ADVANCED)
453
+ {
332454 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
333455 supportleavesItem.addActionListener(this);
334456 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
335457 unsupportleavesItem.addActionListener(this);
458
+ }
336459 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
337460 hideleavesItem.addActionListener(this);
338461 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -376,29 +499,22 @@
376499 sortbynameItem = menu.add(new MenuItem("Sort by name"));
377500 sortbynameItem.addActionListener(this);
378501 menu.add("-");
502
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
503
+ shareGeometriesItem.addActionListener(this);
504
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
505
+ mergeGeometriesItem.addActionListener(this);
506
+ if (Globals.ADVANCED)
507
+ {
508
+ // Pretty much the same as duplicate and clone.
379509 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
380510 extractGeometriesItem.addActionListener(this);
381511 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
382512 cloneGeometriesItem.addActionListener(this);
383
- shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
384
- shareGeometriesItem.addActionListener(this);
385
- mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
386
- mergeGeometriesItem.addActionListener(this);
513
+ }
387514
388515 oe.menuBar.add(menu = new Menu("Insert"));
389516 buildCreateMenu(menu);
390517
391
-
392
- oe.menuBar.add(menu = new Menu("Include"));
393
- importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
394
- importGFDItem.addActionListener(this);
395
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
396
- importVRMLX3DItem.addActionListener(this);
397
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
398
- importOBJItem.addActionListener(this);
399
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
400
- import3DSItem.addActionListener(this);
401
-
402518 oe.menuBar.add(menu = new Menu("Tools"));
403519 buildToolsMenu(menu);
404520 }
....@@ -433,153 +549,98 @@
433549 oe.radioPanel.add(dummyButton);
434550 oe.buttonGroup.add(dummyButton);
435551 */
436
- aConstraints.gridy += 1;
437
- oe.aConstraints.gridwidth = 1;
438
- oe.aConstraints.gridx = 0;
552
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
439553
440
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
554
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
555
+ liveCB.setToolTipText("Enable animation");
441556 liveCB.addItemListener(this);
442557
443
- oe.aConstraints.gridx += 1;
444
- oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints);
445
- supportCB.addItemListener(this);
446
-
447
- // oe.aConstraints.gridx += 1;
448
- // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints);
449
- // localCB.addItemListener(this);
450
-
451
- oe.aConstraints.gridx += 1;
452
- oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), oe.aConstraints);
453
- crowdCB.addItemListener(this);
454
-
455
- oe.aConstraints.gridx += 1;
456
- oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints);
457
- smoothCB.addItemListener(this);
458
-
459
- oe.aConstraints.gridx += 1;
460
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints);
558
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
559
+ oneStepButton.setToolTipText("Animate one step forward");
560
+ oneStepButton.addActionListener(this);
561
+
562
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
563
+ fastCB.setToolTipText("Fast mode");
461564 fastCB.addItemListener(this);
462
- oe.aConstraints.gridx += 1;
463
- oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints);
464
- slowCB.addItemListener(this);
465
- oe.aConstraints.gridx += 1;
466
- oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints);
467
- boxCB.addItemListener(this);
468
-
469
-// oe.aConstraints.gridx += 1;
470
-// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints);
471
-// speakerMocapCB.addItemListener(this);
472
-
473
- if (false)
474
- {
475
- // handled in scripts
476
- oe.aConstraints.gridx += 1;
477
- oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints);
478
- speakerCameraCB.addItemListener(this);
479
-
480
- oe.aConstraints.gridx += 1;
481
- oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints);
482
- speakerFocusCB.addItemListener(this);
483
-
484
- oe.aConstraints.gridx += 1;
485
- oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints);
486
- smoothfocusCB.addItemListener(this);
487
- }
488
-
489
-//oe.aConstraints.gridx += 1;
490
-//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints);
491
-// debugCB.addItemListener(this);
492
-
493
- oe.aConstraints.gridx += 1;
494
- oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints);
495
- oeilCB.addItemListener(this);
496
-
497
- oe.aConstraints.gridx += 1;
498
- oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints);
499
- lookAtCB.addItemListener(this);
500
-
501
- oe.aConstraints.gridx += 1;
502
- oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints);
565
+
566
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
567
+ trackCB.setToolTipText("Enable tracking");
503568 trackCB.addItemListener(this);
504569
505
- oe.aConstraints.gridx += 1;
506
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
570
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
571
+ screenfitButton.setToolTipText("Screen fit");
507572 screenfitButton.addActionListener(this);
508
- oe.aConstraints.gridx += 1;
573
+
509574 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
510575 // screenfitpointButton.addActionListener(this);
511
-// oe.aConstraints.gridx += 1;
512
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
513
- snapobjectButton.addActionListener(this);
514
- oe.aConstraints.gridx += 1;
515576
516
- //aConstraints.gridx = 0;
517
- //aConstraints.gridy += 1;
518
- oe.aConstraints.weighty = 0;
519
- oe.aConstraints.gridwidth = 1;
520
-
521
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
577
+ if (Globals.ADVANCED)
578
+ {
579
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
580
+ snapobjectButton.addActionListener(this);
581
+ snapobjectButton.setToolTipText("Snap Object");
582
+ }
583
+
584
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
585
+ flashSelectionButton.setToolTipText("Show selection");
522586 flashSelectionButton.addActionListener(this);
523587
524
- oe.toolbarPanel.add(new cButton(" ", false));
588
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
525589
526
- oe.aConstraints.gridx += 1;
527
- oe.aConstraints.weighty = 0;
528
- oe.aConstraints.gridwidth = 1;
529
-
530
- //
531
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
590
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
591
+ twoButton.setToolTipText("Show center view only");
532592 twoButton.addActionListener(this);
533
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
593
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
534594 fourButton.addActionListener(this);
535
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
595
+ fourButton.setToolTipText("Show left panel only");
596
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
597
+ sixButton.setToolTipText("2-column layout left");
536598 sixButton.addActionListener(this);
537
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
599
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
600
+ threeButton.setToolTipText("2-column layout right");
538601 threeButton.addActionListener(this);
539
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
602
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
603
+ sevenButton.setToolTipText("3-column layout");
540604 sevenButton.addActionListener(this);
541605 //
542606
543
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
607
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
608
+ rootButton.setToolTipText("Edit selection in new tab");
544609 rootButton.addActionListener(this);
545
- oe.aConstraints.gridx += 1;
546
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
610
+
611
+ oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
612
+ closeButton.setToolTipText("Close tab");
547613 closeButton.addActionListener(this);
548614 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
549615 //clearButton.addActionListener(this);
550
- oe.aConstraints.gridx += 1;
551616
552
- oe.aConstraints.gridx = 1; //
553
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
617
+ cGridBag commandsPanel = new cGridBag();
618
+
619
+ commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
620
+ editButton.setToolTipText("Edit selection");
554621 editButton.addActionListener(this);
555
- oe.aConstraints.gridx += 1;
556
- oe.aConstraints.weighty = 0;
557
- oe.aConstraints.gridwidth = 1;
558622
559
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
623
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
624
+ uneditButton.setToolTipText("Unedit selection");
560625 uneditButton.addActionListener(this);
561626
562
- oe.aConstraints.gridx += 1;
563
- oe.aConstraints.weighty = 0;
564
- oe.aConstraints.gridwidth = 1;
565
-
566
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
567
- clearPanelButton.addActionListener(this);
568
-
569
- oe.aConstraints.gridx += 1;
570
- oe.aConstraints.weighty = 0;
571
- oe.aConstraints.gridwidth = 1;
572
-
573
- oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints);
627
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
628
+ allParamsButton.setToolTipText("Edit all params");
574629 allParamsButton.addActionListener(this);
575630
576
- oe.aConstraints.gridx += 1;
577
- oe.aConstraints.weighty = 0;
578
- oe.aConstraints.gridwidth = 1;
579
-
580
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
631
+ commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
632
+ clearPanelButton.setToolTipText("Clear edit panel");
633
+ clearPanelButton.addActionListener(this);
634
+
635
+ commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
636
+ unselectButton.setToolTipText("Unselect");
581637 unselectButton.addActionListener(this);
582638
639
+ commandsPanel.preferredHeight = 1;
640
+
641
+ oe.treePanel.add(commandsPanel);
642
+ oe.treePanel.Return();
643
+
583644 // oe.aConstraints.gridx += 1;
584645 // oe.aConstraints.weighty = 0;
585646 // oe.aConstraints.gridwidth = 1;
....@@ -591,40 +652,37 @@
591652 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
592653 // gcButton.addActionListener(this);
593654
594
- oe.aConstraints.gridx = 0;
595
- oe.aConstraints.gridy += 1;
596
-
597
- //ctrlPanel.add(objList = new List(5, true));
598
- oe.aConstraints.gridwidth = 100;
599
- // oe.aConstraints.gridheight = 100;
600
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
601
- oe.aConstraints.gridheight = 1;
602
- oe.aConstraints.weighty = 0.5;
603
- oe.aConstraints.gridx = 0;
604
- JScrollPane jSP;
655
+ cGridBag jSPPanel = new cGridBag();
656
+
657
+ JScrollPane jSP;
605658 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
606
- oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints);
659
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
607660 ResetModel();
608
- oe.aConstraints.weighty = 0.5;
609
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
610
- oe.aConstraints.gridy += 1;
611
- oe.aConstraints.gridwidth = 1;
661
+
662
+ oe.treePanel.add(jSPPanel);
663
+ oe.treePanel.Return();
612664
613
- oe.aConstraints.weighty = 0;
614
- oe.aConstraints.gridwidth = 2;
615
-
616
- oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints);
665
+ cGridBag copyOptionsPanel = new cGridBag();
666
+
667
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
668
+ colorCB.setToolTipText("Copy color when dropped");
617669 colorCB.addItemListener(this);
618
- oe.aConstraints.gridx += 2;
619
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
670
+
671
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
672
+ materialCB.setToolTipText("Copy material when dropped");
620673 materialCB.addItemListener(this);
621
- oe.aConstraints.gridx += 2;
622
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
674
+
675
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
676
+ textureCB.setToolTipText("Copy texture when dropped");
623677 textureCB.addItemListener(this);
624678
625
- oe.aConstraints.gridx = 0;
626
- oe.aConstraints.gridy += 1;
679
+ copyOptionsPanel.preferredHeight = 1;
680
+ oe.treePanel.add(copyOptionsPanel);
681
+ oe.treePanel.Return();
627682
683
+// mainPanel.setDividerLocation(0.5); //1.0);
684
+// mainPanel.setResizeWeight(0.5);
685
+
628686 //jList.addListSelectionListener(this);
629687 oe.jTree.addTreeSelectionListener(this);
630688 //jTree.setRootVisible(false);
....@@ -646,6 +704,78 @@
646704 radio.layout = sevenButton;
647705 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
648706 }
707
+
708
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
709
+ {
710
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
711
+ boxCB.setToolTipText("Display bounding boxes");
712
+ boxCB.addItemListener(this);
713
+
714
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
715
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
716
+ zoomBoxCB.addItemListener(this);
717
+
718
+ if (true) // Globals.ADVANCED)
719
+ {
720
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
721
+ supportCB.setToolTipText("Enable rigging");
722
+ supportCB.addItemListener(this);
723
+
724
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
725
+ // localCB.addItemListener(this);
726
+
727
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
728
+ crowdCB.setToolTipText("Used for crowds");
729
+ crowdCB.addItemListener(this);
730
+
731
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
732
+ smoothCB.setToolTipText("Snapping delay");
733
+ smoothCB.addItemListener(this);
734
+
735
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
736
+ slowCB.setToolTipText("Smooth interpolation");
737
+ slowCB.addItemListener(this);
738
+
739
+// constraints.gridy += 1;
740
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
741
+// speakerMocapCB.addItemListener(this);
742
+
743
+ if (false)
744
+ {
745
+ // handled in scripts
746
+ //constraints.gridy += 1;
747
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
748
+ speakerCameraCB.addItemListener(this);
749
+
750
+ //constraints.gridy += 1;
751
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
752
+ speakerFocusCB.addItemListener(this);
753
+
754
+ //constraints.gridy += 1;
755
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
756
+ smoothfocusCB.addItemListener(this);
757
+ }
758
+
759
+//constraints.gridx += 1;
760
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
761
+// debugCB.addItemListener(this);
762
+
763
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
764
+ oeilCB.addItemListener(this);
765
+
766
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
767
+ lookAtCB.setToolTipText("Look-at target");
768
+ lookAtCB.addItemListener(this);
769
+
770
+ }
771
+
772
+ cGridBag fill = new cGridBag();
773
+
774
+ fill.preferredHeight = 200;
775
+
776
+ panel.add(fill);
777
+
778
+ }
649779
650780 void EditObject(Object3D obj)
651781 {
....@@ -658,6 +788,7 @@
658788 buttonGroup.add(radioButton);
659789 radioButton.doClick();
660790 }
791
+
661792 void SetupViews(ObjEditor oe)
662793 {
663794 oe.SetupViews();
....@@ -676,6 +807,7 @@
676807 JCheckBox fastCB;
677808 JCheckBox slowCB;
678809 JCheckBox boxCB;
810
+ JCheckBox zoomBoxCB;
679811 JCheckBox trackCB;
680812 JCheckBox smoothfocusCB;
681813 // JCheckBox speakerMocapCB;
....@@ -755,6 +887,10 @@
755887 Recompile();
756888 cameraView.repaint();
757889 // refreshContents();
890
+ }
891
+ else if(e.getSource() == zoomBoxCB)
892
+ {
893
+ cameraView.ToggleZoomBoxMode();
758894 }
759895 else if(e.getSource() == smoothfocusCB)
760896 {
....@@ -869,7 +1005,9 @@
8691005 // objEditor.DropFile((java.io.File[]) object, true);
8701006 // return;
8711007 // }
872
- if (string.charAt(0) == '/')
1008
+
1009
+ // File path for Mac and Windows
1010
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
8731011 {
8741012 // file(s)
8751013 String[] names = string.split("\n");
....@@ -896,7 +1034,7 @@
8961034
8971035 flashIt = false;
8981036 CameraPane pane = (CameraPane) target;
899
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1037
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
9001038 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
9011039
9021040 if (group.selection.size() == 1)
....@@ -923,11 +1061,11 @@
9231061 {
9241062 loadClipboard(true);
9251063 objEditor.jTree.setSelectionPath(destinationPath);
926
- pasteInto(false);
1064
+ pasteInto(false, false);
9271065 } else {
9281066 loadClipboard(false);
9291067 objEditor.jTree.setSelectionPath(destinationPath);
930
- pasteInto(false); // true); // ???
1068
+ pasteInto(false, false); // true); // ???
9311069 }
9321070 }
9331071 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1049,27 +1187,33 @@
10491187 kleinItem.addActionListener(this);
10501188 particleItem = menu.add(new MenuItem("Particle system"));
10511189 particleItem.addActionListener(this);
1190
+ if (Globals.ADVANCED)
1191
+ {
10521192 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10531193 ragdollItem.addActionListener(this);
10541194 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10551195 ragdoll2Item.addActionListener(this);
1196
+ }
10561197 menu.add("-");
1057
- meshItem = menu.add(new MenuItem("Mesh"));
1198
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10581199 meshItem.addActionListener(this);
10591200 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10601201 // meshGroupItem.addActionListener(this);
1202
+ if (Globals.ADVANCED)
1203
+ {
10611204 springItem = menu.add(new MenuItem("Spring"));
10621205 springItem.addActionListener(this);
10631206 flagItem = menu.add(new MenuItem("Flag"));
10641207 flagItem.addActionListener(this);
1065
- bezierItem = menu.add(new MenuItem("Patch"));
1066
- bezierItem.addActionListener(this);
1067
- checkerItem = menu.add(new MenuItem("Checker"));
1068
- checkerItem.addActionListener(this);
10691208 blobItem = menu.add(new MenuItem("Blob"));
10701209 blobItem.addActionListener(this);
10711210 latheItem = menu.add(new MenuItem("Lathe"));
10721211 latheItem.addActionListener(this);
1212
+ }
1213
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1214
+ bezierItem.addActionListener(this);
1215
+ overlayItem = menu.add(new MenuItem("Overlay"));
1216
+ overlayItem.addActionListener(this);
10731217 lightItem = menu.add(new MenuItem("Light"));
10741218 lightItem.addActionListener(this);
10751219 menu.add("-");
....@@ -1079,34 +1223,39 @@
10791223 loopItem.addActionListener(this);
10801224 doubleItem = menu.add(new MenuItem("Fork"));
10811225 doubleItem.addActionListener(this);
1226
+ if (Globals.ADVANCED)
1227
+ {
10821228 tripleItem = menu.add(new MenuItem("Trident"));
10831229 tripleItem.addActionListener(this);
1230
+ }
10841231 }
10851232
10861233 void buildToolsMenu(Menu menu)
10871234 {
10881235 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10891236 animationItem.addItemListener(this);
1090
- animationItem.setState(CameraPane.ANIMATION);
1237
+ animationItem.setState(Globals.ANIMATION);
10911238
10921239 menu.add("-");
10931240 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
10941241 parseverticesItem.addActionListener(this);
10951242 textureFieldItem = menu.add(new MenuItem("Texture Field"));
10961243 textureFieldItem.addActionListener(this);
1097
- alignItem = menu.add(new MenuItem("Align"));
1244
+ alignItem = menu.add(new MenuItem("Align Objects"));
10981245 alignItem.addActionListener(this);
1099
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1100
- mirrorItem.addActionListener(this);
11011246 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11021247 reduceMorphItem.addActionListener(this);
11031248 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11041249 reduce34MorphItem.addActionListener(this);
1105
-
1250
+ menu.add("-");
11061251 menu.add(computeAOItem = new MenuItem("Compute AO"));
11071252 computeAOItem.addActionListener(this);
1108
- menu.add("-");
11091253
1254
+ if (Globals.ADVANCED)
1255
+ {
1256
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1257
+ mirrorItem.addActionListener(this);
1258
+ menu.add("-");
11101259 menu.add(memoryItem = new MenuItem("Memory Usage"));
11111260 memoryItem.addActionListener(this);
11121261 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1129,6 +1278,7 @@
11291278 menu.add("-");
11301279 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11311280 editScriptItem.addActionListener(this);
1281
+ }
11321282 }
11331283
11341284 void ScreenFit()
....@@ -1457,9 +1607,9 @@
14571607
14581608 void Overwrite(int mask)
14591609 {
1460
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1610
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14611611 {
1462
- Object3D content = GrafreeD.clipboard.get(0);
1612
+ Object3D content = Grafreed.clipboard.get(0);
14631613
14641614 if (content instanceof cGroup && ((cGroup)content).transientlink )
14651615 content = ((cGroup)content).get(0);
....@@ -1482,6 +1632,7 @@
14821632 //
14831633 public void actionPerformed(ActionEvent event) // , Object arg)
14841634 {
1635
+ Object source = event.getSource();
14851636 /*
14861637 if (event.getSource() == nameField)
14871638 {
....@@ -1493,11 +1644,11 @@
14931644 }
14941645 else
14951646 */
1496
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1647
+ if (source == lookAtItem || source == lookFromItem)
14971648 {
14981649 ScreenFit();
14991650 } else
1500
- if (event.getSource() == switchItem)
1651
+ if (source == switchItem)
15011652 {
15021653 cVector v1 = new cVector();
15031654 cVector v2 = new cVector();
....@@ -1506,11 +1657,11 @@
15061657 objEditor.cameraView.renderCamera.setAim(v2, v1);
15071658 objEditor.cameraView.repaint();
15081659 } else
1509
- if (event.getSource() == rectoidItem)
1660
+ if (source == rectoidItem)
15101661 {
15111662 makeSomething(new Box());
15121663 } else
1513
- if (event.getSource() == particleItem)
1664
+ if (source == particleItem)
15141665 {
15151666 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15161667 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1531,9 +1682,9 @@
15311682 applyExample(particleGeom, "SMOKE");
15321683 makeSomething(particleGeom);
15331684 } else
1534
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1685
+ if (source == ragdollItem || source == ragdoll2Item)
15351686 {
1536
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1687
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15371688
15381689 ragdoll.toParent = LA.newMatrix();
15391690 ragdoll.fromParent = LA.newMatrix();
....@@ -1551,7 +1702,7 @@
15511702 } else
15521703 /*
15531704 */
1554
- if (event.getSource() == heightFieldItem)
1705
+ if (source == heightFieldItem)
15551706 {
15561707 Object3D obj = new Object3D();
15571708
....@@ -1589,31 +1740,31 @@
15891740
15901741 makeSomething(obj);
15911742 } else
1592
- if (event.getSource() == gridItem)
1743
+ if (source == gridItem)
15931744 {
15941745 makeSomething(new Grid());
15951746 } else
1596
- if (event.getSource() == ellipsoidItem)
1747
+ if (source == ellipsoidItem)
15971748 {
15981749 makeSomething(new Sphere());
15991750 } else
1600
- if (event.getSource() == coneItem)
1751
+ if (source == coneItem)
16011752 {
16021753 makeSomething(new Cone());
16031754 } else
1604
- if (event.getSource() == torusItem)
1755
+ if (source == torusItem)
16051756 {
16061757 makeSomething(new Torus());
16071758 } else
1608
- if (event.getSource() == superItem)
1759
+ if (source == superItem)
16091760 {
16101761 makeSomething(new Superellipsoid());
16111762 } else
1612
- if (event.getSource() == kleinItem)
1763
+ if (source == kleinItem)
16131764 {
16141765 makeSomething(new Klein());
16151766 } else
1616
- if (event.getSource() == blobItem)
1767
+ if (source == blobItem)
16171768 {
16181769 Blob blob = new Blob();
16191770 BlobComponent comp = new BlobComponent();
....@@ -1621,15 +1772,15 @@
16211772 //blob.retile();
16221773 makeSomething(blob);
16231774 } else
1624
- if (event.getSource() == latheItem)
1775
+ if (source == latheItem)
16251776 {
16261777 makeSomething(new Lathe());
16271778 } else
1628
- if (event.getSource() == bezierItem)
1779
+ if (source == bezierItem)
16291780 {
16301781 makeSomething(new BezierSurface());
16311782 } else
1632
- if (event.getSource() == checkerItem)
1783
+ if (source == overlayItem)
16331784 {
16341785 /*
16351786 Object3D obj = new BezierSurface(5,8);
....@@ -1644,7 +1795,7 @@
16441795 */
16451796 makeSomething(new Checker());
16461797 } else
1647
- if (event.getSource() == meshItem)
1798
+ if (source == meshItem)
16481799 {
16491800 Object3D itemtomake = new Object3D();
16501801 Object3D child;
....@@ -1665,35 +1816,35 @@
16651816 makeSomething(child);
16661817 }
16671818 } else
1668
- if (event.getSource() == springItem)
1819
+ if (source == springItem)
16691820 {
16701821 cSpring s = new cSpring();
16711822 s.setup();
16721823 makeSomething(s);
16731824 } else
1674
- if (event.getSource() == flagItem)
1825
+ if (source == flagItem)
16751826 {
16761827 cSpring s = new cFlag();
16771828 s.setup();
16781829 makeSomething(s);
16791830 } else
1680
- if (event.getSource() == lightItem)
1831
+ if (source == lightItem)
16811832 {
16821833 makeSomething(new Light());
16831834 } else
1684
- if (event.getSource() == csgItem)
1835
+ if (source == csgItem)
16851836 {
16861837 group(new CSG());
16871838 } else
1688
- if (event.getSource() == templateItem)
1839
+ if (source == templateItem)
16891840 {
16901841 group(new cTemplate());
16911842 } else
1692
- if (event.getSource() == attributeItem)
1843
+ if (source == attributeItem)
16931844 {
16941845 makeSomething(new Attribute());
16951846 } else
1696
- if (event.getSource() == pointflowItem)
1847
+ if (source == pointflowItem)
16971848 {
16981849 makeSomething(new PointFlow());
16991850 } else
....@@ -1705,7 +1856,7 @@
17051856 } else
17061857 */
17071858
1708
- if (event.getSource() == superLoopItem)
1859
+ if (source == superLoopItem)
17091860 {
17101861 Composite g = new cGroup();
17111862 for (int i=0; i<15; i++)
....@@ -1727,7 +1878,7 @@
17271878
17281879 group(g);
17291880 } else
1730
- if (event.getSource() == loopItem)
1881
+ if (source == loopItem)
17311882 {
17321883 Composite csg = new GroupLeaf();
17331884 csg.count = 5;
....@@ -1736,7 +1887,7 @@
17361887 csg.addChild(child);
17371888 child.addChild(csg);
17381889 } else
1739
- if (event.getSource() == doubleItem)
1890
+ if (source == doubleItem)
17401891 {
17411892 Composite csg = new GroupLeaf();
17421893 csg.count = 5;
....@@ -1748,7 +1899,7 @@
17481899 csg.addChild(child);
17491900 child.addChild(csg);
17501901 } else
1751
- if (event.getSource() == tripleItem)
1902
+ if (source == tripleItem)
17521903 {
17531904 Composite csg = new GroupLeaf();
17541905 csg.count = 4;
....@@ -1763,71 +1914,59 @@
17631914 csg.addChild(child);
17641915 child.addChild(csg);
17651916 } else
1766
-
1767
- if (event.getSource() == importGFDItem)
1768
- {
1769
- ImportGFD();
1770
- } else
1771
- if (event.getSource() == importVRMLX3DItem)
1772
- {
1773
- ImportVRMLX3D();
1774
- } else
1775
- if (event.getSource() == import3DSItem)
1776
- {
1777
- objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
1778
- } else
1779
- if (event.getSource() == importOBJItem)
1780
- {
1781
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1782
- } else
1783
- if (event.getSource() == computeAOItem)
1917
+ if (source == computeAOItem)
17841918 {
17851919 Globals.drawMode = CameraPane.OCCLUSION;
1786
- CameraPane.theRenderer.repaint();
1920
+ Globals.theRenderer.repaint();
17871921 } else
1788
- if (event.getSource() == recompileItem)
1922
+ if (source == recompileItem)
17891923 {
17901924 Recompile();
17911925 refreshContents();
17921926 } else
1793
- if (event.getSource() == editScriptItem)
1927
+ if (source == editScriptItem)
17941928 {
17951929 OpenDialog();
17961930 refreshContents();
17971931 } else
1798
- if (event.getSource() == invariantsItem)
1932
+ if (source == invariantsItem)
17991933 {
18001934 System.out.println("Invariants:");
1801
- GrafreeD.grafreeD.universe.invariants();
1935
+ Grafreed.grafreeD.universe.invariants();
18021936 } else
1803
- if (event.getSource() == memoryItem)
1937
+ if (source == memoryItem)
18041938 {
18051939 //System.out.println("Invariants:");
18061940 PrintMemory();
18071941 } else
1808
- if (event.getSource() == pathItem)
1942
+ if (source == pathItem)
18091943 {
18101944 PrintPath();
18111945 } else
1812
- if (event.getSource() == analyzeItem)
1946
+ if (source == analyzeItem)
18131947 {
18141948 AnalyzeObject();
18151949 } else
1816
- if (event.getSource() == dumpItem)
1950
+ if (source == dumpItem)
18171951 {
18181952 DumpObject();
18191953 } else
1820
- if (event.getSource() == screenfitButton)
1954
+ if (source == oneStepButton)
1955
+ {
1956
+ Globals.ONESTEP = true;
1957
+ cameraView.repaint();
1958
+ } else
1959
+ if (source == screenfitButton)
18211960 {
18221961 //Reload(lastConverter, lastFilename, true);
18231962 ScreenFit();
18241963 } else
1825
- if (event.getSource() == screenfitpointButton)
1964
+ if (source == screenfitpointButton)
18261965 {
18271966 //Reload(lastConverter, lastFilename, true);
18281967 ScreenFitPoint();
18291968 } else
1830
- if (event.getSource() == snapobjectButton)
1969
+ if (source == snapobjectButton)
18311970 {
18321971 //Reload(lastConverter, lastFilename, true);
18331972 SnapObject();
....@@ -1838,13 +1977,13 @@
18381977 // Recompile();
18391978 // refreshContents();
18401979 // } else
1841
- if (event.getSource() == gcButton)
1980
+ if (source == gcButton)
18421981 {
18431982 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18441983 System.gc();
18451984 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18461985 } else
1847
- if (event.getSource() == editLeafItem)
1986
+ if (source == editLeafItem)
18481987 {
18491988 Object3D obj;
18501989 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1858,62 +1997,66 @@
18581997 }
18591998 refreshContents(true);
18601999 } else
1861
- if (event.getSource() == openWindowItem)
2000
+ if (source == openWindowItem)
18622001 {
18632002 EditSelection(true);
18642003 } else
1865
- if (event.getSource() == cutItem || event.getSource() == clearButton)
2004
+ if (source == cutItem || source == clearButton)
18662005 {
18672006 loadClipboard(true);
18682007 } else
1869
- if (event.getSource() == duplicateItem)
2008
+ if (source == duplicateItem)
18702009 {
1871
- Object3D keep = GrafreeD.clipboard;
2010
+ Object3D keep = Grafreed.clipboard;
18722011 loadClipboard(false);
18732012 paste(false);
1874
- GrafreeD.clipboard = keep;
2013
+ Grafreed.clipboard = keep;
18752014 } else
1876
- if (event.getSource() == cloneItem)
2015
+ if (source == cloneItem)
18772016 {
18782017 CloneSelection(false);
18792018 } else
1880
- if (event.getSource() == cloneSupportItem)
2019
+ if (source == cloneSupportItem)
18812020 {
18822021 CloneSelection(true);
18832022 } else
1884
- if (event.getSource() == copyItem)
2023
+ if (source == copyItem)
18852024 {
18862025 loadClipboard(false);
18872026 } else
1888
- if (event.getSource() == pasteItem)
2027
+ if (source == pasteItem)
18892028 {
18902029 paste(false);
18912030 } else
1892
- if (event.getSource() == pasteLinkItem)
2031
+ if (source == pasteIntoItem)
18932032 {
1894
- pasteInto(false);
2033
+ pasteInto(true, false);
18952034 } else
1896
- if (event.getSource() == pasteCloneItem)
2035
+ if (source == pasteLinkItem)
18972036 {
1898
- pasteInto(true);
2037
+ pasteInto(false, false);
18992038 } else
1900
- if (event.getSource() == pasteExpandItem)
2039
+ if (source == pasteCloneItem)
2040
+ {
2041
+ pasteInto(true, true);
2042
+ } else
2043
+ if (source == pasteExpandItem)
19012044 {
19022045 paste(true);
19032046 } else
1904
- if (event.getSource() == synchronizeItem)
2047
+ if (source == synchronizeItem)
19052048 {
19062049 Overwrite(Object3D.TRANSFORM);
19072050 } else
1908
- if (event.getSource() == overwriteNameItem)
2051
+ if (source == overwriteNameItem)
19092052 {
19102053 Overwrite(Object3D.NAME);
19112054 } else
1912
- if (event.getSource() == overwriteUVItem)
2055
+ if (source == overwriteUVItem)
19132056 {
19142057 Overwrite(Object3D.UV);
19152058 } else
1916
- if (event.getSource() == overwriteMatItem)
2059
+ if (source == overwriteMatItem)
19172060 {
19182061 /* july 2015
19192062 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1933,7 +2076,7 @@
19332076
19342077 Overwrite(dropAttributes);
19352078 }
1936
- if (event.getSource() == overwriteGeoItem)
2079
+ if (source == overwriteGeoItem)
19372080 {
19382081 Overwrite(Object3D.GEOMETRY);
19392082 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1950,7 +2093,7 @@
19502093 // refreshContents();
19512094 // }
19522095 } else
1953
- if (event.getSource() == generateMeshItem)
2096
+ if (source == generateMeshItem)
19542097 {
19552098 //if (group.selection.size() == 1)
19562099 // for (int i=0; i<group.selection.size(); i++)
....@@ -1961,7 +2104,7 @@
19612104 ResetModel();
19622105 refreshContents();
19632106 } else
1964
- if (event.getSource() == extractGeometriesItem)
2107
+ if (source == extractGeometriesItem)
19652108 {
19662109 boolean one = false;
19672110
....@@ -1988,7 +2131,7 @@
19882131 ResetModel();
19892132 refreshContents();
19902133 } else
1991
- if (event.getSource() == cloneGeometriesItem)
2134
+ if (source == cloneGeometriesItem)
19922135 {
19932136 boolean one = false;
19942137
....@@ -2014,7 +2157,7 @@
20142157 ResetModel();
20152158 refreshContents();
20162159 } else
2017
- if (event.getSource() == shareGeometriesItem)
2160
+ if (source == shareGeometriesItem)
20182161 {
20192162 boolean one = false;
20202163
....@@ -2044,7 +2187,7 @@
20442187 refreshContents();
20452188 }
20462189 } else
2047
- if (event.getSource() == mergeGeometriesItem)
2190
+ if (source == mergeGeometriesItem)
20482191 {
20492192 boolean one = false;
20502193
....@@ -2074,7 +2217,7 @@
20742217 ResetModel();
20752218 refreshContents();
20762219 } else
2077
- if (event.getSource() == linkverticesItem)
2220
+ if (source == linkverticesItem)
20782221 {
20792222 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20802223 // {
....@@ -2087,48 +2230,48 @@
20872230 // group.selection.get(0).setMasterThis(content); // should be identity
20882231 // refreshContents();
20892232 // }
2090
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2233
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
20912234 {
2092
- Object3D content = GrafreeD.clipboard.get(0);
2235
+ Object3D content = Grafreed.clipboard.get(0);
20932236
20942237 if (content instanceof cGroup && ((cGroup)content).transientlink )
20952238 content = ((cGroup)content).get(0);
20962239
2097
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2240
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20982241 for (int i=0; i<group.selection.size(); i++)
20992242 {
2100
- boolean random = CameraPane.RANDOM;
2101
- CameraPane.RANDOM = false; // parse all random nodes
2243
+ boolean random = CameraPane.SWITCH;
2244
+ CameraPane.SWITCH = false; // parse all random nodes
21022245 group.selection.get(i).linkVerticesThis(content);
21032246 // group.selection.get(i).setMasterThis(content); // should be identity
2104
- CameraPane.RANDOM = random;
2247
+ CameraPane.SWITCH = random;
21052248 }
2106
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2249
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21072250 refreshContents();
21082251 }
21092252 } else
2110
- if (event.getSource() == resetsupportItem)
2253
+ if (source == resetsupportItem)
21112254 {
21122255 for (int i=0; i<group.selection.size(); i++)
21132256 {
2114
- boolean random = CameraPane.RANDOM;
2115
- CameraPane.RANDOM = false; // parse all random nodes
2257
+ boolean random = CameraPane.SWITCH;
2258
+ CameraPane.SWITCH = false; // parse all random nodes
21162259 group.selection.get(i).linkVerticesThis(null);
2117
- CameraPane.RANDOM = random;
2260
+ CameraPane.SWITCH = random;
21182261 }
21192262
21202263 refreshContents();
21212264 } else
2122
- if (event.getSource() == relinkverticesItem)
2265
+ if (source == relinkverticesItem)
21232266 {
2124
- boolean random = CameraPane.RANDOM;
2125
- CameraPane.RANDOM = false; // parse all random nodes
2267
+ boolean random = CameraPane.SWITCH;
2268
+ CameraPane.SWITCH = false; // parse all random nodes
21262269 group.selection.RelinkToSupport();
2127
- CameraPane.RANDOM = random;
2270
+ CameraPane.SWITCH = random;
21282271
21292272 refreshContents();
21302273 } else
2131
- if (event.getSource() == resetreferencesItem)
2274
+ if (source == resetreferencesItem)
21322275 {
21332276 for (int i=0; i<group.selection.size(); i++)
21342277 {
....@@ -2137,11 +2280,11 @@
21372280
21382281 refreshContents();
21392282 } else
2140
- if (event.getSource() == setMasterItem)
2283
+ if (source == setMasterItem)
21412284 {
2142
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2285
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21432286 {
2144
- Object3D content = GrafreeD.clipboard.get(0);
2287
+ Object3D content = Grafreed.clipboard.get(0);
21452288
21462289 if (content instanceof cGroup && ((cGroup)content).transientlink )
21472290 content = ((cGroup)content).get(0);
....@@ -2150,13 +2293,13 @@
21502293 refreshContents();
21512294 }
21522295 } else
2153
- if (event.getSource() == poseMeshItem)
2296
+ if (source == poseMeshItem)
21542297 {
21552298 if (group.selection.size() == 1)
21562299 {
2157
- if (GrafreeD.clipboard.size() == 1)
2300
+ if (Grafreed.clipboard.size() == 1)
21582301 {
2159
- Object3D content = GrafreeD.clipboard.get(0);
2302
+ Object3D content = Grafreed.clipboard.get(0);
21602303
21612304 if (content instanceof cGroup && ((cGroup)content).transientlink )
21622305 content = ((cGroup)content).get(0);
....@@ -2169,19 +2312,19 @@
21692312 }
21702313
21712314 } else
2172
- if (event.getSource() == revertMeshItem)
2315
+ if (source == revertMeshItem)
21732316 {
21742317 RevertMeshes();
21752318 } else
2176
- if (event.getSource() == resetMeshItem)
2319
+ if (source == resetAllItem)
21772320 {
21782321 ResetAll();
21792322 } else
2180
- if (event.getSource() == stepAllItem)
2323
+ if (source == stepAllItem)
21812324 {
21822325 StepAll();
21832326 } else
2184
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2327
+ if (source == clearItem) // || event.getSource() == clearButton)
21852328 {
21862329 //int indices[] = jList.getSelectedIndices();
21872330 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2189,46 +2332,46 @@
21892332
21902333 ClearSelection(false);
21912334 } else
2192
- if (event.getSource() == clearAllItem)
2335
+ if (source == clearAllItem)
21932336 {
21942337 ClearSelection(true);
21952338 } else
2196
- if (event.getSource() == grabItem)
2339
+ if (source == grabItem)
21972340 {
21982341 group(new cGroup(), true);
21992342 } else
2200
- if (event.getSource() == hideItem)
2343
+ if (source == hideItem)
22012344 {
22022345 group(new HiddenObject());
22032346 } else
2204
- if (event.getSource() == frontItem)
2347
+ if (source == frontItem)
22052348 {
22062349 front();
22072350 } else
2208
- if (event.getSource() == backItem)
2351
+ if (source == backItem)
22092352 {
22102353 back();
22112354 } else
2212
- if (event.getSource() == cameraItem)
2355
+ if (source == cameraItem)
22132356 {
22142357 makeSomething(new Camera());
22152358 } else
2216
- if (event.getSource() == compositeItem)
2359
+ if (source == compositeItem)
22172360 {
22182361 group(new Composite());
22192362 } else
2220
- if (event.getSource() == randomItem)
2363
+ if (source == randomItem)
22212364 {
22222365 RandomNode random = new RandomNode();
22232366 group(random);
22242367 if (random.size() > 0)
2225
- random.name = random.get(0).name + "Rnd";
2368
+ random.name = random.get(0).name + "Switch";
22262369 } else
2227
- if (event.getSource() == physicsItem)
2370
+ if (source == physicsItem)
22282371 {
22292372 group(new PhysicsNode());
22302373 } else
2231
- if (event.getSource() == frameselectorItem)
2374
+ if (source == frameselectorItem)
22322375 {
22332376 for (int i=0; i<group.selection.size(); i++)
22342377 {
....@@ -2240,7 +2383,7 @@
22402383 ResetModel();
22412384 refreshContents();
22422385 } else
2243
- if (event.getSource() == switchGeoItem)
2386
+ if (source == switchGeoItem)
22442387 {
22452388 for (int i=0; i<group.selection.size(); i++)
22462389 {
....@@ -2252,7 +2395,7 @@
22522395 ResetModel();
22532396 refreshContents();
22542397 } else
2255
- if (event.getSource() == switchTransfoItem)
2398
+ if (source == switchTransfoItem)
22562399 {
22572400 for (int i=0; i<group.selection.size(); i++)
22582401 {
....@@ -2264,7 +2407,7 @@
22642407 ResetModel();
22652408 refreshContents();
22662409 } else
2267
- if (event.getSource() == morphItem)
2410
+ if (source == morphItem)
22682411 {
22692412 for (int i=0; i<group.selection.size(); i++)
22702413 {
....@@ -2276,7 +2419,7 @@
22762419 ResetModel();
22772420 refreshContents();
22782421 } else
2279
- if (event.getSource() == scriptNodeItem)
2422
+ if (source == scriptNodeItem)
22802423 {
22812424 boolean atleastone = false;
22822425
....@@ -2315,31 +2458,31 @@
23152458 }
23162459 }
23172460 } else
2318
- if (event.getSource() == linkerItem)
2461
+ if (source == linkerItem)
23192462 {
23202463 group(new cLinker());
23212464 } else
2322
- if (event.getSource() == textureItem)
2465
+ if (source == textureItem)
23232466 {
23242467 group(new TextureNode());
23252468 } else
2326
- if (event.getSource() == billboardItem)
2469
+ if (source == billboardItem)
23272470 {
23282471 group(new BillboardNode());
23292472 } else
2330
- if (event.getSource() == shadowXItem)
2473
+ if (source == shadowXItem)
23312474 {
23322475 CastShadow(0);
23332476 } else
2334
- if (event.getSource() == shadowYItem)
2477
+ if (source == shadowYItem)
23352478 {
23362479 CastShadow(1);
23372480 } else
2338
- if (event.getSource() == shadowZItem)
2481
+ if (source == shadowZItem)
23392482 {
23402483 CastShadow(2);
23412484 } else
2342
- if (event.getSource() == ungroupItem)
2485
+ if (source == ungroupItem)
23432486 {
23442487 //ungroup();
23452488 for (int i=0; i<group.selection.size(); i++)
....@@ -2351,179 +2494,187 @@
23512494
23522495 refreshContents();
23532496 } else
2354
- if (event.getSource() == genUVItem)
2497
+ if (source == genUVItem)
23552498 {
23562499 GenUV();
23572500 } else
2358
- if (event.getSource() == genNormalsCADItem)
2501
+ if (source == genNormalsCADItem)
23592502 {
23602503 GenNormals(true);
23612504 } else
2362
- if (event.getSource() == genNormalsMESHItem)
2505
+ if (source == genNormalsMESHItem)
23632506 {
23642507 GenNormals(true); // TODO
23652508 } else
2366
- if (event.getSource() == genNormalsORGANItem)
2509
+ if (source == genNormalsORGANItem)
23672510 {
23682511 GenNormals(false);
23692512 } else
2370
- if (event.getSource() == genNormalsMINEItem)
2513
+ if (source == genNormalsMINEItem)
23712514 {
23722515 GenNormalsMINE();
23732516 } else
2374
- if (event.getSource() == stripifyItem)
2517
+ if (source == stripifyItem)
23752518 {
23762519 Stripify();
23772520 } else
2378
- if (event.getSource() == unstripifyItem)
2521
+ if (source == unstripifyItem)
23792522 {
23802523 Unstripify();
23812524 } else
2382
- if (event.getSource() == trimItem)
2525
+ if (source == trimItem)
23832526 {
23842527 Trim();
23852528 } else
2386
- if (event.getSource() == untrimItem)
2529
+ if (source == untrimItem)
23872530 {
23882531 Untrim();
23892532 } else
2390
- if (event.getSource() == clearColorsItem)
2533
+ if (source == clearColorsItem)
23912534 {
23922535 ClearColors();
23932536 } else
2394
- if (event.getSource() == clearMaterialsItem)
2537
+ if (source == clearMaterialsItem)
23952538 {
23962539 ClearMaterials();
23972540 } else
2398
- if (event.getSource() == liveleavesItem)
2541
+ if (source == liveleavesItem)
23992542 {
24002543 LiveLeaves(true);
24012544 } else
2402
- if (event.getSource() == unliveleavesItem)
2545
+ if (source == unliveleavesItem)
24032546 {
24042547 LiveLeaves(false);
24052548 } else
2406
- if (event.getSource() == supportleavesItem)
2549
+ if (source == supportleavesItem)
24072550 {
24082551 SupportLeaves(true);
24092552 } else
2410
- if (event.getSource() == unsupportleavesItem)
2553
+ if (source == unsupportleavesItem)
24112554 {
24122555 SupportLeaves(false);
24132556 } else
2414
- if (event.getSource() == hideleavesItem)
2557
+ if (source == hideleavesItem)
24152558 {
24162559 HideLeaves(true);
24172560 } else
2418
- if (event.getSource() == showleavesItem)
2561
+ if (source == showleavesItem)
24192562 {
24202563 HideLeaves(false);
24212564 } else
2422
- if (event.getSource() == markleavesItem)
2565
+ if (source == markleavesItem)
24232566 {
24242567 MarkLeaves(true);
24252568 } else
2426
- if (event.getSource() == unmarkleavesItem)
2569
+ if (source == unmarkleavesItem)
24272570 {
24282571 MarkLeaves(false);
24292572 } else
2430
- if (event.getSource() == flipVItem)
2573
+ if (source == flipVItem)
24312574 {
24322575 FlipV(true);
24332576 } else
2434
- if (event.getSource() == unflipVItem)
2577
+ if (source == unflipVItem)
24352578 {
24362579 FlipV(false);
24372580 } else
2438
- if (event.getSource() == lowTexturesItem)
2581
+ if (source == lowTexturesItem)
24392582 {
24402583 SetTexRes(0);
24412584 } else
2442
- if (event.getSource() == normalTexturesItem)
2585
+ if (source == normalTexturesItem)
24432586 {
24442587 SetTexRes(1);
24452588 } else
2446
- if (event.getSource() == highTexturesItem)
2589
+ if (source == highTexturesItem)
24472590 {
24482591 SetTexRes(2);
24492592 } else
2450
- if (event.getSource() == veryhighTexturesItem)
2593
+ if (source == veryhighTexturesItem)
24512594 {
24522595 SetTexRes(3);
24532596 } else
2454
- if (event.getSource() == maxTexturesItem)
2597
+ if (source == maxTexturesItem)
24552598 {
24562599 SetTexRes(4);
24572600 } else
2458
- if (event.getSource() == panoTexturesItem)
2601
+ if (source == panoTexturesItem)
24592602 {
24602603 SetTexRes(5);
24612604 } else
2462
- if (event.getSource() == reverseNormalsItem)
2605
+ if (source == reverseNormalsItem)
24632606 {
24642607 ReverseNormals();
24652608 } else
2466
- if (event.getSource() == parseverticesItem)
2609
+ if (source == parseverticesItem)
24672610 {
24682611 ParseVertices();
24692612 } else
2470
- if (event.getSource() == textureFieldItem)
2613
+ if (source == textureFieldItem)
24712614 {
24722615 TextureVertices();
24732616 } else
2474
- if (event.getSource() == alignItem)
2617
+ if (source == alignItem)
24752618 {
24762619 Align();
24772620 } else
2478
- if (event.getSource() == mirrorItem)
2621
+ if (source == mirrorItem)
24792622 {
24802623 MirrorPoses();
24812624 } else
2482
- if (event.getSource() == reduceMorphItem)
2625
+ if (source == reduceMorphItem)
24832626 {
24842627 MeshReduction(false);
24852628 } else
2486
- if (event.getSource() == reduce34MorphItem)
2629
+ if (source == reduce34MorphItem)
24872630 {
24882631 MeshReduction(true);
24892632 } else
2490
- if (event.getSource() == reverseTrianglesItem)
2633
+ if (source == reverseTrianglesItem)
24912634 {
24922635 ReverseTriangles();
24932636 } else
2494
- if (event.getSource() == reduceMeshItem)
2637
+ if (source == reduceMeshItem)
24952638 {
24962639 ReduceMesh(false);
24972640 } else
2498
- if (event.getSource() == reduce34MeshItem)
2641
+ if (source == reduce34MeshItem)
24992642 {
25002643 ReduceMesh(true);
25012644 } else
2502
- if (event.getSource() == increaseMeshItem)
2645
+ if (source == increaseMeshItem)
25032646 {
25042647 IncreaseMesh();
25052648 } else
2506
- if (event.getSource() == clipMeshItem)
2649
+ if (source == clipMeshItem)
25072650 {
25082651 ClipMesh();
25092652 } else
2510
- if (event.getSource() == smoothMeshItem)
2653
+ if (source == smoothMeshItem)
25112654 {
25122655 SmoothMesh();
25132656 } else
2514
- if (event.getSource() == transformgeometryItem)
2657
+ if (source == transformGeometryItem)
25152658 {
25162659 TransformGeometry();
25172660 } else
2518
- if (event.getSource() == resetTransformItem)
2661
+ if (source == transformChildrenItem)
2662
+ {
2663
+ TransformChildren();
2664
+ } else
2665
+ if (source == resetTransformItem)
25192666 {
25202667 ResetTransform();
25212668 } else
2522
- if (event.getSource() == resetCentroidItem)
2669
+ if (source == resetCentroidItem)
25232670 {
2524
- ResetCentroid();
2671
+ ResetCentroid(true);
25252672 } else
2526
- if (event.getSource() == resetParentItem)
2673
+ if (source == resetCentroidXZItem)
2674
+ {
2675
+ ResetCentroid(false);
2676
+ } else
2677
+ if (source == resetParentItem)
25272678 {
25282679 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25292680 {
....@@ -2533,7 +2684,7 @@
25332684
25342685 refreshContents();
25352686 } else
2536
- if (event.getSource() == repairParentItem)
2687
+ if (source == repairParentItem)
25372688 {
25382689 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25392690 {
....@@ -2547,7 +2698,7 @@
25472698
25482699 refreshContents();
25492700 } else
2550
- if (event.getSource() == repairShadowItem)
2701
+ if (source == repairShadowItem)
25512702 {
25522703 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25532704 {
....@@ -2561,7 +2712,7 @@
25612712
25622713 refreshContents();
25632714 } else
2564
- if (event.getSource() == sortbysizeItem)
2715
+ if (source == sortbysizeItem)
25652716 {
25662717 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25672718 {
....@@ -2573,7 +2724,7 @@
25732724 ResetModel();
25742725 refreshContents();
25752726 } else
2576
- if (event.getSource() == sortbynameItem)
2727
+ if (source == sortbynameItem)
25772728 {
25782729 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25792730 {
....@@ -2585,7 +2736,7 @@
25852736 ResetModel();
25862737 refreshContents();
25872738 } else
2588
- if (event.getSource() == attachPigmentItem)
2739
+ if (source == attachPigmentItem)
25892740 {
25902741 String texture = GetFile("Attach pigment");
25912742 Object3D obj;
....@@ -2597,7 +2748,7 @@
25972748
25982749 refreshContents();
25992750 } else
2600
- if (event.getSource() == detachPigmentItem)
2751
+ if (source == detachPigmentItem)
26012752 {
26022753 Object3D obj;
26032754 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2608,7 +2759,7 @@
26082759
26092760 refreshContents();
26102761 } else
2611
- if (event.getSource() == attachBumpItem)
2762
+ if (source == attachBumpItem)
26122763 {
26132764 String texture = GetFile("Attach bump");
26142765 Object3D obj;
....@@ -2620,7 +2771,7 @@
26202771
26212772 refreshContents();
26222773 } else
2623
- if (event.getSource() == detachBumpItem)
2774
+ if (source == detachBumpItem)
26242775 {
26252776 Object3D obj;
26262777 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2631,7 +2782,7 @@
26312782
26322783 refreshContents();
26332784 } else
2634
- if (event.getSource() == pigmentBumpItem)
2785
+ if (source == pigmentBumpItem)
26352786 {
26362787 Object3D obj;
26372788 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2642,158 +2793,195 @@
26422793
26432794 refreshContents();
26442795 } else
2645
- if (event.getSource() == flashSelectionButton)
2796
+ if (source == flashSelectionButton)
26462797 {
26472798 CameraPane.flash = true;
26482799 refreshContents();
26492800 } else
2650
- if (event.getSource() == oneButton)
2801
+ if (source == oneButton)
26512802 {
26522803 } else
2653
- if (event.getSource() == twoButton)
2804
+ if (source == twoButton)
26542805 {
26552806 radio.layout = twoButton;
26562807 // bug
26572808 //gridPanel.setDividerLocation(1.0);
26582809 //bigPanel.setDividerLocation(0.0);
2659
- bigThree.remove(scenePanel);
2660
- bigThree.remove(centralPanel);
2661
- bigThree.remove(XYZPanel);
2662
- aWindowConstraints.gridx = 0;
2663
- aWindowConstraints.gridy = 0;
2664
- aWindowConstraints.gridwidth = 1;
2665
- // aConstraints.gridheight = 3;
2666
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2667
- aWindowConstraints.weightx = 0;
2668
- aWindowConstraints.weighty = 1;
2669
- //bigThree.add(jtp, aWindowConstraints);
2670
- aWindowConstraints.weightx = 1;
2671
- aWindowConstraints.gridwidth = 3;
2672
- // aConstraints.gridheight = 3;
2673
- aWindowConstraints.gridx = 1;
2674
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2675
- bigThree.add(centralPanel, aWindowConstraints);
2676
- aWindowConstraints.weightx = 0;
2677
- aWindowConstraints.gridx = 4;
2678
- aWindowConstraints.gridwidth = 1;
2679
- // aConstraints.gridheight = 3;
2680
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2681
- //bigThree.add(XYZPanel, aWindowConstraints);
2682
- bigThree.revalidate();
2810
+// bigThree.remove(scenePanel);
2811
+// bigThree.remove(centralPanel);
2812
+// bigThree.remove(XYZPanel);
2813
+// aWindowConstraints.gridx = 0;
2814
+// aWindowConstraints.gridy = 0;
2815
+// aWindowConstraints.gridwidth = 1;
2816
+// // aConstraints.gridheight = 3;
2817
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2818
+// aWindowConstraints.weightx = 0;
2819
+// aWindowConstraints.weighty = 1;
2820
+// //bigThree.add(jtp, aWindowConstraints);
2821
+// aWindowConstraints.weightx = 1;
2822
+// aWindowConstraints.gridwidth = 3;
2823
+// // aConstraints.gridheight = 3;
2824
+// aWindowConstraints.gridx = 1;
2825
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2826
+// bigThree.add(centralPanel, aWindowConstraints);
2827
+// aWindowConstraints.weightx = 0;
2828
+// aWindowConstraints.gridx = 4;
2829
+// aWindowConstraints.gridwidth = 1;
2830
+// // aConstraints.gridheight = 3;
2831
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2832
+// //bigThree.add(XYZPanel, aWindowConstraints);
2833
+// scenePanel.setVisible(false);
2834
+// centralPanel.setVisible(true);
2835
+// XYZPanel.setVisible(false);
2836
+ bigThree.ClearUI();
2837
+ bigThree.add(centralPanel);
2838
+ bigThree.FlushUI();
26832839 } else
2684
- if (event.getSource() == threeButton)
2840
+ if (source == threeButton)
26852841 {
26862842 radio.layout = threeButton;
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
- aConstraints.fill = GridBagConstraints.VERTICAL;
2709
- bigThree.add(XYZPanel, aWindowConstraints);
2710
- bigThree.revalidate();
2843
+
2844
+// bigThree.remove(scenePanel);
2845
+// bigThree.remove(centralPanel);
2846
+// bigThree.remove(XYZPanel);
2847
+// aWindowConstraints.gridx = 0;
2848
+// aWindowConstraints.gridy = 0;
2849
+// aWindowConstraints.gridwidth = 1;
2850
+// // aConstraints.gridheight = 3;
2851
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2852
+// aWindowConstraints.weightx = 0;
2853
+// aWindowConstraints.weighty = 1;
2854
+// //bigThree.add(jtp, aWindowConstraints);
2855
+// aWindowConstraints.weightx = 1;
2856
+// aWindowConstraints.gridwidth = 3;
2857
+// // aConstraints.gridheight = 3;
2858
+// aWindowConstraints.gridx = 1;
2859
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2860
+// bigThree.add(centralPanel, aWindowConstraints);
2861
+// aWindowConstraints.weightx = 0;
2862
+// aWindowConstraints.gridx = 4;
2863
+// aWindowConstraints.gridwidth = 1;
2864
+// // aConstraints.gridheight = 3;
2865
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2866
+// bigThree.add(XYZPanel, aWindowConstraints);
2867
+// bigThree.validate();
2868
+// scenePanel.setVisible(false);
2869
+// centralPanel.setVisible(true);
2870
+// XYZPanel.setVisible(true);
2871
+ bigThree.ClearUI();
2872
+ bigThree.add(centralPanel);
2873
+ bigThree.add(XYZPanel);
2874
+ bigThree.FlushUI();
27112875 } else
2712
- if (event.getSource() == fourButton)
2876
+ if (source == fourButton)
27132877 {
27142878 radio.layout = fourButton;
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
- // aWindowConstraints.gridheight = 3;
2722
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2723
- aWindowConstraints.weightx = 1;
2724
- aWindowConstraints.weighty = 1;
2725
- bigThree.add(scenePanel, 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(cameraPanel, aWindowConstraints);
2732
- aWindowConstraints.weightx = 0;
2733
- aWindowConstraints.gridx = 4;
2734
- aWindowConstraints.gridwidth = 1;
2735
- // aWindowConstraints.gridheight = 3;
2736
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2737
- //bigThree.add(XYZPanel, aWindowConstraints);
2738
- bigThree.revalidate();
2879
+
2880
+// bigThree.remove(scenePanel);
2881
+// bigThree.remove(centralPanel);
2882
+// bigThree.remove(XYZPanel);
2883
+// aWindowConstraints.gridx = 0;
2884
+// aWindowConstraints.gridy = 0;
2885
+// aWindowConstraints.gridwidth = 1;
2886
+// // aWindowConstraints.gridheight = 3;
2887
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2888
+// aWindowConstraints.weightx = 1;
2889
+// aWindowConstraints.weighty = 1;
2890
+// bigThree.add(scenePanel, aWindowConstraints);
2891
+// aWindowConstraints.weightx = 1;
2892
+// aWindowConstraints.gridwidth = 3;
2893
+// // aConstraints.gridheight = 3;
2894
+// aWindowConstraints.gridx = 1;
2895
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2896
+// //bigThree.add(cameraPanel, aWindowConstraints);
2897
+// aWindowConstraints.weightx = 0;
2898
+// aWindowConstraints.gridx = 4;
2899
+// aWindowConstraints.gridwidth = 1;
2900
+// // aWindowConstraints.gridheight = 3;
2901
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2902
+// //bigThree.add(XYZPanel, aWindowConstraints);
2903
+// bigThree.validate();
2904
+// scenePanel.setVisible(true);
2905
+// centralPanel.setVisible(false);
2906
+// XYZPanel.setVisible(false);
2907
+ bigThree.ClearUI();
2908
+ bigThree.add(scenePanel);
2909
+ bigThree.FlushUI();
27392910 } else
2740
- if (event.getSource() == sixButton)
2911
+ if (source == sixButton)
27412912 {
27422913 radio.layout = sixButton;
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
- // aConstraints.gridheight = 3;
2750
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2751
- aWindowConstraints.weightx = 0;
2752
- aWindowConstraints.weighty = 1;
2753
- bigThree.add(scenePanel, aWindowConstraints);
2754
- aWindowConstraints.weightx = 1;
2755
- aWindowConstraints.gridwidth = 3;
2756
- // aWindowConstraints.gridheight = 3;
2757
- aWindowConstraints.gridx = 1;
2758
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2759
- bigThree.add(centralPanel, 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, aConstraints);
2766
- bigThree.revalidate();
2914
+
2915
+// bigThree.remove(scenePanel);
2916
+// bigThree.remove(centralPanel);
2917
+// bigThree.remove(XYZPanel);
2918
+// aWindowConstraints.gridx = 0;
2919
+// aWindowConstraints.gridy = 0;
2920
+// aWindowConstraints.gridwidth = 1;
2921
+// // aConstraints.gridheight = 3;
2922
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2923
+// aWindowConstraints.weightx = 0;
2924
+// aWindowConstraints.weighty = 1;
2925
+// bigThree.add(scenePanel, aWindowConstraints);
2926
+// aWindowConstraints.weightx = 1;
2927
+// aWindowConstraints.gridwidth = 3;
2928
+// // aWindowConstraints.gridheight = 3;
2929
+// aWindowConstraints.gridx = 1;
2930
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2931
+// bigThree.add(centralPanel, aWindowConstraints);
2932
+// aWindowConstraints.weightx = 0;
2933
+// aWindowConstraints.gridx = 4;
2934
+// aWindowConstraints.gridwidth = 1;
2935
+// // aWindowConstraints.gridheight = 3;
2936
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2937
+// //bigThree.add(XYZPanel, aConstraints);
2938
+// bigThree.validate();
2939
+// scenePanel.setVisible(true);
2940
+// centralPanel.setVisible(true);
2941
+// XYZPanel.setVisible(false);
2942
+ bigThree.ClearUI();
2943
+ bigThree.add(scenePanel);
2944
+ bigThree.add(centralPanel);
2945
+ bigThree.FlushUI();
27672946 } else
2768
- if (event.getSource() == sevenButton)
2947
+ if (source == sevenButton)
27692948 {
27702949 radio.layout = sevenButton;
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
- // aWindowConstraints.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
- // aConstraints.gridheight = 3;
2792
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2793
- bigThree.add(XYZPanel, aWindowConstraints);
2794
- bigThree.revalidate();
2950
+
2951
+// bigThree.remove(scenePanel);
2952
+// bigThree.remove(centralPanel);
2953
+// bigThree.remove(XYZPanel);
2954
+// aWindowConstraints.gridx = 0;
2955
+// aWindowConstraints.gridy = 0;
2956
+// aWindowConstraints.gridwidth = 1;
2957
+// // aWindowConstraints.gridheight = 3;
2958
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2959
+// aWindowConstraints.weightx = 0;
2960
+// aWindowConstraints.weighty = 1;
2961
+// bigThree.add(scenePanel, aWindowConstraints);
2962
+// aWindowConstraints.weightx = 1;
2963
+// aWindowConstraints.gridwidth = 3;
2964
+// // aWindowConstraints.gridheight = 3;
2965
+// aWindowConstraints.gridx = 1;
2966
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2967
+// bigThree.add(centralPanel, aWindowConstraints);
2968
+// aWindowConstraints.weightx = 0;
2969
+// aWindowConstraints.gridx = 4;
2970
+// aWindowConstraints.gridwidth = 1;
2971
+// // aConstraints.gridheight = 3;
2972
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2973
+// bigThree.add(XYZPanel, aWindowConstraints);
2974
+// bigThree.validate();
2975
+// scenePanel.setVisible(true);
2976
+// centralPanel.setVisible(true);
2977
+// XYZPanel.setVisible(true);
2978
+ bigThree.ClearUI();
2979
+ bigThree.add(scenePanel);
2980
+ bigThree.add(centralPanel);
2981
+ bigThree.add(XYZPanel);
2982
+ bigThree.FlushUI();
27952983 } else
2796
- if (event.getSource() == rootButton)
2984
+ if (source == rootButton)
27972985 {
27982986 Object3D obj;
27992987 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2805,7 +2993,7 @@
28052993
28062994 refreshContents(true);
28072995 } else
2808
- if (event.getSource() == closeButton)
2996
+ if (source == closeButton)
28092997 {
28102998 //System.out.println("CLOSE: " + buttonGroup.getSelection());
28112999 cRadio ab;
....@@ -2826,11 +3014,11 @@
28263014 }
28273015 refreshContents(true);
28283016 } else
2829
- if (event.getSource() == editItem || event.getSource() == editButton)
3017
+ if (source == editItem || source == editButton)
28303018 {
28313019 EditSelection(false);
28323020 } else
2833
- if (event.getSource() == uneditButton)
3021
+ if (source == uneditButton)
28343022 {
28353023 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28363024 {
....@@ -2842,12 +3030,12 @@
28423030
28433031 child.editWindow = null; // ???????????
28443032 }
2845
- objEditor.ctrlPanel.revalidate();
3033
+ objEditor.ctrlPanel.FlushUI();
28463034 //objEditor.jTree.clearSelection();
28473035 //objEditor.ResetSliders();
28483036 refreshContents(true);
28493037 } else
2850
- if (event.getSource() == clearPanelButton)
3038
+ if (source == clearPanelButton)
28513039 {
28523040 assert(copy == group);
28533041 //copy.ClearUI();
....@@ -2858,7 +3046,7 @@
28583046 listUI.clear();
28593047 refreshContents(true);
28603048 } else
2861
- if (event.getSource() == allParamsButton)
3049
+ if (source == allParamsButton)
28623050 {
28633051 assert(copy == group);
28643052
....@@ -2879,19 +3067,19 @@
28793067
28803068 refreshContents(true);
28813069 } else
2882
- if (event.getSource() == unselectButton)
3070
+ if (source == unselectButton)
28833071 {
28843072 objEditor.jTree.clearSelection();
28853073 // ?? oct 2012 GrafreeD.clipboard.clear();
28863074 objEditor.ResetSliders();
28873075 refreshContents(true);
28883076 } else
2889
- if(event.getSource() instanceof cRadio)
3077
+ if(source instanceof cRadio)
28903078 {
28913079 group.parent = keepparent;
28923080 group.attributes = 0;
28933081 //group.editWindow = null;
2894
- /*cRadio*/ radio = (cRadio)event.getSource();
3082
+ /*cRadio*/ radio = (cRadio)source;
28953083 Object3D obj = radio.GetObject();
28963084 System.out.println("Edit " + obj);
28973085 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2911,7 +3099,7 @@
29113099 }
29123100
29133101 copy = group;
2914
- //CameraPane.theRenderer.object = group;
3102
+ //Globals.theRenderer.object = group;
29153103 if(!useclient)
29163104 {
29173105 cameraView.renderCamera = radio.camera;
....@@ -2926,7 +3114,9 @@
29263114 frontView.object = group;
29273115 sideView.object = group;
29283116 }
2929
- group.editWindow = this;
3117
+
3118
+// fix "+" issue group.editWindow = this;
3119
+
29303120 /*
29313121 currentLayout = radio.layout;
29323122 if (currentLayout == null)
....@@ -2939,7 +3129,20 @@
29393129 //group.attributes = -1;
29403130 ResetModel();
29413131 refreshContents(true);
2942
- }
3132
+ } else if (event.getSource() == editCameraItem)
3133
+ {
3134
+ cameraView.ProtectCamera();
3135
+ cameraView.repaint();
3136
+ return;
3137
+ } else if (event.getSource() == revertCameraItem)
3138
+ {
3139
+ cameraView.RevertCamera();
3140
+ cameraView.repaint();
3141
+ return;
3142
+ // } else if (event.getSource() == textureButton)
3143
+ // {
3144
+ // return; // true;
3145
+ }
29433146 else
29443147 {
29453148 //return super.action(event, arg);
....@@ -3000,6 +3203,28 @@
30003203 refreshContents();
30013204 }
30023205
3206
+ void TransformChildren()
3207
+ {
3208
+ Object3D obj;
3209
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3210
+ {
3211
+ obj = (Object3D)e.nextElement();
3212
+ obj.KeepTextureMatrices();
3213
+ obj.TransformChildren();
3214
+ obj.RestoreTextureMatrices();
3215
+
3216
+// if (obj.parent == null)
3217
+// {
3218
+// System.out.println("NULL PARENT!");
3219
+// new Exception().printStackTrace();
3220
+// }
3221
+// else
3222
+// TouchTransform(obj);
3223
+// //obj.parent.Touch();
3224
+ }
3225
+
3226
+ refreshContents();
3227
+ }
30033228
30043229 void ResetTransform()
30053230 {
....@@ -3112,7 +3337,7 @@
31123337 refreshContents();
31133338 }
31143339
3115
- void ResetCentroid()
3340
+ void ResetCentroid(boolean full)
31163341 {
31173342 Object3D obj;
31183343 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3127,12 +3352,16 @@
31273352 LA.matIdentity(Object3D.mat);
31283353 obj.getBounds(minima, maxima, false);
31293354 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3130
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3355
+ if (full)
3356
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
31313357 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
31323358 obj.TransformMesh(Object3D.mat);
3359
+
31333360 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3134
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3361
+ if (full)
3362
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
31353363 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3364
+
31363365 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
31373366 //Object3D.mat[3][0] = -Object3D.mat[3][0];
31383367 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3198,9 +3427,9 @@
31983427 obj = (Object3D)e.nextElement();
31993428
32003429 System.out.println("Object is: " + obj);
3201
- GrafreeD.AnalyzeObject(obj);
3430
+ Grafreed.AnalyzeObject(obj);
32023431 System.out.println("Boundary rep: " + obj.bRep);
3203
- GrafreeD.AnalyzeObject(obj.bRep);
3432
+ Grafreed.AnalyzeObject(obj.bRep);
32043433
32053434 // System.err.println((size/1024) + " KB is the size of " + obj);
32063435 }
....@@ -3414,8 +3643,8 @@
34143643
34153644 void ParseVertices()
34163645 {
3417
- boolean epsequal = GrafreeD.epsequal;
3418
- GrafreeD.epsequal = true;
3646
+ boolean epsequal = Grafreed.epsequal;
3647
+ Grafreed.epsequal = true;
34193648
34203649 for (int i=0; i<group.selection.size(); i++)
34213650 {
....@@ -3440,7 +3669,7 @@
34403669 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
34413670 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
34423671
3443
- g.add(GrafreeD.clipboard);
3672
+ g.add(Grafreed.clipboard);
34443673
34453674 buffer.add(g);
34463675 }
....@@ -3455,7 +3684,7 @@
34553684 makeSomething(buffer, i==group.selection.size()-1);
34563685 }
34573686
3458
- GrafreeD.epsequal = epsequal;
3687
+ Grafreed.epsequal = epsequal;
34593688
34603689 refreshContents();
34613690 }
....@@ -3473,7 +3702,16 @@
34733702 String pigment = Object3D.GetPigment(tex);
34743703 //String bump = Object3D.GetBump(tex);
34753704
3476
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3705
+ com.sun.opengl.util.texture.TextureData texturedata = null;
3706
+
3707
+ try
3708
+ {
3709
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3710
+ }
3711
+ catch (Exception e)
3712
+ {
3713
+ System.err.println("FAIL: " + node);
3714
+ }
34773715
34783716 double s = v.s;
34793717
....@@ -3561,11 +3799,11 @@
35613799
35623800 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
35633801
3564
- boolean random = CameraPane.RANDOM;
3565
- CameraPane.RANDOM = false; // parse all random nodes
3802
+ boolean random = CameraPane.SWITCH;
3803
+ CameraPane.SWITCH = false; // parse all random nodes
35663804 lowres.linkVerticesThis(null);
35673805 lowres.linkVerticesThis(sn);
3568
- CameraPane.RANDOM = random;
3806
+ CameraPane.SWITCH = random;
35693807
35703808 System.err.flush();
35713809
....@@ -3605,7 +3843,7 @@
36053843 return;
36063844
36073845 Object3D poses = group.selection.get(0);
3608
- Object3D ref = GrafreeD.clipboard.get(0);
3846
+ Object3D ref = Grafreed.clipboard.get(0);
36093847
36103848 Object3D newgroup = new Object3D("Po:" + poses.name);
36113849
....@@ -3774,7 +4012,7 @@
37744012 group.selection.RelinkToSupport(); // july 2014
37754013 System.out.println("DONE.");
37764014 refreshContents();
3777
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
4015
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
37784016 }
37794017
37804018 void ReduceMesh(boolean reduction34)
....@@ -3799,9 +4037,9 @@
37994037
38004038 void ClipMesh()
38014039 {
3802
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
4040
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
38034041 {
3804
- Object3D content = GrafreeD.clipboard.get(0);
4042
+ Object3D content = Grafreed.clipboard.get(0);
38054043
38064044 if (content instanceof cGroup && ((cGroup)content).transientlink )
38074045 content = ((cGroup)content).get(0);
....@@ -3810,7 +4048,7 @@
38104048 // {
38114049 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
38124050 // }
3813
- group.selection.ClipMesh(GrafreeD.clipboard);
4051
+ group.selection.ClipMesh(Grafreed.clipboard);
38144052 }
38154053 // group.selection.ClipMesh(GrafreeD.clipboard);
38164054 System.out.println("DONE.");
....@@ -3945,7 +4183,7 @@
39454183 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
39464184
39474185 Object3D elem = (Object3D)group.selection.elementAt(i);
3948
- if(elem != group)
4186
+ if(elem != group || !newWindow)
39494187 {
39504188 // if (!(elem instanceof Composite))
39514189 // newWindow = false;
....@@ -4050,12 +4288,12 @@
40504288 System.err.println("info : " + child.GetPath());
40514289 }
40524290 }
4053
- else
4054
- {
4055
- objEditor.SetMaterial(group); // .GetMaterial());
4056
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4057
- System.err.println("info : " + group.GetPath());
4058
- }
4291
+// else
4292
+// {
4293
+// objEditor.SetMaterial(group); // .GetMaterial());
4294
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4295
+// System.err.println("info : " + group.GetPath());
4296
+// }
40594297
40604298 objEditor.SetText(); // jan 2014
40614299
....@@ -4066,9 +4304,9 @@
40664304 // a camera
40674305 {
40684306 CameraPane.camerachangeframe = 0; // don't refuse it
4069
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4070
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
4071
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4307
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4308
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4309
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
40724310 }
40734311
40744312 refreshContents();
....@@ -4150,12 +4388,12 @@
41504388 {
41514389 if (group.selection.isEmpty())
41524390 return;
4153
- GrafreeD.clipboardIsTempGroup = false;
4391
+ Grafreed.clipboardIsTempGroup = false;
41544392 Composite tGroup = null;
41554393 if (group.selection.size() > 0) // 1)
41564394 {
41574395 tGroup = new cGroup();
4158
- GrafreeD.clipboardIsTempGroup = true;
4396
+ Grafreed.clipboardIsTempGroup = true;
41594397 }
41604398
41614399 if (cut)
....@@ -4195,16 +4433,16 @@
41954433 //System.out.println("cut " + child);
41964434 //System.out.println("parent = " + child.parent);
41974435 // tmp.addChild(child);
4198
- if (GrafreeD.clipboardIsTempGroup)
4436
+ if (Grafreed.clipboardIsTempGroup)
41994437 tGroup.add/*Child*/(tmp);
42004438 else
4201
- GrafreeD.clipboard = tmp;
4439
+ Grafreed.clipboard = tmp;
42024440 }
42034441 else
4204
- if (GrafreeD.clipboardIsTempGroup)
4442
+ if (Grafreed.clipboardIsTempGroup)
42054443 tGroup.add/*Child*/(child);
42064444 else
4207
- GrafreeD.clipboard = child;
4445
+ Grafreed.clipboard = child;
42084446 }
42094447
42104448 //ResetModel();
....@@ -4236,21 +4474,21 @@
42364474 //System.out.println("cut " + elem);
42374475 //System.out.println("parent = " + elem.parent);
42384476 // tmp.addChild(elem);
4239
- if (GrafreeD.clipboardIsTempGroup)
4477
+ if (Grafreed.clipboardIsTempGroup)
42404478 tGroup.add/*Child*/(tmp);
42414479 else
4242
- GrafreeD.clipboard = tmp;
4480
+ Grafreed.clipboard = tmp;
42434481 }
42444482 else
4245
- if (GrafreeD.clipboardIsTempGroup)
4483
+ if (Grafreed.clipboardIsTempGroup)
42464484 tGroup.add/*Child*/(child);
42474485 else
4248
- GrafreeD.clipboard = child;
4486
+ Grafreed.clipboard = child;
42494487 }
42504488
42514489 }
4252
- if (GrafreeD.clipboardIsTempGroup)
4253
- GrafreeD.clipboard = tGroup;
4490
+ if (Grafreed.clipboardIsTempGroup)
4491
+ Grafreed.clipboard = tGroup;
42544492 if (cut)
42554493 {
42564494 ResetModel();
....@@ -4264,7 +4502,7 @@
42644502 // return;
42654503 boolean first = true;
42664504
4267
- if (GrafreeD.clipboardIsTempGroup)
4505
+ if (Grafreed.clipboardIsTempGroup)
42684506 {
42694507 Composite temp;
42704508
....@@ -4275,7 +4513,7 @@
42754513 temp = (Composite)Applet3D.clipboard.deepCopy();
42764514 */
42774515 Object3D elem;
4278
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4516
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
42794517 {
42804518 Object3D child = (Object3D)e.nextElement();
42814519
....@@ -4309,21 +4547,21 @@
43094547 //Object3D cb = Applet3D.clipboard;
43104548 //temp.addChild(cb);
43114549 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4312
- assert(GrafreeD.clipboard.parent == null);
4313
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4314
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4315
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4316
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
4550
+ assert(Grafreed.clipboard.parent == null);
4551
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4552
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4553
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4554
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
43174555 else
4318
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4319
- GrafreeD.clipboard.get(0).parent = keepparent;
4556
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4557
+ Grafreed.clipboard.get(0).parent = keepparent;
43204558 }
43214559
43224560 ResetModel();
43234561 refreshContents();
43244562 }
43254563
4326
- void pasteInto(boolean copyit)
4564
+ void pasteInto(boolean copyit, boolean clone)
43274565 {
43284566 // if (GrafreeD.clipboard == null)
43294567 // return;
....@@ -4352,15 +4590,22 @@
43524590 if (copyit)
43534591 {
43544592 // paste(false);
4355
- CloneClipboard(false); // sept 2014
4593
+ if (clone)
4594
+ {
4595
+ CloneClipboard(false); // sept 2014
4596
+ }
4597
+ else
4598
+ {
4599
+ paste(false);
4600
+ }
43564601 }
43574602 else
43584603 {
43594604 boolean first = true;
43604605
4361
- if (GrafreeD.clipboardIsTempGroup)
4606
+ if (Grafreed.clipboardIsTempGroup)
43624607 {
4363
- Composite temp = (Composite)GrafreeD.clipboard;
4608
+ Composite temp = (Composite)Grafreed.clipboard;
43644609 Object3D copy;
43654610 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
43664611 {
....@@ -4370,7 +4615,7 @@
43704615 }
43714616 } else
43724617 {
4373
- linkSomething(GrafreeD.clipboard); //.get(0));
4618
+ linkSomething(Grafreed.clipboard); //.get(0));
43744619 }
43754620 }
43764621 }
....@@ -4775,21 +5020,6 @@
47755020 }
47765021 */
47775022
4778
- void ImportGFD()
4779
- {
4780
- FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
4781
- browser.show();
4782
- String filename = browser.getFile();
4783
- if (filename != null && filename.length() > 0)
4784
- {
4785
- String fullname = browser.getDirectory() + filename;
4786
-
4787
- //Object3D readobj =
4788
- objEditor.ReadGFD(fullname, objEditor);
4789
- //makeSomething(readobj);
4790
- }
4791
- }
4792
-
47935023 /*
47945024 public void Callback(Object obj)
47955025 {
....@@ -4813,26 +5043,9 @@
48135043 }
48145044 */
48155045
4816
- void ImportVRMLX3D()
4817
- {
4818
- if (GrafreeD.standAlone)
4819
- {
4820
- /**/
4821
- FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
4822
- browser.show();
4823
- String filename = browser.getFile();
4824
- if (filename != null && filename.length() > 0)
4825
- {
4826
- String fullname = browser.getDirectory() + filename;
4827
- LoadVRMLX3D(fullname);
4828
- }
4829
- /**/
4830
- }
4831
- }
4832
-
48335046 String GetFile(String dialogName)
48345047 {
4835
- if (GrafreeD.standAlone)
5048
+ if (Grafreed.standAlone)
48365049 {
48375050 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
48385051 browser.show();
....@@ -4896,10 +5109,12 @@
48965109 cButton flashSelectionButton;
48975110 cButton editButton;
48985111 cButton uneditButton;
5112
+ JCheckBox allParamsButton;
48995113 cButton clearpanelButton;
4900
- cButton allParamsButton;
49015114 cButton unselectButton;
49025115
5116
+ cButton oneStepButton;
5117
+
49035118 cButton screenfitButton;
49045119 cButton screenfitpointButton;
49055120 cButton snapobjectButton;
....@@ -4943,7 +5158,7 @@
49435158 private MenuItem linkverticesItem;
49445159 private MenuItem relinkverticesItem;
49455160 private MenuItem setMasterItem;
4946
- private MenuItem resetMeshItem;
5161
+ private MenuItem resetAllItem;
49475162 private MenuItem stepAllItem;
49485163 private MenuItem revertMeshItem;
49495164 private MenuItem poseMeshItem;
....@@ -4954,6 +5169,7 @@
49545169 private MenuItem mergeGeometriesItem;
49555170 private MenuItem copyItem;
49565171 private MenuItem pasteItem;
5172
+ private MenuItem pasteIntoItem;
49575173 private MenuItem pasteLinkItem;
49585174 private MenuItem pasteCloneItem;
49595175 private MenuItem pasteExpandItem;
....@@ -5003,8 +5219,10 @@
50035219 private MenuItem panoTexturesItem;
50045220
50055221 private MenuItem resetCentroidItem;
5006
- private MenuItem transformgeometryItem;
5222
+ private MenuItem resetCentroidXZItem;
50075223 private MenuItem resetTransformItem;
5224
+ private MenuItem transformGeometryItem;
5225
+ private MenuItem transformChildrenItem;
50085226 private MenuItem hideItem;
50095227 private MenuItem grabItem;
50105228 private MenuItem backItem;
....@@ -5051,7 +5269,7 @@
50515269 private MenuItem blobItem;
50525270 private MenuItem latheItem;
50535271 private MenuItem bezierItem;
5054
- private MenuItem checkerItem;
5272
+ private MenuItem overlayItem;
50555273 private MenuItem meshItem;
50565274 // private MenuItem meshGroupItem;
50575275 private MenuItem springItem;
....@@ -5073,11 +5291,6 @@
50735291 private MenuItem doubleItem;
50745292 private MenuItem tripleItem;
50755293
5076
- private MenuItem importGFDItem;
5077
- private MenuItem importVRMLX3DItem;
5078
- private MenuItem import3DSItem;
5079
- private MenuItem importOBJItem;
5080
-
50815294 private MenuItem computeAOItem;
50825295 private MenuItem recompileItem;
50835296 private MenuItem editScriptItem;
....@@ -5087,4 +5300,8 @@
50875300 private MenuItem analyzeItem;
50885301 private MenuItem dumpItem;
50895302 //boolean freezemodel = false;
5303
+
5304
+ Menu cameraMenu;
5305
+ MenuItem editCameraItem;
5306
+ MenuItem revertCameraItem;
50905307 }