Normand Briere
2019-05-05 1e1c7fcdb3d0f8be350c5f6c32b6afa6705168ea
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,
....@@ -83,7 +84,7 @@
8384
8485 void CloneSelection(boolean supports)
8586 {
86
- // Object3D keep = GraphreeD.clipboard;
87
+ // Object3D keep = GrafreeD.clipboard;
8788 //Object3D obj;
8889 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();)
8990 {
....@@ -97,14 +98,14 @@
9798
9899 void CloneClipboard(boolean supports)
99100 {
100
- assert(GraphreeD.clipboard.parent == null);
101
- Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent;
102
- GraphreeD.clipboard.get(0).parent = null; // Avoid copy?
103
- if (LA.isIdentity(GraphreeD.clipboard.toParent))
104
- makeSomething(CloneObject(GraphreeD.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(GraphreeD.clipboard, false));
107
- GraphreeD.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)GraphreeD.clone(obj);
122
+ Object3D clone = (Object3D)GrafreeD.clone(obj);
122123 obj.parent = parent;
123124 // obj.support = support;
124125 // clone.support = support; // aout 2013
....@@ -149,6 +150,8 @@
149150
150151 void SetupMenu2(ObjEditor oe)
151152 {
153
+ if (Globals.ADVANCED)
154
+ {
152155 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
153156 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
154157 //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
....@@ -160,17 +163,21 @@
160163 lookAtItem.addActionListener(this);
161164 //lookFromItem.addActinoListener(this);
162165 //switchItem.addActionListener(this);
166
+ }
167
+
163168 Menu menu;
164169 oe.menuBar.add(menu = new Menu("Edit"));
165170 //editItem = menu.add(new MenuItem("Edit"));
166171 //editItem.addActionListener(this);
167172 duplicateItem = menu.add(new MenuItem("Duplicate"));
168173 duplicateItem.addActionListener(this);
169
- menu.add("-");
170174 cloneItem = menu.add(new MenuItem("Clone"));
171175 cloneItem.addActionListener(this);
176
+ if (Globals.ADVANCED)
177
+ {
172178 cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
173179 cloneSupportItem.addActionListener(this);
180
+ }
174181 menu.add("-");
175182 cutItem = menu.add(new MenuItem("Cut"));
176183 cutItem.addActionListener(this);
....@@ -178,18 +185,31 @@
178185 copyItem.addActionListener(this);
179186 pasteItem = menu.add(new MenuItem("Paste"));
180187 pasteItem.addActionListener(this);
188
+ menu.add("-");
189
+
190
+ menu.add("-");
191
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
192
+ pasteIntoItem.addActionListener(this);
181193 pasteLinkItem = menu.add(new MenuItem("Paste link"));
182194 pasteLinkItem.addActionListener(this);
183195 pasteCloneItem = menu.add(new MenuItem("Paste clone"));
184196 pasteCloneItem.addActionListener(this);
185197 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
186198 // pasteExpandItem.addActionListener(this);
199
+ menu.add("-");
187200 clearItem = menu.add(new MenuItem("Clear"));
188201 clearItem.addActionListener(this);
202
+
203
+ if (Globals.ADVANCED)
204
+ {
205
+ // Deletes the cameras...
189206 clearAllItem = menu.add(new MenuItem("Clear All"));
190207 clearAllItem.addActionListener(this);
208
+ }
191209
192210 oe.menuBar.add(menu = new Menu("Setting"));
211
+ if (Globals.ADVANCED)
212
+ {
193213 resetMeshItem = menu.add(new MenuItem("Reset All"));
194214 resetMeshItem.addActionListener(this);
195215 stepAllItem = menu.add(new MenuItem("Step All"));
....@@ -199,6 +219,7 @@
199219 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
200220 resetreferencesItem.addActionListener(this);
201221 menu.add("-");
222
+ }
202223 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
203224 overwriteGeoItem.addActionListener(this);
204225 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -210,48 +231,68 @@
210231 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
211232 overwriteUVItem.addActionListener(this);
212233 menu.add("-");
234
+ if (Globals.ADVANCED)
235
+ {
213236 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
214237 generateMeshItem.addActionListener(this);
215238 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
216239 poseMeshItem.addActionListener(this);
217240 menu.add("-");
241
+ }
218242 resetsupportItem = menu.add(new MenuItem("Reset support"));
219243 resetsupportItem.addActionListener(this);
220244 linkverticesItem = menu.add(new MenuItem("Link to Support"));
221245 linkverticesItem.addActionListener(this);
246
+ relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
247
+ relinkverticesItem.addActionListener(this);
248
+
249
+ if (Globals.ADVANCED)
250
+ {
222251 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
223252 setMasterItem.addActionListener(this);
253
+ }
224254
225255 oe.menuBar.add(menu = new Menu("Group"));
226256 grabItem = menu.add(new MenuItem("Grab"));
227257 grabItem.addActionListener(this);
228
- frontItem = menu.add(new MenuItem("Front"));
229
- frontItem.addActionListener(this);
230258 backItem = menu.add(new MenuItem("Back"));
231259 backItem.addActionListener(this);
260
+ frontItem = menu.add(new MenuItem("Front"));
261
+ frontItem.addActionListener(this);
232262 compositeItem = menu.add(new MenuItem("Composite"));
233263 compositeItem.addActionListener(this);
264
+ hideItem = menu.add(new MenuItem("Hidden Group"));
265
+ hideItem.addActionListener(this);
266
+ ungroupItem = menu.add(new MenuItem("Ungroup"));
267
+ ungroupItem.addActionListener(this);
234268 menu.add("-");
235
- randomItem = menu.add(new MenuItem("Random"));
269
+ randomItem = menu.add(new MenuItem("Switch node"));
236270 randomItem.addActionListener(this);
237
- physicsItem = menu.add(new MenuItem("Physics"));
238
- physicsItem.addActionListener(this);
239
- frameselectorItem = menu.add(new MenuItem("Frame Selector"));
240
- frameselectorItem.addActionListener(this);
241271 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
242272 switchGeoItem.addActionListener(this);
243273 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
244274 switchTransfoItem.addActionListener(this);
245
- morphItem = menu.add(new MenuItem("Morph"));
275
+ morphItem = menu.add(new MenuItem("Morph Group"));
246276 morphItem.addActionListener(this);
277
+
278
+ if (Globals.ADVANCED)
279
+ {
280
+ menu.add("-");
281
+ physicsItem = menu.add(new MenuItem("Physics"));
282
+ physicsItem.addActionListener(this);
283
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
284
+ frameselectorItem.addActionListener(this);
247285 scriptNodeItem = menu.add(new MenuItem("Script Node"));
248286 scriptNodeItem.addActionListener(this);
249287 cameraItem = menu.add(new MenuItem("Camera"));
250288 cameraItem.addActionListener(this);
289
+ }
251290
252291 oe.menuBar.add(menu = new Menu("Object"));
253292 textureItem = menu.add(new MenuItem("Texture"));
254293 textureItem.addActionListener(this);
294
+ billboardItem = menu.add(new MenuItem("Billboard"));
295
+ billboardItem.addActionListener(this);
255296 csgItem = menu.add(new MenuItem("CSG"));
256297 csgItem.addActionListener(this);
257298 shadowXItem = menu.add(new MenuItem("Shadow X"));
....@@ -260,23 +301,25 @@
260301 shadowYItem.addActionListener(this);
261302 shadowZItem = menu.add(new MenuItem("Shadow Z"));
262303 shadowZItem.addActionListener(this);
304
+ if (Globals.ADVANCED)
305
+ {
306
+ menu.add("-");
263307 linkerItem = menu.add(new MenuItem("Linker"));
264308 linkerItem.addActionListener(this);
265
- templateItem = menu.add(new MenuItem("Template"));
266
- templateItem.addActionListener(this);
267309 attributeItem = menu.add(new MenuItem("Attribute"));
268310 attributeItem.addActionListener(this);
311
+ templateItem = menu.add(new MenuItem("Template"));
312
+ templateItem.addActionListener(this);
269313 pointflowItem = menu.add(new MenuItem("Point Flow"));
270314 pointflowItem.addActionListener(this);
315
+ }
271316 menu.add("-");
272
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
273
- transformgeometryItem.addActionListener(this);
274317 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
275318 resetTransformItem.addActionListener(this);
276319 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
277320 resetCentroidItem.addActionListener(this);
278
- ungroupItem = menu.add(new MenuItem("Ungroup"));
279
- ungroupItem.addActionListener(this);
321
+ transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
322
+ transformgeometryItem.addActionListener(this);
280323
281324 oe.menuBar.add(menu = new Menu("Geometry"));
282325 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -285,6 +328,13 @@
285328 genNormalsORGANItem.addActionListener(this);
286329 genNormalsCADItem = menu.add(new MenuItem("CAD Normals"));
287330 genNormalsCADItem.addActionListener(this);
331
+ genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
332
+ genNormalsMESHItem.addActionListener(this);
333
+ if (Globals.ADVANCED)
334
+ {
335
+ genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
336
+ genNormalsMINEItem.addActionListener(this);
337
+ }
288338 stripifyItem = menu.add(new MenuItem("Stripify"));
289339 stripifyItem.addActionListener(this);
290340 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -306,10 +356,14 @@
306356 reduce34MeshItem.addActionListener(this);
307357 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
308358 increaseMeshItem.addActionListener(this);
309
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
310
- smoothMeshItem.addActionListener(this);
311359 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
312360 clipMeshItem.addActionListener(this);
361
+
362
+ if (Globals.ADVANCED)
363
+ {
364
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
365
+ smoothMeshItem.addActionListener(this);
366
+ }
313367
314368 oe.menuBar.add(menu = new Menu("Attributes"));
315369 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
....@@ -319,10 +373,13 @@
319373 liveleavesItem.addActionListener(this);
320374 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
321375 unliveleavesItem.addActionListener(this);
376
+ if (Globals.ADVANCED)
377
+ {
322378 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
323379 supportleavesItem.addActionListener(this);
324380 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
325381 unsupportleavesItem.addActionListener(this);
382
+ }
326383 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
327384 hideleavesItem.addActionListener(this);
328385 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -365,6 +422,8 @@
365422 sortbysizeItem.addActionListener(this);
366423 sortbynameItem = menu.add(new MenuItem("Sort by name"));
367424 sortbynameItem.addActionListener(this);
425
+ if (Globals.ADVANCED)
426
+ {
368427 menu.add("-");
369428 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
370429 extractGeometriesItem.addActionListener(this);
....@@ -374,20 +433,23 @@
374433 shareGeometriesItem.addActionListener(this);
375434 mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
376435 mergeGeometriesItem.addActionListener(this);
436
+ }
377437
378438 oe.menuBar.add(menu = new Menu("Insert"));
379439 buildCreateMenu(menu);
380440
381
-
382441 oe.menuBar.add(menu = new Menu("Include"));
383
- importGFDItem = menu.add(new MenuItem("GraphreeD Object..."));
384
- importGFDItem.addActionListener(this);
385
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
386
- importVRMLX3DItem.addActionListener(this);
387
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
442
+ importOBJItem = menu.add(new MenuItem("OBJ file..."));
388443 importOBJItem.addActionListener(this);
389
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
444
+ menu.add("-");
445
+ import3DSItem = menu.add(new MenuItem("3DS file..."));
390446 import3DSItem.addActionListener(this);
447
+ menu.add("-");
448
+ importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file..."));
449
+ importVRMLX3DItem.addActionListener(this);
450
+ menu.add("-");
451
+ importGFDItem = menu.add(new MenuItem("GrafreeD file..."));
452
+ importGFDItem.addActionListener(this);
391453
392454 oe.menuBar.add(menu = new Menu("Tools"));
393455 buildToolsMenu(menu);
....@@ -423,150 +485,98 @@
423485 oe.radioPanel.add(dummyButton);
424486 oe.buttonGroup.add(dummyButton);
425487 */
426
- aConstraints.gridy += 1;
427
- oe.aConstraints.gridwidth = 1;
428
- oe.aConstraints.gridx = 0;
488
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
429489
430
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints);
490
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
491
+ liveCB.setToolTipText("Enabled animation");
431492 liveCB.addItemListener(this);
432493
433
- oe.aConstraints.gridx += 1;
434
- oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints);
435
- supportCB.addItemListener(this);
436
-
437
- // oe.aConstraints.gridx += 1;
438
- // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints);
439
- // localCB.addItemListener(this);
440
-
441
- oe.aConstraints.gridx += 1;
442
- oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints);
443
- crowdCB.addItemListener(this);
444
-
445
- oe.aConstraints.gridx += 1;
446
- oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints);
447
- smoothCB.addItemListener(this);
448
-
449
- oe.aConstraints.gridx += 1;
450
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints);
494
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
495
+ oneStepButton.setToolTipText("Animate one step forward");
496
+ oneStepButton.addActionListener(this);
497
+
498
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
499
+ fastCB.setToolTipText("Fast mode");
451500 fastCB.addItemListener(this);
452
- oe.aConstraints.gridx += 1;
453
- oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints);
454
- slowCB.addItemListener(this);
455
- oe.aConstraints.gridx += 1;
456
- oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints);
457
- boxCB.addItemListener(this);
458
-
459
-// oe.aConstraints.gridx += 1;
460
-// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints);
461
-// speakerMocapCB.addItemListener(this);
462
-
463
- if (false)
464
- {
465
- // handled in scripts
466
- oe.aConstraints.gridx += 1;
467
- oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints);
468
- speakerCameraCB.addItemListener(this);
469
-
470
- oe.aConstraints.gridx += 1;
471
- oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints);
472
- speakerFocusCB.addItemListener(this);
473
-
474
- oe.aConstraints.gridx += 1;
475
- oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints);
476
- smoothfocusCB.addItemListener(this);
477
- }
478
-
479
-//oe.aConstraints.gridx += 1;
480
-//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints);
481
-// debugCB.addItemListener(this);
482
-
483
- oe.aConstraints.gridx += 1;
484
- oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints);
485
- oeilCB.addItemListener(this);
486
-
487
- oe.aConstraints.gridx += 1;
488
- oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints);
489
- lookAtCB.addItemListener(this);
490
-
491
- oe.aConstraints.gridx += 1;
492
- oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints);
501
+
502
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
503
+ trackCB.setToolTipText("Enable tracking");
493504 trackCB.addItemListener(this);
494505
495
- oe.aConstraints.gridx += 1;
496
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
506
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
507
+ screenfitButton.setToolTipText("Screen fit");
497508 screenfitButton.addActionListener(this);
498
- oe.aConstraints.gridx += 1;
509
+
499510 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
500511 // screenfitpointButton.addActionListener(this);
501
-// oe.aConstraints.gridx += 1;
502
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
503
- snapobjectButton.addActionListener(this);
504
- oe.aConstraints.gridx += 1;
505512
506
- //aConstraints.gridx = 0;
507
- //aConstraints.gridy += 1;
508
- oe.aConstraints.weighty = 0;
509
- oe.aConstraints.gridwidth = 1;
510
-
511
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
513
+ if (Globals.ADVANCED)
514
+ {
515
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
516
+ snapobjectButton.addActionListener(this);
517
+ snapobjectButton.setToolTipText("Snap Object");
518
+ }
519
+
520
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
521
+ flashSelectionButton.setToolTipText("Show selection");
512522 flashSelectionButton.addActionListener(this);
513
- oe.aConstraints.gridx += 1;
514
- oe.aConstraints.weighty = 0;
515
- oe.aConstraints.gridwidth = 1;
516523
517
- //
518
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
524
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
525
+
526
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
527
+ twoButton.setToolTipText("Show center view only");
519528 twoButton.addActionListener(this);
520
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
529
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
521530 fourButton.addActionListener(this);
522
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
531
+ fourButton.setToolTipText("Show left panel only");
532
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
533
+ sixButton.setToolTipText("2-column layout left");
523534 sixButton.addActionListener(this);
524
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
535
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
536
+ threeButton.setToolTipText("2-column layout right");
525537 threeButton.addActionListener(this);
526
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
538
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
539
+ sevenButton.setToolTipText("3-column layout");
527540 sevenButton.addActionListener(this);
528541 //
529542
530
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
543
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
544
+ rootButton.setToolTipText("Edit selection in new tab");
531545 rootButton.addActionListener(this);
532
- oe.aConstraints.gridx += 1;
533
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
546
+
547
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
548
+ closeButton.setToolTipText("Close tab");
534549 closeButton.addActionListener(this);
535550 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
536551 //clearButton.addActionListener(this);
537
- oe.aConstraints.gridx += 1;
538552
539
- oe.aConstraints.gridx = 1; //
540
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
553
+ cGridBag commandsPanel = new cGridBag();
554
+
555
+ commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
556
+ editButton.setToolTipText("Edit selection");
541557 editButton.addActionListener(this);
542
- oe.aConstraints.gridx += 1;
543
- oe.aConstraints.weighty = 0;
544
- oe.aConstraints.gridwidth = 1;
545558
546
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
559
+ commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
560
+ uneditButton.setToolTipText("Unedit selection");
547561 uneditButton.addActionListener(this);
548562
549
- oe.aConstraints.gridx += 1;
550
- oe.aConstraints.weighty = 0;
551
- oe.aConstraints.gridwidth = 1;
552
-
553
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
554
- clearPanelButton.addActionListener(this);
555
-
556
- oe.aConstraints.gridx += 1;
557
- oe.aConstraints.weighty = 0;
558
- oe.aConstraints.gridwidth = 1;
559
-
560
- oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints);
563
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
564
+ allParamsButton.setToolTipText("Edit all params");
561565 allParamsButton.addActionListener(this);
562566
563
- oe.aConstraints.gridx += 1;
564
- oe.aConstraints.weighty = 0;
565
- oe.aConstraints.gridwidth = 1;
566
-
567
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
567
+ commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
568
+ clearPanelButton.setToolTipText("Clear edit panel");
569
+ clearPanelButton.addActionListener(this);
570
+
571
+ commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
572
+ unselectButton.setToolTipText("Unselect");
568573 unselectButton.addActionListener(this);
569574
575
+ commandsPanel.preferredHeight = 1;
576
+
577
+ oe.treePanel.add(commandsPanel);
578
+ oe.treePanel.Return();
579
+
570580 // oe.aConstraints.gridx += 1;
571581 // oe.aConstraints.weighty = 0;
572582 // oe.aConstraints.gridwidth = 1;
....@@ -578,40 +588,37 @@
578588 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
579589 // gcButton.addActionListener(this);
580590
581
- oe.aConstraints.gridx = 0;
582
- oe.aConstraints.gridy += 1;
583
-
584
- //ctrlPanel.add(objList = new List(5, true));
585
- oe.aConstraints.gridwidth = 100;
586
- // oe.aConstraints.gridheight = 100;
587
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
588
- oe.aConstraints.gridheight = 1;
589
- oe.aConstraints.weighty = 0.5;
590
- oe.aConstraints.gridx = 0;
591
- JScrollPane jSP;
591
+ cGridBag jSPPanel = new cGridBag();
592
+
593
+ JScrollPane jSP;
592594 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
593
- oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints);
595
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
594596 ResetModel();
595
- oe.aConstraints.weighty = 0.5;
596
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
597
- oe.aConstraints.gridy += 1;
598
- oe.aConstraints.gridwidth = 1;
597
+
598
+ oe.treePanel.add(jSPPanel);
599
+ oe.treePanel.Return();
599600
600
- oe.aConstraints.weighty = 0;
601
- oe.aConstraints.gridwidth = 2;
602
-
603
- oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints);
601
+ cGridBag copyOptionsPanel = new cGridBag();
602
+
603
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
604
+ colorCB.setToolTipText("Copy color when dropped");
604605 colorCB.addItemListener(this);
605
- oe.aConstraints.gridx += 2;
606
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
606
+
607
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
608
+ materialCB.setToolTipText("Copy material when dropped");
607609 materialCB.addItemListener(this);
608
- oe.aConstraints.gridx += 2;
609
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
610
+
611
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
612
+ textureCB.setToolTipText("Copy texture when dropped");
610613 textureCB.addItemListener(this);
611614
612
- oe.aConstraints.gridx = 0;
613
- oe.aConstraints.gridy += 1;
615
+ copyOptionsPanel.preferredHeight = 1;
616
+ oe.treePanel.add(copyOptionsPanel);
617
+ oe.treePanel.Return();
614618
619
+// mainPanel.setDividerLocation(0.5); //1.0);
620
+// mainPanel.setResizeWeight(0.5);
621
+
615622 //jList.addListSelectionListener(this);
616623 oe.jTree.addTreeSelectionListener(this);
617624 //jTree.setRootVisible(false);
....@@ -633,17 +640,89 @@
633640 radio.layout = sevenButton;
634641 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
635642 }
643
+
644
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
645
+ {
646
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
647
+ boxCB.setToolTipText("Display bounding boxes");
648
+ boxCB.addItemListener(this);
649
+
650
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
651
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
652
+ zoomBoxCB.addItemListener(this);
653
+
654
+ if (Globals.ADVANCED)
655
+ {
656
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
657
+ supportCB.setToolTipText("Enable rigging");
658
+ supportCB.addItemListener(this);
659
+
660
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
661
+ // localCB.addItemListener(this);
662
+
663
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
664
+ crowdCB.setToolTipText("Used for crowds");
665
+ crowdCB.addItemListener(this);
666
+
667
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
668
+ smoothCB.setToolTipText("Snapping delay");
669
+ smoothCB.addItemListener(this);
670
+
671
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
672
+ slowCB.setToolTipText("Smooth interpolation");
673
+ slowCB.addItemListener(this);
674
+
675
+// constraints.gridy += 1;
676
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
677
+// speakerMocapCB.addItemListener(this);
678
+
679
+ if (false)
680
+ {
681
+ // handled in scripts
682
+ //constraints.gridy += 1;
683
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
684
+ speakerCameraCB.addItemListener(this);
685
+
686
+ //constraints.gridy += 1;
687
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
688
+ speakerFocusCB.addItemListener(this);
689
+
690
+ //constraints.gridy += 1;
691
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
692
+ smoothfocusCB.addItemListener(this);
693
+ }
694
+
695
+//constraints.gridx += 1;
696
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
697
+// debugCB.addItemListener(this);
698
+
699
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
700
+ oeilCB.addItemListener(this);
701
+
702
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
703
+ lookAtCB.setToolTipText("Look-at target");
704
+ lookAtCB.addItemListener(this);
705
+
706
+ }
707
+
708
+ cGridBag fill = new cGridBag();
709
+
710
+ fill.preferredHeight = 200;
711
+
712
+ panel.add(fill);
713
+
714
+ }
636715
637716 void EditObject(Object3D obj)
638717 {
639
- cRadio dummyButton = new cRadio(obj.name);
640
- dummyButton.SetObject(obj);
641
- dummyButton.layout = sevenButton;
642
- dummyButton.SetCamera(cameraView.renderCamera, false);
643
- dummyButton.addActionListener(this);
644
- radioPanel.add(dummyButton);
645
- buttonGroup.add(dummyButton);
646
- dummyButton.doClick();
718
+ cRadio radioButton = new cRadio(obj.name);
719
+ radioButton.SetObject(obj);
720
+ radioButton.layout = sevenButton;
721
+ radioButton.SetCamera(cameraView.renderCamera, false);
722
+ radioButton.addActionListener(this);
723
+ radioPanel.add(radioButton);
724
+ buttonGroup.add(radioButton);
725
+ radioButton.doClick();
647726 }
648727 void SetupViews(ObjEditor oe)
649728 {
....@@ -663,6 +742,7 @@
663742 JCheckBox fastCB;
664743 JCheckBox slowCB;
665744 JCheckBox boxCB;
745
+ JCheckBox zoomBoxCB;
666746 JCheckBox trackCB;
667747 JCheckBox smoothfocusCB;
668748 // JCheckBox speakerMocapCB;
....@@ -705,8 +785,7 @@
705785 dropAttributes |= Object3D.TEXTURE;
706786 else
707787 dropAttributes &= ~Object3D.TEXTURE;
708
- }
709
- else if(e.getSource() == liveCB)
788
+ } else if(e.getSource() == liveCB)
710789 {
711790 cameraView.ToggleLive();
712791 }
....@@ -743,6 +822,10 @@
743822 Recompile();
744823 cameraView.repaint();
745824 // refreshContents();
825
+ }
826
+ else if(e.getSource() == zoomBoxCB)
827
+ {
828
+ cameraView.ToggleZoomBoxMode();
746829 }
747830 else if(e.getSource() == smoothfocusCB)
748831 {
....@@ -911,11 +994,11 @@
911994 {
912995 loadClipboard(true);
913996 objEditor.jTree.setSelectionPath(destinationPath);
914
- pasteInto(false);
997
+ pasteInto(false, false);
915998 } else {
916999 loadClipboard(false);
9171000 objEditor.jTree.setSelectionPath(destinationPath);
918
- pasteInto(false); // true); // ???
1001
+ pasteInto(false, false); // true); // ???
9191002 }
9201003 }
9211004 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1033,29 +1116,37 @@
10331116 torusItem.addActionListener(this);
10341117 superItem = menu.add(new MenuItem("Superellipsoid"));
10351118 superItem.addActionListener(this);
1119
+ kleinItem = menu.add(new MenuItem("Klein Bottle"));
1120
+ kleinItem.addActionListener(this);
10361121 particleItem = menu.add(new MenuItem("Particle system"));
10371122 particleItem.addActionListener(this);
1123
+ if (Globals.ADVANCED)
1124
+ {
10381125 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10391126 ragdollItem.addActionListener(this);
10401127 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10411128 ragdoll2Item.addActionListener(this);
1129
+ }
10421130 menu.add("-");
1043
- meshItem = menu.add(new MenuItem("Mesh"));
1131
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10441132 meshItem.addActionListener(this);
10451133 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10461134 // meshGroupItem.addActionListener(this);
1135
+ if (Globals.ADVANCED)
1136
+ {
10471137 springItem = menu.add(new MenuItem("Spring"));
10481138 springItem.addActionListener(this);
10491139 flagItem = menu.add(new MenuItem("Flag"));
10501140 flagItem.addActionListener(this);
1051
- bezierItem = menu.add(new MenuItem("Patch"));
1052
- bezierItem.addActionListener(this);
1053
- checkerItem = menu.add(new MenuItem("Checker"));
1054
- checkerItem.addActionListener(this);
10551141 blobItem = menu.add(new MenuItem("Blob"));
10561142 blobItem.addActionListener(this);
10571143 latheItem = menu.add(new MenuItem("Lathe"));
10581144 latheItem.addActionListener(this);
1145
+ }
1146
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1147
+ bezierItem.addActionListener(this);
1148
+ overlayItem = menu.add(new MenuItem("Overlay"));
1149
+ overlayItem.addActionListener(this);
10591150 lightItem = menu.add(new MenuItem("Light"));
10601151 lightItem.addActionListener(this);
10611152 menu.add("-");
....@@ -1065,34 +1156,39 @@
10651156 loopItem.addActionListener(this);
10661157 doubleItem = menu.add(new MenuItem("Fork"));
10671158 doubleItem.addActionListener(this);
1159
+ if (Globals.ADVANCED)
1160
+ {
10681161 tripleItem = menu.add(new MenuItem("Trident"));
10691162 tripleItem.addActionListener(this);
1163
+ }
10701164 }
10711165
10721166 void buildToolsMenu(Menu menu)
10731167 {
10741168 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10751169 animationItem.addItemListener(this);
1076
- animationItem.setState(CameraPane.ANIMATION);
1170
+ animationItem.setState(Globals.ANIMATION);
10771171
10781172 menu.add("-");
10791173 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
10801174 parseverticesItem.addActionListener(this);
10811175 textureFieldItem = menu.add(new MenuItem("Texture Field"));
10821176 textureFieldItem.addActionListener(this);
1083
- alignItem = menu.add(new MenuItem("Align"));
1177
+ alignItem = menu.add(new MenuItem("Align Objects"));
10841178 alignItem.addActionListener(this);
1085
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1086
- mirrorItem.addActionListener(this);
10871179 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
10881180 reduceMorphItem.addActionListener(this);
10891181 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
10901182 reduce34MorphItem.addActionListener(this);
1091
-
1183
+ menu.add("-");
10921184 menu.add(computeAOItem = new MenuItem("Compute AO"));
10931185 computeAOItem.addActionListener(this);
1094
- menu.add("-");
10951186
1187
+ if (Globals.ADVANCED)
1188
+ {
1189
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1190
+ mirrorItem.addActionListener(this);
1191
+ menu.add("-");
10961192 menu.add(memoryItem = new MenuItem("Memory Usage"));
10971193 memoryItem.addActionListener(this);
10981194 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1106,6 +1202,8 @@
11061202 resetParentItem.addActionListener(this);
11071203 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11081204 repairParentItem.addActionListener(this);
1205
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1206
+ repairShadowItem.addActionListener(this);
11091207 menu.add(invariantsItem = new MenuItem("Invariants"));
11101208 invariantsItem.addActionListener(this);
11111209 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1113,6 +1211,7 @@
11131211 menu.add("-");
11141212 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11151213 editScriptItem.addActionListener(this);
1214
+ }
11161215 }
11171216
11181217 void ScreenFit()
....@@ -1441,9 +1540,9 @@
14411540
14421541 void Overwrite(int mask)
14431542 {
1444
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
1543
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
14451544 {
1446
- Object3D content = GraphreeD.clipboard.get(0);
1545
+ Object3D content = GrafreeD.clipboard.get(0);
14471546
14481547 if (content instanceof cGroup && ((cGroup)content).transientlink )
14491548 content = ((cGroup)content).get(0);
....@@ -1466,6 +1565,7 @@
14661565 //
14671566 public void actionPerformed(ActionEvent event) // , Object arg)
14681567 {
1568
+ Object source = event.getSource();
14691569 /*
14701570 if (event.getSource() == nameField)
14711571 {
....@@ -1477,11 +1577,11 @@
14771577 }
14781578 else
14791579 */
1480
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1580
+ if (source == lookAtItem || source == lookFromItem)
14811581 {
14821582 ScreenFit();
14831583 } else
1484
- if (event.getSource() == switchItem)
1584
+ if (source == switchItem)
14851585 {
14861586 cVector v1 = new cVector();
14871587 cVector v2 = new cVector();
....@@ -1490,11 +1590,11 @@
14901590 objEditor.cameraView.renderCamera.setAim(v2, v1);
14911591 objEditor.cameraView.repaint();
14921592 } else
1493
- if (event.getSource() == rectoidItem)
1593
+ if (source == rectoidItem)
14941594 {
14951595 makeSomething(new Box());
14961596 } else
1497
- if (event.getSource() == particleItem)
1597
+ if (source == particleItem)
14981598 {
14991599 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15001600 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1515,9 +1615,9 @@
15151615 applyExample(particleGeom, "SMOKE");
15161616 makeSomething(particleGeom);
15171617 } else
1518
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1618
+ if (source == ragdollItem || source == ragdoll2Item)
15191619 {
1520
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1620
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15211621
15221622 ragdoll.toParent = LA.newMatrix();
15231623 ragdoll.fromParent = LA.newMatrix();
....@@ -1535,7 +1635,7 @@
15351635 } else
15361636 /*
15371637 */
1538
- if (event.getSource() == heightFieldItem)
1638
+ if (source == heightFieldItem)
15391639 {
15401640 Object3D obj = new Object3D();
15411641
....@@ -1573,27 +1673,31 @@
15731673
15741674 makeSomething(obj);
15751675 } else
1576
- if (event.getSource() == gridItem)
1676
+ if (source == gridItem)
15771677 {
15781678 makeSomething(new Grid());
15791679 } else
1580
- if (event.getSource() == ellipsoidItem)
1680
+ if (source == ellipsoidItem)
15811681 {
15821682 makeSomething(new Sphere());
15831683 } else
1584
- if (event.getSource() == coneItem)
1684
+ if (source == coneItem)
15851685 {
15861686 makeSomething(new Cone());
15871687 } else
1588
- if (event.getSource() == torusItem)
1688
+ if (source == torusItem)
15891689 {
15901690 makeSomething(new Torus());
15911691 } else
1592
- if (event.getSource() == superItem)
1692
+ if (source == superItem)
15931693 {
15941694 makeSomething(new Superellipsoid());
15951695 } else
1596
- if (event.getSource() == blobItem)
1696
+ if (source == kleinItem)
1697
+ {
1698
+ makeSomething(new Klein());
1699
+ } else
1700
+ if (source == blobItem)
15971701 {
15981702 Blob blob = new Blob();
15991703 BlobComponent comp = new BlobComponent();
....@@ -1601,15 +1705,15 @@
16011705 //blob.retile();
16021706 makeSomething(blob);
16031707 } else
1604
- if (event.getSource() == latheItem)
1708
+ if (source == latheItem)
16051709 {
16061710 makeSomething(new Lathe());
16071711 } else
1608
- if (event.getSource() == bezierItem)
1712
+ if (source == bezierItem)
16091713 {
16101714 makeSomething(new BezierSurface());
16111715 } else
1612
- if (event.getSource() == checkerItem)
1716
+ if (source == overlayItem)
16131717 {
16141718 /*
16151719 Object3D obj = new BezierSurface(5,8);
....@@ -1624,7 +1728,7 @@
16241728 */
16251729 makeSomething(new Checker());
16261730 } else
1627
- if (event.getSource() == meshItem)
1731
+ if (source == meshItem)
16281732 {
16291733 Object3D itemtomake = new Object3D();
16301734 Object3D child;
....@@ -1645,35 +1749,35 @@
16451749 makeSomething(child);
16461750 }
16471751 } else
1648
- if (event.getSource() == springItem)
1752
+ if (source == springItem)
16491753 {
16501754 cSpring s = new cSpring();
16511755 s.setup();
16521756 makeSomething(s);
16531757 } else
1654
- if (event.getSource() == flagItem)
1758
+ if (source == flagItem)
16551759 {
16561760 cSpring s = new cFlag();
16571761 s.setup();
16581762 makeSomething(s);
16591763 } else
1660
- if (event.getSource() == lightItem)
1764
+ if (source == lightItem)
16611765 {
16621766 makeSomething(new Light());
16631767 } else
1664
- if (event.getSource() == csgItem)
1768
+ if (source == csgItem)
16651769 {
16661770 group(new CSG());
16671771 } else
1668
- if (event.getSource() == templateItem)
1772
+ if (source == templateItem)
16691773 {
16701774 group(new cTemplate());
16711775 } else
1672
- if (event.getSource() == attributeItem)
1776
+ if (source == attributeItem)
16731777 {
16741778 makeSomething(new Attribute());
16751779 } else
1676
- if (event.getSource() == pointflowItem)
1780
+ if (source == pointflowItem)
16771781 {
16781782 makeSomething(new PointFlow());
16791783 } else
....@@ -1685,7 +1789,7 @@
16851789 } else
16861790 */
16871791
1688
- if (event.getSource() == superLoopItem)
1792
+ if (source == superLoopItem)
16891793 {
16901794 Composite g = new cGroup();
16911795 for (int i=0; i<15; i++)
....@@ -1707,7 +1811,7 @@
17071811
17081812 group(g);
17091813 } else
1710
- if (event.getSource() == loopItem)
1814
+ if (source == loopItem)
17111815 {
17121816 Composite csg = new GroupLeaf();
17131817 csg.count = 5;
....@@ -1716,7 +1820,7 @@
17161820 csg.addChild(child);
17171821 child.addChild(csg);
17181822 } else
1719
- if (event.getSource() == doubleItem)
1823
+ if (source == doubleItem)
17201824 {
17211825 Composite csg = new GroupLeaf();
17221826 csg.count = 5;
....@@ -1728,7 +1832,7 @@
17281832 csg.addChild(child);
17291833 child.addChild(csg);
17301834 } else
1731
- if (event.getSource() == tripleItem)
1835
+ if (source == tripleItem)
17321836 {
17331837 Composite csg = new GroupLeaf();
17341838 csg.count = 4;
....@@ -1744,70 +1848,83 @@
17441848 child.addChild(csg);
17451849 } else
17461850
1747
- if (event.getSource() == importGFDItem)
1851
+ if (source == importGFDItem)
17481852 {
17491853 ImportGFD();
17501854 } else
1751
- if (event.getSource() == importVRMLX3DItem)
1855
+ if (source == importVRMLX3DItem)
17521856 {
17531857 ImportVRMLX3D();
17541858 } else
1755
- if (event.getSource() == import3DSItem)
1859
+ if (source == import3DSItem)
17561860 {
17571861 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17581862 } else
1759
- if (event.getSource() == importOBJItem)
1863
+ if (source == importOBJItem)
17601864 {
1761
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1865
+ //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1866
+ FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD);
1867
+ browser.setVisible(true);
1868
+ String filename = browser.getFile();
1869
+ if (filename != null && filename.length() > 0)
1870
+ {
1871
+ String fullname = browser.getDirectory() + filename;
1872
+ makeSomething(ReadOBJ(fullname), true);
1873
+ }
17621874 } else
1763
- if (event.getSource() == computeAOItem)
1875
+ if (source == computeAOItem)
17641876 {
1765
- CameraPane.drawMode = CameraPane.OCCLUSION;
1766
- CameraPane.theRenderer.repaint();
1877
+ Globals.drawMode = CameraPane.OCCLUSION;
1878
+ Globals.theRenderer.repaint();
17671879 } else
1768
- if (event.getSource() == recompileItem)
1880
+ if (source == recompileItem)
17691881 {
17701882 Recompile();
17711883 refreshContents();
17721884 } else
1773
- if (event.getSource() == editScriptItem)
1885
+ if (source == editScriptItem)
17741886 {
17751887 OpenDialog();
17761888 refreshContents();
17771889 } else
1778
- if (event.getSource() == invariantsItem)
1890
+ if (source == invariantsItem)
17791891 {
17801892 System.out.println("Invariants:");
1781
- GraphreeD.theApplet3D.universe.invariants();
1893
+ GrafreeD.grafreeD.universe.invariants();
17821894 } else
1783
- if (event.getSource() == memoryItem)
1895
+ if (source == memoryItem)
17841896 {
17851897 //System.out.println("Invariants:");
17861898 PrintMemory();
17871899 } else
1788
- if (event.getSource() == pathItem)
1900
+ if (source == pathItem)
17891901 {
17901902 PrintPath();
17911903 } else
1792
- if (event.getSource() == analyzeItem)
1904
+ if (source == analyzeItem)
17931905 {
17941906 AnalyzeObject();
17951907 } else
1796
- if (event.getSource() == dumpItem)
1908
+ if (source == dumpItem)
17971909 {
17981910 DumpObject();
17991911 } else
1800
- if (event.getSource() == screenfitButton)
1912
+ if (source == oneStepButton)
1913
+ {
1914
+ Globals.ONESTEP = true;
1915
+ cameraView.repaint();
1916
+ } else
1917
+ if (source == screenfitButton)
18011918 {
18021919 //Reload(lastConverter, lastFilename, true);
18031920 ScreenFit();
18041921 } else
1805
- if (event.getSource() == screenfitpointButton)
1922
+ if (source == screenfitpointButton)
18061923 {
18071924 //Reload(lastConverter, lastFilename, true);
18081925 ScreenFitPoint();
18091926 } else
1810
- if (event.getSource() == snapobjectButton)
1927
+ if (source == snapobjectButton)
18111928 {
18121929 //Reload(lastConverter, lastFilename, true);
18131930 SnapObject();
....@@ -1818,13 +1935,13 @@
18181935 // Recompile();
18191936 // refreshContents();
18201937 // } else
1821
- if (event.getSource() == gcButton)
1938
+ if (source == gcButton)
18221939 {
18231940 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18241941 System.gc();
18251942 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18261943 } else
1827
- if (event.getSource() == editLeafItem)
1944
+ if (source == editLeafItem)
18281945 {
18291946 Object3D obj;
18301947 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1838,65 +1955,70 @@
18381955 }
18391956 refreshContents(true);
18401957 } else
1841
- if (event.getSource() == openWindowItem)
1958
+ if (source == openWindowItem)
18421959 {
18431960 EditSelection(true);
18441961 } else
1845
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1962
+ if (source == cutItem || source == clearButton)
18461963 {
18471964 loadClipboard(true);
18481965 } else
1849
- if (event.getSource() == duplicateItem)
1966
+ if (source == duplicateItem)
18501967 {
1851
- Object3D keep = GraphreeD.clipboard;
1968
+ Object3D keep = GrafreeD.clipboard;
18521969 loadClipboard(false);
18531970 paste(false);
1854
- GraphreeD.clipboard = keep;
1971
+ GrafreeD.clipboard = keep;
18551972 } else
1856
- if (event.getSource() == cloneItem)
1973
+ if (source == cloneItem)
18571974 {
18581975 CloneSelection(false);
18591976 } else
1860
- if (event.getSource() == cloneSupportItem)
1977
+ if (source == cloneSupportItem)
18611978 {
18621979 CloneSelection(true);
18631980 } else
1864
- if (event.getSource() == copyItem)
1981
+ if (source == copyItem)
18651982 {
18661983 loadClipboard(false);
18671984 } else
1868
- if (event.getSource() == pasteItem)
1985
+ if (source == pasteItem)
18691986 {
18701987 paste(false);
18711988 } else
1872
- if (event.getSource() == pasteLinkItem)
1989
+ if (source == pasteIntoItem)
18731990 {
1874
- pasteInto(false);
1991
+ pasteInto(true, false);
18751992 } else
1876
- if (event.getSource() == pasteCloneItem)
1993
+ if (source == pasteLinkItem)
18771994 {
1878
- pasteInto(true);
1995
+ pasteInto(false, false);
18791996 } else
1880
- if (event.getSource() == pasteExpandItem)
1997
+ if (source == pasteCloneItem)
1998
+ {
1999
+ pasteInto(true, true);
2000
+ } else
2001
+ if (source == pasteExpandItem)
18812002 {
18822003 paste(true);
18832004 } else
1884
- if (event.getSource() == synchronizeItem)
2005
+ if (source == synchronizeItem)
18852006 {
18862007 Overwrite(Object3D.TRANSFORM);
18872008 } else
1888
- if (event.getSource() == overwriteNameItem)
2009
+ if (source == overwriteNameItem)
18892010 {
18902011 Overwrite(Object3D.NAME);
18912012 } else
1892
- if (event.getSource() == overwriteUVItem)
2013
+ if (source == overwriteUVItem)
18932014 {
18942015 Overwrite(Object3D.UV);
18952016 } else
1896
- if (event.getSource() == overwriteMatItem)
2017
+ if (source == overwriteMatItem)
18972018 {
2019
+ /* july 2015
18982020 if ((dropAttributes & Object3D.TEXTURE) == 0)
1899
- Overwrite(Object3D.MATERIAL);
2021
+ Overwrite(Object3D.MATERIAL | Object3D.COLOR);
19002022 else
19012023 {
19022024 if ((dropAttributes & Object3D.COLOR) == 0 && (dropAttributes & Object3D.MATERIAL) == 0)
....@@ -1908,13 +2030,16 @@
19082030 Overwrite(Object3D.MATERIAL | Object3D.TEXTURE);
19092031 }
19102032 }
2033
+ */
2034
+
2035
+ Overwrite(dropAttributes);
19112036 }
1912
- if (event.getSource() == overwriteGeoItem)
2037
+ if (source == overwriteGeoItem)
19132038 {
19142039 Overwrite(Object3D.GEOMETRY);
1915
-// if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
2040
+// if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
19162041 // {
1917
-// Object3D content = GraphreeD.clipboard.get(0);
2042
+// Object3D content = GrafreeD.clipboard.get(0);
19182043 //
19192044 // if (content instanceof cGroup && ((cGroup)content).transientlink )
19202045 // content = ((cGroup)content).get(0);
....@@ -1926,7 +2051,7 @@
19262051 // refreshContents();
19272052 // }
19282053 } else
1929
- if (event.getSource() == generateMeshItem)
2054
+ if (source == generateMeshItem)
19302055 {
19312056 //if (group.selection.size() == 1)
19322057 // for (int i=0; i<group.selection.size(); i++)
....@@ -1937,7 +2062,7 @@
19372062 ResetModel();
19382063 refreshContents();
19392064 } else
1940
- if (event.getSource() == extractGeometriesItem)
2065
+ if (source == extractGeometriesItem)
19412066 {
19422067 boolean one = false;
19432068
....@@ -1964,7 +2089,7 @@
19642089 ResetModel();
19652090 refreshContents();
19662091 } else
1967
- if (event.getSource() == cloneGeometriesItem)
2092
+ if (source == cloneGeometriesItem)
19682093 {
19692094 boolean one = false;
19702095
....@@ -1990,32 +2115,37 @@
19902115 ResetModel();
19912116 refreshContents();
19922117 } else
1993
- if (event.getSource() == shareGeometriesItem)
2118
+ if (source == shareGeometriesItem)
19942119 {
19952120 boolean one = false;
19962121
19972122 if (group.selection.size() == 1)
19982123 one = true;
19992124
2125
+ Object3D merge = null;
2126
+
20002127 Object3D content = new cGroup();
20012128
20022129 for (int i=0; i<group.selection.size(); i++)
20032130 {
2004
- Object3D sel = new Merge(group.selection.get(i));
2131
+ merge = new Merge(group.selection.get(i));
20052132
20062133 if (one)
2007
- makeSomething(sel, false);
2134
+ makeSomething(merge, false);
20082135 else
2009
- content.addChild(sel);
2136
+ content.addChild(merge);
20102137 }
20112138
20122139 if (!one)
2013
- makeSomething(content, false);
2014
-
2015
- ResetModel();
2016
- refreshContents();
2140
+ makeSomething(content, true);
2141
+ else
2142
+ {
2143
+ ResetModel();
2144
+ Select(merge.GetTreePath(), true, false); // unselect... false);
2145
+ refreshContents();
2146
+ }
20172147 } else
2018
- if (event.getSource() == mergeGeometriesItem)
2148
+ if (source == mergeGeometriesItem)
20192149 {
20202150 boolean one = false;
20212151
....@@ -2045,11 +2175,11 @@
20452175 ResetModel();
20462176 refreshContents();
20472177 } else
2048
- if (event.getSource() == linkverticesItem)
2178
+ if (source == linkverticesItem)
20492179 {
2050
-// if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2180
+// if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20512181 // {
2052
-// Object3D content = GraphreeD.clipboard.get(0);
2182
+// Object3D content = GrafreeD.clipboard.get(0);
20532183 //
20542184 // if (content instanceof cGroup && ((cGroup)content).transientlink )
20552185 // content = ((cGroup)content).get(0);
....@@ -2058,39 +2188,48 @@
20582188 // group.selection.get(0).setMasterThis(content); // should be identity
20592189 // refreshContents();
20602190 // }
2061
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
2191
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
20622192 {
2063
- Object3D content = GraphreeD.clipboard.get(0);
2193
+ Object3D content = GrafreeD.clipboard.get(0);
20642194
20652195 if (content instanceof cGroup && ((cGroup)content).transientlink )
20662196 content = ((cGroup)content).get(0);
20672197
2068
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2198
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20692199 for (int i=0; i<group.selection.size(); i++)
20702200 {
2071
- boolean random = CameraPane.RANDOM;
2072
- CameraPane.RANDOM = false; // parse all random nodes
2201
+ boolean random = CameraPane.SWITCH;
2202
+ CameraPane.SWITCH = false; // parse all random nodes
20732203 group.selection.get(i).linkVerticesThis(content);
20742204 // group.selection.get(i).setMasterThis(content); // should be identity
2075
- CameraPane.RANDOM = random;
2205
+ CameraPane.SWITCH = random;
20762206 }
2077
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2207
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
20782208 refreshContents();
20792209 }
20802210 } else
2081
- if (event.getSource() == resetsupportItem)
2211
+ if (source == resetsupportItem)
20822212 {
20832213 for (int i=0; i<group.selection.size(); i++)
20842214 {
2085
- boolean random = CameraPane.RANDOM;
2086
- CameraPane.RANDOM = false; // parse all random nodes
2215
+ boolean random = CameraPane.SWITCH;
2216
+ CameraPane.SWITCH = false; // parse all random nodes
20872217 group.selection.get(i).linkVerticesThis(null);
2088
- CameraPane.RANDOM = random;
2218
+ CameraPane.SWITCH = random;
20892219 }
20902220
20912221 refreshContents();
20922222 } else
2093
- if (event.getSource() == resetreferencesItem)
2223
+ if (source == relinkverticesItem)
2224
+ {
2225
+ boolean random = CameraPane.SWITCH;
2226
+ CameraPane.SWITCH = false; // parse all random nodes
2227
+ group.selection.RelinkToSupport();
2228
+ CameraPane.SWITCH = random;
2229
+
2230
+ refreshContents();
2231
+ } else
2232
+ if (source == resetreferencesItem)
20942233 {
20952234 for (int i=0; i<group.selection.size(); i++)
20962235 {
....@@ -2099,11 +2238,11 @@
20992238
21002239 refreshContents();
21012240 } else
2102
- if (event.getSource() == setMasterItem)
2241
+ if (source == setMasterItem)
21032242 {
2104
- if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2243
+ if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21052244 {
2106
- Object3D content = GraphreeD.clipboard.get(0);
2245
+ Object3D content = GrafreeD.clipboard.get(0);
21072246
21082247 if (content instanceof cGroup && ((cGroup)content).transientlink )
21092248 content = ((cGroup)content).get(0);
....@@ -2112,13 +2251,13 @@
21122251 refreshContents();
21132252 }
21142253 } else
2115
- if (event.getSource() == poseMeshItem)
2254
+ if (source == poseMeshItem)
21162255 {
21172256 if (group.selection.size() == 1)
21182257 {
2119
- if (GraphreeD.clipboard.size() == 1)
2258
+ if (GrafreeD.clipboard.size() == 1)
21202259 {
2121
- Object3D content = GraphreeD.clipboard.get(0);
2260
+ Object3D content = GrafreeD.clipboard.get(0);
21222261
21232262 if (content instanceof cGroup && ((cGroup)content).transientlink )
21242263 content = ((cGroup)content).get(0);
....@@ -2131,19 +2270,19 @@
21312270 }
21322271
21332272 } else
2134
- if (event.getSource() == revertMeshItem)
2273
+ if (source == revertMeshItem)
21352274 {
21362275 RevertMeshes();
21372276 } else
2138
- if (event.getSource() == resetMeshItem)
2277
+ if (source == resetMeshItem)
21392278 {
21402279 ResetAll();
21412280 } else
2142
- if (event.getSource() == stepAllItem)
2281
+ if (source == stepAllItem)
21432282 {
21442283 StepAll();
21452284 } else
2146
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2285
+ if (source == clearItem) // || event.getSource() == clearButton)
21472286 {
21482287 //int indices[] = jList.getSelectedIndices();
21492288 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2151,42 +2290,46 @@
21512290
21522291 ClearSelection(false);
21532292 } else
2154
- if (event.getSource() == clearAllItem)
2293
+ if (source == clearAllItem)
21552294 {
21562295 ClearSelection(true);
21572296 } else
2158
- if (event.getSource() == grabItem)
2297
+ if (source == grabItem)
21592298 {
21602299 group(new cGroup(), true);
21612300 } else
2162
- if (event.getSource() == frontItem)
2301
+ if (source == hideItem)
2302
+ {
2303
+ group(new HiddenObject());
2304
+ } else
2305
+ if (source == frontItem)
21632306 {
21642307 front();
21652308 } else
2166
- if (event.getSource() == backItem)
2309
+ if (source == backItem)
21672310 {
21682311 back();
21692312 } else
2170
- if (event.getSource() == cameraItem)
2313
+ if (source == cameraItem)
21712314 {
21722315 makeSomething(new Camera());
21732316 } else
2174
- if (event.getSource() == compositeItem)
2317
+ if (source == compositeItem)
21752318 {
21762319 group(new Composite());
21772320 } else
2178
- if (event.getSource() == randomItem)
2321
+ if (source == randomItem)
21792322 {
21802323 RandomNode random = new RandomNode();
21812324 group(random);
21822325 if (random.size() > 0)
2183
- random.name = random.get(0).name + "Rnd";
2326
+ random.name = random.get(0).name + "Switch";
21842327 } else
2185
- if (event.getSource() == physicsItem)
2328
+ if (source == physicsItem)
21862329 {
21872330 group(new PhysicsNode());
21882331 } else
2189
- if (event.getSource() == frameselectorItem)
2332
+ if (source == frameselectorItem)
21902333 {
21912334 for (int i=0; i<group.selection.size(); i++)
21922335 {
....@@ -2198,7 +2341,7 @@
21982341 ResetModel();
21992342 refreshContents();
22002343 } else
2201
- if (event.getSource() == switchGeoItem)
2344
+ if (source == switchGeoItem)
22022345 {
22032346 for (int i=0; i<group.selection.size(); i++)
22042347 {
....@@ -2210,7 +2353,7 @@
22102353 ResetModel();
22112354 refreshContents();
22122355 } else
2213
- if (event.getSource() == switchTransfoItem)
2356
+ if (source == switchTransfoItem)
22142357 {
22152358 for (int i=0; i<group.selection.size(); i++)
22162359 {
....@@ -2222,7 +2365,7 @@
22222365 ResetModel();
22232366 refreshContents();
22242367 } else
2225
- if (event.getSource() == morphItem)
2368
+ if (source == morphItem)
22262369 {
22272370 for (int i=0; i<group.selection.size(); i++)
22282371 {
....@@ -2234,7 +2377,7 @@
22342377 ResetModel();
22352378 refreshContents();
22362379 } else
2237
- if (event.getSource() == scriptNodeItem)
2380
+ if (source == scriptNodeItem)
22382381 {
22392382 boolean atleastone = false;
22402383
....@@ -2273,195 +2416,215 @@
22732416 }
22742417 }
22752418 } else
2276
- if (event.getSource() == linkerItem)
2419
+ if (source == linkerItem)
22772420 {
22782421 group(new cLinker());
22792422 } else
2280
- if (event.getSource() == textureItem)
2423
+ if (source == textureItem)
22812424 {
22822425 group(new TextureNode());
22832426 } else
2284
- if (event.getSource() == shadowXItem)
2427
+ if (source == billboardItem)
2428
+ {
2429
+ group(new BillboardNode());
2430
+ } else
2431
+ if (source == shadowXItem)
22852432 {
22862433 CastShadow(0);
22872434 } else
2288
- if (event.getSource() == shadowYItem)
2435
+ if (source == shadowYItem)
22892436 {
22902437 CastShadow(1);
22912438 } else
2292
- if (event.getSource() == shadowZItem)
2439
+ if (source == shadowZItem)
22932440 {
22942441 CastShadow(2);
22952442 } else
2296
- if (event.getSource() == ungroupItem)
2443
+ if (source == ungroupItem)
22972444 {
2298
- ungroup();
2445
+ //ungroup();
2446
+ for (int i=0; i<group.selection.size(); i++)
2447
+ {
2448
+ Ungroup(group.selection.get(i));
2449
+ }
2450
+
2451
+ ClearSelection(false);
2452
+
2453
+ refreshContents();
22992454 } else
2300
- if (event.getSource() == genUVItem)
2455
+ if (source == genUVItem)
23012456 {
23022457 GenUV();
23032458 } else
2304
- if (event.getSource() == genNormalsCADItem)
2459
+ if (source == genNormalsCADItem)
23052460 {
23062461 GenNormals(true);
23072462 } else
2308
- if (event.getSource() == genNormalsORGANItem)
2463
+ if (source == genNormalsMESHItem)
2464
+ {
2465
+ GenNormals(true); // TODO
2466
+ } else
2467
+ if (source == genNormalsORGANItem)
23092468 {
23102469 GenNormals(false);
23112470 } else
2312
- if (event.getSource() == stripifyItem)
2471
+ if (source == genNormalsMINEItem)
2472
+ {
2473
+ GenNormalsMINE();
2474
+ } else
2475
+ if (source == stripifyItem)
23132476 {
23142477 Stripify();
23152478 } else
2316
- if (event.getSource() == unstripifyItem)
2479
+ if (source == unstripifyItem)
23172480 {
23182481 Unstripify();
23192482 } else
2320
- if (event.getSource() == trimItem)
2483
+ if (source == trimItem)
23212484 {
23222485 Trim();
23232486 } else
2324
- if (event.getSource() == untrimItem)
2487
+ if (source == untrimItem)
23252488 {
23262489 Untrim();
23272490 } else
2328
- if (event.getSource() == clearColorsItem)
2491
+ if (source == clearColorsItem)
23292492 {
23302493 ClearColors();
23312494 } else
2332
- if (event.getSource() == clearMaterialsItem)
2495
+ if (source == clearMaterialsItem)
23332496 {
23342497 ClearMaterials();
23352498 } else
2336
- if (event.getSource() == liveleavesItem)
2499
+ if (source == liveleavesItem)
23372500 {
23382501 LiveLeaves(true);
23392502 } else
2340
- if (event.getSource() == unliveleavesItem)
2503
+ if (source == unliveleavesItem)
23412504 {
23422505 LiveLeaves(false);
23432506 } else
2344
- if (event.getSource() == supportleavesItem)
2507
+ if (source == supportleavesItem)
23452508 {
23462509 SupportLeaves(true);
23472510 } else
2348
- if (event.getSource() == unsupportleavesItem)
2511
+ if (source == unsupportleavesItem)
23492512 {
23502513 SupportLeaves(false);
23512514 } else
2352
- if (event.getSource() == hideleavesItem)
2515
+ if (source == hideleavesItem)
23532516 {
23542517 HideLeaves(true);
23552518 } else
2356
- if (event.getSource() == showleavesItem)
2519
+ if (source == showleavesItem)
23572520 {
23582521 HideLeaves(false);
23592522 } else
2360
- if (event.getSource() == markleavesItem)
2523
+ if (source == markleavesItem)
23612524 {
23622525 MarkLeaves(true);
23632526 } else
2364
- if (event.getSource() == unmarkleavesItem)
2527
+ if (source == unmarkleavesItem)
23652528 {
23662529 MarkLeaves(false);
23672530 } else
2368
- if (event.getSource() == flipVItem)
2531
+ if (source == flipVItem)
23692532 {
23702533 FlipV(true);
23712534 } else
2372
- if (event.getSource() == unflipVItem)
2535
+ if (source == unflipVItem)
23732536 {
23742537 FlipV(false);
23752538 } else
2376
- if (event.getSource() == lowTexturesItem)
2539
+ if (source == lowTexturesItem)
23772540 {
23782541 SetTexRes(0);
23792542 } else
2380
- if (event.getSource() == normalTexturesItem)
2543
+ if (source == normalTexturesItem)
23812544 {
23822545 SetTexRes(1);
23832546 } else
2384
- if (event.getSource() == highTexturesItem)
2547
+ if (source == highTexturesItem)
23852548 {
23862549 SetTexRes(2);
23872550 } else
2388
- if (event.getSource() == veryhighTexturesItem)
2551
+ if (source == veryhighTexturesItem)
23892552 {
23902553 SetTexRes(3);
23912554 } else
2392
- if (event.getSource() == maxTexturesItem)
2555
+ if (source == maxTexturesItem)
23932556 {
23942557 SetTexRes(4);
23952558 } else
2396
- if (event.getSource() == panoTexturesItem)
2559
+ if (source == panoTexturesItem)
23972560 {
23982561 SetTexRes(5);
23992562 } else
2400
- if (event.getSource() == reverseNormalsItem)
2563
+ if (source == reverseNormalsItem)
24012564 {
24022565 ReverseNormals();
24032566 } else
2404
- if (event.getSource() == parseverticesItem)
2567
+ if (source == parseverticesItem)
24052568 {
24062569 ParseVertices();
24072570 } else
2408
- if (event.getSource() == textureFieldItem)
2571
+ if (source == textureFieldItem)
24092572 {
24102573 TextureVertices();
24112574 } else
2412
- if (event.getSource() == alignItem)
2575
+ if (source == alignItem)
24132576 {
24142577 Align();
24152578 } else
2416
- if (event.getSource() == mirrorItem)
2579
+ if (source == mirrorItem)
24172580 {
24182581 MirrorPoses();
24192582 } else
2420
- if (event.getSource() == reduceMorphItem)
2583
+ if (source == reduceMorphItem)
24212584 {
24222585 MeshReduction(false);
24232586 } else
2424
- if (event.getSource() == reduce34MorphItem)
2587
+ if (source == reduce34MorphItem)
24252588 {
24262589 MeshReduction(true);
24272590 } else
2428
- if (event.getSource() == reverseTrianglesItem)
2591
+ if (source == reverseTrianglesItem)
24292592 {
24302593 ReverseTriangles();
24312594 } else
2432
- if (event.getSource() == reduceMeshItem)
2595
+ if (source == reduceMeshItem)
24332596 {
24342597 ReduceMesh(false);
24352598 } else
2436
- if (event.getSource() == reduce34MeshItem)
2599
+ if (source == reduce34MeshItem)
24372600 {
24382601 ReduceMesh(true);
24392602 } else
2440
- if (event.getSource() == increaseMeshItem)
2603
+ if (source == increaseMeshItem)
24412604 {
24422605 IncreaseMesh();
24432606 } else
2444
- if (event.getSource() == clipMeshItem)
2607
+ if (source == clipMeshItem)
24452608 {
24462609 ClipMesh();
24472610 } else
2448
- if (event.getSource() == smoothMeshItem)
2611
+ if (source == smoothMeshItem)
24492612 {
24502613 SmoothMesh();
24512614 } else
2452
- if (event.getSource() == transformgeometryItem)
2615
+ if (source == transformgeometryItem)
24532616 {
24542617 TransformGeometry();
24552618 } else
2456
- if (event.getSource() == resetTransformItem)
2619
+ if (source == resetTransformItem)
24572620 {
24582621 ResetTransform();
24592622 } else
2460
- if (event.getSource() == resetCentroidItem)
2623
+ if (source == resetCentroidItem)
24612624 {
24622625 ResetCentroid();
24632626 } else
2464
- if (event.getSource() == resetParentItem)
2627
+ if (source == resetParentItem)
24652628 {
24662629 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24672630 {
....@@ -2471,7 +2634,7 @@
24712634
24722635 refreshContents();
24732636 } else
2474
- if (event.getSource() == repairParentItem)
2637
+ if (source == repairParentItem)
24752638 {
24762639 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24772640 {
....@@ -2485,7 +2648,21 @@
24852648
24862649 refreshContents();
24872650 } else
2488
- if (event.getSource() == sortbysizeItem)
2651
+ if (source == repairShadowItem)
2652
+ {
2653
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2654
+ {
2655
+ Object3D obj = (Object3D)e.nextElement();
2656
+ obj.RepairShadow();
2657
+// for (int i=0; i<obj.size(); i++)
2658
+// {
2659
+// obj.get(i).parent = obj;
2660
+// }
2661
+ }
2662
+
2663
+ refreshContents();
2664
+ } else
2665
+ if (source == sortbysizeItem)
24892666 {
24902667 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24912668 {
....@@ -2497,7 +2674,7 @@
24972674 ResetModel();
24982675 refreshContents();
24992676 } else
2500
- if (event.getSource() == sortbynameItem)
2677
+ if (source == sortbynameItem)
25012678 {
25022679 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25032680 {
....@@ -2509,7 +2686,7 @@
25092686 ResetModel();
25102687 refreshContents();
25112688 } else
2512
- if (event.getSource() == attachPigmentItem)
2689
+ if (source == attachPigmentItem)
25132690 {
25142691 String texture = GetFile("Attach pigment");
25152692 Object3D obj;
....@@ -2521,7 +2698,7 @@
25212698
25222699 refreshContents();
25232700 } else
2524
- if (event.getSource() == detachPigmentItem)
2701
+ if (source == detachPigmentItem)
25252702 {
25262703 Object3D obj;
25272704 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2532,7 +2709,7 @@
25322709
25332710 refreshContents();
25342711 } else
2535
- if (event.getSource() == attachBumpItem)
2712
+ if (source == attachBumpItem)
25362713 {
25372714 String texture = GetFile("Attach bump");
25382715 Object3D obj;
....@@ -2544,7 +2721,7 @@
25442721
25452722 refreshContents();
25462723 } else
2547
- if (event.getSource() == detachBumpItem)
2724
+ if (source == detachBumpItem)
25482725 {
25492726 Object3D obj;
25502727 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2555,7 +2732,7 @@
25552732
25562733 refreshContents();
25572734 } else
2558
- if (event.getSource() == pigmentBumpItem)
2735
+ if (source == pigmentBumpItem)
25592736 {
25602737 Object3D obj;
25612738 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2566,158 +2743,195 @@
25662743
25672744 refreshContents();
25682745 } else
2569
- if (event.getSource() == flashSelectionButton)
2746
+ if (source == flashSelectionButton)
25702747 {
25712748 CameraPane.flash = true;
25722749 refreshContents();
25732750 } else
2574
- if (event.getSource() == oneButton)
2751
+ if (source == oneButton)
25752752 {
25762753 } else
2577
- if (event.getSource() == twoButton)
2754
+ if (source == twoButton)
25782755 {
25792756 radio.layout = twoButton;
25802757 // bug
25812758 //gridPanel.setDividerLocation(1.0);
25822759 //bigPanel.setDividerLocation(0.0);
2583
- bigThree.remove(jtp);
2584
- bigThree.remove(cameraPanel);
2585
- bigThree.remove(XYZPanel);
2586
- aWindowConstraints.gridx = 0;
2587
- aWindowConstraints.gridy = 0;
2588
- aWindowConstraints.gridwidth = 1;
2589
- // aConstraints.gridheight = 3;
2590
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2591
- aWindowConstraints.weightx = 0;
2592
- aWindowConstraints.weighty = 1;
2593
- //bigThree.add(jtp, aWindowConstraints);
2594
- aWindowConstraints.weightx = 1;
2595
- aWindowConstraints.gridwidth = 3;
2596
- // aConstraints.gridheight = 3;
2597
- aWindowConstraints.gridx = 1;
2598
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2599
- bigThree.add(cameraPanel, aWindowConstraints);
2600
- aWindowConstraints.weightx = 0;
2601
- aWindowConstraints.gridx = 4;
2602
- aWindowConstraints.gridwidth = 1;
2603
- // aConstraints.gridheight = 3;
2604
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2605
- //bigThree.add(XYZPanel, aWindowConstraints);
2606
- bigThree.revalidate();
2760
+// bigThree.remove(scenePanel);
2761
+// bigThree.remove(centralPanel);
2762
+// bigThree.remove(XYZPanel);
2763
+// aWindowConstraints.gridx = 0;
2764
+// aWindowConstraints.gridy = 0;
2765
+// aWindowConstraints.gridwidth = 1;
2766
+// // aConstraints.gridheight = 3;
2767
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2768
+// aWindowConstraints.weightx = 0;
2769
+// aWindowConstraints.weighty = 1;
2770
+// //bigThree.add(jtp, aWindowConstraints);
2771
+// aWindowConstraints.weightx = 1;
2772
+// aWindowConstraints.gridwidth = 3;
2773
+// // aConstraints.gridheight = 3;
2774
+// aWindowConstraints.gridx = 1;
2775
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2776
+// bigThree.add(centralPanel, aWindowConstraints);
2777
+// aWindowConstraints.weightx = 0;
2778
+// aWindowConstraints.gridx = 4;
2779
+// aWindowConstraints.gridwidth = 1;
2780
+// // aConstraints.gridheight = 3;
2781
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2782
+// //bigThree.add(XYZPanel, aWindowConstraints);
2783
+// scenePanel.setVisible(false);
2784
+// centralPanel.setVisible(true);
2785
+// XYZPanel.setVisible(false);
2786
+ bigThree.ClearUI();
2787
+ bigThree.add(centralPanel);
2788
+ bigThree.FlushUI();
26072789 } else
2608
- if (event.getSource() == threeButton)
2790
+ if (source == threeButton)
26092791 {
26102792 radio.layout = threeButton;
2611
- bigThree.remove(jtp);
2612
- bigThree.remove(cameraPanel);
2613
- bigThree.remove(XYZPanel);
2614
- aWindowConstraints.gridx = 0;
2615
- aWindowConstraints.gridy = 0;
2616
- aWindowConstraints.gridwidth = 1;
2617
- // aConstraints.gridheight = 3;
2618
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2619
- aWindowConstraints.weightx = 0;
2620
- aWindowConstraints.weighty = 1;
2621
- //bigThree.add(jtp, aWindowConstraints);
2622
- aWindowConstraints.weightx = 1;
2623
- aWindowConstraints.gridwidth = 3;
2624
- // aConstraints.gridheight = 3;
2625
- aWindowConstraints.gridx = 1;
2626
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2627
- bigThree.add(cameraPanel, aWindowConstraints);
2628
- aWindowConstraints.weightx = 0;
2629
- aWindowConstraints.gridx = 4;
2630
- aWindowConstraints.gridwidth = 1;
2631
- // aConstraints.gridheight = 3;
2632
- aConstraints.fill = GridBagConstraints.VERTICAL;
2633
- bigThree.add(XYZPanel, aWindowConstraints);
2634
- bigThree.revalidate();
2793
+
2794
+// bigThree.remove(scenePanel);
2795
+// bigThree.remove(centralPanel);
2796
+// bigThree.remove(XYZPanel);
2797
+// aWindowConstraints.gridx = 0;
2798
+// aWindowConstraints.gridy = 0;
2799
+// aWindowConstraints.gridwidth = 1;
2800
+// // aConstraints.gridheight = 3;
2801
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2802
+// aWindowConstraints.weightx = 0;
2803
+// aWindowConstraints.weighty = 1;
2804
+// //bigThree.add(jtp, aWindowConstraints);
2805
+// aWindowConstraints.weightx = 1;
2806
+// aWindowConstraints.gridwidth = 3;
2807
+// // aConstraints.gridheight = 3;
2808
+// aWindowConstraints.gridx = 1;
2809
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2810
+// bigThree.add(centralPanel, aWindowConstraints);
2811
+// aWindowConstraints.weightx = 0;
2812
+// aWindowConstraints.gridx = 4;
2813
+// aWindowConstraints.gridwidth = 1;
2814
+// // aConstraints.gridheight = 3;
2815
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2816
+// bigThree.add(XYZPanel, aWindowConstraints);
2817
+// bigThree.validate();
2818
+// scenePanel.setVisible(false);
2819
+// centralPanel.setVisible(true);
2820
+// XYZPanel.setVisible(true);
2821
+ bigThree.ClearUI();
2822
+ bigThree.add(centralPanel);
2823
+ bigThree.add(XYZPanel);
2824
+ bigThree.FlushUI();
26352825 } else
2636
- if (event.getSource() == fourButton)
2826
+ if (source == fourButton)
26372827 {
26382828 radio.layout = fourButton;
2639
- bigThree.remove(jtp);
2640
- bigThree.remove(cameraPanel);
2641
- bigThree.remove(XYZPanel);
2642
- aWindowConstraints.gridx = 0;
2643
- aWindowConstraints.gridy = 0;
2644
- aWindowConstraints.gridwidth = 1;
2645
- // aWindowConstraints.gridheight = 3;
2646
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2647
- aWindowConstraints.weightx = 1;
2648
- aWindowConstraints.weighty = 1;
2649
- bigThree.add(jtp, aWindowConstraints);
2650
- aWindowConstraints.weightx = 1;
2651
- aWindowConstraints.gridwidth = 3;
2652
- // aConstraints.gridheight = 3;
2653
- aWindowConstraints.gridx = 1;
2654
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2655
- //bigThree.add(cameraPanel, aWindowConstraints);
2656
- aWindowConstraints.weightx = 0;
2657
- aWindowConstraints.gridx = 4;
2658
- aWindowConstraints.gridwidth = 1;
2659
- // aWindowConstraints.gridheight = 3;
2660
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2661
- //bigThree.add(XYZPanel, aWindowConstraints);
2662
- bigThree.revalidate();
2829
+
2830
+// bigThree.remove(scenePanel);
2831
+// bigThree.remove(centralPanel);
2832
+// bigThree.remove(XYZPanel);
2833
+// aWindowConstraints.gridx = 0;
2834
+// aWindowConstraints.gridy = 0;
2835
+// aWindowConstraints.gridwidth = 1;
2836
+// // aWindowConstraints.gridheight = 3;
2837
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2838
+// aWindowConstraints.weightx = 1;
2839
+// aWindowConstraints.weighty = 1;
2840
+// bigThree.add(scenePanel, aWindowConstraints);
2841
+// aWindowConstraints.weightx = 1;
2842
+// aWindowConstraints.gridwidth = 3;
2843
+// // aConstraints.gridheight = 3;
2844
+// aWindowConstraints.gridx = 1;
2845
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2846
+// //bigThree.add(cameraPanel, aWindowConstraints);
2847
+// aWindowConstraints.weightx = 0;
2848
+// aWindowConstraints.gridx = 4;
2849
+// aWindowConstraints.gridwidth = 1;
2850
+// // aWindowConstraints.gridheight = 3;
2851
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2852
+// //bigThree.add(XYZPanel, aWindowConstraints);
2853
+// bigThree.validate();
2854
+// scenePanel.setVisible(true);
2855
+// centralPanel.setVisible(false);
2856
+// XYZPanel.setVisible(false);
2857
+ bigThree.ClearUI();
2858
+ bigThree.add(scenePanel);
2859
+ bigThree.FlushUI();
26632860 } else
2664
- if (event.getSource() == sixButton)
2861
+ if (source == sixButton)
26652862 {
26662863 radio.layout = sixButton;
2667
- bigThree.remove(jtp);
2668
- bigThree.remove(cameraPanel);
2669
- bigThree.remove(XYZPanel);
2670
- aWindowConstraints.gridx = 0;
2671
- aWindowConstraints.gridy = 0;
2672
- aWindowConstraints.gridwidth = 1;
2673
- // aConstraints.gridheight = 3;
2674
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2675
- aWindowConstraints.weightx = 0;
2676
- aWindowConstraints.weighty = 1;
2677
- bigThree.add(jtp, aWindowConstraints);
2678
- aWindowConstraints.weightx = 1;
2679
- aWindowConstraints.gridwidth = 3;
2680
- // aWindowConstraints.gridheight = 3;
2681
- aWindowConstraints.gridx = 1;
2682
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2683
- bigThree.add(cameraPanel, aWindowConstraints);
2684
- aWindowConstraints.weightx = 0;
2685
- aWindowConstraints.gridx = 4;
2686
- aWindowConstraints.gridwidth = 1;
2687
- // aWindowConstraints.gridheight = 3;
2688
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2689
- //bigThree.add(XYZPanel, aConstraints);
2690
- bigThree.revalidate();
2864
+
2865
+// bigThree.remove(scenePanel);
2866
+// bigThree.remove(centralPanel);
2867
+// bigThree.remove(XYZPanel);
2868
+// aWindowConstraints.gridx = 0;
2869
+// aWindowConstraints.gridy = 0;
2870
+// aWindowConstraints.gridwidth = 1;
2871
+// // aConstraints.gridheight = 3;
2872
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2873
+// aWindowConstraints.weightx = 0;
2874
+// aWindowConstraints.weighty = 1;
2875
+// bigThree.add(scenePanel, aWindowConstraints);
2876
+// aWindowConstraints.weightx = 1;
2877
+// aWindowConstraints.gridwidth = 3;
2878
+// // aWindowConstraints.gridheight = 3;
2879
+// aWindowConstraints.gridx = 1;
2880
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2881
+// bigThree.add(centralPanel, aWindowConstraints);
2882
+// aWindowConstraints.weightx = 0;
2883
+// aWindowConstraints.gridx = 4;
2884
+// aWindowConstraints.gridwidth = 1;
2885
+// // aWindowConstraints.gridheight = 3;
2886
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2887
+// //bigThree.add(XYZPanel, aConstraints);
2888
+// bigThree.validate();
2889
+// scenePanel.setVisible(true);
2890
+// centralPanel.setVisible(true);
2891
+// XYZPanel.setVisible(false);
2892
+ bigThree.ClearUI();
2893
+ bigThree.add(scenePanel);
2894
+ bigThree.add(centralPanel);
2895
+ bigThree.FlushUI();
26912896 } else
2692
- if (event.getSource() == sevenButton)
2897
+ if (source == sevenButton)
26932898 {
26942899 radio.layout = sevenButton;
2695
- bigThree.remove(jtp);
2696
- bigThree.remove(cameraPanel);
2697
- bigThree.remove(XYZPanel);
2698
- aWindowConstraints.gridx = 0;
2699
- aWindowConstraints.gridy = 0;
2700
- aWindowConstraints.gridwidth = 1;
2701
- // aWindowConstraints.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
- // aWindowConstraints.gridheight = 3;
2709
- aWindowConstraints.gridx = 1;
2710
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2711
- bigThree.add(cameraPanel, 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();
2900
+
2901
+// bigThree.remove(scenePanel);
2902
+// bigThree.remove(centralPanel);
2903
+// bigThree.remove(XYZPanel);
2904
+// aWindowConstraints.gridx = 0;
2905
+// aWindowConstraints.gridy = 0;
2906
+// aWindowConstraints.gridwidth = 1;
2907
+// // aWindowConstraints.gridheight = 3;
2908
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2909
+// aWindowConstraints.weightx = 0;
2910
+// aWindowConstraints.weighty = 1;
2911
+// bigThree.add(scenePanel, aWindowConstraints);
2912
+// aWindowConstraints.weightx = 1;
2913
+// aWindowConstraints.gridwidth = 3;
2914
+// // aWindowConstraints.gridheight = 3;
2915
+// aWindowConstraints.gridx = 1;
2916
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2917
+// bigThree.add(centralPanel, aWindowConstraints);
2918
+// aWindowConstraints.weightx = 0;
2919
+// aWindowConstraints.gridx = 4;
2920
+// aWindowConstraints.gridwidth = 1;
2921
+// // aConstraints.gridheight = 3;
2922
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2923
+// bigThree.add(XYZPanel, aWindowConstraints);
2924
+// bigThree.validate();
2925
+// scenePanel.setVisible(true);
2926
+// centralPanel.setVisible(true);
2927
+// XYZPanel.setVisible(true);
2928
+ bigThree.ClearUI();
2929
+ bigThree.add(scenePanel);
2930
+ bigThree.add(centralPanel);
2931
+ bigThree.add(XYZPanel);
2932
+ bigThree.FlushUI();
27192933 } else
2720
- if (event.getSource() == rootButton)
2934
+ if (source == rootButton)
27212935 {
27222936 Object3D obj;
27232937 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2729,7 +2943,7 @@
27292943
27302944 refreshContents(true);
27312945 } else
2732
- if (event.getSource() == closeButton)
2946
+ if (source == closeButton)
27332947 {
27342948 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27352949 cRadio ab;
....@@ -2750,11 +2964,11 @@
27502964 }
27512965 refreshContents(true);
27522966 } else
2753
- if (event.getSource() == editItem || event.getSource() == editButton)
2967
+ if (source == editItem || source == editButton)
27542968 {
27552969 EditSelection(false);
27562970 } else
2757
- if (event.getSource() == uneditButton)
2971
+ if (source == uneditButton)
27582972 {
27592973 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
27602974 {
....@@ -2766,12 +2980,12 @@
27662980
27672981 child.editWindow = null; // ???????????
27682982 }
2769
- objEditor.ctrlPanel.revalidate();
2983
+ objEditor.ctrlPanel.FlushUI();
27702984 //objEditor.jTree.clearSelection();
27712985 //objEditor.ResetSliders();
27722986 refreshContents(true);
27732987 } else
2774
- if (event.getSource() == clearPanelButton)
2988
+ if (source == clearPanelButton)
27752989 {
27762990 assert(copy == group);
27772991 //copy.ClearUI();
....@@ -2782,7 +2996,7 @@
27822996 listUI.clear();
27832997 refreshContents(true);
27842998 } else
2785
- if (event.getSource() == allParamsButton)
2999
+ if (source == allParamsButton)
27863000 {
27873001 assert(copy == group);
27883002
....@@ -2803,19 +3017,19 @@
28033017
28043018 refreshContents(true);
28053019 } else
2806
- if (event.getSource() == unselectButton)
3020
+ if (source == unselectButton)
28073021 {
28083022 objEditor.jTree.clearSelection();
2809
- // ?? oct 2012 GraphreeD.clipboard.clear();
3023
+ // ?? oct 2012 GrafreeD.clipboard.clear();
28103024 objEditor.ResetSliders();
28113025 refreshContents(true);
28123026 } else
2813
- if(event.getSource() instanceof cRadio)
3027
+ if(source instanceof cRadio)
28143028 {
28153029 group.parent = keepparent;
28163030 group.attributes = 0;
28173031 //group.editWindow = null;
2818
- /*cRadio*/ radio = (cRadio)event.getSource();
3032
+ /*cRadio*/ radio = (cRadio)source;
28193033 Object3D obj = radio.GetObject();
28203034 System.out.println("Edit " + obj);
28213035 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2835,7 +3049,7 @@
28353049 }
28363050
28373051 copy = group;
2838
- //CameraPane.theRenderer.object = group;
3052
+ //Globals.theRenderer.object = group;
28393053 if(!useclient)
28403054 {
28413055 cameraView.renderCamera = radio.camera;
....@@ -2844,7 +3058,8 @@
28443058 cameraView.cameras[cameraView.cameracount] = radio.camera;
28453059 cameraView.targetLookAt.set(radio.camera.lookAt);
28463060 cameraView.object = group;
2847
- cameraView.lighttouched = true;
3061
+ //cameraView.lighttouched = true;
3062
+ Globals.lighttouched = true;
28483063 topView.object = group;
28493064 frontView.object = group;
28503065 sideView.object = group;
....@@ -2880,7 +3095,7 @@
28803095 if (useclient)
28813096 {
28823097 cameraView.object = client;
2883
- cameraView.lighttouched = true;
3098
+ Globals.lighttouched = true;
28843099 //topView.object = client;
28853100 //frontView.object = client;
28863101 //sideView.object = client;
....@@ -2888,7 +3103,7 @@
28883103 else
28893104 {
28903105 cameraView.object = group;
2891
- cameraView.lighttouched = true;
3106
+ Globals.lighttouched = true;
28923107 //topView.object = group;
28933108 //frontView.object = group;
28943109 //sideView.object = group;
....@@ -3121,9 +3336,9 @@
31213336 obj = (Object3D)e.nextElement();
31223337
31233338 System.out.println("Object is: " + obj);
3124
- GraphreeD.AnalyzeObject(obj);
3339
+ GrafreeD.AnalyzeObject(obj);
31253340 System.out.println("Boundary rep: " + obj.bRep);
3126
- GraphreeD.AnalyzeObject(obj.bRep);
3341
+ GrafreeD.AnalyzeObject(obj.bRep);
31273342
31283343 // System.err.println((size/1024) + " KB is the size of " + obj);
31293344 }
....@@ -3165,6 +3380,13 @@
31653380 void GenNormals(boolean crease)
31663381 {
31673382 group.GenNormalsS(crease);
3383
+
3384
+ refreshContents();
3385
+ }
3386
+
3387
+ void GenNormalsMINE()
3388
+ {
3389
+ group.selection.GenNormalsMINE();
31683390
31693391 refreshContents();
31703392 }
....@@ -3250,7 +3472,7 @@
32503472 // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
32513473 // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
32523474 //
3253
-// g.add(GraphreeD.clipboard);
3475
+// g.add(GrafreeD.clipboard);
32543476 //
32553477 // buffer.add(g);
32563478 // }
....@@ -3269,8 +3491,8 @@
32693491 // nodes = new Object3D();
32703492 // vertices = new Vector<Vertex>();
32713493 //
3272
-// boolean epsequal = GraphreeD.epsequal;
3273
-// GraphreeD.epsequal = true;
3494
+// boolean epsequal = GrafreeD.epsequal;
3495
+// GrafreeD.epsequal = true;
32743496 //
32753497 // for (int i=0; i<group.selection.size(); i++)
32763498 // {
....@@ -3311,7 +3533,7 @@
33113533 // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33123534 // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33133535 //
3314
-// g.add(GraphreeD.clipboard);
3536
+// g.add(GrafreeD.clipboard);
33153537 //
33163538 // buffer.add(g);
33173539 // }
....@@ -3319,7 +3541,7 @@
33193541 // makeSomething(buffer, i==group.selection.size()-1);
33203542 // }
33213543 //
3322
-// GraphreeD.epsequal = epsequal;
3544
+// GrafreeD.epsequal = epsequal;
33233545 //
33243546 // //buffer = null;
33253547 // temprep = null;
....@@ -3330,8 +3552,8 @@
33303552
33313553 void ParseVertices()
33323554 {
3333
- boolean epsequal = GraphreeD.epsequal;
3334
- GraphreeD.epsequal = true;
3555
+ boolean epsequal = GrafreeD.epsequal;
3556
+ GrafreeD.epsequal = true;
33353557
33363558 for (int i=0; i<group.selection.size(); i++)
33373559 {
....@@ -3356,7 +3578,7 @@
33563578 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33573579 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33583580
3359
- g.add(GraphreeD.clipboard);
3581
+ g.add(GrafreeD.clipboard);
33603582
33613583 buffer.add(g);
33623584 }
....@@ -3371,7 +3593,7 @@
33713593 makeSomething(buffer, i==group.selection.size()-1);
33723594 }
33733595
3374
- GraphreeD.epsequal = epsequal;
3596
+ GrafreeD.epsequal = epsequal;
33753597
33763598 refreshContents();
33773599 }
....@@ -3389,7 +3611,7 @@
33893611 String pigment = Object3D.GetPigment(tex);
33903612 //String bump = Object3D.GetBump(tex);
33913613
3392
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3614
+ com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
33933615
33943616 double s = v.s;
33953617
....@@ -3416,7 +3638,7 @@
34163638 scale /= 3;
34173639
34183640 scale /= 0xFF;
3419
- scale /= 4;
3641
+ // c'est quoi ca? scale /= 4;
34203642
34213643 //v.AO = scale;
34223644
....@@ -3437,12 +3659,26 @@
34373659
34383660 void Align()
34393661 {
3662
+ if (group.selection.size() == 0)
3663
+ return;
3664
+
3665
+ cVector bbmin = new cVector();
3666
+ cVector bbmax = new cVector();
3667
+
3668
+ group.selection.get(0).getBounds(bbmin, bbmax, true);
3669
+
3670
+ double dx = bbmax.x - bbmin.x;
3671
+ double dy = bbmax.y - bbmin.y;
3672
+ double dz = bbmax.z - bbmin.z;
3673
+
3674
+ double scale = Math.sqrt(dx*dx + dy*dy + dz*dz);
3675
+
34403676 for (int i=0; i<group.selection.size(); i++)
34413677 {
34423678 Object3D obj = group.selection.get(i);
34433679
3444
- LA.matTranslate(obj.toParent, i/2f, 0, 0);
3445
- LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0);
3680
+ LA.matTranslate(obj.toParent, i * scale, 0, 0);
3681
+ LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0);
34463682 }
34473683
34483684 refreshContents();
....@@ -3455,7 +3691,7 @@
34553691 // ref.SaveSupports();
34563692 // Object3D par = ref.parent;
34573693 // ref.parent = null;
3458
-// Object3D lowres = (Object3D) GraphreeD.clone(ref);
3694
+// Object3D lowres = (Object3D) GrafreeD.clone(ref);
34593695 // ref.parent = par;
34603696 // ref.RestoreSupports();
34613697
....@@ -3463,11 +3699,11 @@
34633699
34643700 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
34653701
3466
- boolean random = CameraPane.RANDOM;
3467
- CameraPane.RANDOM = false; // parse all random nodes
3702
+ boolean random = CameraPane.SWITCH;
3703
+ CameraPane.SWITCH = false; // parse all random nodes
34683704 lowres.linkVerticesThis(null);
34693705 lowres.linkVerticesThis(sn);
3470
- CameraPane.RANDOM = random;
3706
+ CameraPane.SWITCH = random;
34713707
34723708 System.err.flush();
34733709
....@@ -3485,7 +3721,7 @@
34853721 // lowres.SaveSupports();
34863722 // par = lowres.parent;
34873723 // lowres.parent = null;
3488
-// Object3D newlow = (Object3D) GraphreeD.clone(lowres);
3724
+// Object3D newlow = (Object3D) GrafreeD.clone(lowres);
34893725 Object3D newlow = CloneObject(lowres, false);
34903726 newlow.name = sn.switchobject.get(i).name;
34913727 System.out.println(" pose#" + i + " = " + newlow);
....@@ -3507,7 +3743,7 @@
35073743 return;
35083744
35093745 Object3D poses = group.selection.get(0);
3510
- Object3D ref = GraphreeD.clipboard.get(0);
3746
+ Object3D ref = GrafreeD.clipboard.get(0);
35113747
35123748 Object3D newgroup = new Object3D("Po:" + poses.name);
35133749
....@@ -3676,7 +3912,7 @@
36763912 group.selection.RelinkToSupport(); // july 2014
36773913 System.out.println("DONE.");
36783914 refreshContents();
3679
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3915
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
36803916 }
36813917
36823918 void ReduceMesh(boolean reduction34)
....@@ -3701,20 +3937,20 @@
37013937
37023938 void ClipMesh()
37033939 {
3704
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
3940
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
37053941 {
3706
- Object3D content = GraphreeD.clipboard.get(0);
3942
+ Object3D content = GrafreeD.clipboard.get(0);
37073943
37083944 if (content instanceof cGroup && ((cGroup)content).transientlink )
37093945 content = ((cGroup)content).get(0);
37103946
37113947 // for (int i=0; i<group.selection.size(); i++)
37123948 // {
3713
-// group.selection.get(i).ClipMesh(GraphreeD.clipboard);
3949
+// group.selection.get(i).ClipMesh(GrafreeD.clipboard);
37143950 // }
3715
- group.selection.ClipMesh(GraphreeD.clipboard);
3951
+ group.selection.ClipMesh(GrafreeD.clipboard);
37163952 }
3717
-// group.selection.ClipMesh(GraphreeD.clipboard);
3953
+// group.selection.ClipMesh(GrafreeD.clipboard);
37183954 System.out.println("DONE.");
37193955 refreshContents();
37203956 }
....@@ -3952,25 +4188,25 @@
39524188 System.err.println("info : " + child.GetPath());
39534189 }
39544190 }
3955
- else
3956
- {
3957
- objEditor.SetMaterial(group); // .GetMaterial());
3958
- objEditor.AddInfo(group, this, true); // .GetMaterial());
3959
- System.err.println("info : " + group.GetPath());
3960
- }
4191
+// else
4192
+// {
4193
+// objEditor.SetMaterial(group); // .GetMaterial());
4194
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4195
+// System.err.println("info : " + group.GetPath());
4196
+// }
39614197
39624198 objEditor.SetText(); // jan 2014
39634199
3964
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4200
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
39654201 CameraPane.flash = true;
39664202
39674203 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
39684204 // a camera
39694205 {
39704206 CameraPane.camerachangeframe = 0; // don't refuse it
3971
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
3972
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
3973
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4207
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4208
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4209
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
39744210 }
39754211
39764212 refreshContents();
....@@ -4052,12 +4288,12 @@
40524288 {
40534289 if (group.selection.isEmpty())
40544290 return;
4055
- GraphreeD.clipboardIsTempGroup = false;
4291
+ GrafreeD.clipboardIsTempGroup = false;
40564292 Composite tGroup = null;
40574293 if (group.selection.size() > 0) // 1)
40584294 {
40594295 tGroup = new cGroup();
4060
- GraphreeD.clipboardIsTempGroup = true;
4296
+ GrafreeD.clipboardIsTempGroup = true;
40614297 }
40624298
40634299 if (cut)
....@@ -4097,16 +4333,16 @@
40974333 //System.out.println("cut " + child);
40984334 //System.out.println("parent = " + child.parent);
40994335 // tmp.addChild(child);
4100
- if (GraphreeD.clipboardIsTempGroup)
4336
+ if (GrafreeD.clipboardIsTempGroup)
41014337 tGroup.add/*Child*/(tmp);
41024338 else
4103
- GraphreeD.clipboard = tmp;
4339
+ GrafreeD.clipboard = tmp;
41044340 }
41054341 else
4106
- if (GraphreeD.clipboardIsTempGroup)
4342
+ if (GrafreeD.clipboardIsTempGroup)
41074343 tGroup.add/*Child*/(child);
41084344 else
4109
- GraphreeD.clipboard = child;
4345
+ GrafreeD.clipboard = child;
41104346 }
41114347
41124348 //ResetModel();
....@@ -4138,21 +4374,21 @@
41384374 //System.out.println("cut " + elem);
41394375 //System.out.println("parent = " + elem.parent);
41404376 // tmp.addChild(elem);
4141
- if (GraphreeD.clipboardIsTempGroup)
4377
+ if (GrafreeD.clipboardIsTempGroup)
41424378 tGroup.add/*Child*/(tmp);
41434379 else
4144
- GraphreeD.clipboard = tmp;
4380
+ GrafreeD.clipboard = tmp;
41454381 }
41464382 else
4147
- if (GraphreeD.clipboardIsTempGroup)
4383
+ if (GrafreeD.clipboardIsTempGroup)
41484384 tGroup.add/*Child*/(child);
41494385 else
4150
- GraphreeD.clipboard = child;
4386
+ GrafreeD.clipboard = child;
41514387 }
41524388
41534389 }
4154
- if (GraphreeD.clipboardIsTempGroup)
4155
- GraphreeD.clipboard = tGroup;
4390
+ if (GrafreeD.clipboardIsTempGroup)
4391
+ GrafreeD.clipboard = tGroup;
41564392 if (cut)
41574393 {
41584394 ResetModel();
....@@ -4162,11 +4398,11 @@
41624398
41634399 void paste(boolean expand)
41644400 {
4165
- // if (GraphreeD.clipboard == null)
4401
+ // if (GrafreeD.clipboard == null)
41664402 // return;
41674403 boolean first = true;
41684404
4169
- if (GraphreeD.clipboardIsTempGroup)
4405
+ if (GrafreeD.clipboardIsTempGroup)
41704406 {
41714407 Composite temp;
41724408
....@@ -4177,7 +4413,7 @@
41774413 temp = (Composite)Applet3D.clipboard.deepCopy();
41784414 */
41794415 Object3D elem;
4180
- for (Enumeration e = /*temp.children*/GraphreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4416
+ for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
41814417 {
41824418 Object3D child = (Object3D)e.nextElement();
41834419
....@@ -4191,7 +4427,7 @@
41914427 else
41924428 elem = child.deepCopy(); // ?
41934429 child.parent = keepparent;
4194
- //if (GraphreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
4430
+ //if (GrafreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
41954431 // elem = elem.get(0);
41964432 makeSomething(elem, true); // ?? first);
41974433 //group.addChild(elem);
....@@ -4211,23 +4447,23 @@
42114447 //Object3D cb = Applet3D.clipboard;
42124448 //temp.addChild(cb);
42134449 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4214
- assert(GraphreeD.clipboard.parent == null);
4215
- Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent;
4216
- GraphreeD.clipboard.get(0).parent = null; // Avoid copy?
4217
- if (LA.isIdentity(GraphreeD.clipboard.toParent))
4218
- makeSomething(expand?GraphreeD.clipboard.get(0).copyExpand():GraphreeD.clipboard.get(0).deepCopy());
4450
+ assert(GrafreeD.clipboard.parent == null);
4451
+ Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4452
+ GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4453
+ if (LA.isIdentity(GrafreeD.clipboard.toParent))
4454
+ makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
42194455 else
4220
- makeSomething(expand?GraphreeD.clipboard.copyExpand():GraphreeD.clipboard.deepCopy());
4221
- GraphreeD.clipboard.get(0).parent = keepparent;
4456
+ makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4457
+ GrafreeD.clipboard.get(0).parent = keepparent;
42224458 }
42234459
42244460 ResetModel();
42254461 refreshContents();
42264462 }
42274463
4228
- void pasteInto(boolean copyit)
4464
+ void pasteInto(boolean copyit, boolean clone)
42294465 {
4230
-// if (GraphreeD.clipboard == null)
4466
+// if (GrafreeD.clipboard == null)
42314467 // return;
42324468
42334469 if (group.selection.size() != 1)
....@@ -4254,15 +4490,22 @@
42544490 if (copyit)
42554491 {
42564492 // paste(false);
4257
- CloneClipboard(false); // sept 2014
4493
+ if (clone)
4494
+ {
4495
+ CloneClipboard(false); // sept 2014
4496
+ }
4497
+ else
4498
+ {
4499
+ paste(false);
4500
+ }
42584501 }
42594502 else
42604503 {
42614504 boolean first = true;
42624505
4263
- if (GraphreeD.clipboardIsTempGroup)
4506
+ if (GrafreeD.clipboardIsTempGroup)
42644507 {
4265
- Composite temp = (Composite)GraphreeD.clipboard;
4508
+ Composite temp = (Composite)GrafreeD.clipboard;
42664509 Object3D copy;
42674510 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
42684511 {
....@@ -4272,7 +4515,7 @@
42724515 }
42734516 } else
42744517 {
4275
- linkSomething(GraphreeD.clipboard); //.get(0));
4518
+ linkSomething(GrafreeD.clipboard); //.get(0));
42764519 }
42774520 }
42784521 }
....@@ -4464,6 +4707,26 @@
44644707 makeSomething(csg);
44654708 }
44664709
4710
+ void Ungroup(Object3D g)
4711
+ {
4712
+ if (g instanceof HiddenObject)
4713
+ {
4714
+ HiddenObject h = (HiddenObject) g;
4715
+
4716
+ for (int i=0; i<h.ActualSize(); i++)
4717
+ {
4718
+ objEditor.makeSomething(h.get(i), false);
4719
+ }
4720
+ }
4721
+ else
4722
+ {
4723
+ for (int i=0; i<g.Size(); i++)
4724
+ {
4725
+ objEditor.makeSomething(g.get(i), false);
4726
+ }
4727
+ }
4728
+ }
4729
+
44674730 void ungroup()
44684731 {
44694732 /*
....@@ -4659,7 +4922,7 @@
46594922
46604923 void ImportGFD()
46614924 {
4662
- FileDialog browser = new FileDialog(objEditor.frame, "Import GraphreeD", FileDialog.LOAD);
4925
+ FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
46634926 browser.show();
46644927 String filename = browser.getFile();
46654928 if (filename != null && filename.length() > 0)
....@@ -4697,7 +4960,7 @@
46974960
46984961 void ImportVRMLX3D()
46994962 {
4700
- if (GraphreeD.standAlone)
4963
+ if (GrafreeD.standAlone)
47014964 {
47024965 /**/
47034966 FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
....@@ -4714,7 +4977,7 @@
47144977
47154978 String GetFile(String dialogName)
47164979 {
4717
- if (GraphreeD.standAlone)
4980
+ if (GrafreeD.standAlone)
47184981 {
47194982 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
47204983 browser.show();
....@@ -4778,10 +5041,12 @@
47785041 cButton flashSelectionButton;
47795042 cButton editButton;
47805043 cButton uneditButton;
5044
+ JCheckBox allParamsButton;
47815045 cButton clearpanelButton;
4782
- cButton allParamsButton;
47835046 cButton unselectButton;
47845047
5048
+ cButton oneStepButton;
5049
+
47855050 cButton screenfitButton;
47865051 cButton screenfitpointButton;
47875052 cButton snapobjectButton;
....@@ -4823,6 +5088,7 @@
48235088 private MenuItem resetsupportItem;
48245089 private MenuItem resetreferencesItem;
48255090 private MenuItem linkverticesItem;
5091
+ private MenuItem relinkverticesItem;
48265092 private MenuItem setMasterItem;
48275093 private MenuItem resetMeshItem;
48285094 private MenuItem stepAllItem;
....@@ -4835,14 +5101,17 @@
48355101 private MenuItem mergeGeometriesItem;
48365102 private MenuItem copyItem;
48375103 private MenuItem pasteItem;
5104
+ private MenuItem pasteIntoItem;
48385105 private MenuItem pasteLinkItem;
48395106 private MenuItem pasteCloneItem;
48405107 private MenuItem pasteExpandItem;
48415108 private MenuItem clearItem;
48425109 private MenuItem clearAllItem;
48435110 private MenuItem genUVItem;
5111
+ private MenuItem genNormalsMESHItem;
48445112 private MenuItem genNormalsCADItem;
48455113 private MenuItem genNormalsORGANItem;
5114
+ private MenuItem genNormalsMINEItem;
48465115 private MenuItem stripifyItem;
48475116 private MenuItem unstripifyItem;
48485117 private MenuItem trimItem;
....@@ -4884,6 +5153,7 @@
48845153 private MenuItem resetCentroidItem;
48855154 private MenuItem transformgeometryItem;
48865155 private MenuItem resetTransformItem;
5156
+ private MenuItem hideItem;
48875157 private MenuItem grabItem;
48885158 private MenuItem backItem;
48895159 private MenuItem frontItem;
....@@ -4904,6 +5174,7 @@
49045174
49055175 private MenuItem resetParentItem;
49065176 private MenuItem repairParentItem;
5177
+ private MenuItem repairShadowItem;
49075178 private MenuItem sortbysizeItem;
49085179 private MenuItem sortbynameItem;
49095180
....@@ -4924,10 +5195,11 @@
49245195 private MenuItem coneItem;
49255196 private MenuItem torusItem;
49265197 private MenuItem superItem;
5198
+ private MenuItem kleinItem;
49275199 private MenuItem blobItem;
49285200 private MenuItem latheItem;
49295201 private MenuItem bezierItem;
4930
- private MenuItem checkerItem;
5202
+ private MenuItem overlayItem;
49315203 private MenuItem meshItem;
49325204 // private MenuItem meshGroupItem;
49335205 private MenuItem springItem;
....@@ -4936,6 +5208,7 @@
49365208 private MenuItem csgItem;
49375209 private MenuItem templateItem;
49385210 private MenuItem textureItem;
5211
+ private MenuItem billboardItem;
49395212 private MenuItem shadowXItem;
49405213 private MenuItem shadowYItem;
49415214 private MenuItem shadowZItem;