Normand Briere
2019-06-09 8558ae86e65457c512a26339d3660d79eee16ae6
GroupEditor.java
....@@ -12,6 +12,7 @@
1212 import com.jme.math.Vector3f;
1313 import com.jme.renderer.ColorRGBA;
1414
15
+import grafeme.ui.*;
1516 //import buoy.widget.BFileChooser;
1617
1718 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
....@@ -73,7 +74,7 @@
7374 this.copy = this.group = copy;
7475 //selectees = this.group.selectees;
7576
76
- SetupMenu2(objEditor);
77
+ SetupMenu2(this); //objEditor);
7778 SetupUI2(objEditor);
7879 objEditor.SetupUI(true);
7980 SetupViews(objEditor);
....@@ -97,14 +98,14 @@
9798
9899 void CloneClipboard(boolean supports)
99100 {
100
- assert(GrafreeD.clipboard.parent == null);
101
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
102
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
103
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
104
- makeSomething(CloneObject(GrafreeD.clipboard.get(0), false));
101
+ assert(Grafreed.clipboard.parent == null);
102
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
103
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
104
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
105
+ makeSomething(CloneObject(Grafreed.clipboard.get(0), false));
105106 else
106
- makeSomething(CloneObject(GrafreeD.clipboard, false));
107
- GrafreeD.clipboard.get(0).parent = keepparent;
107
+ makeSomething(CloneObject(Grafreed.clipboard, false));
108
+ Grafreed.clipboard.get(0).parent = keepparent;
108109 }
109110
110111 static Object3D CloneObject(Object3D obj, boolean supports)
....@@ -118,7 +119,7 @@
118119 // obj.support = null;
119120 if (!supports)
120121 obj.SaveSupports();
121
- Object3D clone = (Object3D)GrafreeD.clone(obj);
122
+ Object3D clone = (Object3D)Grafreed.clone(obj);
122123 obj.parent = parent;
123124 // obj.support = support;
124125 // clone.support = support; // aout 2013
....@@ -147,8 +148,129 @@
147148
148149 //JTextField nameField;
149150
150
- void SetupMenu2(ObjEditor oe)
151
+ void SetupMenu2(GroupEditor oe)
151152 {
153
+ Menu menu;
154
+ oe.menuBar.add(menu = new Menu("Edit"));
155
+ //editItem = menu.add(new MenuItem("Edit"));
156
+ //editItem.addActionListener(this);
157
+ undoItem = menu.add(new MenuItem("Undo"));
158
+ undoItem.addActionListener(this);
159
+ redoItem = menu.add(new MenuItem("Redo"));
160
+ redoItem.addActionListener(this);
161
+ menu.add("-");
162
+ duplicateItem = menu.add(new MenuItem("Duplicate"));
163
+ duplicateItem.addActionListener(this);
164
+ cloneItem = menu.add(new MenuItem("Clone"));
165
+ cloneItem.addActionListener(this);
166
+ if (Globals.ADVANCED)
167
+ {
168
+ cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
169
+ cloneSupportItem.addActionListener(this);
170
+ }
171
+ menu.add("-");
172
+ cutItem = menu.add(new MenuItem("Cut"));
173
+ cutItem.addActionListener(this);
174
+ copyItem = menu.add(new MenuItem("Copy"));
175
+ copyItem.addActionListener(this);
176
+ pasteItem = menu.add(new MenuItem("Paste"));
177
+ pasteItem.addActionListener(this);
178
+ menu.add("-");
179
+
180
+ menu.add("-");
181
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
182
+ pasteIntoItem.addActionListener(this);
183
+ pasteLinkItem = menu.add(new MenuItem("Paste link"));
184
+ pasteLinkItem.addActionListener(this);
185
+ pasteCloneItem = menu.add(new MenuItem("Paste clone"));
186
+ pasteCloneItem.addActionListener(this);
187
+// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
188
+// pasteExpandItem.addActionListener(this);
189
+ menu.add("-");
190
+ clearItem = menu.add(new MenuItem("Clear"));
191
+ clearItem.addActionListener(this);
192
+
193
+ if (Globals.ADVANCED)
194
+ {
195
+ // Deletes the cameras...
196
+ clearAllItem = menu.add(new MenuItem("Clear All"));
197
+ clearAllItem.addActionListener(this);
198
+ }
199
+
200
+ menuBar.add(cameraMenu = new Menu("View"));
201
+ //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
202
+ //zBufferItem.addActionListener(this);
203
+ //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
204
+ //normalLensItem.addActionListener(this);
205
+ cameraMenu.add(revertCameraItem = new MenuItem("Restore Camera"));
206
+ revertCameraItem.addActionListener(this);
207
+
208
+ cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
209
+ toggleFullScreenItem.addItemListener(this);
210
+ toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
211
+ cameraMenu.add("-");
212
+
213
+ cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
214
+ toggleTextureItem.addItemListener(this);
215
+ toggleTextureItem.setState(CameraPane.textureon);
216
+
217
+ cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
218
+ toggleSwitchItem.addItemListener(this);
219
+ toggleSwitchItem.setState(CameraPane.SWITCH);
220
+
221
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
222
+ toggleHandleItem.addItemListener(this);
223
+ toggleHandleItem.setState(CameraPane.HANDLES);
224
+
225
+ cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
226
+ togglePaintItem.addItemListener(this);
227
+ togglePaintItem.setState(CameraPane.PAINTMODE);
228
+
229
+ if (Globals.ADVANCED)
230
+ {
231
+ cameraMenu.add("-");
232
+ cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
233
+ toggleLiveItem.addItemListener(this);
234
+ toggleLiveItem.setState(Globals.isLIVE());
235
+
236
+ cameraMenu.add(stepItem = new MenuItem("Step"));
237
+ stepItem.addActionListener(this);
238
+ // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
239
+ // toggleDLItem.addItemListener(this);
240
+ // toggleDLItem.setState(false);
241
+
242
+ cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
243
+ toggleRenderItem.addItemListener(this);
244
+ toggleRenderItem.setState(!CameraPane.frozen);
245
+
246
+ cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
247
+ toggleDebugItem.addItemListener(this);
248
+ toggleDebugItem.setState(CameraPane.DEBUG);
249
+
250
+ cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
251
+ toggleFrustumItem.addItemListener(this);
252
+ toggleFrustumItem.setState(CameraPane.FRUSTUM);
253
+
254
+ cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
255
+ toggleFootContactItem.addItemListener(this);
256
+ toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
257
+
258
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
259
+ toggleTimelineItem.addItemListener(this);
260
+ }
261
+
262
+// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
263
+// toggleRootItem.addItemListener(this);
264
+// toggleRootItem.setState(false);
265
+// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
266
+// animationItem.addItemListener(this);
267
+// animationItem.setState(CameraPane.ANIMATION);
268
+ cameraMenu.add("-");
269
+ cameraMenu.add(editCameraItem = new MenuItem("Save Camera"));
270
+ editCameraItem.addActionListener(this);
271
+
272
+ if (Globals.ADVANCED)
273
+ {
152274 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
153275 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
154276 //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
....@@ -160,45 +282,17 @@
160282 lookAtItem.addActionListener(this);
161283 //lookFromItem.addActinoListener(this);
162284 //switchItem.addActionListener(this);
163
- Menu menu;
164
- oe.menuBar.add(menu = new Menu("Edit"));
165
- //editItem = menu.add(new MenuItem("Edit"));
166
- //editItem.addActionListener(this);
167
- duplicateItem = menu.add(new MenuItem("Duplicate"));
168
- duplicateItem.addActionListener(this);
169
- menu.add("-");
170
- cloneItem = menu.add(new MenuItem("Clone"));
171
- cloneItem.addActionListener(this);
172
- cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
173
- cloneSupportItem.addActionListener(this);
174
- menu.add("-");
175
- cutItem = menu.add(new MenuItem("Cut"));
176
- cutItem.addActionListener(this);
177
- copyItem = menu.add(new MenuItem("Copy"));
178
- copyItem.addActionListener(this);
179
- pasteItem = menu.add(new MenuItem("Paste"));
180
- pasteItem.addActionListener(this);
181
- pasteLinkItem = menu.add(new MenuItem("Paste link"));
182
- pasteLinkItem.addActionListener(this);
183
- pasteCloneItem = menu.add(new MenuItem("Paste clone"));
184
- pasteCloneItem.addActionListener(this);
185
-// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
186
-// pasteExpandItem.addActionListener(this);
187
- clearItem = menu.add(new MenuItem("Clear"));
188
- clearItem.addActionListener(this);
189
- clearAllItem = menu.add(new MenuItem("Clear All"));
190
- clearAllItem.addActionListener(this);
191
-
285
+ }
286
+
192287 oe.menuBar.add(menu = new Menu("Setting"));
193
- resetMeshItem = menu.add(new MenuItem("Reset All"));
194
- resetMeshItem.addActionListener(this);
195
- stepAllItem = menu.add(new MenuItem("Step All"));
196
- stepAllItem.addActionListener(this);
288
+ if (Globals.ADVANCED)
289
+ {
197290 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
198291 revertMeshItem.addActionListener(this);
199292 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
200293 resetreferencesItem.addActionListener(this);
201294 menu.add("-");
295
+ }
202296 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
203297 overwriteGeoItem.addActionListener(this);
204298 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -210,19 +304,26 @@
210304 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
211305 overwriteUVItem.addActionListener(this);
212306 menu.add("-");
307
+ if (Globals.ADVANCED)
308
+ {
213309 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
214310 generateMeshItem.addActionListener(this);
215311 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
216312 poseMeshItem.addActionListener(this);
217313 menu.add("-");
314
+ }
218315 resetsupportItem = menu.add(new MenuItem("Reset support"));
219316 resetsupportItem.addActionListener(this);
220317 linkverticesItem = menu.add(new MenuItem("Link to Support"));
221318 linkverticesItem.addActionListener(this);
222319 relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
223320 relinkverticesItem.addActionListener(this);
321
+
322
+ if (Globals.ADVANCED)
323
+ {
224324 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
225325 setMasterItem.addActionListener(this);
326
+ }
226327
227328 oe.menuBar.add(menu = new Menu("Group"));
228329 grabItem = menu.add(new MenuItem("Grab"));
....@@ -233,27 +334,32 @@
233334 frontItem.addActionListener(this);
234335 compositeItem = menu.add(new MenuItem("Composite"));
235336 compositeItem.addActionListener(this);
236
- hideItem = menu.add(new MenuItem("Hide"));
337
+ hideItem = menu.add(new MenuItem("Hidden Group"));
237338 hideItem.addActionListener(this);
238339 ungroupItem = menu.add(new MenuItem("Ungroup"));
239340 ungroupItem.addActionListener(this);
240341 menu.add("-");
241
- randomItem = menu.add(new MenuItem("Random"));
342
+ randomItem = menu.add(new MenuItem("Switch node"));
242343 randomItem.addActionListener(this);
243
- physicsItem = menu.add(new MenuItem("Physics"));
244
- physicsItem.addActionListener(this);
245
- frameselectorItem = menu.add(new MenuItem("Frame Selector"));
246
- frameselectorItem.addActionListener(this);
247344 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
248345 switchGeoItem.addActionListener(this);
249346 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
250347 switchTransfoItem.addActionListener(this);
251
- morphItem = menu.add(new MenuItem("Morph"));
348
+ morphItem = menu.add(new MenuItem("Morph Group"));
252349 morphItem.addActionListener(this);
350
+
351
+ if (Globals.ADVANCED)
352
+ {
353
+ menu.add("-");
354
+ physicsItem = menu.add(new MenuItem("Physics"));
355
+ physicsItem.addActionListener(this);
356
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
357
+ frameselectorItem.addActionListener(this);
253358 scriptNodeItem = menu.add(new MenuItem("Script Node"));
254359 scriptNodeItem.addActionListener(this);
255360 cameraItem = menu.add(new MenuItem("Camera"));
256361 cameraItem.addActionListener(this);
362
+ }
257363
258364 oe.menuBar.add(menu = new Menu("Object"));
259365 textureItem = menu.add(new MenuItem("Texture"));
....@@ -268,21 +374,29 @@
268374 shadowYItem.addActionListener(this);
269375 shadowZItem = menu.add(new MenuItem("Shadow Z"));
270376 shadowZItem.addActionListener(this);
377
+ if (Globals.ADVANCED)
378
+ {
379
+ menu.add("-");
271380 linkerItem = menu.add(new MenuItem("Linker"));
272381 linkerItem.addActionListener(this);
273
- templateItem = menu.add(new MenuItem("Template"));
274
- templateItem.addActionListener(this);
275382 attributeItem = menu.add(new MenuItem("Attribute"));
276383 attributeItem.addActionListener(this);
384
+ templateItem = menu.add(new MenuItem("Template"));
385
+ templateItem.addActionListener(this);
277386 pointflowItem = menu.add(new MenuItem("Point Flow"));
278387 pointflowItem.addActionListener(this);
388
+ }
279389 menu.add("-");
280390 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
281391 resetTransformItem.addActionListener(this);
282392 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
283393 resetCentroidItem.addActionListener(this);
284
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
285
- transformgeometryItem.addActionListener(this);
394
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
395
+ resetCentroidXZItem.addActionListener(this);
396
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
397
+ transformGeometryItem.addActionListener(this);
398
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
399
+ transformChildrenItem.addActionListener(this);
286400
287401 oe.menuBar.add(menu = new Menu("Geometry"));
288402 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -293,8 +407,11 @@
293407 genNormalsCADItem.addActionListener(this);
294408 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
295409 genNormalsMESHItem.addActionListener(this);
410
+ if (Globals.ADVANCED)
411
+ {
296412 genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
297413 genNormalsMINEItem.addActionListener(this);
414
+ }
298415 stripifyItem = menu.add(new MenuItem("Stripify"));
299416 stripifyItem.addActionListener(this);
300417 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -316,23 +433,34 @@
316433 reduce34MeshItem.addActionListener(this);
317434 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
318435 increaseMeshItem.addActionListener(this);
319
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
320
- smoothMeshItem.addActionListener(this);
321436 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
322437 clipMeshItem.addActionListener(this);
438
+
439
+ if (Globals.ADVANCED)
440
+ {
441
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
442
+ smoothMeshItem.addActionListener(this);
443
+ }
323444
324445 oe.menuBar.add(menu = new Menu("Attributes"));
325446 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
326447 clearMaterialsItem.addActionListener(this);
448
+ resetAllItem = menu.add(new MenuItem("Reset All"));
449
+ resetAllItem.addActionListener(this);
450
+ stepAllItem = menu.add(new MenuItem("Step All"));
451
+ stepAllItem.addActionListener(this);
327452 menu.add("-");
328453 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
329454 liveleavesItem.addActionListener(this);
330455 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
331456 unliveleavesItem.addActionListener(this);
457
+ if (Globals.ADVANCED)
458
+ {
332459 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
333460 supportleavesItem.addActionListener(this);
334461 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
335462 unsupportleavesItem.addActionListener(this);
463
+ }
336464 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
337465 hideleavesItem.addActionListener(this);
338466 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -376,29 +504,22 @@
376504 sortbynameItem = menu.add(new MenuItem("Sort by name"));
377505 sortbynameItem.addActionListener(this);
378506 menu.add("-");
507
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
508
+ shareGeometriesItem.addActionListener(this);
509
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
510
+ mergeGeometriesItem.addActionListener(this);
511
+ if (Globals.ADVANCED)
512
+ {
513
+ // Pretty much the same as duplicate and clone.
379514 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
380515 extractGeometriesItem.addActionListener(this);
381516 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
382517 cloneGeometriesItem.addActionListener(this);
383
- shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
384
- shareGeometriesItem.addActionListener(this);
385
- mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
386
- mergeGeometriesItem.addActionListener(this);
518
+ }
387519
388520 oe.menuBar.add(menu = new Menu("Insert"));
389521 buildCreateMenu(menu);
390522
391
-
392
- oe.menuBar.add(menu = new Menu("Include"));
393
- importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
394
- importGFDItem.addActionListener(this);
395
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
396
- importVRMLX3DItem.addActionListener(this);
397
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
398
- importOBJItem.addActionListener(this);
399
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
400
- import3DSItem.addActionListener(this);
401
-
402523 oe.menuBar.add(menu = new Menu("Tools"));
403524 buildToolsMenu(menu);
404525 }
....@@ -433,153 +554,98 @@
433554 oe.radioPanel.add(dummyButton);
434555 oe.buttonGroup.add(dummyButton);
435556 */
436
- aConstraints.gridy += 1;
437
- oe.aConstraints.gridwidth = 1;
438
- oe.aConstraints.gridx = 0;
557
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
439558
440
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
559
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
560
+ liveCB.setToolTipText("Enable animation");
441561 liveCB.addItemListener(this);
442562
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);
563
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
564
+ oneStepButton.setToolTipText("Animate one step forward");
565
+ oneStepButton.addActionListener(this);
566
+
567
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
568
+ fastCB.setToolTipText("Fast mode");
461569 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);
570
+
571
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
572
+ trackCB.setToolTipText("Enable tracking");
503573 trackCB.addItemListener(this);
504574
505
- oe.aConstraints.gridx += 1;
506
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
575
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
576
+ screenfitButton.setToolTipText("Screen fit");
507577 screenfitButton.addActionListener(this);
508
- oe.aConstraints.gridx += 1;
578
+
509579 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
510580 // 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;
515581
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);
582
+ if (Globals.ADVANCED)
583
+ {
584
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
585
+ snapobjectButton.addActionListener(this);
586
+ snapobjectButton.setToolTipText("Snap Object");
587
+ }
588
+
589
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
590
+ flashSelectionButton.setToolTipText("Show selection");
522591 flashSelectionButton.addActionListener(this);
523592
524
- oe.toolbarPanel.add(new cButton(" ", false));
593
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
525594
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);
595
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
596
+ twoButton.setToolTipText("Show center view only");
532597 twoButton.addActionListener(this);
533
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
598
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
534599 fourButton.addActionListener(this);
535
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
600
+ fourButton.setToolTipText("Show left panel only");
601
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
602
+ sixButton.setToolTipText("2-column layout left");
536603 sixButton.addActionListener(this);
537
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
604
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
605
+ threeButton.setToolTipText("2-column layout right");
538606 threeButton.addActionListener(this);
539
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
607
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
608
+ sevenButton.setToolTipText("3-column layout");
540609 sevenButton.addActionListener(this);
541610 //
542611
543
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
612
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
613
+ rootButton.setToolTipText("Edit selection in new tab");
544614 rootButton.addActionListener(this);
545
- oe.aConstraints.gridx += 1;
546
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
615
+
616
+ oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
617
+ closeButton.setToolTipText("Close tab");
547618 closeButton.addActionListener(this);
548619 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
549620 //clearButton.addActionListener(this);
550
- oe.aConstraints.gridx += 1;
551621
552
- oe.aConstraints.gridx = 1; //
553
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
622
+ cGridBag commandsPanel = new cGridBag();
623
+
624
+ commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
625
+ editButton.setToolTipText("Edit selection");
554626 editButton.addActionListener(this);
555
- oe.aConstraints.gridx += 1;
556
- oe.aConstraints.weighty = 0;
557
- oe.aConstraints.gridwidth = 1;
558627
559
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
628
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
629
+ uneditButton.setToolTipText("Unedit selection");
560630 uneditButton.addActionListener(this);
561631
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);
632
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
633
+ allParamsButton.setToolTipText("Edit all params");
574634 allParamsButton.addActionListener(this);
575635
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);
636
+ commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
637
+ clearPanelButton.setToolTipText("Clear edit panel");
638
+ clearPanelButton.addActionListener(this);
639
+
640
+ commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
641
+ unselectButton.setToolTipText("Unselect");
581642 unselectButton.addActionListener(this);
582643
644
+ commandsPanel.preferredHeight = 1;
645
+
646
+ oe.treePanel.add(commandsPanel);
647
+ oe.treePanel.Return();
648
+
583649 // oe.aConstraints.gridx += 1;
584650 // oe.aConstraints.weighty = 0;
585651 // oe.aConstraints.gridwidth = 1;
....@@ -591,40 +657,37 @@
591657 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
592658 // gcButton.addActionListener(this);
593659
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;
660
+ cGridBag jSPPanel = new cGridBag();
661
+
662
+ JScrollPane jSP;
605663 //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);
664
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
607665 ResetModel();
608
- oe.aConstraints.weighty = 0.5;
609
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
610
- oe.aConstraints.gridy += 1;
611
- oe.aConstraints.gridwidth = 1;
666
+
667
+ oe.treePanel.add(jSPPanel);
668
+ oe.treePanel.Return();
612669
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);
670
+ cGridBag copyOptionsPanel = new cGridBag();
671
+
672
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
673
+ colorCB.setToolTipText("Copy color when dropped");
617674 colorCB.addItemListener(this);
618
- oe.aConstraints.gridx += 2;
619
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
675
+
676
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
677
+ materialCB.setToolTipText("Copy material when dropped");
620678 materialCB.addItemListener(this);
621
- oe.aConstraints.gridx += 2;
622
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
679
+
680
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
681
+ textureCB.setToolTipText("Copy texture when dropped");
623682 textureCB.addItemListener(this);
624683
625
- oe.aConstraints.gridx = 0;
626
- oe.aConstraints.gridy += 1;
684
+ copyOptionsPanel.preferredHeight = 1;
685
+ oe.treePanel.add(copyOptionsPanel);
686
+ oe.treePanel.Return();
627687
688
+// mainPanel.setDividerLocation(0.5); //1.0);
689
+// mainPanel.setResizeWeight(0.5);
690
+
628691 //jList.addListSelectionListener(this);
629692 oe.jTree.addTreeSelectionListener(this);
630693 //jTree.setRootVisible(false);
....@@ -646,6 +709,78 @@
646709 radio.layout = sevenButton;
647710 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
648711 }
712
+
713
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
714
+ {
715
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
716
+ boxCB.setToolTipText("Display bounding boxes");
717
+ boxCB.addItemListener(this);
718
+
719
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
720
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
721
+ zoomBoxCB.addItemListener(this);
722
+
723
+ if (true) // Globals.ADVANCED)
724
+ {
725
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
726
+ supportCB.setToolTipText("Enable rigging");
727
+ supportCB.addItemListener(this);
728
+
729
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
730
+ // localCB.addItemListener(this);
731
+
732
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
733
+ crowdCB.setToolTipText("Used for crowds");
734
+ crowdCB.addItemListener(this);
735
+
736
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
737
+ smoothCB.setToolTipText("Snapping delay");
738
+ smoothCB.addItemListener(this);
739
+
740
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
741
+ slowCB.setToolTipText("Smooth interpolation");
742
+ slowCB.addItemListener(this);
743
+
744
+// constraints.gridy += 1;
745
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
746
+// speakerMocapCB.addItemListener(this);
747
+
748
+ if (false)
749
+ {
750
+ // handled in scripts
751
+ //constraints.gridy += 1;
752
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
753
+ speakerCameraCB.addItemListener(this);
754
+
755
+ //constraints.gridy += 1;
756
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
757
+ speakerFocusCB.addItemListener(this);
758
+
759
+ //constraints.gridy += 1;
760
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
761
+ smoothfocusCB.addItemListener(this);
762
+ }
763
+
764
+//constraints.gridx += 1;
765
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
766
+// debugCB.addItemListener(this);
767
+
768
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
769
+ oeilCB.addItemListener(this);
770
+
771
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
772
+ lookAtCB.setToolTipText("Look-at target");
773
+ lookAtCB.addItemListener(this);
774
+
775
+ }
776
+
777
+ cGridBag fill = new cGridBag();
778
+
779
+ fill.preferredHeight = 200;
780
+
781
+ panel.add(fill);
782
+
783
+ }
649784
650785 void EditObject(Object3D obj)
651786 {
....@@ -658,6 +793,7 @@
658793 buttonGroup.add(radioButton);
659794 radioButton.doClick();
660795 }
796
+
661797 void SetupViews(ObjEditor oe)
662798 {
663799 oe.SetupViews();
....@@ -676,6 +812,7 @@
676812 JCheckBox fastCB;
677813 JCheckBox slowCB;
678814 JCheckBox boxCB;
815
+ JCheckBox zoomBoxCB;
679816 JCheckBox trackCB;
680817 JCheckBox smoothfocusCB;
681818 // JCheckBox speakerMocapCB;
....@@ -755,6 +892,10 @@
755892 Recompile();
756893 cameraView.repaint();
757894 // refreshContents();
895
+ }
896
+ else if(e.getSource() == zoomBoxCB)
897
+ {
898
+ cameraView.ToggleZoomBoxMode();
758899 }
759900 else if(e.getSource() == smoothfocusCB)
760901 {
....@@ -869,7 +1010,9 @@
8691010 // objEditor.DropFile((java.io.File[]) object, true);
8701011 // return;
8711012 // }
872
- if (string.charAt(0) == '/')
1013
+
1014
+ // File path for Mac and Windows
1015
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
8731016 {
8741017 // file(s)
8751018 String[] names = string.split("\n");
....@@ -896,7 +1039,7 @@
8961039
8971040 flashIt = false;
8981041 CameraPane pane = (CameraPane) target;
899
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1042
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
9001043 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
9011044
9021045 if (group.selection.size() == 1)
....@@ -923,11 +1066,11 @@
9231066 {
9241067 loadClipboard(true);
9251068 objEditor.jTree.setSelectionPath(destinationPath);
926
- pasteInto(false);
1069
+ pasteInto(false, false);
9271070 } else {
9281071 loadClipboard(false);
9291072 objEditor.jTree.setSelectionPath(destinationPath);
930
- pasteInto(false); // true); // ???
1073
+ pasteInto(false, false); // true); // ???
9311074 }
9321075 }
9331076 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1049,27 +1192,33 @@
10491192 kleinItem.addActionListener(this);
10501193 particleItem = menu.add(new MenuItem("Particle system"));
10511194 particleItem.addActionListener(this);
1195
+ if (Globals.ADVANCED)
1196
+ {
10521197 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10531198 ragdollItem.addActionListener(this);
10541199 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10551200 ragdoll2Item.addActionListener(this);
1201
+ }
10561202 menu.add("-");
1057
- meshItem = menu.add(new MenuItem("Mesh"));
1203
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10581204 meshItem.addActionListener(this);
10591205 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10601206 // meshGroupItem.addActionListener(this);
1207
+ if (Globals.ADVANCED)
1208
+ {
10611209 springItem = menu.add(new MenuItem("Spring"));
10621210 springItem.addActionListener(this);
10631211 flagItem = menu.add(new MenuItem("Flag"));
10641212 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);
10691213 blobItem = menu.add(new MenuItem("Blob"));
10701214 blobItem.addActionListener(this);
10711215 latheItem = menu.add(new MenuItem("Lathe"));
10721216 latheItem.addActionListener(this);
1217
+ }
1218
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1219
+ bezierItem.addActionListener(this);
1220
+ overlayItem = menu.add(new MenuItem("Overlay"));
1221
+ overlayItem.addActionListener(this);
10731222 lightItem = menu.add(new MenuItem("Light"));
10741223 lightItem.addActionListener(this);
10751224 menu.add("-");
....@@ -1079,34 +1228,39 @@
10791228 loopItem.addActionListener(this);
10801229 doubleItem = menu.add(new MenuItem("Fork"));
10811230 doubleItem.addActionListener(this);
1231
+ if (Globals.ADVANCED)
1232
+ {
10821233 tripleItem = menu.add(new MenuItem("Trident"));
10831234 tripleItem.addActionListener(this);
1235
+ }
10841236 }
10851237
10861238 void buildToolsMenu(Menu menu)
10871239 {
10881240 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10891241 animationItem.addItemListener(this);
1090
- animationItem.setState(CameraPane.ANIMATION);
1242
+ animationItem.setState(Globals.ANIMATION);
10911243
10921244 menu.add("-");
10931245 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
10941246 parseverticesItem.addActionListener(this);
10951247 textureFieldItem = menu.add(new MenuItem("Texture Field"));
10961248 textureFieldItem.addActionListener(this);
1097
- alignItem = menu.add(new MenuItem("Align"));
1249
+ alignItem = menu.add(new MenuItem("Align Objects"));
10981250 alignItem.addActionListener(this);
1099
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1100
- mirrorItem.addActionListener(this);
11011251 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11021252 reduceMorphItem.addActionListener(this);
11031253 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11041254 reduce34MorphItem.addActionListener(this);
1105
-
1255
+ menu.add("-");
11061256 menu.add(computeAOItem = new MenuItem("Compute AO"));
11071257 computeAOItem.addActionListener(this);
1108
- menu.add("-");
11091258
1259
+ if (Globals.ADVANCED)
1260
+ {
1261
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1262
+ mirrorItem.addActionListener(this);
1263
+ menu.add("-");
11101264 menu.add(memoryItem = new MenuItem("Memory Usage"));
11111265 memoryItem.addActionListener(this);
11121266 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1129,6 +1283,7 @@
11291283 menu.add("-");
11301284 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11311285 editScriptItem.addActionListener(this);
1286
+ }
11321287 }
11331288
11341289 void ScreenFit()
....@@ -1457,9 +1612,9 @@
14571612
14581613 void Overwrite(int mask)
14591614 {
1460
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1615
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14611616 {
1462
- Object3D content = GrafreeD.clipboard.get(0);
1617
+ Object3D content = Grafreed.clipboard.get(0);
14631618
14641619 if (content instanceof cGroup && ((cGroup)content).transientlink )
14651620 content = ((cGroup)content).get(0);
....@@ -1482,6 +1637,7 @@
14821637 //
14831638 public void actionPerformed(ActionEvent event) // , Object arg)
14841639 {
1640
+ Object source = event.getSource();
14851641 /*
14861642 if (event.getSource() == nameField)
14871643 {
....@@ -1493,11 +1649,11 @@
14931649 }
14941650 else
14951651 */
1496
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1652
+ if (source == lookAtItem || source == lookFromItem)
14971653 {
14981654 ScreenFit();
14991655 } else
1500
- if (event.getSource() == switchItem)
1656
+ if (source == switchItem)
15011657 {
15021658 cVector v1 = new cVector();
15031659 cVector v2 = new cVector();
....@@ -1506,11 +1662,11 @@
15061662 objEditor.cameraView.renderCamera.setAim(v2, v1);
15071663 objEditor.cameraView.repaint();
15081664 } else
1509
- if (event.getSource() == rectoidItem)
1665
+ if (source == rectoidItem)
15101666 {
15111667 makeSomething(new Box());
15121668 } else
1513
- if (event.getSource() == particleItem)
1669
+ if (source == particleItem)
15141670 {
15151671 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15161672 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1531,9 +1687,9 @@
15311687 applyExample(particleGeom, "SMOKE");
15321688 makeSomething(particleGeom);
15331689 } else
1534
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1690
+ if (source == ragdollItem || source == ragdoll2Item)
15351691 {
1536
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1692
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15371693
15381694 ragdoll.toParent = LA.newMatrix();
15391695 ragdoll.fromParent = LA.newMatrix();
....@@ -1551,7 +1707,7 @@
15511707 } else
15521708 /*
15531709 */
1554
- if (event.getSource() == heightFieldItem)
1710
+ if (source == heightFieldItem)
15551711 {
15561712 Object3D obj = new Object3D();
15571713
....@@ -1589,31 +1745,31 @@
15891745
15901746 makeSomething(obj);
15911747 } else
1592
- if (event.getSource() == gridItem)
1748
+ if (source == gridItem)
15931749 {
15941750 makeSomething(new Grid());
15951751 } else
1596
- if (event.getSource() == ellipsoidItem)
1752
+ if (source == ellipsoidItem)
15971753 {
15981754 makeSomething(new Sphere());
15991755 } else
1600
- if (event.getSource() == coneItem)
1756
+ if (source == coneItem)
16011757 {
16021758 makeSomething(new Cone());
16031759 } else
1604
- if (event.getSource() == torusItem)
1760
+ if (source == torusItem)
16051761 {
16061762 makeSomething(new Torus());
16071763 } else
1608
- if (event.getSource() == superItem)
1764
+ if (source == superItem)
16091765 {
16101766 makeSomething(new Superellipsoid());
16111767 } else
1612
- if (event.getSource() == kleinItem)
1768
+ if (source == kleinItem)
16131769 {
16141770 makeSomething(new Klein());
16151771 } else
1616
- if (event.getSource() == blobItem)
1772
+ if (source == blobItem)
16171773 {
16181774 Blob blob = new Blob();
16191775 BlobComponent comp = new BlobComponent();
....@@ -1621,15 +1777,15 @@
16211777 //blob.retile();
16221778 makeSomething(blob);
16231779 } else
1624
- if (event.getSource() == latheItem)
1780
+ if (source == latheItem)
16251781 {
16261782 makeSomething(new Lathe());
16271783 } else
1628
- if (event.getSource() == bezierItem)
1784
+ if (source == bezierItem)
16291785 {
16301786 makeSomething(new BezierSurface());
16311787 } else
1632
- if (event.getSource() == checkerItem)
1788
+ if (source == overlayItem)
16331789 {
16341790 /*
16351791 Object3D obj = new BezierSurface(5,8);
....@@ -1644,7 +1800,7 @@
16441800 */
16451801 makeSomething(new Checker());
16461802 } else
1647
- if (event.getSource() == meshItem)
1803
+ if (source == meshItem)
16481804 {
16491805 Object3D itemtomake = new Object3D();
16501806 Object3D child;
....@@ -1665,35 +1821,35 @@
16651821 makeSomething(child);
16661822 }
16671823 } else
1668
- if (event.getSource() == springItem)
1824
+ if (source == springItem)
16691825 {
16701826 cSpring s = new cSpring();
16711827 s.setup();
16721828 makeSomething(s);
16731829 } else
1674
- if (event.getSource() == flagItem)
1830
+ if (source == flagItem)
16751831 {
16761832 cSpring s = new cFlag();
16771833 s.setup();
16781834 makeSomething(s);
16791835 } else
1680
- if (event.getSource() == lightItem)
1836
+ if (source == lightItem)
16811837 {
16821838 makeSomething(new Light());
16831839 } else
1684
- if (event.getSource() == csgItem)
1840
+ if (source == csgItem)
16851841 {
16861842 group(new CSG());
16871843 } else
1688
- if (event.getSource() == templateItem)
1844
+ if (source == templateItem)
16891845 {
16901846 group(new cTemplate());
16911847 } else
1692
- if (event.getSource() == attributeItem)
1848
+ if (source == attributeItem)
16931849 {
16941850 makeSomething(new Attribute());
16951851 } else
1696
- if (event.getSource() == pointflowItem)
1852
+ if (source == pointflowItem)
16971853 {
16981854 makeSomething(new PointFlow());
16991855 } else
....@@ -1705,7 +1861,7 @@
17051861 } else
17061862 */
17071863
1708
- if (event.getSource() == superLoopItem)
1864
+ if (source == superLoopItem)
17091865 {
17101866 Composite g = new cGroup();
17111867 for (int i=0; i<15; i++)
....@@ -1727,7 +1883,7 @@
17271883
17281884 group(g);
17291885 } else
1730
- if (event.getSource() == loopItem)
1886
+ if (source == loopItem)
17311887 {
17321888 Composite csg = new GroupLeaf();
17331889 csg.count = 5;
....@@ -1736,7 +1892,7 @@
17361892 csg.addChild(child);
17371893 child.addChild(csg);
17381894 } else
1739
- if (event.getSource() == doubleItem)
1895
+ if (source == doubleItem)
17401896 {
17411897 Composite csg = new GroupLeaf();
17421898 csg.count = 5;
....@@ -1748,7 +1904,7 @@
17481904 csg.addChild(child);
17491905 child.addChild(csg);
17501906 } else
1751
- if (event.getSource() == tripleItem)
1907
+ if (source == tripleItem)
17521908 {
17531909 Composite csg = new GroupLeaf();
17541910 csg.count = 4;
....@@ -1763,71 +1919,59 @@
17631919 csg.addChild(child);
17641920 child.addChild(csg);
17651921 } 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)
1922
+ if (source == computeAOItem)
17841923 {
17851924 Globals.drawMode = CameraPane.OCCLUSION;
1786
- CameraPane.theRenderer.repaint();
1925
+ Globals.theRenderer.repaint();
17871926 } else
1788
- if (event.getSource() == recompileItem)
1927
+ if (source == recompileItem)
17891928 {
17901929 Recompile();
17911930 refreshContents();
17921931 } else
1793
- if (event.getSource() == editScriptItem)
1932
+ if (source == editScriptItem)
17941933 {
17951934 OpenDialog();
17961935 refreshContents();
17971936 } else
1798
- if (event.getSource() == invariantsItem)
1937
+ if (source == invariantsItem)
17991938 {
18001939 System.out.println("Invariants:");
1801
- GrafreeD.grafreeD.universe.invariants();
1940
+ Grafreed.grafreeD.universe.invariants();
18021941 } else
1803
- if (event.getSource() == memoryItem)
1942
+ if (source == memoryItem)
18041943 {
18051944 //System.out.println("Invariants:");
18061945 PrintMemory();
18071946 } else
1808
- if (event.getSource() == pathItem)
1947
+ if (source == pathItem)
18091948 {
18101949 PrintPath();
18111950 } else
1812
- if (event.getSource() == analyzeItem)
1951
+ if (source == analyzeItem)
18131952 {
18141953 AnalyzeObject();
18151954 } else
1816
- if (event.getSource() == dumpItem)
1955
+ if (source == dumpItem)
18171956 {
18181957 DumpObject();
18191958 } else
1820
- if (event.getSource() == screenfitButton)
1959
+ if (source == oneStepButton)
1960
+ {
1961
+ Globals.ONESTEP = true;
1962
+ cameraView.repaint();
1963
+ } else
1964
+ if (source == screenfitButton)
18211965 {
18221966 //Reload(lastConverter, lastFilename, true);
18231967 ScreenFit();
18241968 } else
1825
- if (event.getSource() == screenfitpointButton)
1969
+ if (source == screenfitpointButton)
18261970 {
18271971 //Reload(lastConverter, lastFilename, true);
18281972 ScreenFitPoint();
18291973 } else
1830
- if (event.getSource() == snapobjectButton)
1974
+ if (source == snapobjectButton)
18311975 {
18321976 //Reload(lastConverter, lastFilename, true);
18331977 SnapObject();
....@@ -1838,13 +1982,13 @@
18381982 // Recompile();
18391983 // refreshContents();
18401984 // } else
1841
- if (event.getSource() == gcButton)
1985
+ if (source == gcButton)
18421986 {
18431987 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18441988 System.gc();
18451989 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18461990 } else
1847
- if (event.getSource() == editLeafItem)
1991
+ if (source == editLeafItem)
18481992 {
18491993 Object3D obj;
18501994 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1858,62 +2002,74 @@
18582002 }
18592003 refreshContents(true);
18602004 } else
1861
- if (event.getSource() == openWindowItem)
2005
+ if (source == openWindowItem)
18622006 {
18632007 EditSelection(true);
18642008 } else
1865
- if (event.getSource() == cutItem || event.getSource() == clearButton)
2009
+ if (source == cutItem || source == clearButton)
18662010 {
18672011 loadClipboard(true);
18682012 } else
1869
- if (event.getSource() == duplicateItem)
2013
+ if (source == undoItem)
18702014 {
1871
- Object3D keep = GrafreeD.clipboard;
2015
+ Undo();
2016
+ } else
2017
+ if (source == redoItem)
2018
+ {
2019
+ Redo();
2020
+ } else
2021
+ if (source == duplicateItem)
2022
+ {
2023
+ Object3D keep = Grafreed.clipboard;
18722024 loadClipboard(false);
18732025 paste(false);
1874
- GrafreeD.clipboard = keep;
2026
+ Grafreed.clipboard = keep;
18752027 } else
1876
- if (event.getSource() == cloneItem)
2028
+ if (source == cloneItem)
18772029 {
18782030 CloneSelection(false);
18792031 } else
1880
- if (event.getSource() == cloneSupportItem)
2032
+ if (source == cloneSupportItem)
18812033 {
18822034 CloneSelection(true);
18832035 } else
1884
- if (event.getSource() == copyItem)
2036
+ if (source == copyItem)
18852037 {
18862038 loadClipboard(false);
18872039 } else
1888
- if (event.getSource() == pasteItem)
2040
+ if (source == pasteItem)
18892041 {
18902042 paste(false);
18912043 } else
1892
- if (event.getSource() == pasteLinkItem)
2044
+ if (source == pasteIntoItem)
18932045 {
1894
- pasteInto(false);
2046
+ pasteInto(true, false);
18952047 } else
1896
- if (event.getSource() == pasteCloneItem)
2048
+ if (source == pasteLinkItem)
18972049 {
1898
- pasteInto(true);
2050
+ pasteInto(false, false);
18992051 } else
1900
- if (event.getSource() == pasteExpandItem)
2052
+ if (source == pasteCloneItem)
2053
+ {
2054
+ pasteInto(true, true);
2055
+ } else
2056
+ if (source == pasteExpandItem)
19012057 {
19022058 paste(true);
19032059 } else
1904
- if (event.getSource() == synchronizeItem)
2060
+ if (source == synchronizeItem)
19052061 {
19062062 Overwrite(Object3D.TRANSFORM);
19072063 } else
1908
- if (event.getSource() == overwriteNameItem)
2064
+ if (source == overwriteNameItem)
19092065 {
19102066 Overwrite(Object3D.NAME);
19112067 } else
1912
- if (event.getSource() == overwriteUVItem)
2068
+ if (source == overwriteUVItem)
19132069 {
19142070 Overwrite(Object3D.UV);
19152071 } else
1916
- if (event.getSource() == overwriteMatItem)
2072
+ if (source == overwriteMatItem)
19172073 {
19182074 /* july 2015
19192075 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1933,7 +2089,7 @@
19332089
19342090 Overwrite(dropAttributes);
19352091 }
1936
- if (event.getSource() == overwriteGeoItem)
2092
+ if (source == overwriteGeoItem)
19372093 {
19382094 Overwrite(Object3D.GEOMETRY);
19392095 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1950,7 +2106,7 @@
19502106 // refreshContents();
19512107 // }
19522108 } else
1953
- if (event.getSource() == generateMeshItem)
2109
+ if (source == generateMeshItem)
19542110 {
19552111 //if (group.selection.size() == 1)
19562112 // for (int i=0; i<group.selection.size(); i++)
....@@ -1961,7 +2117,7 @@
19612117 ResetModel();
19622118 refreshContents();
19632119 } else
1964
- if (event.getSource() == extractGeometriesItem)
2120
+ if (source == extractGeometriesItem)
19652121 {
19662122 boolean one = false;
19672123
....@@ -1988,7 +2144,7 @@
19882144 ResetModel();
19892145 refreshContents();
19902146 } else
1991
- if (event.getSource() == cloneGeometriesItem)
2147
+ if (source == cloneGeometriesItem)
19922148 {
19932149 boolean one = false;
19942150
....@@ -2014,7 +2170,7 @@
20142170 ResetModel();
20152171 refreshContents();
20162172 } else
2017
- if (event.getSource() == shareGeometriesItem)
2173
+ if (source == shareGeometriesItem)
20182174 {
20192175 boolean one = false;
20202176
....@@ -2044,7 +2200,7 @@
20442200 refreshContents();
20452201 }
20462202 } else
2047
- if (event.getSource() == mergeGeometriesItem)
2203
+ if (source == mergeGeometriesItem)
20482204 {
20492205 boolean one = false;
20502206
....@@ -2074,7 +2230,7 @@
20742230 ResetModel();
20752231 refreshContents();
20762232 } else
2077
- if (event.getSource() == linkverticesItem)
2233
+ if (source == linkverticesItem)
20782234 {
20792235 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20802236 // {
....@@ -2087,48 +2243,48 @@
20872243 // group.selection.get(0).setMasterThis(content); // should be identity
20882244 // refreshContents();
20892245 // }
2090
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2246
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
20912247 {
2092
- Object3D content = GrafreeD.clipboard.get(0);
2248
+ Object3D content = Grafreed.clipboard.get(0);
20932249
20942250 if (content instanceof cGroup && ((cGroup)content).transientlink )
20952251 content = ((cGroup)content).get(0);
20962252
2097
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2253
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20982254 for (int i=0; i<group.selection.size(); i++)
20992255 {
2100
- boolean random = CameraPane.RANDOM;
2101
- CameraPane.RANDOM = false; // parse all random nodes
2256
+ boolean random = CameraPane.SWITCH;
2257
+ CameraPane.SWITCH = false; // parse all random nodes
21022258 group.selection.get(i).linkVerticesThis(content);
21032259 // group.selection.get(i).setMasterThis(content); // should be identity
2104
- CameraPane.RANDOM = random;
2260
+ CameraPane.SWITCH = random;
21052261 }
2106
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2262
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21072263 refreshContents();
21082264 }
21092265 } else
2110
- if (event.getSource() == resetsupportItem)
2266
+ if (source == resetsupportItem)
21112267 {
21122268 for (int i=0; i<group.selection.size(); i++)
21132269 {
2114
- boolean random = CameraPane.RANDOM;
2115
- CameraPane.RANDOM = false; // parse all random nodes
2270
+ boolean random = CameraPane.SWITCH;
2271
+ CameraPane.SWITCH = false; // parse all random nodes
21162272 group.selection.get(i).linkVerticesThis(null);
2117
- CameraPane.RANDOM = random;
2273
+ CameraPane.SWITCH = random;
21182274 }
21192275
21202276 refreshContents();
21212277 } else
2122
- if (event.getSource() == relinkverticesItem)
2278
+ if (source == relinkverticesItem)
21232279 {
2124
- boolean random = CameraPane.RANDOM;
2125
- CameraPane.RANDOM = false; // parse all random nodes
2280
+ boolean random = CameraPane.SWITCH;
2281
+ CameraPane.SWITCH = false; // parse all random nodes
21262282 group.selection.RelinkToSupport();
2127
- CameraPane.RANDOM = random;
2283
+ CameraPane.SWITCH = random;
21282284
21292285 refreshContents();
21302286 } else
2131
- if (event.getSource() == resetreferencesItem)
2287
+ if (source == resetreferencesItem)
21322288 {
21332289 for (int i=0; i<group.selection.size(); i++)
21342290 {
....@@ -2137,11 +2293,11 @@
21372293
21382294 refreshContents();
21392295 } else
2140
- if (event.getSource() == setMasterItem)
2296
+ if (source == setMasterItem)
21412297 {
2142
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2298
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21432299 {
2144
- Object3D content = GrafreeD.clipboard.get(0);
2300
+ Object3D content = Grafreed.clipboard.get(0);
21452301
21462302 if (content instanceof cGroup && ((cGroup)content).transientlink )
21472303 content = ((cGroup)content).get(0);
....@@ -2150,13 +2306,13 @@
21502306 refreshContents();
21512307 }
21522308 } else
2153
- if (event.getSource() == poseMeshItem)
2309
+ if (source == poseMeshItem)
21542310 {
21552311 if (group.selection.size() == 1)
21562312 {
2157
- if (GrafreeD.clipboard.size() == 1)
2313
+ if (Grafreed.clipboard.size() == 1)
21582314 {
2159
- Object3D content = GrafreeD.clipboard.get(0);
2315
+ Object3D content = Grafreed.clipboard.get(0);
21602316
21612317 if (content instanceof cGroup && ((cGroup)content).transientlink )
21622318 content = ((cGroup)content).get(0);
....@@ -2169,19 +2325,19 @@
21692325 }
21702326
21712327 } else
2172
- if (event.getSource() == revertMeshItem)
2328
+ if (source == revertMeshItem)
21732329 {
21742330 RevertMeshes();
21752331 } else
2176
- if (event.getSource() == resetMeshItem)
2332
+ if (source == resetAllItem)
21772333 {
21782334 ResetAll();
21792335 } else
2180
- if (event.getSource() == stepAllItem)
2336
+ if (source == stepAllItem)
21812337 {
21822338 StepAll();
21832339 } else
2184
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2340
+ if (source == clearItem) // || event.getSource() == clearButton)
21852341 {
21862342 //int indices[] = jList.getSelectedIndices();
21872343 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2189,46 +2345,46 @@
21892345
21902346 ClearSelection(false);
21912347 } else
2192
- if (event.getSource() == clearAllItem)
2348
+ if (source == clearAllItem)
21932349 {
21942350 ClearSelection(true);
21952351 } else
2196
- if (event.getSource() == grabItem)
2352
+ if (source == grabItem)
21972353 {
21982354 group(new cGroup(), true);
21992355 } else
2200
- if (event.getSource() == hideItem)
2356
+ if (source == hideItem)
22012357 {
22022358 group(new HiddenObject());
22032359 } else
2204
- if (event.getSource() == frontItem)
2360
+ if (source == frontItem)
22052361 {
22062362 front();
22072363 } else
2208
- if (event.getSource() == backItem)
2364
+ if (source == backItem)
22092365 {
22102366 back();
22112367 } else
2212
- if (event.getSource() == cameraItem)
2368
+ if (source == cameraItem)
22132369 {
22142370 makeSomething(new Camera());
22152371 } else
2216
- if (event.getSource() == compositeItem)
2372
+ if (source == compositeItem)
22172373 {
22182374 group(new Composite());
22192375 } else
2220
- if (event.getSource() == randomItem)
2376
+ if (source == randomItem)
22212377 {
22222378 RandomNode random = new RandomNode();
22232379 group(random);
22242380 if (random.size() > 0)
2225
- random.name = random.get(0).name + "Rnd";
2381
+ random.name = random.get(0).name + "Switch";
22262382 } else
2227
- if (event.getSource() == physicsItem)
2383
+ if (source == physicsItem)
22282384 {
22292385 group(new PhysicsNode());
22302386 } else
2231
- if (event.getSource() == frameselectorItem)
2387
+ if (source == frameselectorItem)
22322388 {
22332389 for (int i=0; i<group.selection.size(); i++)
22342390 {
....@@ -2240,7 +2396,7 @@
22402396 ResetModel();
22412397 refreshContents();
22422398 } else
2243
- if (event.getSource() == switchGeoItem)
2399
+ if (source == switchGeoItem)
22442400 {
22452401 for (int i=0; i<group.selection.size(); i++)
22462402 {
....@@ -2252,7 +2408,7 @@
22522408 ResetModel();
22532409 refreshContents();
22542410 } else
2255
- if (event.getSource() == switchTransfoItem)
2411
+ if (source == switchTransfoItem)
22562412 {
22572413 for (int i=0; i<group.selection.size(); i++)
22582414 {
....@@ -2264,7 +2420,7 @@
22642420 ResetModel();
22652421 refreshContents();
22662422 } else
2267
- if (event.getSource() == morphItem)
2423
+ if (source == morphItem)
22682424 {
22692425 for (int i=0; i<group.selection.size(); i++)
22702426 {
....@@ -2276,7 +2432,7 @@
22762432 ResetModel();
22772433 refreshContents();
22782434 } else
2279
- if (event.getSource() == scriptNodeItem)
2435
+ if (source == scriptNodeItem)
22802436 {
22812437 boolean atleastone = false;
22822438
....@@ -2315,31 +2471,31 @@
23152471 }
23162472 }
23172473 } else
2318
- if (event.getSource() == linkerItem)
2474
+ if (source == linkerItem)
23192475 {
23202476 group(new cLinker());
23212477 } else
2322
- if (event.getSource() == textureItem)
2478
+ if (source == textureItem)
23232479 {
23242480 group(new TextureNode());
23252481 } else
2326
- if (event.getSource() == billboardItem)
2482
+ if (source == billboardItem)
23272483 {
23282484 group(new BillboardNode());
23292485 } else
2330
- if (event.getSource() == shadowXItem)
2486
+ if (source == shadowXItem)
23312487 {
23322488 CastShadow(0);
23332489 } else
2334
- if (event.getSource() == shadowYItem)
2490
+ if (source == shadowYItem)
23352491 {
23362492 CastShadow(1);
23372493 } else
2338
- if (event.getSource() == shadowZItem)
2494
+ if (source == shadowZItem)
23392495 {
23402496 CastShadow(2);
23412497 } else
2342
- if (event.getSource() == ungroupItem)
2498
+ if (source == ungroupItem)
23432499 {
23442500 //ungroup();
23452501 for (int i=0; i<group.selection.size(); i++)
....@@ -2351,179 +2507,187 @@
23512507
23522508 refreshContents();
23532509 } else
2354
- if (event.getSource() == genUVItem)
2510
+ if (source == genUVItem)
23552511 {
23562512 GenUV();
23572513 } else
2358
- if (event.getSource() == genNormalsCADItem)
2514
+ if (source == genNormalsCADItem)
23592515 {
23602516 GenNormals(true);
23612517 } else
2362
- if (event.getSource() == genNormalsMESHItem)
2518
+ if (source == genNormalsMESHItem)
23632519 {
23642520 GenNormals(true); // TODO
23652521 } else
2366
- if (event.getSource() == genNormalsORGANItem)
2522
+ if (source == genNormalsORGANItem)
23672523 {
23682524 GenNormals(false);
23692525 } else
2370
- if (event.getSource() == genNormalsMINEItem)
2526
+ if (source == genNormalsMINEItem)
23712527 {
23722528 GenNormalsMINE();
23732529 } else
2374
- if (event.getSource() == stripifyItem)
2530
+ if (source == stripifyItem)
23752531 {
23762532 Stripify();
23772533 } else
2378
- if (event.getSource() == unstripifyItem)
2534
+ if (source == unstripifyItem)
23792535 {
23802536 Unstripify();
23812537 } else
2382
- if (event.getSource() == trimItem)
2538
+ if (source == trimItem)
23832539 {
23842540 Trim();
23852541 } else
2386
- if (event.getSource() == untrimItem)
2542
+ if (source == untrimItem)
23872543 {
23882544 Untrim();
23892545 } else
2390
- if (event.getSource() == clearColorsItem)
2546
+ if (source == clearColorsItem)
23912547 {
23922548 ClearColors();
23932549 } else
2394
- if (event.getSource() == clearMaterialsItem)
2550
+ if (source == clearMaterialsItem)
23952551 {
23962552 ClearMaterials();
23972553 } else
2398
- if (event.getSource() == liveleavesItem)
2554
+ if (source == liveleavesItem)
23992555 {
24002556 LiveLeaves(true);
24012557 } else
2402
- if (event.getSource() == unliveleavesItem)
2558
+ if (source == unliveleavesItem)
24032559 {
24042560 LiveLeaves(false);
24052561 } else
2406
- if (event.getSource() == supportleavesItem)
2562
+ if (source == supportleavesItem)
24072563 {
24082564 SupportLeaves(true);
24092565 } else
2410
- if (event.getSource() == unsupportleavesItem)
2566
+ if (source == unsupportleavesItem)
24112567 {
24122568 SupportLeaves(false);
24132569 } else
2414
- if (event.getSource() == hideleavesItem)
2570
+ if (source == hideleavesItem)
24152571 {
24162572 HideLeaves(true);
24172573 } else
2418
- if (event.getSource() == showleavesItem)
2574
+ if (source == showleavesItem)
24192575 {
24202576 HideLeaves(false);
24212577 } else
2422
- if (event.getSource() == markleavesItem)
2578
+ if (source == markleavesItem)
24232579 {
24242580 MarkLeaves(true);
24252581 } else
2426
- if (event.getSource() == unmarkleavesItem)
2582
+ if (source == unmarkleavesItem)
24272583 {
24282584 MarkLeaves(false);
24292585 } else
2430
- if (event.getSource() == flipVItem)
2586
+ if (source == flipVItem)
24312587 {
24322588 FlipV(true);
24332589 } else
2434
- if (event.getSource() == unflipVItem)
2590
+ if (source == unflipVItem)
24352591 {
24362592 FlipV(false);
24372593 } else
2438
- if (event.getSource() == lowTexturesItem)
2594
+ if (source == lowTexturesItem)
24392595 {
24402596 SetTexRes(0);
24412597 } else
2442
- if (event.getSource() == normalTexturesItem)
2598
+ if (source == normalTexturesItem)
24432599 {
24442600 SetTexRes(1);
24452601 } else
2446
- if (event.getSource() == highTexturesItem)
2602
+ if (source == highTexturesItem)
24472603 {
24482604 SetTexRes(2);
24492605 } else
2450
- if (event.getSource() == veryhighTexturesItem)
2606
+ if (source == veryhighTexturesItem)
24512607 {
24522608 SetTexRes(3);
24532609 } else
2454
- if (event.getSource() == maxTexturesItem)
2610
+ if (source == maxTexturesItem)
24552611 {
24562612 SetTexRes(4);
24572613 } else
2458
- if (event.getSource() == panoTexturesItem)
2614
+ if (source == panoTexturesItem)
24592615 {
24602616 SetTexRes(5);
24612617 } else
2462
- if (event.getSource() == reverseNormalsItem)
2618
+ if (source == reverseNormalsItem)
24632619 {
24642620 ReverseNormals();
24652621 } else
2466
- if (event.getSource() == parseverticesItem)
2622
+ if (source == parseverticesItem)
24672623 {
24682624 ParseVertices();
24692625 } else
2470
- if (event.getSource() == textureFieldItem)
2626
+ if (source == textureFieldItem)
24712627 {
24722628 TextureVertices();
24732629 } else
2474
- if (event.getSource() == alignItem)
2630
+ if (source == alignItem)
24752631 {
24762632 Align();
24772633 } else
2478
- if (event.getSource() == mirrorItem)
2634
+ if (source == mirrorItem)
24792635 {
24802636 MirrorPoses();
24812637 } else
2482
- if (event.getSource() == reduceMorphItem)
2638
+ if (source == reduceMorphItem)
24832639 {
24842640 MeshReduction(false);
24852641 } else
2486
- if (event.getSource() == reduce34MorphItem)
2642
+ if (source == reduce34MorphItem)
24872643 {
24882644 MeshReduction(true);
24892645 } else
2490
- if (event.getSource() == reverseTrianglesItem)
2646
+ if (source == reverseTrianglesItem)
24912647 {
24922648 ReverseTriangles();
24932649 } else
2494
- if (event.getSource() == reduceMeshItem)
2650
+ if (source == reduceMeshItem)
24952651 {
24962652 ReduceMesh(false);
24972653 } else
2498
- if (event.getSource() == reduce34MeshItem)
2654
+ if (source == reduce34MeshItem)
24992655 {
25002656 ReduceMesh(true);
25012657 } else
2502
- if (event.getSource() == increaseMeshItem)
2658
+ if (source == increaseMeshItem)
25032659 {
25042660 IncreaseMesh();
25052661 } else
2506
- if (event.getSource() == clipMeshItem)
2662
+ if (source == clipMeshItem)
25072663 {
25082664 ClipMesh();
25092665 } else
2510
- if (event.getSource() == smoothMeshItem)
2666
+ if (source == smoothMeshItem)
25112667 {
25122668 SmoothMesh();
25132669 } else
2514
- if (event.getSource() == transformgeometryItem)
2670
+ if (source == transformGeometryItem)
25152671 {
25162672 TransformGeometry();
25172673 } else
2518
- if (event.getSource() == resetTransformItem)
2674
+ if (source == transformChildrenItem)
2675
+ {
2676
+ TransformChildren();
2677
+ } else
2678
+ if (source == resetTransformItem)
25192679 {
25202680 ResetTransform();
25212681 } else
2522
- if (event.getSource() == resetCentroidItem)
2682
+ if (source == resetCentroidItem)
25232683 {
2524
- ResetCentroid();
2684
+ ResetCentroid(true);
25252685 } else
2526
- if (event.getSource() == resetParentItem)
2686
+ if (source == resetCentroidXZItem)
2687
+ {
2688
+ ResetCentroid(false);
2689
+ } else
2690
+ if (source == resetParentItem)
25272691 {
25282692 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25292693 {
....@@ -2533,7 +2697,7 @@
25332697
25342698 refreshContents();
25352699 } else
2536
- if (event.getSource() == repairParentItem)
2700
+ if (source == repairParentItem)
25372701 {
25382702 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25392703 {
....@@ -2547,7 +2711,7 @@
25472711
25482712 refreshContents();
25492713 } else
2550
- if (event.getSource() == repairShadowItem)
2714
+ if (source == repairShadowItem)
25512715 {
25522716 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25532717 {
....@@ -2561,7 +2725,7 @@
25612725
25622726 refreshContents();
25632727 } else
2564
- if (event.getSource() == sortbysizeItem)
2728
+ if (source == sortbysizeItem)
25652729 {
25662730 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25672731 {
....@@ -2573,7 +2737,7 @@
25732737 ResetModel();
25742738 refreshContents();
25752739 } else
2576
- if (event.getSource() == sortbynameItem)
2740
+ if (source == sortbynameItem)
25772741 {
25782742 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25792743 {
....@@ -2585,7 +2749,7 @@
25852749 ResetModel();
25862750 refreshContents();
25872751 } else
2588
- if (event.getSource() == attachPigmentItem)
2752
+ if (source == attachPigmentItem)
25892753 {
25902754 String texture = GetFile("Attach pigment");
25912755 Object3D obj;
....@@ -2597,7 +2761,7 @@
25972761
25982762 refreshContents();
25992763 } else
2600
- if (event.getSource() == detachPigmentItem)
2764
+ if (source == detachPigmentItem)
26012765 {
26022766 Object3D obj;
26032767 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2608,7 +2772,7 @@
26082772
26092773 refreshContents();
26102774 } else
2611
- if (event.getSource() == attachBumpItem)
2775
+ if (source == attachBumpItem)
26122776 {
26132777 String texture = GetFile("Attach bump");
26142778 Object3D obj;
....@@ -2620,7 +2784,7 @@
26202784
26212785 refreshContents();
26222786 } else
2623
- if (event.getSource() == detachBumpItem)
2787
+ if (source == detachBumpItem)
26242788 {
26252789 Object3D obj;
26262790 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2631,7 +2795,7 @@
26312795
26322796 refreshContents();
26332797 } else
2634
- if (event.getSource() == pigmentBumpItem)
2798
+ if (source == pigmentBumpItem)
26352799 {
26362800 Object3D obj;
26372801 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2642,158 +2806,195 @@
26422806
26432807 refreshContents();
26442808 } else
2645
- if (event.getSource() == flashSelectionButton)
2809
+ if (source == flashSelectionButton)
26462810 {
26472811 CameraPane.flash = true;
26482812 refreshContents();
26492813 } else
2650
- if (event.getSource() == oneButton)
2814
+ if (source == oneButton)
26512815 {
26522816 } else
2653
- if (event.getSource() == twoButton)
2817
+ if (source == twoButton)
26542818 {
26552819 radio.layout = twoButton;
26562820 // bug
26572821 //gridPanel.setDividerLocation(1.0);
26582822 //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();
2823
+// bigThree.remove(scenePanel);
2824
+// bigThree.remove(centralPanel);
2825
+// bigThree.remove(XYZPanel);
2826
+// aWindowConstraints.gridx = 0;
2827
+// aWindowConstraints.gridy = 0;
2828
+// aWindowConstraints.gridwidth = 1;
2829
+// // aConstraints.gridheight = 3;
2830
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2831
+// aWindowConstraints.weightx = 0;
2832
+// aWindowConstraints.weighty = 1;
2833
+// //bigThree.add(jtp, aWindowConstraints);
2834
+// aWindowConstraints.weightx = 1;
2835
+// aWindowConstraints.gridwidth = 3;
2836
+// // aConstraints.gridheight = 3;
2837
+// aWindowConstraints.gridx = 1;
2838
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2839
+// bigThree.add(centralPanel, aWindowConstraints);
2840
+// aWindowConstraints.weightx = 0;
2841
+// aWindowConstraints.gridx = 4;
2842
+// aWindowConstraints.gridwidth = 1;
2843
+// // aConstraints.gridheight = 3;
2844
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2845
+// //bigThree.add(XYZPanel, aWindowConstraints);
2846
+// scenePanel.setVisible(false);
2847
+// centralPanel.setVisible(true);
2848
+// XYZPanel.setVisible(false);
2849
+ bigThree.ClearUI();
2850
+ bigThree.add(centralPanel);
2851
+ bigThree.FlushUI();
26832852 } else
2684
- if (event.getSource() == threeButton)
2853
+ if (source == threeButton)
26852854 {
26862855 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();
2856
+
2857
+// bigThree.remove(scenePanel);
2858
+// bigThree.remove(centralPanel);
2859
+// bigThree.remove(XYZPanel);
2860
+// aWindowConstraints.gridx = 0;
2861
+// aWindowConstraints.gridy = 0;
2862
+// aWindowConstraints.gridwidth = 1;
2863
+// // aConstraints.gridheight = 3;
2864
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2865
+// aWindowConstraints.weightx = 0;
2866
+// aWindowConstraints.weighty = 1;
2867
+// //bigThree.add(jtp, aWindowConstraints);
2868
+// aWindowConstraints.weightx = 1;
2869
+// aWindowConstraints.gridwidth = 3;
2870
+// // aConstraints.gridheight = 3;
2871
+// aWindowConstraints.gridx = 1;
2872
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2873
+// bigThree.add(centralPanel, aWindowConstraints);
2874
+// aWindowConstraints.weightx = 0;
2875
+// aWindowConstraints.gridx = 4;
2876
+// aWindowConstraints.gridwidth = 1;
2877
+// // aConstraints.gridheight = 3;
2878
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2879
+// bigThree.add(XYZPanel, aWindowConstraints);
2880
+// bigThree.validate();
2881
+// scenePanel.setVisible(false);
2882
+// centralPanel.setVisible(true);
2883
+// XYZPanel.setVisible(true);
2884
+ bigThree.ClearUI();
2885
+ bigThree.add(centralPanel);
2886
+ bigThree.add(XYZPanel);
2887
+ bigThree.FlushUI();
27112888 } else
2712
- if (event.getSource() == fourButton)
2889
+ if (source == fourButton)
27132890 {
27142891 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();
2892
+
2893
+// bigThree.remove(scenePanel);
2894
+// bigThree.remove(centralPanel);
2895
+// bigThree.remove(XYZPanel);
2896
+// aWindowConstraints.gridx = 0;
2897
+// aWindowConstraints.gridy = 0;
2898
+// aWindowConstraints.gridwidth = 1;
2899
+// // aWindowConstraints.gridheight = 3;
2900
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2901
+// aWindowConstraints.weightx = 1;
2902
+// aWindowConstraints.weighty = 1;
2903
+// bigThree.add(scenePanel, aWindowConstraints);
2904
+// aWindowConstraints.weightx = 1;
2905
+// aWindowConstraints.gridwidth = 3;
2906
+// // aConstraints.gridheight = 3;
2907
+// aWindowConstraints.gridx = 1;
2908
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2909
+// //bigThree.add(cameraPanel, aWindowConstraints);
2910
+// aWindowConstraints.weightx = 0;
2911
+// aWindowConstraints.gridx = 4;
2912
+// aWindowConstraints.gridwidth = 1;
2913
+// // aWindowConstraints.gridheight = 3;
2914
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2915
+// //bigThree.add(XYZPanel, aWindowConstraints);
2916
+// bigThree.validate();
2917
+// scenePanel.setVisible(true);
2918
+// centralPanel.setVisible(false);
2919
+// XYZPanel.setVisible(false);
2920
+ bigThree.ClearUI();
2921
+ bigThree.add(scenePanel);
2922
+ bigThree.FlushUI();
27392923 } else
2740
- if (event.getSource() == sixButton)
2924
+ if (source == sixButton)
27412925 {
27422926 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();
2927
+
2928
+// bigThree.remove(scenePanel);
2929
+// bigThree.remove(centralPanel);
2930
+// bigThree.remove(XYZPanel);
2931
+// aWindowConstraints.gridx = 0;
2932
+// aWindowConstraints.gridy = 0;
2933
+// aWindowConstraints.gridwidth = 1;
2934
+// // aConstraints.gridheight = 3;
2935
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2936
+// aWindowConstraints.weightx = 0;
2937
+// aWindowConstraints.weighty = 1;
2938
+// bigThree.add(scenePanel, aWindowConstraints);
2939
+// aWindowConstraints.weightx = 1;
2940
+// aWindowConstraints.gridwidth = 3;
2941
+// // aWindowConstraints.gridheight = 3;
2942
+// aWindowConstraints.gridx = 1;
2943
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2944
+// bigThree.add(centralPanel, aWindowConstraints);
2945
+// aWindowConstraints.weightx = 0;
2946
+// aWindowConstraints.gridx = 4;
2947
+// aWindowConstraints.gridwidth = 1;
2948
+// // aWindowConstraints.gridheight = 3;
2949
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2950
+// //bigThree.add(XYZPanel, aConstraints);
2951
+// bigThree.validate();
2952
+// scenePanel.setVisible(true);
2953
+// centralPanel.setVisible(true);
2954
+// XYZPanel.setVisible(false);
2955
+ bigThree.ClearUI();
2956
+ bigThree.add(scenePanel);
2957
+ bigThree.add(centralPanel);
2958
+ bigThree.FlushUI();
27672959 } else
2768
- if (event.getSource() == sevenButton)
2960
+ if (source == sevenButton)
27692961 {
27702962 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();
2963
+
2964
+// bigThree.remove(scenePanel);
2965
+// bigThree.remove(centralPanel);
2966
+// bigThree.remove(XYZPanel);
2967
+// aWindowConstraints.gridx = 0;
2968
+// aWindowConstraints.gridy = 0;
2969
+// aWindowConstraints.gridwidth = 1;
2970
+// // aWindowConstraints.gridheight = 3;
2971
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2972
+// aWindowConstraints.weightx = 0;
2973
+// aWindowConstraints.weighty = 1;
2974
+// bigThree.add(scenePanel, aWindowConstraints);
2975
+// aWindowConstraints.weightx = 1;
2976
+// aWindowConstraints.gridwidth = 3;
2977
+// // aWindowConstraints.gridheight = 3;
2978
+// aWindowConstraints.gridx = 1;
2979
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2980
+// bigThree.add(centralPanel, aWindowConstraints);
2981
+// aWindowConstraints.weightx = 0;
2982
+// aWindowConstraints.gridx = 4;
2983
+// aWindowConstraints.gridwidth = 1;
2984
+// // aConstraints.gridheight = 3;
2985
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2986
+// bigThree.add(XYZPanel, aWindowConstraints);
2987
+// bigThree.validate();
2988
+// scenePanel.setVisible(true);
2989
+// centralPanel.setVisible(true);
2990
+// XYZPanel.setVisible(true);
2991
+ bigThree.ClearUI();
2992
+ bigThree.add(scenePanel);
2993
+ bigThree.add(centralPanel);
2994
+ bigThree.add(XYZPanel);
2995
+ bigThree.FlushUI();
27952996 } else
2796
- if (event.getSource() == rootButton)
2997
+ if (source == rootButton)
27972998 {
27982999 Object3D obj;
27993000 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2805,7 +3006,7 @@
28053006
28063007 refreshContents(true);
28073008 } else
2808
- if (event.getSource() == closeButton)
3009
+ if (source == closeButton)
28093010 {
28103011 //System.out.println("CLOSE: " + buttonGroup.getSelection());
28113012 cRadio ab;
....@@ -2826,11 +3027,11 @@
28263027 }
28273028 refreshContents(true);
28283029 } else
2829
- if (event.getSource() == editItem || event.getSource() == editButton)
3030
+ if (source == editItem || source == editButton)
28303031 {
28313032 EditSelection(false);
28323033 } else
2833
- if (event.getSource() == uneditButton)
3034
+ if (source == uneditButton)
28343035 {
28353036 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28363037 {
....@@ -2840,14 +3041,14 @@
28403041 child.CloseUI();
28413042 listUI.remove(child);
28423043
2843
- child.editWindow = null; // ???????????
3044
+ //child.editWindow = null; // ???????????
28443045 }
2845
- objEditor.ctrlPanel.revalidate();
3046
+ objEditor.ctrlPanel.FlushUI();
28463047 //objEditor.jTree.clearSelection();
28473048 //objEditor.ResetSliders();
28483049 refreshContents(true);
28493050 } else
2850
- if (event.getSource() == clearPanelButton)
3051
+ if (source == clearPanelButton)
28513052 {
28523053 assert(copy == group);
28533054 //copy.ClearUI();
....@@ -2858,7 +3059,7 @@
28583059 listUI.clear();
28593060 refreshContents(true);
28603061 } else
2861
- if (event.getSource() == allParamsButton)
3062
+ if (source == allParamsButton)
28623063 {
28633064 assert(copy == group);
28643065
....@@ -2879,19 +3080,19 @@
28793080
28803081 refreshContents(true);
28813082 } else
2882
- if (event.getSource() == unselectButton)
3083
+ if (source == unselectButton)
28833084 {
28843085 objEditor.jTree.clearSelection();
28853086 // ?? oct 2012 GrafreeD.clipboard.clear();
28863087 objEditor.ResetSliders();
28873088 refreshContents(true);
28883089 } else
2889
- if(event.getSource() instanceof cRadio)
3090
+ if(source instanceof cRadio)
28903091 {
28913092 group.parent = keepparent;
28923093 group.attributes = 0;
28933094 //group.editWindow = null;
2894
- /*cRadio*/ radio = (cRadio)event.getSource();
3095
+ /*cRadio*/ radio = (cRadio)source;
28953096 Object3D obj = radio.GetObject();
28963097 System.out.println("Edit " + obj);
28973098 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2911,7 +3112,7 @@
29113112 }
29123113
29133114 copy = group;
2914
- //CameraPane.theRenderer.object = group;
3115
+ //Globals.theRenderer.object = group;
29153116 if(!useclient)
29163117 {
29173118 cameraView.renderCamera = radio.camera;
....@@ -2926,7 +3127,9 @@
29263127 frontView.object = group;
29273128 sideView.object = group;
29283129 }
2929
- group.editWindow = this;
3130
+
3131
+// fix "+" issue group.editWindow = this;
3132
+
29303133 /*
29313134 currentLayout = radio.layout;
29323135 if (currentLayout == null)
....@@ -2939,7 +3142,20 @@
29393142 //group.attributes = -1;
29403143 ResetModel();
29413144 refreshContents(true);
2942
- }
3145
+ } else if (event.getSource() == editCameraItem)
3146
+ {
3147
+ cameraView.ProtectCamera();
3148
+ cameraView.repaint();
3149
+ return;
3150
+ } else if (event.getSource() == revertCameraItem)
3151
+ {
3152
+ cameraView.RevertCamera();
3153
+ cameraView.repaint();
3154
+ return;
3155
+ // } else if (event.getSource() == textureButton)
3156
+ // {
3157
+ // return; // true;
3158
+ }
29433159 else
29443160 {
29453161 //return super.action(event, arg);
....@@ -3000,6 +3216,28 @@
30003216 refreshContents();
30013217 }
30023218
3219
+ void TransformChildren()
3220
+ {
3221
+ Object3D obj;
3222
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3223
+ {
3224
+ obj = (Object3D)e.nextElement();
3225
+ obj.KeepTextureMatrices();
3226
+ obj.TransformChildren();
3227
+ obj.RestoreTextureMatrices();
3228
+
3229
+// if (obj.parent == null)
3230
+// {
3231
+// System.out.println("NULL PARENT!");
3232
+// new Exception().printStackTrace();
3233
+// }
3234
+// else
3235
+// TouchTransform(obj);
3236
+// //obj.parent.Touch();
3237
+ }
3238
+
3239
+ refreshContents();
3240
+ }
30033241
30043242 void ResetTransform()
30053243 {
....@@ -3112,7 +3350,7 @@
31123350 refreshContents();
31133351 }
31143352
3115
- void ResetCentroid()
3353
+ void ResetCentroid(boolean full)
31163354 {
31173355 Object3D obj;
31183356 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3127,12 +3365,16 @@
31273365 LA.matIdentity(Object3D.mat);
31283366 obj.getBounds(minima, maxima, false);
31293367 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3130
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3368
+ if (full)
3369
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
31313370 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
31323371 obj.TransformMesh(Object3D.mat);
3372
+
31333373 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3134
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3374
+ if (full)
3375
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
31353376 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3377
+
31363378 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
31373379 //Object3D.mat[3][0] = -Object3D.mat[3][0];
31383380 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3198,9 +3440,9 @@
31983440 obj = (Object3D)e.nextElement();
31993441
32003442 System.out.println("Object is: " + obj);
3201
- GrafreeD.AnalyzeObject(obj);
3443
+ Grafreed.AnalyzeObject(obj);
32023444 System.out.println("Boundary rep: " + obj.bRep);
3203
- GrafreeD.AnalyzeObject(obj.bRep);
3445
+ Grafreed.AnalyzeObject(obj.bRep);
32043446
32053447 // System.err.println((size/1024) + " KB is the size of " + obj);
32063448 }
....@@ -3414,8 +3656,8 @@
34143656
34153657 void ParseVertices()
34163658 {
3417
- boolean epsequal = GrafreeD.epsequal;
3418
- GrafreeD.epsequal = true;
3659
+ boolean epsequal = Grafreed.epsequal;
3660
+ Grafreed.epsequal = true;
34193661
34203662 for (int i=0; i<group.selection.size(); i++)
34213663 {
....@@ -3440,7 +3682,7 @@
34403682 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
34413683 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
34423684
3443
- g.add(GrafreeD.clipboard);
3685
+ g.add(Grafreed.clipboard);
34443686
34453687 buffer.add(g);
34463688 }
....@@ -3455,7 +3697,7 @@
34553697 makeSomething(buffer, i==group.selection.size()-1);
34563698 }
34573699
3458
- GrafreeD.epsequal = epsequal;
3700
+ Grafreed.epsequal = epsequal;
34593701
34603702 refreshContents();
34613703 }
....@@ -3473,7 +3715,16 @@
34733715 String pigment = Object3D.GetPigment(tex);
34743716 //String bump = Object3D.GetBump(tex);
34753717
3476
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3718
+ com.sun.opengl.util.texture.TextureData texturedata = null;
3719
+
3720
+ try
3721
+ {
3722
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3723
+ }
3724
+ catch (Exception e)
3725
+ {
3726
+ System.err.println("FAIL: " + node);
3727
+ }
34773728
34783729 double s = v.s;
34793730
....@@ -3561,11 +3812,11 @@
35613812
35623813 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
35633814
3564
- boolean random = CameraPane.RANDOM;
3565
- CameraPane.RANDOM = false; // parse all random nodes
3815
+ boolean random = CameraPane.SWITCH;
3816
+ CameraPane.SWITCH = false; // parse all random nodes
35663817 lowres.linkVerticesThis(null);
35673818 lowres.linkVerticesThis(sn);
3568
- CameraPane.RANDOM = random;
3819
+ CameraPane.SWITCH = random;
35693820
35703821 System.err.flush();
35713822
....@@ -3605,7 +3856,7 @@
36053856 return;
36063857
36073858 Object3D poses = group.selection.get(0);
3608
- Object3D ref = GrafreeD.clipboard.get(0);
3859
+ Object3D ref = Grafreed.clipboard.get(0);
36093860
36103861 Object3D newgroup = new Object3D("Po:" + poses.name);
36113862
....@@ -3774,7 +4025,7 @@
37744025 group.selection.RelinkToSupport(); // july 2014
37754026 System.out.println("DONE.");
37764027 refreshContents();
3777
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
4028
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
37784029 }
37794030
37804031 void ReduceMesh(boolean reduction34)
....@@ -3799,9 +4050,9 @@
37994050
38004051 void ClipMesh()
38014052 {
3802
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
4053
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
38034054 {
3804
- Object3D content = GrafreeD.clipboard.get(0);
4055
+ Object3D content = Grafreed.clipboard.get(0);
38054056
38064057 if (content instanceof cGroup && ((cGroup)content).transientlink )
38074058 content = ((cGroup)content).get(0);
....@@ -3810,7 +4061,7 @@
38104061 // {
38114062 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
38124063 // }
3813
- group.selection.ClipMesh(GrafreeD.clipboard);
4064
+ group.selection.ClipMesh(Grafreed.clipboard);
38144065 }
38154066 // group.selection.ClipMesh(GrafreeD.clipboard);
38164067 System.out.println("DONE.");
....@@ -3945,7 +4196,7 @@
39454196 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
39464197
39474198 Object3D elem = (Object3D)group.selection.elementAt(i);
3948
- if(elem != group)
4199
+ if(elem != group || !newWindow)
39494200 {
39504201 // if (!(elem instanceof Composite))
39514202 // newWindow = false;
....@@ -4050,25 +4301,28 @@
40504301 System.err.println("info : " + child.GetPath());
40514302 }
40524303 }
4053
- else
4054
- {
4055
- objEditor.SetMaterial(group); // .GetMaterial());
4056
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4057
- System.err.println("info : " + group.GetPath());
4058
- }
4304
+// else
4305
+// {
4306
+// objEditor.SetMaterial(group); // .GetMaterial());
4307
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4308
+// System.err.println("info : " + group.GetPath());
4309
+// }
40594310
40604311 objEditor.SetText(); // jan 2014
40614312
4062
- if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4313
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
40634314 CameraPane.flash = true;
40644315
4065
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4316
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
40664317 // a camera
40674318 {
4068
- 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;
4319
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
4320
+ {
4321
+ CameraPane.camerachangeframe = 0; // don't refuse it
4322
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4323
+ }
4324
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4325
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
40724326 }
40734327
40744328 refreshContents();
....@@ -4150,12 +4404,12 @@
41504404 {
41514405 if (group.selection.isEmpty())
41524406 return;
4153
- GrafreeD.clipboardIsTempGroup = false;
4407
+ Grafreed.clipboardIsTempGroup = false;
41544408 Composite tGroup = null;
41554409 if (group.selection.size() > 0) // 1)
41564410 {
41574411 tGroup = new cGroup();
4158
- GrafreeD.clipboardIsTempGroup = true;
4412
+ Grafreed.clipboardIsTempGroup = true;
41594413 }
41604414
41614415 if (cut)
....@@ -4195,16 +4449,16 @@
41954449 //System.out.println("cut " + child);
41964450 //System.out.println("parent = " + child.parent);
41974451 // tmp.addChild(child);
4198
- if (GrafreeD.clipboardIsTempGroup)
4452
+ if (Grafreed.clipboardIsTempGroup)
41994453 tGroup.add/*Child*/(tmp);
42004454 else
4201
- GrafreeD.clipboard = tmp;
4455
+ Grafreed.clipboard = tmp;
42024456 }
42034457 else
4204
- if (GrafreeD.clipboardIsTempGroup)
4458
+ if (Grafreed.clipboardIsTempGroup)
42054459 tGroup.add/*Child*/(child);
42064460 else
4207
- GrafreeD.clipboard = child;
4461
+ Grafreed.clipboard = child;
42084462 }
42094463
42104464 //ResetModel();
....@@ -4236,21 +4490,21 @@
42364490 //System.out.println("cut " + elem);
42374491 //System.out.println("parent = " + elem.parent);
42384492 // tmp.addChild(elem);
4239
- if (GrafreeD.clipboardIsTempGroup)
4493
+ if (Grafreed.clipboardIsTempGroup)
42404494 tGroup.add/*Child*/(tmp);
42414495 else
4242
- GrafreeD.clipboard = tmp;
4496
+ Grafreed.clipboard = tmp;
42434497 }
42444498 else
4245
- if (GrafreeD.clipboardIsTempGroup)
4499
+ if (Grafreed.clipboardIsTempGroup)
42464500 tGroup.add/*Child*/(child);
42474501 else
4248
- GrafreeD.clipboard = child;
4502
+ Grafreed.clipboard = child;
42494503 }
42504504
42514505 }
4252
- if (GrafreeD.clipboardIsTempGroup)
4253
- GrafreeD.clipboard = tGroup;
4506
+ if (Grafreed.clipboardIsTempGroup)
4507
+ Grafreed.clipboard = tGroup;
42544508 if (cut)
42554509 {
42564510 ResetModel();
....@@ -4264,7 +4518,7 @@
42644518 // return;
42654519 boolean first = true;
42664520
4267
- if (GrafreeD.clipboardIsTempGroup)
4521
+ if (Grafreed.clipboardIsTempGroup)
42684522 {
42694523 Composite temp;
42704524
....@@ -4275,7 +4529,7 @@
42754529 temp = (Composite)Applet3D.clipboard.deepCopy();
42764530 */
42774531 Object3D elem;
4278
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4532
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
42794533 {
42804534 Object3D child = (Object3D)e.nextElement();
42814535
....@@ -4309,21 +4563,21 @@
43094563 //Object3D cb = Applet3D.clipboard;
43104564 //temp.addChild(cb);
43114565 //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());
4566
+ assert(Grafreed.clipboard.parent == null);
4567
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4568
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4569
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4570
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
43174571 else
4318
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4319
- GrafreeD.clipboard.get(0).parent = keepparent;
4572
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4573
+ Grafreed.clipboard.get(0).parent = keepparent;
43204574 }
43214575
43224576 ResetModel();
43234577 refreshContents();
43244578 }
43254579
4326
- void pasteInto(boolean copyit)
4580
+ void pasteInto(boolean copyit, boolean clone)
43274581 {
43284582 // if (GrafreeD.clipboard == null)
43294583 // return;
....@@ -4352,15 +4606,22 @@
43524606 if (copyit)
43534607 {
43544608 // paste(false);
4355
- CloneClipboard(false); // sept 2014
4609
+ if (clone)
4610
+ {
4611
+ CloneClipboard(false); // sept 2014
4612
+ }
4613
+ else
4614
+ {
4615
+ paste(false);
4616
+ }
43564617 }
43574618 else
43584619 {
43594620 boolean first = true;
43604621
4361
- if (GrafreeD.clipboardIsTempGroup)
4622
+ if (Grafreed.clipboardIsTempGroup)
43624623 {
4363
- Composite temp = (Composite)GrafreeD.clipboard;
4624
+ Composite temp = (Composite)Grafreed.clipboard;
43644625 Object3D copy;
43654626 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
43664627 {
....@@ -4370,7 +4631,7 @@
43704631 }
43714632 } else
43724633 {
4373
- linkSomething(GrafreeD.clipboard); //.get(0));
4634
+ linkSomething(Grafreed.clipboard); //.get(0));
43744635 }
43754636 }
43764637 }
....@@ -4775,21 +5036,6 @@
47755036 }
47765037 */
47775038
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
-
47935039 /*
47945040 public void Callback(Object obj)
47955041 {
....@@ -4813,26 +5059,9 @@
48135059 }
48145060 */
48155061
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
-
48335062 String GetFile(String dialogName)
48345063 {
4835
- if (GrafreeD.standAlone)
5064
+ if (Grafreed.standAlone)
48365065 {
48375066 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
48385067 browser.show();
....@@ -4896,10 +5125,12 @@
48965125 cButton flashSelectionButton;
48975126 cButton editButton;
48985127 cButton uneditButton;
5128
+ JCheckBox allParamsButton;
48995129 cButton clearpanelButton;
4900
- cButton allParamsButton;
49015130 cButton unselectButton;
49025131
5132
+ cButton oneStepButton;
5133
+
49035134 cButton screenfitButton;
49045135 cButton screenfitpointButton;
49055136 cButton snapobjectButton;
....@@ -4930,6 +5161,8 @@
49305161 private MenuItem lookFromItem;
49315162 private MenuItem switchItem;
49325163 private MenuItem cutItem;
5164
+ private MenuItem undoItem;
5165
+ private MenuItem redoItem;
49335166 private MenuItem duplicateItem;
49345167 private MenuItem cloneItem;
49355168 private MenuItem cloneSupportItem;
....@@ -4943,7 +5176,7 @@
49435176 private MenuItem linkverticesItem;
49445177 private MenuItem relinkverticesItem;
49455178 private MenuItem setMasterItem;
4946
- private MenuItem resetMeshItem;
5179
+ private MenuItem resetAllItem;
49475180 private MenuItem stepAllItem;
49485181 private MenuItem revertMeshItem;
49495182 private MenuItem poseMeshItem;
....@@ -4954,6 +5187,7 @@
49545187 private MenuItem mergeGeometriesItem;
49555188 private MenuItem copyItem;
49565189 private MenuItem pasteItem;
5190
+ private MenuItem pasteIntoItem;
49575191 private MenuItem pasteLinkItem;
49585192 private MenuItem pasteCloneItem;
49595193 private MenuItem pasteExpandItem;
....@@ -5003,8 +5237,10 @@
50035237 private MenuItem panoTexturesItem;
50045238
50055239 private MenuItem resetCentroidItem;
5006
- private MenuItem transformgeometryItem;
5240
+ private MenuItem resetCentroidXZItem;
50075241 private MenuItem resetTransformItem;
5242
+ private MenuItem transformGeometryItem;
5243
+ private MenuItem transformChildrenItem;
50085244 private MenuItem hideItem;
50095245 private MenuItem grabItem;
50105246 private MenuItem backItem;
....@@ -5051,7 +5287,7 @@
50515287 private MenuItem blobItem;
50525288 private MenuItem latheItem;
50535289 private MenuItem bezierItem;
5054
- private MenuItem checkerItem;
5290
+ private MenuItem overlayItem;
50555291 private MenuItem meshItem;
50565292 // private MenuItem meshGroupItem;
50575293 private MenuItem springItem;
....@@ -5073,11 +5309,6 @@
50735309 private MenuItem doubleItem;
50745310 private MenuItem tripleItem;
50755311
5076
- private MenuItem importGFDItem;
5077
- private MenuItem importVRMLX3DItem;
5078
- private MenuItem import3DSItem;
5079
- private MenuItem importOBJItem;
5080
-
50815312 private MenuItem computeAOItem;
50825313 private MenuItem recompileItem;
50835314 private MenuItem editScriptItem;
....@@ -5087,4 +5318,8 @@
50875318 private MenuItem analyzeItem;
50885319 private MenuItem dumpItem;
50895320 //boolean freezemodel = false;
5321
+
5322
+ Menu cameraMenu;
5323
+ MenuItem editCameraItem;
5324
+ MenuItem revertCameraItem;
50905325 }