Normand Briere
2019-06-09 3ae9b1de47e51e7c150412f2bb14383cb6a5f8f8
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"));
....@@ -287,6 +330,11 @@
287330 genNormalsCADItem.addActionListener(this);
288331 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
289332 genNormalsMESHItem.addActionListener(this);
333
+ if (Globals.ADVANCED)
334
+ {
335
+ genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
336
+ genNormalsMINEItem.addActionListener(this);
337
+ }
290338 stripifyItem = menu.add(new MenuItem("Stripify"));
291339 stripifyItem.addActionListener(this);
292340 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -308,23 +356,34 @@
308356 reduce34MeshItem.addActionListener(this);
309357 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
310358 increaseMeshItem.addActionListener(this);
311
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
312
- smoothMeshItem.addActionListener(this);
313359 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
314360 clipMeshItem.addActionListener(this);
361
+
362
+ if (Globals.ADVANCED)
363
+ {
364
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
365
+ smoothMeshItem.addActionListener(this);
366
+ }
315367
316368 oe.menuBar.add(menu = new Menu("Attributes"));
317369 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
318370 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);
319375 menu.add("-");
320376 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
321377 liveleavesItem.addActionListener(this);
322378 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
323379 unliveleavesItem.addActionListener(this);
380
+ if (Globals.ADVANCED)
381
+ {
324382 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
325383 supportleavesItem.addActionListener(this);
326384 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
327385 unsupportleavesItem.addActionListener(this);
386
+ }
328387 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
329388 hideleavesItem.addActionListener(this);
330389 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -368,28 +427,34 @@
368427 sortbynameItem = menu.add(new MenuItem("Sort by name"));
369428 sortbynameItem.addActionListener(this);
370429 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.
371437 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
372438 extractGeometriesItem.addActionListener(this);
373439 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
374440 cloneGeometriesItem.addActionListener(this);
375
- shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
376
- shareGeometriesItem.addActionListener(this);
377
- mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
378
- mergeGeometriesItem.addActionListener(this);
441
+ }
379442
380443 oe.menuBar.add(menu = new Menu("Insert"));
381444 buildCreateMenu(menu);
382445
383
-
384446 oe.menuBar.add(menu = new Menu("Include"));
385
- importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
386
- importGFDItem.addActionListener(this);
387
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
388
- importVRMLX3DItem.addActionListener(this);
389
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
447
+ importOBJItem = menu.add(new MenuItem("OBJ file..."));
390448 importOBJItem.addActionListener(this);
391
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
449
+ menu.add("-");
450
+ import3DSItem = menu.add(new MenuItem("3DS file..."));
392451 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);
393458
394459 oe.menuBar.add(menu = new Menu("Tools"));
395460 buildToolsMenu(menu);
....@@ -425,150 +490,98 @@
425490 oe.radioPanel.add(dummyButton);
426491 oe.buttonGroup.add(dummyButton);
427492 */
428
- aConstraints.gridy += 1;
429
- oe.aConstraints.gridwidth = 1;
430
- oe.aConstraints.gridx = 0;
493
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
431494
432
- 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");
433497 liveCB.addItemListener(this);
434498
435
- oe.aConstraints.gridx += 1;
436
- oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints);
437
- supportCB.addItemListener(this);
438
-
439
- // oe.aConstraints.gridx += 1;
440
- // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints);
441
- // localCB.addItemListener(this);
442
-
443
- oe.aConstraints.gridx += 1;
444
- oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints);
445
- crowdCB.addItemListener(this);
446
-
447
- oe.aConstraints.gridx += 1;
448
- oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints);
449
- smoothCB.addItemListener(this);
450
-
451
- oe.aConstraints.gridx += 1;
452
- 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");
453505 fastCB.addItemListener(this);
454
- oe.aConstraints.gridx += 1;
455
- oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints);
456
- slowCB.addItemListener(this);
457
- oe.aConstraints.gridx += 1;
458
- oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints);
459
- boxCB.addItemListener(this);
460
-
461
-// oe.aConstraints.gridx += 1;
462
-// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints);
463
-// speakerMocapCB.addItemListener(this);
464
-
465
- if (false)
466
- {
467
- // handled in scripts
468
- oe.aConstraints.gridx += 1;
469
- oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints);
470
- speakerCameraCB.addItemListener(this);
471
-
472
- oe.aConstraints.gridx += 1;
473
- oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints);
474
- speakerFocusCB.addItemListener(this);
475
-
476
- oe.aConstraints.gridx += 1;
477
- oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints);
478
- smoothfocusCB.addItemListener(this);
479
- }
480
-
481
-//oe.aConstraints.gridx += 1;
482
-//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints);
483
-// debugCB.addItemListener(this);
484
-
485
- oe.aConstraints.gridx += 1;
486
- oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints);
487
- oeilCB.addItemListener(this);
488
-
489
- oe.aConstraints.gridx += 1;
490
- oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints);
491
- lookAtCB.addItemListener(this);
492
-
493
- oe.aConstraints.gridx += 1;
494
- 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");
495509 trackCB.addItemListener(this);
496510
497
- oe.aConstraints.gridx += 1;
498
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
511
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
512
+ screenfitButton.setToolTipText("Screen fit");
499513 screenfitButton.addActionListener(this);
500
- oe.aConstraints.gridx += 1;
514
+
501515 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
502516 // screenfitpointButton.addActionListener(this);
503
-// oe.aConstraints.gridx += 1;
504
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
505
- snapobjectButton.addActionListener(this);
506
- oe.aConstraints.gridx += 1;
507517
508
- //aConstraints.gridx = 0;
509
- //aConstraints.gridy += 1;
510
- oe.aConstraints.weighty = 0;
511
- oe.aConstraints.gridwidth = 1;
512
-
513
- 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");
514527 flashSelectionButton.addActionListener(this);
515
- oe.aConstraints.gridx += 1;
516
- oe.aConstraints.weighty = 0;
517
- oe.aConstraints.gridwidth = 1;
518528
519
- //
520
- 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");
521533 twoButton.addActionListener(this);
522
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
534
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
523535 fourButton.addActionListener(this);
524
- 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");
525539 sixButton.addActionListener(this);
526
- 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");
527542 threeButton.addActionListener(this);
528
- 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");
529545 sevenButton.addActionListener(this);
530546 //
531547
532
- 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");
533550 rootButton.addActionListener(this);
534
- oe.aConstraints.gridx += 1;
535
- 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");
536554 closeButton.addActionListener(this);
537555 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
538556 //clearButton.addActionListener(this);
539
- oe.aConstraints.gridx += 1;
540557
541
- oe.aConstraints.gridx = 1; //
542
- 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");
543562 editButton.addActionListener(this);
544
- oe.aConstraints.gridx += 1;
545
- oe.aConstraints.weighty = 0;
546
- oe.aConstraints.gridwidth = 1;
547563
548
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
564
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
565
+ uneditButton.setToolTipText("Unedit selection");
549566 uneditButton.addActionListener(this);
550567
551
- oe.aConstraints.gridx += 1;
552
- oe.aConstraints.weighty = 0;
553
- oe.aConstraints.gridwidth = 1;
554
-
555
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
556
- clearPanelButton.addActionListener(this);
557
-
558
- oe.aConstraints.gridx += 1;
559
- oe.aConstraints.weighty = 0;
560
- oe.aConstraints.gridwidth = 1;
561
-
562
- 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");
563570 allParamsButton.addActionListener(this);
564571
565
- oe.aConstraints.gridx += 1;
566
- oe.aConstraints.weighty = 0;
567
- oe.aConstraints.gridwidth = 1;
568
-
569
- 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");
570578 unselectButton.addActionListener(this);
571579
580
+ commandsPanel.preferredHeight = 1;
581
+
582
+ oe.treePanel.add(commandsPanel);
583
+ oe.treePanel.Return();
584
+
572585 // oe.aConstraints.gridx += 1;
573586 // oe.aConstraints.weighty = 0;
574587 // oe.aConstraints.gridwidth = 1;
....@@ -580,40 +593,37 @@
580593 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
581594 // gcButton.addActionListener(this);
582595
583
- oe.aConstraints.gridx = 0;
584
- oe.aConstraints.gridy += 1;
585
-
586
- //ctrlPanel.add(objList = new List(5, true));
587
- oe.aConstraints.gridwidth = 100;
588
- // oe.aConstraints.gridheight = 100;
589
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
590
- oe.aConstraints.gridheight = 1;
591
- oe.aConstraints.weighty = 0.5;
592
- oe.aConstraints.gridx = 0;
593
- JScrollPane jSP;
596
+ cGridBag jSPPanel = new cGridBag();
597
+
598
+ JScrollPane jSP;
594599 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
595
- 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);
596601 ResetModel();
597
- oe.aConstraints.weighty = 0.5;
598
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
599
- oe.aConstraints.gridy += 1;
600
- oe.aConstraints.gridwidth = 1;
602
+
603
+ oe.treePanel.add(jSPPanel);
604
+ oe.treePanel.Return();
601605
602
- oe.aConstraints.weighty = 0;
603
- oe.aConstraints.gridwidth = 2;
604
-
605
- 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");
606610 colorCB.addItemListener(this);
607
- oe.aConstraints.gridx += 2;
608
- 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");
609614 materialCB.addItemListener(this);
610
- oe.aConstraints.gridx += 2;
611
- 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");
612618 textureCB.addItemListener(this);
613619
614
- oe.aConstraints.gridx = 0;
615
- oe.aConstraints.gridy += 1;
620
+ copyOptionsPanel.preferredHeight = 1;
621
+ oe.treePanel.add(copyOptionsPanel);
622
+ oe.treePanel.Return();
616623
624
+// mainPanel.setDividerLocation(0.5); //1.0);
625
+// mainPanel.setResizeWeight(0.5);
626
+
617627 //jList.addListSelectionListener(this);
618628 oe.jTree.addTreeSelectionListener(this);
619629 //jTree.setRootVisible(false);
....@@ -635,18 +645,91 @@
635645 radio.layout = sevenButton;
636646 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
637647 }
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
+ }
638720
639721 void EditObject(Object3D obj)
640722 {
641
- cRadio dummyButton = new cRadio(obj.name);
642
- dummyButton.SetObject(obj);
643
- dummyButton.layout = sevenButton;
644
- dummyButton.SetCamera(cameraView.renderCamera, false);
645
- dummyButton.addActionListener(this);
646
- radioPanel.add(dummyButton);
647
- buttonGroup.add(dummyButton);
648
- 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();
649731 }
732
+
650733 void SetupViews(ObjEditor oe)
651734 {
652735 oe.SetupViews();
....@@ -665,6 +748,7 @@
665748 JCheckBox fastCB;
666749 JCheckBox slowCB;
667750 JCheckBox boxCB;
751
+ JCheckBox zoomBoxCB;
668752 JCheckBox trackCB;
669753 JCheckBox smoothfocusCB;
670754 // JCheckBox speakerMocapCB;
....@@ -707,8 +791,7 @@
707791 dropAttributes |= Object3D.TEXTURE;
708792 else
709793 dropAttributes &= ~Object3D.TEXTURE;
710
- }
711
- else if(e.getSource() == liveCB)
794
+ } else if(e.getSource() == liveCB)
712795 {
713796 cameraView.ToggleLive();
714797 }
....@@ -745,6 +828,10 @@
745828 Recompile();
746829 cameraView.repaint();
747830 // refreshContents();
831
+ }
832
+ else if(e.getSource() == zoomBoxCB)
833
+ {
834
+ cameraView.ToggleZoomBoxMode();
748835 }
749836 else if(e.getSource() == smoothfocusCB)
750837 {
....@@ -859,7 +946,9 @@
859946 // objEditor.DropFile((java.io.File[]) object, true);
860947 // return;
861948 // }
862
- if (string.charAt(0) == '/')
949
+
950
+ // File path for Mac and Windows
951
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
863952 {
864953 // file(s)
865954 String[] names = string.split("\n");
....@@ -886,7 +975,7 @@
886975
887976 flashIt = false;
888977 CameraPane pane = (CameraPane) target;
889
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
978
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
890979 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
891980
892981 if (group.selection.size() == 1)
....@@ -913,11 +1002,11 @@
9131002 {
9141003 loadClipboard(true);
9151004 objEditor.jTree.setSelectionPath(destinationPath);
916
- pasteInto(false);
1005
+ pasteInto(false, false);
9171006 } else {
9181007 loadClipboard(false);
9191008 objEditor.jTree.setSelectionPath(destinationPath);
920
- pasteInto(false); // true); // ???
1009
+ pasteInto(false, false); // true); // ???
9211010 }
9221011 }
9231012 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1035,29 +1124,37 @@
10351124 torusItem.addActionListener(this);
10361125 superItem = menu.add(new MenuItem("Superellipsoid"));
10371126 superItem.addActionListener(this);
1127
+ kleinItem = menu.add(new MenuItem("Klein Bottle"));
1128
+ kleinItem.addActionListener(this);
10381129 particleItem = menu.add(new MenuItem("Particle system"));
10391130 particleItem.addActionListener(this);
1131
+ if (Globals.ADVANCED)
1132
+ {
10401133 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10411134 ragdollItem.addActionListener(this);
10421135 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10431136 ragdoll2Item.addActionListener(this);
1137
+ }
10441138 menu.add("-");
1045
- meshItem = menu.add(new MenuItem("Mesh"));
1139
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10461140 meshItem.addActionListener(this);
10471141 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10481142 // meshGroupItem.addActionListener(this);
1143
+ if (Globals.ADVANCED)
1144
+ {
10491145 springItem = menu.add(new MenuItem("Spring"));
10501146 springItem.addActionListener(this);
10511147 flagItem = menu.add(new MenuItem("Flag"));
10521148 flagItem.addActionListener(this);
1053
- bezierItem = menu.add(new MenuItem("Patch"));
1054
- bezierItem.addActionListener(this);
1055
- checkerItem = menu.add(new MenuItem("Checker"));
1056
- checkerItem.addActionListener(this);
10571149 blobItem = menu.add(new MenuItem("Blob"));
10581150 blobItem.addActionListener(this);
10591151 latheItem = menu.add(new MenuItem("Lathe"));
10601152 latheItem.addActionListener(this);
1153
+ }
1154
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1155
+ bezierItem.addActionListener(this);
1156
+ overlayItem = menu.add(new MenuItem("Overlay"));
1157
+ overlayItem.addActionListener(this);
10611158 lightItem = menu.add(new MenuItem("Light"));
10621159 lightItem.addActionListener(this);
10631160 menu.add("-");
....@@ -1067,34 +1164,39 @@
10671164 loopItem.addActionListener(this);
10681165 doubleItem = menu.add(new MenuItem("Fork"));
10691166 doubleItem.addActionListener(this);
1167
+ if (Globals.ADVANCED)
1168
+ {
10701169 tripleItem = menu.add(new MenuItem("Trident"));
10711170 tripleItem.addActionListener(this);
1171
+ }
10721172 }
10731173
10741174 void buildToolsMenu(Menu menu)
10751175 {
10761176 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10771177 animationItem.addItemListener(this);
1078
- animationItem.setState(CameraPane.ANIMATION);
1178
+ animationItem.setState(Globals.ANIMATION);
10791179
10801180 menu.add("-");
10811181 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
10821182 parseverticesItem.addActionListener(this);
10831183 textureFieldItem = menu.add(new MenuItem("Texture Field"));
10841184 textureFieldItem.addActionListener(this);
1085
- alignItem = menu.add(new MenuItem("Align"));
1185
+ alignItem = menu.add(new MenuItem("Align Objects"));
10861186 alignItem.addActionListener(this);
1087
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1088
- mirrorItem.addActionListener(this);
10891187 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
10901188 reduceMorphItem.addActionListener(this);
10911189 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
10921190 reduce34MorphItem.addActionListener(this);
1093
-
1191
+ menu.add("-");
10941192 menu.add(computeAOItem = new MenuItem("Compute AO"));
10951193 computeAOItem.addActionListener(this);
1096
- menu.add("-");
10971194
1195
+ if (Globals.ADVANCED)
1196
+ {
1197
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1198
+ mirrorItem.addActionListener(this);
1199
+ menu.add("-");
10981200 menu.add(memoryItem = new MenuItem("Memory Usage"));
10991201 memoryItem.addActionListener(this);
11001202 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1108,6 +1210,8 @@
11081210 resetParentItem.addActionListener(this);
11091211 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11101212 repairParentItem.addActionListener(this);
1213
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1214
+ repairShadowItem.addActionListener(this);
11111215 menu.add(invariantsItem = new MenuItem("Invariants"));
11121216 invariantsItem.addActionListener(this);
11131217 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1115,6 +1219,7 @@
11151219 menu.add("-");
11161220 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11171221 editScriptItem.addActionListener(this);
1222
+ }
11181223 }
11191224
11201225 void ScreenFit()
....@@ -1443,9 +1548,9 @@
14431548
14441549 void Overwrite(int mask)
14451550 {
1446
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1551
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14471552 {
1448
- Object3D content = GrafreeD.clipboard.get(0);
1553
+ Object3D content = Grafreed.clipboard.get(0);
14491554
14501555 if (content instanceof cGroup && ((cGroup)content).transientlink )
14511556 content = ((cGroup)content).get(0);
....@@ -1468,6 +1573,7 @@
14681573 //
14691574 public void actionPerformed(ActionEvent event) // , Object arg)
14701575 {
1576
+ Object source = event.getSource();
14711577 /*
14721578 if (event.getSource() == nameField)
14731579 {
....@@ -1479,11 +1585,11 @@
14791585 }
14801586 else
14811587 */
1482
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1588
+ if (source == lookAtItem || source == lookFromItem)
14831589 {
14841590 ScreenFit();
14851591 } else
1486
- if (event.getSource() == switchItem)
1592
+ if (source == switchItem)
14871593 {
14881594 cVector v1 = new cVector();
14891595 cVector v2 = new cVector();
....@@ -1492,11 +1598,11 @@
14921598 objEditor.cameraView.renderCamera.setAim(v2, v1);
14931599 objEditor.cameraView.repaint();
14941600 } else
1495
- if (event.getSource() == rectoidItem)
1601
+ if (source == rectoidItem)
14961602 {
14971603 makeSomething(new Box());
14981604 } else
1499
- if (event.getSource() == particleItem)
1605
+ if (source == particleItem)
15001606 {
15011607 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15021608 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1517,9 +1623,9 @@
15171623 applyExample(particleGeom, "SMOKE");
15181624 makeSomething(particleGeom);
15191625 } else
1520
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1626
+ if (source == ragdollItem || source == ragdoll2Item)
15211627 {
1522
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1628
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15231629
15241630 ragdoll.toParent = LA.newMatrix();
15251631 ragdoll.fromParent = LA.newMatrix();
....@@ -1537,7 +1643,7 @@
15371643 } else
15381644 /*
15391645 */
1540
- if (event.getSource() == heightFieldItem)
1646
+ if (source == heightFieldItem)
15411647 {
15421648 Object3D obj = new Object3D();
15431649
....@@ -1575,27 +1681,31 @@
15751681
15761682 makeSomething(obj);
15771683 } else
1578
- if (event.getSource() == gridItem)
1684
+ if (source == gridItem)
15791685 {
15801686 makeSomething(new Grid());
15811687 } else
1582
- if (event.getSource() == ellipsoidItem)
1688
+ if (source == ellipsoidItem)
15831689 {
15841690 makeSomething(new Sphere());
15851691 } else
1586
- if (event.getSource() == coneItem)
1692
+ if (source == coneItem)
15871693 {
15881694 makeSomething(new Cone());
15891695 } else
1590
- if (event.getSource() == torusItem)
1696
+ if (source == torusItem)
15911697 {
15921698 makeSomething(new Torus());
15931699 } else
1594
- if (event.getSource() == superItem)
1700
+ if (source == superItem)
15951701 {
15961702 makeSomething(new Superellipsoid());
15971703 } else
1598
- if (event.getSource() == blobItem)
1704
+ if (source == kleinItem)
1705
+ {
1706
+ makeSomething(new Klein());
1707
+ } else
1708
+ if (source == blobItem)
15991709 {
16001710 Blob blob = new Blob();
16011711 BlobComponent comp = new BlobComponent();
....@@ -1603,15 +1713,15 @@
16031713 //blob.retile();
16041714 makeSomething(blob);
16051715 } else
1606
- if (event.getSource() == latheItem)
1716
+ if (source == latheItem)
16071717 {
16081718 makeSomething(new Lathe());
16091719 } else
1610
- if (event.getSource() == bezierItem)
1720
+ if (source == bezierItem)
16111721 {
16121722 makeSomething(new BezierSurface());
16131723 } else
1614
- if (event.getSource() == checkerItem)
1724
+ if (source == overlayItem)
16151725 {
16161726 /*
16171727 Object3D obj = new BezierSurface(5,8);
....@@ -1626,7 +1736,7 @@
16261736 */
16271737 makeSomething(new Checker());
16281738 } else
1629
- if (event.getSource() == meshItem)
1739
+ if (source == meshItem)
16301740 {
16311741 Object3D itemtomake = new Object3D();
16321742 Object3D child;
....@@ -1647,35 +1757,35 @@
16471757 makeSomething(child);
16481758 }
16491759 } else
1650
- if (event.getSource() == springItem)
1760
+ if (source == springItem)
16511761 {
16521762 cSpring s = new cSpring();
16531763 s.setup();
16541764 makeSomething(s);
16551765 } else
1656
- if (event.getSource() == flagItem)
1766
+ if (source == flagItem)
16571767 {
16581768 cSpring s = new cFlag();
16591769 s.setup();
16601770 makeSomething(s);
16611771 } else
1662
- if (event.getSource() == lightItem)
1772
+ if (source == lightItem)
16631773 {
16641774 makeSomething(new Light());
16651775 } else
1666
- if (event.getSource() == csgItem)
1776
+ if (source == csgItem)
16671777 {
16681778 group(new CSG());
16691779 } else
1670
- if (event.getSource() == templateItem)
1780
+ if (source == templateItem)
16711781 {
16721782 group(new cTemplate());
16731783 } else
1674
- if (event.getSource() == attributeItem)
1784
+ if (source == attributeItem)
16751785 {
16761786 makeSomething(new Attribute());
16771787 } else
1678
- if (event.getSource() == pointflowItem)
1788
+ if (source == pointflowItem)
16791789 {
16801790 makeSomething(new PointFlow());
16811791 } else
....@@ -1687,7 +1797,7 @@
16871797 } else
16881798 */
16891799
1690
- if (event.getSource() == superLoopItem)
1800
+ if (source == superLoopItem)
16911801 {
16921802 Composite g = new cGroup();
16931803 for (int i=0; i<15; i++)
....@@ -1709,7 +1819,7 @@
17091819
17101820 group(g);
17111821 } else
1712
- if (event.getSource() == loopItem)
1822
+ if (source == loopItem)
17131823 {
17141824 Composite csg = new GroupLeaf();
17151825 csg.count = 5;
....@@ -1718,7 +1828,7 @@
17181828 csg.addChild(child);
17191829 child.addChild(csg);
17201830 } else
1721
- if (event.getSource() == doubleItem)
1831
+ if (source == doubleItem)
17221832 {
17231833 Composite csg = new GroupLeaf();
17241834 csg.count = 5;
....@@ -1730,7 +1840,7 @@
17301840 csg.addChild(child);
17311841 child.addChild(csg);
17321842 } else
1733
- if (event.getSource() == tripleItem)
1843
+ if (source == tripleItem)
17341844 {
17351845 Composite csg = new GroupLeaf();
17361846 csg.count = 4;
....@@ -1746,70 +1856,83 @@
17461856 child.addChild(csg);
17471857 } else
17481858
1749
- if (event.getSource() == importGFDItem)
1859
+ if (source == importGFDItem)
17501860 {
17511861 ImportGFD();
17521862 } else
1753
- if (event.getSource() == importVRMLX3DItem)
1863
+ if (source == importVRMLX3DItem)
17541864 {
17551865 ImportVRMLX3D();
17561866 } else
1757
- if (event.getSource() == import3DSItem)
1867
+ if (source == import3DSItem)
17581868 {
17591869 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17601870 } else
1761
- if (event.getSource() == importOBJItem)
1871
+ if (source == importOBJItem)
17621872 {
1763
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1873
+ //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1874
+ FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD);
1875
+ browser.setVisible(true);
1876
+ String filename = browser.getFile();
1877
+ if (filename != null && filename.length() > 0)
1878
+ {
1879
+ String fullname = browser.getDirectory() + filename;
1880
+ makeSomething(ReadOBJ(fullname), true);
1881
+ }
17641882 } else
1765
- if (event.getSource() == computeAOItem)
1883
+ if (source == computeAOItem)
17661884 {
1767
- CameraPane.drawMode = CameraPane.OCCLUSION;
1768
- CameraPane.theRenderer.repaint();
1885
+ Globals.drawMode = CameraPane.OCCLUSION;
1886
+ Globals.theRenderer.repaint();
17691887 } else
1770
- if (event.getSource() == recompileItem)
1888
+ if (source == recompileItem)
17711889 {
17721890 Recompile();
17731891 refreshContents();
17741892 } else
1775
- if (event.getSource() == editScriptItem)
1893
+ if (source == editScriptItem)
17761894 {
17771895 OpenDialog();
17781896 refreshContents();
17791897 } else
1780
- if (event.getSource() == invariantsItem)
1898
+ if (source == invariantsItem)
17811899 {
17821900 System.out.println("Invariants:");
1783
- GrafreeD.theApplet3D.universe.invariants();
1901
+ Grafreed.grafreeD.universe.invariants();
17841902 } else
1785
- if (event.getSource() == memoryItem)
1903
+ if (source == memoryItem)
17861904 {
17871905 //System.out.println("Invariants:");
17881906 PrintMemory();
17891907 } else
1790
- if (event.getSource() == pathItem)
1908
+ if (source == pathItem)
17911909 {
17921910 PrintPath();
17931911 } else
1794
- if (event.getSource() == analyzeItem)
1912
+ if (source == analyzeItem)
17951913 {
17961914 AnalyzeObject();
17971915 } else
1798
- if (event.getSource() == dumpItem)
1916
+ if (source == dumpItem)
17991917 {
18001918 DumpObject();
18011919 } else
1802
- if (event.getSource() == screenfitButton)
1920
+ if (source == oneStepButton)
1921
+ {
1922
+ Globals.ONESTEP = true;
1923
+ cameraView.repaint();
1924
+ } else
1925
+ if (source == screenfitButton)
18031926 {
18041927 //Reload(lastConverter, lastFilename, true);
18051928 ScreenFit();
18061929 } else
1807
- if (event.getSource() == screenfitpointButton)
1930
+ if (source == screenfitpointButton)
18081931 {
18091932 //Reload(lastConverter, lastFilename, true);
18101933 ScreenFitPoint();
18111934 } else
1812
- if (event.getSource() == snapobjectButton)
1935
+ if (source == snapobjectButton)
18131936 {
18141937 //Reload(lastConverter, lastFilename, true);
18151938 SnapObject();
....@@ -1820,13 +1943,13 @@
18201943 // Recompile();
18211944 // refreshContents();
18221945 // } else
1823
- if (event.getSource() == gcButton)
1946
+ if (source == gcButton)
18241947 {
18251948 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18261949 System.gc();
18271950 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18281951 } else
1829
- if (event.getSource() == editLeafItem)
1952
+ if (source == editLeafItem)
18301953 {
18311954 Object3D obj;
18321955 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1840,62 +1963,66 @@
18401963 }
18411964 refreshContents(true);
18421965 } else
1843
- if (event.getSource() == openWindowItem)
1966
+ if (source == openWindowItem)
18441967 {
18451968 EditSelection(true);
18461969 } else
1847
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1970
+ if (source == cutItem || source == clearButton)
18481971 {
18491972 loadClipboard(true);
18501973 } else
1851
- if (event.getSource() == duplicateItem)
1974
+ if (source == duplicateItem)
18521975 {
1853
- Object3D keep = GrafreeD.clipboard;
1976
+ Object3D keep = Grafreed.clipboard;
18541977 loadClipboard(false);
18551978 paste(false);
1856
- GrafreeD.clipboard = keep;
1979
+ Grafreed.clipboard = keep;
18571980 } else
1858
- if (event.getSource() == cloneItem)
1981
+ if (source == cloneItem)
18591982 {
18601983 CloneSelection(false);
18611984 } else
1862
- if (event.getSource() == cloneSupportItem)
1985
+ if (source == cloneSupportItem)
18631986 {
18641987 CloneSelection(true);
18651988 } else
1866
- if (event.getSource() == copyItem)
1989
+ if (source == copyItem)
18671990 {
18681991 loadClipboard(false);
18691992 } else
1870
- if (event.getSource() == pasteItem)
1993
+ if (source == pasteItem)
18711994 {
18721995 paste(false);
18731996 } else
1874
- if (event.getSource() == pasteLinkItem)
1997
+ if (source == pasteIntoItem)
18751998 {
1876
- pasteInto(false);
1999
+ pasteInto(true, false);
18772000 } else
1878
- if (event.getSource() == pasteCloneItem)
2001
+ if (source == pasteLinkItem)
18792002 {
1880
- pasteInto(true);
2003
+ pasteInto(false, false);
18812004 } else
1882
- if (event.getSource() == pasteExpandItem)
2005
+ if (source == pasteCloneItem)
2006
+ {
2007
+ pasteInto(true, true);
2008
+ } else
2009
+ if (source == pasteExpandItem)
18832010 {
18842011 paste(true);
18852012 } else
1886
- if (event.getSource() == synchronizeItem)
2013
+ if (source == synchronizeItem)
18872014 {
18882015 Overwrite(Object3D.TRANSFORM);
18892016 } else
1890
- if (event.getSource() == overwriteNameItem)
2017
+ if (source == overwriteNameItem)
18912018 {
18922019 Overwrite(Object3D.NAME);
18932020 } else
1894
- if (event.getSource() == overwriteUVItem)
2021
+ if (source == overwriteUVItem)
18952022 {
18962023 Overwrite(Object3D.UV);
18972024 } else
1898
- if (event.getSource() == overwriteMatItem)
2025
+ if (source == overwriteMatItem)
18992026 {
19002027 /* july 2015
19012028 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1915,7 +2042,7 @@
19152042
19162043 Overwrite(dropAttributes);
19172044 }
1918
- if (event.getSource() == overwriteGeoItem)
2045
+ if (source == overwriteGeoItem)
19192046 {
19202047 Overwrite(Object3D.GEOMETRY);
19212048 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1932,7 +2059,7 @@
19322059 // refreshContents();
19332060 // }
19342061 } else
1935
- if (event.getSource() == generateMeshItem)
2062
+ if (source == generateMeshItem)
19362063 {
19372064 //if (group.selection.size() == 1)
19382065 // for (int i=0; i<group.selection.size(); i++)
....@@ -1943,7 +2070,7 @@
19432070 ResetModel();
19442071 refreshContents();
19452072 } else
1946
- if (event.getSource() == extractGeometriesItem)
2073
+ if (source == extractGeometriesItem)
19472074 {
19482075 boolean one = false;
19492076
....@@ -1970,7 +2097,7 @@
19702097 ResetModel();
19712098 refreshContents();
19722099 } else
1973
- if (event.getSource() == cloneGeometriesItem)
2100
+ if (source == cloneGeometriesItem)
19742101 {
19752102 boolean one = false;
19762103
....@@ -1996,32 +2123,37 @@
19962123 ResetModel();
19972124 refreshContents();
19982125 } else
1999
- if (event.getSource() == shareGeometriesItem)
2126
+ if (source == shareGeometriesItem)
20002127 {
20012128 boolean one = false;
20022129
20032130 if (group.selection.size() == 1)
20042131 one = true;
20052132
2133
+ Object3D merge = null;
2134
+
20062135 Object3D content = new cGroup();
20072136
20082137 for (int i=0; i<group.selection.size(); i++)
20092138 {
2010
- Object3D sel = new Merge(group.selection.get(i));
2139
+ merge = new Merge(group.selection.get(i));
20112140
20122141 if (one)
2013
- makeSomething(sel, false);
2142
+ makeSomething(merge, false);
20142143 else
2015
- content.addChild(sel);
2144
+ content.addChild(merge);
20162145 }
20172146
20182147 if (!one)
2019
- makeSomething(content, false);
2020
-
2021
- ResetModel();
2022
- refreshContents();
2148
+ makeSomething(content, true);
2149
+ else
2150
+ {
2151
+ ResetModel();
2152
+ Select(merge.GetTreePath(), true, false); // unselect... false);
2153
+ refreshContents();
2154
+ }
20232155 } else
2024
- if (event.getSource() == mergeGeometriesItem)
2156
+ if (source == mergeGeometriesItem)
20252157 {
20262158 boolean one = false;
20272159
....@@ -2051,7 +2183,7 @@
20512183 ResetModel();
20522184 refreshContents();
20532185 } else
2054
- if (event.getSource() == linkverticesItem)
2186
+ if (source == linkverticesItem)
20552187 {
20562188 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20572189 // {
....@@ -2064,39 +2196,48 @@
20642196 // group.selection.get(0).setMasterThis(content); // should be identity
20652197 // refreshContents();
20662198 // }
2067
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2199
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
20682200 {
2069
- Object3D content = GrafreeD.clipboard.get(0);
2201
+ Object3D content = Grafreed.clipboard.get(0);
20702202
20712203 if (content instanceof cGroup && ((cGroup)content).transientlink )
20722204 content = ((cGroup)content).get(0);
20732205
2074
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2206
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20752207 for (int i=0; i<group.selection.size(); i++)
20762208 {
2077
- boolean random = CameraPane.RANDOM;
2078
- CameraPane.RANDOM = false; // parse all random nodes
2209
+ boolean random = CameraPane.SWITCH;
2210
+ CameraPane.SWITCH = false; // parse all random nodes
20792211 group.selection.get(i).linkVerticesThis(content);
20802212 // group.selection.get(i).setMasterThis(content); // should be identity
2081
- CameraPane.RANDOM = random;
2213
+ CameraPane.SWITCH = random;
20822214 }
2083
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2215
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
20842216 refreshContents();
20852217 }
20862218 } else
2087
- if (event.getSource() == resetsupportItem)
2219
+ if (source == resetsupportItem)
20882220 {
20892221 for (int i=0; i<group.selection.size(); i++)
20902222 {
2091
- boolean random = CameraPane.RANDOM;
2092
- CameraPane.RANDOM = false; // parse all random nodes
2223
+ boolean random = CameraPane.SWITCH;
2224
+ CameraPane.SWITCH = false; // parse all random nodes
20932225 group.selection.get(i).linkVerticesThis(null);
2094
- CameraPane.RANDOM = random;
2226
+ CameraPane.SWITCH = random;
20952227 }
20962228
20972229 refreshContents();
20982230 } else
2099
- if (event.getSource() == resetreferencesItem)
2231
+ if (source == relinkverticesItem)
2232
+ {
2233
+ boolean random = CameraPane.SWITCH;
2234
+ CameraPane.SWITCH = false; // parse all random nodes
2235
+ group.selection.RelinkToSupport();
2236
+ CameraPane.SWITCH = random;
2237
+
2238
+ refreshContents();
2239
+ } else
2240
+ if (source == resetreferencesItem)
21002241 {
21012242 for (int i=0; i<group.selection.size(); i++)
21022243 {
....@@ -2105,11 +2246,11 @@
21052246
21062247 refreshContents();
21072248 } else
2108
- if (event.getSource() == setMasterItem)
2249
+ if (source == setMasterItem)
21092250 {
2110
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2251
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21112252 {
2112
- Object3D content = GrafreeD.clipboard.get(0);
2253
+ Object3D content = Grafreed.clipboard.get(0);
21132254
21142255 if (content instanceof cGroup && ((cGroup)content).transientlink )
21152256 content = ((cGroup)content).get(0);
....@@ -2118,13 +2259,13 @@
21182259 refreshContents();
21192260 }
21202261 } else
2121
- if (event.getSource() == poseMeshItem)
2262
+ if (source == poseMeshItem)
21222263 {
21232264 if (group.selection.size() == 1)
21242265 {
2125
- if (GrafreeD.clipboard.size() == 1)
2266
+ if (Grafreed.clipboard.size() == 1)
21262267 {
2127
- Object3D content = GrafreeD.clipboard.get(0);
2268
+ Object3D content = Grafreed.clipboard.get(0);
21282269
21292270 if (content instanceof cGroup && ((cGroup)content).transientlink )
21302271 content = ((cGroup)content).get(0);
....@@ -2137,19 +2278,19 @@
21372278 }
21382279
21392280 } else
2140
- if (event.getSource() == revertMeshItem)
2281
+ if (source == revertMeshItem)
21412282 {
21422283 RevertMeshes();
21432284 } else
2144
- if (event.getSource() == resetMeshItem)
2285
+ if (source == resetAllItem)
21452286 {
21462287 ResetAll();
21472288 } else
2148
- if (event.getSource() == stepAllItem)
2289
+ if (source == stepAllItem)
21492290 {
21502291 StepAll();
21512292 } else
2152
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2293
+ if (source == clearItem) // || event.getSource() == clearButton)
21532294 {
21542295 //int indices[] = jList.getSelectedIndices();
21552296 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2157,42 +2298,46 @@
21572298
21582299 ClearSelection(false);
21592300 } else
2160
- if (event.getSource() == clearAllItem)
2301
+ if (source == clearAllItem)
21612302 {
21622303 ClearSelection(true);
21632304 } else
2164
- if (event.getSource() == grabItem)
2305
+ if (source == grabItem)
21652306 {
21662307 group(new cGroup(), true);
21672308 } else
2168
- if (event.getSource() == frontItem)
2309
+ if (source == hideItem)
2310
+ {
2311
+ group(new HiddenObject());
2312
+ } else
2313
+ if (source == frontItem)
21692314 {
21702315 front();
21712316 } else
2172
- if (event.getSource() == backItem)
2317
+ if (source == backItem)
21732318 {
21742319 back();
21752320 } else
2176
- if (event.getSource() == cameraItem)
2321
+ if (source == cameraItem)
21772322 {
21782323 makeSomething(new Camera());
21792324 } else
2180
- if (event.getSource() == compositeItem)
2325
+ if (source == compositeItem)
21812326 {
21822327 group(new Composite());
21832328 } else
2184
- if (event.getSource() == randomItem)
2329
+ if (source == randomItem)
21852330 {
21862331 RandomNode random = new RandomNode();
21872332 group(random);
21882333 if (random.size() > 0)
2189
- random.name = random.get(0).name + "Rnd";
2334
+ random.name = random.get(0).name + "Switch";
21902335 } else
2191
- if (event.getSource() == physicsItem)
2336
+ if (source == physicsItem)
21922337 {
21932338 group(new PhysicsNode());
21942339 } else
2195
- if (event.getSource() == frameselectorItem)
2340
+ if (source == frameselectorItem)
21962341 {
21972342 for (int i=0; i<group.selection.size(); i++)
21982343 {
....@@ -2204,7 +2349,7 @@
22042349 ResetModel();
22052350 refreshContents();
22062351 } else
2207
- if (event.getSource() == switchGeoItem)
2352
+ if (source == switchGeoItem)
22082353 {
22092354 for (int i=0; i<group.selection.size(); i++)
22102355 {
....@@ -2216,7 +2361,7 @@
22162361 ResetModel();
22172362 refreshContents();
22182363 } else
2219
- if (event.getSource() == switchTransfoItem)
2364
+ if (source == switchTransfoItem)
22202365 {
22212366 for (int i=0; i<group.selection.size(); i++)
22222367 {
....@@ -2228,7 +2373,7 @@
22282373 ResetModel();
22292374 refreshContents();
22302375 } else
2231
- if (event.getSource() == morphItem)
2376
+ if (source == morphItem)
22322377 {
22332378 for (int i=0; i<group.selection.size(); i++)
22342379 {
....@@ -2240,7 +2385,7 @@
22402385 ResetModel();
22412386 refreshContents();
22422387 } else
2243
- if (event.getSource() == scriptNodeItem)
2388
+ if (source == scriptNodeItem)
22442389 {
22452390 boolean atleastone = false;
22462391
....@@ -2279,199 +2424,223 @@
22792424 }
22802425 }
22812426 } else
2282
- if (event.getSource() == linkerItem)
2427
+ if (source == linkerItem)
22832428 {
22842429 group(new cLinker());
22852430 } else
2286
- if (event.getSource() == textureItem)
2431
+ if (source == textureItem)
22872432 {
22882433 group(new TextureNode());
22892434 } else
2290
- if (event.getSource() == shadowXItem)
2435
+ if (source == billboardItem)
2436
+ {
2437
+ group(new BillboardNode());
2438
+ } else
2439
+ if (source == shadowXItem)
22912440 {
22922441 CastShadow(0);
22932442 } else
2294
- if (event.getSource() == shadowYItem)
2443
+ if (source == shadowYItem)
22952444 {
22962445 CastShadow(1);
22972446 } else
2298
- if (event.getSource() == shadowZItem)
2447
+ if (source == shadowZItem)
22992448 {
23002449 CastShadow(2);
23012450 } else
2302
- if (event.getSource() == ungroupItem)
2451
+ if (source == ungroupItem)
23032452 {
2304
- ungroup();
2453
+ //ungroup();
2454
+ for (int i=0; i<group.selection.size(); i++)
2455
+ {
2456
+ Ungroup(group.selection.get(i));
2457
+ }
2458
+
2459
+ ClearSelection(false);
2460
+
2461
+ refreshContents();
23052462 } else
2306
- if (event.getSource() == genUVItem)
2463
+ if (source == genUVItem)
23072464 {
23082465 GenUV();
23092466 } else
2310
- if (event.getSource() == genNormalsCADItem)
2467
+ if (source == genNormalsCADItem)
23112468 {
23122469 GenNormals(true);
23132470 } else
2314
- if (event.getSource() == genNormalsMESHItem)
2471
+ if (source == genNormalsMESHItem)
23152472 {
23162473 GenNormals(true); // TODO
23172474 } else
2318
- if (event.getSource() == genNormalsORGANItem)
2475
+ if (source == genNormalsORGANItem)
23192476 {
23202477 GenNormals(false);
23212478 } else
2322
- if (event.getSource() == stripifyItem)
2479
+ if (source == genNormalsMINEItem)
2480
+ {
2481
+ GenNormalsMINE();
2482
+ } else
2483
+ if (source == stripifyItem)
23232484 {
23242485 Stripify();
23252486 } else
2326
- if (event.getSource() == unstripifyItem)
2487
+ if (source == unstripifyItem)
23272488 {
23282489 Unstripify();
23292490 } else
2330
- if (event.getSource() == trimItem)
2491
+ if (source == trimItem)
23312492 {
23322493 Trim();
23332494 } else
2334
- if (event.getSource() == untrimItem)
2495
+ if (source == untrimItem)
23352496 {
23362497 Untrim();
23372498 } else
2338
- if (event.getSource() == clearColorsItem)
2499
+ if (source == clearColorsItem)
23392500 {
23402501 ClearColors();
23412502 } else
2342
- if (event.getSource() == clearMaterialsItem)
2503
+ if (source == clearMaterialsItem)
23432504 {
23442505 ClearMaterials();
23452506 } else
2346
- if (event.getSource() == liveleavesItem)
2507
+ if (source == liveleavesItem)
23472508 {
23482509 LiveLeaves(true);
23492510 } else
2350
- if (event.getSource() == unliveleavesItem)
2511
+ if (source == unliveleavesItem)
23512512 {
23522513 LiveLeaves(false);
23532514 } else
2354
- if (event.getSource() == supportleavesItem)
2515
+ if (source == supportleavesItem)
23552516 {
23562517 SupportLeaves(true);
23572518 } else
2358
- if (event.getSource() == unsupportleavesItem)
2519
+ if (source == unsupportleavesItem)
23592520 {
23602521 SupportLeaves(false);
23612522 } else
2362
- if (event.getSource() == hideleavesItem)
2523
+ if (source == hideleavesItem)
23632524 {
23642525 HideLeaves(true);
23652526 } else
2366
- if (event.getSource() == showleavesItem)
2527
+ if (source == showleavesItem)
23672528 {
23682529 HideLeaves(false);
23692530 } else
2370
- if (event.getSource() == markleavesItem)
2531
+ if (source == markleavesItem)
23712532 {
23722533 MarkLeaves(true);
23732534 } else
2374
- if (event.getSource() == unmarkleavesItem)
2535
+ if (source == unmarkleavesItem)
23752536 {
23762537 MarkLeaves(false);
23772538 } else
2378
- if (event.getSource() == flipVItem)
2539
+ if (source == flipVItem)
23792540 {
23802541 FlipV(true);
23812542 } else
2382
- if (event.getSource() == unflipVItem)
2543
+ if (source == unflipVItem)
23832544 {
23842545 FlipV(false);
23852546 } else
2386
- if (event.getSource() == lowTexturesItem)
2547
+ if (source == lowTexturesItem)
23872548 {
23882549 SetTexRes(0);
23892550 } else
2390
- if (event.getSource() == normalTexturesItem)
2551
+ if (source == normalTexturesItem)
23912552 {
23922553 SetTexRes(1);
23932554 } else
2394
- if (event.getSource() == highTexturesItem)
2555
+ if (source == highTexturesItem)
23952556 {
23962557 SetTexRes(2);
23972558 } else
2398
- if (event.getSource() == veryhighTexturesItem)
2559
+ if (source == veryhighTexturesItem)
23992560 {
24002561 SetTexRes(3);
24012562 } else
2402
- if (event.getSource() == maxTexturesItem)
2563
+ if (source == maxTexturesItem)
24032564 {
24042565 SetTexRes(4);
24052566 } else
2406
- if (event.getSource() == panoTexturesItem)
2567
+ if (source == panoTexturesItem)
24072568 {
24082569 SetTexRes(5);
24092570 } else
2410
- if (event.getSource() == reverseNormalsItem)
2571
+ if (source == reverseNormalsItem)
24112572 {
24122573 ReverseNormals();
24132574 } else
2414
- if (event.getSource() == parseverticesItem)
2575
+ if (source == parseverticesItem)
24152576 {
24162577 ParseVertices();
24172578 } else
2418
- if (event.getSource() == textureFieldItem)
2579
+ if (source == textureFieldItem)
24192580 {
24202581 TextureVertices();
24212582 } else
2422
- if (event.getSource() == alignItem)
2583
+ if (source == alignItem)
24232584 {
24242585 Align();
24252586 } else
2426
- if (event.getSource() == mirrorItem)
2587
+ if (source == mirrorItem)
24272588 {
24282589 MirrorPoses();
24292590 } else
2430
- if (event.getSource() == reduceMorphItem)
2591
+ if (source == reduceMorphItem)
24312592 {
24322593 MeshReduction(false);
24332594 } else
2434
- if (event.getSource() == reduce34MorphItem)
2595
+ if (source == reduce34MorphItem)
24352596 {
24362597 MeshReduction(true);
24372598 } else
2438
- if (event.getSource() == reverseTrianglesItem)
2599
+ if (source == reverseTrianglesItem)
24392600 {
24402601 ReverseTriangles();
24412602 } else
2442
- if (event.getSource() == reduceMeshItem)
2603
+ if (source == reduceMeshItem)
24432604 {
24442605 ReduceMesh(false);
24452606 } else
2446
- if (event.getSource() == reduce34MeshItem)
2607
+ if (source == reduce34MeshItem)
24472608 {
24482609 ReduceMesh(true);
24492610 } else
2450
- if (event.getSource() == increaseMeshItem)
2611
+ if (source == increaseMeshItem)
24512612 {
24522613 IncreaseMesh();
24532614 } else
2454
- if (event.getSource() == clipMeshItem)
2615
+ if (source == clipMeshItem)
24552616 {
24562617 ClipMesh();
24572618 } else
2458
- if (event.getSource() == smoothMeshItem)
2619
+ if (source == smoothMeshItem)
24592620 {
24602621 SmoothMesh();
24612622 } else
2462
- if (event.getSource() == transformgeometryItem)
2623
+ if (source == transformGeometryItem)
24632624 {
24642625 TransformGeometry();
24652626 } else
2466
- if (event.getSource() == resetTransformItem)
2627
+ if (source == transformChildrenItem)
2628
+ {
2629
+ TransformChildren();
2630
+ } else
2631
+ if (source == resetTransformItem)
24672632 {
24682633 ResetTransform();
24692634 } else
2470
- if (event.getSource() == resetCentroidItem)
2635
+ if (source == resetCentroidItem)
24712636 {
2472
- ResetCentroid();
2637
+ ResetCentroid(true);
24732638 } else
2474
- if (event.getSource() == resetParentItem)
2639
+ if (source == resetCentroidXZItem)
2640
+ {
2641
+ ResetCentroid(false);
2642
+ } else
2643
+ if (source == resetParentItem)
24752644 {
24762645 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24772646 {
....@@ -2481,7 +2650,7 @@
24812650
24822651 refreshContents();
24832652 } else
2484
- if (event.getSource() == repairParentItem)
2653
+ if (source == repairParentItem)
24852654 {
24862655 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24872656 {
....@@ -2495,7 +2664,21 @@
24952664
24962665 refreshContents();
24972666 } else
2498
- if (event.getSource() == sortbysizeItem)
2667
+ if (source == repairShadowItem)
2668
+ {
2669
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2670
+ {
2671
+ Object3D obj = (Object3D)e.nextElement();
2672
+ obj.RepairShadow();
2673
+// for (int i=0; i<obj.size(); i++)
2674
+// {
2675
+// obj.get(i).parent = obj;
2676
+// }
2677
+ }
2678
+
2679
+ refreshContents();
2680
+ } else
2681
+ if (source == sortbysizeItem)
24992682 {
25002683 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25012684 {
....@@ -2507,7 +2690,7 @@
25072690 ResetModel();
25082691 refreshContents();
25092692 } else
2510
- if (event.getSource() == sortbynameItem)
2693
+ if (source == sortbynameItem)
25112694 {
25122695 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25132696 {
....@@ -2519,7 +2702,7 @@
25192702 ResetModel();
25202703 refreshContents();
25212704 } else
2522
- if (event.getSource() == attachPigmentItem)
2705
+ if (source == attachPigmentItem)
25232706 {
25242707 String texture = GetFile("Attach pigment");
25252708 Object3D obj;
....@@ -2531,7 +2714,7 @@
25312714
25322715 refreshContents();
25332716 } else
2534
- if (event.getSource() == detachPigmentItem)
2717
+ if (source == detachPigmentItem)
25352718 {
25362719 Object3D obj;
25372720 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2542,7 +2725,7 @@
25422725
25432726 refreshContents();
25442727 } else
2545
- if (event.getSource() == attachBumpItem)
2728
+ if (source == attachBumpItem)
25462729 {
25472730 String texture = GetFile("Attach bump");
25482731 Object3D obj;
....@@ -2554,7 +2737,7 @@
25542737
25552738 refreshContents();
25562739 } else
2557
- if (event.getSource() == detachBumpItem)
2740
+ if (source == detachBumpItem)
25582741 {
25592742 Object3D obj;
25602743 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2565,7 +2748,7 @@
25652748
25662749 refreshContents();
25672750 } else
2568
- if (event.getSource() == pigmentBumpItem)
2751
+ if (source == pigmentBumpItem)
25692752 {
25702753 Object3D obj;
25712754 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2576,158 +2759,195 @@
25762759
25772760 refreshContents();
25782761 } else
2579
- if (event.getSource() == flashSelectionButton)
2762
+ if (source == flashSelectionButton)
25802763 {
25812764 CameraPane.flash = true;
25822765 refreshContents();
25832766 } else
2584
- if (event.getSource() == oneButton)
2767
+ if (source == oneButton)
25852768 {
25862769 } else
2587
- if (event.getSource() == twoButton)
2770
+ if (source == twoButton)
25882771 {
25892772 radio.layout = twoButton;
25902773 // bug
25912774 //gridPanel.setDividerLocation(1.0);
25922775 //bigPanel.setDividerLocation(0.0);
2593
- bigThree.remove(jtp);
2594
- bigThree.remove(cameraPanel);
2595
- bigThree.remove(XYZPanel);
2596
- aWindowConstraints.gridx = 0;
2597
- aWindowConstraints.gridy = 0;
2598
- aWindowConstraints.gridwidth = 1;
2599
- // aConstraints.gridheight = 3;
2600
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2601
- aWindowConstraints.weightx = 0;
2602
- aWindowConstraints.weighty = 1;
2603
- //bigThree.add(jtp, aWindowConstraints);
2604
- aWindowConstraints.weightx = 1;
2605
- aWindowConstraints.gridwidth = 3;
2606
- // aConstraints.gridheight = 3;
2607
- aWindowConstraints.gridx = 1;
2608
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2609
- bigThree.add(cameraPanel, aWindowConstraints);
2610
- aWindowConstraints.weightx = 0;
2611
- aWindowConstraints.gridx = 4;
2612
- aWindowConstraints.gridwidth = 1;
2613
- // aConstraints.gridheight = 3;
2614
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2615
- //bigThree.add(XYZPanel, aWindowConstraints);
2616
- bigThree.revalidate();
2776
+// bigThree.remove(scenePanel);
2777
+// bigThree.remove(centralPanel);
2778
+// bigThree.remove(XYZPanel);
2779
+// aWindowConstraints.gridx = 0;
2780
+// aWindowConstraints.gridy = 0;
2781
+// aWindowConstraints.gridwidth = 1;
2782
+// // aConstraints.gridheight = 3;
2783
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2784
+// aWindowConstraints.weightx = 0;
2785
+// aWindowConstraints.weighty = 1;
2786
+// //bigThree.add(jtp, aWindowConstraints);
2787
+// aWindowConstraints.weightx = 1;
2788
+// aWindowConstraints.gridwidth = 3;
2789
+// // aConstraints.gridheight = 3;
2790
+// aWindowConstraints.gridx = 1;
2791
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2792
+// bigThree.add(centralPanel, aWindowConstraints);
2793
+// aWindowConstraints.weightx = 0;
2794
+// aWindowConstraints.gridx = 4;
2795
+// aWindowConstraints.gridwidth = 1;
2796
+// // aConstraints.gridheight = 3;
2797
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2798
+// //bigThree.add(XYZPanel, aWindowConstraints);
2799
+// scenePanel.setVisible(false);
2800
+// centralPanel.setVisible(true);
2801
+// XYZPanel.setVisible(false);
2802
+ bigThree.ClearUI();
2803
+ bigThree.add(centralPanel);
2804
+ bigThree.FlushUI();
26172805 } else
2618
- if (event.getSource() == threeButton)
2806
+ if (source == threeButton)
26192807 {
26202808 radio.layout = threeButton;
2621
- bigThree.remove(jtp);
2622
- bigThree.remove(cameraPanel);
2623
- bigThree.remove(XYZPanel);
2624
- aWindowConstraints.gridx = 0;
2625
- aWindowConstraints.gridy = 0;
2626
- aWindowConstraints.gridwidth = 1;
2627
- // aConstraints.gridheight = 3;
2628
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2629
- aWindowConstraints.weightx = 0;
2630
- aWindowConstraints.weighty = 1;
2631
- //bigThree.add(jtp, aWindowConstraints);
2632
- aWindowConstraints.weightx = 1;
2633
- aWindowConstraints.gridwidth = 3;
2634
- // aConstraints.gridheight = 3;
2635
- aWindowConstraints.gridx = 1;
2636
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2637
- bigThree.add(cameraPanel, aWindowConstraints);
2638
- aWindowConstraints.weightx = 0;
2639
- aWindowConstraints.gridx = 4;
2640
- aWindowConstraints.gridwidth = 1;
2641
- // aConstraints.gridheight = 3;
2642
- aConstraints.fill = GridBagConstraints.VERTICAL;
2643
- bigThree.add(XYZPanel, aWindowConstraints);
2644
- bigThree.revalidate();
2809
+
2810
+// bigThree.remove(scenePanel);
2811
+// bigThree.remove(centralPanel);
2812
+// bigThree.remove(XYZPanel);
2813
+// aWindowConstraints.gridx = 0;
2814
+// aWindowConstraints.gridy = 0;
2815
+// aWindowConstraints.gridwidth = 1;
2816
+// // aConstraints.gridheight = 3;
2817
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2818
+// aWindowConstraints.weightx = 0;
2819
+// aWindowConstraints.weighty = 1;
2820
+// //bigThree.add(jtp, aWindowConstraints);
2821
+// aWindowConstraints.weightx = 1;
2822
+// aWindowConstraints.gridwidth = 3;
2823
+// // aConstraints.gridheight = 3;
2824
+// aWindowConstraints.gridx = 1;
2825
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2826
+// bigThree.add(centralPanel, aWindowConstraints);
2827
+// aWindowConstraints.weightx = 0;
2828
+// aWindowConstraints.gridx = 4;
2829
+// aWindowConstraints.gridwidth = 1;
2830
+// // aConstraints.gridheight = 3;
2831
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2832
+// bigThree.add(XYZPanel, aWindowConstraints);
2833
+// bigThree.validate();
2834
+// scenePanel.setVisible(false);
2835
+// centralPanel.setVisible(true);
2836
+// XYZPanel.setVisible(true);
2837
+ bigThree.ClearUI();
2838
+ bigThree.add(centralPanel);
2839
+ bigThree.add(XYZPanel);
2840
+ bigThree.FlushUI();
26452841 } else
2646
- if (event.getSource() == fourButton)
2842
+ if (source == fourButton)
26472843 {
26482844 radio.layout = fourButton;
2649
- bigThree.remove(jtp);
2650
- bigThree.remove(cameraPanel);
2651
- bigThree.remove(XYZPanel);
2652
- aWindowConstraints.gridx = 0;
2653
- aWindowConstraints.gridy = 0;
2654
- aWindowConstraints.gridwidth = 1;
2655
- // aWindowConstraints.gridheight = 3;
2656
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2657
- aWindowConstraints.weightx = 1;
2658
- aWindowConstraints.weighty = 1;
2659
- bigThree.add(jtp, aWindowConstraints);
2660
- aWindowConstraints.weightx = 1;
2661
- aWindowConstraints.gridwidth = 3;
2662
- // aConstraints.gridheight = 3;
2663
- aWindowConstraints.gridx = 1;
2664
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2665
- //bigThree.add(cameraPanel, aWindowConstraints);
2666
- aWindowConstraints.weightx = 0;
2667
- aWindowConstraints.gridx = 4;
2668
- aWindowConstraints.gridwidth = 1;
2669
- // aWindowConstraints.gridheight = 3;
2670
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2671
- //bigThree.add(XYZPanel, aWindowConstraints);
2672
- bigThree.revalidate();
2845
+
2846
+// bigThree.remove(scenePanel);
2847
+// bigThree.remove(centralPanel);
2848
+// bigThree.remove(XYZPanel);
2849
+// aWindowConstraints.gridx = 0;
2850
+// aWindowConstraints.gridy = 0;
2851
+// aWindowConstraints.gridwidth = 1;
2852
+// // aWindowConstraints.gridheight = 3;
2853
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2854
+// aWindowConstraints.weightx = 1;
2855
+// aWindowConstraints.weighty = 1;
2856
+// bigThree.add(scenePanel, aWindowConstraints);
2857
+// aWindowConstraints.weightx = 1;
2858
+// aWindowConstraints.gridwidth = 3;
2859
+// // aConstraints.gridheight = 3;
2860
+// aWindowConstraints.gridx = 1;
2861
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2862
+// //bigThree.add(cameraPanel, aWindowConstraints);
2863
+// aWindowConstraints.weightx = 0;
2864
+// aWindowConstraints.gridx = 4;
2865
+// aWindowConstraints.gridwidth = 1;
2866
+// // aWindowConstraints.gridheight = 3;
2867
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2868
+// //bigThree.add(XYZPanel, aWindowConstraints);
2869
+// bigThree.validate();
2870
+// scenePanel.setVisible(true);
2871
+// centralPanel.setVisible(false);
2872
+// XYZPanel.setVisible(false);
2873
+ bigThree.ClearUI();
2874
+ bigThree.add(scenePanel);
2875
+ bigThree.FlushUI();
26732876 } else
2674
- if (event.getSource() == sixButton)
2877
+ if (source == sixButton)
26752878 {
26762879 radio.layout = sixButton;
2677
- bigThree.remove(jtp);
2678
- bigThree.remove(cameraPanel);
2679
- bigThree.remove(XYZPanel);
2680
- aWindowConstraints.gridx = 0;
2681
- aWindowConstraints.gridy = 0;
2682
- aWindowConstraints.gridwidth = 1;
2683
- // aConstraints.gridheight = 3;
2684
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2685
- aWindowConstraints.weightx = 0;
2686
- aWindowConstraints.weighty = 1;
2687
- bigThree.add(jtp, aWindowConstraints);
2688
- aWindowConstraints.weightx = 1;
2689
- aWindowConstraints.gridwidth = 3;
2690
- // aWindowConstraints.gridheight = 3;
2691
- aWindowConstraints.gridx = 1;
2692
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2693
- bigThree.add(cameraPanel, aWindowConstraints);
2694
- aWindowConstraints.weightx = 0;
2695
- aWindowConstraints.gridx = 4;
2696
- aWindowConstraints.gridwidth = 1;
2697
- // aWindowConstraints.gridheight = 3;
2698
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2699
- //bigThree.add(XYZPanel, aConstraints);
2700
- bigThree.revalidate();
2880
+
2881
+// bigThree.remove(scenePanel);
2882
+// bigThree.remove(centralPanel);
2883
+// bigThree.remove(XYZPanel);
2884
+// aWindowConstraints.gridx = 0;
2885
+// aWindowConstraints.gridy = 0;
2886
+// aWindowConstraints.gridwidth = 1;
2887
+// // aConstraints.gridheight = 3;
2888
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2889
+// aWindowConstraints.weightx = 0;
2890
+// aWindowConstraints.weighty = 1;
2891
+// bigThree.add(scenePanel, aWindowConstraints);
2892
+// aWindowConstraints.weightx = 1;
2893
+// aWindowConstraints.gridwidth = 3;
2894
+// // aWindowConstraints.gridheight = 3;
2895
+// aWindowConstraints.gridx = 1;
2896
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2897
+// bigThree.add(centralPanel, aWindowConstraints);
2898
+// aWindowConstraints.weightx = 0;
2899
+// aWindowConstraints.gridx = 4;
2900
+// aWindowConstraints.gridwidth = 1;
2901
+// // aWindowConstraints.gridheight = 3;
2902
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2903
+// //bigThree.add(XYZPanel, aConstraints);
2904
+// bigThree.validate();
2905
+// scenePanel.setVisible(true);
2906
+// centralPanel.setVisible(true);
2907
+// XYZPanel.setVisible(false);
2908
+ bigThree.ClearUI();
2909
+ bigThree.add(scenePanel);
2910
+ bigThree.add(centralPanel);
2911
+ bigThree.FlushUI();
27012912 } else
2702
- if (event.getSource() == sevenButton)
2913
+ if (source == sevenButton)
27032914 {
27042915 radio.layout = sevenButton;
2705
- bigThree.remove(jtp);
2706
- bigThree.remove(cameraPanel);
2707
- bigThree.remove(XYZPanel);
2708
- aWindowConstraints.gridx = 0;
2709
- aWindowConstraints.gridy = 0;
2710
- aWindowConstraints.gridwidth = 1;
2711
- // aWindowConstraints.gridheight = 3;
2712
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2713
- aWindowConstraints.weightx = 0;
2714
- aWindowConstraints.weighty = 1;
2715
- bigThree.add(jtp, aWindowConstraints);
2716
- aWindowConstraints.weightx = 1;
2717
- aWindowConstraints.gridwidth = 3;
2718
- // aWindowConstraints.gridheight = 3;
2719
- aWindowConstraints.gridx = 1;
2720
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2721
- bigThree.add(cameraPanel, aWindowConstraints);
2722
- aWindowConstraints.weightx = 0;
2723
- aWindowConstraints.gridx = 4;
2724
- aWindowConstraints.gridwidth = 1;
2725
- // aConstraints.gridheight = 3;
2726
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2727
- bigThree.add(XYZPanel, aWindowConstraints);
2728
- bigThree.revalidate();
2916
+
2917
+// bigThree.remove(scenePanel);
2918
+// bigThree.remove(centralPanel);
2919
+// bigThree.remove(XYZPanel);
2920
+// aWindowConstraints.gridx = 0;
2921
+// aWindowConstraints.gridy = 0;
2922
+// aWindowConstraints.gridwidth = 1;
2923
+// // aWindowConstraints.gridheight = 3;
2924
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2925
+// aWindowConstraints.weightx = 0;
2926
+// aWindowConstraints.weighty = 1;
2927
+// bigThree.add(scenePanel, aWindowConstraints);
2928
+// aWindowConstraints.weightx = 1;
2929
+// aWindowConstraints.gridwidth = 3;
2930
+// // aWindowConstraints.gridheight = 3;
2931
+// aWindowConstraints.gridx = 1;
2932
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2933
+// bigThree.add(centralPanel, aWindowConstraints);
2934
+// aWindowConstraints.weightx = 0;
2935
+// aWindowConstraints.gridx = 4;
2936
+// aWindowConstraints.gridwidth = 1;
2937
+// // aConstraints.gridheight = 3;
2938
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2939
+// bigThree.add(XYZPanel, aWindowConstraints);
2940
+// bigThree.validate();
2941
+// scenePanel.setVisible(true);
2942
+// centralPanel.setVisible(true);
2943
+// XYZPanel.setVisible(true);
2944
+ bigThree.ClearUI();
2945
+ bigThree.add(scenePanel);
2946
+ bigThree.add(centralPanel);
2947
+ bigThree.add(XYZPanel);
2948
+ bigThree.FlushUI();
27292949 } else
2730
- if (event.getSource() == rootButton)
2950
+ if (source == rootButton)
27312951 {
27322952 Object3D obj;
27332953 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2739,7 +2959,7 @@
27392959
27402960 refreshContents(true);
27412961 } else
2742
- if (event.getSource() == closeButton)
2962
+ if (source == closeButton)
27432963 {
27442964 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27452965 cRadio ab;
....@@ -2760,11 +2980,11 @@
27602980 }
27612981 refreshContents(true);
27622982 } else
2763
- if (event.getSource() == editItem || event.getSource() == editButton)
2983
+ if (source == editItem || source == editButton)
27642984 {
27652985 EditSelection(false);
27662986 } else
2767
- if (event.getSource() == uneditButton)
2987
+ if (source == uneditButton)
27682988 {
27692989 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
27702990 {
....@@ -2776,12 +2996,12 @@
27762996
27772997 child.editWindow = null; // ???????????
27782998 }
2779
- objEditor.ctrlPanel.revalidate();
2999
+ objEditor.ctrlPanel.FlushUI();
27803000 //objEditor.jTree.clearSelection();
27813001 //objEditor.ResetSliders();
27823002 refreshContents(true);
27833003 } else
2784
- if (event.getSource() == clearPanelButton)
3004
+ if (source == clearPanelButton)
27853005 {
27863006 assert(copy == group);
27873007 //copy.ClearUI();
....@@ -2792,7 +3012,7 @@
27923012 listUI.clear();
27933013 refreshContents(true);
27943014 } else
2795
- if (event.getSource() == allParamsButton)
3015
+ if (source == allParamsButton)
27963016 {
27973017 assert(copy == group);
27983018
....@@ -2813,19 +3033,19 @@
28133033
28143034 refreshContents(true);
28153035 } else
2816
- if (event.getSource() == unselectButton)
3036
+ if (source == unselectButton)
28173037 {
28183038 objEditor.jTree.clearSelection();
28193039 // ?? oct 2012 GrafreeD.clipboard.clear();
28203040 objEditor.ResetSliders();
28213041 refreshContents(true);
28223042 } else
2823
- if(event.getSource() instanceof cRadio)
3043
+ if(source instanceof cRadio)
28243044 {
28253045 group.parent = keepparent;
28263046 group.attributes = 0;
28273047 //group.editWindow = null;
2828
- /*cRadio*/ radio = (cRadio)event.getSource();
3048
+ /*cRadio*/ radio = (cRadio)source;
28293049 Object3D obj = radio.GetObject();
28303050 System.out.println("Edit " + obj);
28313051 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2845,7 +3065,7 @@
28453065 }
28463066
28473067 copy = group;
2848
- //CameraPane.theRenderer.object = group;
3068
+ //Globals.theRenderer.object = group;
28493069 if(!useclient)
28503070 {
28513071 cameraView.renderCamera = radio.camera;
....@@ -2854,12 +3074,15 @@
28543074 cameraView.cameras[cameraView.cameracount] = radio.camera;
28553075 cameraView.targetLookAt.set(radio.camera.lookAt);
28563076 cameraView.object = group;
2857
- cameraView.lighttouched = true;
3077
+ //cameraView.lighttouched = true;
3078
+ Globals.lighttouched = true;
28583079 topView.object = group;
28593080 frontView.object = group;
28603081 sideView.object = group;
28613082 }
2862
- group.editWindow = this;
3083
+
3084
+// fix "+" issue group.editWindow = this;
3085
+
28633086 /*
28643087 currentLayout = radio.layout;
28653088 if (currentLayout == null)
....@@ -2890,7 +3113,7 @@
28903113 if (useclient)
28913114 {
28923115 cameraView.object = client;
2893
- cameraView.lighttouched = true;
3116
+ Globals.lighttouched = true;
28943117 //topView.object = client;
28953118 //frontView.object = client;
28963119 //sideView.object = client;
....@@ -2898,7 +3121,7 @@
28983121 else
28993122 {
29003123 cameraView.object = group;
2901
- cameraView.lighttouched = true;
3124
+ Globals.lighttouched = true;
29023125 //topView.object = group;
29033126 //frontView.object = group;
29043127 //sideView.object = group;
....@@ -2933,6 +3156,28 @@
29333156 refreshContents();
29343157 }
29353158
3159
+ void TransformChildren()
3160
+ {
3161
+ Object3D obj;
3162
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3163
+ {
3164
+ obj = (Object3D)e.nextElement();
3165
+ obj.KeepTextureMatrices();
3166
+ obj.TransformChildren();
3167
+ obj.RestoreTextureMatrices();
3168
+
3169
+// if (obj.parent == null)
3170
+// {
3171
+// System.out.println("NULL PARENT!");
3172
+// new Exception().printStackTrace();
3173
+// }
3174
+// else
3175
+// TouchTransform(obj);
3176
+// //obj.parent.Touch();
3177
+ }
3178
+
3179
+ refreshContents();
3180
+ }
29363181
29373182 void ResetTransform()
29383183 {
....@@ -3045,7 +3290,7 @@
30453290 refreshContents();
30463291 }
30473292
3048
- void ResetCentroid()
3293
+ void ResetCentroid(boolean full)
30493294 {
30503295 Object3D obj;
30513296 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3060,12 +3305,16 @@
30603305 LA.matIdentity(Object3D.mat);
30613306 obj.getBounds(minima, maxima, false);
30623307 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3063
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3308
+ if (full)
3309
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
30643310 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
30653311 obj.TransformMesh(Object3D.mat);
3312
+
30663313 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3067
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3314
+ if (full)
3315
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
30683316 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3317
+
30693318 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
30703319 //Object3D.mat[3][0] = -Object3D.mat[3][0];
30713320 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3131,9 +3380,9 @@
31313380 obj = (Object3D)e.nextElement();
31323381
31333382 System.out.println("Object is: " + obj);
3134
- GrafreeD.AnalyzeObject(obj);
3383
+ Grafreed.AnalyzeObject(obj);
31353384 System.out.println("Boundary rep: " + obj.bRep);
3136
- GrafreeD.AnalyzeObject(obj.bRep);
3385
+ Grafreed.AnalyzeObject(obj.bRep);
31373386
31383387 // System.err.println((size/1024) + " KB is the size of " + obj);
31393388 }
....@@ -3175,6 +3424,13 @@
31753424 void GenNormals(boolean crease)
31763425 {
31773426 group.GenNormalsS(crease);
3427
+
3428
+ refreshContents();
3429
+ }
3430
+
3431
+ void GenNormalsMINE()
3432
+ {
3433
+ group.selection.GenNormalsMINE();
31783434
31793435 refreshContents();
31803436 }
....@@ -3340,8 +3596,8 @@
33403596
33413597 void ParseVertices()
33423598 {
3343
- boolean epsequal = GrafreeD.epsequal;
3344
- GrafreeD.epsequal = true;
3599
+ boolean epsequal = Grafreed.epsequal;
3600
+ Grafreed.epsequal = true;
33453601
33463602 for (int i=0; i<group.selection.size(); i++)
33473603 {
....@@ -3366,7 +3622,7 @@
33663622 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33673623 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33683624
3369
- g.add(GrafreeD.clipboard);
3625
+ g.add(Grafreed.clipboard);
33703626
33713627 buffer.add(g);
33723628 }
....@@ -3381,7 +3637,7 @@
33813637 makeSomething(buffer, i==group.selection.size()-1);
33823638 }
33833639
3384
- GrafreeD.epsequal = epsequal;
3640
+ Grafreed.epsequal = epsequal;
33853641
33863642 refreshContents();
33873643 }
....@@ -3399,7 +3655,16 @@
33993655 String pigment = Object3D.GetPigment(tex);
34003656 //String bump = Object3D.GetBump(tex);
34013657
3402
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3658
+ com.sun.opengl.util.texture.TextureData texturedata = null;
3659
+
3660
+ try
3661
+ {
3662
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3663
+ }
3664
+ catch (Exception e)
3665
+ {
3666
+ System.err.println("FAIL: " + node);
3667
+ }
34033668
34043669 double s = v.s;
34053670
....@@ -3447,12 +3712,26 @@
34473712
34483713 void Align()
34493714 {
3715
+ if (group.selection.size() == 0)
3716
+ return;
3717
+
3718
+ cVector bbmin = new cVector();
3719
+ cVector bbmax = new cVector();
3720
+
3721
+ group.selection.get(0).getBounds(bbmin, bbmax, true);
3722
+
3723
+ double dx = bbmax.x - bbmin.x;
3724
+ double dy = bbmax.y - bbmin.y;
3725
+ double dz = bbmax.z - bbmin.z;
3726
+
3727
+ double scale = Math.sqrt(dx*dx + dy*dy + dz*dz);
3728
+
34503729 for (int i=0; i<group.selection.size(); i++)
34513730 {
34523731 Object3D obj = group.selection.get(i);
34533732
3454
- LA.matTranslate(obj.toParent, i/2f, 0, 0);
3455
- LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0);
3733
+ LA.matTranslate(obj.toParent, i * scale, 0, 0);
3734
+ LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0);
34563735 }
34573736
34583737 refreshContents();
....@@ -3473,11 +3752,11 @@
34733752
34743753 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
34753754
3476
- boolean random = CameraPane.RANDOM;
3477
- CameraPane.RANDOM = false; // parse all random nodes
3755
+ boolean random = CameraPane.SWITCH;
3756
+ CameraPane.SWITCH = false; // parse all random nodes
34783757 lowres.linkVerticesThis(null);
34793758 lowres.linkVerticesThis(sn);
3480
- CameraPane.RANDOM = random;
3759
+ CameraPane.SWITCH = random;
34813760
34823761 System.err.flush();
34833762
....@@ -3517,7 +3796,7 @@
35173796 return;
35183797
35193798 Object3D poses = group.selection.get(0);
3520
- Object3D ref = GrafreeD.clipboard.get(0);
3799
+ Object3D ref = Grafreed.clipboard.get(0);
35213800
35223801 Object3D newgroup = new Object3D("Po:" + poses.name);
35233802
....@@ -3686,7 +3965,7 @@
36863965 group.selection.RelinkToSupport(); // july 2014
36873966 System.out.println("DONE.");
36883967 refreshContents();
3689
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3968
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
36903969 }
36913970
36923971 void ReduceMesh(boolean reduction34)
....@@ -3711,9 +3990,9 @@
37113990
37123991 void ClipMesh()
37133992 {
3714
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
3993
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
37153994 {
3716
- Object3D content = GrafreeD.clipboard.get(0);
3995
+ Object3D content = Grafreed.clipboard.get(0);
37173996
37183997 if (content instanceof cGroup && ((cGroup)content).transientlink )
37193998 content = ((cGroup)content).get(0);
....@@ -3722,7 +4001,7 @@
37224001 // {
37234002 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
37244003 // }
3725
- group.selection.ClipMesh(GrafreeD.clipboard);
4004
+ group.selection.ClipMesh(Grafreed.clipboard);
37264005 }
37274006 // group.selection.ClipMesh(GrafreeD.clipboard);
37284007 System.out.println("DONE.");
....@@ -3857,7 +4136,7 @@
38574136 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
38584137
38594138 Object3D elem = (Object3D)group.selection.elementAt(i);
3860
- if(elem != group)
4139
+ if(elem != group || !newWindow)
38614140 {
38624141 // if (!(elem instanceof Composite))
38634142 // newWindow = false;
....@@ -3962,25 +4241,25 @@
39624241 System.err.println("info : " + child.GetPath());
39634242 }
39644243 }
3965
- else
3966
- {
3967
- objEditor.SetMaterial(group); // .GetMaterial());
3968
- objEditor.AddInfo(group, this, true); // .GetMaterial());
3969
- System.err.println("info : " + group.GetPath());
3970
- }
4244
+// else
4245
+// {
4246
+// objEditor.SetMaterial(group); // .GetMaterial());
4247
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4248
+// System.err.println("info : " + group.GetPath());
4249
+// }
39714250
39724251 objEditor.SetText(); // jan 2014
39734252
3974
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4253
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
39754254 CameraPane.flash = true;
39764255
39774256 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
39784257 // a camera
39794258 {
39804259 CameraPane.camerachangeframe = 0; // don't refuse it
3981
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
3982
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
3983
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4260
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4261
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4262
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
39844263 }
39854264
39864265 refreshContents();
....@@ -4062,12 +4341,12 @@
40624341 {
40634342 if (group.selection.isEmpty())
40644343 return;
4065
- GrafreeD.clipboardIsTempGroup = false;
4344
+ Grafreed.clipboardIsTempGroup = false;
40664345 Composite tGroup = null;
40674346 if (group.selection.size() > 0) // 1)
40684347 {
40694348 tGroup = new cGroup();
4070
- GrafreeD.clipboardIsTempGroup = true;
4349
+ Grafreed.clipboardIsTempGroup = true;
40714350 }
40724351
40734352 if (cut)
....@@ -4107,16 +4386,16 @@
41074386 //System.out.println("cut " + child);
41084387 //System.out.println("parent = " + child.parent);
41094388 // tmp.addChild(child);
4110
- if (GrafreeD.clipboardIsTempGroup)
4389
+ if (Grafreed.clipboardIsTempGroup)
41114390 tGroup.add/*Child*/(tmp);
41124391 else
4113
- GrafreeD.clipboard = tmp;
4392
+ Grafreed.clipboard = tmp;
41144393 }
41154394 else
4116
- if (GrafreeD.clipboardIsTempGroup)
4395
+ if (Grafreed.clipboardIsTempGroup)
41174396 tGroup.add/*Child*/(child);
41184397 else
4119
- GrafreeD.clipboard = child;
4398
+ Grafreed.clipboard = child;
41204399 }
41214400
41224401 //ResetModel();
....@@ -4148,21 +4427,21 @@
41484427 //System.out.println("cut " + elem);
41494428 //System.out.println("parent = " + elem.parent);
41504429 // tmp.addChild(elem);
4151
- if (GrafreeD.clipboardIsTempGroup)
4430
+ if (Grafreed.clipboardIsTempGroup)
41524431 tGroup.add/*Child*/(tmp);
41534432 else
4154
- GrafreeD.clipboard = tmp;
4433
+ Grafreed.clipboard = tmp;
41554434 }
41564435 else
4157
- if (GrafreeD.clipboardIsTempGroup)
4436
+ if (Grafreed.clipboardIsTempGroup)
41584437 tGroup.add/*Child*/(child);
41594438 else
4160
- GrafreeD.clipboard = child;
4439
+ Grafreed.clipboard = child;
41614440 }
41624441
41634442 }
4164
- if (GrafreeD.clipboardIsTempGroup)
4165
- GrafreeD.clipboard = tGroup;
4443
+ if (Grafreed.clipboardIsTempGroup)
4444
+ Grafreed.clipboard = tGroup;
41664445 if (cut)
41674446 {
41684447 ResetModel();
....@@ -4176,7 +4455,7 @@
41764455 // return;
41774456 boolean first = true;
41784457
4179
- if (GrafreeD.clipboardIsTempGroup)
4458
+ if (Grafreed.clipboardIsTempGroup)
41804459 {
41814460 Composite temp;
41824461
....@@ -4187,7 +4466,7 @@
41874466 temp = (Composite)Applet3D.clipboard.deepCopy();
41884467 */
41894468 Object3D elem;
4190
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4469
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
41914470 {
41924471 Object3D child = (Object3D)e.nextElement();
41934472
....@@ -4221,21 +4500,21 @@
42214500 //Object3D cb = Applet3D.clipboard;
42224501 //temp.addChild(cb);
42234502 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4224
- assert(GrafreeD.clipboard.parent == null);
4225
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4226
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4227
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4228
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
4503
+ assert(Grafreed.clipboard.parent == null);
4504
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4505
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4506
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4507
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
42294508 else
4230
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4231
- GrafreeD.clipboard.get(0).parent = keepparent;
4509
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4510
+ Grafreed.clipboard.get(0).parent = keepparent;
42324511 }
42334512
42344513 ResetModel();
42354514 refreshContents();
42364515 }
42374516
4238
- void pasteInto(boolean copyit)
4517
+ void pasteInto(boolean copyit, boolean clone)
42394518 {
42404519 // if (GrafreeD.clipboard == null)
42414520 // return;
....@@ -4264,15 +4543,22 @@
42644543 if (copyit)
42654544 {
42664545 // paste(false);
4267
- CloneClipboard(false); // sept 2014
4546
+ if (clone)
4547
+ {
4548
+ CloneClipboard(false); // sept 2014
4549
+ }
4550
+ else
4551
+ {
4552
+ paste(false);
4553
+ }
42684554 }
42694555 else
42704556 {
42714557 boolean first = true;
42724558
4273
- if (GrafreeD.clipboardIsTempGroup)
4559
+ if (Grafreed.clipboardIsTempGroup)
42744560 {
4275
- Composite temp = (Composite)GrafreeD.clipboard;
4561
+ Composite temp = (Composite)Grafreed.clipboard;
42764562 Object3D copy;
42774563 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
42784564 {
....@@ -4282,7 +4568,7 @@
42824568 }
42834569 } else
42844570 {
4285
- linkSomething(GrafreeD.clipboard); //.get(0));
4571
+ linkSomething(Grafreed.clipboard); //.get(0));
42864572 }
42874573 }
42884574 }
....@@ -4474,6 +4760,26 @@
44744760 makeSomething(csg);
44754761 }
44764762
4763
+ void Ungroup(Object3D g)
4764
+ {
4765
+ if (g instanceof HiddenObject)
4766
+ {
4767
+ HiddenObject h = (HiddenObject) g;
4768
+
4769
+ for (int i=0; i<h.ActualSize(); i++)
4770
+ {
4771
+ objEditor.makeSomething(h.get(i), false);
4772
+ }
4773
+ }
4774
+ else
4775
+ {
4776
+ for (int i=0; i<g.Size(); i++)
4777
+ {
4778
+ objEditor.makeSomething(g.get(i), false);
4779
+ }
4780
+ }
4781
+ }
4782
+
44774783 void ungroup()
44784784 {
44794785 /*
....@@ -4707,7 +5013,7 @@
47075013
47085014 void ImportVRMLX3D()
47095015 {
4710
- if (GrafreeD.standAlone)
5016
+ if (Grafreed.standAlone)
47115017 {
47125018 /**/
47135019 FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
....@@ -4724,7 +5030,7 @@
47245030
47255031 String GetFile(String dialogName)
47265032 {
4727
- if (GrafreeD.standAlone)
5033
+ if (Grafreed.standAlone)
47285034 {
47295035 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
47305036 browser.show();
....@@ -4788,10 +5094,12 @@
47885094 cButton flashSelectionButton;
47895095 cButton editButton;
47905096 cButton uneditButton;
5097
+ JCheckBox allParamsButton;
47915098 cButton clearpanelButton;
4792
- cButton allParamsButton;
47935099 cButton unselectButton;
47945100
5101
+ cButton oneStepButton;
5102
+
47955103 cButton screenfitButton;
47965104 cButton screenfitpointButton;
47975105 cButton snapobjectButton;
....@@ -4833,8 +5141,9 @@
48335141 private MenuItem resetsupportItem;
48345142 private MenuItem resetreferencesItem;
48355143 private MenuItem linkverticesItem;
5144
+ private MenuItem relinkverticesItem;
48365145 private MenuItem setMasterItem;
4837
- private MenuItem resetMeshItem;
5146
+ private MenuItem resetAllItem;
48385147 private MenuItem stepAllItem;
48395148 private MenuItem revertMeshItem;
48405149 private MenuItem poseMeshItem;
....@@ -4845,6 +5154,7 @@
48455154 private MenuItem mergeGeometriesItem;
48465155 private MenuItem copyItem;
48475156 private MenuItem pasteItem;
5157
+ private MenuItem pasteIntoItem;
48485158 private MenuItem pasteLinkItem;
48495159 private MenuItem pasteCloneItem;
48505160 private MenuItem pasteExpandItem;
....@@ -4854,6 +5164,7 @@
48545164 private MenuItem genNormalsMESHItem;
48555165 private MenuItem genNormalsCADItem;
48565166 private MenuItem genNormalsORGANItem;
5167
+ private MenuItem genNormalsMINEItem;
48575168 private MenuItem stripifyItem;
48585169 private MenuItem unstripifyItem;
48595170 private MenuItem trimItem;
....@@ -4893,8 +5204,11 @@
48935204 private MenuItem panoTexturesItem;
48945205
48955206 private MenuItem resetCentroidItem;
4896
- private MenuItem transformgeometryItem;
5207
+ private MenuItem resetCentroidXZItem;
48975208 private MenuItem resetTransformItem;
5209
+ private MenuItem transformGeometryItem;
5210
+ private MenuItem transformChildrenItem;
5211
+ private MenuItem hideItem;
48985212 private MenuItem grabItem;
48995213 private MenuItem backItem;
49005214 private MenuItem frontItem;
....@@ -4915,6 +5229,7 @@
49155229
49165230 private MenuItem resetParentItem;
49175231 private MenuItem repairParentItem;
5232
+ private MenuItem repairShadowItem;
49185233 private MenuItem sortbysizeItem;
49195234 private MenuItem sortbynameItem;
49205235
....@@ -4935,10 +5250,11 @@
49355250 private MenuItem coneItem;
49365251 private MenuItem torusItem;
49375252 private MenuItem superItem;
5253
+ private MenuItem kleinItem;
49385254 private MenuItem blobItem;
49395255 private MenuItem latheItem;
49405256 private MenuItem bezierItem;
4941
- private MenuItem checkerItem;
5257
+ private MenuItem overlayItem;
49425258 private MenuItem meshItem;
49435259 // private MenuItem meshGroupItem;
49445260 private MenuItem springItem;
....@@ -4947,6 +5263,7 @@
49475263 private MenuItem csgItem;
49485264 private MenuItem templateItem;
49495265 private MenuItem textureItem;
5266
+ private MenuItem billboardItem;
49505267 private MenuItem shadowXItem;
49515268 private MenuItem shadowYItem;
49525269 private MenuItem shadowZItem;