Normand Briere
2019-06-09 cd87df088b1850ba0c90beb6c866c443e4eaf3b9
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,
....@@ -97,14 +98,14 @@
9798
9899 void CloneClipboard(boolean supports)
99100 {
100
- assert(GrafreeD.clipboard.parent == null);
101
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
102
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
103
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
104
- makeSomething(CloneObject(GrafreeD.clipboard.get(0), false));
101
+ assert(Grafreed.clipboard.parent == null);
102
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
103
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
104
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
105
+ makeSomething(CloneObject(Grafreed.clipboard.get(0), false));
105106 else
106
- makeSomething(CloneObject(GrafreeD.clipboard, false));
107
- GrafreeD.clipboard.get(0).parent = keepparent;
107
+ makeSomething(CloneObject(Grafreed.clipboard, false));
108
+ Grafreed.clipboard.get(0).parent = keepparent;
108109 }
109110
110111 static Object3D CloneObject(Object3D obj, boolean supports)
....@@ -118,7 +119,7 @@
118119 // obj.support = null;
119120 if (!supports)
120121 obj.SaveSupports();
121
- Object3D clone = (Object3D)GrafreeD.clone(obj);
122
+ Object3D clone = (Object3D)Grafreed.clone(obj);
122123 obj.parent = parent;
123124 // obj.support = support;
124125 // clone.support = support; // aout 2013
....@@ -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,27 +185,37 @@
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"));
193
- resetMeshItem = menu.add(new MenuItem("Reset All"));
194
- resetMeshItem.addActionListener(this);
195
- stepAllItem = menu.add(new MenuItem("Step All"));
196
- stepAllItem.addActionListener(this);
211
+ if (Globals.ADVANCED)
212
+ {
197213 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
198214 revertMeshItem.addActionListener(this);
199215 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
200216 resetreferencesItem.addActionListener(this);
201217 menu.add("-");
218
+ }
202219 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
203220 overwriteGeoItem.addActionListener(this);
204221 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -210,17 +227,26 @@
210227 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
211228 overwriteUVItem.addActionListener(this);
212229 menu.add("-");
230
+ if (Globals.ADVANCED)
231
+ {
213232 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
214233 generateMeshItem.addActionListener(this);
215234 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
216235 poseMeshItem.addActionListener(this);
217236 menu.add("-");
237
+ }
218238 resetsupportItem = menu.add(new MenuItem("Reset support"));
219239 resetsupportItem.addActionListener(this);
220240 linkverticesItem = menu.add(new MenuItem("Link to Support"));
221241 linkverticesItem.addActionListener(this);
242
+ relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
243
+ relinkverticesItem.addActionListener(this);
244
+
245
+ if (Globals.ADVANCED)
246
+ {
222247 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
223248 setMasterItem.addActionListener(this);
249
+ }
224250
225251 oe.menuBar.add(menu = new Menu("Group"));
226252 grabItem = menu.add(new MenuItem("Grab"));
....@@ -231,27 +257,38 @@
231257 frontItem.addActionListener(this);
232258 compositeItem = menu.add(new MenuItem("Composite"));
233259 compositeItem.addActionListener(this);
260
+ hideItem = menu.add(new MenuItem("Hidden Group"));
261
+ hideItem.addActionListener(this);
262
+ ungroupItem = menu.add(new MenuItem("Ungroup"));
263
+ ungroupItem.addActionListener(this);
234264 menu.add("-");
235
- randomItem = menu.add(new MenuItem("Random"));
265
+ randomItem = menu.add(new MenuItem("Switch node"));
236266 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);
241267 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
242268 switchGeoItem.addActionListener(this);
243269 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
244270 switchTransfoItem.addActionListener(this);
245
- morphItem = menu.add(new MenuItem("Morph"));
271
+ morphItem = menu.add(new MenuItem("Morph Group"));
246272 morphItem.addActionListener(this);
273
+
274
+ if (Globals.ADVANCED)
275
+ {
276
+ menu.add("-");
277
+ physicsItem = menu.add(new MenuItem("Physics"));
278
+ physicsItem.addActionListener(this);
279
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
280
+ frameselectorItem.addActionListener(this);
247281 scriptNodeItem = menu.add(new MenuItem("Script Node"));
248282 scriptNodeItem.addActionListener(this);
249283 cameraItem = menu.add(new MenuItem("Camera"));
250284 cameraItem.addActionListener(this);
285
+ }
251286
252287 oe.menuBar.add(menu = new Menu("Object"));
253288 textureItem = menu.add(new MenuItem("Texture"));
254289 textureItem.addActionListener(this);
290
+ billboardItem = menu.add(new MenuItem("Billboard"));
291
+ billboardItem.addActionListener(this);
255292 csgItem = menu.add(new MenuItem("CSG"));
256293 csgItem.addActionListener(this);
257294 shadowXItem = menu.add(new MenuItem("Shadow X"));
....@@ -260,23 +297,29 @@
260297 shadowYItem.addActionListener(this);
261298 shadowZItem = menu.add(new MenuItem("Shadow Z"));
262299 shadowZItem.addActionListener(this);
300
+ if (Globals.ADVANCED)
301
+ {
302
+ menu.add("-");
263303 linkerItem = menu.add(new MenuItem("Linker"));
264304 linkerItem.addActionListener(this);
265
- templateItem = menu.add(new MenuItem("Template"));
266
- templateItem.addActionListener(this);
267305 attributeItem = menu.add(new MenuItem("Attribute"));
268306 attributeItem.addActionListener(this);
307
+ templateItem = menu.add(new MenuItem("Template"));
308
+ templateItem.addActionListener(this);
269309 pointflowItem = menu.add(new MenuItem("Point Flow"));
270310 pointflowItem.addActionListener(this);
311
+ }
271312 menu.add("-");
272
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
273
- transformgeometryItem.addActionListener(this);
274313 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
275314 resetTransformItem.addActionListener(this);
276315 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
277316 resetCentroidItem.addActionListener(this);
278
- ungroupItem = menu.add(new MenuItem("Ungroup"));
279
- ungroupItem.addActionListener(this);
317
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
318
+ resetCentroidXZItem.addActionListener(this);
319
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
320
+ transformGeometryItem.addActionListener(this);
321
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
322
+ transformChildrenItem.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,23 +356,34 @@
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"));
316370 clearMaterialsItem.addActionListener(this);
371
+ resetAllItem = menu.add(new MenuItem("Reset All"));
372
+ resetAllItem.addActionListener(this);
373
+ stepAllItem = menu.add(new MenuItem("Step All"));
374
+ stepAllItem.addActionListener(this);
317375 menu.add("-");
318376 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
319377 liveleavesItem.addActionListener(this);
320378 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
321379 unliveleavesItem.addActionListener(this);
380
+ if (Globals.ADVANCED)
381
+ {
322382 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
323383 supportleavesItem.addActionListener(this);
324384 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
325385 unsupportleavesItem.addActionListener(this);
386
+ }
326387 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
327388 hideleavesItem.addActionListener(this);
328389 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -366,28 +427,34 @@
366427 sortbynameItem = menu.add(new MenuItem("Sort by name"));
367428 sortbynameItem.addActionListener(this);
368429 menu.add("-");
430
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
431
+ shareGeometriesItem.addActionListener(this);
432
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
433
+ mergeGeometriesItem.addActionListener(this);
434
+ if (Globals.ADVANCED)
435
+ {
436
+ // Pretty much the same as duplicate and clone.
369437 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
370438 extractGeometriesItem.addActionListener(this);
371439 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
372440 cloneGeometriesItem.addActionListener(this);
373
- shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
374
- shareGeometriesItem.addActionListener(this);
375
- mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
376
- mergeGeometriesItem.addActionListener(this);
441
+ }
377442
378443 oe.menuBar.add(menu = new Menu("Insert"));
379444 buildCreateMenu(menu);
380445
381
-
382446 oe.menuBar.add(menu = new Menu("Include"));
383
- importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
384
- importGFDItem.addActionListener(this);
385
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
386
- importVRMLX3DItem.addActionListener(this);
387
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
447
+ importOBJItem = menu.add(new MenuItem("OBJ file..."));
388448 importOBJItem.addActionListener(this);
389
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
449
+ menu.add("-");
450
+ import3DSItem = menu.add(new MenuItem("3DS file..."));
390451 import3DSItem.addActionListener(this);
452
+ menu.add("-");
453
+ importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file..."));
454
+ importVRMLX3DItem.addActionListener(this);
455
+ menu.add("-");
456
+ importGFDItem = menu.add(new MenuItem("GrafreeD file..."));
457
+ importGFDItem.addActionListener(this);
391458
392459 oe.menuBar.add(menu = new Menu("Tools"));
393460 buildToolsMenu(menu);
....@@ -423,150 +490,98 @@
423490 oe.radioPanel.add(dummyButton);
424491 oe.buttonGroup.add(dummyButton);
425492 */
426
- aConstraints.gridy += 1;
427
- oe.aConstraints.gridwidth = 1;
428
- oe.aConstraints.gridx = 0;
493
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
429494
430
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints);
495
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
496
+ liveCB.setToolTipText("Enable animation");
431497 liveCB.addItemListener(this);
432498
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);
499
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
500
+ oneStepButton.setToolTipText("Animate one step forward");
501
+ oneStepButton.addActionListener(this);
502
+
503
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
504
+ fastCB.setToolTipText("Fast mode");
451505 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);
506
+
507
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
508
+ trackCB.setToolTipText("Enable tracking");
493509 trackCB.addItemListener(this);
494510
495
- oe.aConstraints.gridx += 1;
496
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
511
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
512
+ screenfitButton.setToolTipText("Screen fit");
497513 screenfitButton.addActionListener(this);
498
- oe.aConstraints.gridx += 1;
514
+
499515 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
500516 // 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;
505517
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);
518
+ if (Globals.ADVANCED)
519
+ {
520
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
521
+ snapobjectButton.addActionListener(this);
522
+ snapobjectButton.setToolTipText("Snap Object");
523
+ }
524
+
525
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
526
+ flashSelectionButton.setToolTipText("Show selection");
512527 flashSelectionButton.addActionListener(this);
513
- oe.aConstraints.gridx += 1;
514
- oe.aConstraints.weighty = 0;
515
- oe.aConstraints.gridwidth = 1;
516528
517
- //
518
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
529
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
530
+
531
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
532
+ twoButton.setToolTipText("Show center view only");
519533 twoButton.addActionListener(this);
520
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
534
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
521535 fourButton.addActionListener(this);
522
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
536
+ fourButton.setToolTipText("Show left panel only");
537
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
538
+ sixButton.setToolTipText("2-column layout left");
523539 sixButton.addActionListener(this);
524
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
540
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
541
+ threeButton.setToolTipText("2-column layout right");
525542 threeButton.addActionListener(this);
526
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
543
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
544
+ sevenButton.setToolTipText("3-column layout");
527545 sevenButton.addActionListener(this);
528546 //
529547
530
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
548
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
549
+ rootButton.setToolTipText("Edit selection in new tab");
531550 rootButton.addActionListener(this);
532
- oe.aConstraints.gridx += 1;
533
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
551
+
552
+ oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
553
+ closeButton.setToolTipText("Close tab");
534554 closeButton.addActionListener(this);
535555 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
536556 //clearButton.addActionListener(this);
537
- oe.aConstraints.gridx += 1;
538557
539
- oe.aConstraints.gridx = 1; //
540
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
558
+ cGridBag commandsPanel = new cGridBag();
559
+
560
+ commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
561
+ editButton.setToolTipText("Edit selection");
541562 editButton.addActionListener(this);
542
- oe.aConstraints.gridx += 1;
543
- oe.aConstraints.weighty = 0;
544
- oe.aConstraints.gridwidth = 1;
545563
546
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
564
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
565
+ uneditButton.setToolTipText("Unedit selection");
547566 uneditButton.addActionListener(this);
548567
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);
568
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
569
+ allParamsButton.setToolTipText("Edit all params");
561570 allParamsButton.addActionListener(this);
562571
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);
572
+ commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
573
+ clearPanelButton.setToolTipText("Clear edit panel");
574
+ clearPanelButton.addActionListener(this);
575
+
576
+ commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
577
+ unselectButton.setToolTipText("Unselect");
568578 unselectButton.addActionListener(this);
569579
580
+ commandsPanel.preferredHeight = 1;
581
+
582
+ oe.treePanel.add(commandsPanel);
583
+ oe.treePanel.Return();
584
+
570585 // oe.aConstraints.gridx += 1;
571586 // oe.aConstraints.weighty = 0;
572587 // oe.aConstraints.gridwidth = 1;
....@@ -578,40 +593,37 @@
578593 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
579594 // gcButton.addActionListener(this);
580595
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;
596
+ cGridBag jSPPanel = new cGridBag();
597
+
598
+ JScrollPane jSP;
592599 //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);
600
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
594601 ResetModel();
595
- oe.aConstraints.weighty = 0.5;
596
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
597
- oe.aConstraints.gridy += 1;
598
- oe.aConstraints.gridwidth = 1;
602
+
603
+ oe.treePanel.add(jSPPanel);
604
+ oe.treePanel.Return();
599605
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);
606
+ cGridBag copyOptionsPanel = new cGridBag();
607
+
608
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
609
+ colorCB.setToolTipText("Copy color when dropped");
604610 colorCB.addItemListener(this);
605
- oe.aConstraints.gridx += 2;
606
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
611
+
612
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
613
+ materialCB.setToolTipText("Copy material when dropped");
607614 materialCB.addItemListener(this);
608
- oe.aConstraints.gridx += 2;
609
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
615
+
616
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
617
+ textureCB.setToolTipText("Copy texture when dropped");
610618 textureCB.addItemListener(this);
611619
612
- oe.aConstraints.gridx = 0;
613
- oe.aConstraints.gridy += 1;
620
+ copyOptionsPanel.preferredHeight = 1;
621
+ oe.treePanel.add(copyOptionsPanel);
622
+ oe.treePanel.Return();
614623
624
+// mainPanel.setDividerLocation(0.5); //1.0);
625
+// mainPanel.setResizeWeight(0.5);
626
+
615627 //jList.addListSelectionListener(this);
616628 oe.jTree.addTreeSelectionListener(this);
617629 //jTree.setRootVisible(false);
....@@ -633,17 +645,89 @@
633645 radio.layout = sevenButton;
634646 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
635647 }
648
+
649
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
650
+ {
651
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
652
+ boxCB.setToolTipText("Display bounding boxes");
653
+ boxCB.addItemListener(this);
654
+
655
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
656
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
657
+ zoomBoxCB.addItemListener(this);
658
+
659
+ if (true) // Globals.ADVANCED)
660
+ {
661
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
662
+ supportCB.setToolTipText("Enable rigging");
663
+ supportCB.addItemListener(this);
664
+
665
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
666
+ // localCB.addItemListener(this);
667
+
668
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
669
+ crowdCB.setToolTipText("Used for crowds");
670
+ crowdCB.addItemListener(this);
671
+
672
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
673
+ smoothCB.setToolTipText("Snapping delay");
674
+ smoothCB.addItemListener(this);
675
+
676
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
677
+ slowCB.setToolTipText("Smooth interpolation");
678
+ slowCB.addItemListener(this);
679
+
680
+// constraints.gridy += 1;
681
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
682
+// speakerMocapCB.addItemListener(this);
683
+
684
+ if (false)
685
+ {
686
+ // handled in scripts
687
+ //constraints.gridy += 1;
688
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
689
+ speakerCameraCB.addItemListener(this);
690
+
691
+ //constraints.gridy += 1;
692
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
693
+ speakerFocusCB.addItemListener(this);
694
+
695
+ //constraints.gridy += 1;
696
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
697
+ smoothfocusCB.addItemListener(this);
698
+ }
699
+
700
+//constraints.gridx += 1;
701
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
702
+// debugCB.addItemListener(this);
703
+
704
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
705
+ oeilCB.addItemListener(this);
706
+
707
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
708
+ lookAtCB.setToolTipText("Look-at target");
709
+ lookAtCB.addItemListener(this);
710
+
711
+ }
712
+
713
+ cGridBag fill = new cGridBag();
714
+
715
+ fill.preferredHeight = 200;
716
+
717
+ panel.add(fill);
718
+
719
+ }
636720
637721 void EditObject(Object3D obj)
638722 {
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();
723
+ cRadio radioButton = new cRadio(obj.name);
724
+ radioButton.SetObject(obj);
725
+ radioButton.layout = sevenButton;
726
+ radioButton.SetCamera(cameraView.renderCamera, false);
727
+ radioButton.addActionListener(this);
728
+ radioPanel.add(radioButton);
729
+ buttonGroup.add(radioButton);
730
+ radioButton.doClick();
647731 }
648732 void SetupViews(ObjEditor oe)
649733 {
....@@ -663,6 +747,7 @@
663747 JCheckBox fastCB;
664748 JCheckBox slowCB;
665749 JCheckBox boxCB;
750
+ JCheckBox zoomBoxCB;
666751 JCheckBox trackCB;
667752 JCheckBox smoothfocusCB;
668753 // JCheckBox speakerMocapCB;
....@@ -705,8 +790,7 @@
705790 dropAttributes |= Object3D.TEXTURE;
706791 else
707792 dropAttributes &= ~Object3D.TEXTURE;
708
- }
709
- else if(e.getSource() == liveCB)
793
+ } else if(e.getSource() == liveCB)
710794 {
711795 cameraView.ToggleLive();
712796 }
....@@ -743,6 +827,10 @@
743827 Recompile();
744828 cameraView.repaint();
745829 // refreshContents();
830
+ }
831
+ else if(e.getSource() == zoomBoxCB)
832
+ {
833
+ cameraView.ToggleZoomBoxMode();
746834 }
747835 else if(e.getSource() == smoothfocusCB)
748836 {
....@@ -857,7 +945,9 @@
857945 // objEditor.DropFile((java.io.File[]) object, true);
858946 // return;
859947 // }
860
- if (string.charAt(0) == '/')
948
+
949
+ // File path for Mac and Windows
950
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
861951 {
862952 // file(s)
863953 String[] names = string.split("\n");
....@@ -884,7 +974,7 @@
884974
885975 flashIt = false;
886976 CameraPane pane = (CameraPane) target;
887
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
977
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
888978 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
889979
890980 if (group.selection.size() == 1)
....@@ -911,11 +1001,11 @@
9111001 {
9121002 loadClipboard(true);
9131003 objEditor.jTree.setSelectionPath(destinationPath);
914
- pasteInto(false);
1004
+ pasteInto(false, false);
9151005 } else {
9161006 loadClipboard(false);
9171007 objEditor.jTree.setSelectionPath(destinationPath);
918
- pasteInto(false); // true); // ???
1008
+ pasteInto(false, false); // true); // ???
9191009 }
9201010 }
9211011 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1033,29 +1123,37 @@
10331123 torusItem.addActionListener(this);
10341124 superItem = menu.add(new MenuItem("Superellipsoid"));
10351125 superItem.addActionListener(this);
1126
+ kleinItem = menu.add(new MenuItem("Klein Bottle"));
1127
+ kleinItem.addActionListener(this);
10361128 particleItem = menu.add(new MenuItem("Particle system"));
10371129 particleItem.addActionListener(this);
1130
+ if (Globals.ADVANCED)
1131
+ {
10381132 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10391133 ragdollItem.addActionListener(this);
10401134 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10411135 ragdoll2Item.addActionListener(this);
1136
+ }
10421137 menu.add("-");
1043
- meshItem = menu.add(new MenuItem("Mesh"));
1138
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10441139 meshItem.addActionListener(this);
10451140 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10461141 // meshGroupItem.addActionListener(this);
1142
+ if (Globals.ADVANCED)
1143
+ {
10471144 springItem = menu.add(new MenuItem("Spring"));
10481145 springItem.addActionListener(this);
10491146 flagItem = menu.add(new MenuItem("Flag"));
10501147 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);
10551148 blobItem = menu.add(new MenuItem("Blob"));
10561149 blobItem.addActionListener(this);
10571150 latheItem = menu.add(new MenuItem("Lathe"));
10581151 latheItem.addActionListener(this);
1152
+ }
1153
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1154
+ bezierItem.addActionListener(this);
1155
+ overlayItem = menu.add(new MenuItem("Overlay"));
1156
+ overlayItem.addActionListener(this);
10591157 lightItem = menu.add(new MenuItem("Light"));
10601158 lightItem.addActionListener(this);
10611159 menu.add("-");
....@@ -1065,34 +1163,39 @@
10651163 loopItem.addActionListener(this);
10661164 doubleItem = menu.add(new MenuItem("Fork"));
10671165 doubleItem.addActionListener(this);
1166
+ if (Globals.ADVANCED)
1167
+ {
10681168 tripleItem = menu.add(new MenuItem("Trident"));
10691169 tripleItem.addActionListener(this);
1170
+ }
10701171 }
10711172
10721173 void buildToolsMenu(Menu menu)
10731174 {
10741175 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10751176 animationItem.addItemListener(this);
1076
- animationItem.setState(CameraPane.ANIMATION);
1177
+ animationItem.setState(Globals.ANIMATION);
10771178
10781179 menu.add("-");
10791180 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
10801181 parseverticesItem.addActionListener(this);
10811182 textureFieldItem = menu.add(new MenuItem("Texture Field"));
10821183 textureFieldItem.addActionListener(this);
1083
- alignItem = menu.add(new MenuItem("Align"));
1184
+ alignItem = menu.add(new MenuItem("Align Objects"));
10841185 alignItem.addActionListener(this);
1085
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1086
- mirrorItem.addActionListener(this);
10871186 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
10881187 reduceMorphItem.addActionListener(this);
10891188 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
10901189 reduce34MorphItem.addActionListener(this);
1091
-
1190
+ menu.add("-");
10921191 menu.add(computeAOItem = new MenuItem("Compute AO"));
10931192 computeAOItem.addActionListener(this);
1094
- menu.add("-");
10951193
1194
+ if (Globals.ADVANCED)
1195
+ {
1196
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1197
+ mirrorItem.addActionListener(this);
1198
+ menu.add("-");
10961199 menu.add(memoryItem = new MenuItem("Memory Usage"));
10971200 memoryItem.addActionListener(this);
10981201 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1106,6 +1209,8 @@
11061209 resetParentItem.addActionListener(this);
11071210 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11081211 repairParentItem.addActionListener(this);
1212
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1213
+ repairShadowItem.addActionListener(this);
11091214 menu.add(invariantsItem = new MenuItem("Invariants"));
11101215 invariantsItem.addActionListener(this);
11111216 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1113,6 +1218,7 @@
11131218 menu.add("-");
11141219 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11151220 editScriptItem.addActionListener(this);
1221
+ }
11161222 }
11171223
11181224 void ScreenFit()
....@@ -1441,9 +1547,9 @@
14411547
14421548 void Overwrite(int mask)
14431549 {
1444
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1550
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14451551 {
1446
- Object3D content = GrafreeD.clipboard.get(0);
1552
+ Object3D content = Grafreed.clipboard.get(0);
14471553
14481554 if (content instanceof cGroup && ((cGroup)content).transientlink )
14491555 content = ((cGroup)content).get(0);
....@@ -1466,6 +1572,7 @@
14661572 //
14671573 public void actionPerformed(ActionEvent event) // , Object arg)
14681574 {
1575
+ Object source = event.getSource();
14691576 /*
14701577 if (event.getSource() == nameField)
14711578 {
....@@ -1477,11 +1584,11 @@
14771584 }
14781585 else
14791586 */
1480
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1587
+ if (source == lookAtItem || source == lookFromItem)
14811588 {
14821589 ScreenFit();
14831590 } else
1484
- if (event.getSource() == switchItem)
1591
+ if (source == switchItem)
14851592 {
14861593 cVector v1 = new cVector();
14871594 cVector v2 = new cVector();
....@@ -1490,11 +1597,11 @@
14901597 objEditor.cameraView.renderCamera.setAim(v2, v1);
14911598 objEditor.cameraView.repaint();
14921599 } else
1493
- if (event.getSource() == rectoidItem)
1600
+ if (source == rectoidItem)
14941601 {
14951602 makeSomething(new Box());
14961603 } else
1497
- if (event.getSource() == particleItem)
1604
+ if (source == particleItem)
14981605 {
14991606 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15001607 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1515,9 +1622,9 @@
15151622 applyExample(particleGeom, "SMOKE");
15161623 makeSomething(particleGeom);
15171624 } else
1518
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1625
+ if (source == ragdollItem || source == ragdoll2Item)
15191626 {
1520
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1627
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15211628
15221629 ragdoll.toParent = LA.newMatrix();
15231630 ragdoll.fromParent = LA.newMatrix();
....@@ -1535,7 +1642,7 @@
15351642 } else
15361643 /*
15371644 */
1538
- if (event.getSource() == heightFieldItem)
1645
+ if (source == heightFieldItem)
15391646 {
15401647 Object3D obj = new Object3D();
15411648
....@@ -1573,27 +1680,31 @@
15731680
15741681 makeSomething(obj);
15751682 } else
1576
- if (event.getSource() == gridItem)
1683
+ if (source == gridItem)
15771684 {
15781685 makeSomething(new Grid());
15791686 } else
1580
- if (event.getSource() == ellipsoidItem)
1687
+ if (source == ellipsoidItem)
15811688 {
15821689 makeSomething(new Sphere());
15831690 } else
1584
- if (event.getSource() == coneItem)
1691
+ if (source == coneItem)
15851692 {
15861693 makeSomething(new Cone());
15871694 } else
1588
- if (event.getSource() == torusItem)
1695
+ if (source == torusItem)
15891696 {
15901697 makeSomething(new Torus());
15911698 } else
1592
- if (event.getSource() == superItem)
1699
+ if (source == superItem)
15931700 {
15941701 makeSomething(new Superellipsoid());
15951702 } else
1596
- if (event.getSource() == blobItem)
1703
+ if (source == kleinItem)
1704
+ {
1705
+ makeSomething(new Klein());
1706
+ } else
1707
+ if (source == blobItem)
15971708 {
15981709 Blob blob = new Blob();
15991710 BlobComponent comp = new BlobComponent();
....@@ -1601,15 +1712,15 @@
16011712 //blob.retile();
16021713 makeSomething(blob);
16031714 } else
1604
- if (event.getSource() == latheItem)
1715
+ if (source == latheItem)
16051716 {
16061717 makeSomething(new Lathe());
16071718 } else
1608
- if (event.getSource() == bezierItem)
1719
+ if (source == bezierItem)
16091720 {
16101721 makeSomething(new BezierSurface());
16111722 } else
1612
- if (event.getSource() == checkerItem)
1723
+ if (source == overlayItem)
16131724 {
16141725 /*
16151726 Object3D obj = new BezierSurface(5,8);
....@@ -1624,7 +1735,7 @@
16241735 */
16251736 makeSomething(new Checker());
16261737 } else
1627
- if (event.getSource() == meshItem)
1738
+ if (source == meshItem)
16281739 {
16291740 Object3D itemtomake = new Object3D();
16301741 Object3D child;
....@@ -1645,35 +1756,35 @@
16451756 makeSomething(child);
16461757 }
16471758 } else
1648
- if (event.getSource() == springItem)
1759
+ if (source == springItem)
16491760 {
16501761 cSpring s = new cSpring();
16511762 s.setup();
16521763 makeSomething(s);
16531764 } else
1654
- if (event.getSource() == flagItem)
1765
+ if (source == flagItem)
16551766 {
16561767 cSpring s = new cFlag();
16571768 s.setup();
16581769 makeSomething(s);
16591770 } else
1660
- if (event.getSource() == lightItem)
1771
+ if (source == lightItem)
16611772 {
16621773 makeSomething(new Light());
16631774 } else
1664
- if (event.getSource() == csgItem)
1775
+ if (source == csgItem)
16651776 {
16661777 group(new CSG());
16671778 } else
1668
- if (event.getSource() == templateItem)
1779
+ if (source == templateItem)
16691780 {
16701781 group(new cTemplate());
16711782 } else
1672
- if (event.getSource() == attributeItem)
1783
+ if (source == attributeItem)
16731784 {
16741785 makeSomething(new Attribute());
16751786 } else
1676
- if (event.getSource() == pointflowItem)
1787
+ if (source == pointflowItem)
16771788 {
16781789 makeSomething(new PointFlow());
16791790 } else
....@@ -1685,7 +1796,7 @@
16851796 } else
16861797 */
16871798
1688
- if (event.getSource() == superLoopItem)
1799
+ if (source == superLoopItem)
16891800 {
16901801 Composite g = new cGroup();
16911802 for (int i=0; i<15; i++)
....@@ -1707,7 +1818,7 @@
17071818
17081819 group(g);
17091820 } else
1710
- if (event.getSource() == loopItem)
1821
+ if (source == loopItem)
17111822 {
17121823 Composite csg = new GroupLeaf();
17131824 csg.count = 5;
....@@ -1716,7 +1827,7 @@
17161827 csg.addChild(child);
17171828 child.addChild(csg);
17181829 } else
1719
- if (event.getSource() == doubleItem)
1830
+ if (source == doubleItem)
17201831 {
17211832 Composite csg = new GroupLeaf();
17221833 csg.count = 5;
....@@ -1728,7 +1839,7 @@
17281839 csg.addChild(child);
17291840 child.addChild(csg);
17301841 } else
1731
- if (event.getSource() == tripleItem)
1842
+ if (source == tripleItem)
17321843 {
17331844 Composite csg = new GroupLeaf();
17341845 csg.count = 4;
....@@ -1744,70 +1855,83 @@
17441855 child.addChild(csg);
17451856 } else
17461857
1747
- if (event.getSource() == importGFDItem)
1858
+ if (source == importGFDItem)
17481859 {
17491860 ImportGFD();
17501861 } else
1751
- if (event.getSource() == importVRMLX3DItem)
1862
+ if (source == importVRMLX3DItem)
17521863 {
17531864 ImportVRMLX3D();
17541865 } else
1755
- if (event.getSource() == import3DSItem)
1866
+ if (source == import3DSItem)
17561867 {
17571868 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17581869 } else
1759
- if (event.getSource() == importOBJItem)
1870
+ if (source == importOBJItem)
17601871 {
1761
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1872
+ //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1873
+ FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD);
1874
+ browser.setVisible(true);
1875
+ String filename = browser.getFile();
1876
+ if (filename != null && filename.length() > 0)
1877
+ {
1878
+ String fullname = browser.getDirectory() + filename;
1879
+ makeSomething(ReadOBJ(fullname), true);
1880
+ }
17621881 } else
1763
- if (event.getSource() == computeAOItem)
1882
+ if (source == computeAOItem)
17641883 {
1765
- CameraPane.drawMode = CameraPane.OCCLUSION;
1766
- CameraPane.theRenderer.repaint();
1884
+ Globals.drawMode = CameraPane.OCCLUSION;
1885
+ Globals.theRenderer.repaint();
17671886 } else
1768
- if (event.getSource() == recompileItem)
1887
+ if (source == recompileItem)
17691888 {
17701889 Recompile();
17711890 refreshContents();
17721891 } else
1773
- if (event.getSource() == editScriptItem)
1892
+ if (source == editScriptItem)
17741893 {
17751894 OpenDialog();
17761895 refreshContents();
17771896 } else
1778
- if (event.getSource() == invariantsItem)
1897
+ if (source == invariantsItem)
17791898 {
17801899 System.out.println("Invariants:");
1781
- GrafreeD.theApplet3D.universe.invariants();
1900
+ Grafreed.grafreeD.universe.invariants();
17821901 } else
1783
- if (event.getSource() == memoryItem)
1902
+ if (source == memoryItem)
17841903 {
17851904 //System.out.println("Invariants:");
17861905 PrintMemory();
17871906 } else
1788
- if (event.getSource() == pathItem)
1907
+ if (source == pathItem)
17891908 {
17901909 PrintPath();
17911910 } else
1792
- if (event.getSource() == analyzeItem)
1911
+ if (source == analyzeItem)
17931912 {
17941913 AnalyzeObject();
17951914 } else
1796
- if (event.getSource() == dumpItem)
1915
+ if (source == dumpItem)
17971916 {
17981917 DumpObject();
17991918 } else
1800
- if (event.getSource() == screenfitButton)
1919
+ if (source == oneStepButton)
1920
+ {
1921
+ Globals.ONESTEP = true;
1922
+ cameraView.repaint();
1923
+ } else
1924
+ if (source == screenfitButton)
18011925 {
18021926 //Reload(lastConverter, lastFilename, true);
18031927 ScreenFit();
18041928 } else
1805
- if (event.getSource() == screenfitpointButton)
1929
+ if (source == screenfitpointButton)
18061930 {
18071931 //Reload(lastConverter, lastFilename, true);
18081932 ScreenFitPoint();
18091933 } else
1810
- if (event.getSource() == snapobjectButton)
1934
+ if (source == snapobjectButton)
18111935 {
18121936 //Reload(lastConverter, lastFilename, true);
18131937 SnapObject();
....@@ -1818,13 +1942,13 @@
18181942 // Recompile();
18191943 // refreshContents();
18201944 // } else
1821
- if (event.getSource() == gcButton)
1945
+ if (source == gcButton)
18221946 {
18231947 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18241948 System.gc();
18251949 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18261950 } else
1827
- if (event.getSource() == editLeafItem)
1951
+ if (source == editLeafItem)
18281952 {
18291953 Object3D obj;
18301954 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1838,62 +1962,66 @@
18381962 }
18391963 refreshContents(true);
18401964 } else
1841
- if (event.getSource() == openWindowItem)
1965
+ if (source == openWindowItem)
18421966 {
18431967 EditSelection(true);
18441968 } else
1845
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1969
+ if (source == cutItem || source == clearButton)
18461970 {
18471971 loadClipboard(true);
18481972 } else
1849
- if (event.getSource() == duplicateItem)
1973
+ if (source == duplicateItem)
18501974 {
1851
- Object3D keep = GrafreeD.clipboard;
1975
+ Object3D keep = Grafreed.clipboard;
18521976 loadClipboard(false);
18531977 paste(false);
1854
- GrafreeD.clipboard = keep;
1978
+ Grafreed.clipboard = keep;
18551979 } else
1856
- if (event.getSource() == cloneItem)
1980
+ if (source == cloneItem)
18571981 {
18581982 CloneSelection(false);
18591983 } else
1860
- if (event.getSource() == cloneSupportItem)
1984
+ if (source == cloneSupportItem)
18611985 {
18621986 CloneSelection(true);
18631987 } else
1864
- if (event.getSource() == copyItem)
1988
+ if (source == copyItem)
18651989 {
18661990 loadClipboard(false);
18671991 } else
1868
- if (event.getSource() == pasteItem)
1992
+ if (source == pasteItem)
18691993 {
18701994 paste(false);
18711995 } else
1872
- if (event.getSource() == pasteLinkItem)
1996
+ if (source == pasteIntoItem)
18731997 {
1874
- pasteInto(false);
1998
+ pasteInto(true, false);
18751999 } else
1876
- if (event.getSource() == pasteCloneItem)
2000
+ if (source == pasteLinkItem)
18772001 {
1878
- pasteInto(true);
2002
+ pasteInto(false, false);
18792003 } else
1880
- if (event.getSource() == pasteExpandItem)
2004
+ if (source == pasteCloneItem)
2005
+ {
2006
+ pasteInto(true, true);
2007
+ } else
2008
+ if (source == pasteExpandItem)
18812009 {
18822010 paste(true);
18832011 } else
1884
- if (event.getSource() == synchronizeItem)
2012
+ if (source == synchronizeItem)
18852013 {
18862014 Overwrite(Object3D.TRANSFORM);
18872015 } else
1888
- if (event.getSource() == overwriteNameItem)
2016
+ if (source == overwriteNameItem)
18892017 {
18902018 Overwrite(Object3D.NAME);
18912019 } else
1892
- if (event.getSource() == overwriteUVItem)
2020
+ if (source == overwriteUVItem)
18932021 {
18942022 Overwrite(Object3D.UV);
18952023 } else
1896
- if (event.getSource() == overwriteMatItem)
2024
+ if (source == overwriteMatItem)
18972025 {
18982026 /* july 2015
18992027 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1913,7 +2041,7 @@
19132041
19142042 Overwrite(dropAttributes);
19152043 }
1916
- if (event.getSource() == overwriteGeoItem)
2044
+ if (source == overwriteGeoItem)
19172045 {
19182046 Overwrite(Object3D.GEOMETRY);
19192047 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1930,7 +2058,7 @@
19302058 // refreshContents();
19312059 // }
19322060 } else
1933
- if (event.getSource() == generateMeshItem)
2061
+ if (source == generateMeshItem)
19342062 {
19352063 //if (group.selection.size() == 1)
19362064 // for (int i=0; i<group.selection.size(); i++)
....@@ -1941,7 +2069,7 @@
19412069 ResetModel();
19422070 refreshContents();
19432071 } else
1944
- if (event.getSource() == extractGeometriesItem)
2072
+ if (source == extractGeometriesItem)
19452073 {
19462074 boolean one = false;
19472075
....@@ -1968,7 +2096,7 @@
19682096 ResetModel();
19692097 refreshContents();
19702098 } else
1971
- if (event.getSource() == cloneGeometriesItem)
2099
+ if (source == cloneGeometriesItem)
19722100 {
19732101 boolean one = false;
19742102
....@@ -1994,32 +2122,37 @@
19942122 ResetModel();
19952123 refreshContents();
19962124 } else
1997
- if (event.getSource() == shareGeometriesItem)
2125
+ if (source == shareGeometriesItem)
19982126 {
19992127 boolean one = false;
20002128
20012129 if (group.selection.size() == 1)
20022130 one = true;
20032131
2132
+ Object3D merge = null;
2133
+
20042134 Object3D content = new cGroup();
20052135
20062136 for (int i=0; i<group.selection.size(); i++)
20072137 {
2008
- Object3D sel = new Merge(group.selection.get(i));
2138
+ merge = new Merge(group.selection.get(i));
20092139
20102140 if (one)
2011
- makeSomething(sel, false);
2141
+ makeSomething(merge, false);
20122142 else
2013
- content.addChild(sel);
2143
+ content.addChild(merge);
20142144 }
20152145
20162146 if (!one)
2017
- makeSomething(content, false);
2018
-
2019
- ResetModel();
2020
- refreshContents();
2147
+ makeSomething(content, true);
2148
+ else
2149
+ {
2150
+ ResetModel();
2151
+ Select(merge.GetTreePath(), true, false); // unselect... false);
2152
+ refreshContents();
2153
+ }
20212154 } else
2022
- if (event.getSource() == mergeGeometriesItem)
2155
+ if (source == mergeGeometriesItem)
20232156 {
20242157 boolean one = false;
20252158
....@@ -2049,7 +2182,7 @@
20492182 ResetModel();
20502183 refreshContents();
20512184 } else
2052
- if (event.getSource() == linkverticesItem)
2185
+ if (source == linkverticesItem)
20532186 {
20542187 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20552188 // {
....@@ -2062,39 +2195,48 @@
20622195 // group.selection.get(0).setMasterThis(content); // should be identity
20632196 // refreshContents();
20642197 // }
2065
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2198
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
20662199 {
2067
- Object3D content = GrafreeD.clipboard.get(0);
2200
+ Object3D content = Grafreed.clipboard.get(0);
20682201
20692202 if (content instanceof cGroup && ((cGroup)content).transientlink )
20702203 content = ((cGroup)content).get(0);
20712204
2072
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2205
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20732206 for (int i=0; i<group.selection.size(); i++)
20742207 {
2075
- boolean random = CameraPane.RANDOM;
2076
- CameraPane.RANDOM = false; // parse all random nodes
2208
+ boolean random = CameraPane.SWITCH;
2209
+ CameraPane.SWITCH = false; // parse all random nodes
20772210 group.selection.get(i).linkVerticesThis(content);
20782211 // group.selection.get(i).setMasterThis(content); // should be identity
2079
- CameraPane.RANDOM = random;
2212
+ CameraPane.SWITCH = random;
20802213 }
2081
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2214
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
20822215 refreshContents();
20832216 }
20842217 } else
2085
- if (event.getSource() == resetsupportItem)
2218
+ if (source == resetsupportItem)
20862219 {
20872220 for (int i=0; i<group.selection.size(); i++)
20882221 {
2089
- boolean random = CameraPane.RANDOM;
2090
- CameraPane.RANDOM = false; // parse all random nodes
2222
+ boolean random = CameraPane.SWITCH;
2223
+ CameraPane.SWITCH = false; // parse all random nodes
20912224 group.selection.get(i).linkVerticesThis(null);
2092
- CameraPane.RANDOM = random;
2225
+ CameraPane.SWITCH = random;
20932226 }
20942227
20952228 refreshContents();
20962229 } else
2097
- if (event.getSource() == resetreferencesItem)
2230
+ if (source == relinkverticesItem)
2231
+ {
2232
+ boolean random = CameraPane.SWITCH;
2233
+ CameraPane.SWITCH = false; // parse all random nodes
2234
+ group.selection.RelinkToSupport();
2235
+ CameraPane.SWITCH = random;
2236
+
2237
+ refreshContents();
2238
+ } else
2239
+ if (source == resetreferencesItem)
20982240 {
20992241 for (int i=0; i<group.selection.size(); i++)
21002242 {
....@@ -2103,11 +2245,11 @@
21032245
21042246 refreshContents();
21052247 } else
2106
- if (event.getSource() == setMasterItem)
2248
+ if (source == setMasterItem)
21072249 {
2108
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2250
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21092251 {
2110
- Object3D content = GrafreeD.clipboard.get(0);
2252
+ Object3D content = Grafreed.clipboard.get(0);
21112253
21122254 if (content instanceof cGroup && ((cGroup)content).transientlink )
21132255 content = ((cGroup)content).get(0);
....@@ -2116,13 +2258,13 @@
21162258 refreshContents();
21172259 }
21182260 } else
2119
- if (event.getSource() == poseMeshItem)
2261
+ if (source == poseMeshItem)
21202262 {
21212263 if (group.selection.size() == 1)
21222264 {
2123
- if (GrafreeD.clipboard.size() == 1)
2265
+ if (Grafreed.clipboard.size() == 1)
21242266 {
2125
- Object3D content = GrafreeD.clipboard.get(0);
2267
+ Object3D content = Grafreed.clipboard.get(0);
21262268
21272269 if (content instanceof cGroup && ((cGroup)content).transientlink )
21282270 content = ((cGroup)content).get(0);
....@@ -2135,19 +2277,19 @@
21352277 }
21362278
21372279 } else
2138
- if (event.getSource() == revertMeshItem)
2280
+ if (source == revertMeshItem)
21392281 {
21402282 RevertMeshes();
21412283 } else
2142
- if (event.getSource() == resetMeshItem)
2284
+ if (source == resetAllItem)
21432285 {
21442286 ResetAll();
21452287 } else
2146
- if (event.getSource() == stepAllItem)
2288
+ if (source == stepAllItem)
21472289 {
21482290 StepAll();
21492291 } else
2150
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2292
+ if (source == clearItem) // || event.getSource() == clearButton)
21512293 {
21522294 //int indices[] = jList.getSelectedIndices();
21532295 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2155,42 +2297,46 @@
21552297
21562298 ClearSelection(false);
21572299 } else
2158
- if (event.getSource() == clearAllItem)
2300
+ if (source == clearAllItem)
21592301 {
21602302 ClearSelection(true);
21612303 } else
2162
- if (event.getSource() == grabItem)
2304
+ if (source == grabItem)
21632305 {
21642306 group(new cGroup(), true);
21652307 } else
2166
- if (event.getSource() == frontItem)
2308
+ if (source == hideItem)
2309
+ {
2310
+ group(new HiddenObject());
2311
+ } else
2312
+ if (source == frontItem)
21672313 {
21682314 front();
21692315 } else
2170
- if (event.getSource() == backItem)
2316
+ if (source == backItem)
21712317 {
21722318 back();
21732319 } else
2174
- if (event.getSource() == cameraItem)
2320
+ if (source == cameraItem)
21752321 {
21762322 makeSomething(new Camera());
21772323 } else
2178
- if (event.getSource() == compositeItem)
2324
+ if (source == compositeItem)
21792325 {
21802326 group(new Composite());
21812327 } else
2182
- if (event.getSource() == randomItem)
2328
+ if (source == randomItem)
21832329 {
21842330 RandomNode random = new RandomNode();
21852331 group(random);
21862332 if (random.size() > 0)
2187
- random.name = random.get(0).name + "Rnd";
2333
+ random.name = random.get(0).name + "Switch";
21882334 } else
2189
- if (event.getSource() == physicsItem)
2335
+ if (source == physicsItem)
21902336 {
21912337 group(new PhysicsNode());
21922338 } else
2193
- if (event.getSource() == frameselectorItem)
2339
+ if (source == frameselectorItem)
21942340 {
21952341 for (int i=0; i<group.selection.size(); i++)
21962342 {
....@@ -2202,7 +2348,7 @@
22022348 ResetModel();
22032349 refreshContents();
22042350 } else
2205
- if (event.getSource() == switchGeoItem)
2351
+ if (source == switchGeoItem)
22062352 {
22072353 for (int i=0; i<group.selection.size(); i++)
22082354 {
....@@ -2214,7 +2360,7 @@
22142360 ResetModel();
22152361 refreshContents();
22162362 } else
2217
- if (event.getSource() == switchTransfoItem)
2363
+ if (source == switchTransfoItem)
22182364 {
22192365 for (int i=0; i<group.selection.size(); i++)
22202366 {
....@@ -2226,7 +2372,7 @@
22262372 ResetModel();
22272373 refreshContents();
22282374 } else
2229
- if (event.getSource() == morphItem)
2375
+ if (source == morphItem)
22302376 {
22312377 for (int i=0; i<group.selection.size(); i++)
22322378 {
....@@ -2238,7 +2384,7 @@
22382384 ResetModel();
22392385 refreshContents();
22402386 } else
2241
- if (event.getSource() == scriptNodeItem)
2387
+ if (source == scriptNodeItem)
22422388 {
22432389 boolean atleastone = false;
22442390
....@@ -2277,195 +2423,223 @@
22772423 }
22782424 }
22792425 } else
2280
- if (event.getSource() == linkerItem)
2426
+ if (source == linkerItem)
22812427 {
22822428 group(new cLinker());
22832429 } else
2284
- if (event.getSource() == textureItem)
2430
+ if (source == textureItem)
22852431 {
22862432 group(new TextureNode());
22872433 } else
2288
- if (event.getSource() == shadowXItem)
2434
+ if (source == billboardItem)
2435
+ {
2436
+ group(new BillboardNode());
2437
+ } else
2438
+ if (source == shadowXItem)
22892439 {
22902440 CastShadow(0);
22912441 } else
2292
- if (event.getSource() == shadowYItem)
2442
+ if (source == shadowYItem)
22932443 {
22942444 CastShadow(1);
22952445 } else
2296
- if (event.getSource() == shadowZItem)
2446
+ if (source == shadowZItem)
22972447 {
22982448 CastShadow(2);
22992449 } else
2300
- if (event.getSource() == ungroupItem)
2450
+ if (source == ungroupItem)
23012451 {
2302
- ungroup();
2452
+ //ungroup();
2453
+ for (int i=0; i<group.selection.size(); i++)
2454
+ {
2455
+ Ungroup(group.selection.get(i));
2456
+ }
2457
+
2458
+ ClearSelection(false);
2459
+
2460
+ refreshContents();
23032461 } else
2304
- if (event.getSource() == genUVItem)
2462
+ if (source == genUVItem)
23052463 {
23062464 GenUV();
23072465 } else
2308
- if (event.getSource() == genNormalsCADItem)
2466
+ if (source == genNormalsCADItem)
23092467 {
23102468 GenNormals(true);
23112469 } else
2312
- if (event.getSource() == genNormalsORGANItem)
2470
+ if (source == genNormalsMESHItem)
2471
+ {
2472
+ GenNormals(true); // TODO
2473
+ } else
2474
+ if (source == genNormalsORGANItem)
23132475 {
23142476 GenNormals(false);
23152477 } else
2316
- if (event.getSource() == stripifyItem)
2478
+ if (source == genNormalsMINEItem)
2479
+ {
2480
+ GenNormalsMINE();
2481
+ } else
2482
+ if (source == stripifyItem)
23172483 {
23182484 Stripify();
23192485 } else
2320
- if (event.getSource() == unstripifyItem)
2486
+ if (source == unstripifyItem)
23212487 {
23222488 Unstripify();
23232489 } else
2324
- if (event.getSource() == trimItem)
2490
+ if (source == trimItem)
23252491 {
23262492 Trim();
23272493 } else
2328
- if (event.getSource() == untrimItem)
2494
+ if (source == untrimItem)
23292495 {
23302496 Untrim();
23312497 } else
2332
- if (event.getSource() == clearColorsItem)
2498
+ if (source == clearColorsItem)
23332499 {
23342500 ClearColors();
23352501 } else
2336
- if (event.getSource() == clearMaterialsItem)
2502
+ if (source == clearMaterialsItem)
23372503 {
23382504 ClearMaterials();
23392505 } else
2340
- if (event.getSource() == liveleavesItem)
2506
+ if (source == liveleavesItem)
23412507 {
23422508 LiveLeaves(true);
23432509 } else
2344
- if (event.getSource() == unliveleavesItem)
2510
+ if (source == unliveleavesItem)
23452511 {
23462512 LiveLeaves(false);
23472513 } else
2348
- if (event.getSource() == supportleavesItem)
2514
+ if (source == supportleavesItem)
23492515 {
23502516 SupportLeaves(true);
23512517 } else
2352
- if (event.getSource() == unsupportleavesItem)
2518
+ if (source == unsupportleavesItem)
23532519 {
23542520 SupportLeaves(false);
23552521 } else
2356
- if (event.getSource() == hideleavesItem)
2522
+ if (source == hideleavesItem)
23572523 {
23582524 HideLeaves(true);
23592525 } else
2360
- if (event.getSource() == showleavesItem)
2526
+ if (source == showleavesItem)
23612527 {
23622528 HideLeaves(false);
23632529 } else
2364
- if (event.getSource() == markleavesItem)
2530
+ if (source == markleavesItem)
23652531 {
23662532 MarkLeaves(true);
23672533 } else
2368
- if (event.getSource() == unmarkleavesItem)
2534
+ if (source == unmarkleavesItem)
23692535 {
23702536 MarkLeaves(false);
23712537 } else
2372
- if (event.getSource() == flipVItem)
2538
+ if (source == flipVItem)
23732539 {
23742540 FlipV(true);
23752541 } else
2376
- if (event.getSource() == unflipVItem)
2542
+ if (source == unflipVItem)
23772543 {
23782544 FlipV(false);
23792545 } else
2380
- if (event.getSource() == lowTexturesItem)
2546
+ if (source == lowTexturesItem)
23812547 {
23822548 SetTexRes(0);
23832549 } else
2384
- if (event.getSource() == normalTexturesItem)
2550
+ if (source == normalTexturesItem)
23852551 {
23862552 SetTexRes(1);
23872553 } else
2388
- if (event.getSource() == highTexturesItem)
2554
+ if (source == highTexturesItem)
23892555 {
23902556 SetTexRes(2);
23912557 } else
2392
- if (event.getSource() == veryhighTexturesItem)
2558
+ if (source == veryhighTexturesItem)
23932559 {
23942560 SetTexRes(3);
23952561 } else
2396
- if (event.getSource() == maxTexturesItem)
2562
+ if (source == maxTexturesItem)
23972563 {
23982564 SetTexRes(4);
23992565 } else
2400
- if (event.getSource() == panoTexturesItem)
2566
+ if (source == panoTexturesItem)
24012567 {
24022568 SetTexRes(5);
24032569 } else
2404
- if (event.getSource() == reverseNormalsItem)
2570
+ if (source == reverseNormalsItem)
24052571 {
24062572 ReverseNormals();
24072573 } else
2408
- if (event.getSource() == parseverticesItem)
2574
+ if (source == parseverticesItem)
24092575 {
24102576 ParseVertices();
24112577 } else
2412
- if (event.getSource() == textureFieldItem)
2578
+ if (source == textureFieldItem)
24132579 {
24142580 TextureVertices();
24152581 } else
2416
- if (event.getSource() == alignItem)
2582
+ if (source == alignItem)
24172583 {
24182584 Align();
24192585 } else
2420
- if (event.getSource() == mirrorItem)
2586
+ if (source == mirrorItem)
24212587 {
24222588 MirrorPoses();
24232589 } else
2424
- if (event.getSource() == reduceMorphItem)
2590
+ if (source == reduceMorphItem)
24252591 {
24262592 MeshReduction(false);
24272593 } else
2428
- if (event.getSource() == reduce34MorphItem)
2594
+ if (source == reduce34MorphItem)
24292595 {
24302596 MeshReduction(true);
24312597 } else
2432
- if (event.getSource() == reverseTrianglesItem)
2598
+ if (source == reverseTrianglesItem)
24332599 {
24342600 ReverseTriangles();
24352601 } else
2436
- if (event.getSource() == reduceMeshItem)
2602
+ if (source == reduceMeshItem)
24372603 {
24382604 ReduceMesh(false);
24392605 } else
2440
- if (event.getSource() == reduce34MeshItem)
2606
+ if (source == reduce34MeshItem)
24412607 {
24422608 ReduceMesh(true);
24432609 } else
2444
- if (event.getSource() == increaseMeshItem)
2610
+ if (source == increaseMeshItem)
24452611 {
24462612 IncreaseMesh();
24472613 } else
2448
- if (event.getSource() == clipMeshItem)
2614
+ if (source == clipMeshItem)
24492615 {
24502616 ClipMesh();
24512617 } else
2452
- if (event.getSource() == smoothMeshItem)
2618
+ if (source == smoothMeshItem)
24532619 {
24542620 SmoothMesh();
24552621 } else
2456
- if (event.getSource() == transformgeometryItem)
2622
+ if (source == transformGeometryItem)
24572623 {
24582624 TransformGeometry();
24592625 } else
2460
- if (event.getSource() == resetTransformItem)
2626
+ if (source == transformChildrenItem)
2627
+ {
2628
+ TransformChildren();
2629
+ } else
2630
+ if (source == resetTransformItem)
24612631 {
24622632 ResetTransform();
24632633 } else
2464
- if (event.getSource() == resetCentroidItem)
2634
+ if (source == resetCentroidItem)
24652635 {
2466
- ResetCentroid();
2636
+ ResetCentroid(true);
24672637 } else
2468
- if (event.getSource() == resetParentItem)
2638
+ if (source == resetCentroidXZItem)
2639
+ {
2640
+ ResetCentroid(false);
2641
+ } else
2642
+ if (source == resetParentItem)
24692643 {
24702644 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24712645 {
....@@ -2475,7 +2649,7 @@
24752649
24762650 refreshContents();
24772651 } else
2478
- if (event.getSource() == repairParentItem)
2652
+ if (source == repairParentItem)
24792653 {
24802654 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24812655 {
....@@ -2489,7 +2663,21 @@
24892663
24902664 refreshContents();
24912665 } else
2492
- if (event.getSource() == sortbysizeItem)
2666
+ if (source == repairShadowItem)
2667
+ {
2668
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2669
+ {
2670
+ Object3D obj = (Object3D)e.nextElement();
2671
+ obj.RepairShadow();
2672
+// for (int i=0; i<obj.size(); i++)
2673
+// {
2674
+// obj.get(i).parent = obj;
2675
+// }
2676
+ }
2677
+
2678
+ refreshContents();
2679
+ } else
2680
+ if (source == sortbysizeItem)
24932681 {
24942682 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24952683 {
....@@ -2501,7 +2689,7 @@
25012689 ResetModel();
25022690 refreshContents();
25032691 } else
2504
- if (event.getSource() == sortbynameItem)
2692
+ if (source == sortbynameItem)
25052693 {
25062694 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25072695 {
....@@ -2513,7 +2701,7 @@
25132701 ResetModel();
25142702 refreshContents();
25152703 } else
2516
- if (event.getSource() == attachPigmentItem)
2704
+ if (source == attachPigmentItem)
25172705 {
25182706 String texture = GetFile("Attach pigment");
25192707 Object3D obj;
....@@ -2525,7 +2713,7 @@
25252713
25262714 refreshContents();
25272715 } else
2528
- if (event.getSource() == detachPigmentItem)
2716
+ if (source == detachPigmentItem)
25292717 {
25302718 Object3D obj;
25312719 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2536,7 +2724,7 @@
25362724
25372725 refreshContents();
25382726 } else
2539
- if (event.getSource() == attachBumpItem)
2727
+ if (source == attachBumpItem)
25402728 {
25412729 String texture = GetFile("Attach bump");
25422730 Object3D obj;
....@@ -2548,7 +2736,7 @@
25482736
25492737 refreshContents();
25502738 } else
2551
- if (event.getSource() == detachBumpItem)
2739
+ if (source == detachBumpItem)
25522740 {
25532741 Object3D obj;
25542742 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2559,7 +2747,7 @@
25592747
25602748 refreshContents();
25612749 } else
2562
- if (event.getSource() == pigmentBumpItem)
2750
+ if (source == pigmentBumpItem)
25632751 {
25642752 Object3D obj;
25652753 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2570,158 +2758,195 @@
25702758
25712759 refreshContents();
25722760 } else
2573
- if (event.getSource() == flashSelectionButton)
2761
+ if (source == flashSelectionButton)
25742762 {
25752763 CameraPane.flash = true;
25762764 refreshContents();
25772765 } else
2578
- if (event.getSource() == oneButton)
2766
+ if (source == oneButton)
25792767 {
25802768 } else
2581
- if (event.getSource() == twoButton)
2769
+ if (source == twoButton)
25822770 {
25832771 radio.layout = twoButton;
25842772 // bug
25852773 //gridPanel.setDividerLocation(1.0);
25862774 //bigPanel.setDividerLocation(0.0);
2587
- bigThree.remove(jtp);
2588
- bigThree.remove(cameraPanel);
2589
- bigThree.remove(XYZPanel);
2590
- aWindowConstraints.gridx = 0;
2591
- aWindowConstraints.gridy = 0;
2592
- aWindowConstraints.gridwidth = 1;
2593
- // aConstraints.gridheight = 3;
2594
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2595
- aWindowConstraints.weightx = 0;
2596
- aWindowConstraints.weighty = 1;
2597
- //bigThree.add(jtp, aWindowConstraints);
2598
- aWindowConstraints.weightx = 1;
2599
- aWindowConstraints.gridwidth = 3;
2600
- // aConstraints.gridheight = 3;
2601
- aWindowConstraints.gridx = 1;
2602
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2603
- bigThree.add(cameraPanel, aWindowConstraints);
2604
- aWindowConstraints.weightx = 0;
2605
- aWindowConstraints.gridx = 4;
2606
- aWindowConstraints.gridwidth = 1;
2607
- // aConstraints.gridheight = 3;
2608
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2609
- //bigThree.add(XYZPanel, aWindowConstraints);
2610
- bigThree.revalidate();
2775
+// bigThree.remove(scenePanel);
2776
+// bigThree.remove(centralPanel);
2777
+// bigThree.remove(XYZPanel);
2778
+// aWindowConstraints.gridx = 0;
2779
+// aWindowConstraints.gridy = 0;
2780
+// aWindowConstraints.gridwidth = 1;
2781
+// // aConstraints.gridheight = 3;
2782
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2783
+// aWindowConstraints.weightx = 0;
2784
+// aWindowConstraints.weighty = 1;
2785
+// //bigThree.add(jtp, aWindowConstraints);
2786
+// aWindowConstraints.weightx = 1;
2787
+// aWindowConstraints.gridwidth = 3;
2788
+// // aConstraints.gridheight = 3;
2789
+// aWindowConstraints.gridx = 1;
2790
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2791
+// bigThree.add(centralPanel, aWindowConstraints);
2792
+// aWindowConstraints.weightx = 0;
2793
+// aWindowConstraints.gridx = 4;
2794
+// aWindowConstraints.gridwidth = 1;
2795
+// // aConstraints.gridheight = 3;
2796
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2797
+// //bigThree.add(XYZPanel, aWindowConstraints);
2798
+// scenePanel.setVisible(false);
2799
+// centralPanel.setVisible(true);
2800
+// XYZPanel.setVisible(false);
2801
+ bigThree.ClearUI();
2802
+ bigThree.add(centralPanel);
2803
+ bigThree.FlushUI();
26112804 } else
2612
- if (event.getSource() == threeButton)
2805
+ if (source == threeButton)
26132806 {
26142807 radio.layout = threeButton;
2615
- bigThree.remove(jtp);
2616
- bigThree.remove(cameraPanel);
2617
- bigThree.remove(XYZPanel);
2618
- aWindowConstraints.gridx = 0;
2619
- aWindowConstraints.gridy = 0;
2620
- aWindowConstraints.gridwidth = 1;
2621
- // aConstraints.gridheight = 3;
2622
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2623
- aWindowConstraints.weightx = 0;
2624
- aWindowConstraints.weighty = 1;
2625
- //bigThree.add(jtp, aWindowConstraints);
2626
- aWindowConstraints.weightx = 1;
2627
- aWindowConstraints.gridwidth = 3;
2628
- // aConstraints.gridheight = 3;
2629
- aWindowConstraints.gridx = 1;
2630
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2631
- bigThree.add(cameraPanel, aWindowConstraints);
2632
- aWindowConstraints.weightx = 0;
2633
- aWindowConstraints.gridx = 4;
2634
- aWindowConstraints.gridwidth = 1;
2635
- // aConstraints.gridheight = 3;
2636
- aConstraints.fill = GridBagConstraints.VERTICAL;
2637
- bigThree.add(XYZPanel, aWindowConstraints);
2638
- bigThree.revalidate();
2808
+
2809
+// bigThree.remove(scenePanel);
2810
+// bigThree.remove(centralPanel);
2811
+// bigThree.remove(XYZPanel);
2812
+// aWindowConstraints.gridx = 0;
2813
+// aWindowConstraints.gridy = 0;
2814
+// aWindowConstraints.gridwidth = 1;
2815
+// // aConstraints.gridheight = 3;
2816
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2817
+// aWindowConstraints.weightx = 0;
2818
+// aWindowConstraints.weighty = 1;
2819
+// //bigThree.add(jtp, aWindowConstraints);
2820
+// aWindowConstraints.weightx = 1;
2821
+// aWindowConstraints.gridwidth = 3;
2822
+// // aConstraints.gridheight = 3;
2823
+// aWindowConstraints.gridx = 1;
2824
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2825
+// bigThree.add(centralPanel, aWindowConstraints);
2826
+// aWindowConstraints.weightx = 0;
2827
+// aWindowConstraints.gridx = 4;
2828
+// aWindowConstraints.gridwidth = 1;
2829
+// // aConstraints.gridheight = 3;
2830
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2831
+// bigThree.add(XYZPanel, aWindowConstraints);
2832
+// bigThree.validate();
2833
+// scenePanel.setVisible(false);
2834
+// centralPanel.setVisible(true);
2835
+// XYZPanel.setVisible(true);
2836
+ bigThree.ClearUI();
2837
+ bigThree.add(centralPanel);
2838
+ bigThree.add(XYZPanel);
2839
+ bigThree.FlushUI();
26392840 } else
2640
- if (event.getSource() == fourButton)
2841
+ if (source == fourButton)
26412842 {
26422843 radio.layout = fourButton;
2643
- bigThree.remove(jtp);
2644
- bigThree.remove(cameraPanel);
2645
- bigThree.remove(XYZPanel);
2646
- aWindowConstraints.gridx = 0;
2647
- aWindowConstraints.gridy = 0;
2648
- aWindowConstraints.gridwidth = 1;
2649
- // aWindowConstraints.gridheight = 3;
2650
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2651
- aWindowConstraints.weightx = 1;
2652
- aWindowConstraints.weighty = 1;
2653
- bigThree.add(jtp, aWindowConstraints);
2654
- aWindowConstraints.weightx = 1;
2655
- aWindowConstraints.gridwidth = 3;
2656
- // aConstraints.gridheight = 3;
2657
- aWindowConstraints.gridx = 1;
2658
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2659
- //bigThree.add(cameraPanel, aWindowConstraints);
2660
- aWindowConstraints.weightx = 0;
2661
- aWindowConstraints.gridx = 4;
2662
- aWindowConstraints.gridwidth = 1;
2663
- // aWindowConstraints.gridheight = 3;
2664
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2665
- //bigThree.add(XYZPanel, aWindowConstraints);
2666
- bigThree.revalidate();
2844
+
2845
+// bigThree.remove(scenePanel);
2846
+// bigThree.remove(centralPanel);
2847
+// bigThree.remove(XYZPanel);
2848
+// aWindowConstraints.gridx = 0;
2849
+// aWindowConstraints.gridy = 0;
2850
+// aWindowConstraints.gridwidth = 1;
2851
+// // aWindowConstraints.gridheight = 3;
2852
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2853
+// aWindowConstraints.weightx = 1;
2854
+// aWindowConstraints.weighty = 1;
2855
+// bigThree.add(scenePanel, aWindowConstraints);
2856
+// aWindowConstraints.weightx = 1;
2857
+// aWindowConstraints.gridwidth = 3;
2858
+// // aConstraints.gridheight = 3;
2859
+// aWindowConstraints.gridx = 1;
2860
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2861
+// //bigThree.add(cameraPanel, aWindowConstraints);
2862
+// aWindowConstraints.weightx = 0;
2863
+// aWindowConstraints.gridx = 4;
2864
+// aWindowConstraints.gridwidth = 1;
2865
+// // aWindowConstraints.gridheight = 3;
2866
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2867
+// //bigThree.add(XYZPanel, aWindowConstraints);
2868
+// bigThree.validate();
2869
+// scenePanel.setVisible(true);
2870
+// centralPanel.setVisible(false);
2871
+// XYZPanel.setVisible(false);
2872
+ bigThree.ClearUI();
2873
+ bigThree.add(scenePanel);
2874
+ bigThree.FlushUI();
26672875 } else
2668
- if (event.getSource() == sixButton)
2876
+ if (source == sixButton)
26692877 {
26702878 radio.layout = sixButton;
2671
- bigThree.remove(jtp);
2672
- bigThree.remove(cameraPanel);
2673
- bigThree.remove(XYZPanel);
2674
- aWindowConstraints.gridx = 0;
2675
- aWindowConstraints.gridy = 0;
2676
- aWindowConstraints.gridwidth = 1;
2677
- // aConstraints.gridheight = 3;
2678
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2679
- aWindowConstraints.weightx = 0;
2680
- aWindowConstraints.weighty = 1;
2681
- bigThree.add(jtp, aWindowConstraints);
2682
- aWindowConstraints.weightx = 1;
2683
- aWindowConstraints.gridwidth = 3;
2684
- // aWindowConstraints.gridheight = 3;
2685
- aWindowConstraints.gridx = 1;
2686
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2687
- bigThree.add(cameraPanel, aWindowConstraints);
2688
- aWindowConstraints.weightx = 0;
2689
- aWindowConstraints.gridx = 4;
2690
- aWindowConstraints.gridwidth = 1;
2691
- // aWindowConstraints.gridheight = 3;
2692
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2693
- //bigThree.add(XYZPanel, aConstraints);
2694
- bigThree.revalidate();
2879
+
2880
+// bigThree.remove(scenePanel);
2881
+// bigThree.remove(centralPanel);
2882
+// bigThree.remove(XYZPanel);
2883
+// aWindowConstraints.gridx = 0;
2884
+// aWindowConstraints.gridy = 0;
2885
+// aWindowConstraints.gridwidth = 1;
2886
+// // aConstraints.gridheight = 3;
2887
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2888
+// aWindowConstraints.weightx = 0;
2889
+// aWindowConstraints.weighty = 1;
2890
+// bigThree.add(scenePanel, aWindowConstraints);
2891
+// aWindowConstraints.weightx = 1;
2892
+// aWindowConstraints.gridwidth = 3;
2893
+// // aWindowConstraints.gridheight = 3;
2894
+// aWindowConstraints.gridx = 1;
2895
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2896
+// bigThree.add(centralPanel, aWindowConstraints);
2897
+// aWindowConstraints.weightx = 0;
2898
+// aWindowConstraints.gridx = 4;
2899
+// aWindowConstraints.gridwidth = 1;
2900
+// // aWindowConstraints.gridheight = 3;
2901
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2902
+// //bigThree.add(XYZPanel, aConstraints);
2903
+// bigThree.validate();
2904
+// scenePanel.setVisible(true);
2905
+// centralPanel.setVisible(true);
2906
+// XYZPanel.setVisible(false);
2907
+ bigThree.ClearUI();
2908
+ bigThree.add(scenePanel);
2909
+ bigThree.add(centralPanel);
2910
+ bigThree.FlushUI();
26952911 } else
2696
- if (event.getSource() == sevenButton)
2912
+ if (source == sevenButton)
26972913 {
26982914 radio.layout = sevenButton;
2699
- bigThree.remove(jtp);
2700
- bigThree.remove(cameraPanel);
2701
- bigThree.remove(XYZPanel);
2702
- aWindowConstraints.gridx = 0;
2703
- aWindowConstraints.gridy = 0;
2704
- aWindowConstraints.gridwidth = 1;
2705
- // aWindowConstraints.gridheight = 3;
2706
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2707
- aWindowConstraints.weightx = 0;
2708
- aWindowConstraints.weighty = 1;
2709
- bigThree.add(jtp, aWindowConstraints);
2710
- aWindowConstraints.weightx = 1;
2711
- aWindowConstraints.gridwidth = 3;
2712
- // aWindowConstraints.gridheight = 3;
2713
- aWindowConstraints.gridx = 1;
2714
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2715
- bigThree.add(cameraPanel, aWindowConstraints);
2716
- aWindowConstraints.weightx = 0;
2717
- aWindowConstraints.gridx = 4;
2718
- aWindowConstraints.gridwidth = 1;
2719
- // aConstraints.gridheight = 3;
2720
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2721
- bigThree.add(XYZPanel, aWindowConstraints);
2722
- bigThree.revalidate();
2915
+
2916
+// bigThree.remove(scenePanel);
2917
+// bigThree.remove(centralPanel);
2918
+// bigThree.remove(XYZPanel);
2919
+// aWindowConstraints.gridx = 0;
2920
+// aWindowConstraints.gridy = 0;
2921
+// aWindowConstraints.gridwidth = 1;
2922
+// // aWindowConstraints.gridheight = 3;
2923
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2924
+// aWindowConstraints.weightx = 0;
2925
+// aWindowConstraints.weighty = 1;
2926
+// bigThree.add(scenePanel, aWindowConstraints);
2927
+// aWindowConstraints.weightx = 1;
2928
+// aWindowConstraints.gridwidth = 3;
2929
+// // aWindowConstraints.gridheight = 3;
2930
+// aWindowConstraints.gridx = 1;
2931
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2932
+// bigThree.add(centralPanel, aWindowConstraints);
2933
+// aWindowConstraints.weightx = 0;
2934
+// aWindowConstraints.gridx = 4;
2935
+// aWindowConstraints.gridwidth = 1;
2936
+// // aConstraints.gridheight = 3;
2937
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2938
+// bigThree.add(XYZPanel, aWindowConstraints);
2939
+// bigThree.validate();
2940
+// scenePanel.setVisible(true);
2941
+// centralPanel.setVisible(true);
2942
+// XYZPanel.setVisible(true);
2943
+ bigThree.ClearUI();
2944
+ bigThree.add(scenePanel);
2945
+ bigThree.add(centralPanel);
2946
+ bigThree.add(XYZPanel);
2947
+ bigThree.FlushUI();
27232948 } else
2724
- if (event.getSource() == rootButton)
2949
+ if (source == rootButton)
27252950 {
27262951 Object3D obj;
27272952 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2733,7 +2958,7 @@
27332958
27342959 refreshContents(true);
27352960 } else
2736
- if (event.getSource() == closeButton)
2961
+ if (source == closeButton)
27372962 {
27382963 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27392964 cRadio ab;
....@@ -2754,11 +2979,11 @@
27542979 }
27552980 refreshContents(true);
27562981 } else
2757
- if (event.getSource() == editItem || event.getSource() == editButton)
2982
+ if (source == editItem || source == editButton)
27582983 {
27592984 EditSelection(false);
27602985 } else
2761
- if (event.getSource() == uneditButton)
2986
+ if (source == uneditButton)
27622987 {
27632988 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
27642989 {
....@@ -2770,12 +2995,12 @@
27702995
27712996 child.editWindow = null; // ???????????
27722997 }
2773
- objEditor.ctrlPanel.revalidate();
2998
+ objEditor.ctrlPanel.FlushUI();
27742999 //objEditor.jTree.clearSelection();
27753000 //objEditor.ResetSliders();
27763001 refreshContents(true);
27773002 } else
2778
- if (event.getSource() == clearPanelButton)
3003
+ if (source == clearPanelButton)
27793004 {
27803005 assert(copy == group);
27813006 //copy.ClearUI();
....@@ -2786,7 +3011,7 @@
27863011 listUI.clear();
27873012 refreshContents(true);
27883013 } else
2789
- if (event.getSource() == allParamsButton)
3014
+ if (source == allParamsButton)
27903015 {
27913016 assert(copy == group);
27923017
....@@ -2807,19 +3032,19 @@
28073032
28083033 refreshContents(true);
28093034 } else
2810
- if (event.getSource() == unselectButton)
3035
+ if (source == unselectButton)
28113036 {
28123037 objEditor.jTree.clearSelection();
28133038 // ?? oct 2012 GrafreeD.clipboard.clear();
28143039 objEditor.ResetSliders();
28153040 refreshContents(true);
28163041 } else
2817
- if(event.getSource() instanceof cRadio)
3042
+ if(source instanceof cRadio)
28183043 {
28193044 group.parent = keepparent;
28203045 group.attributes = 0;
28213046 //group.editWindow = null;
2822
- /*cRadio*/ radio = (cRadio)event.getSource();
3047
+ /*cRadio*/ radio = (cRadio)source;
28233048 Object3D obj = radio.GetObject();
28243049 System.out.println("Edit " + obj);
28253050 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2839,7 +3064,7 @@
28393064 }
28403065
28413066 copy = group;
2842
- //CameraPane.theRenderer.object = group;
3067
+ //Globals.theRenderer.object = group;
28433068 if(!useclient)
28443069 {
28453070 cameraView.renderCamera = radio.camera;
....@@ -2848,7 +3073,8 @@
28483073 cameraView.cameras[cameraView.cameracount] = radio.camera;
28493074 cameraView.targetLookAt.set(radio.camera.lookAt);
28503075 cameraView.object = group;
2851
- cameraView.lighttouched = true;
3076
+ //cameraView.lighttouched = true;
3077
+ Globals.lighttouched = true;
28523078 topView.object = group;
28533079 frontView.object = group;
28543080 sideView.object = group;
....@@ -2884,7 +3110,7 @@
28843110 if (useclient)
28853111 {
28863112 cameraView.object = client;
2887
- cameraView.lighttouched = true;
3113
+ Globals.lighttouched = true;
28883114 //topView.object = client;
28893115 //frontView.object = client;
28903116 //sideView.object = client;
....@@ -2892,7 +3118,7 @@
28923118 else
28933119 {
28943120 cameraView.object = group;
2895
- cameraView.lighttouched = true;
3121
+ Globals.lighttouched = true;
28963122 //topView.object = group;
28973123 //frontView.object = group;
28983124 //sideView.object = group;
....@@ -2927,6 +3153,28 @@
29273153 refreshContents();
29283154 }
29293155
3156
+ void TransformChildren()
3157
+ {
3158
+ Object3D obj;
3159
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3160
+ {
3161
+ obj = (Object3D)e.nextElement();
3162
+ obj.KeepTextureMatrices();
3163
+ obj.TransformChildren();
3164
+ obj.RestoreTextureMatrices();
3165
+
3166
+// if (obj.parent == null)
3167
+// {
3168
+// System.out.println("NULL PARENT!");
3169
+// new Exception().printStackTrace();
3170
+// }
3171
+// else
3172
+// TouchTransform(obj);
3173
+// //obj.parent.Touch();
3174
+ }
3175
+
3176
+ refreshContents();
3177
+ }
29303178
29313179 void ResetTransform()
29323180 {
....@@ -3039,7 +3287,7 @@
30393287 refreshContents();
30403288 }
30413289
3042
- void ResetCentroid()
3290
+ void ResetCentroid(boolean full)
30433291 {
30443292 Object3D obj;
30453293 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3054,12 +3302,16 @@
30543302 LA.matIdentity(Object3D.mat);
30553303 obj.getBounds(minima, maxima, false);
30563304 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3057
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3305
+ if (full)
3306
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
30583307 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
30593308 obj.TransformMesh(Object3D.mat);
3309
+
30603310 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3061
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3311
+ if (full)
3312
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
30623313 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3314
+
30633315 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
30643316 //Object3D.mat[3][0] = -Object3D.mat[3][0];
30653317 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3125,9 +3377,9 @@
31253377 obj = (Object3D)e.nextElement();
31263378
31273379 System.out.println("Object is: " + obj);
3128
- GrafreeD.AnalyzeObject(obj);
3380
+ Grafreed.AnalyzeObject(obj);
31293381 System.out.println("Boundary rep: " + obj.bRep);
3130
- GrafreeD.AnalyzeObject(obj.bRep);
3382
+ Grafreed.AnalyzeObject(obj.bRep);
31313383
31323384 // System.err.println((size/1024) + " KB is the size of " + obj);
31333385 }
....@@ -3169,6 +3421,13 @@
31693421 void GenNormals(boolean crease)
31703422 {
31713423 group.GenNormalsS(crease);
3424
+
3425
+ refreshContents();
3426
+ }
3427
+
3428
+ void GenNormalsMINE()
3429
+ {
3430
+ group.selection.GenNormalsMINE();
31723431
31733432 refreshContents();
31743433 }
....@@ -3334,8 +3593,8 @@
33343593
33353594 void ParseVertices()
33363595 {
3337
- boolean epsequal = GrafreeD.epsequal;
3338
- GrafreeD.epsequal = true;
3596
+ boolean epsequal = Grafreed.epsequal;
3597
+ Grafreed.epsequal = true;
33393598
33403599 for (int i=0; i<group.selection.size(); i++)
33413600 {
....@@ -3360,7 +3619,7 @@
33603619 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33613620 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33623621
3363
- g.add(GrafreeD.clipboard);
3622
+ g.add(Grafreed.clipboard);
33643623
33653624 buffer.add(g);
33663625 }
....@@ -3375,7 +3634,7 @@
33753634 makeSomething(buffer, i==group.selection.size()-1);
33763635 }
33773636
3378
- GrafreeD.epsequal = epsequal;
3637
+ Grafreed.epsequal = epsequal;
33793638
33803639 refreshContents();
33813640 }
....@@ -3393,7 +3652,16 @@
33933652 String pigment = Object3D.GetPigment(tex);
33943653 //String bump = Object3D.GetBump(tex);
33953654
3396
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3655
+ com.sun.opengl.util.texture.TextureData texturedata = null;
3656
+
3657
+ try
3658
+ {
3659
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3660
+ }
3661
+ catch (Exception e)
3662
+ {
3663
+ System.err.println("FAIL: " + node);
3664
+ }
33973665
33983666 double s = v.s;
33993667
....@@ -3441,12 +3709,26 @@
34413709
34423710 void Align()
34433711 {
3712
+ if (group.selection.size() == 0)
3713
+ return;
3714
+
3715
+ cVector bbmin = new cVector();
3716
+ cVector bbmax = new cVector();
3717
+
3718
+ group.selection.get(0).getBounds(bbmin, bbmax, true);
3719
+
3720
+ double dx = bbmax.x - bbmin.x;
3721
+ double dy = bbmax.y - bbmin.y;
3722
+ double dz = bbmax.z - bbmin.z;
3723
+
3724
+ double scale = Math.sqrt(dx*dx + dy*dy + dz*dz);
3725
+
34443726 for (int i=0; i<group.selection.size(); i++)
34453727 {
34463728 Object3D obj = group.selection.get(i);
34473729
3448
- LA.matTranslate(obj.toParent, i/2f, 0, 0);
3449
- LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0);
3730
+ LA.matTranslate(obj.toParent, i * scale, 0, 0);
3731
+ LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0);
34503732 }
34513733
34523734 refreshContents();
....@@ -3467,11 +3749,11 @@
34673749
34683750 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
34693751
3470
- boolean random = CameraPane.RANDOM;
3471
- CameraPane.RANDOM = false; // parse all random nodes
3752
+ boolean random = CameraPane.SWITCH;
3753
+ CameraPane.SWITCH = false; // parse all random nodes
34723754 lowres.linkVerticesThis(null);
34733755 lowres.linkVerticesThis(sn);
3474
- CameraPane.RANDOM = random;
3756
+ CameraPane.SWITCH = random;
34753757
34763758 System.err.flush();
34773759
....@@ -3511,7 +3793,7 @@
35113793 return;
35123794
35133795 Object3D poses = group.selection.get(0);
3514
- Object3D ref = GrafreeD.clipboard.get(0);
3796
+ Object3D ref = Grafreed.clipboard.get(0);
35153797
35163798 Object3D newgroup = new Object3D("Po:" + poses.name);
35173799
....@@ -3680,7 +3962,7 @@
36803962 group.selection.RelinkToSupport(); // july 2014
36813963 System.out.println("DONE.");
36823964 refreshContents();
3683
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3965
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
36843966 }
36853967
36863968 void ReduceMesh(boolean reduction34)
....@@ -3705,9 +3987,9 @@
37053987
37063988 void ClipMesh()
37073989 {
3708
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
3990
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
37093991 {
3710
- Object3D content = GrafreeD.clipboard.get(0);
3992
+ Object3D content = Grafreed.clipboard.get(0);
37113993
37123994 if (content instanceof cGroup && ((cGroup)content).transientlink )
37133995 content = ((cGroup)content).get(0);
....@@ -3716,7 +3998,7 @@
37163998 // {
37173999 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
37184000 // }
3719
- group.selection.ClipMesh(GrafreeD.clipboard);
4001
+ group.selection.ClipMesh(Grafreed.clipboard);
37204002 }
37214003 // group.selection.ClipMesh(GrafreeD.clipboard);
37224004 System.out.println("DONE.");
....@@ -3956,25 +4238,25 @@
39564238 System.err.println("info : " + child.GetPath());
39574239 }
39584240 }
3959
- else
3960
- {
3961
- objEditor.SetMaterial(group); // .GetMaterial());
3962
- objEditor.AddInfo(group, this, true); // .GetMaterial());
3963
- System.err.println("info : " + group.GetPath());
3964
- }
4241
+// else
4242
+// {
4243
+// objEditor.SetMaterial(group); // .GetMaterial());
4244
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4245
+// System.err.println("info : " + group.GetPath());
4246
+// }
39654247
39664248 objEditor.SetText(); // jan 2014
39674249
3968
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4250
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
39694251 CameraPane.flash = true;
39704252
39714253 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
39724254 // a camera
39734255 {
39744256 CameraPane.camerachangeframe = 0; // don't refuse it
3975
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
3976
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
3977
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4257
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4258
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4259
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
39784260 }
39794261
39804262 refreshContents();
....@@ -4056,12 +4338,12 @@
40564338 {
40574339 if (group.selection.isEmpty())
40584340 return;
4059
- GrafreeD.clipboardIsTempGroup = false;
4341
+ Grafreed.clipboardIsTempGroup = false;
40604342 Composite tGroup = null;
40614343 if (group.selection.size() > 0) // 1)
40624344 {
40634345 tGroup = new cGroup();
4064
- GrafreeD.clipboardIsTempGroup = true;
4346
+ Grafreed.clipboardIsTempGroup = true;
40654347 }
40664348
40674349 if (cut)
....@@ -4101,16 +4383,16 @@
41014383 //System.out.println("cut " + child);
41024384 //System.out.println("parent = " + child.parent);
41034385 // tmp.addChild(child);
4104
- if (GrafreeD.clipboardIsTempGroup)
4386
+ if (Grafreed.clipboardIsTempGroup)
41054387 tGroup.add/*Child*/(tmp);
41064388 else
4107
- GrafreeD.clipboard = tmp;
4389
+ Grafreed.clipboard = tmp;
41084390 }
41094391 else
4110
- if (GrafreeD.clipboardIsTempGroup)
4392
+ if (Grafreed.clipboardIsTempGroup)
41114393 tGroup.add/*Child*/(child);
41124394 else
4113
- GrafreeD.clipboard = child;
4395
+ Grafreed.clipboard = child;
41144396 }
41154397
41164398 //ResetModel();
....@@ -4142,21 +4424,21 @@
41424424 //System.out.println("cut " + elem);
41434425 //System.out.println("parent = " + elem.parent);
41444426 // tmp.addChild(elem);
4145
- if (GrafreeD.clipboardIsTempGroup)
4427
+ if (Grafreed.clipboardIsTempGroup)
41464428 tGroup.add/*Child*/(tmp);
41474429 else
4148
- GrafreeD.clipboard = tmp;
4430
+ Grafreed.clipboard = tmp;
41494431 }
41504432 else
4151
- if (GrafreeD.clipboardIsTempGroup)
4433
+ if (Grafreed.clipboardIsTempGroup)
41524434 tGroup.add/*Child*/(child);
41534435 else
4154
- GrafreeD.clipboard = child;
4436
+ Grafreed.clipboard = child;
41554437 }
41564438
41574439 }
4158
- if (GrafreeD.clipboardIsTempGroup)
4159
- GrafreeD.clipboard = tGroup;
4440
+ if (Grafreed.clipboardIsTempGroup)
4441
+ Grafreed.clipboard = tGroup;
41604442 if (cut)
41614443 {
41624444 ResetModel();
....@@ -4170,7 +4452,7 @@
41704452 // return;
41714453 boolean first = true;
41724454
4173
- if (GrafreeD.clipboardIsTempGroup)
4455
+ if (Grafreed.clipboardIsTempGroup)
41744456 {
41754457 Composite temp;
41764458
....@@ -4181,7 +4463,7 @@
41814463 temp = (Composite)Applet3D.clipboard.deepCopy();
41824464 */
41834465 Object3D elem;
4184
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4466
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
41854467 {
41864468 Object3D child = (Object3D)e.nextElement();
41874469
....@@ -4215,21 +4497,21 @@
42154497 //Object3D cb = Applet3D.clipboard;
42164498 //temp.addChild(cb);
42174499 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4218
- assert(GrafreeD.clipboard.parent == null);
4219
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4220
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4221
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4222
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
4500
+ assert(Grafreed.clipboard.parent == null);
4501
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4502
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4503
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4504
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
42234505 else
4224
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4225
- GrafreeD.clipboard.get(0).parent = keepparent;
4506
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4507
+ Grafreed.clipboard.get(0).parent = keepparent;
42264508 }
42274509
42284510 ResetModel();
42294511 refreshContents();
42304512 }
42314513
4232
- void pasteInto(boolean copyit)
4514
+ void pasteInto(boolean copyit, boolean clone)
42334515 {
42344516 // if (GrafreeD.clipboard == null)
42354517 // return;
....@@ -4258,15 +4540,22 @@
42584540 if (copyit)
42594541 {
42604542 // paste(false);
4261
- CloneClipboard(false); // sept 2014
4543
+ if (clone)
4544
+ {
4545
+ CloneClipboard(false); // sept 2014
4546
+ }
4547
+ else
4548
+ {
4549
+ paste(false);
4550
+ }
42624551 }
42634552 else
42644553 {
42654554 boolean first = true;
42664555
4267
- if (GrafreeD.clipboardIsTempGroup)
4556
+ if (Grafreed.clipboardIsTempGroup)
42684557 {
4269
- Composite temp = (Composite)GrafreeD.clipboard;
4558
+ Composite temp = (Composite)Grafreed.clipboard;
42704559 Object3D copy;
42714560 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
42724561 {
....@@ -4276,7 +4565,7 @@
42764565 }
42774566 } else
42784567 {
4279
- linkSomething(GrafreeD.clipboard); //.get(0));
4568
+ linkSomething(Grafreed.clipboard); //.get(0));
42804569 }
42814570 }
42824571 }
....@@ -4468,6 +4757,26 @@
44684757 makeSomething(csg);
44694758 }
44704759
4760
+ void Ungroup(Object3D g)
4761
+ {
4762
+ if (g instanceof HiddenObject)
4763
+ {
4764
+ HiddenObject h = (HiddenObject) g;
4765
+
4766
+ for (int i=0; i<h.ActualSize(); i++)
4767
+ {
4768
+ objEditor.makeSomething(h.get(i), false);
4769
+ }
4770
+ }
4771
+ else
4772
+ {
4773
+ for (int i=0; i<g.Size(); i++)
4774
+ {
4775
+ objEditor.makeSomething(g.get(i), false);
4776
+ }
4777
+ }
4778
+ }
4779
+
44714780 void ungroup()
44724781 {
44734782 /*
....@@ -4701,7 +5010,7 @@
47015010
47025011 void ImportVRMLX3D()
47035012 {
4704
- if (GrafreeD.standAlone)
5013
+ if (Grafreed.standAlone)
47055014 {
47065015 /**/
47075016 FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
....@@ -4718,7 +5027,7 @@
47185027
47195028 String GetFile(String dialogName)
47205029 {
4721
- if (GrafreeD.standAlone)
5030
+ if (Grafreed.standAlone)
47225031 {
47235032 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
47245033 browser.show();
....@@ -4782,10 +5091,12 @@
47825091 cButton flashSelectionButton;
47835092 cButton editButton;
47845093 cButton uneditButton;
5094
+ JCheckBox allParamsButton;
47855095 cButton clearpanelButton;
4786
- cButton allParamsButton;
47875096 cButton unselectButton;
47885097
5098
+ cButton oneStepButton;
5099
+
47895100 cButton screenfitButton;
47905101 cButton screenfitpointButton;
47915102 cButton snapobjectButton;
....@@ -4827,8 +5138,9 @@
48275138 private MenuItem resetsupportItem;
48285139 private MenuItem resetreferencesItem;
48295140 private MenuItem linkverticesItem;
5141
+ private MenuItem relinkverticesItem;
48305142 private MenuItem setMasterItem;
4831
- private MenuItem resetMeshItem;
5143
+ private MenuItem resetAllItem;
48325144 private MenuItem stepAllItem;
48335145 private MenuItem revertMeshItem;
48345146 private MenuItem poseMeshItem;
....@@ -4839,14 +5151,17 @@
48395151 private MenuItem mergeGeometriesItem;
48405152 private MenuItem copyItem;
48415153 private MenuItem pasteItem;
5154
+ private MenuItem pasteIntoItem;
48425155 private MenuItem pasteLinkItem;
48435156 private MenuItem pasteCloneItem;
48445157 private MenuItem pasteExpandItem;
48455158 private MenuItem clearItem;
48465159 private MenuItem clearAllItem;
48475160 private MenuItem genUVItem;
5161
+ private MenuItem genNormalsMESHItem;
48485162 private MenuItem genNormalsCADItem;
48495163 private MenuItem genNormalsORGANItem;
5164
+ private MenuItem genNormalsMINEItem;
48505165 private MenuItem stripifyItem;
48515166 private MenuItem unstripifyItem;
48525167 private MenuItem trimItem;
....@@ -4886,8 +5201,11 @@
48865201 private MenuItem panoTexturesItem;
48875202
48885203 private MenuItem resetCentroidItem;
4889
- private MenuItem transformgeometryItem;
5204
+ private MenuItem resetCentroidXZItem;
48905205 private MenuItem resetTransformItem;
5206
+ private MenuItem transformGeometryItem;
5207
+ private MenuItem transformChildrenItem;
5208
+ private MenuItem hideItem;
48915209 private MenuItem grabItem;
48925210 private MenuItem backItem;
48935211 private MenuItem frontItem;
....@@ -4908,6 +5226,7 @@
49085226
49095227 private MenuItem resetParentItem;
49105228 private MenuItem repairParentItem;
5229
+ private MenuItem repairShadowItem;
49115230 private MenuItem sortbysizeItem;
49125231 private MenuItem sortbynameItem;
49135232
....@@ -4928,10 +5247,11 @@
49285247 private MenuItem coneItem;
49295248 private MenuItem torusItem;
49305249 private MenuItem superItem;
5250
+ private MenuItem kleinItem;
49315251 private MenuItem blobItem;
49325252 private MenuItem latheItem;
49335253 private MenuItem bezierItem;
4934
- private MenuItem checkerItem;
5254
+ private MenuItem overlayItem;
49355255 private MenuItem meshItem;
49365256 // private MenuItem meshGroupItem;
49375257 private MenuItem springItem;
....@@ -4940,6 +5260,7 @@
49405260 private MenuItem csgItem;
49415261 private MenuItem templateItem;
49425262 private MenuItem textureItem;
5263
+ private MenuItem billboardItem;
49435264 private MenuItem shadowXItem;
49445265 private MenuItem shadowYItem;
49455266 private MenuItem shadowZItem;