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"));
....@@ -285,6 +328,13 @@
285328 genNormalsORGANItem.addActionListener(this);
286329 genNormalsCADItem = menu.add(new MenuItem("CAD Normals"));
287330 genNormalsCADItem.addActionListener(this);
331
+ genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
332
+ genNormalsMESHItem.addActionListener(this);
333
+ if (Globals.ADVANCED)
334
+ {
335
+ genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
336
+ genNormalsMINEItem.addActionListener(this);
337
+ }
288338 stripifyItem = menu.add(new MenuItem("Stripify"));
289339 stripifyItem.addActionListener(this);
290340 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -306,23 +356,34 @@
306356 reduce34MeshItem.addActionListener(this);
307357 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
308358 increaseMeshItem.addActionListener(this);
309
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
310
- smoothMeshItem.addActionListener(this);
311359 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
312360 clipMeshItem.addActionListener(this);
361
+
362
+ if (Globals.ADVANCED)
363
+ {
364
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
365
+ smoothMeshItem.addActionListener(this);
366
+ }
313367
314368 oe.menuBar.add(menu = new Menu("Attributes"));
315369 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
316370 clearMaterialsItem.addActionListener(this);
371
+ resetAllItem = menu.add(new MenuItem("Reset All"));
372
+ resetAllItem.addActionListener(this);
373
+ stepAllItem = menu.add(new MenuItem("Step All"));
374
+ stepAllItem.addActionListener(this);
317375 menu.add("-");
318376 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
319377 liveleavesItem.addActionListener(this);
320378 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
321379 unliveleavesItem.addActionListener(this);
380
+ if (Globals.ADVANCED)
381
+ {
322382 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
323383 supportleavesItem.addActionListener(this);
324384 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
325385 unsupportleavesItem.addActionListener(this);
386
+ }
326387 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
327388 hideleavesItem.addActionListener(this);
328389 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -366,28 +427,34 @@
366427 sortbynameItem = menu.add(new MenuItem("Sort by name"));
367428 sortbynameItem.addActionListener(this);
368429 menu.add("-");
430
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
431
+ shareGeometriesItem.addActionListener(this);
432
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
433
+ mergeGeometriesItem.addActionListener(this);
434
+ if (Globals.ADVANCED)
435
+ {
436
+ // Pretty much the same as duplicate and clone.
369437 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
370438 extractGeometriesItem.addActionListener(this);
371439 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
372440 cloneGeometriesItem.addActionListener(this);
373
- shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
374
- shareGeometriesItem.addActionListener(this);
375
- mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
376
- mergeGeometriesItem.addActionListener(this);
441
+ }
377442
378443 oe.menuBar.add(menu = new Menu("Insert"));
379444 buildCreateMenu(menu);
380445
381
-
382446 oe.menuBar.add(menu = new Menu("Include"));
383
- importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
384
- importGFDItem.addActionListener(this);
385
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
386
- importVRMLX3DItem.addActionListener(this);
387
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
447
+ importOBJItem = menu.add(new MenuItem("OBJ file..."));
388448 importOBJItem.addActionListener(this);
389
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
449
+ menu.add("-");
450
+ import3DSItem = menu.add(new MenuItem("3DS file..."));
390451 import3DSItem.addActionListener(this);
452
+ menu.add("-");
453
+ importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file..."));
454
+ importVRMLX3DItem.addActionListener(this);
455
+ menu.add("-");
456
+ importGFDItem = menu.add(new MenuItem("GrafreeD file..."));
457
+ importGFDItem.addActionListener(this);
391458
392459 oe.menuBar.add(menu = new Menu("Tools"));
393460 buildToolsMenu(menu);
....@@ -423,150 +490,98 @@
423490 oe.radioPanel.add(dummyButton);
424491 oe.buttonGroup.add(dummyButton);
425492 */
426
- aConstraints.gridy += 1;
427
- oe.aConstraints.gridwidth = 1;
428
- oe.aConstraints.gridx = 0;
493
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
429494
430
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints);
495
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
496
+ liveCB.setToolTipText("Enable animation");
431497 liveCB.addItemListener(this);
432498
433
- oe.aConstraints.gridx += 1;
434
- oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints);
435
- supportCB.addItemListener(this);
436
-
437
- // oe.aConstraints.gridx += 1;
438
- // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints);
439
- // localCB.addItemListener(this);
440
-
441
- oe.aConstraints.gridx += 1;
442
- oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints);
443
- crowdCB.addItemListener(this);
444
-
445
- oe.aConstraints.gridx += 1;
446
- oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints);
447
- smoothCB.addItemListener(this);
448
-
449
- oe.aConstraints.gridx += 1;
450
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints);
499
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
500
+ oneStepButton.setToolTipText("Animate one step forward");
501
+ oneStepButton.addActionListener(this);
502
+
503
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
504
+ fastCB.setToolTipText("Fast mode");
451505 fastCB.addItemListener(this);
452
- oe.aConstraints.gridx += 1;
453
- oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints);
454
- slowCB.addItemListener(this);
455
- oe.aConstraints.gridx += 1;
456
- oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints);
457
- boxCB.addItemListener(this);
458
-
459
-// oe.aConstraints.gridx += 1;
460
-// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints);
461
-// speakerMocapCB.addItemListener(this);
462
-
463
- if (false)
464
- {
465
- // handled in scripts
466
- oe.aConstraints.gridx += 1;
467
- oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints);
468
- speakerCameraCB.addItemListener(this);
469
-
470
- oe.aConstraints.gridx += 1;
471
- oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints);
472
- speakerFocusCB.addItemListener(this);
473
-
474
- oe.aConstraints.gridx += 1;
475
- oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints);
476
- smoothfocusCB.addItemListener(this);
477
- }
478
-
479
-//oe.aConstraints.gridx += 1;
480
-//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints);
481
-// debugCB.addItemListener(this);
482
-
483
- oe.aConstraints.gridx += 1;
484
- oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints);
485
- oeilCB.addItemListener(this);
486
-
487
- oe.aConstraints.gridx += 1;
488
- oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints);
489
- lookAtCB.addItemListener(this);
490
-
491
- oe.aConstraints.gridx += 1;
492
- oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints);
506
+
507
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
508
+ trackCB.setToolTipText("Enable tracking");
493509 trackCB.addItemListener(this);
494510
495
- oe.aConstraints.gridx += 1;
496
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
511
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
512
+ screenfitButton.setToolTipText("Screen fit");
497513 screenfitButton.addActionListener(this);
498
- oe.aConstraints.gridx += 1;
514
+
499515 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
500516 // screenfitpointButton.addActionListener(this);
501
-// oe.aConstraints.gridx += 1;
502
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
503
- snapobjectButton.addActionListener(this);
504
- oe.aConstraints.gridx += 1;
505517
506
- //aConstraints.gridx = 0;
507
- //aConstraints.gridy += 1;
508
- oe.aConstraints.weighty = 0;
509
- oe.aConstraints.gridwidth = 1;
510
-
511
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
518
+ if (Globals.ADVANCED)
519
+ {
520
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
521
+ snapobjectButton.addActionListener(this);
522
+ snapobjectButton.setToolTipText("Snap Object");
523
+ }
524
+
525
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
526
+ flashSelectionButton.setToolTipText("Show selection");
512527 flashSelectionButton.addActionListener(this);
513
- oe.aConstraints.gridx += 1;
514
- oe.aConstraints.weighty = 0;
515
- oe.aConstraints.gridwidth = 1;
516528
517
- //
518
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
529
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
530
+
531
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
532
+ twoButton.setToolTipText("Show center view only");
519533 twoButton.addActionListener(this);
520
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
534
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
521535 fourButton.addActionListener(this);
522
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
536
+ fourButton.setToolTipText("Show left panel only");
537
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
538
+ sixButton.setToolTipText("2-column layout left");
523539 sixButton.addActionListener(this);
524
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
540
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
541
+ threeButton.setToolTipText("2-column layout right");
525542 threeButton.addActionListener(this);
526
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
543
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
544
+ sevenButton.setToolTipText("3-column layout");
527545 sevenButton.addActionListener(this);
528546 //
529547
530
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
548
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
549
+ rootButton.setToolTipText("Edit selection in new tab");
531550 rootButton.addActionListener(this);
532
- oe.aConstraints.gridx += 1;
533
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
551
+
552
+ oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
553
+ closeButton.setToolTipText("Close tab");
534554 closeButton.addActionListener(this);
535555 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
536556 //clearButton.addActionListener(this);
537
- oe.aConstraints.gridx += 1;
538557
539
- oe.aConstraints.gridx = 1; //
540
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
558
+ cGridBag commandsPanel = new cGridBag();
559
+
560
+ commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
561
+ editButton.setToolTipText("Edit selection");
541562 editButton.addActionListener(this);
542
- oe.aConstraints.gridx += 1;
543
- oe.aConstraints.weighty = 0;
544
- oe.aConstraints.gridwidth = 1;
545563
546
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
564
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
565
+ uneditButton.setToolTipText("Unedit selection");
547566 uneditButton.addActionListener(this);
548567
549
- oe.aConstraints.gridx += 1;
550
- oe.aConstraints.weighty = 0;
551
- oe.aConstraints.gridwidth = 1;
552
-
553
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
554
- clearPanelButton.addActionListener(this);
555
-
556
- oe.aConstraints.gridx += 1;
557
- oe.aConstraints.weighty = 0;
558
- oe.aConstraints.gridwidth = 1;
559
-
560
- oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints);
568
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
569
+ allParamsButton.setToolTipText("Edit all params");
561570 allParamsButton.addActionListener(this);
562571
563
- oe.aConstraints.gridx += 1;
564
- oe.aConstraints.weighty = 0;
565
- oe.aConstraints.gridwidth = 1;
566
-
567
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
572
+ commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
573
+ clearPanelButton.setToolTipText("Clear edit panel");
574
+ clearPanelButton.addActionListener(this);
575
+
576
+ commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
577
+ unselectButton.setToolTipText("Unselect");
568578 unselectButton.addActionListener(this);
569579
580
+ commandsPanel.preferredHeight = 1;
581
+
582
+ oe.treePanel.add(commandsPanel);
583
+ oe.treePanel.Return();
584
+
570585 // oe.aConstraints.gridx += 1;
571586 // oe.aConstraints.weighty = 0;
572587 // oe.aConstraints.gridwidth = 1;
....@@ -578,40 +593,37 @@
578593 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
579594 // gcButton.addActionListener(this);
580595
581
- oe.aConstraints.gridx = 0;
582
- oe.aConstraints.gridy += 1;
583
-
584
- //ctrlPanel.add(objList = new List(5, true));
585
- oe.aConstraints.gridwidth = 100;
586
- // oe.aConstraints.gridheight = 100;
587
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
588
- oe.aConstraints.gridheight = 1;
589
- oe.aConstraints.weighty = 0.5;
590
- oe.aConstraints.gridx = 0;
591
- JScrollPane jSP;
596
+ cGridBag jSPPanel = new cGridBag();
597
+
598
+ JScrollPane jSP;
592599 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
593
- oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints);
600
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
594601 ResetModel();
595
- oe.aConstraints.weighty = 0.5;
596
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
597
- oe.aConstraints.gridy += 1;
598
- oe.aConstraints.gridwidth = 1;
602
+
603
+ oe.treePanel.add(jSPPanel);
604
+ oe.treePanel.Return();
599605
600
- oe.aConstraints.weighty = 0;
601
- oe.aConstraints.gridwidth = 2;
602
-
603
- oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints);
606
+ cGridBag copyOptionsPanel = new cGridBag();
607
+
608
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
609
+ colorCB.setToolTipText("Copy color when dropped");
604610 colorCB.addItemListener(this);
605
- oe.aConstraints.gridx += 2;
606
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
611
+
612
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
613
+ materialCB.setToolTipText("Copy material when dropped");
607614 materialCB.addItemListener(this);
608
- oe.aConstraints.gridx += 2;
609
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
615
+
616
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
617
+ textureCB.setToolTipText("Copy texture when dropped");
610618 textureCB.addItemListener(this);
611619
612
- oe.aConstraints.gridx = 0;
613
- oe.aConstraints.gridy += 1;
620
+ copyOptionsPanel.preferredHeight = 1;
621
+ oe.treePanel.add(copyOptionsPanel);
622
+ oe.treePanel.Return();
614623
624
+// mainPanel.setDividerLocation(0.5); //1.0);
625
+// mainPanel.setResizeWeight(0.5);
626
+
615627 //jList.addListSelectionListener(this);
616628 oe.jTree.addTreeSelectionListener(this);
617629 //jTree.setRootVisible(false);
....@@ -633,18 +645,91 @@
633645 radio.layout = sevenButton;
634646 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
635647 }
648
+
649
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
650
+ {
651
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
652
+ boxCB.setToolTipText("Display bounding boxes");
653
+ boxCB.addItemListener(this);
654
+
655
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
656
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
657
+ zoomBoxCB.addItemListener(this);
658
+
659
+ if (true) // Globals.ADVANCED)
660
+ {
661
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
662
+ supportCB.setToolTipText("Enable rigging");
663
+ supportCB.addItemListener(this);
664
+
665
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
666
+ // localCB.addItemListener(this);
667
+
668
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
669
+ crowdCB.setToolTipText("Used for crowds");
670
+ crowdCB.addItemListener(this);
671
+
672
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
673
+ smoothCB.setToolTipText("Snapping delay");
674
+ smoothCB.addItemListener(this);
675
+
676
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
677
+ slowCB.setToolTipText("Smooth interpolation");
678
+ slowCB.addItemListener(this);
679
+
680
+// constraints.gridy += 1;
681
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
682
+// speakerMocapCB.addItemListener(this);
683
+
684
+ if (false)
685
+ {
686
+ // handled in scripts
687
+ //constraints.gridy += 1;
688
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
689
+ speakerCameraCB.addItemListener(this);
690
+
691
+ //constraints.gridy += 1;
692
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
693
+ speakerFocusCB.addItemListener(this);
694
+
695
+ //constraints.gridy += 1;
696
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
697
+ smoothfocusCB.addItemListener(this);
698
+ }
699
+
700
+//constraints.gridx += 1;
701
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
702
+// debugCB.addItemListener(this);
703
+
704
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
705
+ oeilCB.addItemListener(this);
706
+
707
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
708
+ lookAtCB.setToolTipText("Look-at target");
709
+ lookAtCB.addItemListener(this);
710
+
711
+ }
712
+
713
+ cGridBag fill = new cGridBag();
714
+
715
+ fill.preferredHeight = 200;
716
+
717
+ panel.add(fill);
718
+
719
+ }
636720
637721 void EditObject(Object3D obj)
638722 {
639
- cRadio dummyButton = new cRadio(obj.name);
640
- dummyButton.SetObject(obj);
641
- dummyButton.layout = sevenButton;
642
- dummyButton.SetCamera(cameraView.renderCamera, false);
643
- dummyButton.addActionListener(this);
644
- radioPanel.add(dummyButton);
645
- buttonGroup.add(dummyButton);
646
- dummyButton.doClick();
723
+ cRadio radioButton = new cRadio(obj.name);
724
+ radioButton.SetObject(obj);
725
+ radioButton.layout = sevenButton;
726
+ radioButton.SetCamera(cameraView.renderCamera, false);
727
+ radioButton.addActionListener(this);
728
+ radioPanel.add(radioButton);
729
+ buttonGroup.add(radioButton);
730
+ radioButton.doClick();
647731 }
732
+
648733 void SetupViews(ObjEditor oe)
649734 {
650735 oe.SetupViews();
....@@ -663,6 +748,7 @@
663748 JCheckBox fastCB;
664749 JCheckBox slowCB;
665750 JCheckBox boxCB;
751
+ JCheckBox zoomBoxCB;
666752 JCheckBox trackCB;
667753 JCheckBox smoothfocusCB;
668754 // JCheckBox speakerMocapCB;
....@@ -705,8 +791,7 @@
705791 dropAttributes |= Object3D.TEXTURE;
706792 else
707793 dropAttributes &= ~Object3D.TEXTURE;
708
- }
709
- else if(e.getSource() == liveCB)
794
+ } else if(e.getSource() == liveCB)
710795 {
711796 cameraView.ToggleLive();
712797 }
....@@ -743,6 +828,10 @@
743828 Recompile();
744829 cameraView.repaint();
745830 // refreshContents();
831
+ }
832
+ else if(e.getSource() == zoomBoxCB)
833
+ {
834
+ cameraView.ToggleZoomBoxMode();
746835 }
747836 else if(e.getSource() == smoothfocusCB)
748837 {
....@@ -857,7 +946,9 @@
857946 // objEditor.DropFile((java.io.File[]) object, true);
858947 // return;
859948 // }
860
- if (string.charAt(0) == '/')
949
+
950
+ // File path for Mac and Windows
951
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
861952 {
862953 // file(s)
863954 String[] names = string.split("\n");
....@@ -884,7 +975,7 @@
884975
885976 flashIt = false;
886977 CameraPane pane = (CameraPane) target;
887
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
978
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
888979 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
889980
890981 if (group.selection.size() == 1)
....@@ -911,11 +1002,11 @@
9111002 {
9121003 loadClipboard(true);
9131004 objEditor.jTree.setSelectionPath(destinationPath);
914
- pasteInto(false);
1005
+ pasteInto(false, false);
9151006 } else {
9161007 loadClipboard(false);
9171008 objEditor.jTree.setSelectionPath(destinationPath);
918
- pasteInto(false); // true); // ???
1009
+ pasteInto(false, false); // true); // ???
9191010 }
9201011 }
9211012 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1033,29 +1124,37 @@
10331124 torusItem.addActionListener(this);
10341125 superItem = menu.add(new MenuItem("Superellipsoid"));
10351126 superItem.addActionListener(this);
1127
+ kleinItem = menu.add(new MenuItem("Klein Bottle"));
1128
+ kleinItem.addActionListener(this);
10361129 particleItem = menu.add(new MenuItem("Particle system"));
10371130 particleItem.addActionListener(this);
1131
+ if (Globals.ADVANCED)
1132
+ {
10381133 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10391134 ragdollItem.addActionListener(this);
10401135 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10411136 ragdoll2Item.addActionListener(this);
1137
+ }
10421138 menu.add("-");
1043
- meshItem = menu.add(new MenuItem("Mesh"));
1139
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10441140 meshItem.addActionListener(this);
10451141 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10461142 // meshGroupItem.addActionListener(this);
1143
+ if (Globals.ADVANCED)
1144
+ {
10471145 springItem = menu.add(new MenuItem("Spring"));
10481146 springItem.addActionListener(this);
10491147 flagItem = menu.add(new MenuItem("Flag"));
10501148 flagItem.addActionListener(this);
1051
- bezierItem = menu.add(new MenuItem("Patch"));
1052
- bezierItem.addActionListener(this);
1053
- checkerItem = menu.add(new MenuItem("Checker"));
1054
- checkerItem.addActionListener(this);
10551149 blobItem = menu.add(new MenuItem("Blob"));
10561150 blobItem.addActionListener(this);
10571151 latheItem = menu.add(new MenuItem("Lathe"));
10581152 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);
10591158 lightItem = menu.add(new MenuItem("Light"));
10601159 lightItem.addActionListener(this);
10611160 menu.add("-");
....@@ -1065,34 +1164,39 @@
10651164 loopItem.addActionListener(this);
10661165 doubleItem = menu.add(new MenuItem("Fork"));
10671166 doubleItem.addActionListener(this);
1167
+ if (Globals.ADVANCED)
1168
+ {
10681169 tripleItem = menu.add(new MenuItem("Trident"));
10691170 tripleItem.addActionListener(this);
1171
+ }
10701172 }
10711173
10721174 void buildToolsMenu(Menu menu)
10731175 {
10741176 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10751177 animationItem.addItemListener(this);
1076
- animationItem.setState(CameraPane.ANIMATION);
1178
+ animationItem.setState(Globals.ANIMATION);
10771179
10781180 menu.add("-");
10791181 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
10801182 parseverticesItem.addActionListener(this);
10811183 textureFieldItem = menu.add(new MenuItem("Texture Field"));
10821184 textureFieldItem.addActionListener(this);
1083
- alignItem = menu.add(new MenuItem("Align"));
1185
+ alignItem = menu.add(new MenuItem("Align Objects"));
10841186 alignItem.addActionListener(this);
1085
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1086
- mirrorItem.addActionListener(this);
10871187 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
10881188 reduceMorphItem.addActionListener(this);
10891189 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
10901190 reduce34MorphItem.addActionListener(this);
1091
-
1191
+ menu.add("-");
10921192 menu.add(computeAOItem = new MenuItem("Compute AO"));
10931193 computeAOItem.addActionListener(this);
1094
- menu.add("-");
10951194
1195
+ if (Globals.ADVANCED)
1196
+ {
1197
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1198
+ mirrorItem.addActionListener(this);
1199
+ menu.add("-");
10961200 menu.add(memoryItem = new MenuItem("Memory Usage"));
10971201 memoryItem.addActionListener(this);
10981202 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1106,6 +1210,8 @@
11061210 resetParentItem.addActionListener(this);
11071211 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11081212 repairParentItem.addActionListener(this);
1213
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1214
+ repairShadowItem.addActionListener(this);
11091215 menu.add(invariantsItem = new MenuItem("Invariants"));
11101216 invariantsItem.addActionListener(this);
11111217 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1113,6 +1219,7 @@
11131219 menu.add("-");
11141220 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11151221 editScriptItem.addActionListener(this);
1222
+ }
11161223 }
11171224
11181225 void ScreenFit()
....@@ -1441,9 +1548,9 @@
14411548
14421549 void Overwrite(int mask)
14431550 {
1444
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1551
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14451552 {
1446
- Object3D content = GrafreeD.clipboard.get(0);
1553
+ Object3D content = Grafreed.clipboard.get(0);
14471554
14481555 if (content instanceof cGroup && ((cGroup)content).transientlink )
14491556 content = ((cGroup)content).get(0);
....@@ -1466,6 +1573,7 @@
14661573 //
14671574 public void actionPerformed(ActionEvent event) // , Object arg)
14681575 {
1576
+ Object source = event.getSource();
14691577 /*
14701578 if (event.getSource() == nameField)
14711579 {
....@@ -1477,11 +1585,11 @@
14771585 }
14781586 else
14791587 */
1480
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1588
+ if (source == lookAtItem || source == lookFromItem)
14811589 {
14821590 ScreenFit();
14831591 } else
1484
- if (event.getSource() == switchItem)
1592
+ if (source == switchItem)
14851593 {
14861594 cVector v1 = new cVector();
14871595 cVector v2 = new cVector();
....@@ -1490,11 +1598,11 @@
14901598 objEditor.cameraView.renderCamera.setAim(v2, v1);
14911599 objEditor.cameraView.repaint();
14921600 } else
1493
- if (event.getSource() == rectoidItem)
1601
+ if (source == rectoidItem)
14941602 {
14951603 makeSomething(new Box());
14961604 } else
1497
- if (event.getSource() == particleItem)
1605
+ if (source == particleItem)
14981606 {
14991607 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15001608 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1515,9 +1623,9 @@
15151623 applyExample(particleGeom, "SMOKE");
15161624 makeSomething(particleGeom);
15171625 } else
1518
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1626
+ if (source == ragdollItem || source == ragdoll2Item)
15191627 {
1520
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1628
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15211629
15221630 ragdoll.toParent = LA.newMatrix();
15231631 ragdoll.fromParent = LA.newMatrix();
....@@ -1535,7 +1643,7 @@
15351643 } else
15361644 /*
15371645 */
1538
- if (event.getSource() == heightFieldItem)
1646
+ if (source == heightFieldItem)
15391647 {
15401648 Object3D obj = new Object3D();
15411649
....@@ -1573,27 +1681,31 @@
15731681
15741682 makeSomething(obj);
15751683 } else
1576
- if (event.getSource() == gridItem)
1684
+ if (source == gridItem)
15771685 {
15781686 makeSomething(new Grid());
15791687 } else
1580
- if (event.getSource() == ellipsoidItem)
1688
+ if (source == ellipsoidItem)
15811689 {
15821690 makeSomething(new Sphere());
15831691 } else
1584
- if (event.getSource() == coneItem)
1692
+ if (source == coneItem)
15851693 {
15861694 makeSomething(new Cone());
15871695 } else
1588
- if (event.getSource() == torusItem)
1696
+ if (source == torusItem)
15891697 {
15901698 makeSomething(new Torus());
15911699 } else
1592
- if (event.getSource() == superItem)
1700
+ if (source == superItem)
15931701 {
15941702 makeSomething(new Superellipsoid());
15951703 } else
1596
- if (event.getSource() == blobItem)
1704
+ if (source == kleinItem)
1705
+ {
1706
+ makeSomething(new Klein());
1707
+ } else
1708
+ if (source == blobItem)
15971709 {
15981710 Blob blob = new Blob();
15991711 BlobComponent comp = new BlobComponent();
....@@ -1601,15 +1713,15 @@
16011713 //blob.retile();
16021714 makeSomething(blob);
16031715 } else
1604
- if (event.getSource() == latheItem)
1716
+ if (source == latheItem)
16051717 {
16061718 makeSomething(new Lathe());
16071719 } else
1608
- if (event.getSource() == bezierItem)
1720
+ if (source == bezierItem)
16091721 {
16101722 makeSomething(new BezierSurface());
16111723 } else
1612
- if (event.getSource() == checkerItem)
1724
+ if (source == overlayItem)
16131725 {
16141726 /*
16151727 Object3D obj = new BezierSurface(5,8);
....@@ -1624,7 +1736,7 @@
16241736 */
16251737 makeSomething(new Checker());
16261738 } else
1627
- if (event.getSource() == meshItem)
1739
+ if (source == meshItem)
16281740 {
16291741 Object3D itemtomake = new Object3D();
16301742 Object3D child;
....@@ -1645,35 +1757,35 @@
16451757 makeSomething(child);
16461758 }
16471759 } else
1648
- if (event.getSource() == springItem)
1760
+ if (source == springItem)
16491761 {
16501762 cSpring s = new cSpring();
16511763 s.setup();
16521764 makeSomething(s);
16531765 } else
1654
- if (event.getSource() == flagItem)
1766
+ if (source == flagItem)
16551767 {
16561768 cSpring s = new cFlag();
16571769 s.setup();
16581770 makeSomething(s);
16591771 } else
1660
- if (event.getSource() == lightItem)
1772
+ if (source == lightItem)
16611773 {
16621774 makeSomething(new Light());
16631775 } else
1664
- if (event.getSource() == csgItem)
1776
+ if (source == csgItem)
16651777 {
16661778 group(new CSG());
16671779 } else
1668
- if (event.getSource() == templateItem)
1780
+ if (source == templateItem)
16691781 {
16701782 group(new cTemplate());
16711783 } else
1672
- if (event.getSource() == attributeItem)
1784
+ if (source == attributeItem)
16731785 {
16741786 makeSomething(new Attribute());
16751787 } else
1676
- if (event.getSource() == pointflowItem)
1788
+ if (source == pointflowItem)
16771789 {
16781790 makeSomething(new PointFlow());
16791791 } else
....@@ -1685,7 +1797,7 @@
16851797 } else
16861798 */
16871799
1688
- if (event.getSource() == superLoopItem)
1800
+ if (source == superLoopItem)
16891801 {
16901802 Composite g = new cGroup();
16911803 for (int i=0; i<15; i++)
....@@ -1707,7 +1819,7 @@
17071819
17081820 group(g);
17091821 } else
1710
- if (event.getSource() == loopItem)
1822
+ if (source == loopItem)
17111823 {
17121824 Composite csg = new GroupLeaf();
17131825 csg.count = 5;
....@@ -1716,7 +1828,7 @@
17161828 csg.addChild(child);
17171829 child.addChild(csg);
17181830 } else
1719
- if (event.getSource() == doubleItem)
1831
+ if (source == doubleItem)
17201832 {
17211833 Composite csg = new GroupLeaf();
17221834 csg.count = 5;
....@@ -1728,7 +1840,7 @@
17281840 csg.addChild(child);
17291841 child.addChild(csg);
17301842 } else
1731
- if (event.getSource() == tripleItem)
1843
+ if (source == tripleItem)
17321844 {
17331845 Composite csg = new GroupLeaf();
17341846 csg.count = 4;
....@@ -1744,70 +1856,83 @@
17441856 child.addChild(csg);
17451857 } else
17461858
1747
- if (event.getSource() == importGFDItem)
1859
+ if (source == importGFDItem)
17481860 {
17491861 ImportGFD();
17501862 } else
1751
- if (event.getSource() == importVRMLX3DItem)
1863
+ if (source == importVRMLX3DItem)
17521864 {
17531865 ImportVRMLX3D();
17541866 } else
1755
- if (event.getSource() == import3DSItem)
1867
+ if (source == import3DSItem)
17561868 {
17571869 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17581870 } else
1759
- if (event.getSource() == importOBJItem)
1871
+ if (source == importOBJItem)
17601872 {
1761
- 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
+ }
17621882 } else
1763
- if (event.getSource() == computeAOItem)
1883
+ if (source == computeAOItem)
17641884 {
1765
- CameraPane.drawMode = CameraPane.OCCLUSION;
1766
- CameraPane.theRenderer.repaint();
1885
+ Globals.drawMode = CameraPane.OCCLUSION;
1886
+ Globals.theRenderer.repaint();
17671887 } else
1768
- if (event.getSource() == recompileItem)
1888
+ if (source == recompileItem)
17691889 {
17701890 Recompile();
17711891 refreshContents();
17721892 } else
1773
- if (event.getSource() == editScriptItem)
1893
+ if (source == editScriptItem)
17741894 {
17751895 OpenDialog();
17761896 refreshContents();
17771897 } else
1778
- if (event.getSource() == invariantsItem)
1898
+ if (source == invariantsItem)
17791899 {
17801900 System.out.println("Invariants:");
1781
- GrafreeD.theApplet3D.universe.invariants();
1901
+ Grafreed.grafreeD.universe.invariants();
17821902 } else
1783
- if (event.getSource() == memoryItem)
1903
+ if (source == memoryItem)
17841904 {
17851905 //System.out.println("Invariants:");
17861906 PrintMemory();
17871907 } else
1788
- if (event.getSource() == pathItem)
1908
+ if (source == pathItem)
17891909 {
17901910 PrintPath();
17911911 } else
1792
- if (event.getSource() == analyzeItem)
1912
+ if (source == analyzeItem)
17931913 {
17941914 AnalyzeObject();
17951915 } else
1796
- if (event.getSource() == dumpItem)
1916
+ if (source == dumpItem)
17971917 {
17981918 DumpObject();
17991919 } else
1800
- if (event.getSource() == screenfitButton)
1920
+ if (source == oneStepButton)
1921
+ {
1922
+ Globals.ONESTEP = true;
1923
+ cameraView.repaint();
1924
+ } else
1925
+ if (source == screenfitButton)
18011926 {
18021927 //Reload(lastConverter, lastFilename, true);
18031928 ScreenFit();
18041929 } else
1805
- if (event.getSource() == screenfitpointButton)
1930
+ if (source == screenfitpointButton)
18061931 {
18071932 //Reload(lastConverter, lastFilename, true);
18081933 ScreenFitPoint();
18091934 } else
1810
- if (event.getSource() == snapobjectButton)
1935
+ if (source == snapobjectButton)
18111936 {
18121937 //Reload(lastConverter, lastFilename, true);
18131938 SnapObject();
....@@ -1818,13 +1943,13 @@
18181943 // Recompile();
18191944 // refreshContents();
18201945 // } else
1821
- if (event.getSource() == gcButton)
1946
+ if (source == gcButton)
18221947 {
18231948 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18241949 System.gc();
18251950 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18261951 } else
1827
- if (event.getSource() == editLeafItem)
1952
+ if (source == editLeafItem)
18281953 {
18291954 Object3D obj;
18301955 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1838,62 +1963,66 @@
18381963 }
18391964 refreshContents(true);
18401965 } else
1841
- if (event.getSource() == openWindowItem)
1966
+ if (source == openWindowItem)
18421967 {
18431968 EditSelection(true);
18441969 } else
1845
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1970
+ if (source == cutItem || source == clearButton)
18461971 {
18471972 loadClipboard(true);
18481973 } else
1849
- if (event.getSource() == duplicateItem)
1974
+ if (source == duplicateItem)
18501975 {
1851
- Object3D keep = GrafreeD.clipboard;
1976
+ Object3D keep = Grafreed.clipboard;
18521977 loadClipboard(false);
18531978 paste(false);
1854
- GrafreeD.clipboard = keep;
1979
+ Grafreed.clipboard = keep;
18551980 } else
1856
- if (event.getSource() == cloneItem)
1981
+ if (source == cloneItem)
18571982 {
18581983 CloneSelection(false);
18591984 } else
1860
- if (event.getSource() == cloneSupportItem)
1985
+ if (source == cloneSupportItem)
18611986 {
18621987 CloneSelection(true);
18631988 } else
1864
- if (event.getSource() == copyItem)
1989
+ if (source == copyItem)
18651990 {
18661991 loadClipboard(false);
18671992 } else
1868
- if (event.getSource() == pasteItem)
1993
+ if (source == pasteItem)
18691994 {
18701995 paste(false);
18711996 } else
1872
- if (event.getSource() == pasteLinkItem)
1997
+ if (source == pasteIntoItem)
18731998 {
1874
- pasteInto(false);
1999
+ pasteInto(true, false);
18752000 } else
1876
- if (event.getSource() == pasteCloneItem)
2001
+ if (source == pasteLinkItem)
18772002 {
1878
- pasteInto(true);
2003
+ pasteInto(false, false);
18792004 } else
1880
- if (event.getSource() == pasteExpandItem)
2005
+ if (source == pasteCloneItem)
2006
+ {
2007
+ pasteInto(true, true);
2008
+ } else
2009
+ if (source == pasteExpandItem)
18812010 {
18822011 paste(true);
18832012 } else
1884
- if (event.getSource() == synchronizeItem)
2013
+ if (source == synchronizeItem)
18852014 {
18862015 Overwrite(Object3D.TRANSFORM);
18872016 } else
1888
- if (event.getSource() == overwriteNameItem)
2017
+ if (source == overwriteNameItem)
18892018 {
18902019 Overwrite(Object3D.NAME);
18912020 } else
1892
- if (event.getSource() == overwriteUVItem)
2021
+ if (source == overwriteUVItem)
18932022 {
18942023 Overwrite(Object3D.UV);
18952024 } else
1896
- if (event.getSource() == overwriteMatItem)
2025
+ if (source == overwriteMatItem)
18972026 {
18982027 /* july 2015
18992028 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1913,7 +2042,7 @@
19132042
19142043 Overwrite(dropAttributes);
19152044 }
1916
- if (event.getSource() == overwriteGeoItem)
2045
+ if (source == overwriteGeoItem)
19172046 {
19182047 Overwrite(Object3D.GEOMETRY);
19192048 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1930,7 +2059,7 @@
19302059 // refreshContents();
19312060 // }
19322061 } else
1933
- if (event.getSource() == generateMeshItem)
2062
+ if (source == generateMeshItem)
19342063 {
19352064 //if (group.selection.size() == 1)
19362065 // for (int i=0; i<group.selection.size(); i++)
....@@ -1941,7 +2070,7 @@
19412070 ResetModel();
19422071 refreshContents();
19432072 } else
1944
- if (event.getSource() == extractGeometriesItem)
2073
+ if (source == extractGeometriesItem)
19452074 {
19462075 boolean one = false;
19472076
....@@ -1968,7 +2097,7 @@
19682097 ResetModel();
19692098 refreshContents();
19702099 } else
1971
- if (event.getSource() == cloneGeometriesItem)
2100
+ if (source == cloneGeometriesItem)
19722101 {
19732102 boolean one = false;
19742103
....@@ -1994,32 +2123,37 @@
19942123 ResetModel();
19952124 refreshContents();
19962125 } else
1997
- if (event.getSource() == shareGeometriesItem)
2126
+ if (source == shareGeometriesItem)
19982127 {
19992128 boolean one = false;
20002129
20012130 if (group.selection.size() == 1)
20022131 one = true;
20032132
2133
+ Object3D merge = null;
2134
+
20042135 Object3D content = new cGroup();
20052136
20062137 for (int i=0; i<group.selection.size(); i++)
20072138 {
2008
- Object3D sel = new Merge(group.selection.get(i));
2139
+ merge = new Merge(group.selection.get(i));
20092140
20102141 if (one)
2011
- makeSomething(sel, false);
2142
+ makeSomething(merge, false);
20122143 else
2013
- content.addChild(sel);
2144
+ content.addChild(merge);
20142145 }
20152146
20162147 if (!one)
2017
- makeSomething(content, false);
2018
-
2019
- ResetModel();
2020
- refreshContents();
2148
+ makeSomething(content, true);
2149
+ else
2150
+ {
2151
+ ResetModel();
2152
+ Select(merge.GetTreePath(), true, false); // unselect... false);
2153
+ refreshContents();
2154
+ }
20212155 } else
2022
- if (event.getSource() == mergeGeometriesItem)
2156
+ if (source == mergeGeometriesItem)
20232157 {
20242158 boolean one = false;
20252159
....@@ -2049,7 +2183,7 @@
20492183 ResetModel();
20502184 refreshContents();
20512185 } else
2052
- if (event.getSource() == linkverticesItem)
2186
+ if (source == linkverticesItem)
20532187 {
20542188 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20552189 // {
....@@ -2062,39 +2196,48 @@
20622196 // group.selection.get(0).setMasterThis(content); // should be identity
20632197 // refreshContents();
20642198 // }
2065
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2199
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
20662200 {
2067
- Object3D content = GrafreeD.clipboard.get(0);
2201
+ Object3D content = Grafreed.clipboard.get(0);
20682202
20692203 if (content instanceof cGroup && ((cGroup)content).transientlink )
20702204 content = ((cGroup)content).get(0);
20712205
2072
- 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));
20732207 for (int i=0; i<group.selection.size(); i++)
20742208 {
2075
- boolean random = CameraPane.RANDOM;
2076
- CameraPane.RANDOM = false; // parse all random nodes
2209
+ boolean random = CameraPane.SWITCH;
2210
+ CameraPane.SWITCH = false; // parse all random nodes
20772211 group.selection.get(i).linkVerticesThis(content);
20782212 // group.selection.get(i).setMasterThis(content); // should be identity
2079
- CameraPane.RANDOM = random;
2213
+ CameraPane.SWITCH = random;
20802214 }
2081
- 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));
20822216 refreshContents();
20832217 }
20842218 } else
2085
- if (event.getSource() == resetsupportItem)
2219
+ if (source == resetsupportItem)
20862220 {
20872221 for (int i=0; i<group.selection.size(); i++)
20882222 {
2089
- boolean random = CameraPane.RANDOM;
2090
- CameraPane.RANDOM = false; // parse all random nodes
2223
+ boolean random = CameraPane.SWITCH;
2224
+ CameraPane.SWITCH = false; // parse all random nodes
20912225 group.selection.get(i).linkVerticesThis(null);
2092
- CameraPane.RANDOM = random;
2226
+ CameraPane.SWITCH = random;
20932227 }
20942228
20952229 refreshContents();
20962230 } else
2097
- 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)
20982241 {
20992242 for (int i=0; i<group.selection.size(); i++)
21002243 {
....@@ -2103,11 +2246,11 @@
21032246
21042247 refreshContents();
21052248 } else
2106
- if (event.getSource() == setMasterItem)
2249
+ if (source == setMasterItem)
21072250 {
2108
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2251
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21092252 {
2110
- Object3D content = GrafreeD.clipboard.get(0);
2253
+ Object3D content = Grafreed.clipboard.get(0);
21112254
21122255 if (content instanceof cGroup && ((cGroup)content).transientlink )
21132256 content = ((cGroup)content).get(0);
....@@ -2116,13 +2259,13 @@
21162259 refreshContents();
21172260 }
21182261 } else
2119
- if (event.getSource() == poseMeshItem)
2262
+ if (source == poseMeshItem)
21202263 {
21212264 if (group.selection.size() == 1)
21222265 {
2123
- if (GrafreeD.clipboard.size() == 1)
2266
+ if (Grafreed.clipboard.size() == 1)
21242267 {
2125
- Object3D content = GrafreeD.clipboard.get(0);
2268
+ Object3D content = Grafreed.clipboard.get(0);
21262269
21272270 if (content instanceof cGroup && ((cGroup)content).transientlink )
21282271 content = ((cGroup)content).get(0);
....@@ -2135,19 +2278,19 @@
21352278 }
21362279
21372280 } else
2138
- if (event.getSource() == revertMeshItem)
2281
+ if (source == revertMeshItem)
21392282 {
21402283 RevertMeshes();
21412284 } else
2142
- if (event.getSource() == resetMeshItem)
2285
+ if (source == resetAllItem)
21432286 {
21442287 ResetAll();
21452288 } else
2146
- if (event.getSource() == stepAllItem)
2289
+ if (source == stepAllItem)
21472290 {
21482291 StepAll();
21492292 } else
2150
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2293
+ if (source == clearItem) // || event.getSource() == clearButton)
21512294 {
21522295 //int indices[] = jList.getSelectedIndices();
21532296 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2155,42 +2298,46 @@
21552298
21562299 ClearSelection(false);
21572300 } else
2158
- if (event.getSource() == clearAllItem)
2301
+ if (source == clearAllItem)
21592302 {
21602303 ClearSelection(true);
21612304 } else
2162
- if (event.getSource() == grabItem)
2305
+ if (source == grabItem)
21632306 {
21642307 group(new cGroup(), true);
21652308 } else
2166
- if (event.getSource() == frontItem)
2309
+ if (source == hideItem)
2310
+ {
2311
+ group(new HiddenObject());
2312
+ } else
2313
+ if (source == frontItem)
21672314 {
21682315 front();
21692316 } else
2170
- if (event.getSource() == backItem)
2317
+ if (source == backItem)
21712318 {
21722319 back();
21732320 } else
2174
- if (event.getSource() == cameraItem)
2321
+ if (source == cameraItem)
21752322 {
21762323 makeSomething(new Camera());
21772324 } else
2178
- if (event.getSource() == compositeItem)
2325
+ if (source == compositeItem)
21792326 {
21802327 group(new Composite());
21812328 } else
2182
- if (event.getSource() == randomItem)
2329
+ if (source == randomItem)
21832330 {
21842331 RandomNode random = new RandomNode();
21852332 group(random);
21862333 if (random.size() > 0)
2187
- random.name = random.get(0).name + "Rnd";
2334
+ random.name = random.get(0).name + "Switch";
21882335 } else
2189
- if (event.getSource() == physicsItem)
2336
+ if (source == physicsItem)
21902337 {
21912338 group(new PhysicsNode());
21922339 } else
2193
- if (event.getSource() == frameselectorItem)
2340
+ if (source == frameselectorItem)
21942341 {
21952342 for (int i=0; i<group.selection.size(); i++)
21962343 {
....@@ -2202,7 +2349,7 @@
22022349 ResetModel();
22032350 refreshContents();
22042351 } else
2205
- if (event.getSource() == switchGeoItem)
2352
+ if (source == switchGeoItem)
22062353 {
22072354 for (int i=0; i<group.selection.size(); i++)
22082355 {
....@@ -2214,7 +2361,7 @@
22142361 ResetModel();
22152362 refreshContents();
22162363 } else
2217
- if (event.getSource() == switchTransfoItem)
2364
+ if (source == switchTransfoItem)
22182365 {
22192366 for (int i=0; i<group.selection.size(); i++)
22202367 {
....@@ -2226,7 +2373,7 @@
22262373 ResetModel();
22272374 refreshContents();
22282375 } else
2229
- if (event.getSource() == morphItem)
2376
+ if (source == morphItem)
22302377 {
22312378 for (int i=0; i<group.selection.size(); i++)
22322379 {
....@@ -2238,7 +2385,7 @@
22382385 ResetModel();
22392386 refreshContents();
22402387 } else
2241
- if (event.getSource() == scriptNodeItem)
2388
+ if (source == scriptNodeItem)
22422389 {
22432390 boolean atleastone = false;
22442391
....@@ -2277,195 +2424,223 @@
22772424 }
22782425 }
22792426 } else
2280
- if (event.getSource() == linkerItem)
2427
+ if (source == linkerItem)
22812428 {
22822429 group(new cLinker());
22832430 } else
2284
- if (event.getSource() == textureItem)
2431
+ if (source == textureItem)
22852432 {
22862433 group(new TextureNode());
22872434 } else
2288
- if (event.getSource() == shadowXItem)
2435
+ if (source == billboardItem)
2436
+ {
2437
+ group(new BillboardNode());
2438
+ } else
2439
+ if (source == shadowXItem)
22892440 {
22902441 CastShadow(0);
22912442 } else
2292
- if (event.getSource() == shadowYItem)
2443
+ if (source == shadowYItem)
22932444 {
22942445 CastShadow(1);
22952446 } else
2296
- if (event.getSource() == shadowZItem)
2447
+ if (source == shadowZItem)
22972448 {
22982449 CastShadow(2);
22992450 } else
2300
- if (event.getSource() == ungroupItem)
2451
+ if (source == ungroupItem)
23012452 {
2302
- 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();
23032462 } else
2304
- if (event.getSource() == genUVItem)
2463
+ if (source == genUVItem)
23052464 {
23062465 GenUV();
23072466 } else
2308
- if (event.getSource() == genNormalsCADItem)
2467
+ if (source == genNormalsCADItem)
23092468 {
23102469 GenNormals(true);
23112470 } else
2312
- if (event.getSource() == genNormalsORGANItem)
2471
+ if (source == genNormalsMESHItem)
2472
+ {
2473
+ GenNormals(true); // TODO
2474
+ } else
2475
+ if (source == genNormalsORGANItem)
23132476 {
23142477 GenNormals(false);
23152478 } else
2316
- if (event.getSource() == stripifyItem)
2479
+ if (source == genNormalsMINEItem)
2480
+ {
2481
+ GenNormalsMINE();
2482
+ } else
2483
+ if (source == stripifyItem)
23172484 {
23182485 Stripify();
23192486 } else
2320
- if (event.getSource() == unstripifyItem)
2487
+ if (source == unstripifyItem)
23212488 {
23222489 Unstripify();
23232490 } else
2324
- if (event.getSource() == trimItem)
2491
+ if (source == trimItem)
23252492 {
23262493 Trim();
23272494 } else
2328
- if (event.getSource() == untrimItem)
2495
+ if (source == untrimItem)
23292496 {
23302497 Untrim();
23312498 } else
2332
- if (event.getSource() == clearColorsItem)
2499
+ if (source == clearColorsItem)
23332500 {
23342501 ClearColors();
23352502 } else
2336
- if (event.getSource() == clearMaterialsItem)
2503
+ if (source == clearMaterialsItem)
23372504 {
23382505 ClearMaterials();
23392506 } else
2340
- if (event.getSource() == liveleavesItem)
2507
+ if (source == liveleavesItem)
23412508 {
23422509 LiveLeaves(true);
23432510 } else
2344
- if (event.getSource() == unliveleavesItem)
2511
+ if (source == unliveleavesItem)
23452512 {
23462513 LiveLeaves(false);
23472514 } else
2348
- if (event.getSource() == supportleavesItem)
2515
+ if (source == supportleavesItem)
23492516 {
23502517 SupportLeaves(true);
23512518 } else
2352
- if (event.getSource() == unsupportleavesItem)
2519
+ if (source == unsupportleavesItem)
23532520 {
23542521 SupportLeaves(false);
23552522 } else
2356
- if (event.getSource() == hideleavesItem)
2523
+ if (source == hideleavesItem)
23572524 {
23582525 HideLeaves(true);
23592526 } else
2360
- if (event.getSource() == showleavesItem)
2527
+ if (source == showleavesItem)
23612528 {
23622529 HideLeaves(false);
23632530 } else
2364
- if (event.getSource() == markleavesItem)
2531
+ if (source == markleavesItem)
23652532 {
23662533 MarkLeaves(true);
23672534 } else
2368
- if (event.getSource() == unmarkleavesItem)
2535
+ if (source == unmarkleavesItem)
23692536 {
23702537 MarkLeaves(false);
23712538 } else
2372
- if (event.getSource() == flipVItem)
2539
+ if (source == flipVItem)
23732540 {
23742541 FlipV(true);
23752542 } else
2376
- if (event.getSource() == unflipVItem)
2543
+ if (source == unflipVItem)
23772544 {
23782545 FlipV(false);
23792546 } else
2380
- if (event.getSource() == lowTexturesItem)
2547
+ if (source == lowTexturesItem)
23812548 {
23822549 SetTexRes(0);
23832550 } else
2384
- if (event.getSource() == normalTexturesItem)
2551
+ if (source == normalTexturesItem)
23852552 {
23862553 SetTexRes(1);
23872554 } else
2388
- if (event.getSource() == highTexturesItem)
2555
+ if (source == highTexturesItem)
23892556 {
23902557 SetTexRes(2);
23912558 } else
2392
- if (event.getSource() == veryhighTexturesItem)
2559
+ if (source == veryhighTexturesItem)
23932560 {
23942561 SetTexRes(3);
23952562 } else
2396
- if (event.getSource() == maxTexturesItem)
2563
+ if (source == maxTexturesItem)
23972564 {
23982565 SetTexRes(4);
23992566 } else
2400
- if (event.getSource() == panoTexturesItem)
2567
+ if (source == panoTexturesItem)
24012568 {
24022569 SetTexRes(5);
24032570 } else
2404
- if (event.getSource() == reverseNormalsItem)
2571
+ if (source == reverseNormalsItem)
24052572 {
24062573 ReverseNormals();
24072574 } else
2408
- if (event.getSource() == parseverticesItem)
2575
+ if (source == parseverticesItem)
24092576 {
24102577 ParseVertices();
24112578 } else
2412
- if (event.getSource() == textureFieldItem)
2579
+ if (source == textureFieldItem)
24132580 {
24142581 TextureVertices();
24152582 } else
2416
- if (event.getSource() == alignItem)
2583
+ if (source == alignItem)
24172584 {
24182585 Align();
24192586 } else
2420
- if (event.getSource() == mirrorItem)
2587
+ if (source == mirrorItem)
24212588 {
24222589 MirrorPoses();
24232590 } else
2424
- if (event.getSource() == reduceMorphItem)
2591
+ if (source == reduceMorphItem)
24252592 {
24262593 MeshReduction(false);
24272594 } else
2428
- if (event.getSource() == reduce34MorphItem)
2595
+ if (source == reduce34MorphItem)
24292596 {
24302597 MeshReduction(true);
24312598 } else
2432
- if (event.getSource() == reverseTrianglesItem)
2599
+ if (source == reverseTrianglesItem)
24332600 {
24342601 ReverseTriangles();
24352602 } else
2436
- if (event.getSource() == reduceMeshItem)
2603
+ if (source == reduceMeshItem)
24372604 {
24382605 ReduceMesh(false);
24392606 } else
2440
- if (event.getSource() == reduce34MeshItem)
2607
+ if (source == reduce34MeshItem)
24412608 {
24422609 ReduceMesh(true);
24432610 } else
2444
- if (event.getSource() == increaseMeshItem)
2611
+ if (source == increaseMeshItem)
24452612 {
24462613 IncreaseMesh();
24472614 } else
2448
- if (event.getSource() == clipMeshItem)
2615
+ if (source == clipMeshItem)
24492616 {
24502617 ClipMesh();
24512618 } else
2452
- if (event.getSource() == smoothMeshItem)
2619
+ if (source == smoothMeshItem)
24532620 {
24542621 SmoothMesh();
24552622 } else
2456
- if (event.getSource() == transformgeometryItem)
2623
+ if (source == transformGeometryItem)
24572624 {
24582625 TransformGeometry();
24592626 } else
2460
- if (event.getSource() == resetTransformItem)
2627
+ if (source == transformChildrenItem)
2628
+ {
2629
+ TransformChildren();
2630
+ } else
2631
+ if (source == resetTransformItem)
24612632 {
24622633 ResetTransform();
24632634 } else
2464
- if (event.getSource() == resetCentroidItem)
2635
+ if (source == resetCentroidItem)
24652636 {
2466
- ResetCentroid();
2637
+ ResetCentroid(true);
24672638 } else
2468
- if (event.getSource() == resetParentItem)
2639
+ if (source == resetCentroidXZItem)
2640
+ {
2641
+ ResetCentroid(false);
2642
+ } else
2643
+ if (source == resetParentItem)
24692644 {
24702645 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24712646 {
....@@ -2475,7 +2650,7 @@
24752650
24762651 refreshContents();
24772652 } else
2478
- if (event.getSource() == repairParentItem)
2653
+ if (source == repairParentItem)
24792654 {
24802655 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24812656 {
....@@ -2489,7 +2664,21 @@
24892664
24902665 refreshContents();
24912666 } else
2492
- 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)
24932682 {
24942683 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24952684 {
....@@ -2501,7 +2690,7 @@
25012690 ResetModel();
25022691 refreshContents();
25032692 } else
2504
- if (event.getSource() == sortbynameItem)
2693
+ if (source == sortbynameItem)
25052694 {
25062695 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25072696 {
....@@ -2513,7 +2702,7 @@
25132702 ResetModel();
25142703 refreshContents();
25152704 } else
2516
- if (event.getSource() == attachPigmentItem)
2705
+ if (source == attachPigmentItem)
25172706 {
25182707 String texture = GetFile("Attach pigment");
25192708 Object3D obj;
....@@ -2525,7 +2714,7 @@
25252714
25262715 refreshContents();
25272716 } else
2528
- if (event.getSource() == detachPigmentItem)
2717
+ if (source == detachPigmentItem)
25292718 {
25302719 Object3D obj;
25312720 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2536,7 +2725,7 @@
25362725
25372726 refreshContents();
25382727 } else
2539
- if (event.getSource() == attachBumpItem)
2728
+ if (source == attachBumpItem)
25402729 {
25412730 String texture = GetFile("Attach bump");
25422731 Object3D obj;
....@@ -2548,7 +2737,7 @@
25482737
25492738 refreshContents();
25502739 } else
2551
- if (event.getSource() == detachBumpItem)
2740
+ if (source == detachBumpItem)
25522741 {
25532742 Object3D obj;
25542743 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2559,7 +2748,7 @@
25592748
25602749 refreshContents();
25612750 } else
2562
- if (event.getSource() == pigmentBumpItem)
2751
+ if (source == pigmentBumpItem)
25632752 {
25642753 Object3D obj;
25652754 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2570,158 +2759,195 @@
25702759
25712760 refreshContents();
25722761 } else
2573
- if (event.getSource() == flashSelectionButton)
2762
+ if (source == flashSelectionButton)
25742763 {
25752764 CameraPane.flash = true;
25762765 refreshContents();
25772766 } else
2578
- if (event.getSource() == oneButton)
2767
+ if (source == oneButton)
25792768 {
25802769 } else
2581
- if (event.getSource() == twoButton)
2770
+ if (source == twoButton)
25822771 {
25832772 radio.layout = twoButton;
25842773 // bug
25852774 //gridPanel.setDividerLocation(1.0);
25862775 //bigPanel.setDividerLocation(0.0);
2587
- bigThree.remove(jtp);
2588
- bigThree.remove(cameraPanel);
2589
- bigThree.remove(XYZPanel);
2590
- aWindowConstraints.gridx = 0;
2591
- aWindowConstraints.gridy = 0;
2592
- aWindowConstraints.gridwidth = 1;
2593
- // aConstraints.gridheight = 3;
2594
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2595
- aWindowConstraints.weightx = 0;
2596
- aWindowConstraints.weighty = 1;
2597
- //bigThree.add(jtp, aWindowConstraints);
2598
- aWindowConstraints.weightx = 1;
2599
- aWindowConstraints.gridwidth = 3;
2600
- // aConstraints.gridheight = 3;
2601
- aWindowConstraints.gridx = 1;
2602
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2603
- bigThree.add(cameraPanel, aWindowConstraints);
2604
- aWindowConstraints.weightx = 0;
2605
- aWindowConstraints.gridx = 4;
2606
- aWindowConstraints.gridwidth = 1;
2607
- // aConstraints.gridheight = 3;
2608
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2609
- //bigThree.add(XYZPanel, aWindowConstraints);
2610
- bigThree.revalidate();
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();
26112805 } else
2612
- if (event.getSource() == threeButton)
2806
+ if (source == threeButton)
26132807 {
26142808 radio.layout = threeButton;
2615
- bigThree.remove(jtp);
2616
- bigThree.remove(cameraPanel);
2617
- bigThree.remove(XYZPanel);
2618
- aWindowConstraints.gridx = 0;
2619
- aWindowConstraints.gridy = 0;
2620
- aWindowConstraints.gridwidth = 1;
2621
- // aConstraints.gridheight = 3;
2622
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2623
- aWindowConstraints.weightx = 0;
2624
- aWindowConstraints.weighty = 1;
2625
- //bigThree.add(jtp, aWindowConstraints);
2626
- aWindowConstraints.weightx = 1;
2627
- aWindowConstraints.gridwidth = 3;
2628
- // aConstraints.gridheight = 3;
2629
- aWindowConstraints.gridx = 1;
2630
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2631
- bigThree.add(cameraPanel, aWindowConstraints);
2632
- aWindowConstraints.weightx = 0;
2633
- aWindowConstraints.gridx = 4;
2634
- aWindowConstraints.gridwidth = 1;
2635
- // aConstraints.gridheight = 3;
2636
- aConstraints.fill = GridBagConstraints.VERTICAL;
2637
- bigThree.add(XYZPanel, aWindowConstraints);
2638
- bigThree.revalidate();
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();
26392841 } else
2640
- if (event.getSource() == fourButton)
2842
+ if (source == fourButton)
26412843 {
26422844 radio.layout = fourButton;
2643
- bigThree.remove(jtp);
2644
- bigThree.remove(cameraPanel);
2645
- bigThree.remove(XYZPanel);
2646
- aWindowConstraints.gridx = 0;
2647
- aWindowConstraints.gridy = 0;
2648
- aWindowConstraints.gridwidth = 1;
2649
- // aWindowConstraints.gridheight = 3;
2650
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2651
- aWindowConstraints.weightx = 1;
2652
- aWindowConstraints.weighty = 1;
2653
- bigThree.add(jtp, aWindowConstraints);
2654
- aWindowConstraints.weightx = 1;
2655
- aWindowConstraints.gridwidth = 3;
2656
- // aConstraints.gridheight = 3;
2657
- aWindowConstraints.gridx = 1;
2658
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2659
- //bigThree.add(cameraPanel, aWindowConstraints);
2660
- aWindowConstraints.weightx = 0;
2661
- aWindowConstraints.gridx = 4;
2662
- aWindowConstraints.gridwidth = 1;
2663
- // aWindowConstraints.gridheight = 3;
2664
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2665
- //bigThree.add(XYZPanel, aWindowConstraints);
2666
- bigThree.revalidate();
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();
26672876 } else
2668
- if (event.getSource() == sixButton)
2877
+ if (source == sixButton)
26692878 {
26702879 radio.layout = sixButton;
2671
- bigThree.remove(jtp);
2672
- bigThree.remove(cameraPanel);
2673
- bigThree.remove(XYZPanel);
2674
- aWindowConstraints.gridx = 0;
2675
- aWindowConstraints.gridy = 0;
2676
- aWindowConstraints.gridwidth = 1;
2677
- // aConstraints.gridheight = 3;
2678
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2679
- aWindowConstraints.weightx = 0;
2680
- aWindowConstraints.weighty = 1;
2681
- bigThree.add(jtp, aWindowConstraints);
2682
- aWindowConstraints.weightx = 1;
2683
- aWindowConstraints.gridwidth = 3;
2684
- // aWindowConstraints.gridheight = 3;
2685
- aWindowConstraints.gridx = 1;
2686
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2687
- bigThree.add(cameraPanel, aWindowConstraints);
2688
- aWindowConstraints.weightx = 0;
2689
- aWindowConstraints.gridx = 4;
2690
- aWindowConstraints.gridwidth = 1;
2691
- // aWindowConstraints.gridheight = 3;
2692
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2693
- //bigThree.add(XYZPanel, aConstraints);
2694
- bigThree.revalidate();
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();
26952912 } else
2696
- if (event.getSource() == sevenButton)
2913
+ if (source == sevenButton)
26972914 {
26982915 radio.layout = sevenButton;
2699
- bigThree.remove(jtp);
2700
- bigThree.remove(cameraPanel);
2701
- bigThree.remove(XYZPanel);
2702
- aWindowConstraints.gridx = 0;
2703
- aWindowConstraints.gridy = 0;
2704
- aWindowConstraints.gridwidth = 1;
2705
- // aWindowConstraints.gridheight = 3;
2706
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2707
- aWindowConstraints.weightx = 0;
2708
- aWindowConstraints.weighty = 1;
2709
- bigThree.add(jtp, aWindowConstraints);
2710
- aWindowConstraints.weightx = 1;
2711
- aWindowConstraints.gridwidth = 3;
2712
- // aWindowConstraints.gridheight = 3;
2713
- aWindowConstraints.gridx = 1;
2714
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2715
- bigThree.add(cameraPanel, aWindowConstraints);
2716
- aWindowConstraints.weightx = 0;
2717
- aWindowConstraints.gridx = 4;
2718
- aWindowConstraints.gridwidth = 1;
2719
- // aConstraints.gridheight = 3;
2720
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2721
- bigThree.add(XYZPanel, aWindowConstraints);
2722
- bigThree.revalidate();
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();
27232949 } else
2724
- if (event.getSource() == rootButton)
2950
+ if (source == rootButton)
27252951 {
27262952 Object3D obj;
27272953 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2733,7 +2959,7 @@
27332959
27342960 refreshContents(true);
27352961 } else
2736
- if (event.getSource() == closeButton)
2962
+ if (source == closeButton)
27372963 {
27382964 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27392965 cRadio ab;
....@@ -2754,11 +2980,11 @@
27542980 }
27552981 refreshContents(true);
27562982 } else
2757
- if (event.getSource() == editItem || event.getSource() == editButton)
2983
+ if (source == editItem || source == editButton)
27582984 {
27592985 EditSelection(false);
27602986 } else
2761
- if (event.getSource() == uneditButton)
2987
+ if (source == uneditButton)
27622988 {
27632989 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
27642990 {
....@@ -2770,12 +2996,12 @@
27702996
27712997 child.editWindow = null; // ???????????
27722998 }
2773
- objEditor.ctrlPanel.revalidate();
2999
+ objEditor.ctrlPanel.FlushUI();
27743000 //objEditor.jTree.clearSelection();
27753001 //objEditor.ResetSliders();
27763002 refreshContents(true);
27773003 } else
2778
- if (event.getSource() == clearPanelButton)
3004
+ if (source == clearPanelButton)
27793005 {
27803006 assert(copy == group);
27813007 //copy.ClearUI();
....@@ -2786,7 +3012,7 @@
27863012 listUI.clear();
27873013 refreshContents(true);
27883014 } else
2789
- if (event.getSource() == allParamsButton)
3015
+ if (source == allParamsButton)
27903016 {
27913017 assert(copy == group);
27923018
....@@ -2807,19 +3033,19 @@
28073033
28083034 refreshContents(true);
28093035 } else
2810
- if (event.getSource() == unselectButton)
3036
+ if (source == unselectButton)
28113037 {
28123038 objEditor.jTree.clearSelection();
28133039 // ?? oct 2012 GrafreeD.clipboard.clear();
28143040 objEditor.ResetSliders();
28153041 refreshContents(true);
28163042 } else
2817
- if(event.getSource() instanceof cRadio)
3043
+ if(source instanceof cRadio)
28183044 {
28193045 group.parent = keepparent;
28203046 group.attributes = 0;
28213047 //group.editWindow = null;
2822
- /*cRadio*/ radio = (cRadio)event.getSource();
3048
+ /*cRadio*/ radio = (cRadio)source;
28233049 Object3D obj = radio.GetObject();
28243050 System.out.println("Edit " + obj);
28253051 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2839,7 +3065,7 @@
28393065 }
28403066
28413067 copy = group;
2842
- //CameraPane.theRenderer.object = group;
3068
+ //Globals.theRenderer.object = group;
28433069 if(!useclient)
28443070 {
28453071 cameraView.renderCamera = radio.camera;
....@@ -2848,12 +3074,15 @@
28483074 cameraView.cameras[cameraView.cameracount] = radio.camera;
28493075 cameraView.targetLookAt.set(radio.camera.lookAt);
28503076 cameraView.object = group;
2851
- cameraView.lighttouched = true;
3077
+ //cameraView.lighttouched = true;
3078
+ Globals.lighttouched = true;
28523079 topView.object = group;
28533080 frontView.object = group;
28543081 sideView.object = group;
28553082 }
2856
- group.editWindow = this;
3083
+
3084
+// fix "+" issue group.editWindow = this;
3085
+
28573086 /*
28583087 currentLayout = radio.layout;
28593088 if (currentLayout == null)
....@@ -2884,7 +3113,7 @@
28843113 if (useclient)
28853114 {
28863115 cameraView.object = client;
2887
- cameraView.lighttouched = true;
3116
+ Globals.lighttouched = true;
28883117 //topView.object = client;
28893118 //frontView.object = client;
28903119 //sideView.object = client;
....@@ -2892,7 +3121,7 @@
28923121 else
28933122 {
28943123 cameraView.object = group;
2895
- cameraView.lighttouched = true;
3124
+ Globals.lighttouched = true;
28963125 //topView.object = group;
28973126 //frontView.object = group;
28983127 //sideView.object = group;
....@@ -2927,6 +3156,28 @@
29273156 refreshContents();
29283157 }
29293158
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
+ }
29303181
29313182 void ResetTransform()
29323183 {
....@@ -3039,7 +3290,7 @@
30393290 refreshContents();
30403291 }
30413292
3042
- void ResetCentroid()
3293
+ void ResetCentroid(boolean full)
30433294 {
30443295 Object3D obj;
30453296 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3054,12 +3305,16 @@
30543305 LA.matIdentity(Object3D.mat);
30553306 obj.getBounds(minima, maxima, false);
30563307 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3057
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3308
+ if (full)
3309
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
30583310 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
30593311 obj.TransformMesh(Object3D.mat);
3312
+
30603313 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3061
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3314
+ if (full)
3315
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
30623316 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3317
+
30633318 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
30643319 //Object3D.mat[3][0] = -Object3D.mat[3][0];
30653320 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3125,9 +3380,9 @@
31253380 obj = (Object3D)e.nextElement();
31263381
31273382 System.out.println("Object is: " + obj);
3128
- GrafreeD.AnalyzeObject(obj);
3383
+ Grafreed.AnalyzeObject(obj);
31293384 System.out.println("Boundary rep: " + obj.bRep);
3130
- GrafreeD.AnalyzeObject(obj.bRep);
3385
+ Grafreed.AnalyzeObject(obj.bRep);
31313386
31323387 // System.err.println((size/1024) + " KB is the size of " + obj);
31333388 }
....@@ -3169,6 +3424,13 @@
31693424 void GenNormals(boolean crease)
31703425 {
31713426 group.GenNormalsS(crease);
3427
+
3428
+ refreshContents();
3429
+ }
3430
+
3431
+ void GenNormalsMINE()
3432
+ {
3433
+ group.selection.GenNormalsMINE();
31723434
31733435 refreshContents();
31743436 }
....@@ -3334,8 +3596,8 @@
33343596
33353597 void ParseVertices()
33363598 {
3337
- boolean epsequal = GrafreeD.epsequal;
3338
- GrafreeD.epsequal = true;
3599
+ boolean epsequal = Grafreed.epsequal;
3600
+ Grafreed.epsequal = true;
33393601
33403602 for (int i=0; i<group.selection.size(); i++)
33413603 {
....@@ -3360,7 +3622,7 @@
33603622 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33613623 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33623624
3363
- g.add(GrafreeD.clipboard);
3625
+ g.add(Grafreed.clipboard);
33643626
33653627 buffer.add(g);
33663628 }
....@@ -3375,7 +3637,7 @@
33753637 makeSomething(buffer, i==group.selection.size()-1);
33763638 }
33773639
3378
- GrafreeD.epsequal = epsequal;
3640
+ Grafreed.epsequal = epsequal;
33793641
33803642 refreshContents();
33813643 }
....@@ -3393,7 +3655,16 @@
33933655 String pigment = Object3D.GetPigment(tex);
33943656 //String bump = Object3D.GetBump(tex);
33953657
3396
- 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
+ }
33973668
33983669 double s = v.s;
33993670
....@@ -3441,12 +3712,26 @@
34413712
34423713 void Align()
34433714 {
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
+
34443729 for (int i=0; i<group.selection.size(); i++)
34453730 {
34463731 Object3D obj = group.selection.get(i);
34473732
3448
- LA.matTranslate(obj.toParent, i/2f, 0, 0);
3449
- 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);
34503735 }
34513736
34523737 refreshContents();
....@@ -3467,11 +3752,11 @@
34673752
34683753 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
34693754
3470
- boolean random = CameraPane.RANDOM;
3471
- CameraPane.RANDOM = false; // parse all random nodes
3755
+ boolean random = CameraPane.SWITCH;
3756
+ CameraPane.SWITCH = false; // parse all random nodes
34723757 lowres.linkVerticesThis(null);
34733758 lowres.linkVerticesThis(sn);
3474
- CameraPane.RANDOM = random;
3759
+ CameraPane.SWITCH = random;
34753760
34763761 System.err.flush();
34773762
....@@ -3511,7 +3796,7 @@
35113796 return;
35123797
35133798 Object3D poses = group.selection.get(0);
3514
- Object3D ref = GrafreeD.clipboard.get(0);
3799
+ Object3D ref = Grafreed.clipboard.get(0);
35153800
35163801 Object3D newgroup = new Object3D("Po:" + poses.name);
35173802
....@@ -3680,7 +3965,7 @@
36803965 group.selection.RelinkToSupport(); // july 2014
36813966 System.out.println("DONE.");
36823967 refreshContents();
3683
- 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));
36843969 }
36853970
36863971 void ReduceMesh(boolean reduction34)
....@@ -3705,9 +3990,9 @@
37053990
37063991 void ClipMesh()
37073992 {
3708
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
3993
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
37093994 {
3710
- Object3D content = GrafreeD.clipboard.get(0);
3995
+ Object3D content = Grafreed.clipboard.get(0);
37113996
37123997 if (content instanceof cGroup && ((cGroup)content).transientlink )
37133998 content = ((cGroup)content).get(0);
....@@ -3716,7 +4001,7 @@
37164001 // {
37174002 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
37184003 // }
3719
- group.selection.ClipMesh(GrafreeD.clipboard);
4004
+ group.selection.ClipMesh(Grafreed.clipboard);
37204005 }
37214006 // group.selection.ClipMesh(GrafreeD.clipboard);
37224007 System.out.println("DONE.");
....@@ -3851,7 +4136,7 @@
38514136 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
38524137
38534138 Object3D elem = (Object3D)group.selection.elementAt(i);
3854
- if(elem != group)
4139
+ if(elem != group || !newWindow)
38554140 {
38564141 // if (!(elem instanceof Composite))
38574142 // newWindow = false;
....@@ -3956,25 +4241,25 @@
39564241 System.err.println("info : " + child.GetPath());
39574242 }
39584243 }
3959
- else
3960
- {
3961
- objEditor.SetMaterial(group); // .GetMaterial());
3962
- objEditor.AddInfo(group, this, true); // .GetMaterial());
3963
- System.err.println("info : " + group.GetPath());
3964
- }
4244
+// else
4245
+// {
4246
+// objEditor.SetMaterial(group); // .GetMaterial());
4247
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4248
+// System.err.println("info : " + group.GetPath());
4249
+// }
39654250
39664251 objEditor.SetText(); // jan 2014
39674252
3968
- 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))
39694254 CameraPane.flash = true;
39704255
39714256 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
39724257 // a camera
39734258 {
39744259 CameraPane.camerachangeframe = 0; // don't refuse it
3975
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
3976
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
3977
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4260
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4261
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4262
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
39784263 }
39794264
39804265 refreshContents();
....@@ -4056,12 +4341,12 @@
40564341 {
40574342 if (group.selection.isEmpty())
40584343 return;
4059
- GrafreeD.clipboardIsTempGroup = false;
4344
+ Grafreed.clipboardIsTempGroup = false;
40604345 Composite tGroup = null;
40614346 if (group.selection.size() > 0) // 1)
40624347 {
40634348 tGroup = new cGroup();
4064
- GrafreeD.clipboardIsTempGroup = true;
4349
+ Grafreed.clipboardIsTempGroup = true;
40654350 }
40664351
40674352 if (cut)
....@@ -4101,16 +4386,16 @@
41014386 //System.out.println("cut " + child);
41024387 //System.out.println("parent = " + child.parent);
41034388 // tmp.addChild(child);
4104
- if (GrafreeD.clipboardIsTempGroup)
4389
+ if (Grafreed.clipboardIsTempGroup)
41054390 tGroup.add/*Child*/(tmp);
41064391 else
4107
- GrafreeD.clipboard = tmp;
4392
+ Grafreed.clipboard = tmp;
41084393 }
41094394 else
4110
- if (GrafreeD.clipboardIsTempGroup)
4395
+ if (Grafreed.clipboardIsTempGroup)
41114396 tGroup.add/*Child*/(child);
41124397 else
4113
- GrafreeD.clipboard = child;
4398
+ Grafreed.clipboard = child;
41144399 }
41154400
41164401 //ResetModel();
....@@ -4142,21 +4427,21 @@
41424427 //System.out.println("cut " + elem);
41434428 //System.out.println("parent = " + elem.parent);
41444429 // tmp.addChild(elem);
4145
- if (GrafreeD.clipboardIsTempGroup)
4430
+ if (Grafreed.clipboardIsTempGroup)
41464431 tGroup.add/*Child*/(tmp);
41474432 else
4148
- GrafreeD.clipboard = tmp;
4433
+ Grafreed.clipboard = tmp;
41494434 }
41504435 else
4151
- if (GrafreeD.clipboardIsTempGroup)
4436
+ if (Grafreed.clipboardIsTempGroup)
41524437 tGroup.add/*Child*/(child);
41534438 else
4154
- GrafreeD.clipboard = child;
4439
+ Grafreed.clipboard = child;
41554440 }
41564441
41574442 }
4158
- if (GrafreeD.clipboardIsTempGroup)
4159
- GrafreeD.clipboard = tGroup;
4443
+ if (Grafreed.clipboardIsTempGroup)
4444
+ Grafreed.clipboard = tGroup;
41604445 if (cut)
41614446 {
41624447 ResetModel();
....@@ -4170,7 +4455,7 @@
41704455 // return;
41714456 boolean first = true;
41724457
4173
- if (GrafreeD.clipboardIsTempGroup)
4458
+ if (Grafreed.clipboardIsTempGroup)
41744459 {
41754460 Composite temp;
41764461
....@@ -4181,7 +4466,7 @@
41814466 temp = (Composite)Applet3D.clipboard.deepCopy();
41824467 */
41834468 Object3D elem;
4184
- 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))
41854470 {
41864471 Object3D child = (Object3D)e.nextElement();
41874472
....@@ -4215,21 +4500,21 @@
42154500 //Object3D cb = Applet3D.clipboard;
42164501 //temp.addChild(cb);
42174502 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4218
- assert(GrafreeD.clipboard.parent == null);
4219
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4220
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4221
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4222
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
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());
42234508 else
4224
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4225
- GrafreeD.clipboard.get(0).parent = keepparent;
4509
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4510
+ Grafreed.clipboard.get(0).parent = keepparent;
42264511 }
42274512
42284513 ResetModel();
42294514 refreshContents();
42304515 }
42314516
4232
- void pasteInto(boolean copyit)
4517
+ void pasteInto(boolean copyit, boolean clone)
42334518 {
42344519 // if (GrafreeD.clipboard == null)
42354520 // return;
....@@ -4258,15 +4543,22 @@
42584543 if (copyit)
42594544 {
42604545 // paste(false);
4261
- CloneClipboard(false); // sept 2014
4546
+ if (clone)
4547
+ {
4548
+ CloneClipboard(false); // sept 2014
4549
+ }
4550
+ else
4551
+ {
4552
+ paste(false);
4553
+ }
42624554 }
42634555 else
42644556 {
42654557 boolean first = true;
42664558
4267
- if (GrafreeD.clipboardIsTempGroup)
4559
+ if (Grafreed.clipboardIsTempGroup)
42684560 {
4269
- Composite temp = (Composite)GrafreeD.clipboard;
4561
+ Composite temp = (Composite)Grafreed.clipboard;
42704562 Object3D copy;
42714563 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
42724564 {
....@@ -4276,7 +4568,7 @@
42764568 }
42774569 } else
42784570 {
4279
- linkSomething(GrafreeD.clipboard); //.get(0));
4571
+ linkSomething(Grafreed.clipboard); //.get(0));
42804572 }
42814573 }
42824574 }
....@@ -4468,6 +4760,26 @@
44684760 makeSomething(csg);
44694761 }
44704762
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
+
44714783 void ungroup()
44724784 {
44734785 /*
....@@ -4701,7 +5013,7 @@
47015013
47025014 void ImportVRMLX3D()
47035015 {
4704
- if (GrafreeD.standAlone)
5016
+ if (Grafreed.standAlone)
47055017 {
47065018 /**/
47075019 FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
....@@ -4718,7 +5030,7 @@
47185030
47195031 String GetFile(String dialogName)
47205032 {
4721
- if (GrafreeD.standAlone)
5033
+ if (Grafreed.standAlone)
47225034 {
47235035 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
47245036 browser.show();
....@@ -4782,10 +5094,12 @@
47825094 cButton flashSelectionButton;
47835095 cButton editButton;
47845096 cButton uneditButton;
5097
+ JCheckBox allParamsButton;
47855098 cButton clearpanelButton;
4786
- cButton allParamsButton;
47875099 cButton unselectButton;
47885100
5101
+ cButton oneStepButton;
5102
+
47895103 cButton screenfitButton;
47905104 cButton screenfitpointButton;
47915105 cButton snapobjectButton;
....@@ -4827,8 +5141,9 @@
48275141 private MenuItem resetsupportItem;
48285142 private MenuItem resetreferencesItem;
48295143 private MenuItem linkverticesItem;
5144
+ private MenuItem relinkverticesItem;
48305145 private MenuItem setMasterItem;
4831
- private MenuItem resetMeshItem;
5146
+ private MenuItem resetAllItem;
48325147 private MenuItem stepAllItem;
48335148 private MenuItem revertMeshItem;
48345149 private MenuItem poseMeshItem;
....@@ -4839,14 +5154,17 @@
48395154 private MenuItem mergeGeometriesItem;
48405155 private MenuItem copyItem;
48415156 private MenuItem pasteItem;
5157
+ private MenuItem pasteIntoItem;
48425158 private MenuItem pasteLinkItem;
48435159 private MenuItem pasteCloneItem;
48445160 private MenuItem pasteExpandItem;
48455161 private MenuItem clearItem;
48465162 private MenuItem clearAllItem;
48475163 private MenuItem genUVItem;
5164
+ private MenuItem genNormalsMESHItem;
48485165 private MenuItem genNormalsCADItem;
48495166 private MenuItem genNormalsORGANItem;
5167
+ private MenuItem genNormalsMINEItem;
48505168 private MenuItem stripifyItem;
48515169 private MenuItem unstripifyItem;
48525170 private MenuItem trimItem;
....@@ -4886,8 +5204,11 @@
48865204 private MenuItem panoTexturesItem;
48875205
48885206 private MenuItem resetCentroidItem;
4889
- private MenuItem transformgeometryItem;
5207
+ private MenuItem resetCentroidXZItem;
48905208 private MenuItem resetTransformItem;
5209
+ private MenuItem transformGeometryItem;
5210
+ private MenuItem transformChildrenItem;
5211
+ private MenuItem hideItem;
48915212 private MenuItem grabItem;
48925213 private MenuItem backItem;
48935214 private MenuItem frontItem;
....@@ -4908,6 +5229,7 @@
49085229
49095230 private MenuItem resetParentItem;
49105231 private MenuItem repairParentItem;
5232
+ private MenuItem repairShadowItem;
49115233 private MenuItem sortbysizeItem;
49125234 private MenuItem sortbynameItem;
49135235
....@@ -4928,10 +5250,11 @@
49285250 private MenuItem coneItem;
49295251 private MenuItem torusItem;
49305252 private MenuItem superItem;
5253
+ private MenuItem kleinItem;
49315254 private MenuItem blobItem;
49325255 private MenuItem latheItem;
49335256 private MenuItem bezierItem;
4934
- private MenuItem checkerItem;
5257
+ private MenuItem overlayItem;
49355258 private MenuItem meshItem;
49365259 // private MenuItem meshGroupItem;
49375260 private MenuItem springItem;
....@@ -4940,6 +5263,7 @@
49405263 private MenuItem csgItem;
49415264 private MenuItem templateItem;
49425265 private MenuItem textureItem;
5266
+ private MenuItem billboardItem;
49435267 private MenuItem shadowXItem;
49445268 private MenuItem shadowYItem;
49455269 private MenuItem shadowZItem;