Normand Briere
2019-05-02 a7277e6c6381e55761f7fa87276260fac1c94d5e
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,13 +433,13 @@
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..."));
442
+ importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
384443 importGFDItem.addActionListener(this);
385444 importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
386445 importVRMLX3DItem.addActionListener(this);
....@@ -423,150 +482,98 @@
423482 oe.radioPanel.add(dummyButton);
424483 oe.buttonGroup.add(dummyButton);
425484 */
426
- aConstraints.gridy += 1;
427
- oe.aConstraints.gridwidth = 1;
428
- oe.aConstraints.gridx = 0;
485
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
429486
430
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints);
487
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
488
+ liveCB.setToolTipText("Enabled animation");
431489 liveCB.addItemListener(this);
432490
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);
491
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
492
+ oneStepButton.setToolTipText("Animate one step forward");
493
+ oneStepButton.addActionListener(this);
494
+
495
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
496
+ fastCB.setToolTipText("Fast mode");
451497 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);
498
+
499
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
500
+ trackCB.setToolTipText("Enable tracking");
493501 trackCB.addItemListener(this);
494502
495
- oe.aConstraints.gridx += 1;
496
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
503
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
504
+ screenfitButton.setToolTipText("Screen fit");
497505 screenfitButton.addActionListener(this);
498
- oe.aConstraints.gridx += 1;
506
+
499507 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
500508 // 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;
505509
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);
510
+ if (Globals.ADVANCED)
511
+ {
512
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
513
+ snapobjectButton.addActionListener(this);
514
+ snapobjectButton.setToolTipText("Snap Object");
515
+ }
516
+
517
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
518
+ flashSelectionButton.setToolTipText("Show selection");
512519 flashSelectionButton.addActionListener(this);
513
- oe.aConstraints.gridx += 1;
514
- oe.aConstraints.weighty = 0;
515
- oe.aConstraints.gridwidth = 1;
516520
517
- //
518
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
521
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
522
+
523
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
524
+ twoButton.setToolTipText("Show center view only");
519525 twoButton.addActionListener(this);
520
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
526
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
521527 fourButton.addActionListener(this);
522
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
528
+ fourButton.setToolTipText("Show left panel only");
529
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
530
+ sixButton.setToolTipText("2-column layout left");
523531 sixButton.addActionListener(this);
524
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
532
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
533
+ threeButton.setToolTipText("2-column layout right");
525534 threeButton.addActionListener(this);
526
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
535
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
536
+ sevenButton.setToolTipText("3-column layout");
527537 sevenButton.addActionListener(this);
528538 //
529539
530
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
540
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
541
+ rootButton.setToolTipText("Edit selection in new tab");
531542 rootButton.addActionListener(this);
532
- oe.aConstraints.gridx += 1;
533
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
543
+
544
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
545
+ closeButton.setToolTipText("Close tab");
534546 closeButton.addActionListener(this);
535547 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
536548 //clearButton.addActionListener(this);
537
- oe.aConstraints.gridx += 1;
538549
539
- oe.aConstraints.gridx = 1; //
540
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
550
+ cGridBag commandsPanel = new cGridBag();
551
+
552
+ commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
553
+ editButton.setToolTipText("Edit selection");
541554 editButton.addActionListener(this);
542
- oe.aConstraints.gridx += 1;
543
- oe.aConstraints.weighty = 0;
544
- oe.aConstraints.gridwidth = 1;
545555
546
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
556
+ commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
557
+ uneditButton.setToolTipText("Unedit selection");
547558 uneditButton.addActionListener(this);
548559
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);
560
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
561
+ allParamsButton.setToolTipText("Edit all params");
561562 allParamsButton.addActionListener(this);
562563
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);
564
+ commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
565
+ clearPanelButton.setToolTipText("Clear edit panel");
566
+ clearPanelButton.addActionListener(this);
567
+
568
+ commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
569
+ unselectButton.setToolTipText("Unselect");
568570 unselectButton.addActionListener(this);
569571
572
+ commandsPanel.preferredHeight = 1;
573
+
574
+ oe.treePanel.add(commandsPanel);
575
+ oe.treePanel.Return();
576
+
570577 // oe.aConstraints.gridx += 1;
571578 // oe.aConstraints.weighty = 0;
572579 // oe.aConstraints.gridwidth = 1;
....@@ -578,40 +585,37 @@
578585 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
579586 // gcButton.addActionListener(this);
580587
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;
588
+ cGridBag jSPPanel = new cGridBag();
589
+
590
+ JScrollPane jSP;
592591 //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);
592
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
594593 ResetModel();
595
- oe.aConstraints.weighty = 0.5;
596
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
597
- oe.aConstraints.gridy += 1;
598
- oe.aConstraints.gridwidth = 1;
594
+
595
+ oe.treePanel.add(jSPPanel);
596
+ oe.treePanel.Return();
599597
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);
598
+ cGridBag copyOptionsPanel = new cGridBag();
599
+
600
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
601
+ colorCB.setToolTipText("Copy color when dropped");
604602 colorCB.addItemListener(this);
605
- oe.aConstraints.gridx += 2;
606
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
603
+
604
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
605
+ materialCB.setToolTipText("Copy material when dropped");
607606 materialCB.addItemListener(this);
608
- oe.aConstraints.gridx += 2;
609
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
607
+
608
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
609
+ textureCB.setToolTipText("Copy texture when dropped");
610610 textureCB.addItemListener(this);
611611
612
- oe.aConstraints.gridx = 0;
613
- oe.aConstraints.gridy += 1;
612
+ copyOptionsPanel.preferredHeight = 1;
613
+ oe.treePanel.add(copyOptionsPanel);
614
+ oe.treePanel.Return();
614615
616
+// mainPanel.setDividerLocation(0.5); //1.0);
617
+// mainPanel.setResizeWeight(0.5);
618
+
615619 //jList.addListSelectionListener(this);
616620 oe.jTree.addTreeSelectionListener(this);
617621 //jTree.setRootVisible(false);
....@@ -633,17 +637,89 @@
633637 radio.layout = sevenButton;
634638 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
635639 }
640
+
641
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
642
+ {
643
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
644
+ boxCB.setToolTipText("Display bounding boxes");
645
+ boxCB.addItemListener(this);
646
+
647
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
648
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
649
+ zoomBoxCB.addItemListener(this);
650
+
651
+ if (Globals.ADVANCED)
652
+ {
653
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
654
+ supportCB.setToolTipText("Enable rigging");
655
+ supportCB.addItemListener(this);
656
+
657
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
658
+ // localCB.addItemListener(this);
659
+
660
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
661
+ crowdCB.setToolTipText("Used for crowds");
662
+ crowdCB.addItemListener(this);
663
+
664
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
665
+ smoothCB.setToolTipText("Snapping delay");
666
+ smoothCB.addItemListener(this);
667
+
668
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
669
+ slowCB.setToolTipText("Smooth interpolation");
670
+ slowCB.addItemListener(this);
671
+
672
+// constraints.gridy += 1;
673
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
674
+// speakerMocapCB.addItemListener(this);
675
+
676
+ if (false)
677
+ {
678
+ // handled in scripts
679
+ //constraints.gridy += 1;
680
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
681
+ speakerCameraCB.addItemListener(this);
682
+
683
+ //constraints.gridy += 1;
684
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
685
+ speakerFocusCB.addItemListener(this);
686
+
687
+ //constraints.gridy += 1;
688
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
689
+ smoothfocusCB.addItemListener(this);
690
+ }
691
+
692
+//constraints.gridx += 1;
693
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
694
+// debugCB.addItemListener(this);
695
+
696
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
697
+ oeilCB.addItemListener(this);
698
+
699
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
700
+ lookAtCB.setToolTipText("Look-at target");
701
+ lookAtCB.addItemListener(this);
702
+
703
+ }
704
+
705
+ cGridBag fill = new cGridBag();
706
+
707
+ fill.preferredHeight = 200;
708
+
709
+ panel.add(fill);
710
+
711
+ }
636712
637713 void EditObject(Object3D obj)
638714 {
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();
715
+ cRadio radioButton = new cRadio(obj.name);
716
+ radioButton.SetObject(obj);
717
+ radioButton.layout = sevenButton;
718
+ radioButton.SetCamera(cameraView.renderCamera, false);
719
+ radioButton.addActionListener(this);
720
+ radioPanel.add(radioButton);
721
+ buttonGroup.add(radioButton);
722
+ radioButton.doClick();
647723 }
648724 void SetupViews(ObjEditor oe)
649725 {
....@@ -663,6 +739,7 @@
663739 JCheckBox fastCB;
664740 JCheckBox slowCB;
665741 JCheckBox boxCB;
742
+ JCheckBox zoomBoxCB;
666743 JCheckBox trackCB;
667744 JCheckBox smoothfocusCB;
668745 // JCheckBox speakerMocapCB;
....@@ -705,8 +782,7 @@
705782 dropAttributes |= Object3D.TEXTURE;
706783 else
707784 dropAttributes &= ~Object3D.TEXTURE;
708
- }
709
- else if(e.getSource() == liveCB)
785
+ } else if(e.getSource() == liveCB)
710786 {
711787 cameraView.ToggleLive();
712788 }
....@@ -743,6 +819,10 @@
743819 Recompile();
744820 cameraView.repaint();
745821 // refreshContents();
822
+ }
823
+ else if(e.getSource() == zoomBoxCB)
824
+ {
825
+ cameraView.ToggleZoomBoxMode();
746826 }
747827 else if(e.getSource() == smoothfocusCB)
748828 {
....@@ -911,11 +991,11 @@
911991 {
912992 loadClipboard(true);
913993 objEditor.jTree.setSelectionPath(destinationPath);
914
- pasteInto(false);
994
+ pasteInto(false, false);
915995 } else {
916996 loadClipboard(false);
917997 objEditor.jTree.setSelectionPath(destinationPath);
918
- pasteInto(false); // true); // ???
998
+ pasteInto(false, false); // true); // ???
919999 }
9201000 }
9211001 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1033,29 +1113,37 @@
10331113 torusItem.addActionListener(this);
10341114 superItem = menu.add(new MenuItem("Superellipsoid"));
10351115 superItem.addActionListener(this);
1116
+ kleinItem = menu.add(new MenuItem("Klein Bottle"));
1117
+ kleinItem.addActionListener(this);
10361118 particleItem = menu.add(new MenuItem("Particle system"));
10371119 particleItem.addActionListener(this);
1120
+ if (Globals.ADVANCED)
1121
+ {
10381122 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10391123 ragdollItem.addActionListener(this);
10401124 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10411125 ragdoll2Item.addActionListener(this);
1126
+ }
10421127 menu.add("-");
1043
- meshItem = menu.add(new MenuItem("Mesh"));
1128
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10441129 meshItem.addActionListener(this);
10451130 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10461131 // meshGroupItem.addActionListener(this);
1132
+ if (Globals.ADVANCED)
1133
+ {
10471134 springItem = menu.add(new MenuItem("Spring"));
10481135 springItem.addActionListener(this);
10491136 flagItem = menu.add(new MenuItem("Flag"));
10501137 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);
10551138 blobItem = menu.add(new MenuItem("Blob"));
10561139 blobItem.addActionListener(this);
10571140 latheItem = menu.add(new MenuItem("Lathe"));
10581141 latheItem.addActionListener(this);
1142
+ }
1143
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1144
+ bezierItem.addActionListener(this);
1145
+ overlayItem = menu.add(new MenuItem("Overlay"));
1146
+ overlayItem.addActionListener(this);
10591147 lightItem = menu.add(new MenuItem("Light"));
10601148 lightItem.addActionListener(this);
10611149 menu.add("-");
....@@ -1065,34 +1153,39 @@
10651153 loopItem.addActionListener(this);
10661154 doubleItem = menu.add(new MenuItem("Fork"));
10671155 doubleItem.addActionListener(this);
1156
+ if (Globals.ADVANCED)
1157
+ {
10681158 tripleItem = menu.add(new MenuItem("Trident"));
10691159 tripleItem.addActionListener(this);
1160
+ }
10701161 }
10711162
10721163 void buildToolsMenu(Menu menu)
10731164 {
10741165 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10751166 animationItem.addItemListener(this);
1076
- animationItem.setState(CameraPane.ANIMATION);
1167
+ animationItem.setState(Globals.ANIMATION);
10771168
10781169 menu.add("-");
10791170 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
10801171 parseverticesItem.addActionListener(this);
10811172 textureFieldItem = menu.add(new MenuItem("Texture Field"));
10821173 textureFieldItem.addActionListener(this);
1083
- alignItem = menu.add(new MenuItem("Align"));
1174
+ alignItem = menu.add(new MenuItem("Align Objects"));
10841175 alignItem.addActionListener(this);
1085
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1086
- mirrorItem.addActionListener(this);
10871176 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
10881177 reduceMorphItem.addActionListener(this);
10891178 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
10901179 reduce34MorphItem.addActionListener(this);
1091
-
1180
+ menu.add("-");
10921181 menu.add(computeAOItem = new MenuItem("Compute AO"));
10931182 computeAOItem.addActionListener(this);
1094
- menu.add("-");
10951183
1184
+ if (Globals.ADVANCED)
1185
+ {
1186
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1187
+ mirrorItem.addActionListener(this);
1188
+ menu.add("-");
10961189 menu.add(memoryItem = new MenuItem("Memory Usage"));
10971190 memoryItem.addActionListener(this);
10981191 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1106,6 +1199,8 @@
11061199 resetParentItem.addActionListener(this);
11071200 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11081201 repairParentItem.addActionListener(this);
1202
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1203
+ repairShadowItem.addActionListener(this);
11091204 menu.add(invariantsItem = new MenuItem("Invariants"));
11101205 invariantsItem.addActionListener(this);
11111206 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1113,6 +1208,7 @@
11131208 menu.add("-");
11141209 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11151210 editScriptItem.addActionListener(this);
1211
+ }
11161212 }
11171213
11181214 void ScreenFit()
....@@ -1441,9 +1537,9 @@
14411537
14421538 void Overwrite(int mask)
14431539 {
1444
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
1540
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
14451541 {
1446
- Object3D content = GraphreeD.clipboard.get(0);
1542
+ Object3D content = GrafreeD.clipboard.get(0);
14471543
14481544 if (content instanceof cGroup && ((cGroup)content).transientlink )
14491545 content = ((cGroup)content).get(0);
....@@ -1466,6 +1562,7 @@
14661562 //
14671563 public void actionPerformed(ActionEvent event) // , Object arg)
14681564 {
1565
+ Object source = event.getSource();
14691566 /*
14701567 if (event.getSource() == nameField)
14711568 {
....@@ -1477,11 +1574,11 @@
14771574 }
14781575 else
14791576 */
1480
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1577
+ if (source == lookAtItem || source == lookFromItem)
14811578 {
14821579 ScreenFit();
14831580 } else
1484
- if (event.getSource() == switchItem)
1581
+ if (source == switchItem)
14851582 {
14861583 cVector v1 = new cVector();
14871584 cVector v2 = new cVector();
....@@ -1490,11 +1587,11 @@
14901587 objEditor.cameraView.renderCamera.setAim(v2, v1);
14911588 objEditor.cameraView.repaint();
14921589 } else
1493
- if (event.getSource() == rectoidItem)
1590
+ if (source == rectoidItem)
14941591 {
14951592 makeSomething(new Box());
14961593 } else
1497
- if (event.getSource() == particleItem)
1594
+ if (source == particleItem)
14981595 {
14991596 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15001597 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1515,9 +1612,9 @@
15151612 applyExample(particleGeom, "SMOKE");
15161613 makeSomething(particleGeom);
15171614 } else
1518
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1615
+ if (source == ragdollItem || source == ragdoll2Item)
15191616 {
1520
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1617
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15211618
15221619 ragdoll.toParent = LA.newMatrix();
15231620 ragdoll.fromParent = LA.newMatrix();
....@@ -1535,7 +1632,7 @@
15351632 } else
15361633 /*
15371634 */
1538
- if (event.getSource() == heightFieldItem)
1635
+ if (source == heightFieldItem)
15391636 {
15401637 Object3D obj = new Object3D();
15411638
....@@ -1573,27 +1670,31 @@
15731670
15741671 makeSomething(obj);
15751672 } else
1576
- if (event.getSource() == gridItem)
1673
+ if (source == gridItem)
15771674 {
15781675 makeSomething(new Grid());
15791676 } else
1580
- if (event.getSource() == ellipsoidItem)
1677
+ if (source == ellipsoidItem)
15811678 {
15821679 makeSomething(new Sphere());
15831680 } else
1584
- if (event.getSource() == coneItem)
1681
+ if (source == coneItem)
15851682 {
15861683 makeSomething(new Cone());
15871684 } else
1588
- if (event.getSource() == torusItem)
1685
+ if (source == torusItem)
15891686 {
15901687 makeSomething(new Torus());
15911688 } else
1592
- if (event.getSource() == superItem)
1689
+ if (source == superItem)
15931690 {
15941691 makeSomething(new Superellipsoid());
15951692 } else
1596
- if (event.getSource() == blobItem)
1693
+ if (source == kleinItem)
1694
+ {
1695
+ makeSomething(new Klein());
1696
+ } else
1697
+ if (source == blobItem)
15971698 {
15981699 Blob blob = new Blob();
15991700 BlobComponent comp = new BlobComponent();
....@@ -1601,15 +1702,15 @@
16011702 //blob.retile();
16021703 makeSomething(blob);
16031704 } else
1604
- if (event.getSource() == latheItem)
1705
+ if (source == latheItem)
16051706 {
16061707 makeSomething(new Lathe());
16071708 } else
1608
- if (event.getSource() == bezierItem)
1709
+ if (source == bezierItem)
16091710 {
16101711 makeSomething(new BezierSurface());
16111712 } else
1612
- if (event.getSource() == checkerItem)
1713
+ if (source == overlayItem)
16131714 {
16141715 /*
16151716 Object3D obj = new BezierSurface(5,8);
....@@ -1624,7 +1725,7 @@
16241725 */
16251726 makeSomething(new Checker());
16261727 } else
1627
- if (event.getSource() == meshItem)
1728
+ if (source == meshItem)
16281729 {
16291730 Object3D itemtomake = new Object3D();
16301731 Object3D child;
....@@ -1645,35 +1746,35 @@
16451746 makeSomething(child);
16461747 }
16471748 } else
1648
- if (event.getSource() == springItem)
1749
+ if (source == springItem)
16491750 {
16501751 cSpring s = new cSpring();
16511752 s.setup();
16521753 makeSomething(s);
16531754 } else
1654
- if (event.getSource() == flagItem)
1755
+ if (source == flagItem)
16551756 {
16561757 cSpring s = new cFlag();
16571758 s.setup();
16581759 makeSomething(s);
16591760 } else
1660
- if (event.getSource() == lightItem)
1761
+ if (source == lightItem)
16611762 {
16621763 makeSomething(new Light());
16631764 } else
1664
- if (event.getSource() == csgItem)
1765
+ if (source == csgItem)
16651766 {
16661767 group(new CSG());
16671768 } else
1668
- if (event.getSource() == templateItem)
1769
+ if (source == templateItem)
16691770 {
16701771 group(new cTemplate());
16711772 } else
1672
- if (event.getSource() == attributeItem)
1773
+ if (source == attributeItem)
16731774 {
16741775 makeSomething(new Attribute());
16751776 } else
1676
- if (event.getSource() == pointflowItem)
1777
+ if (source == pointflowItem)
16771778 {
16781779 makeSomething(new PointFlow());
16791780 } else
....@@ -1685,7 +1786,7 @@
16851786 } else
16861787 */
16871788
1688
- if (event.getSource() == superLoopItem)
1789
+ if (source == superLoopItem)
16891790 {
16901791 Composite g = new cGroup();
16911792 for (int i=0; i<15; i++)
....@@ -1707,7 +1808,7 @@
17071808
17081809 group(g);
17091810 } else
1710
- if (event.getSource() == loopItem)
1811
+ if (source == loopItem)
17111812 {
17121813 Composite csg = new GroupLeaf();
17131814 csg.count = 5;
....@@ -1716,7 +1817,7 @@
17161817 csg.addChild(child);
17171818 child.addChild(csg);
17181819 } else
1719
- if (event.getSource() == doubleItem)
1820
+ if (source == doubleItem)
17201821 {
17211822 Composite csg = new GroupLeaf();
17221823 csg.count = 5;
....@@ -1728,7 +1829,7 @@
17281829 csg.addChild(child);
17291830 child.addChild(csg);
17301831 } else
1731
- if (event.getSource() == tripleItem)
1832
+ if (source == tripleItem)
17321833 {
17331834 Composite csg = new GroupLeaf();
17341835 csg.count = 4;
....@@ -1744,70 +1845,75 @@
17441845 child.addChild(csg);
17451846 } else
17461847
1747
- if (event.getSource() == importGFDItem)
1848
+ if (source == importGFDItem)
17481849 {
17491850 ImportGFD();
17501851 } else
1751
- if (event.getSource() == importVRMLX3DItem)
1852
+ if (source == importVRMLX3DItem)
17521853 {
17531854 ImportVRMLX3D();
17541855 } else
1755
- if (event.getSource() == import3DSItem)
1856
+ if (source == import3DSItem)
17561857 {
17571858 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17581859 } else
1759
- if (event.getSource() == importOBJItem)
1860
+ if (source == importOBJItem)
17601861 {
17611862 objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
17621863 } else
1763
- if (event.getSource() == computeAOItem)
1864
+ if (source == computeAOItem)
17641865 {
1765
- CameraPane.drawMode = CameraPane.OCCLUSION;
1766
- CameraPane.theRenderer.repaint();
1866
+ Globals.drawMode = CameraPane.OCCLUSION;
1867
+ Globals.theRenderer.repaint();
17671868 } else
1768
- if (event.getSource() == recompileItem)
1869
+ if (source == recompileItem)
17691870 {
17701871 Recompile();
17711872 refreshContents();
17721873 } else
1773
- if (event.getSource() == editScriptItem)
1874
+ if (source == editScriptItem)
17741875 {
17751876 OpenDialog();
17761877 refreshContents();
17771878 } else
1778
- if (event.getSource() == invariantsItem)
1879
+ if (source == invariantsItem)
17791880 {
17801881 System.out.println("Invariants:");
1781
- GraphreeD.theApplet3D.universe.invariants();
1882
+ GrafreeD.grafreeD.universe.invariants();
17821883 } else
1783
- if (event.getSource() == memoryItem)
1884
+ if (source == memoryItem)
17841885 {
17851886 //System.out.println("Invariants:");
17861887 PrintMemory();
17871888 } else
1788
- if (event.getSource() == pathItem)
1889
+ if (source == pathItem)
17891890 {
17901891 PrintPath();
17911892 } else
1792
- if (event.getSource() == analyzeItem)
1893
+ if (source == analyzeItem)
17931894 {
17941895 AnalyzeObject();
17951896 } else
1796
- if (event.getSource() == dumpItem)
1897
+ if (source == dumpItem)
17971898 {
17981899 DumpObject();
17991900 } else
1800
- if (event.getSource() == screenfitButton)
1901
+ if (source == oneStepButton)
1902
+ {
1903
+ Globals.ONESTEP = true;
1904
+ cameraView.repaint();
1905
+ } else
1906
+ if (source == screenfitButton)
18011907 {
18021908 //Reload(lastConverter, lastFilename, true);
18031909 ScreenFit();
18041910 } else
1805
- if (event.getSource() == screenfitpointButton)
1911
+ if (source == screenfitpointButton)
18061912 {
18071913 //Reload(lastConverter, lastFilename, true);
18081914 ScreenFitPoint();
18091915 } else
1810
- if (event.getSource() == snapobjectButton)
1916
+ if (source == snapobjectButton)
18111917 {
18121918 //Reload(lastConverter, lastFilename, true);
18131919 SnapObject();
....@@ -1818,13 +1924,13 @@
18181924 // Recompile();
18191925 // refreshContents();
18201926 // } else
1821
- if (event.getSource() == gcButton)
1927
+ if (source == gcButton)
18221928 {
18231929 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18241930 System.gc();
18251931 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18261932 } else
1827
- if (event.getSource() == editLeafItem)
1933
+ if (source == editLeafItem)
18281934 {
18291935 Object3D obj;
18301936 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1838,65 +1944,70 @@
18381944 }
18391945 refreshContents(true);
18401946 } else
1841
- if (event.getSource() == openWindowItem)
1947
+ if (source == openWindowItem)
18421948 {
18431949 EditSelection(true);
18441950 } else
1845
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1951
+ if (source == cutItem || source == clearButton)
18461952 {
18471953 loadClipboard(true);
18481954 } else
1849
- if (event.getSource() == duplicateItem)
1955
+ if (source == duplicateItem)
18501956 {
1851
- Object3D keep = GraphreeD.clipboard;
1957
+ Object3D keep = GrafreeD.clipboard;
18521958 loadClipboard(false);
18531959 paste(false);
1854
- GraphreeD.clipboard = keep;
1960
+ GrafreeD.clipboard = keep;
18551961 } else
1856
- if (event.getSource() == cloneItem)
1962
+ if (source == cloneItem)
18571963 {
18581964 CloneSelection(false);
18591965 } else
1860
- if (event.getSource() == cloneSupportItem)
1966
+ if (source == cloneSupportItem)
18611967 {
18621968 CloneSelection(true);
18631969 } else
1864
- if (event.getSource() == copyItem)
1970
+ if (source == copyItem)
18651971 {
18661972 loadClipboard(false);
18671973 } else
1868
- if (event.getSource() == pasteItem)
1974
+ if (source == pasteItem)
18691975 {
18701976 paste(false);
18711977 } else
1872
- if (event.getSource() == pasteLinkItem)
1978
+ if (source == pasteIntoItem)
18731979 {
1874
- pasteInto(false);
1980
+ pasteInto(true, false);
18751981 } else
1876
- if (event.getSource() == pasteCloneItem)
1982
+ if (source == pasteLinkItem)
18771983 {
1878
- pasteInto(true);
1984
+ pasteInto(false, false);
18791985 } else
1880
- if (event.getSource() == pasteExpandItem)
1986
+ if (source == pasteCloneItem)
1987
+ {
1988
+ pasteInto(true, true);
1989
+ } else
1990
+ if (source == pasteExpandItem)
18811991 {
18821992 paste(true);
18831993 } else
1884
- if (event.getSource() == synchronizeItem)
1994
+ if (source == synchronizeItem)
18851995 {
18861996 Overwrite(Object3D.TRANSFORM);
18871997 } else
1888
- if (event.getSource() == overwriteNameItem)
1998
+ if (source == overwriteNameItem)
18891999 {
18902000 Overwrite(Object3D.NAME);
18912001 } else
1892
- if (event.getSource() == overwriteUVItem)
2002
+ if (source == overwriteUVItem)
18932003 {
18942004 Overwrite(Object3D.UV);
18952005 } else
1896
- if (event.getSource() == overwriteMatItem)
2006
+ if (source == overwriteMatItem)
18972007 {
2008
+ /* july 2015
18982009 if ((dropAttributes & Object3D.TEXTURE) == 0)
1899
- Overwrite(Object3D.MATERIAL);
2010
+ Overwrite(Object3D.MATERIAL | Object3D.COLOR);
19002011 else
19012012 {
19022013 if ((dropAttributes & Object3D.COLOR) == 0 && (dropAttributes & Object3D.MATERIAL) == 0)
....@@ -1908,13 +2019,16 @@
19082019 Overwrite(Object3D.MATERIAL | Object3D.TEXTURE);
19092020 }
19102021 }
2022
+ */
2023
+
2024
+ Overwrite(dropAttributes);
19112025 }
1912
- if (event.getSource() == overwriteGeoItem)
2026
+ if (source == overwriteGeoItem)
19132027 {
19142028 Overwrite(Object3D.GEOMETRY);
1915
-// if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
2029
+// if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
19162030 // {
1917
-// Object3D content = GraphreeD.clipboard.get(0);
2031
+// Object3D content = GrafreeD.clipboard.get(0);
19182032 //
19192033 // if (content instanceof cGroup && ((cGroup)content).transientlink )
19202034 // content = ((cGroup)content).get(0);
....@@ -1926,7 +2040,7 @@
19262040 // refreshContents();
19272041 // }
19282042 } else
1929
- if (event.getSource() == generateMeshItem)
2043
+ if (source == generateMeshItem)
19302044 {
19312045 //if (group.selection.size() == 1)
19322046 // for (int i=0; i<group.selection.size(); i++)
....@@ -1937,7 +2051,7 @@
19372051 ResetModel();
19382052 refreshContents();
19392053 } else
1940
- if (event.getSource() == extractGeometriesItem)
2054
+ if (source == extractGeometriesItem)
19412055 {
19422056 boolean one = false;
19432057
....@@ -1964,7 +2078,7 @@
19642078 ResetModel();
19652079 refreshContents();
19662080 } else
1967
- if (event.getSource() == cloneGeometriesItem)
2081
+ if (source == cloneGeometriesItem)
19682082 {
19692083 boolean one = false;
19702084
....@@ -1990,32 +2104,37 @@
19902104 ResetModel();
19912105 refreshContents();
19922106 } else
1993
- if (event.getSource() == shareGeometriesItem)
2107
+ if (source == shareGeometriesItem)
19942108 {
19952109 boolean one = false;
19962110
19972111 if (group.selection.size() == 1)
19982112 one = true;
19992113
2114
+ Object3D merge = null;
2115
+
20002116 Object3D content = new cGroup();
20012117
20022118 for (int i=0; i<group.selection.size(); i++)
20032119 {
2004
- Object3D sel = new Merge(group.selection.get(i));
2120
+ merge = new Merge(group.selection.get(i));
20052121
20062122 if (one)
2007
- makeSomething(sel, false);
2123
+ makeSomething(merge, false);
20082124 else
2009
- content.addChild(sel);
2125
+ content.addChild(merge);
20102126 }
20112127
20122128 if (!one)
2013
- makeSomething(content, false);
2014
-
2015
- ResetModel();
2016
- refreshContents();
2129
+ makeSomething(content, true);
2130
+ else
2131
+ {
2132
+ ResetModel();
2133
+ Select(merge.GetTreePath(), true, false); // unselect... false);
2134
+ refreshContents();
2135
+ }
20172136 } else
2018
- if (event.getSource() == mergeGeometriesItem)
2137
+ if (source == mergeGeometriesItem)
20192138 {
20202139 boolean one = false;
20212140
....@@ -2045,11 +2164,11 @@
20452164 ResetModel();
20462165 refreshContents();
20472166 } else
2048
- if (event.getSource() == linkverticesItem)
2167
+ if (source == linkverticesItem)
20492168 {
2050
-// if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2169
+// if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20512170 // {
2052
-// Object3D content = GraphreeD.clipboard.get(0);
2171
+// Object3D content = GrafreeD.clipboard.get(0);
20532172 //
20542173 // if (content instanceof cGroup && ((cGroup)content).transientlink )
20552174 // content = ((cGroup)content).get(0);
....@@ -2058,39 +2177,48 @@
20582177 // group.selection.get(0).setMasterThis(content); // should be identity
20592178 // refreshContents();
20602179 // }
2061
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
2180
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
20622181 {
2063
- Object3D content = GraphreeD.clipboard.get(0);
2182
+ Object3D content = GrafreeD.clipboard.get(0);
20642183
20652184 if (content instanceof cGroup && ((cGroup)content).transientlink )
20662185 content = ((cGroup)content).get(0);
20672186
2068
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2187
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20692188 for (int i=0; i<group.selection.size(); i++)
20702189 {
2071
- boolean random = CameraPane.RANDOM;
2072
- CameraPane.RANDOM = false; // parse all random nodes
2190
+ boolean random = CameraPane.SWITCH;
2191
+ CameraPane.SWITCH = false; // parse all random nodes
20732192 group.selection.get(i).linkVerticesThis(content);
20742193 // group.selection.get(i).setMasterThis(content); // should be identity
2075
- CameraPane.RANDOM = random;
2194
+ CameraPane.SWITCH = random;
20762195 }
2077
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2196
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
20782197 refreshContents();
20792198 }
20802199 } else
2081
- if (event.getSource() == resetsupportItem)
2200
+ if (source == resetsupportItem)
20822201 {
20832202 for (int i=0; i<group.selection.size(); i++)
20842203 {
2085
- boolean random = CameraPane.RANDOM;
2086
- CameraPane.RANDOM = false; // parse all random nodes
2204
+ boolean random = CameraPane.SWITCH;
2205
+ CameraPane.SWITCH = false; // parse all random nodes
20872206 group.selection.get(i).linkVerticesThis(null);
2088
- CameraPane.RANDOM = random;
2207
+ CameraPane.SWITCH = random;
20892208 }
20902209
20912210 refreshContents();
20922211 } else
2093
- if (event.getSource() == resetreferencesItem)
2212
+ if (source == relinkverticesItem)
2213
+ {
2214
+ boolean random = CameraPane.SWITCH;
2215
+ CameraPane.SWITCH = false; // parse all random nodes
2216
+ group.selection.RelinkToSupport();
2217
+ CameraPane.SWITCH = random;
2218
+
2219
+ refreshContents();
2220
+ } else
2221
+ if (source == resetreferencesItem)
20942222 {
20952223 for (int i=0; i<group.selection.size(); i++)
20962224 {
....@@ -2099,11 +2227,11 @@
20992227
21002228 refreshContents();
21012229 } else
2102
- if (event.getSource() == setMasterItem)
2230
+ if (source == setMasterItem)
21032231 {
2104
- if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2232
+ if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21052233 {
2106
- Object3D content = GraphreeD.clipboard.get(0);
2234
+ Object3D content = GrafreeD.clipboard.get(0);
21072235
21082236 if (content instanceof cGroup && ((cGroup)content).transientlink )
21092237 content = ((cGroup)content).get(0);
....@@ -2112,13 +2240,13 @@
21122240 refreshContents();
21132241 }
21142242 } else
2115
- if (event.getSource() == poseMeshItem)
2243
+ if (source == poseMeshItem)
21162244 {
21172245 if (group.selection.size() == 1)
21182246 {
2119
- if (GraphreeD.clipboard.size() == 1)
2247
+ if (GrafreeD.clipboard.size() == 1)
21202248 {
2121
- Object3D content = GraphreeD.clipboard.get(0);
2249
+ Object3D content = GrafreeD.clipboard.get(0);
21222250
21232251 if (content instanceof cGroup && ((cGroup)content).transientlink )
21242252 content = ((cGroup)content).get(0);
....@@ -2131,19 +2259,19 @@
21312259 }
21322260
21332261 } else
2134
- if (event.getSource() == revertMeshItem)
2262
+ if (source == revertMeshItem)
21352263 {
21362264 RevertMeshes();
21372265 } else
2138
- if (event.getSource() == resetMeshItem)
2266
+ if (source == resetMeshItem)
21392267 {
21402268 ResetAll();
21412269 } else
2142
- if (event.getSource() == stepAllItem)
2270
+ if (source == stepAllItem)
21432271 {
21442272 StepAll();
21452273 } else
2146
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2274
+ if (source == clearItem) // || event.getSource() == clearButton)
21472275 {
21482276 //int indices[] = jList.getSelectedIndices();
21492277 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2151,42 +2279,46 @@
21512279
21522280 ClearSelection(false);
21532281 } else
2154
- if (event.getSource() == clearAllItem)
2282
+ if (source == clearAllItem)
21552283 {
21562284 ClearSelection(true);
21572285 } else
2158
- if (event.getSource() == grabItem)
2286
+ if (source == grabItem)
21592287 {
21602288 group(new cGroup(), true);
21612289 } else
2162
- if (event.getSource() == frontItem)
2290
+ if (source == hideItem)
2291
+ {
2292
+ group(new HiddenObject());
2293
+ } else
2294
+ if (source == frontItem)
21632295 {
21642296 front();
21652297 } else
2166
- if (event.getSource() == backItem)
2298
+ if (source == backItem)
21672299 {
21682300 back();
21692301 } else
2170
- if (event.getSource() == cameraItem)
2302
+ if (source == cameraItem)
21712303 {
21722304 makeSomething(new Camera());
21732305 } else
2174
- if (event.getSource() == compositeItem)
2306
+ if (source == compositeItem)
21752307 {
21762308 group(new Composite());
21772309 } else
2178
- if (event.getSource() == randomItem)
2310
+ if (source == randomItem)
21792311 {
21802312 RandomNode random = new RandomNode();
21812313 group(random);
21822314 if (random.size() > 0)
2183
- random.name = random.get(0).name + "Rnd";
2315
+ random.name = random.get(0).name + "Switch";
21842316 } else
2185
- if (event.getSource() == physicsItem)
2317
+ if (source == physicsItem)
21862318 {
21872319 group(new PhysicsNode());
21882320 } else
2189
- if (event.getSource() == frameselectorItem)
2321
+ if (source == frameselectorItem)
21902322 {
21912323 for (int i=0; i<group.selection.size(); i++)
21922324 {
....@@ -2198,7 +2330,7 @@
21982330 ResetModel();
21992331 refreshContents();
22002332 } else
2201
- if (event.getSource() == switchGeoItem)
2333
+ if (source == switchGeoItem)
22022334 {
22032335 for (int i=0; i<group.selection.size(); i++)
22042336 {
....@@ -2210,7 +2342,7 @@
22102342 ResetModel();
22112343 refreshContents();
22122344 } else
2213
- if (event.getSource() == switchTransfoItem)
2345
+ if (source == switchTransfoItem)
22142346 {
22152347 for (int i=0; i<group.selection.size(); i++)
22162348 {
....@@ -2222,7 +2354,7 @@
22222354 ResetModel();
22232355 refreshContents();
22242356 } else
2225
- if (event.getSource() == morphItem)
2357
+ if (source == morphItem)
22262358 {
22272359 for (int i=0; i<group.selection.size(); i++)
22282360 {
....@@ -2234,7 +2366,7 @@
22342366 ResetModel();
22352367 refreshContents();
22362368 } else
2237
- if (event.getSource() == scriptNodeItem)
2369
+ if (source == scriptNodeItem)
22382370 {
22392371 boolean atleastone = false;
22402372
....@@ -2273,195 +2405,215 @@
22732405 }
22742406 }
22752407 } else
2276
- if (event.getSource() == linkerItem)
2408
+ if (source == linkerItem)
22772409 {
22782410 group(new cLinker());
22792411 } else
2280
- if (event.getSource() == textureItem)
2412
+ if (source == textureItem)
22812413 {
22822414 group(new TextureNode());
22832415 } else
2284
- if (event.getSource() == shadowXItem)
2416
+ if (source == billboardItem)
2417
+ {
2418
+ group(new BillboardNode());
2419
+ } else
2420
+ if (source == shadowXItem)
22852421 {
22862422 CastShadow(0);
22872423 } else
2288
- if (event.getSource() == shadowYItem)
2424
+ if (source == shadowYItem)
22892425 {
22902426 CastShadow(1);
22912427 } else
2292
- if (event.getSource() == shadowZItem)
2428
+ if (source == shadowZItem)
22932429 {
22942430 CastShadow(2);
22952431 } else
2296
- if (event.getSource() == ungroupItem)
2432
+ if (source == ungroupItem)
22972433 {
2298
- ungroup();
2434
+ //ungroup();
2435
+ for (int i=0; i<group.selection.size(); i++)
2436
+ {
2437
+ Ungroup(group.selection.get(i));
2438
+ }
2439
+
2440
+ ClearSelection(false);
2441
+
2442
+ refreshContents();
22992443 } else
2300
- if (event.getSource() == genUVItem)
2444
+ if (source == genUVItem)
23012445 {
23022446 GenUV();
23032447 } else
2304
- if (event.getSource() == genNormalsCADItem)
2448
+ if (source == genNormalsCADItem)
23052449 {
23062450 GenNormals(true);
23072451 } else
2308
- if (event.getSource() == genNormalsORGANItem)
2452
+ if (source == genNormalsMESHItem)
2453
+ {
2454
+ GenNormals(true); // TODO
2455
+ } else
2456
+ if (source == genNormalsORGANItem)
23092457 {
23102458 GenNormals(false);
23112459 } else
2312
- if (event.getSource() == stripifyItem)
2460
+ if (source == genNormalsMINEItem)
2461
+ {
2462
+ GenNormalsMINE();
2463
+ } else
2464
+ if (source == stripifyItem)
23132465 {
23142466 Stripify();
23152467 } else
2316
- if (event.getSource() == unstripifyItem)
2468
+ if (source == unstripifyItem)
23172469 {
23182470 Unstripify();
23192471 } else
2320
- if (event.getSource() == trimItem)
2472
+ if (source == trimItem)
23212473 {
23222474 Trim();
23232475 } else
2324
- if (event.getSource() == untrimItem)
2476
+ if (source == untrimItem)
23252477 {
23262478 Untrim();
23272479 } else
2328
- if (event.getSource() == clearColorsItem)
2480
+ if (source == clearColorsItem)
23292481 {
23302482 ClearColors();
23312483 } else
2332
- if (event.getSource() == clearMaterialsItem)
2484
+ if (source == clearMaterialsItem)
23332485 {
23342486 ClearMaterials();
23352487 } else
2336
- if (event.getSource() == liveleavesItem)
2488
+ if (source == liveleavesItem)
23372489 {
23382490 LiveLeaves(true);
23392491 } else
2340
- if (event.getSource() == unliveleavesItem)
2492
+ if (source == unliveleavesItem)
23412493 {
23422494 LiveLeaves(false);
23432495 } else
2344
- if (event.getSource() == supportleavesItem)
2496
+ if (source == supportleavesItem)
23452497 {
23462498 SupportLeaves(true);
23472499 } else
2348
- if (event.getSource() == unsupportleavesItem)
2500
+ if (source == unsupportleavesItem)
23492501 {
23502502 SupportLeaves(false);
23512503 } else
2352
- if (event.getSource() == hideleavesItem)
2504
+ if (source == hideleavesItem)
23532505 {
23542506 HideLeaves(true);
23552507 } else
2356
- if (event.getSource() == showleavesItem)
2508
+ if (source == showleavesItem)
23572509 {
23582510 HideLeaves(false);
23592511 } else
2360
- if (event.getSource() == markleavesItem)
2512
+ if (source == markleavesItem)
23612513 {
23622514 MarkLeaves(true);
23632515 } else
2364
- if (event.getSource() == unmarkleavesItem)
2516
+ if (source == unmarkleavesItem)
23652517 {
23662518 MarkLeaves(false);
23672519 } else
2368
- if (event.getSource() == flipVItem)
2520
+ if (source == flipVItem)
23692521 {
23702522 FlipV(true);
23712523 } else
2372
- if (event.getSource() == unflipVItem)
2524
+ if (source == unflipVItem)
23732525 {
23742526 FlipV(false);
23752527 } else
2376
- if (event.getSource() == lowTexturesItem)
2528
+ if (source == lowTexturesItem)
23772529 {
23782530 SetTexRes(0);
23792531 } else
2380
- if (event.getSource() == normalTexturesItem)
2532
+ if (source == normalTexturesItem)
23812533 {
23822534 SetTexRes(1);
23832535 } else
2384
- if (event.getSource() == highTexturesItem)
2536
+ if (source == highTexturesItem)
23852537 {
23862538 SetTexRes(2);
23872539 } else
2388
- if (event.getSource() == veryhighTexturesItem)
2540
+ if (source == veryhighTexturesItem)
23892541 {
23902542 SetTexRes(3);
23912543 } else
2392
- if (event.getSource() == maxTexturesItem)
2544
+ if (source == maxTexturesItem)
23932545 {
23942546 SetTexRes(4);
23952547 } else
2396
- if (event.getSource() == panoTexturesItem)
2548
+ if (source == panoTexturesItem)
23972549 {
23982550 SetTexRes(5);
23992551 } else
2400
- if (event.getSource() == reverseNormalsItem)
2552
+ if (source == reverseNormalsItem)
24012553 {
24022554 ReverseNormals();
24032555 } else
2404
- if (event.getSource() == parseverticesItem)
2556
+ if (source == parseverticesItem)
24052557 {
24062558 ParseVertices();
24072559 } else
2408
- if (event.getSource() == textureFieldItem)
2560
+ if (source == textureFieldItem)
24092561 {
24102562 TextureVertices();
24112563 } else
2412
- if (event.getSource() == alignItem)
2564
+ if (source == alignItem)
24132565 {
24142566 Align();
24152567 } else
2416
- if (event.getSource() == mirrorItem)
2568
+ if (source == mirrorItem)
24172569 {
24182570 MirrorPoses();
24192571 } else
2420
- if (event.getSource() == reduceMorphItem)
2572
+ if (source == reduceMorphItem)
24212573 {
24222574 MeshReduction(false);
24232575 } else
2424
- if (event.getSource() == reduce34MorphItem)
2576
+ if (source == reduce34MorphItem)
24252577 {
24262578 MeshReduction(true);
24272579 } else
2428
- if (event.getSource() == reverseTrianglesItem)
2580
+ if (source == reverseTrianglesItem)
24292581 {
24302582 ReverseTriangles();
24312583 } else
2432
- if (event.getSource() == reduceMeshItem)
2584
+ if (source == reduceMeshItem)
24332585 {
24342586 ReduceMesh(false);
24352587 } else
2436
- if (event.getSource() == reduce34MeshItem)
2588
+ if (source == reduce34MeshItem)
24372589 {
24382590 ReduceMesh(true);
24392591 } else
2440
- if (event.getSource() == increaseMeshItem)
2592
+ if (source == increaseMeshItem)
24412593 {
24422594 IncreaseMesh();
24432595 } else
2444
- if (event.getSource() == clipMeshItem)
2596
+ if (source == clipMeshItem)
24452597 {
24462598 ClipMesh();
24472599 } else
2448
- if (event.getSource() == smoothMeshItem)
2600
+ if (source == smoothMeshItem)
24492601 {
24502602 SmoothMesh();
24512603 } else
2452
- if (event.getSource() == transformgeometryItem)
2604
+ if (source == transformgeometryItem)
24532605 {
24542606 TransformGeometry();
24552607 } else
2456
- if (event.getSource() == resetTransformItem)
2608
+ if (source == resetTransformItem)
24572609 {
24582610 ResetTransform();
24592611 } else
2460
- if (event.getSource() == resetCentroidItem)
2612
+ if (source == resetCentroidItem)
24612613 {
24622614 ResetCentroid();
24632615 } else
2464
- if (event.getSource() == resetParentItem)
2616
+ if (source == resetParentItem)
24652617 {
24662618 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24672619 {
....@@ -2471,7 +2623,7 @@
24712623
24722624 refreshContents();
24732625 } else
2474
- if (event.getSource() == repairParentItem)
2626
+ if (source == repairParentItem)
24752627 {
24762628 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24772629 {
....@@ -2485,7 +2637,21 @@
24852637
24862638 refreshContents();
24872639 } else
2488
- if (event.getSource() == sortbysizeItem)
2640
+ if (source == repairShadowItem)
2641
+ {
2642
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2643
+ {
2644
+ Object3D obj = (Object3D)e.nextElement();
2645
+ obj.RepairShadow();
2646
+// for (int i=0; i<obj.size(); i++)
2647
+// {
2648
+// obj.get(i).parent = obj;
2649
+// }
2650
+ }
2651
+
2652
+ refreshContents();
2653
+ } else
2654
+ if (source == sortbysizeItem)
24892655 {
24902656 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24912657 {
....@@ -2497,7 +2663,7 @@
24972663 ResetModel();
24982664 refreshContents();
24992665 } else
2500
- if (event.getSource() == sortbynameItem)
2666
+ if (source == sortbynameItem)
25012667 {
25022668 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25032669 {
....@@ -2509,7 +2675,7 @@
25092675 ResetModel();
25102676 refreshContents();
25112677 } else
2512
- if (event.getSource() == attachPigmentItem)
2678
+ if (source == attachPigmentItem)
25132679 {
25142680 String texture = GetFile("Attach pigment");
25152681 Object3D obj;
....@@ -2521,7 +2687,7 @@
25212687
25222688 refreshContents();
25232689 } else
2524
- if (event.getSource() == detachPigmentItem)
2690
+ if (source == detachPigmentItem)
25252691 {
25262692 Object3D obj;
25272693 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2532,7 +2698,7 @@
25322698
25332699 refreshContents();
25342700 } else
2535
- if (event.getSource() == attachBumpItem)
2701
+ if (source == attachBumpItem)
25362702 {
25372703 String texture = GetFile("Attach bump");
25382704 Object3D obj;
....@@ -2544,7 +2710,7 @@
25442710
25452711 refreshContents();
25462712 } else
2547
- if (event.getSource() == detachBumpItem)
2713
+ if (source == detachBumpItem)
25482714 {
25492715 Object3D obj;
25502716 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2555,7 +2721,7 @@
25552721
25562722 refreshContents();
25572723 } else
2558
- if (event.getSource() == pigmentBumpItem)
2724
+ if (source == pigmentBumpItem)
25592725 {
25602726 Object3D obj;
25612727 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2566,158 +2732,195 @@
25662732
25672733 refreshContents();
25682734 } else
2569
- if (event.getSource() == flashSelectionButton)
2735
+ if (source == flashSelectionButton)
25702736 {
25712737 CameraPane.flash = true;
25722738 refreshContents();
25732739 } else
2574
- if (event.getSource() == oneButton)
2740
+ if (source == oneButton)
25752741 {
25762742 } else
2577
- if (event.getSource() == twoButton)
2743
+ if (source == twoButton)
25782744 {
25792745 radio.layout = twoButton;
25802746 // bug
25812747 //gridPanel.setDividerLocation(1.0);
25822748 //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();
2749
+// bigThree.remove(scenePanel);
2750
+// bigThree.remove(centralPanel);
2751
+// bigThree.remove(XYZPanel);
2752
+// aWindowConstraints.gridx = 0;
2753
+// aWindowConstraints.gridy = 0;
2754
+// aWindowConstraints.gridwidth = 1;
2755
+// // aConstraints.gridheight = 3;
2756
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2757
+// aWindowConstraints.weightx = 0;
2758
+// aWindowConstraints.weighty = 1;
2759
+// //bigThree.add(jtp, aWindowConstraints);
2760
+// aWindowConstraints.weightx = 1;
2761
+// aWindowConstraints.gridwidth = 3;
2762
+// // aConstraints.gridheight = 3;
2763
+// aWindowConstraints.gridx = 1;
2764
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2765
+// bigThree.add(centralPanel, aWindowConstraints);
2766
+// aWindowConstraints.weightx = 0;
2767
+// aWindowConstraints.gridx = 4;
2768
+// aWindowConstraints.gridwidth = 1;
2769
+// // aConstraints.gridheight = 3;
2770
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2771
+// //bigThree.add(XYZPanel, aWindowConstraints);
2772
+// scenePanel.setVisible(false);
2773
+// centralPanel.setVisible(true);
2774
+// XYZPanel.setVisible(false);
2775
+ bigThree.ClearUI();
2776
+ bigThree.add(centralPanel);
2777
+ bigThree.FlushUI();
26072778 } else
2608
- if (event.getSource() == threeButton)
2779
+ if (source == threeButton)
26092780 {
26102781 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();
2782
+
2783
+// bigThree.remove(scenePanel);
2784
+// bigThree.remove(centralPanel);
2785
+// bigThree.remove(XYZPanel);
2786
+// aWindowConstraints.gridx = 0;
2787
+// aWindowConstraints.gridy = 0;
2788
+// aWindowConstraints.gridwidth = 1;
2789
+// // aConstraints.gridheight = 3;
2790
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2791
+// aWindowConstraints.weightx = 0;
2792
+// aWindowConstraints.weighty = 1;
2793
+// //bigThree.add(jtp, aWindowConstraints);
2794
+// aWindowConstraints.weightx = 1;
2795
+// aWindowConstraints.gridwidth = 3;
2796
+// // aConstraints.gridheight = 3;
2797
+// aWindowConstraints.gridx = 1;
2798
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2799
+// bigThree.add(centralPanel, aWindowConstraints);
2800
+// aWindowConstraints.weightx = 0;
2801
+// aWindowConstraints.gridx = 4;
2802
+// aWindowConstraints.gridwidth = 1;
2803
+// // aConstraints.gridheight = 3;
2804
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2805
+// bigThree.add(XYZPanel, aWindowConstraints);
2806
+// bigThree.validate();
2807
+// scenePanel.setVisible(false);
2808
+// centralPanel.setVisible(true);
2809
+// XYZPanel.setVisible(true);
2810
+ bigThree.ClearUI();
2811
+ bigThree.add(centralPanel);
2812
+ bigThree.add(XYZPanel);
2813
+ bigThree.FlushUI();
26352814 } else
2636
- if (event.getSource() == fourButton)
2815
+ if (source == fourButton)
26372816 {
26382817 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();
2818
+
2819
+// bigThree.remove(scenePanel);
2820
+// bigThree.remove(centralPanel);
2821
+// bigThree.remove(XYZPanel);
2822
+// aWindowConstraints.gridx = 0;
2823
+// aWindowConstraints.gridy = 0;
2824
+// aWindowConstraints.gridwidth = 1;
2825
+// // aWindowConstraints.gridheight = 3;
2826
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2827
+// aWindowConstraints.weightx = 1;
2828
+// aWindowConstraints.weighty = 1;
2829
+// bigThree.add(scenePanel, aWindowConstraints);
2830
+// aWindowConstraints.weightx = 1;
2831
+// aWindowConstraints.gridwidth = 3;
2832
+// // aConstraints.gridheight = 3;
2833
+// aWindowConstraints.gridx = 1;
2834
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2835
+// //bigThree.add(cameraPanel, aWindowConstraints);
2836
+// aWindowConstraints.weightx = 0;
2837
+// aWindowConstraints.gridx = 4;
2838
+// aWindowConstraints.gridwidth = 1;
2839
+// // aWindowConstraints.gridheight = 3;
2840
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2841
+// //bigThree.add(XYZPanel, aWindowConstraints);
2842
+// bigThree.validate();
2843
+// scenePanel.setVisible(true);
2844
+// centralPanel.setVisible(false);
2845
+// XYZPanel.setVisible(false);
2846
+ bigThree.ClearUI();
2847
+ bigThree.add(scenePanel);
2848
+ bigThree.FlushUI();
26632849 } else
2664
- if (event.getSource() == sixButton)
2850
+ if (source == sixButton)
26652851 {
26662852 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();
2853
+
2854
+// bigThree.remove(scenePanel);
2855
+// bigThree.remove(centralPanel);
2856
+// bigThree.remove(XYZPanel);
2857
+// aWindowConstraints.gridx = 0;
2858
+// aWindowConstraints.gridy = 0;
2859
+// aWindowConstraints.gridwidth = 1;
2860
+// // aConstraints.gridheight = 3;
2861
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2862
+// aWindowConstraints.weightx = 0;
2863
+// aWindowConstraints.weighty = 1;
2864
+// bigThree.add(scenePanel, aWindowConstraints);
2865
+// aWindowConstraints.weightx = 1;
2866
+// aWindowConstraints.gridwidth = 3;
2867
+// // aWindowConstraints.gridheight = 3;
2868
+// aWindowConstraints.gridx = 1;
2869
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2870
+// bigThree.add(centralPanel, aWindowConstraints);
2871
+// aWindowConstraints.weightx = 0;
2872
+// aWindowConstraints.gridx = 4;
2873
+// aWindowConstraints.gridwidth = 1;
2874
+// // aWindowConstraints.gridheight = 3;
2875
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2876
+// //bigThree.add(XYZPanel, aConstraints);
2877
+// bigThree.validate();
2878
+// scenePanel.setVisible(true);
2879
+// centralPanel.setVisible(true);
2880
+// XYZPanel.setVisible(false);
2881
+ bigThree.ClearUI();
2882
+ bigThree.add(scenePanel);
2883
+ bigThree.add(centralPanel);
2884
+ bigThree.FlushUI();
26912885 } else
2692
- if (event.getSource() == sevenButton)
2886
+ if (source == sevenButton)
26932887 {
26942888 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();
2889
+
2890
+// bigThree.remove(scenePanel);
2891
+// bigThree.remove(centralPanel);
2892
+// bigThree.remove(XYZPanel);
2893
+// aWindowConstraints.gridx = 0;
2894
+// aWindowConstraints.gridy = 0;
2895
+// aWindowConstraints.gridwidth = 1;
2896
+// // aWindowConstraints.gridheight = 3;
2897
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2898
+// aWindowConstraints.weightx = 0;
2899
+// aWindowConstraints.weighty = 1;
2900
+// bigThree.add(scenePanel, aWindowConstraints);
2901
+// aWindowConstraints.weightx = 1;
2902
+// aWindowConstraints.gridwidth = 3;
2903
+// // aWindowConstraints.gridheight = 3;
2904
+// aWindowConstraints.gridx = 1;
2905
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2906
+// bigThree.add(centralPanel, aWindowConstraints);
2907
+// aWindowConstraints.weightx = 0;
2908
+// aWindowConstraints.gridx = 4;
2909
+// aWindowConstraints.gridwidth = 1;
2910
+// // aConstraints.gridheight = 3;
2911
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2912
+// bigThree.add(XYZPanel, aWindowConstraints);
2913
+// bigThree.validate();
2914
+// scenePanel.setVisible(true);
2915
+// centralPanel.setVisible(true);
2916
+// XYZPanel.setVisible(true);
2917
+ bigThree.ClearUI();
2918
+ bigThree.add(scenePanel);
2919
+ bigThree.add(centralPanel);
2920
+ bigThree.add(XYZPanel);
2921
+ bigThree.FlushUI();
27192922 } else
2720
- if (event.getSource() == rootButton)
2923
+ if (source == rootButton)
27212924 {
27222925 Object3D obj;
27232926 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2729,7 +2932,7 @@
27292932
27302933 refreshContents(true);
27312934 } else
2732
- if (event.getSource() == closeButton)
2935
+ if (source == closeButton)
27332936 {
27342937 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27352938 cRadio ab;
....@@ -2750,11 +2953,11 @@
27502953 }
27512954 refreshContents(true);
27522955 } else
2753
- if (event.getSource() == editItem || event.getSource() == editButton)
2956
+ if (source == editItem || source == editButton)
27542957 {
27552958 EditSelection(false);
27562959 } else
2757
- if (event.getSource() == uneditButton)
2960
+ if (source == uneditButton)
27582961 {
27592962 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
27602963 {
....@@ -2766,12 +2969,12 @@
27662969
27672970 child.editWindow = null; // ???????????
27682971 }
2769
- objEditor.ctrlPanel.revalidate();
2972
+ objEditor.ctrlPanel.FlushUI();
27702973 //objEditor.jTree.clearSelection();
27712974 //objEditor.ResetSliders();
27722975 refreshContents(true);
27732976 } else
2774
- if (event.getSource() == clearPanelButton)
2977
+ if (source == clearPanelButton)
27752978 {
27762979 assert(copy == group);
27772980 //copy.ClearUI();
....@@ -2782,7 +2985,7 @@
27822985 listUI.clear();
27832986 refreshContents(true);
27842987 } else
2785
- if (event.getSource() == allParamsButton)
2988
+ if (source == allParamsButton)
27862989 {
27872990 assert(copy == group);
27882991
....@@ -2803,19 +3006,19 @@
28033006
28043007 refreshContents(true);
28053008 } else
2806
- if (event.getSource() == unselectButton)
3009
+ if (source == unselectButton)
28073010 {
28083011 objEditor.jTree.clearSelection();
2809
- // ?? oct 2012 GraphreeD.clipboard.clear();
3012
+ // ?? oct 2012 GrafreeD.clipboard.clear();
28103013 objEditor.ResetSliders();
28113014 refreshContents(true);
28123015 } else
2813
- if(event.getSource() instanceof cRadio)
3016
+ if(source instanceof cRadio)
28143017 {
28153018 group.parent = keepparent;
28163019 group.attributes = 0;
28173020 //group.editWindow = null;
2818
- /*cRadio*/ radio = (cRadio)event.getSource();
3021
+ /*cRadio*/ radio = (cRadio)source;
28193022 Object3D obj = radio.GetObject();
28203023 System.out.println("Edit " + obj);
28213024 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2835,7 +3038,7 @@
28353038 }
28363039
28373040 copy = group;
2838
- //CameraPane.theRenderer.object = group;
3041
+ //Globals.theRenderer.object = group;
28393042 if(!useclient)
28403043 {
28413044 cameraView.renderCamera = radio.camera;
....@@ -2844,7 +3047,8 @@
28443047 cameraView.cameras[cameraView.cameracount] = radio.camera;
28453048 cameraView.targetLookAt.set(radio.camera.lookAt);
28463049 cameraView.object = group;
2847
- cameraView.lighttouched = true;
3050
+ //cameraView.lighttouched = true;
3051
+ Globals.lighttouched = true;
28483052 topView.object = group;
28493053 frontView.object = group;
28503054 sideView.object = group;
....@@ -2880,7 +3084,7 @@
28803084 if (useclient)
28813085 {
28823086 cameraView.object = client;
2883
- cameraView.lighttouched = true;
3087
+ Globals.lighttouched = true;
28843088 //topView.object = client;
28853089 //frontView.object = client;
28863090 //sideView.object = client;
....@@ -2888,7 +3092,7 @@
28883092 else
28893093 {
28903094 cameraView.object = group;
2891
- cameraView.lighttouched = true;
3095
+ Globals.lighttouched = true;
28923096 //topView.object = group;
28933097 //frontView.object = group;
28943098 //sideView.object = group;
....@@ -3121,9 +3325,9 @@
31213325 obj = (Object3D)e.nextElement();
31223326
31233327 System.out.println("Object is: " + obj);
3124
- GraphreeD.AnalyzeObject(obj);
3328
+ GrafreeD.AnalyzeObject(obj);
31253329 System.out.println("Boundary rep: " + obj.bRep);
3126
- GraphreeD.AnalyzeObject(obj.bRep);
3330
+ GrafreeD.AnalyzeObject(obj.bRep);
31273331
31283332 // System.err.println((size/1024) + " KB is the size of " + obj);
31293333 }
....@@ -3165,6 +3369,13 @@
31653369 void GenNormals(boolean crease)
31663370 {
31673371 group.GenNormalsS(crease);
3372
+
3373
+ refreshContents();
3374
+ }
3375
+
3376
+ void GenNormalsMINE()
3377
+ {
3378
+ group.selection.GenNormalsMINE();
31683379
31693380 refreshContents();
31703381 }
....@@ -3250,7 +3461,7 @@
32503461 // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
32513462 // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
32523463 //
3253
-// g.add(GraphreeD.clipboard);
3464
+// g.add(GrafreeD.clipboard);
32543465 //
32553466 // buffer.add(g);
32563467 // }
....@@ -3269,8 +3480,8 @@
32693480 // nodes = new Object3D();
32703481 // vertices = new Vector<Vertex>();
32713482 //
3272
-// boolean epsequal = GraphreeD.epsequal;
3273
-// GraphreeD.epsequal = true;
3483
+// boolean epsequal = GrafreeD.epsequal;
3484
+// GrafreeD.epsequal = true;
32743485 //
32753486 // for (int i=0; i<group.selection.size(); i++)
32763487 // {
....@@ -3311,7 +3522,7 @@
33113522 // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33123523 // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33133524 //
3314
-// g.add(GraphreeD.clipboard);
3525
+// g.add(GrafreeD.clipboard);
33153526 //
33163527 // buffer.add(g);
33173528 // }
....@@ -3319,7 +3530,7 @@
33193530 // makeSomething(buffer, i==group.selection.size()-1);
33203531 // }
33213532 //
3322
-// GraphreeD.epsequal = epsequal;
3533
+// GrafreeD.epsequal = epsequal;
33233534 //
33243535 // //buffer = null;
33253536 // temprep = null;
....@@ -3330,8 +3541,8 @@
33303541
33313542 void ParseVertices()
33323543 {
3333
- boolean epsequal = GraphreeD.epsequal;
3334
- GraphreeD.epsequal = true;
3544
+ boolean epsequal = GrafreeD.epsequal;
3545
+ GrafreeD.epsequal = true;
33353546
33363547 for (int i=0; i<group.selection.size(); i++)
33373548 {
....@@ -3356,7 +3567,7 @@
33563567 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33573568 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33583569
3359
- g.add(GraphreeD.clipboard);
3570
+ g.add(GrafreeD.clipboard);
33603571
33613572 buffer.add(g);
33623573 }
....@@ -3371,7 +3582,7 @@
33713582 makeSomething(buffer, i==group.selection.size()-1);
33723583 }
33733584
3374
- GraphreeD.epsequal = epsequal;
3585
+ GrafreeD.epsequal = epsequal;
33753586
33763587 refreshContents();
33773588 }
....@@ -3389,7 +3600,7 @@
33893600 String pigment = Object3D.GetPigment(tex);
33903601 //String bump = Object3D.GetBump(tex);
33913602
3392
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3603
+ com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
33933604
33943605 double s = v.s;
33953606
....@@ -3416,7 +3627,7 @@
34163627 scale /= 3;
34173628
34183629 scale /= 0xFF;
3419
- scale /= 4;
3630
+ // c'est quoi ca? scale /= 4;
34203631
34213632 //v.AO = scale;
34223633
....@@ -3437,12 +3648,26 @@
34373648
34383649 void Align()
34393650 {
3651
+ if (group.selection.size() == 0)
3652
+ return;
3653
+
3654
+ cVector bbmin = new cVector();
3655
+ cVector bbmax = new cVector();
3656
+
3657
+ group.selection.get(0).getBounds(bbmin, bbmax, true);
3658
+
3659
+ double dx = bbmax.x - bbmin.x;
3660
+ double dy = bbmax.y - bbmin.y;
3661
+ double dz = bbmax.z - bbmin.z;
3662
+
3663
+ double scale = Math.sqrt(dx*dx + dy*dy + dz*dz);
3664
+
34403665 for (int i=0; i<group.selection.size(); i++)
34413666 {
34423667 Object3D obj = group.selection.get(i);
34433668
3444
- LA.matTranslate(obj.toParent, i/2f, 0, 0);
3445
- LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0);
3669
+ LA.matTranslate(obj.toParent, i * scale, 0, 0);
3670
+ LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0);
34463671 }
34473672
34483673 refreshContents();
....@@ -3455,7 +3680,7 @@
34553680 // ref.SaveSupports();
34563681 // Object3D par = ref.parent;
34573682 // ref.parent = null;
3458
-// Object3D lowres = (Object3D) GraphreeD.clone(ref);
3683
+// Object3D lowres = (Object3D) GrafreeD.clone(ref);
34593684 // ref.parent = par;
34603685 // ref.RestoreSupports();
34613686
....@@ -3463,11 +3688,11 @@
34633688
34643689 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
34653690
3466
- boolean random = CameraPane.RANDOM;
3467
- CameraPane.RANDOM = false; // parse all random nodes
3691
+ boolean random = CameraPane.SWITCH;
3692
+ CameraPane.SWITCH = false; // parse all random nodes
34683693 lowres.linkVerticesThis(null);
34693694 lowres.linkVerticesThis(sn);
3470
- CameraPane.RANDOM = random;
3695
+ CameraPane.SWITCH = random;
34713696
34723697 System.err.flush();
34733698
....@@ -3485,7 +3710,7 @@
34853710 // lowres.SaveSupports();
34863711 // par = lowres.parent;
34873712 // lowres.parent = null;
3488
-// Object3D newlow = (Object3D) GraphreeD.clone(lowres);
3713
+// Object3D newlow = (Object3D) GrafreeD.clone(lowres);
34893714 Object3D newlow = CloneObject(lowres, false);
34903715 newlow.name = sn.switchobject.get(i).name;
34913716 System.out.println(" pose#" + i + " = " + newlow);
....@@ -3507,7 +3732,7 @@
35073732 return;
35083733
35093734 Object3D poses = group.selection.get(0);
3510
- Object3D ref = GraphreeD.clipboard.get(0);
3735
+ Object3D ref = GrafreeD.clipboard.get(0);
35113736
35123737 Object3D newgroup = new Object3D("Po:" + poses.name);
35133738
....@@ -3676,7 +3901,7 @@
36763901 group.selection.RelinkToSupport(); // july 2014
36773902 System.out.println("DONE.");
36783903 refreshContents();
3679
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3904
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
36803905 }
36813906
36823907 void ReduceMesh(boolean reduction34)
....@@ -3701,20 +3926,20 @@
37013926
37023927 void ClipMesh()
37033928 {
3704
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
3929
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
37053930 {
3706
- Object3D content = GraphreeD.clipboard.get(0);
3931
+ Object3D content = GrafreeD.clipboard.get(0);
37073932
37083933 if (content instanceof cGroup && ((cGroup)content).transientlink )
37093934 content = ((cGroup)content).get(0);
37103935
37113936 // for (int i=0; i<group.selection.size(); i++)
37123937 // {
3713
-// group.selection.get(i).ClipMesh(GraphreeD.clipboard);
3938
+// group.selection.get(i).ClipMesh(GrafreeD.clipboard);
37143939 // }
3715
- group.selection.ClipMesh(GraphreeD.clipboard);
3940
+ group.selection.ClipMesh(GrafreeD.clipboard);
37163941 }
3717
-// group.selection.ClipMesh(GraphreeD.clipboard);
3942
+// group.selection.ClipMesh(GrafreeD.clipboard);
37183943 System.out.println("DONE.");
37193944 refreshContents();
37203945 }
....@@ -3952,25 +4177,25 @@
39524177 System.err.println("info : " + child.GetPath());
39534178 }
39544179 }
3955
- else
3956
- {
3957
- objEditor.SetMaterial(group); // .GetMaterial());
3958
- objEditor.AddInfo(group, this, true); // .GetMaterial());
3959
- System.err.println("info : " + group.GetPath());
3960
- }
4180
+// else
4181
+// {
4182
+// objEditor.SetMaterial(group); // .GetMaterial());
4183
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4184
+// System.err.println("info : " + group.GetPath());
4185
+// }
39614186
39624187 objEditor.SetText(); // jan 2014
39634188
3964
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4189
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
39654190 CameraPane.flash = true;
39664191
39674192 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
39684193 // a camera
39694194 {
39704195 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;
4196
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4197
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4198
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
39744199 }
39754200
39764201 refreshContents();
....@@ -4052,12 +4277,12 @@
40524277 {
40534278 if (group.selection.isEmpty())
40544279 return;
4055
- GraphreeD.clipboardIsTempGroup = false;
4280
+ GrafreeD.clipboardIsTempGroup = false;
40564281 Composite tGroup = null;
40574282 if (group.selection.size() > 0) // 1)
40584283 {
40594284 tGroup = new cGroup();
4060
- GraphreeD.clipboardIsTempGroup = true;
4285
+ GrafreeD.clipboardIsTempGroup = true;
40614286 }
40624287
40634288 if (cut)
....@@ -4097,16 +4322,16 @@
40974322 //System.out.println("cut " + child);
40984323 //System.out.println("parent = " + child.parent);
40994324 // tmp.addChild(child);
4100
- if (GraphreeD.clipboardIsTempGroup)
4325
+ if (GrafreeD.clipboardIsTempGroup)
41014326 tGroup.add/*Child*/(tmp);
41024327 else
4103
- GraphreeD.clipboard = tmp;
4328
+ GrafreeD.clipboard = tmp;
41044329 }
41054330 else
4106
- if (GraphreeD.clipboardIsTempGroup)
4331
+ if (GrafreeD.clipboardIsTempGroup)
41074332 tGroup.add/*Child*/(child);
41084333 else
4109
- GraphreeD.clipboard = child;
4334
+ GrafreeD.clipboard = child;
41104335 }
41114336
41124337 //ResetModel();
....@@ -4138,21 +4363,21 @@
41384363 //System.out.println("cut " + elem);
41394364 //System.out.println("parent = " + elem.parent);
41404365 // tmp.addChild(elem);
4141
- if (GraphreeD.clipboardIsTempGroup)
4366
+ if (GrafreeD.clipboardIsTempGroup)
41424367 tGroup.add/*Child*/(tmp);
41434368 else
4144
- GraphreeD.clipboard = tmp;
4369
+ GrafreeD.clipboard = tmp;
41454370 }
41464371 else
4147
- if (GraphreeD.clipboardIsTempGroup)
4372
+ if (GrafreeD.clipboardIsTempGroup)
41484373 tGroup.add/*Child*/(child);
41494374 else
4150
- GraphreeD.clipboard = child;
4375
+ GrafreeD.clipboard = child;
41514376 }
41524377
41534378 }
4154
- if (GraphreeD.clipboardIsTempGroup)
4155
- GraphreeD.clipboard = tGroup;
4379
+ if (GrafreeD.clipboardIsTempGroup)
4380
+ GrafreeD.clipboard = tGroup;
41564381 if (cut)
41574382 {
41584383 ResetModel();
....@@ -4162,11 +4387,11 @@
41624387
41634388 void paste(boolean expand)
41644389 {
4165
- // if (GraphreeD.clipboard == null)
4390
+ // if (GrafreeD.clipboard == null)
41664391 // return;
41674392 boolean first = true;
41684393
4169
- if (GraphreeD.clipboardIsTempGroup)
4394
+ if (GrafreeD.clipboardIsTempGroup)
41704395 {
41714396 Composite temp;
41724397
....@@ -4177,7 +4402,7 @@
41774402 temp = (Composite)Applet3D.clipboard.deepCopy();
41784403 */
41794404 Object3D elem;
4180
- for (Enumeration e = /*temp.children*/GraphreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4405
+ for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
41814406 {
41824407 Object3D child = (Object3D)e.nextElement();
41834408
....@@ -4191,7 +4416,7 @@
41914416 else
41924417 elem = child.deepCopy(); // ?
41934418 child.parent = keepparent;
4194
- //if (GraphreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
4419
+ //if (GrafreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
41954420 // elem = elem.get(0);
41964421 makeSomething(elem, true); // ?? first);
41974422 //group.addChild(elem);
....@@ -4211,23 +4436,23 @@
42114436 //Object3D cb = Applet3D.clipboard;
42124437 //temp.addChild(cb);
42134438 //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());
4439
+ assert(GrafreeD.clipboard.parent == null);
4440
+ Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4441
+ GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4442
+ if (LA.isIdentity(GrafreeD.clipboard.toParent))
4443
+ makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
42194444 else
4220
- makeSomething(expand?GraphreeD.clipboard.copyExpand():GraphreeD.clipboard.deepCopy());
4221
- GraphreeD.clipboard.get(0).parent = keepparent;
4445
+ makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4446
+ GrafreeD.clipboard.get(0).parent = keepparent;
42224447 }
42234448
42244449 ResetModel();
42254450 refreshContents();
42264451 }
42274452
4228
- void pasteInto(boolean copyit)
4453
+ void pasteInto(boolean copyit, boolean clone)
42294454 {
4230
-// if (GraphreeD.clipboard == null)
4455
+// if (GrafreeD.clipboard == null)
42314456 // return;
42324457
42334458 if (group.selection.size() != 1)
....@@ -4254,15 +4479,22 @@
42544479 if (copyit)
42554480 {
42564481 // paste(false);
4257
- CloneClipboard(false); // sept 2014
4482
+ if (clone)
4483
+ {
4484
+ CloneClipboard(false); // sept 2014
4485
+ }
4486
+ else
4487
+ {
4488
+ paste(false);
4489
+ }
42584490 }
42594491 else
42604492 {
42614493 boolean first = true;
42624494
4263
- if (GraphreeD.clipboardIsTempGroup)
4495
+ if (GrafreeD.clipboardIsTempGroup)
42644496 {
4265
- Composite temp = (Composite)GraphreeD.clipboard;
4497
+ Composite temp = (Composite)GrafreeD.clipboard;
42664498 Object3D copy;
42674499 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
42684500 {
....@@ -4272,7 +4504,7 @@
42724504 }
42734505 } else
42744506 {
4275
- linkSomething(GraphreeD.clipboard); //.get(0));
4507
+ linkSomething(GrafreeD.clipboard); //.get(0));
42764508 }
42774509 }
42784510 }
....@@ -4464,6 +4696,26 @@
44644696 makeSomething(csg);
44654697 }
44664698
4699
+ void Ungroup(Object3D g)
4700
+ {
4701
+ if (g instanceof HiddenObject)
4702
+ {
4703
+ HiddenObject h = (HiddenObject) g;
4704
+
4705
+ for (int i=0; i<h.ActualSize(); i++)
4706
+ {
4707
+ objEditor.makeSomething(h.get(i), false);
4708
+ }
4709
+ }
4710
+ else
4711
+ {
4712
+ for (int i=0; i<g.Size(); i++)
4713
+ {
4714
+ objEditor.makeSomething(g.get(i), false);
4715
+ }
4716
+ }
4717
+ }
4718
+
44674719 void ungroup()
44684720 {
44694721 /*
....@@ -4659,7 +4911,7 @@
46594911
46604912 void ImportGFD()
46614913 {
4662
- FileDialog browser = new FileDialog(objEditor.frame, "Import GraphreeD", FileDialog.LOAD);
4914
+ FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
46634915 browser.show();
46644916 String filename = browser.getFile();
46654917 if (filename != null && filename.length() > 0)
....@@ -4697,7 +4949,7 @@
46974949
46984950 void ImportVRMLX3D()
46994951 {
4700
- if (GraphreeD.standAlone)
4952
+ if (GrafreeD.standAlone)
47014953 {
47024954 /**/
47034955 FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
....@@ -4714,7 +4966,7 @@
47144966
47154967 String GetFile(String dialogName)
47164968 {
4717
- if (GraphreeD.standAlone)
4969
+ if (GrafreeD.standAlone)
47184970 {
47194971 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
47204972 browser.show();
....@@ -4778,10 +5030,12 @@
47785030 cButton flashSelectionButton;
47795031 cButton editButton;
47805032 cButton uneditButton;
5033
+ JCheckBox allParamsButton;
47815034 cButton clearpanelButton;
4782
- cButton allParamsButton;
47835035 cButton unselectButton;
47845036
5037
+ cButton oneStepButton;
5038
+
47855039 cButton screenfitButton;
47865040 cButton screenfitpointButton;
47875041 cButton snapobjectButton;
....@@ -4823,6 +5077,7 @@
48235077 private MenuItem resetsupportItem;
48245078 private MenuItem resetreferencesItem;
48255079 private MenuItem linkverticesItem;
5080
+ private MenuItem relinkverticesItem;
48265081 private MenuItem setMasterItem;
48275082 private MenuItem resetMeshItem;
48285083 private MenuItem stepAllItem;
....@@ -4835,14 +5090,17 @@
48355090 private MenuItem mergeGeometriesItem;
48365091 private MenuItem copyItem;
48375092 private MenuItem pasteItem;
5093
+ private MenuItem pasteIntoItem;
48385094 private MenuItem pasteLinkItem;
48395095 private MenuItem pasteCloneItem;
48405096 private MenuItem pasteExpandItem;
48415097 private MenuItem clearItem;
48425098 private MenuItem clearAllItem;
48435099 private MenuItem genUVItem;
5100
+ private MenuItem genNormalsMESHItem;
48445101 private MenuItem genNormalsCADItem;
48455102 private MenuItem genNormalsORGANItem;
5103
+ private MenuItem genNormalsMINEItem;
48465104 private MenuItem stripifyItem;
48475105 private MenuItem unstripifyItem;
48485106 private MenuItem trimItem;
....@@ -4884,6 +5142,7 @@
48845142 private MenuItem resetCentroidItem;
48855143 private MenuItem transformgeometryItem;
48865144 private MenuItem resetTransformItem;
5145
+ private MenuItem hideItem;
48875146 private MenuItem grabItem;
48885147 private MenuItem backItem;
48895148 private MenuItem frontItem;
....@@ -4904,6 +5163,7 @@
49045163
49055164 private MenuItem resetParentItem;
49065165 private MenuItem repairParentItem;
5166
+ private MenuItem repairShadowItem;
49075167 private MenuItem sortbysizeItem;
49085168 private MenuItem sortbynameItem;
49095169
....@@ -4924,10 +5184,11 @@
49245184 private MenuItem coneItem;
49255185 private MenuItem torusItem;
49265186 private MenuItem superItem;
5187
+ private MenuItem kleinItem;
49275188 private MenuItem blobItem;
49285189 private MenuItem latheItem;
49295190 private MenuItem bezierItem;
4930
- private MenuItem checkerItem;
5191
+ private MenuItem overlayItem;
49315192 private MenuItem meshItem;
49325193 // private MenuItem meshGroupItem;
49335194 private MenuItem springItem;
....@@ -4936,6 +5197,7 @@
49365197 private MenuItem csgItem;
49375198 private MenuItem templateItem;
49385199 private MenuItem textureItem;
5200
+ private MenuItem billboardItem;
49395201 private MenuItem shadowXItem;
49405202 private MenuItem shadowYItem;
49415203 private MenuItem shadowZItem;