Normand Briere
2019-05-05 44b1501b5c4cd60ea67cc3d0971ed53f53b594e6
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 {
....@@ -857,7 +940,9 @@
857940 // objEditor.DropFile((java.io.File[]) object, true);
858941 // return;
859942 // }
860
- if (string.charAt(0) == '/')
943
+
944
+ // File path for Mac and Windows
945
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
861946 {
862947 // file(s)
863948 String[] names = string.split("\n");
....@@ -884,7 +969,7 @@
884969
885970 flashIt = false;
886971 CameraPane pane = (CameraPane) target;
887
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
972
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
888973 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
889974
890975 if (group.selection.size() == 1)
....@@ -911,11 +996,11 @@
911996 {
912997 loadClipboard(true);
913998 objEditor.jTree.setSelectionPath(destinationPath);
914
- pasteInto(false);
999
+ pasteInto(false, false);
9151000 } else {
9161001 loadClipboard(false);
9171002 objEditor.jTree.setSelectionPath(destinationPath);
918
- pasteInto(false); // true); // ???
1003
+ pasteInto(false, false); // true); // ???
9191004 }
9201005 }
9211006 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1033,29 +1118,37 @@
10331118 torusItem.addActionListener(this);
10341119 superItem = menu.add(new MenuItem("Superellipsoid"));
10351120 superItem.addActionListener(this);
1121
+ kleinItem = menu.add(new MenuItem("Klein Bottle"));
1122
+ kleinItem.addActionListener(this);
10361123 particleItem = menu.add(new MenuItem("Particle system"));
10371124 particleItem.addActionListener(this);
1125
+ if (Globals.ADVANCED)
1126
+ {
10381127 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10391128 ragdollItem.addActionListener(this);
10401129 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10411130 ragdoll2Item.addActionListener(this);
1131
+ }
10421132 menu.add("-");
1043
- meshItem = menu.add(new MenuItem("Mesh"));
1133
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10441134 meshItem.addActionListener(this);
10451135 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10461136 // meshGroupItem.addActionListener(this);
1137
+ if (Globals.ADVANCED)
1138
+ {
10471139 springItem = menu.add(new MenuItem("Spring"));
10481140 springItem.addActionListener(this);
10491141 flagItem = menu.add(new MenuItem("Flag"));
10501142 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);
10551143 blobItem = menu.add(new MenuItem("Blob"));
10561144 blobItem.addActionListener(this);
10571145 latheItem = menu.add(new MenuItem("Lathe"));
10581146 latheItem.addActionListener(this);
1147
+ }
1148
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1149
+ bezierItem.addActionListener(this);
1150
+ overlayItem = menu.add(new MenuItem("Overlay"));
1151
+ overlayItem.addActionListener(this);
10591152 lightItem = menu.add(new MenuItem("Light"));
10601153 lightItem.addActionListener(this);
10611154 menu.add("-");
....@@ -1065,34 +1158,39 @@
10651158 loopItem.addActionListener(this);
10661159 doubleItem = menu.add(new MenuItem("Fork"));
10671160 doubleItem.addActionListener(this);
1161
+ if (Globals.ADVANCED)
1162
+ {
10681163 tripleItem = menu.add(new MenuItem("Trident"));
10691164 tripleItem.addActionListener(this);
1165
+ }
10701166 }
10711167
10721168 void buildToolsMenu(Menu menu)
10731169 {
10741170 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10751171 animationItem.addItemListener(this);
1076
- animationItem.setState(CameraPane.ANIMATION);
1172
+ animationItem.setState(Globals.ANIMATION);
10771173
10781174 menu.add("-");
10791175 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
10801176 parseverticesItem.addActionListener(this);
10811177 textureFieldItem = menu.add(new MenuItem("Texture Field"));
10821178 textureFieldItem.addActionListener(this);
1083
- alignItem = menu.add(new MenuItem("Align"));
1179
+ alignItem = menu.add(new MenuItem("Align Objects"));
10841180 alignItem.addActionListener(this);
1085
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1086
- mirrorItem.addActionListener(this);
10871181 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
10881182 reduceMorphItem.addActionListener(this);
10891183 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
10901184 reduce34MorphItem.addActionListener(this);
1091
-
1185
+ menu.add("-");
10921186 menu.add(computeAOItem = new MenuItem("Compute AO"));
10931187 computeAOItem.addActionListener(this);
1094
- menu.add("-");
10951188
1189
+ if (Globals.ADVANCED)
1190
+ {
1191
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1192
+ mirrorItem.addActionListener(this);
1193
+ menu.add("-");
10961194 menu.add(memoryItem = new MenuItem("Memory Usage"));
10971195 memoryItem.addActionListener(this);
10981196 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1106,6 +1204,8 @@
11061204 resetParentItem.addActionListener(this);
11071205 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11081206 repairParentItem.addActionListener(this);
1207
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1208
+ repairShadowItem.addActionListener(this);
11091209 menu.add(invariantsItem = new MenuItem("Invariants"));
11101210 invariantsItem.addActionListener(this);
11111211 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1113,6 +1213,7 @@
11131213 menu.add("-");
11141214 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11151215 editScriptItem.addActionListener(this);
1216
+ }
11161217 }
11171218
11181219 void ScreenFit()
....@@ -1441,9 +1542,9 @@
14411542
14421543 void Overwrite(int mask)
14431544 {
1444
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
1545
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
14451546 {
1446
- Object3D content = GraphreeD.clipboard.get(0);
1547
+ Object3D content = GrafreeD.clipboard.get(0);
14471548
14481549 if (content instanceof cGroup && ((cGroup)content).transientlink )
14491550 content = ((cGroup)content).get(0);
....@@ -1466,6 +1567,7 @@
14661567 //
14671568 public void actionPerformed(ActionEvent event) // , Object arg)
14681569 {
1570
+ Object source = event.getSource();
14691571 /*
14701572 if (event.getSource() == nameField)
14711573 {
....@@ -1477,11 +1579,11 @@
14771579 }
14781580 else
14791581 */
1480
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1582
+ if (source == lookAtItem || source == lookFromItem)
14811583 {
14821584 ScreenFit();
14831585 } else
1484
- if (event.getSource() == switchItem)
1586
+ if (source == switchItem)
14851587 {
14861588 cVector v1 = new cVector();
14871589 cVector v2 = new cVector();
....@@ -1490,11 +1592,11 @@
14901592 objEditor.cameraView.renderCamera.setAim(v2, v1);
14911593 objEditor.cameraView.repaint();
14921594 } else
1493
- if (event.getSource() == rectoidItem)
1595
+ if (source == rectoidItem)
14941596 {
14951597 makeSomething(new Box());
14961598 } else
1497
- if (event.getSource() == particleItem)
1599
+ if (source == particleItem)
14981600 {
14991601 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15001602 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1515,9 +1617,9 @@
15151617 applyExample(particleGeom, "SMOKE");
15161618 makeSomething(particleGeom);
15171619 } else
1518
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1620
+ if (source == ragdollItem || source == ragdoll2Item)
15191621 {
1520
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1622
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15211623
15221624 ragdoll.toParent = LA.newMatrix();
15231625 ragdoll.fromParent = LA.newMatrix();
....@@ -1535,7 +1637,7 @@
15351637 } else
15361638 /*
15371639 */
1538
- if (event.getSource() == heightFieldItem)
1640
+ if (source == heightFieldItem)
15391641 {
15401642 Object3D obj = new Object3D();
15411643
....@@ -1573,27 +1675,31 @@
15731675
15741676 makeSomething(obj);
15751677 } else
1576
- if (event.getSource() == gridItem)
1678
+ if (source == gridItem)
15771679 {
15781680 makeSomething(new Grid());
15791681 } else
1580
- if (event.getSource() == ellipsoidItem)
1682
+ if (source == ellipsoidItem)
15811683 {
15821684 makeSomething(new Sphere());
15831685 } else
1584
- if (event.getSource() == coneItem)
1686
+ if (source == coneItem)
15851687 {
15861688 makeSomething(new Cone());
15871689 } else
1588
- if (event.getSource() == torusItem)
1690
+ if (source == torusItem)
15891691 {
15901692 makeSomething(new Torus());
15911693 } else
1592
- if (event.getSource() == superItem)
1694
+ if (source == superItem)
15931695 {
15941696 makeSomething(new Superellipsoid());
15951697 } else
1596
- if (event.getSource() == blobItem)
1698
+ if (source == kleinItem)
1699
+ {
1700
+ makeSomething(new Klein());
1701
+ } else
1702
+ if (source == blobItem)
15971703 {
15981704 Blob blob = new Blob();
15991705 BlobComponent comp = new BlobComponent();
....@@ -1601,15 +1707,15 @@
16011707 //blob.retile();
16021708 makeSomething(blob);
16031709 } else
1604
- if (event.getSource() == latheItem)
1710
+ if (source == latheItem)
16051711 {
16061712 makeSomething(new Lathe());
16071713 } else
1608
- if (event.getSource() == bezierItem)
1714
+ if (source == bezierItem)
16091715 {
16101716 makeSomething(new BezierSurface());
16111717 } else
1612
- if (event.getSource() == checkerItem)
1718
+ if (source == overlayItem)
16131719 {
16141720 /*
16151721 Object3D obj = new BezierSurface(5,8);
....@@ -1624,7 +1730,7 @@
16241730 */
16251731 makeSomething(new Checker());
16261732 } else
1627
- if (event.getSource() == meshItem)
1733
+ if (source == meshItem)
16281734 {
16291735 Object3D itemtomake = new Object3D();
16301736 Object3D child;
....@@ -1645,35 +1751,35 @@
16451751 makeSomething(child);
16461752 }
16471753 } else
1648
- if (event.getSource() == springItem)
1754
+ if (source == springItem)
16491755 {
16501756 cSpring s = new cSpring();
16511757 s.setup();
16521758 makeSomething(s);
16531759 } else
1654
- if (event.getSource() == flagItem)
1760
+ if (source == flagItem)
16551761 {
16561762 cSpring s = new cFlag();
16571763 s.setup();
16581764 makeSomething(s);
16591765 } else
1660
- if (event.getSource() == lightItem)
1766
+ if (source == lightItem)
16611767 {
16621768 makeSomething(new Light());
16631769 } else
1664
- if (event.getSource() == csgItem)
1770
+ if (source == csgItem)
16651771 {
16661772 group(new CSG());
16671773 } else
1668
- if (event.getSource() == templateItem)
1774
+ if (source == templateItem)
16691775 {
16701776 group(new cTemplate());
16711777 } else
1672
- if (event.getSource() == attributeItem)
1778
+ if (source == attributeItem)
16731779 {
16741780 makeSomething(new Attribute());
16751781 } else
1676
- if (event.getSource() == pointflowItem)
1782
+ if (source == pointflowItem)
16771783 {
16781784 makeSomething(new PointFlow());
16791785 } else
....@@ -1685,7 +1791,7 @@
16851791 } else
16861792 */
16871793
1688
- if (event.getSource() == superLoopItem)
1794
+ if (source == superLoopItem)
16891795 {
16901796 Composite g = new cGroup();
16911797 for (int i=0; i<15; i++)
....@@ -1707,7 +1813,7 @@
17071813
17081814 group(g);
17091815 } else
1710
- if (event.getSource() == loopItem)
1816
+ if (source == loopItem)
17111817 {
17121818 Composite csg = new GroupLeaf();
17131819 csg.count = 5;
....@@ -1716,7 +1822,7 @@
17161822 csg.addChild(child);
17171823 child.addChild(csg);
17181824 } else
1719
- if (event.getSource() == doubleItem)
1825
+ if (source == doubleItem)
17201826 {
17211827 Composite csg = new GroupLeaf();
17221828 csg.count = 5;
....@@ -1728,7 +1834,7 @@
17281834 csg.addChild(child);
17291835 child.addChild(csg);
17301836 } else
1731
- if (event.getSource() == tripleItem)
1837
+ if (source == tripleItem)
17321838 {
17331839 Composite csg = new GroupLeaf();
17341840 csg.count = 4;
....@@ -1744,70 +1850,83 @@
17441850 child.addChild(csg);
17451851 } else
17461852
1747
- if (event.getSource() == importGFDItem)
1853
+ if (source == importGFDItem)
17481854 {
17491855 ImportGFD();
17501856 } else
1751
- if (event.getSource() == importVRMLX3DItem)
1857
+ if (source == importVRMLX3DItem)
17521858 {
17531859 ImportVRMLX3D();
17541860 } else
1755
- if (event.getSource() == import3DSItem)
1861
+ if (source == import3DSItem)
17561862 {
17571863 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17581864 } else
1759
- if (event.getSource() == importOBJItem)
1865
+ if (source == importOBJItem)
17601866 {
1761
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1867
+ //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1868
+ FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD);
1869
+ browser.setVisible(true);
1870
+ String filename = browser.getFile();
1871
+ if (filename != null && filename.length() > 0)
1872
+ {
1873
+ String fullname = browser.getDirectory() + filename;
1874
+ makeSomething(ReadOBJ(fullname), true);
1875
+ }
17621876 } else
1763
- if (event.getSource() == computeAOItem)
1877
+ if (source == computeAOItem)
17641878 {
1765
- CameraPane.drawMode = CameraPane.OCCLUSION;
1766
- CameraPane.theRenderer.repaint();
1879
+ Globals.drawMode = CameraPane.OCCLUSION;
1880
+ Globals.theRenderer.repaint();
17671881 } else
1768
- if (event.getSource() == recompileItem)
1882
+ if (source == recompileItem)
17691883 {
17701884 Recompile();
17711885 refreshContents();
17721886 } else
1773
- if (event.getSource() == editScriptItem)
1887
+ if (source == editScriptItem)
17741888 {
17751889 OpenDialog();
17761890 refreshContents();
17771891 } else
1778
- if (event.getSource() == invariantsItem)
1892
+ if (source == invariantsItem)
17791893 {
17801894 System.out.println("Invariants:");
1781
- GraphreeD.theApplet3D.universe.invariants();
1895
+ GrafreeD.grafreeD.universe.invariants();
17821896 } else
1783
- if (event.getSource() == memoryItem)
1897
+ if (source == memoryItem)
17841898 {
17851899 //System.out.println("Invariants:");
17861900 PrintMemory();
17871901 } else
1788
- if (event.getSource() == pathItem)
1902
+ if (source == pathItem)
17891903 {
17901904 PrintPath();
17911905 } else
1792
- if (event.getSource() == analyzeItem)
1906
+ if (source == analyzeItem)
17931907 {
17941908 AnalyzeObject();
17951909 } else
1796
- if (event.getSource() == dumpItem)
1910
+ if (source == dumpItem)
17971911 {
17981912 DumpObject();
17991913 } else
1800
- if (event.getSource() == screenfitButton)
1914
+ if (source == oneStepButton)
1915
+ {
1916
+ Globals.ONESTEP = true;
1917
+ cameraView.repaint();
1918
+ } else
1919
+ if (source == screenfitButton)
18011920 {
18021921 //Reload(lastConverter, lastFilename, true);
18031922 ScreenFit();
18041923 } else
1805
- if (event.getSource() == screenfitpointButton)
1924
+ if (source == screenfitpointButton)
18061925 {
18071926 //Reload(lastConverter, lastFilename, true);
18081927 ScreenFitPoint();
18091928 } else
1810
- if (event.getSource() == snapobjectButton)
1929
+ if (source == snapobjectButton)
18111930 {
18121931 //Reload(lastConverter, lastFilename, true);
18131932 SnapObject();
....@@ -1818,13 +1937,13 @@
18181937 // Recompile();
18191938 // refreshContents();
18201939 // } else
1821
- if (event.getSource() == gcButton)
1940
+ if (source == gcButton)
18221941 {
18231942 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18241943 System.gc();
18251944 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18261945 } else
1827
- if (event.getSource() == editLeafItem)
1946
+ if (source == editLeafItem)
18281947 {
18291948 Object3D obj;
18301949 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1838,65 +1957,70 @@
18381957 }
18391958 refreshContents(true);
18401959 } else
1841
- if (event.getSource() == openWindowItem)
1960
+ if (source == openWindowItem)
18421961 {
18431962 EditSelection(true);
18441963 } else
1845
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1964
+ if (source == cutItem || source == clearButton)
18461965 {
18471966 loadClipboard(true);
18481967 } else
1849
- if (event.getSource() == duplicateItem)
1968
+ if (source == duplicateItem)
18501969 {
1851
- Object3D keep = GraphreeD.clipboard;
1970
+ Object3D keep = GrafreeD.clipboard;
18521971 loadClipboard(false);
18531972 paste(false);
1854
- GraphreeD.clipboard = keep;
1973
+ GrafreeD.clipboard = keep;
18551974 } else
1856
- if (event.getSource() == cloneItem)
1975
+ if (source == cloneItem)
18571976 {
18581977 CloneSelection(false);
18591978 } else
1860
- if (event.getSource() == cloneSupportItem)
1979
+ if (source == cloneSupportItem)
18611980 {
18621981 CloneSelection(true);
18631982 } else
1864
- if (event.getSource() == copyItem)
1983
+ if (source == copyItem)
18651984 {
18661985 loadClipboard(false);
18671986 } else
1868
- if (event.getSource() == pasteItem)
1987
+ if (source == pasteItem)
18691988 {
18701989 paste(false);
18711990 } else
1872
- if (event.getSource() == pasteLinkItem)
1991
+ if (source == pasteIntoItem)
18731992 {
1874
- pasteInto(false);
1993
+ pasteInto(true, false);
18751994 } else
1876
- if (event.getSource() == pasteCloneItem)
1995
+ if (source == pasteLinkItem)
18771996 {
1878
- pasteInto(true);
1997
+ pasteInto(false, false);
18791998 } else
1880
- if (event.getSource() == pasteExpandItem)
1999
+ if (source == pasteCloneItem)
2000
+ {
2001
+ pasteInto(true, true);
2002
+ } else
2003
+ if (source == pasteExpandItem)
18812004 {
18822005 paste(true);
18832006 } else
1884
- if (event.getSource() == synchronizeItem)
2007
+ if (source == synchronizeItem)
18852008 {
18862009 Overwrite(Object3D.TRANSFORM);
18872010 } else
1888
- if (event.getSource() == overwriteNameItem)
2011
+ if (source == overwriteNameItem)
18892012 {
18902013 Overwrite(Object3D.NAME);
18912014 } else
1892
- if (event.getSource() == overwriteUVItem)
2015
+ if (source == overwriteUVItem)
18932016 {
18942017 Overwrite(Object3D.UV);
18952018 } else
1896
- if (event.getSource() == overwriteMatItem)
2019
+ if (source == overwriteMatItem)
18972020 {
2021
+ /* july 2015
18982022 if ((dropAttributes & Object3D.TEXTURE) == 0)
1899
- Overwrite(Object3D.MATERIAL);
2023
+ Overwrite(Object3D.MATERIAL | Object3D.COLOR);
19002024 else
19012025 {
19022026 if ((dropAttributes & Object3D.COLOR) == 0 && (dropAttributes & Object3D.MATERIAL) == 0)
....@@ -1908,13 +2032,16 @@
19082032 Overwrite(Object3D.MATERIAL | Object3D.TEXTURE);
19092033 }
19102034 }
2035
+ */
2036
+
2037
+ Overwrite(dropAttributes);
19112038 }
1912
- if (event.getSource() == overwriteGeoItem)
2039
+ if (source == overwriteGeoItem)
19132040 {
19142041 Overwrite(Object3D.GEOMETRY);
1915
-// if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
2042
+// if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
19162043 // {
1917
-// Object3D content = GraphreeD.clipboard.get(0);
2044
+// Object3D content = GrafreeD.clipboard.get(0);
19182045 //
19192046 // if (content instanceof cGroup && ((cGroup)content).transientlink )
19202047 // content = ((cGroup)content).get(0);
....@@ -1926,7 +2053,7 @@
19262053 // refreshContents();
19272054 // }
19282055 } else
1929
- if (event.getSource() == generateMeshItem)
2056
+ if (source == generateMeshItem)
19302057 {
19312058 //if (group.selection.size() == 1)
19322059 // for (int i=0; i<group.selection.size(); i++)
....@@ -1937,7 +2064,7 @@
19372064 ResetModel();
19382065 refreshContents();
19392066 } else
1940
- if (event.getSource() == extractGeometriesItem)
2067
+ if (source == extractGeometriesItem)
19412068 {
19422069 boolean one = false;
19432070
....@@ -1964,7 +2091,7 @@
19642091 ResetModel();
19652092 refreshContents();
19662093 } else
1967
- if (event.getSource() == cloneGeometriesItem)
2094
+ if (source == cloneGeometriesItem)
19682095 {
19692096 boolean one = false;
19702097
....@@ -1990,32 +2117,37 @@
19902117 ResetModel();
19912118 refreshContents();
19922119 } else
1993
- if (event.getSource() == shareGeometriesItem)
2120
+ if (source == shareGeometriesItem)
19942121 {
19952122 boolean one = false;
19962123
19972124 if (group.selection.size() == 1)
19982125 one = true;
19992126
2127
+ Object3D merge = null;
2128
+
20002129 Object3D content = new cGroup();
20012130
20022131 for (int i=0; i<group.selection.size(); i++)
20032132 {
2004
- Object3D sel = new Merge(group.selection.get(i));
2133
+ merge = new Merge(group.selection.get(i));
20052134
20062135 if (one)
2007
- makeSomething(sel, false);
2136
+ makeSomething(merge, false);
20082137 else
2009
- content.addChild(sel);
2138
+ content.addChild(merge);
20102139 }
20112140
20122141 if (!one)
2013
- makeSomething(content, false);
2014
-
2015
- ResetModel();
2016
- refreshContents();
2142
+ makeSomething(content, true);
2143
+ else
2144
+ {
2145
+ ResetModel();
2146
+ Select(merge.GetTreePath(), true, false); // unselect... false);
2147
+ refreshContents();
2148
+ }
20172149 } else
2018
- if (event.getSource() == mergeGeometriesItem)
2150
+ if (source == mergeGeometriesItem)
20192151 {
20202152 boolean one = false;
20212153
....@@ -2045,11 +2177,11 @@
20452177 ResetModel();
20462178 refreshContents();
20472179 } else
2048
- if (event.getSource() == linkverticesItem)
2180
+ if (source == linkverticesItem)
20492181 {
2050
-// if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2182
+// if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20512183 // {
2052
-// Object3D content = GraphreeD.clipboard.get(0);
2184
+// Object3D content = GrafreeD.clipboard.get(0);
20532185 //
20542186 // if (content instanceof cGroup && ((cGroup)content).transientlink )
20552187 // content = ((cGroup)content).get(0);
....@@ -2058,39 +2190,48 @@
20582190 // group.selection.get(0).setMasterThis(content); // should be identity
20592191 // refreshContents();
20602192 // }
2061
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
2193
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
20622194 {
2063
- Object3D content = GraphreeD.clipboard.get(0);
2195
+ Object3D content = GrafreeD.clipboard.get(0);
20642196
20652197 if (content instanceof cGroup && ((cGroup)content).transientlink )
20662198 content = ((cGroup)content).get(0);
20672199
2068
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2200
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20692201 for (int i=0; i<group.selection.size(); i++)
20702202 {
2071
- boolean random = CameraPane.RANDOM;
2072
- CameraPane.RANDOM = false; // parse all random nodes
2203
+ boolean random = CameraPane.SWITCH;
2204
+ CameraPane.SWITCH = false; // parse all random nodes
20732205 group.selection.get(i).linkVerticesThis(content);
20742206 // group.selection.get(i).setMasterThis(content); // should be identity
2075
- CameraPane.RANDOM = random;
2207
+ CameraPane.SWITCH = random;
20762208 }
2077
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2209
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
20782210 refreshContents();
20792211 }
20802212 } else
2081
- if (event.getSource() == resetsupportItem)
2213
+ if (source == resetsupportItem)
20822214 {
20832215 for (int i=0; i<group.selection.size(); i++)
20842216 {
2085
- boolean random = CameraPane.RANDOM;
2086
- CameraPane.RANDOM = false; // parse all random nodes
2217
+ boolean random = CameraPane.SWITCH;
2218
+ CameraPane.SWITCH = false; // parse all random nodes
20872219 group.selection.get(i).linkVerticesThis(null);
2088
- CameraPane.RANDOM = random;
2220
+ CameraPane.SWITCH = random;
20892221 }
20902222
20912223 refreshContents();
20922224 } else
2093
- if (event.getSource() == resetreferencesItem)
2225
+ if (source == relinkverticesItem)
2226
+ {
2227
+ boolean random = CameraPane.SWITCH;
2228
+ CameraPane.SWITCH = false; // parse all random nodes
2229
+ group.selection.RelinkToSupport();
2230
+ CameraPane.SWITCH = random;
2231
+
2232
+ refreshContents();
2233
+ } else
2234
+ if (source == resetreferencesItem)
20942235 {
20952236 for (int i=0; i<group.selection.size(); i++)
20962237 {
....@@ -2099,11 +2240,11 @@
20992240
21002241 refreshContents();
21012242 } else
2102
- if (event.getSource() == setMasterItem)
2243
+ if (source == setMasterItem)
21032244 {
2104
- if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2245
+ if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21052246 {
2106
- Object3D content = GraphreeD.clipboard.get(0);
2247
+ Object3D content = GrafreeD.clipboard.get(0);
21072248
21082249 if (content instanceof cGroup && ((cGroup)content).transientlink )
21092250 content = ((cGroup)content).get(0);
....@@ -2112,13 +2253,13 @@
21122253 refreshContents();
21132254 }
21142255 } else
2115
- if (event.getSource() == poseMeshItem)
2256
+ if (source == poseMeshItem)
21162257 {
21172258 if (group.selection.size() == 1)
21182259 {
2119
- if (GraphreeD.clipboard.size() == 1)
2260
+ if (GrafreeD.clipboard.size() == 1)
21202261 {
2121
- Object3D content = GraphreeD.clipboard.get(0);
2262
+ Object3D content = GrafreeD.clipboard.get(0);
21222263
21232264 if (content instanceof cGroup && ((cGroup)content).transientlink )
21242265 content = ((cGroup)content).get(0);
....@@ -2131,19 +2272,19 @@
21312272 }
21322273
21332274 } else
2134
- if (event.getSource() == revertMeshItem)
2275
+ if (source == revertMeshItem)
21352276 {
21362277 RevertMeshes();
21372278 } else
2138
- if (event.getSource() == resetMeshItem)
2279
+ if (source == resetMeshItem)
21392280 {
21402281 ResetAll();
21412282 } else
2142
- if (event.getSource() == stepAllItem)
2283
+ if (source == stepAllItem)
21432284 {
21442285 StepAll();
21452286 } else
2146
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2287
+ if (source == clearItem) // || event.getSource() == clearButton)
21472288 {
21482289 //int indices[] = jList.getSelectedIndices();
21492290 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2151,42 +2292,46 @@
21512292
21522293 ClearSelection(false);
21532294 } else
2154
- if (event.getSource() == clearAllItem)
2295
+ if (source == clearAllItem)
21552296 {
21562297 ClearSelection(true);
21572298 } else
2158
- if (event.getSource() == grabItem)
2299
+ if (source == grabItem)
21592300 {
21602301 group(new cGroup(), true);
21612302 } else
2162
- if (event.getSource() == frontItem)
2303
+ if (source == hideItem)
2304
+ {
2305
+ group(new HiddenObject());
2306
+ } else
2307
+ if (source == frontItem)
21632308 {
21642309 front();
21652310 } else
2166
- if (event.getSource() == backItem)
2311
+ if (source == backItem)
21672312 {
21682313 back();
21692314 } else
2170
- if (event.getSource() == cameraItem)
2315
+ if (source == cameraItem)
21712316 {
21722317 makeSomething(new Camera());
21732318 } else
2174
- if (event.getSource() == compositeItem)
2319
+ if (source == compositeItem)
21752320 {
21762321 group(new Composite());
21772322 } else
2178
- if (event.getSource() == randomItem)
2323
+ if (source == randomItem)
21792324 {
21802325 RandomNode random = new RandomNode();
21812326 group(random);
21822327 if (random.size() > 0)
2183
- random.name = random.get(0).name + "Rnd";
2328
+ random.name = random.get(0).name + "Switch";
21842329 } else
2185
- if (event.getSource() == physicsItem)
2330
+ if (source == physicsItem)
21862331 {
21872332 group(new PhysicsNode());
21882333 } else
2189
- if (event.getSource() == frameselectorItem)
2334
+ if (source == frameselectorItem)
21902335 {
21912336 for (int i=0; i<group.selection.size(); i++)
21922337 {
....@@ -2198,7 +2343,7 @@
21982343 ResetModel();
21992344 refreshContents();
22002345 } else
2201
- if (event.getSource() == switchGeoItem)
2346
+ if (source == switchGeoItem)
22022347 {
22032348 for (int i=0; i<group.selection.size(); i++)
22042349 {
....@@ -2210,7 +2355,7 @@
22102355 ResetModel();
22112356 refreshContents();
22122357 } else
2213
- if (event.getSource() == switchTransfoItem)
2358
+ if (source == switchTransfoItem)
22142359 {
22152360 for (int i=0; i<group.selection.size(); i++)
22162361 {
....@@ -2222,7 +2367,7 @@
22222367 ResetModel();
22232368 refreshContents();
22242369 } else
2225
- if (event.getSource() == morphItem)
2370
+ if (source == morphItem)
22262371 {
22272372 for (int i=0; i<group.selection.size(); i++)
22282373 {
....@@ -2234,7 +2379,7 @@
22342379 ResetModel();
22352380 refreshContents();
22362381 } else
2237
- if (event.getSource() == scriptNodeItem)
2382
+ if (source == scriptNodeItem)
22382383 {
22392384 boolean atleastone = false;
22402385
....@@ -2273,195 +2418,215 @@
22732418 }
22742419 }
22752420 } else
2276
- if (event.getSource() == linkerItem)
2421
+ if (source == linkerItem)
22772422 {
22782423 group(new cLinker());
22792424 } else
2280
- if (event.getSource() == textureItem)
2425
+ if (source == textureItem)
22812426 {
22822427 group(new TextureNode());
22832428 } else
2284
- if (event.getSource() == shadowXItem)
2429
+ if (source == billboardItem)
2430
+ {
2431
+ group(new BillboardNode());
2432
+ } else
2433
+ if (source == shadowXItem)
22852434 {
22862435 CastShadow(0);
22872436 } else
2288
- if (event.getSource() == shadowYItem)
2437
+ if (source == shadowYItem)
22892438 {
22902439 CastShadow(1);
22912440 } else
2292
- if (event.getSource() == shadowZItem)
2441
+ if (source == shadowZItem)
22932442 {
22942443 CastShadow(2);
22952444 } else
2296
- if (event.getSource() == ungroupItem)
2445
+ if (source == ungroupItem)
22972446 {
2298
- ungroup();
2447
+ //ungroup();
2448
+ for (int i=0; i<group.selection.size(); i++)
2449
+ {
2450
+ Ungroup(group.selection.get(i));
2451
+ }
2452
+
2453
+ ClearSelection(false);
2454
+
2455
+ refreshContents();
22992456 } else
2300
- if (event.getSource() == genUVItem)
2457
+ if (source == genUVItem)
23012458 {
23022459 GenUV();
23032460 } else
2304
- if (event.getSource() == genNormalsCADItem)
2461
+ if (source == genNormalsCADItem)
23052462 {
23062463 GenNormals(true);
23072464 } else
2308
- if (event.getSource() == genNormalsORGANItem)
2465
+ if (source == genNormalsMESHItem)
2466
+ {
2467
+ GenNormals(true); // TODO
2468
+ } else
2469
+ if (source == genNormalsORGANItem)
23092470 {
23102471 GenNormals(false);
23112472 } else
2312
- if (event.getSource() == stripifyItem)
2473
+ if (source == genNormalsMINEItem)
2474
+ {
2475
+ GenNormalsMINE();
2476
+ } else
2477
+ if (source == stripifyItem)
23132478 {
23142479 Stripify();
23152480 } else
2316
- if (event.getSource() == unstripifyItem)
2481
+ if (source == unstripifyItem)
23172482 {
23182483 Unstripify();
23192484 } else
2320
- if (event.getSource() == trimItem)
2485
+ if (source == trimItem)
23212486 {
23222487 Trim();
23232488 } else
2324
- if (event.getSource() == untrimItem)
2489
+ if (source == untrimItem)
23252490 {
23262491 Untrim();
23272492 } else
2328
- if (event.getSource() == clearColorsItem)
2493
+ if (source == clearColorsItem)
23292494 {
23302495 ClearColors();
23312496 } else
2332
- if (event.getSource() == clearMaterialsItem)
2497
+ if (source == clearMaterialsItem)
23332498 {
23342499 ClearMaterials();
23352500 } else
2336
- if (event.getSource() == liveleavesItem)
2501
+ if (source == liveleavesItem)
23372502 {
23382503 LiveLeaves(true);
23392504 } else
2340
- if (event.getSource() == unliveleavesItem)
2505
+ if (source == unliveleavesItem)
23412506 {
23422507 LiveLeaves(false);
23432508 } else
2344
- if (event.getSource() == supportleavesItem)
2509
+ if (source == supportleavesItem)
23452510 {
23462511 SupportLeaves(true);
23472512 } else
2348
- if (event.getSource() == unsupportleavesItem)
2513
+ if (source == unsupportleavesItem)
23492514 {
23502515 SupportLeaves(false);
23512516 } else
2352
- if (event.getSource() == hideleavesItem)
2517
+ if (source == hideleavesItem)
23532518 {
23542519 HideLeaves(true);
23552520 } else
2356
- if (event.getSource() == showleavesItem)
2521
+ if (source == showleavesItem)
23572522 {
23582523 HideLeaves(false);
23592524 } else
2360
- if (event.getSource() == markleavesItem)
2525
+ if (source == markleavesItem)
23612526 {
23622527 MarkLeaves(true);
23632528 } else
2364
- if (event.getSource() == unmarkleavesItem)
2529
+ if (source == unmarkleavesItem)
23652530 {
23662531 MarkLeaves(false);
23672532 } else
2368
- if (event.getSource() == flipVItem)
2533
+ if (source == flipVItem)
23692534 {
23702535 FlipV(true);
23712536 } else
2372
- if (event.getSource() == unflipVItem)
2537
+ if (source == unflipVItem)
23732538 {
23742539 FlipV(false);
23752540 } else
2376
- if (event.getSource() == lowTexturesItem)
2541
+ if (source == lowTexturesItem)
23772542 {
23782543 SetTexRes(0);
23792544 } else
2380
- if (event.getSource() == normalTexturesItem)
2545
+ if (source == normalTexturesItem)
23812546 {
23822547 SetTexRes(1);
23832548 } else
2384
- if (event.getSource() == highTexturesItem)
2549
+ if (source == highTexturesItem)
23852550 {
23862551 SetTexRes(2);
23872552 } else
2388
- if (event.getSource() == veryhighTexturesItem)
2553
+ if (source == veryhighTexturesItem)
23892554 {
23902555 SetTexRes(3);
23912556 } else
2392
- if (event.getSource() == maxTexturesItem)
2557
+ if (source == maxTexturesItem)
23932558 {
23942559 SetTexRes(4);
23952560 } else
2396
- if (event.getSource() == panoTexturesItem)
2561
+ if (source == panoTexturesItem)
23972562 {
23982563 SetTexRes(5);
23992564 } else
2400
- if (event.getSource() == reverseNormalsItem)
2565
+ if (source == reverseNormalsItem)
24012566 {
24022567 ReverseNormals();
24032568 } else
2404
- if (event.getSource() == parseverticesItem)
2569
+ if (source == parseverticesItem)
24052570 {
24062571 ParseVertices();
24072572 } else
2408
- if (event.getSource() == textureFieldItem)
2573
+ if (source == textureFieldItem)
24092574 {
24102575 TextureVertices();
24112576 } else
2412
- if (event.getSource() == alignItem)
2577
+ if (source == alignItem)
24132578 {
24142579 Align();
24152580 } else
2416
- if (event.getSource() == mirrorItem)
2581
+ if (source == mirrorItem)
24172582 {
24182583 MirrorPoses();
24192584 } else
2420
- if (event.getSource() == reduceMorphItem)
2585
+ if (source == reduceMorphItem)
24212586 {
24222587 MeshReduction(false);
24232588 } else
2424
- if (event.getSource() == reduce34MorphItem)
2589
+ if (source == reduce34MorphItem)
24252590 {
24262591 MeshReduction(true);
24272592 } else
2428
- if (event.getSource() == reverseTrianglesItem)
2593
+ if (source == reverseTrianglesItem)
24292594 {
24302595 ReverseTriangles();
24312596 } else
2432
- if (event.getSource() == reduceMeshItem)
2597
+ if (source == reduceMeshItem)
24332598 {
24342599 ReduceMesh(false);
24352600 } else
2436
- if (event.getSource() == reduce34MeshItem)
2601
+ if (source == reduce34MeshItem)
24372602 {
24382603 ReduceMesh(true);
24392604 } else
2440
- if (event.getSource() == increaseMeshItem)
2605
+ if (source == increaseMeshItem)
24412606 {
24422607 IncreaseMesh();
24432608 } else
2444
- if (event.getSource() == clipMeshItem)
2609
+ if (source == clipMeshItem)
24452610 {
24462611 ClipMesh();
24472612 } else
2448
- if (event.getSource() == smoothMeshItem)
2613
+ if (source == smoothMeshItem)
24492614 {
24502615 SmoothMesh();
24512616 } else
2452
- if (event.getSource() == transformgeometryItem)
2617
+ if (source == transformgeometryItem)
24532618 {
24542619 TransformGeometry();
24552620 } else
2456
- if (event.getSource() == resetTransformItem)
2621
+ if (source == resetTransformItem)
24572622 {
24582623 ResetTransform();
24592624 } else
2460
- if (event.getSource() == resetCentroidItem)
2625
+ if (source == resetCentroidItem)
24612626 {
24622627 ResetCentroid();
24632628 } else
2464
- if (event.getSource() == resetParentItem)
2629
+ if (source == resetParentItem)
24652630 {
24662631 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24672632 {
....@@ -2471,7 +2636,7 @@
24712636
24722637 refreshContents();
24732638 } else
2474
- if (event.getSource() == repairParentItem)
2639
+ if (source == repairParentItem)
24752640 {
24762641 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24772642 {
....@@ -2485,7 +2650,21 @@
24852650
24862651 refreshContents();
24872652 } else
2488
- if (event.getSource() == sortbysizeItem)
2653
+ if (source == repairShadowItem)
2654
+ {
2655
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2656
+ {
2657
+ Object3D obj = (Object3D)e.nextElement();
2658
+ obj.RepairShadow();
2659
+// for (int i=0; i<obj.size(); i++)
2660
+// {
2661
+// obj.get(i).parent = obj;
2662
+// }
2663
+ }
2664
+
2665
+ refreshContents();
2666
+ } else
2667
+ if (source == sortbysizeItem)
24892668 {
24902669 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24912670 {
....@@ -2497,7 +2676,7 @@
24972676 ResetModel();
24982677 refreshContents();
24992678 } else
2500
- if (event.getSource() == sortbynameItem)
2679
+ if (source == sortbynameItem)
25012680 {
25022681 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25032682 {
....@@ -2509,7 +2688,7 @@
25092688 ResetModel();
25102689 refreshContents();
25112690 } else
2512
- if (event.getSource() == attachPigmentItem)
2691
+ if (source == attachPigmentItem)
25132692 {
25142693 String texture = GetFile("Attach pigment");
25152694 Object3D obj;
....@@ -2521,7 +2700,7 @@
25212700
25222701 refreshContents();
25232702 } else
2524
- if (event.getSource() == detachPigmentItem)
2703
+ if (source == detachPigmentItem)
25252704 {
25262705 Object3D obj;
25272706 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2532,7 +2711,7 @@
25322711
25332712 refreshContents();
25342713 } else
2535
- if (event.getSource() == attachBumpItem)
2714
+ if (source == attachBumpItem)
25362715 {
25372716 String texture = GetFile("Attach bump");
25382717 Object3D obj;
....@@ -2544,7 +2723,7 @@
25442723
25452724 refreshContents();
25462725 } else
2547
- if (event.getSource() == detachBumpItem)
2726
+ if (source == detachBumpItem)
25482727 {
25492728 Object3D obj;
25502729 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2555,7 +2734,7 @@
25552734
25562735 refreshContents();
25572736 } else
2558
- if (event.getSource() == pigmentBumpItem)
2737
+ if (source == pigmentBumpItem)
25592738 {
25602739 Object3D obj;
25612740 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2566,158 +2745,195 @@
25662745
25672746 refreshContents();
25682747 } else
2569
- if (event.getSource() == flashSelectionButton)
2748
+ if (source == flashSelectionButton)
25702749 {
25712750 CameraPane.flash = true;
25722751 refreshContents();
25732752 } else
2574
- if (event.getSource() == oneButton)
2753
+ if (source == oneButton)
25752754 {
25762755 } else
2577
- if (event.getSource() == twoButton)
2756
+ if (source == twoButton)
25782757 {
25792758 radio.layout = twoButton;
25802759 // bug
25812760 //gridPanel.setDividerLocation(1.0);
25822761 //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();
2762
+// bigThree.remove(scenePanel);
2763
+// bigThree.remove(centralPanel);
2764
+// bigThree.remove(XYZPanel);
2765
+// aWindowConstraints.gridx = 0;
2766
+// aWindowConstraints.gridy = 0;
2767
+// aWindowConstraints.gridwidth = 1;
2768
+// // aConstraints.gridheight = 3;
2769
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2770
+// aWindowConstraints.weightx = 0;
2771
+// aWindowConstraints.weighty = 1;
2772
+// //bigThree.add(jtp, aWindowConstraints);
2773
+// aWindowConstraints.weightx = 1;
2774
+// aWindowConstraints.gridwidth = 3;
2775
+// // aConstraints.gridheight = 3;
2776
+// aWindowConstraints.gridx = 1;
2777
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2778
+// bigThree.add(centralPanel, aWindowConstraints);
2779
+// aWindowConstraints.weightx = 0;
2780
+// aWindowConstraints.gridx = 4;
2781
+// aWindowConstraints.gridwidth = 1;
2782
+// // aConstraints.gridheight = 3;
2783
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2784
+// //bigThree.add(XYZPanel, aWindowConstraints);
2785
+// scenePanel.setVisible(false);
2786
+// centralPanel.setVisible(true);
2787
+// XYZPanel.setVisible(false);
2788
+ bigThree.ClearUI();
2789
+ bigThree.add(centralPanel);
2790
+ bigThree.FlushUI();
26072791 } else
2608
- if (event.getSource() == threeButton)
2792
+ if (source == threeButton)
26092793 {
26102794 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();
2795
+
2796
+// bigThree.remove(scenePanel);
2797
+// bigThree.remove(centralPanel);
2798
+// bigThree.remove(XYZPanel);
2799
+// aWindowConstraints.gridx = 0;
2800
+// aWindowConstraints.gridy = 0;
2801
+// aWindowConstraints.gridwidth = 1;
2802
+// // aConstraints.gridheight = 3;
2803
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2804
+// aWindowConstraints.weightx = 0;
2805
+// aWindowConstraints.weighty = 1;
2806
+// //bigThree.add(jtp, aWindowConstraints);
2807
+// aWindowConstraints.weightx = 1;
2808
+// aWindowConstraints.gridwidth = 3;
2809
+// // aConstraints.gridheight = 3;
2810
+// aWindowConstraints.gridx = 1;
2811
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2812
+// bigThree.add(centralPanel, aWindowConstraints);
2813
+// aWindowConstraints.weightx = 0;
2814
+// aWindowConstraints.gridx = 4;
2815
+// aWindowConstraints.gridwidth = 1;
2816
+// // aConstraints.gridheight = 3;
2817
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2818
+// bigThree.add(XYZPanel, aWindowConstraints);
2819
+// bigThree.validate();
2820
+// scenePanel.setVisible(false);
2821
+// centralPanel.setVisible(true);
2822
+// XYZPanel.setVisible(true);
2823
+ bigThree.ClearUI();
2824
+ bigThree.add(centralPanel);
2825
+ bigThree.add(XYZPanel);
2826
+ bigThree.FlushUI();
26352827 } else
2636
- if (event.getSource() == fourButton)
2828
+ if (source == fourButton)
26372829 {
26382830 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();
2831
+
2832
+// bigThree.remove(scenePanel);
2833
+// bigThree.remove(centralPanel);
2834
+// bigThree.remove(XYZPanel);
2835
+// aWindowConstraints.gridx = 0;
2836
+// aWindowConstraints.gridy = 0;
2837
+// aWindowConstraints.gridwidth = 1;
2838
+// // aWindowConstraints.gridheight = 3;
2839
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2840
+// aWindowConstraints.weightx = 1;
2841
+// aWindowConstraints.weighty = 1;
2842
+// bigThree.add(scenePanel, aWindowConstraints);
2843
+// aWindowConstraints.weightx = 1;
2844
+// aWindowConstraints.gridwidth = 3;
2845
+// // aConstraints.gridheight = 3;
2846
+// aWindowConstraints.gridx = 1;
2847
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2848
+// //bigThree.add(cameraPanel, aWindowConstraints);
2849
+// aWindowConstraints.weightx = 0;
2850
+// aWindowConstraints.gridx = 4;
2851
+// aWindowConstraints.gridwidth = 1;
2852
+// // aWindowConstraints.gridheight = 3;
2853
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2854
+// //bigThree.add(XYZPanel, aWindowConstraints);
2855
+// bigThree.validate();
2856
+// scenePanel.setVisible(true);
2857
+// centralPanel.setVisible(false);
2858
+// XYZPanel.setVisible(false);
2859
+ bigThree.ClearUI();
2860
+ bigThree.add(scenePanel);
2861
+ bigThree.FlushUI();
26632862 } else
2664
- if (event.getSource() == sixButton)
2863
+ if (source == sixButton)
26652864 {
26662865 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();
2866
+
2867
+// bigThree.remove(scenePanel);
2868
+// bigThree.remove(centralPanel);
2869
+// bigThree.remove(XYZPanel);
2870
+// aWindowConstraints.gridx = 0;
2871
+// aWindowConstraints.gridy = 0;
2872
+// aWindowConstraints.gridwidth = 1;
2873
+// // aConstraints.gridheight = 3;
2874
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2875
+// aWindowConstraints.weightx = 0;
2876
+// aWindowConstraints.weighty = 1;
2877
+// bigThree.add(scenePanel, aWindowConstraints);
2878
+// aWindowConstraints.weightx = 1;
2879
+// aWindowConstraints.gridwidth = 3;
2880
+// // aWindowConstraints.gridheight = 3;
2881
+// aWindowConstraints.gridx = 1;
2882
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2883
+// bigThree.add(centralPanel, aWindowConstraints);
2884
+// aWindowConstraints.weightx = 0;
2885
+// aWindowConstraints.gridx = 4;
2886
+// aWindowConstraints.gridwidth = 1;
2887
+// // aWindowConstraints.gridheight = 3;
2888
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2889
+// //bigThree.add(XYZPanel, aConstraints);
2890
+// bigThree.validate();
2891
+// scenePanel.setVisible(true);
2892
+// centralPanel.setVisible(true);
2893
+// XYZPanel.setVisible(false);
2894
+ bigThree.ClearUI();
2895
+ bigThree.add(scenePanel);
2896
+ bigThree.add(centralPanel);
2897
+ bigThree.FlushUI();
26912898 } else
2692
- if (event.getSource() == sevenButton)
2899
+ if (source == sevenButton)
26932900 {
26942901 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();
2902
+
2903
+// bigThree.remove(scenePanel);
2904
+// bigThree.remove(centralPanel);
2905
+// bigThree.remove(XYZPanel);
2906
+// aWindowConstraints.gridx = 0;
2907
+// aWindowConstraints.gridy = 0;
2908
+// aWindowConstraints.gridwidth = 1;
2909
+// // aWindowConstraints.gridheight = 3;
2910
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2911
+// aWindowConstraints.weightx = 0;
2912
+// aWindowConstraints.weighty = 1;
2913
+// bigThree.add(scenePanel, aWindowConstraints);
2914
+// aWindowConstraints.weightx = 1;
2915
+// aWindowConstraints.gridwidth = 3;
2916
+// // aWindowConstraints.gridheight = 3;
2917
+// aWindowConstraints.gridx = 1;
2918
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2919
+// bigThree.add(centralPanel, aWindowConstraints);
2920
+// aWindowConstraints.weightx = 0;
2921
+// aWindowConstraints.gridx = 4;
2922
+// aWindowConstraints.gridwidth = 1;
2923
+// // aConstraints.gridheight = 3;
2924
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2925
+// bigThree.add(XYZPanel, aWindowConstraints);
2926
+// bigThree.validate();
2927
+// scenePanel.setVisible(true);
2928
+// centralPanel.setVisible(true);
2929
+// XYZPanel.setVisible(true);
2930
+ bigThree.ClearUI();
2931
+ bigThree.add(scenePanel);
2932
+ bigThree.add(centralPanel);
2933
+ bigThree.add(XYZPanel);
2934
+ bigThree.FlushUI();
27192935 } else
2720
- if (event.getSource() == rootButton)
2936
+ if (source == rootButton)
27212937 {
27222938 Object3D obj;
27232939 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2729,7 +2945,7 @@
27292945
27302946 refreshContents(true);
27312947 } else
2732
- if (event.getSource() == closeButton)
2948
+ if (source == closeButton)
27332949 {
27342950 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27352951 cRadio ab;
....@@ -2750,11 +2966,11 @@
27502966 }
27512967 refreshContents(true);
27522968 } else
2753
- if (event.getSource() == editItem || event.getSource() == editButton)
2969
+ if (source == editItem || source == editButton)
27542970 {
27552971 EditSelection(false);
27562972 } else
2757
- if (event.getSource() == uneditButton)
2973
+ if (source == uneditButton)
27582974 {
27592975 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
27602976 {
....@@ -2766,12 +2982,12 @@
27662982
27672983 child.editWindow = null; // ???????????
27682984 }
2769
- objEditor.ctrlPanel.revalidate();
2985
+ objEditor.ctrlPanel.FlushUI();
27702986 //objEditor.jTree.clearSelection();
27712987 //objEditor.ResetSliders();
27722988 refreshContents(true);
27732989 } else
2774
- if (event.getSource() == clearPanelButton)
2990
+ if (source == clearPanelButton)
27752991 {
27762992 assert(copy == group);
27772993 //copy.ClearUI();
....@@ -2782,7 +2998,7 @@
27822998 listUI.clear();
27832999 refreshContents(true);
27843000 } else
2785
- if (event.getSource() == allParamsButton)
3001
+ if (source == allParamsButton)
27863002 {
27873003 assert(copy == group);
27883004
....@@ -2803,19 +3019,19 @@
28033019
28043020 refreshContents(true);
28053021 } else
2806
- if (event.getSource() == unselectButton)
3022
+ if (source == unselectButton)
28073023 {
28083024 objEditor.jTree.clearSelection();
2809
- // ?? oct 2012 GraphreeD.clipboard.clear();
3025
+ // ?? oct 2012 GrafreeD.clipboard.clear();
28103026 objEditor.ResetSliders();
28113027 refreshContents(true);
28123028 } else
2813
- if(event.getSource() instanceof cRadio)
3029
+ if(source instanceof cRadio)
28143030 {
28153031 group.parent = keepparent;
28163032 group.attributes = 0;
28173033 //group.editWindow = null;
2818
- /*cRadio*/ radio = (cRadio)event.getSource();
3034
+ /*cRadio*/ radio = (cRadio)source;
28193035 Object3D obj = radio.GetObject();
28203036 System.out.println("Edit " + obj);
28213037 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2835,7 +3051,7 @@
28353051 }
28363052
28373053 copy = group;
2838
- //CameraPane.theRenderer.object = group;
3054
+ //Globals.theRenderer.object = group;
28393055 if(!useclient)
28403056 {
28413057 cameraView.renderCamera = radio.camera;
....@@ -2844,7 +3060,8 @@
28443060 cameraView.cameras[cameraView.cameracount] = radio.camera;
28453061 cameraView.targetLookAt.set(radio.camera.lookAt);
28463062 cameraView.object = group;
2847
- cameraView.lighttouched = true;
3063
+ //cameraView.lighttouched = true;
3064
+ Globals.lighttouched = true;
28483065 topView.object = group;
28493066 frontView.object = group;
28503067 sideView.object = group;
....@@ -2880,7 +3097,7 @@
28803097 if (useclient)
28813098 {
28823099 cameraView.object = client;
2883
- cameraView.lighttouched = true;
3100
+ Globals.lighttouched = true;
28843101 //topView.object = client;
28853102 //frontView.object = client;
28863103 //sideView.object = client;
....@@ -2888,7 +3105,7 @@
28883105 else
28893106 {
28903107 cameraView.object = group;
2891
- cameraView.lighttouched = true;
3108
+ Globals.lighttouched = true;
28923109 //topView.object = group;
28933110 //frontView.object = group;
28943111 //sideView.object = group;
....@@ -3121,9 +3338,9 @@
31213338 obj = (Object3D)e.nextElement();
31223339
31233340 System.out.println("Object is: " + obj);
3124
- GraphreeD.AnalyzeObject(obj);
3341
+ GrafreeD.AnalyzeObject(obj);
31253342 System.out.println("Boundary rep: " + obj.bRep);
3126
- GraphreeD.AnalyzeObject(obj.bRep);
3343
+ GrafreeD.AnalyzeObject(obj.bRep);
31273344
31283345 // System.err.println((size/1024) + " KB is the size of " + obj);
31293346 }
....@@ -3165,6 +3382,13 @@
31653382 void GenNormals(boolean crease)
31663383 {
31673384 group.GenNormalsS(crease);
3385
+
3386
+ refreshContents();
3387
+ }
3388
+
3389
+ void GenNormalsMINE()
3390
+ {
3391
+ group.selection.GenNormalsMINE();
31683392
31693393 refreshContents();
31703394 }
....@@ -3250,7 +3474,7 @@
32503474 // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
32513475 // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
32523476 //
3253
-// g.add(GraphreeD.clipboard);
3477
+// g.add(GrafreeD.clipboard);
32543478 //
32553479 // buffer.add(g);
32563480 // }
....@@ -3269,8 +3493,8 @@
32693493 // nodes = new Object3D();
32703494 // vertices = new Vector<Vertex>();
32713495 //
3272
-// boolean epsequal = GraphreeD.epsequal;
3273
-// GraphreeD.epsequal = true;
3496
+// boolean epsequal = GrafreeD.epsequal;
3497
+// GrafreeD.epsequal = true;
32743498 //
32753499 // for (int i=0; i<group.selection.size(); i++)
32763500 // {
....@@ -3311,7 +3535,7 @@
33113535 // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33123536 // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33133537 //
3314
-// g.add(GraphreeD.clipboard);
3538
+// g.add(GrafreeD.clipboard);
33153539 //
33163540 // buffer.add(g);
33173541 // }
....@@ -3319,7 +3543,7 @@
33193543 // makeSomething(buffer, i==group.selection.size()-1);
33203544 // }
33213545 //
3322
-// GraphreeD.epsequal = epsequal;
3546
+// GrafreeD.epsequal = epsequal;
33233547 //
33243548 // //buffer = null;
33253549 // temprep = null;
....@@ -3330,8 +3554,8 @@
33303554
33313555 void ParseVertices()
33323556 {
3333
- boolean epsequal = GraphreeD.epsequal;
3334
- GraphreeD.epsequal = true;
3557
+ boolean epsequal = GrafreeD.epsequal;
3558
+ GrafreeD.epsequal = true;
33353559
33363560 for (int i=0; i<group.selection.size(); i++)
33373561 {
....@@ -3356,7 +3580,7 @@
33563580 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33573581 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33583582
3359
- g.add(GraphreeD.clipboard);
3583
+ g.add(GrafreeD.clipboard);
33603584
33613585 buffer.add(g);
33623586 }
....@@ -3371,7 +3595,7 @@
33713595 makeSomething(buffer, i==group.selection.size()-1);
33723596 }
33733597
3374
- GraphreeD.epsequal = epsequal;
3598
+ GrafreeD.epsequal = epsequal;
33753599
33763600 refreshContents();
33773601 }
....@@ -3389,7 +3613,7 @@
33893613 String pigment = Object3D.GetPigment(tex);
33903614 //String bump = Object3D.GetBump(tex);
33913615
3392
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3616
+ com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
33933617
33943618 double s = v.s;
33953619
....@@ -3416,7 +3640,7 @@
34163640 scale /= 3;
34173641
34183642 scale /= 0xFF;
3419
- scale /= 4;
3643
+ // c'est quoi ca? scale /= 4;
34203644
34213645 //v.AO = scale;
34223646
....@@ -3437,12 +3661,26 @@
34373661
34383662 void Align()
34393663 {
3664
+ if (group.selection.size() == 0)
3665
+ return;
3666
+
3667
+ cVector bbmin = new cVector();
3668
+ cVector bbmax = new cVector();
3669
+
3670
+ group.selection.get(0).getBounds(bbmin, bbmax, true);
3671
+
3672
+ double dx = bbmax.x - bbmin.x;
3673
+ double dy = bbmax.y - bbmin.y;
3674
+ double dz = bbmax.z - bbmin.z;
3675
+
3676
+ double scale = Math.sqrt(dx*dx + dy*dy + dz*dz);
3677
+
34403678 for (int i=0; i<group.selection.size(); i++)
34413679 {
34423680 Object3D obj = group.selection.get(i);
34433681
3444
- LA.matTranslate(obj.toParent, i/2f, 0, 0);
3445
- LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0);
3682
+ LA.matTranslate(obj.toParent, i * scale, 0, 0);
3683
+ LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0);
34463684 }
34473685
34483686 refreshContents();
....@@ -3455,7 +3693,7 @@
34553693 // ref.SaveSupports();
34563694 // Object3D par = ref.parent;
34573695 // ref.parent = null;
3458
-// Object3D lowres = (Object3D) GraphreeD.clone(ref);
3696
+// Object3D lowres = (Object3D) GrafreeD.clone(ref);
34593697 // ref.parent = par;
34603698 // ref.RestoreSupports();
34613699
....@@ -3463,11 +3701,11 @@
34633701
34643702 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
34653703
3466
- boolean random = CameraPane.RANDOM;
3467
- CameraPane.RANDOM = false; // parse all random nodes
3704
+ boolean random = CameraPane.SWITCH;
3705
+ CameraPane.SWITCH = false; // parse all random nodes
34683706 lowres.linkVerticesThis(null);
34693707 lowres.linkVerticesThis(sn);
3470
- CameraPane.RANDOM = random;
3708
+ CameraPane.SWITCH = random;
34713709
34723710 System.err.flush();
34733711
....@@ -3485,7 +3723,7 @@
34853723 // lowres.SaveSupports();
34863724 // par = lowres.parent;
34873725 // lowres.parent = null;
3488
-// Object3D newlow = (Object3D) GraphreeD.clone(lowres);
3726
+// Object3D newlow = (Object3D) GrafreeD.clone(lowres);
34893727 Object3D newlow = CloneObject(lowres, false);
34903728 newlow.name = sn.switchobject.get(i).name;
34913729 System.out.println(" pose#" + i + " = " + newlow);
....@@ -3507,7 +3745,7 @@
35073745 return;
35083746
35093747 Object3D poses = group.selection.get(0);
3510
- Object3D ref = GraphreeD.clipboard.get(0);
3748
+ Object3D ref = GrafreeD.clipboard.get(0);
35113749
35123750 Object3D newgroup = new Object3D("Po:" + poses.name);
35133751
....@@ -3676,7 +3914,7 @@
36763914 group.selection.RelinkToSupport(); // july 2014
36773915 System.out.println("DONE.");
36783916 refreshContents();
3679
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3917
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
36803918 }
36813919
36823920 void ReduceMesh(boolean reduction34)
....@@ -3701,20 +3939,20 @@
37013939
37023940 void ClipMesh()
37033941 {
3704
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
3942
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
37053943 {
3706
- Object3D content = GraphreeD.clipboard.get(0);
3944
+ Object3D content = GrafreeD.clipboard.get(0);
37073945
37083946 if (content instanceof cGroup && ((cGroup)content).transientlink )
37093947 content = ((cGroup)content).get(0);
37103948
37113949 // for (int i=0; i<group.selection.size(); i++)
37123950 // {
3713
-// group.selection.get(i).ClipMesh(GraphreeD.clipboard);
3951
+// group.selection.get(i).ClipMesh(GrafreeD.clipboard);
37143952 // }
3715
- group.selection.ClipMesh(GraphreeD.clipboard);
3953
+ group.selection.ClipMesh(GrafreeD.clipboard);
37163954 }
3717
-// group.selection.ClipMesh(GraphreeD.clipboard);
3955
+// group.selection.ClipMesh(GrafreeD.clipboard);
37183956 System.out.println("DONE.");
37193957 refreshContents();
37203958 }
....@@ -3952,25 +4190,25 @@
39524190 System.err.println("info : " + child.GetPath());
39534191 }
39544192 }
3955
- else
3956
- {
3957
- objEditor.SetMaterial(group); // .GetMaterial());
3958
- objEditor.AddInfo(group, this, true); // .GetMaterial());
3959
- System.err.println("info : " + group.GetPath());
3960
- }
4193
+// else
4194
+// {
4195
+// objEditor.SetMaterial(group); // .GetMaterial());
4196
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4197
+// System.err.println("info : " + group.GetPath());
4198
+// }
39614199
39624200 objEditor.SetText(); // jan 2014
39634201
3964
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4202
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
39654203 CameraPane.flash = true;
39664204
39674205 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
39684206 // a camera
39694207 {
39704208 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;
4209
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4210
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4211
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
39744212 }
39754213
39764214 refreshContents();
....@@ -4052,12 +4290,12 @@
40524290 {
40534291 if (group.selection.isEmpty())
40544292 return;
4055
- GraphreeD.clipboardIsTempGroup = false;
4293
+ GrafreeD.clipboardIsTempGroup = false;
40564294 Composite tGroup = null;
40574295 if (group.selection.size() > 0) // 1)
40584296 {
40594297 tGroup = new cGroup();
4060
- GraphreeD.clipboardIsTempGroup = true;
4298
+ GrafreeD.clipboardIsTempGroup = true;
40614299 }
40624300
40634301 if (cut)
....@@ -4097,16 +4335,16 @@
40974335 //System.out.println("cut " + child);
40984336 //System.out.println("parent = " + child.parent);
40994337 // tmp.addChild(child);
4100
- if (GraphreeD.clipboardIsTempGroup)
4338
+ if (GrafreeD.clipboardIsTempGroup)
41014339 tGroup.add/*Child*/(tmp);
41024340 else
4103
- GraphreeD.clipboard = tmp;
4341
+ GrafreeD.clipboard = tmp;
41044342 }
41054343 else
4106
- if (GraphreeD.clipboardIsTempGroup)
4344
+ if (GrafreeD.clipboardIsTempGroup)
41074345 tGroup.add/*Child*/(child);
41084346 else
4109
- GraphreeD.clipboard = child;
4347
+ GrafreeD.clipboard = child;
41104348 }
41114349
41124350 //ResetModel();
....@@ -4138,21 +4376,21 @@
41384376 //System.out.println("cut " + elem);
41394377 //System.out.println("parent = " + elem.parent);
41404378 // tmp.addChild(elem);
4141
- if (GraphreeD.clipboardIsTempGroup)
4379
+ if (GrafreeD.clipboardIsTempGroup)
41424380 tGroup.add/*Child*/(tmp);
41434381 else
4144
- GraphreeD.clipboard = tmp;
4382
+ GrafreeD.clipboard = tmp;
41454383 }
41464384 else
4147
- if (GraphreeD.clipboardIsTempGroup)
4385
+ if (GrafreeD.clipboardIsTempGroup)
41484386 tGroup.add/*Child*/(child);
41494387 else
4150
- GraphreeD.clipboard = child;
4388
+ GrafreeD.clipboard = child;
41514389 }
41524390
41534391 }
4154
- if (GraphreeD.clipboardIsTempGroup)
4155
- GraphreeD.clipboard = tGroup;
4392
+ if (GrafreeD.clipboardIsTempGroup)
4393
+ GrafreeD.clipboard = tGroup;
41564394 if (cut)
41574395 {
41584396 ResetModel();
....@@ -4162,11 +4400,11 @@
41624400
41634401 void paste(boolean expand)
41644402 {
4165
- // if (GraphreeD.clipboard == null)
4403
+ // if (GrafreeD.clipboard == null)
41664404 // return;
41674405 boolean first = true;
41684406
4169
- if (GraphreeD.clipboardIsTempGroup)
4407
+ if (GrafreeD.clipboardIsTempGroup)
41704408 {
41714409 Composite temp;
41724410
....@@ -4177,7 +4415,7 @@
41774415 temp = (Composite)Applet3D.clipboard.deepCopy();
41784416 */
41794417 Object3D elem;
4180
- for (Enumeration e = /*temp.children*/GraphreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4418
+ for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
41814419 {
41824420 Object3D child = (Object3D)e.nextElement();
41834421
....@@ -4191,7 +4429,7 @@
41914429 else
41924430 elem = child.deepCopy(); // ?
41934431 child.parent = keepparent;
4194
- //if (GraphreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
4432
+ //if (GrafreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
41954433 // elem = elem.get(0);
41964434 makeSomething(elem, true); // ?? first);
41974435 //group.addChild(elem);
....@@ -4211,23 +4449,23 @@
42114449 //Object3D cb = Applet3D.clipboard;
42124450 //temp.addChild(cb);
42134451 //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());
4452
+ assert(GrafreeD.clipboard.parent == null);
4453
+ Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4454
+ GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4455
+ if (LA.isIdentity(GrafreeD.clipboard.toParent))
4456
+ makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
42194457 else
4220
- makeSomething(expand?GraphreeD.clipboard.copyExpand():GraphreeD.clipboard.deepCopy());
4221
- GraphreeD.clipboard.get(0).parent = keepparent;
4458
+ makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4459
+ GrafreeD.clipboard.get(0).parent = keepparent;
42224460 }
42234461
42244462 ResetModel();
42254463 refreshContents();
42264464 }
42274465
4228
- void pasteInto(boolean copyit)
4466
+ void pasteInto(boolean copyit, boolean clone)
42294467 {
4230
-// if (GraphreeD.clipboard == null)
4468
+// if (GrafreeD.clipboard == null)
42314469 // return;
42324470
42334471 if (group.selection.size() != 1)
....@@ -4254,15 +4492,22 @@
42544492 if (copyit)
42554493 {
42564494 // paste(false);
4257
- CloneClipboard(false); // sept 2014
4495
+ if (clone)
4496
+ {
4497
+ CloneClipboard(false); // sept 2014
4498
+ }
4499
+ else
4500
+ {
4501
+ paste(false);
4502
+ }
42584503 }
42594504 else
42604505 {
42614506 boolean first = true;
42624507
4263
- if (GraphreeD.clipboardIsTempGroup)
4508
+ if (GrafreeD.clipboardIsTempGroup)
42644509 {
4265
- Composite temp = (Composite)GraphreeD.clipboard;
4510
+ Composite temp = (Composite)GrafreeD.clipboard;
42664511 Object3D copy;
42674512 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
42684513 {
....@@ -4272,7 +4517,7 @@
42724517 }
42734518 } else
42744519 {
4275
- linkSomething(GraphreeD.clipboard); //.get(0));
4520
+ linkSomething(GrafreeD.clipboard); //.get(0));
42764521 }
42774522 }
42784523 }
....@@ -4464,6 +4709,26 @@
44644709 makeSomething(csg);
44654710 }
44664711
4712
+ void Ungroup(Object3D g)
4713
+ {
4714
+ if (g instanceof HiddenObject)
4715
+ {
4716
+ HiddenObject h = (HiddenObject) g;
4717
+
4718
+ for (int i=0; i<h.ActualSize(); i++)
4719
+ {
4720
+ objEditor.makeSomething(h.get(i), false);
4721
+ }
4722
+ }
4723
+ else
4724
+ {
4725
+ for (int i=0; i<g.Size(); i++)
4726
+ {
4727
+ objEditor.makeSomething(g.get(i), false);
4728
+ }
4729
+ }
4730
+ }
4731
+
44674732 void ungroup()
44684733 {
44694734 /*
....@@ -4659,7 +4924,7 @@
46594924
46604925 void ImportGFD()
46614926 {
4662
- FileDialog browser = new FileDialog(objEditor.frame, "Import GraphreeD", FileDialog.LOAD);
4927
+ FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
46634928 browser.show();
46644929 String filename = browser.getFile();
46654930 if (filename != null && filename.length() > 0)
....@@ -4697,7 +4962,7 @@
46974962
46984963 void ImportVRMLX3D()
46994964 {
4700
- if (GraphreeD.standAlone)
4965
+ if (GrafreeD.standAlone)
47014966 {
47024967 /**/
47034968 FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
....@@ -4714,7 +4979,7 @@
47144979
47154980 String GetFile(String dialogName)
47164981 {
4717
- if (GraphreeD.standAlone)
4982
+ if (GrafreeD.standAlone)
47184983 {
47194984 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
47204985 browser.show();
....@@ -4778,10 +5043,12 @@
47785043 cButton flashSelectionButton;
47795044 cButton editButton;
47805045 cButton uneditButton;
5046
+ JCheckBox allParamsButton;
47815047 cButton clearpanelButton;
4782
- cButton allParamsButton;
47835048 cButton unselectButton;
47845049
5050
+ cButton oneStepButton;
5051
+
47855052 cButton screenfitButton;
47865053 cButton screenfitpointButton;
47875054 cButton snapobjectButton;
....@@ -4823,6 +5090,7 @@
48235090 private MenuItem resetsupportItem;
48245091 private MenuItem resetreferencesItem;
48255092 private MenuItem linkverticesItem;
5093
+ private MenuItem relinkverticesItem;
48265094 private MenuItem setMasterItem;
48275095 private MenuItem resetMeshItem;
48285096 private MenuItem stepAllItem;
....@@ -4835,14 +5103,17 @@
48355103 private MenuItem mergeGeometriesItem;
48365104 private MenuItem copyItem;
48375105 private MenuItem pasteItem;
5106
+ private MenuItem pasteIntoItem;
48385107 private MenuItem pasteLinkItem;
48395108 private MenuItem pasteCloneItem;
48405109 private MenuItem pasteExpandItem;
48415110 private MenuItem clearItem;
48425111 private MenuItem clearAllItem;
48435112 private MenuItem genUVItem;
5113
+ private MenuItem genNormalsMESHItem;
48445114 private MenuItem genNormalsCADItem;
48455115 private MenuItem genNormalsORGANItem;
5116
+ private MenuItem genNormalsMINEItem;
48465117 private MenuItem stripifyItem;
48475118 private MenuItem unstripifyItem;
48485119 private MenuItem trimItem;
....@@ -4884,6 +5155,7 @@
48845155 private MenuItem resetCentroidItem;
48855156 private MenuItem transformgeometryItem;
48865157 private MenuItem resetTransformItem;
5158
+ private MenuItem hideItem;
48875159 private MenuItem grabItem;
48885160 private MenuItem backItem;
48895161 private MenuItem frontItem;
....@@ -4904,6 +5176,7 @@
49045176
49055177 private MenuItem resetParentItem;
49065178 private MenuItem repairParentItem;
5179
+ private MenuItem repairShadowItem;
49075180 private MenuItem sortbysizeItem;
49085181 private MenuItem sortbynameItem;
49095182
....@@ -4924,10 +5197,11 @@
49245197 private MenuItem coneItem;
49255198 private MenuItem torusItem;
49265199 private MenuItem superItem;
5200
+ private MenuItem kleinItem;
49275201 private MenuItem blobItem;
49285202 private MenuItem latheItem;
49295203 private MenuItem bezierItem;
4930
- private MenuItem checkerItem;
5204
+ private MenuItem overlayItem;
49315205 private MenuItem meshItem;
49325206 // private MenuItem meshGroupItem;
49335207 private MenuItem springItem;
....@@ -4936,6 +5210,7 @@
49365210 private MenuItem csgItem;
49375211 private MenuItem templateItem;
49385212 private MenuItem textureItem;
5213
+ private MenuItem billboardItem;
49395214 private MenuItem shadowXItem;
49405215 private MenuItem shadowYItem;
49415216 private MenuItem shadowZItem;