Normand Briere
2019-06-13 4629090fafbef256abd0686a85ee12042d658868
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,130 @@
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
+
158
+// undoItem = menu.add(new MenuItem("Undo"));
159
+// undoItem.addActionListener(this);
160
+// redoItem = menu.add(new MenuItem("Redo"));
161
+// redoItem.addActionListener(this);
162
+// menu.add("-");
163
+ duplicateItem = menu.add(new MenuItem("Duplicate"));
164
+ duplicateItem.addActionListener(this);
165
+ cloneItem = menu.add(new MenuItem("Clone"));
166
+ cloneItem.addActionListener(this);
167
+ if (Globals.ADVANCED)
168
+ {
169
+ cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
170
+ cloneSupportItem.addActionListener(this);
171
+ }
172
+ menu.add("-");
173
+ cutItem = menu.add(new MenuItem("Cut"));
174
+ cutItem.addActionListener(this);
175
+ copyItem = menu.add(new MenuItem("Copy"));
176
+ copyItem.addActionListener(this);
177
+ pasteItem = menu.add(new MenuItem("Paste"));
178
+ pasteItem.addActionListener(this);
179
+ menu.add("-");
180
+
181
+ menu.add("-");
182
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
183
+ pasteIntoItem.addActionListener(this);
184
+ pasteLinkItem = menu.add(new MenuItem("Paste link"));
185
+ pasteLinkItem.addActionListener(this);
186
+ pasteCloneItem = menu.add(new MenuItem("Paste clone"));
187
+ pasteCloneItem.addActionListener(this);
188
+// pasteExpandItem = menu.add(new MenuItem("Paste expand"));
189
+// pasteExpandItem.addActionListener(this);
190
+ menu.add("-");
191
+ clearItem = menu.add(new MenuItem("Clear"));
192
+ clearItem.addActionListener(this);
193
+
194
+ if (Globals.ADVANCED)
195
+ {
196
+ // Deletes the cameras...
197
+ clearAllItem = menu.add(new MenuItem("Clear All"));
198
+ clearAllItem.addActionListener(this);
199
+ }
200
+
201
+ menuBar.add(cameraMenu = new Menu("View"));
202
+ //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
203
+ //zBufferItem.addActionListener(this);
204
+ //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
205
+ //normalLensItem.addActionListener(this);
206
+ cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint"));
207
+ revertCameraItem.addActionListener(this);
208
+
209
+ cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
210
+ toggleFullScreenItem.addItemListener(this);
211
+ toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
212
+ cameraMenu.add("-");
213
+
214
+ cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
215
+ toggleTextureItem.addItemListener(this);
216
+ toggleTextureItem.setState(CameraPane.textureon);
217
+
218
+ cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
219
+ toggleSwitchItem.addItemListener(this);
220
+ toggleSwitchItem.setState(CameraPane.SWITCH);
221
+
222
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
223
+ toggleHandleItem.addItemListener(this);
224
+ toggleHandleItem.setState(CameraPane.HANDLES);
225
+
226
+ cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
227
+ togglePaintItem.addItemListener(this);
228
+ togglePaintItem.setState(CameraPane.PAINTMODE);
229
+
230
+ if (Globals.ADVANCED)
231
+ {
232
+ cameraMenu.add("-");
233
+ cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
234
+ toggleLiveItem.addItemListener(this);
235
+ toggleLiveItem.setState(Globals.isLIVE());
236
+
237
+ cameraMenu.add(stepItem = new MenuItem("Step"));
238
+ stepItem.addActionListener(this);
239
+ // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
240
+ // toggleDLItem.addItemListener(this);
241
+ // toggleDLItem.setState(false);
242
+
243
+ cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
244
+ toggleRenderItem.addItemListener(this);
245
+ toggleRenderItem.setState(!CameraPane.frozen);
246
+
247
+ cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
248
+ toggleDebugItem.addItemListener(this);
249
+ toggleDebugItem.setState(CameraPane.DEBUG);
250
+
251
+ cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
252
+ toggleFrustumItem.addItemListener(this);
253
+ toggleFrustumItem.setState(CameraPane.FRUSTUM);
254
+
255
+ cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
256
+ toggleFootContactItem.addItemListener(this);
257
+ toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
258
+
259
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
260
+ toggleTimelineItem.addItemListener(this);
261
+ }
262
+
263
+// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
264
+// toggleRootItem.addItemListener(this);
265
+// toggleRootItem.setState(false);
266
+// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
267
+// animationItem.addItemListener(this);
268
+// animationItem.setState(CameraPane.ANIMATION);
269
+ cameraMenu.add("-");
270
+ cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint"));
271
+ editCameraItem.addActionListener(this);
272
+
273
+ if (Globals.ADVANCED)
274
+ {
152275 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
153276 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
154277 //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
....@@ -160,45 +283,17 @@
160283 lookAtItem.addActionListener(this);
161284 //lookFromItem.addActinoListener(this);
162285 //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
-
286
+ }
287
+
192288 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);
289
+ if (Globals.ADVANCED)
290
+ {
197291 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
198292 revertMeshItem.addActionListener(this);
199293 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
200294 resetreferencesItem.addActionListener(this);
201295 menu.add("-");
296
+ }
202297 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
203298 overwriteGeoItem.addActionListener(this);
204299 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -210,19 +305,26 @@
210305 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
211306 overwriteUVItem.addActionListener(this);
212307 menu.add("-");
308
+ if (Globals.ADVANCED)
309
+ {
213310 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
214311 generateMeshItem.addActionListener(this);
215312 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
216313 poseMeshItem.addActionListener(this);
217314 menu.add("-");
315
+ }
218316 resetsupportItem = menu.add(new MenuItem("Reset support"));
219317 resetsupportItem.addActionListener(this);
220318 linkverticesItem = menu.add(new MenuItem("Link to Support"));
221319 linkverticesItem.addActionListener(this);
222320 relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
223321 relinkverticesItem.addActionListener(this);
322
+
323
+ if (Globals.ADVANCED)
324
+ {
224325 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
225326 setMasterItem.addActionListener(this);
327
+ }
226328
227329 oe.menuBar.add(menu = new Menu("Group"));
228330 grabItem = menu.add(new MenuItem("Grab"));
....@@ -233,27 +335,32 @@
233335 frontItem.addActionListener(this);
234336 compositeItem = menu.add(new MenuItem("Composite"));
235337 compositeItem.addActionListener(this);
236
- hideItem = menu.add(new MenuItem("Hide"));
338
+ hideItem = menu.add(new MenuItem("Hidden Group"));
237339 hideItem.addActionListener(this);
238340 ungroupItem = menu.add(new MenuItem("Ungroup"));
239341 ungroupItem.addActionListener(this);
240342 menu.add("-");
241
- randomItem = menu.add(new MenuItem("Random"));
343
+ randomItem = menu.add(new MenuItem("Switch node"));
242344 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);
247345 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
248346 switchGeoItem.addActionListener(this);
249347 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
250348 switchTransfoItem.addActionListener(this);
251
- morphItem = menu.add(new MenuItem("Morph"));
349
+ morphItem = menu.add(new MenuItem("Morph Group"));
252350 morphItem.addActionListener(this);
351
+
352
+ if (Globals.ADVANCED)
353
+ {
354
+ menu.add("-");
355
+ physicsItem = menu.add(new MenuItem("Physics"));
356
+ physicsItem.addActionListener(this);
357
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
358
+ frameselectorItem.addActionListener(this);
253359 scriptNodeItem = menu.add(new MenuItem("Script Node"));
254360 scriptNodeItem.addActionListener(this);
255361 cameraItem = menu.add(new MenuItem("Camera"));
256362 cameraItem.addActionListener(this);
363
+ }
257364
258365 oe.menuBar.add(menu = new Menu("Object"));
259366 textureItem = menu.add(new MenuItem("Texture"));
....@@ -268,21 +375,29 @@
268375 shadowYItem.addActionListener(this);
269376 shadowZItem = menu.add(new MenuItem("Shadow Z"));
270377 shadowZItem.addActionListener(this);
378
+ if (Globals.ADVANCED)
379
+ {
380
+ menu.add("-");
271381 linkerItem = menu.add(new MenuItem("Linker"));
272382 linkerItem.addActionListener(this);
273
- templateItem = menu.add(new MenuItem("Template"));
274
- templateItem.addActionListener(this);
275383 attributeItem = menu.add(new MenuItem("Attribute"));
276384 attributeItem.addActionListener(this);
385
+ templateItem = menu.add(new MenuItem("Template"));
386
+ templateItem.addActionListener(this);
277387 pointflowItem = menu.add(new MenuItem("Point Flow"));
278388 pointflowItem.addActionListener(this);
389
+ }
279390 menu.add("-");
280391 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
281392 resetTransformItem.addActionListener(this);
282393 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
283394 resetCentroidItem.addActionListener(this);
284
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
285
- transformgeometryItem.addActionListener(this);
395
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
396
+ resetCentroidXZItem.addActionListener(this);
397
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
398
+ transformGeometryItem.addActionListener(this);
399
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
400
+ transformChildrenItem.addActionListener(this);
286401
287402 oe.menuBar.add(menu = new Menu("Geometry"));
288403 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -293,8 +408,11 @@
293408 genNormalsCADItem.addActionListener(this);
294409 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
295410 genNormalsMESHItem.addActionListener(this);
411
+ if (Globals.ADVANCED)
412
+ {
296413 genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
297414 genNormalsMINEItem.addActionListener(this);
415
+ }
298416 stripifyItem = menu.add(new MenuItem("Stripify"));
299417 stripifyItem.addActionListener(this);
300418 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -316,23 +434,34 @@
316434 reduce34MeshItem.addActionListener(this);
317435 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
318436 increaseMeshItem.addActionListener(this);
319
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
320
- smoothMeshItem.addActionListener(this);
321437 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
322438 clipMeshItem.addActionListener(this);
439
+
440
+ if (Globals.ADVANCED)
441
+ {
442
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
443
+ smoothMeshItem.addActionListener(this);
444
+ }
323445
324446 oe.menuBar.add(menu = new Menu("Attributes"));
325447 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
326448 clearMaterialsItem.addActionListener(this);
449
+ resetAllItem = menu.add(new MenuItem("Reset All"));
450
+ resetAllItem.addActionListener(this);
451
+ stepAllItem = menu.add(new MenuItem("Step All"));
452
+ stepAllItem.addActionListener(this);
327453 menu.add("-");
328454 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
329455 liveleavesItem.addActionListener(this);
330456 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
331457 unliveleavesItem.addActionListener(this);
458
+ if (Globals.ADVANCED)
459
+ {
332460 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
333461 supportleavesItem.addActionListener(this);
334462 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
335463 unsupportleavesItem.addActionListener(this);
464
+ }
336465 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
337466 hideleavesItem.addActionListener(this);
338467 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -376,29 +505,22 @@
376505 sortbynameItem = menu.add(new MenuItem("Sort by name"));
377506 sortbynameItem.addActionListener(this);
378507 menu.add("-");
508
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
509
+ shareGeometriesItem.addActionListener(this);
510
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
511
+ mergeGeometriesItem.addActionListener(this);
512
+ if (Globals.ADVANCED)
513
+ {
514
+ // Pretty much the same as duplicate and clone.
379515 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
380516 extractGeometriesItem.addActionListener(this);
381517 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
382518 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);
519
+ }
387520
388521 oe.menuBar.add(menu = new Menu("Insert"));
389522 buildCreateMenu(menu);
390523
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
-
402524 oe.menuBar.add(menu = new Menu("Tools"));
403525 buildToolsMenu(menu);
404526 }
....@@ -433,110 +555,110 @@
433555 oe.radioPanel.add(dummyButton);
434556 oe.buttonGroup.add(dummyButton);
435557 */
436
- aConstraints.gridy += 1;
437
-
438558 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
439559
440
- oe.aConstraints.gridwidth = 1;
441
- oe.aConstraints.gridx = 0;
560
+ oe.toolbarPanel.add(undoButton = new cButton("Undo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
561
+ undoButton.setToolTipText("Undo changes");
562
+ undoButton.addActionListener(this);
442563
443
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
444
- liveCB.setToolTipText("Enabled animation");
564
+ oe.toolbarPanel.add(redoButton = new cButton("Redo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
565
+ redoButton.setToolTipText("Redo changes");
566
+ redoButton.addActionListener(this);
567
+
568
+ oe.toolbarPanel.add(saveButton = new cButton("Save", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
569
+ saveButton.setToolTipText("Save changes");
570
+ saveButton.addActionListener(this);
571
+
572
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
573
+ liveCB.setToolTipText("Enable animation");
445574 liveCB.addItemListener(this);
446575
447
- oe.aConstraints.gridx += 1;
448
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints);
576
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
577
+ oneStepButton.setToolTipText("Animate one step forward");
578
+ oneStepButton.addActionListener(this);
579
+
580
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
581
+ fastCB.setToolTipText("Fast mode");
582
+ fastCB.addItemListener(this);
583
+
584
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
449585 trackCB.setToolTipText("Enable tracking");
450586 trackCB.addItemListener(this);
451587
452
- oe.aConstraints.gridx += 1;
453
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
588
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
454589 screenfitButton.setToolTipText("Screen fit");
455590 screenfitButton.addActionListener(this);
456
- oe.aConstraints.gridx += 1;
591
+
457592 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
458593 // screenfitpointButton.addActionListener(this);
459
-// oe.aConstraints.gridx += 1;
460
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
461
- snapobjectButton.addActionListener(this);
462
- snapobjectButton.setToolTipText("Snap Object");
463
- oe.aConstraints.gridx += 1;
464594
465
- //aConstraints.gridx = 0;
466
- //aConstraints.gridy += 1;
467
- oe.aConstraints.weighty = 0;
468
- oe.aConstraints.gridwidth = 1;
469
-
470
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
595
+ if (Globals.ADVANCED)
596
+ {
597
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
598
+ snapobjectButton.addActionListener(this);
599
+ snapobjectButton.setToolTipText("Snap Object");
600
+ }
601
+
602
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
471603 flashSelectionButton.setToolTipText("Show selection");
472604 flashSelectionButton.addActionListener(this);
473605
474
- oe.toolbarPanel.add(new cButton(" ", false));
606
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
475607
476
- oe.aConstraints.gridx += 1;
477
- oe.aConstraints.weighty = 0;
478
- oe.aConstraints.gridwidth = 1;
479
-
480
- //
481
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
608
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
482609 twoButton.setToolTipText("Show center view only");
483610 twoButton.addActionListener(this);
484
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
611
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
485612 fourButton.addActionListener(this);
486613 fourButton.setToolTipText("Show left panel only");
487
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
614
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
488615 sixButton.setToolTipText("2-column layout left");
489616 sixButton.addActionListener(this);
490
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
617
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
491618 threeButton.setToolTipText("2-column layout right");
492619 threeButton.addActionListener(this);
493
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
620
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
494621 sevenButton.setToolTipText("3-column layout");
495622 sevenButton.addActionListener(this);
496623 //
497624
498
- oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints);
499
- rootButton.setToolTipText("Edit object in new tab");
625
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
626
+ rootButton.setToolTipText("Edit selection in new tab");
500627 rootButton.addActionListener(this);
501
- oe.aConstraints.gridx += 1;
502
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
628
+
629
+ oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
503630 closeButton.setToolTipText("Close tab");
504631 closeButton.addActionListener(this);
505632 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
506633 //clearButton.addActionListener(this);
507
- oe.aConstraints.gridx += 1;
508634
509
- oe.aConstraints.gridx = 1; //
510
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
635
+ cGridBag commandsPanel = new cGridBag();
636
+
637
+ commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
638
+ editButton.setToolTipText("Edit selection");
511639 editButton.addActionListener(this);
512
- oe.aConstraints.gridx += 1;
513
- oe.aConstraints.weighty = 0;
514
- oe.aConstraints.gridwidth = 1;
515640
516
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
641
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
642
+ uneditButton.setToolTipText("Unedit selection");
517643 uneditButton.addActionListener(this);
518644
519
- oe.aConstraints.gridx += 1;
520
- oe.aConstraints.weighty = 0;
521
- oe.aConstraints.gridwidth = 1;
522
-
523
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
524
- clearPanelButton.addActionListener(this);
525
-
526
- oe.aConstraints.gridx += 1;
527
- oe.aConstraints.weighty = 0;
528
- oe.aConstraints.gridwidth = 1;
529
-
530
- oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints);
645
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
646
+ allParamsButton.setToolTipText("Edit all params");
531647 allParamsButton.addActionListener(this);
532648
533
- oe.aConstraints.gridx += 1;
534
- oe.aConstraints.weighty = 0;
535
- oe.aConstraints.gridwidth = 1;
536
-
537
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
649
+ commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
650
+ clearPanelButton.setToolTipText("Clear edit panel");
651
+ clearPanelButton.addActionListener(this);
652
+
653
+ commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
654
+ unselectButton.setToolTipText("Unselect");
538655 unselectButton.addActionListener(this);
539656
657
+ commandsPanel.preferredHeight = 1;
658
+
659
+ oe.treePanel.add(commandsPanel);
660
+ oe.treePanel.Return();
661
+
540662 // oe.aConstraints.gridx += 1;
541663 // oe.aConstraints.weighty = 0;
542664 // oe.aConstraints.gridwidth = 1;
....@@ -548,40 +670,37 @@
548670 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
549671 // gcButton.addActionListener(this);
550672
551
- oe.aConstraints.gridx = 0;
552
- oe.aConstraints.gridy += 1;
553
-
554
- //ctrlPanel.add(objList = new List(5, true));
555
- oe.aConstraints.gridwidth = 100;
556
- // oe.aConstraints.gridheight = 100;
557
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
558
- oe.aConstraints.gridheight = 1;
559
- oe.aConstraints.weighty = 0.5;
560
- oe.aConstraints.gridx = 0;
561
- JScrollPane jSP;
673
+ cGridBag jSPPanel = new cGridBag();
674
+
675
+ JScrollPane jSP;
562676 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
563
- oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints);
677
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
564678 ResetModel();
565
- oe.aConstraints.weighty = 0.5;
566
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
567
- oe.aConstraints.gridy += 1;
568
- oe.aConstraints.gridwidth = 1;
679
+
680
+ oe.treePanel.add(jSPPanel);
681
+ oe.treePanel.Return();
569682
570
- oe.aConstraints.weighty = 0;
571
- oe.aConstraints.gridwidth = 2;
572
-
573
- oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints);
683
+ cGridBag copyOptionsPanel = new cGridBag();
684
+
685
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
686
+ colorCB.setToolTipText("Copy color when dropped");
574687 colorCB.addItemListener(this);
575
- oe.aConstraints.gridx += 2;
576
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
688
+
689
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
690
+ materialCB.setToolTipText("Copy material when dropped");
577691 materialCB.addItemListener(this);
578
- oe.aConstraints.gridx += 2;
579
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
692
+
693
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
694
+ textureCB.setToolTipText("Copy texture when dropped");
580695 textureCB.addItemListener(this);
581696
582
- oe.aConstraints.gridx = 0;
583
- oe.aConstraints.gridy += 1;
697
+ copyOptionsPanel.preferredHeight = 1;
698
+ oe.treePanel.add(copyOptionsPanel);
699
+ oe.treePanel.Return();
584700
701
+// mainPanel.setDividerLocation(0.5); //1.0);
702
+// mainPanel.setResizeWeight(0.5);
703
+
585704 //jList.addListSelectionListener(this);
586705 oe.jTree.addTreeSelectionListener(this);
587706 //jTree.setRootVisible(false);
....@@ -604,45 +723,37 @@
604723 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
605724 }
606725
607
- void AddOptions(JPanel panel, GridBagConstraints constraints)
726
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
608727 {
609
- constraints.gridx = 0;
610
- constraints.gridy = 0;
611
- panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), constraints);
612
- fastCB.setToolTipText("Fast mode");
613
- fastCB.addItemListener(this);
614
- constraints.gridy += 1;
615
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), constraints);
616
- supportCB.setToolTipText("Enabled rigging");
617
- supportCB.addItemListener(this);
618
-
619
- // constraints.gridy += 1;
620
- // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
621
- // localCB.addItemListener(this);
622
-
623
- constraints.gridy += 1;
624
- panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), constraints);
625
- crowdCB.setToolTipText("Used for crowds");
626
- crowdCB.addItemListener(this);
627
-
628
- constraints.gridy += 1;
629
- panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), constraints);
630
- smoothCB.setToolTipText("Snapping delay");
631
- smoothCB.addItemListener(this);
632
-
633
- constraints.gridy += 1;
634
- panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), constraints);
635
- slowCB.setToolTipText("Smooth interpolation");
636
- slowCB.addItemListener(this);
637
- constraints.gridy += 1;
638
- panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE), constraints);
728
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
639729 boxCB.setToolTipText("Display bounding boxes");
640730 boxCB.addItemListener(this);
641
- constraints.gridy += 1;
642
- panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE), constraints);
731
+
732
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
643733 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
644734 zoomBoxCB.addItemListener(this);
645735
736
+ if (true) // Globals.ADVANCED)
737
+ {
738
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
739
+ supportCB.setToolTipText("Enable rigging");
740
+ supportCB.addItemListener(this);
741
+
742
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
743
+ // localCB.addItemListener(this);
744
+
745
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
746
+ crowdCB.setToolTipText("Used for crowds");
747
+ crowdCB.addItemListener(this);
748
+
749
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
750
+ smoothCB.setToolTipText("Snapping delay");
751
+ smoothCB.addItemListener(this);
752
+
753
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
754
+ slowCB.setToolTipText("Smooth interpolation");
755
+ slowCB.addItemListener(this);
756
+
646757 // constraints.gridy += 1;
647758 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
648759 // speakerMocapCB.addItemListener(this);
....@@ -650,16 +761,16 @@
650761 if (false)
651762 {
652763 // handled in scripts
653
- constraints.gridy += 1;
654
- panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), constraints);
764
+ //constraints.gridy += 1;
765
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
655766 speakerCameraCB.addItemListener(this);
656767
657
- constraints.gridy += 1;
658
- panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), constraints);
768
+ //constraints.gridy += 1;
769
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
659770 speakerFocusCB.addItemListener(this);
660771
661
- constraints.gridy += 1;
662
- panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), constraints);
772
+ //constraints.gridy += 1;
773
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
663774 smoothfocusCB.addItemListener(this);
664775 }
665776
....@@ -667,14 +778,20 @@
667778 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
668779 // debugCB.addItemListener(this);
669780
670
- constraints.gridy += 1;
671
- panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL), constraints);
781
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
672782 oeilCB.addItemListener(this);
673783
674
- constraints.gridy += 1;
675
- panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT), constraints);
784
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
676785 lookAtCB.setToolTipText("Look-at target");
677786 lookAtCB.addItemListener(this);
787
+
788
+ }
789
+
790
+ cGridBag fill = new cGridBag();
791
+
792
+ fill.preferredHeight = 200;
793
+
794
+ panel.add(fill);
678795
679796 }
680797
....@@ -689,6 +806,7 @@
689806 buttonGroup.add(radioButton);
690807 radioButton.doClick();
691808 }
809
+
692810 void SetupViews(ObjEditor oe)
693811 {
694812 oe.SetupViews();
....@@ -905,7 +1023,9 @@
9051023 // objEditor.DropFile((java.io.File[]) object, true);
9061024 // return;
9071025 // }
908
- if (string.charAt(0) == '/')
1026
+
1027
+ // File path for Mac and Windows
1028
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
9091029 {
9101030 // file(s)
9111031 String[] names = string.split("\n");
....@@ -932,7 +1052,7 @@
9321052
9331053 flashIt = false;
9341054 CameraPane pane = (CameraPane) target;
935
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1055
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
9361056 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
9371057
9381058 if (group.selection.size() == 1)
....@@ -959,11 +1079,11 @@
9591079 {
9601080 loadClipboard(true);
9611081 objEditor.jTree.setSelectionPath(destinationPath);
962
- pasteInto(false);
1082
+ pasteInto(false, false);
9631083 } else {
9641084 loadClipboard(false);
9651085 objEditor.jTree.setSelectionPath(destinationPath);
966
- pasteInto(false); // true); // ???
1086
+ pasteInto(false, false); // true); // ???
9671087 }
9681088 }
9691089 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1085,27 +1205,33 @@
10851205 kleinItem.addActionListener(this);
10861206 particleItem = menu.add(new MenuItem("Particle system"));
10871207 particleItem.addActionListener(this);
1208
+ if (Globals.ADVANCED)
1209
+ {
10881210 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10891211 ragdollItem.addActionListener(this);
10901212 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10911213 ragdoll2Item.addActionListener(this);
1214
+ }
10921215 menu.add("-");
1093
- meshItem = menu.add(new MenuItem("Mesh"));
1216
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10941217 meshItem.addActionListener(this);
10951218 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10961219 // meshGroupItem.addActionListener(this);
1220
+ if (Globals.ADVANCED)
1221
+ {
10971222 springItem = menu.add(new MenuItem("Spring"));
10981223 springItem.addActionListener(this);
10991224 flagItem = menu.add(new MenuItem("Flag"));
11001225 flagItem.addActionListener(this);
1101
- bezierItem = menu.add(new MenuItem("Patch"));
1102
- bezierItem.addActionListener(this);
1103
- checkerItem = menu.add(new MenuItem("Checker"));
1104
- checkerItem.addActionListener(this);
11051226 blobItem = menu.add(new MenuItem("Blob"));
11061227 blobItem.addActionListener(this);
11071228 latheItem = menu.add(new MenuItem("Lathe"));
11081229 latheItem.addActionListener(this);
1230
+ }
1231
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1232
+ bezierItem.addActionListener(this);
1233
+ overlayItem = menu.add(new MenuItem("Overlay"));
1234
+ overlayItem.addActionListener(this);
11091235 lightItem = menu.add(new MenuItem("Light"));
11101236 lightItem.addActionListener(this);
11111237 menu.add("-");
....@@ -1115,34 +1241,39 @@
11151241 loopItem.addActionListener(this);
11161242 doubleItem = menu.add(new MenuItem("Fork"));
11171243 doubleItem.addActionListener(this);
1244
+ if (Globals.ADVANCED)
1245
+ {
11181246 tripleItem = menu.add(new MenuItem("Trident"));
11191247 tripleItem.addActionListener(this);
1248
+ }
11201249 }
11211250
11221251 void buildToolsMenu(Menu menu)
11231252 {
11241253 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
11251254 animationItem.addItemListener(this);
1126
- animationItem.setState(CameraPane.ANIMATION);
1255
+ animationItem.setState(Globals.ANIMATION);
11271256
11281257 menu.add("-");
11291258 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
11301259 parseverticesItem.addActionListener(this);
11311260 textureFieldItem = menu.add(new MenuItem("Texture Field"));
11321261 textureFieldItem.addActionListener(this);
1133
- alignItem = menu.add(new MenuItem("Align"));
1262
+ alignItem = menu.add(new MenuItem("Align Objects"));
11341263 alignItem.addActionListener(this);
1135
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1136
- mirrorItem.addActionListener(this);
11371264 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11381265 reduceMorphItem.addActionListener(this);
11391266 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11401267 reduce34MorphItem.addActionListener(this);
1141
-
1268
+ menu.add("-");
11421269 menu.add(computeAOItem = new MenuItem("Compute AO"));
11431270 computeAOItem.addActionListener(this);
1144
- menu.add("-");
11451271
1272
+ if (Globals.ADVANCED)
1273
+ {
1274
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1275
+ mirrorItem.addActionListener(this);
1276
+ menu.add("-");
11461277 menu.add(memoryItem = new MenuItem("Memory Usage"));
11471278 memoryItem.addActionListener(this);
11481279 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1165,6 +1296,7 @@
11651296 menu.add("-");
11661297 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11671298 editScriptItem.addActionListener(this);
1299
+ }
11681300 }
11691301
11701302 void ScreenFit()
....@@ -1493,9 +1625,9 @@
14931625
14941626 void Overwrite(int mask)
14951627 {
1496
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1628
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14971629 {
1498
- Object3D content = GrafreeD.clipboard.get(0);
1630
+ Object3D content = Grafreed.clipboard.get(0);
14991631
15001632 if (content instanceof cGroup && ((cGroup)content).transientlink )
15011633 content = ((cGroup)content).get(0);
....@@ -1518,6 +1650,7 @@
15181650 //
15191651 public void actionPerformed(ActionEvent event) // , Object arg)
15201652 {
1653
+ Object source = event.getSource();
15211654 /*
15221655 if (event.getSource() == nameField)
15231656 {
....@@ -1529,11 +1662,11 @@
15291662 }
15301663 else
15311664 */
1532
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1665
+ if (source == lookAtItem || source == lookFromItem)
15331666 {
15341667 ScreenFit();
15351668 } else
1536
- if (event.getSource() == switchItem)
1669
+ if (source == switchItem)
15371670 {
15381671 cVector v1 = new cVector();
15391672 cVector v2 = new cVector();
....@@ -1542,11 +1675,11 @@
15421675 objEditor.cameraView.renderCamera.setAim(v2, v1);
15431676 objEditor.cameraView.repaint();
15441677 } else
1545
- if (event.getSource() == rectoidItem)
1678
+ if (source == rectoidItem)
15461679 {
15471680 makeSomething(new Box());
15481681 } else
1549
- if (event.getSource() == particleItem)
1682
+ if (source == particleItem)
15501683 {
15511684 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15521685 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1567,9 +1700,9 @@
15671700 applyExample(particleGeom, "SMOKE");
15681701 makeSomething(particleGeom);
15691702 } else
1570
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1703
+ if (source == ragdollItem || source == ragdoll2Item)
15711704 {
1572
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1705
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15731706
15741707 ragdoll.toParent = LA.newMatrix();
15751708 ragdoll.fromParent = LA.newMatrix();
....@@ -1587,7 +1720,7 @@
15871720 } else
15881721 /*
15891722 */
1590
- if (event.getSource() == heightFieldItem)
1723
+ if (source == heightFieldItem)
15911724 {
15921725 Object3D obj = new Object3D();
15931726
....@@ -1625,31 +1758,31 @@
16251758
16261759 makeSomething(obj);
16271760 } else
1628
- if (event.getSource() == gridItem)
1761
+ if (source == gridItem)
16291762 {
16301763 makeSomething(new Grid());
16311764 } else
1632
- if (event.getSource() == ellipsoidItem)
1765
+ if (source == ellipsoidItem)
16331766 {
16341767 makeSomething(new Sphere());
16351768 } else
1636
- if (event.getSource() == coneItem)
1769
+ if (source == coneItem)
16371770 {
16381771 makeSomething(new Cone());
16391772 } else
1640
- if (event.getSource() == torusItem)
1773
+ if (source == torusItem)
16411774 {
16421775 makeSomething(new Torus());
16431776 } else
1644
- if (event.getSource() == superItem)
1777
+ if (source == superItem)
16451778 {
16461779 makeSomething(new Superellipsoid());
16471780 } else
1648
- if (event.getSource() == kleinItem)
1781
+ if (source == kleinItem)
16491782 {
16501783 makeSomething(new Klein());
16511784 } else
1652
- if (event.getSource() == blobItem)
1785
+ if (source == blobItem)
16531786 {
16541787 Blob blob = new Blob();
16551788 BlobComponent comp = new BlobComponent();
....@@ -1657,15 +1790,15 @@
16571790 //blob.retile();
16581791 makeSomething(blob);
16591792 } else
1660
- if (event.getSource() == latheItem)
1793
+ if (source == latheItem)
16611794 {
16621795 makeSomething(new Lathe());
16631796 } else
1664
- if (event.getSource() == bezierItem)
1797
+ if (source == bezierItem)
16651798 {
16661799 makeSomething(new BezierSurface());
16671800 } else
1668
- if (event.getSource() == checkerItem)
1801
+ if (source == overlayItem)
16691802 {
16701803 /*
16711804 Object3D obj = new BezierSurface(5,8);
....@@ -1680,7 +1813,7 @@
16801813 */
16811814 makeSomething(new Checker());
16821815 } else
1683
- if (event.getSource() == meshItem)
1816
+ if (source == meshItem)
16841817 {
16851818 Object3D itemtomake = new Object3D();
16861819 Object3D child;
....@@ -1701,35 +1834,35 @@
17011834 makeSomething(child);
17021835 }
17031836 } else
1704
- if (event.getSource() == springItem)
1837
+ if (source == springItem)
17051838 {
17061839 cSpring s = new cSpring();
17071840 s.setup();
17081841 makeSomething(s);
17091842 } else
1710
- if (event.getSource() == flagItem)
1843
+ if (source == flagItem)
17111844 {
17121845 cSpring s = new cFlag();
17131846 s.setup();
17141847 makeSomething(s);
17151848 } else
1716
- if (event.getSource() == lightItem)
1849
+ if (source == lightItem)
17171850 {
17181851 makeSomething(new Light());
17191852 } else
1720
- if (event.getSource() == csgItem)
1853
+ if (source == csgItem)
17211854 {
17221855 group(new CSG());
17231856 } else
1724
- if (event.getSource() == templateItem)
1857
+ if (source == templateItem)
17251858 {
17261859 group(new cTemplate());
17271860 } else
1728
- if (event.getSource() == attributeItem)
1861
+ if (source == attributeItem)
17291862 {
17301863 makeSomething(new Attribute());
17311864 } else
1732
- if (event.getSource() == pointflowItem)
1865
+ if (source == pointflowItem)
17331866 {
17341867 makeSomething(new PointFlow());
17351868 } else
....@@ -1741,7 +1874,7 @@
17411874 } else
17421875 */
17431876
1744
- if (event.getSource() == superLoopItem)
1877
+ if (source == superLoopItem)
17451878 {
17461879 Composite g = new cGroup();
17471880 for (int i=0; i<15; i++)
....@@ -1763,7 +1896,7 @@
17631896
17641897 group(g);
17651898 } else
1766
- if (event.getSource() == loopItem)
1899
+ if (source == loopItem)
17671900 {
17681901 Composite csg = new GroupLeaf();
17691902 csg.count = 5;
....@@ -1772,7 +1905,7 @@
17721905 csg.addChild(child);
17731906 child.addChild(csg);
17741907 } else
1775
- if (event.getSource() == doubleItem)
1908
+ if (source == doubleItem)
17761909 {
17771910 Composite csg = new GroupLeaf();
17781911 csg.count = 5;
....@@ -1784,7 +1917,7 @@
17841917 csg.addChild(child);
17851918 child.addChild(csg);
17861919 } else
1787
- if (event.getSource() == tripleItem)
1920
+ if (source == tripleItem)
17881921 {
17891922 Composite csg = new GroupLeaf();
17901923 csg.count = 4;
....@@ -1799,71 +1932,71 @@
17991932 csg.addChild(child);
18001933 child.addChild(csg);
18011934 } else
1802
-
1803
- if (event.getSource() == importGFDItem)
1804
- {
1805
- ImportGFD();
1806
- } else
1807
- if (event.getSource() == importVRMLX3DItem)
1808
- {
1809
- ImportVRMLX3D();
1810
- } else
1811
- if (event.getSource() == import3DSItem)
1812
- {
1813
- objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
1814
- } else
1815
- if (event.getSource() == importOBJItem)
1816
- {
1817
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1818
- } else
1819
- if (event.getSource() == computeAOItem)
1935
+ if (source == computeAOItem)
18201936 {
18211937 Globals.drawMode = CameraPane.OCCLUSION;
18221938 Globals.theRenderer.repaint();
18231939 } else
1824
- if (event.getSource() == recompileItem)
1940
+ if (source == recompileItem)
18251941 {
18261942 Recompile();
18271943 refreshContents();
18281944 } else
1829
- if (event.getSource() == editScriptItem)
1945
+ if (source == editScriptItem)
18301946 {
18311947 OpenDialog();
18321948 refreshContents();
18331949 } else
1834
- if (event.getSource() == invariantsItem)
1950
+ if (source == invariantsItem)
18351951 {
18361952 System.out.println("Invariants:");
1837
- GrafreeD.grafreeD.universe.invariants();
1953
+ Grafreed.grafreeD.universe.invariants();
18381954 } else
1839
- if (event.getSource() == memoryItem)
1955
+ if (source == memoryItem)
18401956 {
18411957 //System.out.println("Invariants:");
18421958 PrintMemory();
18431959 } else
1844
- if (event.getSource() == pathItem)
1960
+ if (source == pathItem)
18451961 {
18461962 PrintPath();
18471963 } else
1848
- if (event.getSource() == analyzeItem)
1964
+ if (source == analyzeItem)
18491965 {
18501966 AnalyzeObject();
18511967 } else
1852
- if (event.getSource() == dumpItem)
1968
+ if (source == dumpItem)
18531969 {
18541970 DumpObject();
18551971 } else
1856
- if (event.getSource() == screenfitButton)
1972
+ if (source == undoButton)
1973
+ {
1974
+ Undo();
1975
+ } else
1976
+ if (source == redoButton)
1977
+ {
1978
+ Redo();
1979
+ } else
1980
+ if (source == saveButton)
1981
+ {
1982
+ Save();
1983
+ } else
1984
+ if (source == oneStepButton)
1985
+ {
1986
+ Globals.ONESTEP = true;
1987
+ cameraView.repaint();
1988
+ } else
1989
+ if (source == screenfitButton)
18571990 {
18581991 //Reload(lastConverter, lastFilename, true);
18591992 ScreenFit();
18601993 } else
1861
- if (event.getSource() == screenfitpointButton)
1994
+ if (source == screenfitpointButton)
18621995 {
18631996 //Reload(lastConverter, lastFilename, true);
18641997 ScreenFitPoint();
18651998 } else
1866
- if (event.getSource() == snapobjectButton)
1999
+ if (source == snapobjectButton)
18672000 {
18682001 //Reload(lastConverter, lastFilename, true);
18692002 SnapObject();
....@@ -1874,13 +2007,13 @@
18742007 // Recompile();
18752008 // refreshContents();
18762009 // } else
1877
- if (event.getSource() == gcButton)
2010
+ if (source == gcButton)
18782011 {
18792012 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18802013 System.gc();
18812014 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18822015 } else
1883
- if (event.getSource() == editLeafItem)
2016
+ if (source == editLeafItem)
18842017 {
18852018 Object3D obj;
18862019 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1894,62 +2027,74 @@
18942027 }
18952028 refreshContents(true);
18962029 } else
1897
- if (event.getSource() == openWindowItem)
2030
+ if (source == openWindowItem)
18982031 {
18992032 EditSelection(true);
19002033 } else
1901
- if (event.getSource() == cutItem || event.getSource() == clearButton)
2034
+ if (source == cutItem || source == clearButton)
19022035 {
19032036 loadClipboard(true);
19042037 } else
1905
- if (event.getSource() == duplicateItem)
2038
+ if (source == undoItem)
19062039 {
1907
- Object3D keep = GrafreeD.clipboard;
2040
+ Undo();
2041
+ } else
2042
+ if (source == redoItem)
2043
+ {
2044
+ Redo();
2045
+ } else
2046
+ if (source == duplicateItem)
2047
+ {
2048
+ Object3D keep = Grafreed.clipboard;
19082049 loadClipboard(false);
19092050 paste(false);
1910
- GrafreeD.clipboard = keep;
2051
+ Grafreed.clipboard = keep;
19112052 } else
1912
- if (event.getSource() == cloneItem)
2053
+ if (source == cloneItem)
19132054 {
19142055 CloneSelection(false);
19152056 } else
1916
- if (event.getSource() == cloneSupportItem)
2057
+ if (source == cloneSupportItem)
19172058 {
19182059 CloneSelection(true);
19192060 } else
1920
- if (event.getSource() == copyItem)
2061
+ if (source == copyItem)
19212062 {
19222063 loadClipboard(false);
19232064 } else
1924
- if (event.getSource() == pasteItem)
2065
+ if (source == pasteItem)
19252066 {
19262067 paste(false);
19272068 } else
1928
- if (event.getSource() == pasteLinkItem)
2069
+ if (source == pasteIntoItem)
19292070 {
1930
- pasteInto(false);
2071
+ pasteInto(true, false);
19312072 } else
1932
- if (event.getSource() == pasteCloneItem)
2073
+ if (source == pasteLinkItem)
19332074 {
1934
- pasteInto(true);
2075
+ pasteInto(false, false);
19352076 } else
1936
- if (event.getSource() == pasteExpandItem)
2077
+ if (source == pasteCloneItem)
2078
+ {
2079
+ pasteInto(true, true);
2080
+ } else
2081
+ if (source == pasteExpandItem)
19372082 {
19382083 paste(true);
19392084 } else
1940
- if (event.getSource() == synchronizeItem)
2085
+ if (source == synchronizeItem)
19412086 {
19422087 Overwrite(Object3D.TRANSFORM);
19432088 } else
1944
- if (event.getSource() == overwriteNameItem)
2089
+ if (source == overwriteNameItem)
19452090 {
19462091 Overwrite(Object3D.NAME);
19472092 } else
1948
- if (event.getSource() == overwriteUVItem)
2093
+ if (source == overwriteUVItem)
19492094 {
19502095 Overwrite(Object3D.UV);
19512096 } else
1952
- if (event.getSource() == overwriteMatItem)
2097
+ if (source == overwriteMatItem)
19532098 {
19542099 /* july 2015
19552100 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1969,7 +2114,7 @@
19692114
19702115 Overwrite(dropAttributes);
19712116 }
1972
- if (event.getSource() == overwriteGeoItem)
2117
+ if (source == overwriteGeoItem)
19732118 {
19742119 Overwrite(Object3D.GEOMETRY);
19752120 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1986,7 +2131,7 @@
19862131 // refreshContents();
19872132 // }
19882133 } else
1989
- if (event.getSource() == generateMeshItem)
2134
+ if (source == generateMeshItem)
19902135 {
19912136 //if (group.selection.size() == 1)
19922137 // for (int i=0; i<group.selection.size(); i++)
....@@ -1997,7 +2142,7 @@
19972142 ResetModel();
19982143 refreshContents();
19992144 } else
2000
- if (event.getSource() == extractGeometriesItem)
2145
+ if (source == extractGeometriesItem)
20012146 {
20022147 boolean one = false;
20032148
....@@ -2024,7 +2169,7 @@
20242169 ResetModel();
20252170 refreshContents();
20262171 } else
2027
- if (event.getSource() == cloneGeometriesItem)
2172
+ if (source == cloneGeometriesItem)
20282173 {
20292174 boolean one = false;
20302175
....@@ -2050,7 +2195,7 @@
20502195 ResetModel();
20512196 refreshContents();
20522197 } else
2053
- if (event.getSource() == shareGeometriesItem)
2198
+ if (source == shareGeometriesItem)
20542199 {
20552200 boolean one = false;
20562201
....@@ -2080,7 +2225,7 @@
20802225 refreshContents();
20812226 }
20822227 } else
2083
- if (event.getSource() == mergeGeometriesItem)
2228
+ if (source == mergeGeometriesItem)
20842229 {
20852230 boolean one = false;
20862231
....@@ -2110,7 +2255,7 @@
21102255 ResetModel();
21112256 refreshContents();
21122257 } else
2113
- if (event.getSource() == linkverticesItem)
2258
+ if (source == linkverticesItem)
21142259 {
21152260 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21162261 // {
....@@ -2123,9 +2268,9 @@
21232268 // group.selection.get(0).setMasterThis(content); // should be identity
21242269 // refreshContents();
21252270 // }
2126
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2271
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21272272 {
2128
- Object3D content = GrafreeD.clipboard.get(0);
2273
+ Object3D content = Grafreed.clipboard.get(0);
21292274
21302275 if (content instanceof cGroup && ((cGroup)content).transientlink )
21312276 content = ((cGroup)content).get(0);
....@@ -2133,38 +2278,38 @@
21332278 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
21342279 for (int i=0; i<group.selection.size(); i++)
21352280 {
2136
- boolean random = CameraPane.RANDOM;
2137
- CameraPane.RANDOM = false; // parse all random nodes
2281
+ boolean random = CameraPane.SWITCH;
2282
+ CameraPane.SWITCH = false; // parse all random nodes
21382283 group.selection.get(i).linkVerticesThis(content);
21392284 // group.selection.get(i).setMasterThis(content); // should be identity
2140
- CameraPane.RANDOM = random;
2285
+ CameraPane.SWITCH = random;
21412286 }
21422287 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21432288 refreshContents();
21442289 }
21452290 } else
2146
- if (event.getSource() == resetsupportItem)
2291
+ if (source == resetsupportItem)
21472292 {
21482293 for (int i=0; i<group.selection.size(); i++)
21492294 {
2150
- boolean random = CameraPane.RANDOM;
2151
- CameraPane.RANDOM = false; // parse all random nodes
2295
+ boolean random = CameraPane.SWITCH;
2296
+ CameraPane.SWITCH = false; // parse all random nodes
21522297 group.selection.get(i).linkVerticesThis(null);
2153
- CameraPane.RANDOM = random;
2298
+ CameraPane.SWITCH = random;
21542299 }
21552300
21562301 refreshContents();
21572302 } else
2158
- if (event.getSource() == relinkverticesItem)
2303
+ if (source == relinkverticesItem)
21592304 {
2160
- boolean random = CameraPane.RANDOM;
2161
- CameraPane.RANDOM = false; // parse all random nodes
2305
+ boolean random = CameraPane.SWITCH;
2306
+ CameraPane.SWITCH = false; // parse all random nodes
21622307 group.selection.RelinkToSupport();
2163
- CameraPane.RANDOM = random;
2308
+ CameraPane.SWITCH = random;
21642309
21652310 refreshContents();
21662311 } else
2167
- if (event.getSource() == resetreferencesItem)
2312
+ if (source == resetreferencesItem)
21682313 {
21692314 for (int i=0; i<group.selection.size(); i++)
21702315 {
....@@ -2173,11 +2318,11 @@
21732318
21742319 refreshContents();
21752320 } else
2176
- if (event.getSource() == setMasterItem)
2321
+ if (source == setMasterItem)
21772322 {
2178
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2323
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21792324 {
2180
- Object3D content = GrafreeD.clipboard.get(0);
2325
+ Object3D content = Grafreed.clipboard.get(0);
21812326
21822327 if (content instanceof cGroup && ((cGroup)content).transientlink )
21832328 content = ((cGroup)content).get(0);
....@@ -2186,13 +2331,13 @@
21862331 refreshContents();
21872332 }
21882333 } else
2189
- if (event.getSource() == poseMeshItem)
2334
+ if (source == poseMeshItem)
21902335 {
21912336 if (group.selection.size() == 1)
21922337 {
2193
- if (GrafreeD.clipboard.size() == 1)
2338
+ if (Grafreed.clipboard.size() == 1)
21942339 {
2195
- Object3D content = GrafreeD.clipboard.get(0);
2340
+ Object3D content = Grafreed.clipboard.get(0);
21962341
21972342 if (content instanceof cGroup && ((cGroup)content).transientlink )
21982343 content = ((cGroup)content).get(0);
....@@ -2205,19 +2350,19 @@
22052350 }
22062351
22072352 } else
2208
- if (event.getSource() == revertMeshItem)
2353
+ if (source == revertMeshItem)
22092354 {
22102355 RevertMeshes();
22112356 } else
2212
- if (event.getSource() == resetMeshItem)
2357
+ if (source == resetAllItem)
22132358 {
22142359 ResetAll();
22152360 } else
2216
- if (event.getSource() == stepAllItem)
2361
+ if (source == stepAllItem)
22172362 {
22182363 StepAll();
22192364 } else
2220
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2365
+ if (source == clearItem) // || event.getSource() == clearButton)
22212366 {
22222367 //int indices[] = jList.getSelectedIndices();
22232368 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2225,46 +2370,46 @@
22252370
22262371 ClearSelection(false);
22272372 } else
2228
- if (event.getSource() == clearAllItem)
2373
+ if (source == clearAllItem)
22292374 {
22302375 ClearSelection(true);
22312376 } else
2232
- if (event.getSource() == grabItem)
2377
+ if (source == grabItem)
22332378 {
22342379 group(new cGroup(), true);
22352380 } else
2236
- if (event.getSource() == hideItem)
2381
+ if (source == hideItem)
22372382 {
22382383 group(new HiddenObject());
22392384 } else
2240
- if (event.getSource() == frontItem)
2385
+ if (source == frontItem)
22412386 {
22422387 front();
22432388 } else
2244
- if (event.getSource() == backItem)
2389
+ if (source == backItem)
22452390 {
22462391 back();
22472392 } else
2248
- if (event.getSource() == cameraItem)
2393
+ if (source == cameraItem)
22492394 {
22502395 makeSomething(new Camera());
22512396 } else
2252
- if (event.getSource() == compositeItem)
2397
+ if (source == compositeItem)
22532398 {
22542399 group(new Composite());
22552400 } else
2256
- if (event.getSource() == randomItem)
2401
+ if (source == randomItem)
22572402 {
22582403 RandomNode random = new RandomNode();
22592404 group(random);
22602405 if (random.size() > 0)
2261
- random.name = random.get(0).name + "Rnd";
2406
+ random.name = random.get(0).name + "Switch";
22622407 } else
2263
- if (event.getSource() == physicsItem)
2408
+ if (source == physicsItem)
22642409 {
22652410 group(new PhysicsNode());
22662411 } else
2267
- if (event.getSource() == frameselectorItem)
2412
+ if (source == frameselectorItem)
22682413 {
22692414 for (int i=0; i<group.selection.size(); i++)
22702415 {
....@@ -2276,7 +2421,7 @@
22762421 ResetModel();
22772422 refreshContents();
22782423 } else
2279
- if (event.getSource() == switchGeoItem)
2424
+ if (source == switchGeoItem)
22802425 {
22812426 for (int i=0; i<group.selection.size(); i++)
22822427 {
....@@ -2288,7 +2433,7 @@
22882433 ResetModel();
22892434 refreshContents();
22902435 } else
2291
- if (event.getSource() == switchTransfoItem)
2436
+ if (source == switchTransfoItem)
22922437 {
22932438 for (int i=0; i<group.selection.size(); i++)
22942439 {
....@@ -2300,7 +2445,7 @@
23002445 ResetModel();
23012446 refreshContents();
23022447 } else
2303
- if (event.getSource() == morphItem)
2448
+ if (source == morphItem)
23042449 {
23052450 for (int i=0; i<group.selection.size(); i++)
23062451 {
....@@ -2312,7 +2457,7 @@
23122457 ResetModel();
23132458 refreshContents();
23142459 } else
2315
- if (event.getSource() == scriptNodeItem)
2460
+ if (source == scriptNodeItem)
23162461 {
23172462 boolean atleastone = false;
23182463
....@@ -2351,31 +2496,31 @@
23512496 }
23522497 }
23532498 } else
2354
- if (event.getSource() == linkerItem)
2499
+ if (source == linkerItem)
23552500 {
23562501 group(new cLinker());
23572502 } else
2358
- if (event.getSource() == textureItem)
2503
+ if (source == textureItem)
23592504 {
23602505 group(new TextureNode());
23612506 } else
2362
- if (event.getSource() == billboardItem)
2507
+ if (source == billboardItem)
23632508 {
23642509 group(new BillboardNode());
23652510 } else
2366
- if (event.getSource() == shadowXItem)
2511
+ if (source == shadowXItem)
23672512 {
23682513 CastShadow(0);
23692514 } else
2370
- if (event.getSource() == shadowYItem)
2515
+ if (source == shadowYItem)
23712516 {
23722517 CastShadow(1);
23732518 } else
2374
- if (event.getSource() == shadowZItem)
2519
+ if (source == shadowZItem)
23752520 {
23762521 CastShadow(2);
23772522 } else
2378
- if (event.getSource() == ungroupItem)
2523
+ if (source == ungroupItem)
23792524 {
23802525 //ungroup();
23812526 for (int i=0; i<group.selection.size(); i++)
....@@ -2387,179 +2532,187 @@
23872532
23882533 refreshContents();
23892534 } else
2390
- if (event.getSource() == genUVItem)
2535
+ if (source == genUVItem)
23912536 {
23922537 GenUV();
23932538 } else
2394
- if (event.getSource() == genNormalsCADItem)
2539
+ if (source == genNormalsCADItem)
23952540 {
23962541 GenNormals(true);
23972542 } else
2398
- if (event.getSource() == genNormalsMESHItem)
2543
+ if (source == genNormalsMESHItem)
23992544 {
2400
- GenNormals(true); // TODO
2545
+ GenNormalsMESH();
24012546 } else
2402
- if (event.getSource() == genNormalsORGANItem)
2547
+ if (source == genNormalsORGANItem)
24032548 {
24042549 GenNormals(false);
24052550 } else
2406
- if (event.getSource() == genNormalsMINEItem)
2551
+ if (source == genNormalsMINEItem)
24072552 {
24082553 GenNormalsMINE();
24092554 } else
2410
- if (event.getSource() == stripifyItem)
2555
+ if (source == stripifyItem)
24112556 {
24122557 Stripify();
24132558 } else
2414
- if (event.getSource() == unstripifyItem)
2559
+ if (source == unstripifyItem)
24152560 {
24162561 Unstripify();
24172562 } else
2418
- if (event.getSource() == trimItem)
2563
+ if (source == trimItem)
24192564 {
24202565 Trim();
24212566 } else
2422
- if (event.getSource() == untrimItem)
2567
+ if (source == untrimItem)
24232568 {
24242569 Untrim();
24252570 } else
2426
- if (event.getSource() == clearColorsItem)
2571
+ if (source == clearColorsItem)
24272572 {
24282573 ClearColors();
24292574 } else
2430
- if (event.getSource() == clearMaterialsItem)
2575
+ if (source == clearMaterialsItem)
24312576 {
24322577 ClearMaterials();
24332578 } else
2434
- if (event.getSource() == liveleavesItem)
2579
+ if (source == liveleavesItem)
24352580 {
24362581 LiveLeaves(true);
24372582 } else
2438
- if (event.getSource() == unliveleavesItem)
2583
+ if (source == unliveleavesItem)
24392584 {
24402585 LiveLeaves(false);
24412586 } else
2442
- if (event.getSource() == supportleavesItem)
2587
+ if (source == supportleavesItem)
24432588 {
24442589 SupportLeaves(true);
24452590 } else
2446
- if (event.getSource() == unsupportleavesItem)
2591
+ if (source == unsupportleavesItem)
24472592 {
24482593 SupportLeaves(false);
24492594 } else
2450
- if (event.getSource() == hideleavesItem)
2595
+ if (source == hideleavesItem)
24512596 {
24522597 HideLeaves(true);
24532598 } else
2454
- if (event.getSource() == showleavesItem)
2599
+ if (source == showleavesItem)
24552600 {
24562601 HideLeaves(false);
24572602 } else
2458
- if (event.getSource() == markleavesItem)
2603
+ if (source == markleavesItem)
24592604 {
24602605 MarkLeaves(true);
24612606 } else
2462
- if (event.getSource() == unmarkleavesItem)
2607
+ if (source == unmarkleavesItem)
24632608 {
24642609 MarkLeaves(false);
24652610 } else
2466
- if (event.getSource() == flipVItem)
2611
+ if (source == flipVItem)
24672612 {
24682613 FlipV(true);
24692614 } else
2470
- if (event.getSource() == unflipVItem)
2615
+ if (source == unflipVItem)
24712616 {
24722617 FlipV(false);
24732618 } else
2474
- if (event.getSource() == lowTexturesItem)
2619
+ if (source == lowTexturesItem)
24752620 {
24762621 SetTexRes(0);
24772622 } else
2478
- if (event.getSource() == normalTexturesItem)
2623
+ if (source == normalTexturesItem)
24792624 {
24802625 SetTexRes(1);
24812626 } else
2482
- if (event.getSource() == highTexturesItem)
2627
+ if (source == highTexturesItem)
24832628 {
24842629 SetTexRes(2);
24852630 } else
2486
- if (event.getSource() == veryhighTexturesItem)
2631
+ if (source == veryhighTexturesItem)
24872632 {
24882633 SetTexRes(3);
24892634 } else
2490
- if (event.getSource() == maxTexturesItem)
2635
+ if (source == maxTexturesItem)
24912636 {
24922637 SetTexRes(4);
24932638 } else
2494
- if (event.getSource() == panoTexturesItem)
2639
+ if (source == panoTexturesItem)
24952640 {
24962641 SetTexRes(5);
24972642 } else
2498
- if (event.getSource() == reverseNormalsItem)
2643
+ if (source == reverseNormalsItem)
24992644 {
25002645 ReverseNormals();
25012646 } else
2502
- if (event.getSource() == parseverticesItem)
2647
+ if (source == parseverticesItem)
25032648 {
25042649 ParseVertices();
25052650 } else
2506
- if (event.getSource() == textureFieldItem)
2651
+ if (source == textureFieldItem)
25072652 {
25082653 TextureVertices();
25092654 } else
2510
- if (event.getSource() == alignItem)
2655
+ if (source == alignItem)
25112656 {
25122657 Align();
25132658 } else
2514
- if (event.getSource() == mirrorItem)
2659
+ if (source == mirrorItem)
25152660 {
25162661 MirrorPoses();
25172662 } else
2518
- if (event.getSource() == reduceMorphItem)
2663
+ if (source == reduceMorphItem)
25192664 {
25202665 MeshReduction(false);
25212666 } else
2522
- if (event.getSource() == reduce34MorphItem)
2667
+ if (source == reduce34MorphItem)
25232668 {
25242669 MeshReduction(true);
25252670 } else
2526
- if (event.getSource() == reverseTrianglesItem)
2671
+ if (source == reverseTrianglesItem)
25272672 {
25282673 ReverseTriangles();
25292674 } else
2530
- if (event.getSource() == reduceMeshItem)
2675
+ if (source == reduceMeshItem)
25312676 {
25322677 ReduceMesh(false);
25332678 } else
2534
- if (event.getSource() == reduce34MeshItem)
2679
+ if (source == reduce34MeshItem)
25352680 {
25362681 ReduceMesh(true);
25372682 } else
2538
- if (event.getSource() == increaseMeshItem)
2683
+ if (source == increaseMeshItem)
25392684 {
25402685 IncreaseMesh();
25412686 } else
2542
- if (event.getSource() == clipMeshItem)
2687
+ if (source == clipMeshItem)
25432688 {
25442689 ClipMesh();
25452690 } else
2546
- if (event.getSource() == smoothMeshItem)
2691
+ if (source == smoothMeshItem)
25472692 {
25482693 SmoothMesh();
25492694 } else
2550
- if (event.getSource() == transformgeometryItem)
2695
+ if (source == transformGeometryItem)
25512696 {
25522697 TransformGeometry();
25532698 } else
2554
- if (event.getSource() == resetTransformItem)
2699
+ if (source == transformChildrenItem)
2700
+ {
2701
+ TransformChildren();
2702
+ } else
2703
+ if (source == resetTransformItem)
25552704 {
25562705 ResetTransform();
25572706 } else
2558
- if (event.getSource() == resetCentroidItem)
2707
+ if (source == resetCentroidItem)
25592708 {
2560
- ResetCentroid();
2709
+ ResetCentroid(true);
25612710 } else
2562
- if (event.getSource() == resetParentItem)
2711
+ if (source == resetCentroidXZItem)
2712
+ {
2713
+ ResetCentroid(false);
2714
+ } else
2715
+ if (source == resetParentItem)
25632716 {
25642717 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25652718 {
....@@ -2569,7 +2722,7 @@
25692722
25702723 refreshContents();
25712724 } else
2572
- if (event.getSource() == repairParentItem)
2725
+ if (source == repairParentItem)
25732726 {
25742727 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25752728 {
....@@ -2583,7 +2736,7 @@
25832736
25842737 refreshContents();
25852738 } else
2586
- if (event.getSource() == repairShadowItem)
2739
+ if (source == repairShadowItem)
25872740 {
25882741 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25892742 {
....@@ -2597,7 +2750,7 @@
25972750
25982751 refreshContents();
25992752 } else
2600
- if (event.getSource() == sortbysizeItem)
2753
+ if (source == sortbysizeItem)
26012754 {
26022755 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
26032756 {
....@@ -2609,7 +2762,7 @@
26092762 ResetModel();
26102763 refreshContents();
26112764 } else
2612
- if (event.getSource() == sortbynameItem)
2765
+ if (source == sortbynameItem)
26132766 {
26142767 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
26152768 {
....@@ -2621,7 +2774,7 @@
26212774 ResetModel();
26222775 refreshContents();
26232776 } else
2624
- if (event.getSource() == attachPigmentItem)
2777
+ if (source == attachPigmentItem)
26252778 {
26262779 String texture = GetFile("Attach pigment");
26272780 Object3D obj;
....@@ -2633,7 +2786,7 @@
26332786
26342787 refreshContents();
26352788 } else
2636
- if (event.getSource() == detachPigmentItem)
2789
+ if (source == detachPigmentItem)
26372790 {
26382791 Object3D obj;
26392792 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2644,7 +2797,7 @@
26442797
26452798 refreshContents();
26462799 } else
2647
- if (event.getSource() == attachBumpItem)
2800
+ if (source == attachBumpItem)
26482801 {
26492802 String texture = GetFile("Attach bump");
26502803 Object3D obj;
....@@ -2656,7 +2809,7 @@
26562809
26572810 refreshContents();
26582811 } else
2659
- if (event.getSource() == detachBumpItem)
2812
+ if (source == detachBumpItem)
26602813 {
26612814 Object3D obj;
26622815 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2667,7 +2820,7 @@
26672820
26682821 refreshContents();
26692822 } else
2670
- if (event.getSource() == pigmentBumpItem)
2823
+ if (source == pigmentBumpItem)
26712824 {
26722825 Object3D obj;
26732826 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2678,158 +2831,195 @@
26782831
26792832 refreshContents();
26802833 } else
2681
- if (event.getSource() == flashSelectionButton)
2834
+ if (source == flashSelectionButton)
26822835 {
26832836 CameraPane.flash = true;
26842837 refreshContents();
26852838 } else
2686
- if (event.getSource() == oneButton)
2839
+ if (source == oneButton)
26872840 {
26882841 } else
2689
- if (event.getSource() == twoButton)
2842
+ if (source == twoButton)
26902843 {
26912844 radio.layout = twoButton;
26922845 // bug
26932846 //gridPanel.setDividerLocation(1.0);
26942847 //bigPanel.setDividerLocation(0.0);
2695
- bigThree.remove(scenePanel);
2696
- bigThree.remove(centralPanel);
2697
- bigThree.remove(XYZPanel);
2698
- aWindowConstraints.gridx = 0;
2699
- aWindowConstraints.gridy = 0;
2700
- aWindowConstraints.gridwidth = 1;
2701
- // aConstraints.gridheight = 3;
2702
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2703
- aWindowConstraints.weightx = 0;
2704
- aWindowConstraints.weighty = 1;
2705
- //bigThree.add(jtp, aWindowConstraints);
2706
- aWindowConstraints.weightx = 1;
2707
- aWindowConstraints.gridwidth = 3;
2708
- // aConstraints.gridheight = 3;
2709
- aWindowConstraints.gridx = 1;
2710
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2711
- bigThree.add(centralPanel, aWindowConstraints);
2712
- aWindowConstraints.weightx = 0;
2713
- aWindowConstraints.gridx = 4;
2714
- aWindowConstraints.gridwidth = 1;
2715
- // aConstraints.gridheight = 3;
2716
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2717
- //bigThree.add(XYZPanel, aWindowConstraints);
2718
- bigThree.revalidate();
2848
+// bigThree.remove(scenePanel);
2849
+// bigThree.remove(centralPanel);
2850
+// bigThree.remove(XYZPanel);
2851
+// aWindowConstraints.gridx = 0;
2852
+// aWindowConstraints.gridy = 0;
2853
+// aWindowConstraints.gridwidth = 1;
2854
+// // aConstraints.gridheight = 3;
2855
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2856
+// aWindowConstraints.weightx = 0;
2857
+// aWindowConstraints.weighty = 1;
2858
+// //bigThree.add(jtp, aWindowConstraints);
2859
+// aWindowConstraints.weightx = 1;
2860
+// aWindowConstraints.gridwidth = 3;
2861
+// // aConstraints.gridheight = 3;
2862
+// aWindowConstraints.gridx = 1;
2863
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2864
+// bigThree.add(centralPanel, aWindowConstraints);
2865
+// aWindowConstraints.weightx = 0;
2866
+// aWindowConstraints.gridx = 4;
2867
+// aWindowConstraints.gridwidth = 1;
2868
+// // aConstraints.gridheight = 3;
2869
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2870
+// //bigThree.add(XYZPanel, aWindowConstraints);
2871
+// scenePanel.setVisible(false);
2872
+// centralPanel.setVisible(true);
2873
+// XYZPanel.setVisible(false);
2874
+ bigThree.ClearUI();
2875
+ bigThree.add(centralPanel);
2876
+ bigThree.FlushUI();
27192877 } else
2720
- if (event.getSource() == threeButton)
2878
+ if (source == threeButton)
27212879 {
27222880 radio.layout = threeButton;
2723
- bigThree.remove(scenePanel);
2724
- bigThree.remove(centralPanel);
2725
- bigThree.remove(XYZPanel);
2726
- aWindowConstraints.gridx = 0;
2727
- aWindowConstraints.gridy = 0;
2728
- aWindowConstraints.gridwidth = 1;
2729
- // aConstraints.gridheight = 3;
2730
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2731
- aWindowConstraints.weightx = 0;
2732
- aWindowConstraints.weighty = 1;
2733
- //bigThree.add(jtp, aWindowConstraints);
2734
- aWindowConstraints.weightx = 1;
2735
- aWindowConstraints.gridwidth = 3;
2736
- // aConstraints.gridheight = 3;
2737
- aWindowConstraints.gridx = 1;
2738
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2739
- bigThree.add(centralPanel, aWindowConstraints);
2740
- aWindowConstraints.weightx = 0;
2741
- aWindowConstraints.gridx = 4;
2742
- aWindowConstraints.gridwidth = 1;
2743
- // aConstraints.gridheight = 3;
2744
- aConstraints.fill = GridBagConstraints.VERTICAL;
2745
- bigThree.add(XYZPanel, aWindowConstraints);
2746
- bigThree.revalidate();
2881
+
2882
+// bigThree.remove(scenePanel);
2883
+// bigThree.remove(centralPanel);
2884
+// bigThree.remove(XYZPanel);
2885
+// aWindowConstraints.gridx = 0;
2886
+// aWindowConstraints.gridy = 0;
2887
+// aWindowConstraints.gridwidth = 1;
2888
+// // aConstraints.gridheight = 3;
2889
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2890
+// aWindowConstraints.weightx = 0;
2891
+// aWindowConstraints.weighty = 1;
2892
+// //bigThree.add(jtp, aWindowConstraints);
2893
+// aWindowConstraints.weightx = 1;
2894
+// aWindowConstraints.gridwidth = 3;
2895
+// // aConstraints.gridheight = 3;
2896
+// aWindowConstraints.gridx = 1;
2897
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2898
+// bigThree.add(centralPanel, aWindowConstraints);
2899
+// aWindowConstraints.weightx = 0;
2900
+// aWindowConstraints.gridx = 4;
2901
+// aWindowConstraints.gridwidth = 1;
2902
+// // aConstraints.gridheight = 3;
2903
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2904
+// bigThree.add(XYZPanel, aWindowConstraints);
2905
+// bigThree.validate();
2906
+// scenePanel.setVisible(false);
2907
+// centralPanel.setVisible(true);
2908
+// XYZPanel.setVisible(true);
2909
+ bigThree.ClearUI();
2910
+ bigThree.add(centralPanel);
2911
+ bigThree.add(XYZPanel);
2912
+ bigThree.FlushUI();
27472913 } else
2748
- if (event.getSource() == fourButton)
2914
+ if (source == fourButton)
27492915 {
27502916 radio.layout = fourButton;
2751
- bigThree.remove(scenePanel);
2752
- bigThree.remove(centralPanel);
2753
- bigThree.remove(XYZPanel);
2754
- aWindowConstraints.gridx = 0;
2755
- aWindowConstraints.gridy = 0;
2756
- aWindowConstraints.gridwidth = 1;
2757
- // aWindowConstraints.gridheight = 3;
2758
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2759
- aWindowConstraints.weightx = 1;
2760
- aWindowConstraints.weighty = 1;
2761
- bigThree.add(scenePanel, aWindowConstraints);
2762
- aWindowConstraints.weightx = 1;
2763
- aWindowConstraints.gridwidth = 3;
2764
- // aConstraints.gridheight = 3;
2765
- aWindowConstraints.gridx = 1;
2766
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2767
- //bigThree.add(cameraPanel, aWindowConstraints);
2768
- aWindowConstraints.weightx = 0;
2769
- aWindowConstraints.gridx = 4;
2770
- aWindowConstraints.gridwidth = 1;
2771
- // aWindowConstraints.gridheight = 3;
2772
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2773
- //bigThree.add(XYZPanel, aWindowConstraints);
2774
- bigThree.revalidate();
2917
+
2918
+// bigThree.remove(scenePanel);
2919
+// bigThree.remove(centralPanel);
2920
+// bigThree.remove(XYZPanel);
2921
+// aWindowConstraints.gridx = 0;
2922
+// aWindowConstraints.gridy = 0;
2923
+// aWindowConstraints.gridwidth = 1;
2924
+// // aWindowConstraints.gridheight = 3;
2925
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2926
+// aWindowConstraints.weightx = 1;
2927
+// aWindowConstraints.weighty = 1;
2928
+// bigThree.add(scenePanel, aWindowConstraints);
2929
+// aWindowConstraints.weightx = 1;
2930
+// aWindowConstraints.gridwidth = 3;
2931
+// // aConstraints.gridheight = 3;
2932
+// aWindowConstraints.gridx = 1;
2933
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2934
+// //bigThree.add(cameraPanel, aWindowConstraints);
2935
+// aWindowConstraints.weightx = 0;
2936
+// aWindowConstraints.gridx = 4;
2937
+// aWindowConstraints.gridwidth = 1;
2938
+// // aWindowConstraints.gridheight = 3;
2939
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2940
+// //bigThree.add(XYZPanel, aWindowConstraints);
2941
+// bigThree.validate();
2942
+// scenePanel.setVisible(true);
2943
+// centralPanel.setVisible(false);
2944
+// XYZPanel.setVisible(false);
2945
+ bigThree.ClearUI();
2946
+ bigThree.add(scenePanel);
2947
+ bigThree.FlushUI();
27752948 } else
2776
- if (event.getSource() == sixButton)
2949
+ if (source == sixButton)
27772950 {
27782951 radio.layout = sixButton;
2779
- bigThree.remove(scenePanel);
2780
- bigThree.remove(centralPanel);
2781
- bigThree.remove(XYZPanel);
2782
- aWindowConstraints.gridx = 0;
2783
- aWindowConstraints.gridy = 0;
2784
- aWindowConstraints.gridwidth = 1;
2785
- // aConstraints.gridheight = 3;
2786
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2787
- aWindowConstraints.weightx = 0;
2788
- aWindowConstraints.weighty = 1;
2789
- bigThree.add(scenePanel, aWindowConstraints);
2790
- aWindowConstraints.weightx = 1;
2791
- aWindowConstraints.gridwidth = 3;
2792
- // aWindowConstraints.gridheight = 3;
2793
- aWindowConstraints.gridx = 1;
2794
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2795
- bigThree.add(centralPanel, aWindowConstraints);
2796
- aWindowConstraints.weightx = 0;
2797
- aWindowConstraints.gridx = 4;
2798
- aWindowConstraints.gridwidth = 1;
2799
- // aWindowConstraints.gridheight = 3;
2800
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2801
- //bigThree.add(XYZPanel, aConstraints);
2802
- bigThree.revalidate();
2952
+
2953
+// bigThree.remove(scenePanel);
2954
+// bigThree.remove(centralPanel);
2955
+// bigThree.remove(XYZPanel);
2956
+// aWindowConstraints.gridx = 0;
2957
+// aWindowConstraints.gridy = 0;
2958
+// aWindowConstraints.gridwidth = 1;
2959
+// // aConstraints.gridheight = 3;
2960
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2961
+// aWindowConstraints.weightx = 0;
2962
+// aWindowConstraints.weighty = 1;
2963
+// bigThree.add(scenePanel, aWindowConstraints);
2964
+// aWindowConstraints.weightx = 1;
2965
+// aWindowConstraints.gridwidth = 3;
2966
+// // aWindowConstraints.gridheight = 3;
2967
+// aWindowConstraints.gridx = 1;
2968
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2969
+// bigThree.add(centralPanel, aWindowConstraints);
2970
+// aWindowConstraints.weightx = 0;
2971
+// aWindowConstraints.gridx = 4;
2972
+// aWindowConstraints.gridwidth = 1;
2973
+// // aWindowConstraints.gridheight = 3;
2974
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2975
+// //bigThree.add(XYZPanel, aConstraints);
2976
+// bigThree.validate();
2977
+// scenePanel.setVisible(true);
2978
+// centralPanel.setVisible(true);
2979
+// XYZPanel.setVisible(false);
2980
+ bigThree.ClearUI();
2981
+ bigThree.add(scenePanel);
2982
+ bigThree.add(centralPanel);
2983
+ bigThree.FlushUI();
28032984 } else
2804
- if (event.getSource() == sevenButton)
2985
+ if (source == sevenButton)
28052986 {
28062987 radio.layout = sevenButton;
2807
- bigThree.remove(scenePanel);
2808
- bigThree.remove(centralPanel);
2809
- bigThree.remove(XYZPanel);
2810
- aWindowConstraints.gridx = 0;
2811
- aWindowConstraints.gridy = 0;
2812
- aWindowConstraints.gridwidth = 1;
2813
- // aWindowConstraints.gridheight = 3;
2814
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2815
- aWindowConstraints.weightx = 0;
2816
- aWindowConstraints.weighty = 1;
2817
- bigThree.add(scenePanel, aWindowConstraints);
2818
- aWindowConstraints.weightx = 1;
2819
- aWindowConstraints.gridwidth = 3;
2820
- // aWindowConstraints.gridheight = 3;
2821
- aWindowConstraints.gridx = 1;
2822
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2823
- bigThree.add(centralPanel, aWindowConstraints);
2824
- aWindowConstraints.weightx = 0;
2825
- aWindowConstraints.gridx = 4;
2826
- aWindowConstraints.gridwidth = 1;
2827
- // aConstraints.gridheight = 3;
2828
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2829
- bigThree.add(XYZPanel, aWindowConstraints);
2830
- bigThree.revalidate();
2988
+
2989
+// bigThree.remove(scenePanel);
2990
+// bigThree.remove(centralPanel);
2991
+// bigThree.remove(XYZPanel);
2992
+// aWindowConstraints.gridx = 0;
2993
+// aWindowConstraints.gridy = 0;
2994
+// aWindowConstraints.gridwidth = 1;
2995
+// // aWindowConstraints.gridheight = 3;
2996
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2997
+// aWindowConstraints.weightx = 0;
2998
+// aWindowConstraints.weighty = 1;
2999
+// bigThree.add(scenePanel, aWindowConstraints);
3000
+// aWindowConstraints.weightx = 1;
3001
+// aWindowConstraints.gridwidth = 3;
3002
+// // aWindowConstraints.gridheight = 3;
3003
+// aWindowConstraints.gridx = 1;
3004
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
3005
+// bigThree.add(centralPanel, aWindowConstraints);
3006
+// aWindowConstraints.weightx = 0;
3007
+// aWindowConstraints.gridx = 4;
3008
+// aWindowConstraints.gridwidth = 1;
3009
+// // aConstraints.gridheight = 3;
3010
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
3011
+// bigThree.add(XYZPanel, aWindowConstraints);
3012
+// bigThree.validate();
3013
+// scenePanel.setVisible(true);
3014
+// centralPanel.setVisible(true);
3015
+// XYZPanel.setVisible(true);
3016
+ bigThree.ClearUI();
3017
+ bigThree.add(scenePanel);
3018
+ bigThree.add(centralPanel);
3019
+ bigThree.add(XYZPanel);
3020
+ bigThree.FlushUI();
28313021 } else
2832
- if (event.getSource() == rootButton)
3022
+ if (source == rootButton)
28333023 {
28343024 Object3D obj;
28353025 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2841,7 +3031,7 @@
28413031
28423032 refreshContents(true);
28433033 } else
2844
- if (event.getSource() == closeButton)
3034
+ if (source == closeButton)
28453035 {
28463036 //System.out.println("CLOSE: " + buttonGroup.getSelection());
28473037 cRadio ab;
....@@ -2862,11 +3052,11 @@
28623052 }
28633053 refreshContents(true);
28643054 } else
2865
- if (event.getSource() == editItem || event.getSource() == editButton)
3055
+ if (source == editItem || source == editButton)
28663056 {
28673057 EditSelection(false);
28683058 } else
2869
- if (event.getSource() == uneditButton)
3059
+ if (source == uneditButton)
28703060 {
28713061 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28723062 {
....@@ -2876,14 +3066,14 @@
28763066 child.CloseUI();
28773067 listUI.remove(child);
28783068
2879
- child.editWindow = null; // ???????????
3069
+ //child.editWindow = null; // ???????????
28803070 }
2881
- objEditor.ctrlPanel.revalidate();
3071
+ objEditor.ctrlPanel.FlushUI();
28823072 //objEditor.jTree.clearSelection();
28833073 //objEditor.ResetSliders();
28843074 refreshContents(true);
28853075 } else
2886
- if (event.getSource() == clearPanelButton)
3076
+ if (source == clearPanelButton)
28873077 {
28883078 assert(copy == group);
28893079 //copy.ClearUI();
....@@ -2894,7 +3084,7 @@
28943084 listUI.clear();
28953085 refreshContents(true);
28963086 } else
2897
- if (event.getSource() == allParamsButton)
3087
+ if (source == allParamsButton)
28983088 {
28993089 assert(copy == group);
29003090
....@@ -2915,19 +3105,19 @@
29153105
29163106 refreshContents(true);
29173107 } else
2918
- if (event.getSource() == unselectButton)
3108
+ if (source == unselectButton)
29193109 {
29203110 objEditor.jTree.clearSelection();
29213111 // ?? oct 2012 GrafreeD.clipboard.clear();
29223112 objEditor.ResetSliders();
29233113 refreshContents(true);
29243114 } else
2925
- if(event.getSource() instanceof cRadio)
3115
+ if(source instanceof cRadio)
29263116 {
29273117 group.parent = keepparent;
29283118 group.attributes = 0;
29293119 //group.editWindow = null;
2930
- /*cRadio*/ radio = (cRadio)event.getSource();
3120
+ /*cRadio*/ radio = (cRadio)source;
29313121 Object3D obj = radio.GetObject();
29323122 System.out.println("Edit " + obj);
29333123 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2962,7 +3152,10 @@
29623152 frontView.object = group;
29633153 sideView.object = group;
29643154 }
3155
+
3156
+// fix "+" issue
29653157 group.editWindow = this;
3158
+
29663159 /*
29673160 currentLayout = radio.layout;
29683161 if (currentLayout == null)
....@@ -2975,7 +3168,20 @@
29753168 //group.attributes = -1;
29763169 ResetModel();
29773170 refreshContents(true);
2978
- }
3171
+ } else if (event.getSource() == editCameraItem)
3172
+ {
3173
+ cameraView.ProtectCamera();
3174
+ cameraView.repaint();
3175
+ return;
3176
+ } else if (event.getSource() == revertCameraItem)
3177
+ {
3178
+ cameraView.RevertCamera();
3179
+ cameraView.repaint();
3180
+ return;
3181
+ // } else if (event.getSource() == textureButton)
3182
+ // {
3183
+ // return; // true;
3184
+ }
29793185 else
29803186 {
29813187 //return super.action(event, arg);
....@@ -3036,6 +3242,28 @@
30363242 refreshContents();
30373243 }
30383244
3245
+ void TransformChildren()
3246
+ {
3247
+ Object3D obj;
3248
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3249
+ {
3250
+ obj = (Object3D)e.nextElement();
3251
+ obj.KeepTextureMatrices();
3252
+ obj.TransformChildren();
3253
+ obj.RestoreTextureMatrices();
3254
+
3255
+// if (obj.parent == null)
3256
+// {
3257
+// System.out.println("NULL PARENT!");
3258
+// new Exception().printStackTrace();
3259
+// }
3260
+// else
3261
+// TouchTransform(obj);
3262
+// //obj.parent.Touch();
3263
+ }
3264
+
3265
+ refreshContents();
3266
+ }
30393267
30403268 void ResetTransform()
30413269 {
....@@ -3148,7 +3376,7 @@
31483376 refreshContents();
31493377 }
31503378
3151
- void ResetCentroid()
3379
+ void ResetCentroid(boolean full)
31523380 {
31533381 Object3D obj;
31543382 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3163,12 +3391,16 @@
31633391 LA.matIdentity(Object3D.mat);
31643392 obj.getBounds(minima, maxima, false);
31653393 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3166
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3394
+ if (full)
3395
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
31673396 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
31683397 obj.TransformMesh(Object3D.mat);
3398
+
31693399 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3170
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3400
+ if (full)
3401
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
31713402 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3403
+
31723404 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
31733405 //Object3D.mat[3][0] = -Object3D.mat[3][0];
31743406 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3197,7 +3429,8 @@
31973429
31983430 int size = obj.MemorySize();
31993431
3200
- System.err.println((size/1024) + " KB is the size of " + obj);
3432
+ //System.err.println((size/1024) + " KB is the size of " + obj);
3433
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
32013434 }
32023435 }
32033436 catch (Exception e)
....@@ -3234,9 +3467,9 @@
32343467 obj = (Object3D)e.nextElement();
32353468
32363469 System.out.println("Object is: " + obj);
3237
- GrafreeD.AnalyzeObject(obj);
3470
+ Grafreed.AnalyzeObject(obj);
32383471 System.out.println("Boundary rep: " + obj.bRep);
3239
- GrafreeD.AnalyzeObject(obj.bRep);
3472
+ Grafreed.AnalyzeObject(obj.bRep);
32403473
32413474 // System.err.println((size/1024) + " KB is the size of " + obj);
32423475 }
....@@ -3278,6 +3511,13 @@
32783511 void GenNormals(boolean crease)
32793512 {
32803513 group.GenNormalsS(crease);
3514
+
3515
+ refreshContents();
3516
+ }
3517
+
3518
+ void GenNormalsMESH()
3519
+ {
3520
+ group.GenNormalsMeshS();
32813521
32823522 refreshContents();
32833523 }
....@@ -3450,8 +3690,8 @@
34503690
34513691 void ParseVertices()
34523692 {
3453
- boolean epsequal = GrafreeD.epsequal;
3454
- GrafreeD.epsequal = true;
3693
+ boolean epsequal = Grafreed.epsequal;
3694
+ Grafreed.epsequal = true;
34553695
34563696 for (int i=0; i<group.selection.size(); i++)
34573697 {
....@@ -3476,7 +3716,7 @@
34763716 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
34773717 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
34783718
3479
- g.add(GrafreeD.clipboard);
3719
+ g.add(Grafreed.clipboard);
34803720
34813721 buffer.add(g);
34823722 }
....@@ -3491,7 +3731,7 @@
34913731 makeSomething(buffer, i==group.selection.size()-1);
34923732 }
34933733
3494
- GrafreeD.epsequal = epsequal;
3734
+ Grafreed.epsequal = epsequal;
34953735
34963736 refreshContents();
34973737 }
....@@ -3509,7 +3749,16 @@
35093749 String pigment = Object3D.GetPigment(tex);
35103750 //String bump = Object3D.GetBump(tex);
35113751
3512
- com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3752
+ com.sun.opengl.util.texture.TextureData texturedata = null;
3753
+
3754
+ try
3755
+ {
3756
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3757
+ }
3758
+ catch (Exception e)
3759
+ {
3760
+ System.err.println("FAIL: " + node);
3761
+ }
35133762
35143763 double s = v.s;
35153764
....@@ -3597,11 +3846,11 @@
35973846
35983847 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
35993848
3600
- boolean random = CameraPane.RANDOM;
3601
- CameraPane.RANDOM = false; // parse all random nodes
3849
+ boolean random = CameraPane.SWITCH;
3850
+ CameraPane.SWITCH = false; // parse all random nodes
36023851 lowres.linkVerticesThis(null);
36033852 lowres.linkVerticesThis(sn);
3604
- CameraPane.RANDOM = random;
3853
+ CameraPane.SWITCH = random;
36053854
36063855 System.err.flush();
36073856
....@@ -3641,7 +3890,7 @@
36413890 return;
36423891
36433892 Object3D poses = group.selection.get(0);
3644
- Object3D ref = GrafreeD.clipboard.get(0);
3893
+ Object3D ref = Grafreed.clipboard.get(0);
36453894
36463895 Object3D newgroup = new Object3D("Po:" + poses.name);
36473896
....@@ -3835,9 +4084,9 @@
38354084
38364085 void ClipMesh()
38374086 {
3838
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
4087
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
38394088 {
3840
- Object3D content = GrafreeD.clipboard.get(0);
4089
+ Object3D content = Grafreed.clipboard.get(0);
38414090
38424091 if (content instanceof cGroup && ((cGroup)content).transientlink )
38434092 content = ((cGroup)content).get(0);
....@@ -3846,7 +4095,7 @@
38464095 // {
38474096 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
38484097 // }
3849
- group.selection.ClipMesh(GrafreeD.clipboard);
4098
+ group.selection.ClipMesh(Grafreed.clipboard);
38504099 }
38514100 // group.selection.ClipMesh(GrafreeD.clipboard);
38524101 System.out.println("DONE.");
....@@ -3981,7 +4230,7 @@
39814230 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
39824231
39834232 Object3D elem = (Object3D)group.selection.elementAt(i);
3984
- if(elem != group)
4233
+ if(elem != group || !newWindow)
39854234 {
39864235 // if (!(elem instanceof Composite))
39874236 // newWindow = false;
....@@ -4086,23 +4335,26 @@
40864335 System.err.println("info : " + child.GetPath());
40874336 }
40884337 }
4089
- else
4090
- {
4091
- objEditor.SetMaterial(group); // .GetMaterial());
4092
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4093
- System.err.println("info : " + group.GetPath());
4094
- }
4338
+// else
4339
+// {
4340
+// objEditor.SetMaterial(group); // .GetMaterial());
4341
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4342
+// System.err.println("info : " + group.GetPath());
4343
+// }
40954344
40964345 objEditor.SetText(); // jan 2014
40974346
4098
- if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4347
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
40994348 CameraPane.flash = true;
41004349
4101
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4350
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
41024351 // a camera
41034352 {
4104
- CameraPane.camerachangeframe = 0; // don't refuse it
4105
- Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4353
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
4354
+ {
4355
+ CameraPane.camerachangeframe = 0; // don't refuse it
4356
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4357
+ }
41064358 // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
41074359 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
41084360 }
....@@ -4186,16 +4438,18 @@
41864438 {
41874439 if (group.selection.isEmpty())
41884440 return;
4189
- GrafreeD.clipboardIsTempGroup = false;
4441
+
4442
+ Grafreed.clipboardIsTempGroup = false;
41904443 Composite tGroup = null;
41914444 if (group.selection.size() > 0) // 1)
41924445 {
41934446 tGroup = new cGroup();
4194
- GrafreeD.clipboardIsTempGroup = true;
4447
+ Grafreed.clipboardIsTempGroup = true;
41954448 }
41964449
41974450 if (cut)
41984451 {
4452
+ Save();
41994453 //int indices[] = jList.getSelectedIndices();
42004454 //for (int i = indices.length - 1; i >= 0; i--)
42014455 //jList.remove(indices[i]);
....@@ -4231,16 +4485,16 @@
42314485 //System.out.println("cut " + child);
42324486 //System.out.println("parent = " + child.parent);
42334487 // tmp.addChild(child);
4234
- if (GrafreeD.clipboardIsTempGroup)
4488
+ if (Grafreed.clipboardIsTempGroup)
42354489 tGroup.add/*Child*/(tmp);
42364490 else
4237
- GrafreeD.clipboard = tmp;
4491
+ Grafreed.clipboard = tmp;
42384492 }
42394493 else
4240
- if (GrafreeD.clipboardIsTempGroup)
4494
+ if (Grafreed.clipboardIsTempGroup)
42414495 tGroup.add/*Child*/(child);
42424496 else
4243
- GrafreeD.clipboard = child;
4497
+ Grafreed.clipboard = child;
42444498 }
42454499
42464500 //ResetModel();
....@@ -4272,21 +4526,23 @@
42724526 //System.out.println("cut " + elem);
42734527 //System.out.println("parent = " + elem.parent);
42744528 // tmp.addChild(elem);
4275
- if (GrafreeD.clipboardIsTempGroup)
4529
+ if (Grafreed.clipboardIsTempGroup)
42764530 tGroup.add/*Child*/(tmp);
42774531 else
4278
- GrafreeD.clipboard = tmp;
4532
+ Grafreed.clipboard = tmp;
42794533 }
42804534 else
4281
- if (GrafreeD.clipboardIsTempGroup)
4535
+ if (Grafreed.clipboardIsTempGroup)
42824536 tGroup.add/*Child*/(child);
42834537 else
4284
- GrafreeD.clipboard = child;
4538
+ Grafreed.clipboard = child;
42854539 }
42864540
42874541 }
4288
- if (GrafreeD.clipboardIsTempGroup)
4289
- GrafreeD.clipboard = tGroup;
4542
+
4543
+ if (Grafreed.clipboardIsTempGroup)
4544
+ Grafreed.clipboard = tGroup;
4545
+
42904546 if (cut)
42914547 {
42924548 ResetModel();
....@@ -4300,7 +4556,7 @@
43004556 // return;
43014557 boolean first = true;
43024558
4303
- if (GrafreeD.clipboardIsTempGroup)
4559
+ if (Grafreed.clipboardIsTempGroup)
43044560 {
43054561 Composite temp;
43064562
....@@ -4311,7 +4567,7 @@
43114567 temp = (Composite)Applet3D.clipboard.deepCopy();
43124568 */
43134569 Object3D elem;
4314
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4570
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
43154571 {
43164572 Object3D child = (Object3D)e.nextElement();
43174573
....@@ -4345,21 +4601,21 @@
43454601 //Object3D cb = Applet3D.clipboard;
43464602 //temp.addChild(cb);
43474603 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4348
- assert(GrafreeD.clipboard.parent == null);
4349
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4350
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4351
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4352
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
4604
+ assert(Grafreed.clipboard.parent == null);
4605
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4606
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4607
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4608
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
43534609 else
4354
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4355
- GrafreeD.clipboard.get(0).parent = keepparent;
4610
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4611
+ Grafreed.clipboard.get(0).parent = keepparent;
43564612 }
43574613
43584614 ResetModel();
43594615 refreshContents();
43604616 }
43614617
4362
- void pasteInto(boolean copyit)
4618
+ void pasteInto(boolean copyit, boolean clone)
43634619 {
43644620 // if (GrafreeD.clipboard == null)
43654621 // return;
....@@ -4388,15 +4644,22 @@
43884644 if (copyit)
43894645 {
43904646 // paste(false);
4391
- CloneClipboard(false); // sept 2014
4647
+ if (clone)
4648
+ {
4649
+ CloneClipboard(false); // sept 2014
4650
+ }
4651
+ else
4652
+ {
4653
+ paste(false);
4654
+ }
43924655 }
43934656 else
43944657 {
43954658 boolean first = true;
43964659
4397
- if (GrafreeD.clipboardIsTempGroup)
4660
+ if (Grafreed.clipboardIsTempGroup)
43984661 {
4399
- Composite temp = (Composite)GrafreeD.clipboard;
4662
+ Composite temp = (Composite)Grafreed.clipboard;
44004663 Object3D copy;
44014664 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
44024665 {
....@@ -4406,7 +4669,7 @@
44064669 }
44074670 } else
44084671 {
4409
- linkSomething(GrafreeD.clipboard); //.get(0));
4672
+ linkSomething(Grafreed.clipboard); //.get(0));
44104673 }
44114674 }
44124675 }
....@@ -4811,21 +5074,6 @@
48115074 }
48125075 */
48135076
4814
- void ImportGFD()
4815
- {
4816
- FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
4817
- browser.show();
4818
- String filename = browser.getFile();
4819
- if (filename != null && filename.length() > 0)
4820
- {
4821
- String fullname = browser.getDirectory() + filename;
4822
-
4823
- //Object3D readobj =
4824
- objEditor.ReadGFD(fullname, objEditor);
4825
- //makeSomething(readobj);
4826
- }
4827
- }
4828
-
48295077 /*
48305078 public void Callback(Object obj)
48315079 {
....@@ -4849,26 +5097,9 @@
48495097 }
48505098 */
48515099
4852
- void ImportVRMLX3D()
4853
- {
4854
- if (GrafreeD.standAlone)
4855
- {
4856
- /**/
4857
- FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
4858
- browser.show();
4859
- String filename = browser.getFile();
4860
- if (filename != null && filename.length() > 0)
4861
- {
4862
- String fullname = browser.getDirectory() + filename;
4863
- LoadVRMLX3D(fullname);
4864
- }
4865
- /**/
4866
- }
4867
- }
4868
-
48695100 String GetFile(String dialogName)
48705101 {
4871
- if (GrafreeD.standAlone)
5102
+ if (Grafreed.standAlone)
48725103 {
48735104 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
48745105 browser.show();
....@@ -4932,10 +5163,15 @@
49325163 cButton flashSelectionButton;
49335164 cButton editButton;
49345165 cButton uneditButton;
5166
+ JCheckBox allParamsButton;
49355167 cButton clearpanelButton;
4936
- cButton allParamsButton;
49375168 cButton unselectButton;
49385169
5170
+ cButton saveButton;
5171
+ cButton undoButton;
5172
+ cButton redoButton;
5173
+ cButton oneStepButton;
5174
+
49395175 cButton screenfitButton;
49405176 cButton screenfitpointButton;
49415177 cButton snapobjectButton;
....@@ -4966,6 +5202,8 @@
49665202 private MenuItem lookFromItem;
49675203 private MenuItem switchItem;
49685204 private MenuItem cutItem;
5205
+ private MenuItem undoItem;
5206
+ private MenuItem redoItem;
49695207 private MenuItem duplicateItem;
49705208 private MenuItem cloneItem;
49715209 private MenuItem cloneSupportItem;
....@@ -4979,7 +5217,7 @@
49795217 private MenuItem linkverticesItem;
49805218 private MenuItem relinkverticesItem;
49815219 private MenuItem setMasterItem;
4982
- private MenuItem resetMeshItem;
5220
+ private MenuItem resetAllItem;
49835221 private MenuItem stepAllItem;
49845222 private MenuItem revertMeshItem;
49855223 private MenuItem poseMeshItem;
....@@ -4990,6 +5228,7 @@
49905228 private MenuItem mergeGeometriesItem;
49915229 private MenuItem copyItem;
49925230 private MenuItem pasteItem;
5231
+ private MenuItem pasteIntoItem;
49935232 private MenuItem pasteLinkItem;
49945233 private MenuItem pasteCloneItem;
49955234 private MenuItem pasteExpandItem;
....@@ -5039,8 +5278,10 @@
50395278 private MenuItem panoTexturesItem;
50405279
50415280 private MenuItem resetCentroidItem;
5042
- private MenuItem transformgeometryItem;
5281
+ private MenuItem resetCentroidXZItem;
50435282 private MenuItem resetTransformItem;
5283
+ private MenuItem transformGeometryItem;
5284
+ private MenuItem transformChildrenItem;
50445285 private MenuItem hideItem;
50455286 private MenuItem grabItem;
50465287 private MenuItem backItem;
....@@ -5087,7 +5328,7 @@
50875328 private MenuItem blobItem;
50885329 private MenuItem latheItem;
50895330 private MenuItem bezierItem;
5090
- private MenuItem checkerItem;
5331
+ private MenuItem overlayItem;
50915332 private MenuItem meshItem;
50925333 // private MenuItem meshGroupItem;
50935334 private MenuItem springItem;
....@@ -5109,11 +5350,6 @@
51095350 private MenuItem doubleItem;
51105351 private MenuItem tripleItem;
51115352
5112
- private MenuItem importGFDItem;
5113
- private MenuItem importVRMLX3DItem;
5114
- private MenuItem import3DSItem;
5115
- private MenuItem importOBJItem;
5116
-
51175353 private MenuItem computeAOItem;
51185354 private MenuItem recompileItem;
51195355 private MenuItem editScriptItem;
....@@ -5123,4 +5359,8 @@
51235359 private MenuItem analyzeItem;
51245360 private MenuItem dumpItem;
51255361 //boolean freezemodel = false;
5362
+
5363
+ Menu cameraMenu;
5364
+ MenuItem editCameraItem;
5365
+ MenuItem revertCameraItem;
51265366 }