Normand Briere
2019-05-02 c209bbe1cf788c9af3dcffea7667c830170a3f1f
GroupEditor.java
....@@ -12,6 +12,7 @@
1212 import com.jme.math.Vector3f;
1313 import com.jme.renderer.ColorRGBA;
1414
15
+import grafeme.ui.*;
1516 //import buoy.widget.BFileChooser;
1617
1718 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
....@@ -83,7 +84,7 @@
8384
8485 void CloneSelection(boolean supports)
8586 {
86
- // Object3D keep = GraphreeD.clipboard;
87
+ // Object3D keep = GrafreeD.clipboard;
8788 //Object3D obj;
8889 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();)
8990 {
....@@ -97,14 +98,14 @@
9798
9899 void CloneClipboard(boolean supports)
99100 {
100
- assert(GraphreeD.clipboard.parent == null);
101
- Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent;
102
- GraphreeD.clipboard.get(0).parent = null; // Avoid copy?
103
- if (LA.isIdentity(GraphreeD.clipboard.toParent))
104
- makeSomething(CloneObject(GraphreeD.clipboard.get(0), false));
101
+ assert(GrafreeD.clipboard.parent == null);
102
+ Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
103
+ GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
104
+ if (LA.isIdentity(GrafreeD.clipboard.toParent))
105
+ makeSomething(CloneObject(GrafreeD.clipboard.get(0), false));
105106 else
106
- makeSomething(CloneObject(GraphreeD.clipboard, false));
107
- GraphreeD.clipboard.get(0).parent = keepparent;
107
+ makeSomething(CloneObject(GrafreeD.clipboard, false));
108
+ GrafreeD.clipboard.get(0).parent = keepparent;
108109 }
109110
110111 static Object3D CloneObject(Object3D obj, boolean supports)
....@@ -118,7 +119,7 @@
118119 // obj.support = null;
119120 if (!supports)
120121 obj.SaveSupports();
121
- Object3D clone = (Object3D)GraphreeD.clone(obj);
122
+ Object3D clone = (Object3D)GrafreeD.clone(obj);
122123 obj.parent = parent;
123124 // obj.support = support;
124125 // clone.support = support; // aout 2013
....@@ -149,6 +150,8 @@
149150
150151 void SetupMenu2(ObjEditor oe)
151152 {
153
+ if (Globals.ADVANCED)
154
+ {
152155 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
153156 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
154157 //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
....@@ -160,36 +163,48 @@
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("-");
170
- cloneItem = menu.add(new MenuItem("Clone"));
171
- cloneItem.addActionListener(this);
172
- cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
173
- cloneSupportItem.addActionListener(this);
174
- menu.add("-");
175174 cutItem = menu.add(new MenuItem("Cut"));
176175 cutItem.addActionListener(this);
177176 copyItem = menu.add(new MenuItem("Copy"));
178177 copyItem.addActionListener(this);
179178 pasteItem = menu.add(new MenuItem("Paste"));
180179 pasteItem.addActionListener(this);
180
+ menu.add("-");
181
+ cloneItem = menu.add(new MenuItem("Clone"));
182
+ cloneItem.addActionListener(this);
183
+ cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
184
+ cloneSupportItem.addActionListener(this);
185
+ menu.add("-");
186
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
187
+ pasteIntoItem.addActionListener(this);
181188 pasteLinkItem = menu.add(new MenuItem("Paste link"));
182189 pasteLinkItem.addActionListener(this);
183190 pasteCloneItem = menu.add(new MenuItem("Paste clone"));
184191 pasteCloneItem.addActionListener(this);
185192 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
186193 // pasteExpandItem.addActionListener(this);
194
+ menu.add("-");
187195 clearItem = menu.add(new MenuItem("Clear"));
188196 clearItem.addActionListener(this);
197
+
198
+ if (Globals.ADVANCED)
199
+ {
200
+ // Deletes the cameras...
189201 clearAllItem = menu.add(new MenuItem("Clear All"));
190202 clearAllItem.addActionListener(this);
203
+ }
191204
192205 oe.menuBar.add(menu = new Menu("Setting"));
206
+ if (Globals.ADVANCED)
207
+ {
193208 resetMeshItem = menu.add(new MenuItem("Reset All"));
194209 resetMeshItem.addActionListener(this);
195210 stepAllItem = menu.add(new MenuItem("Step All"));
....@@ -199,6 +214,7 @@
199214 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
200215 resetreferencesItem.addActionListener(this);
201216 menu.add("-");
217
+ }
202218 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
203219 overwriteGeoItem.addActionListener(this);
204220 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -210,48 +226,67 @@
210226 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
211227 overwriteUVItem.addActionListener(this);
212228 menu.add("-");
229
+ if (Globals.ADVANCED)
230
+ {
213231 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
214232 generateMeshItem.addActionListener(this);
215233 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
216234 poseMeshItem.addActionListener(this);
217235 menu.add("-");
236
+ }
218237 resetsupportItem = menu.add(new MenuItem("Reset support"));
219238 resetsupportItem.addActionListener(this);
220239 linkverticesItem = menu.add(new MenuItem("Link to Support"));
221240 linkverticesItem.addActionListener(this);
241
+ relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
242
+ relinkverticesItem.addActionListener(this);
243
+
244
+ if (Globals.ADVANCED)
245
+ {
222246 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
223247 setMasterItem.addActionListener(this);
248
+ }
224249
225250 oe.menuBar.add(menu = new Menu("Group"));
226251 grabItem = menu.add(new MenuItem("Grab"));
227252 grabItem.addActionListener(this);
228
- frontItem = menu.add(new MenuItem("Front"));
229
- frontItem.addActionListener(this);
230253 backItem = menu.add(new MenuItem("Back"));
231254 backItem.addActionListener(this);
255
+ frontItem = menu.add(new MenuItem("Front"));
256
+ frontItem.addActionListener(this);
232257 compositeItem = menu.add(new MenuItem("Composite"));
233258 compositeItem.addActionListener(this);
259
+ hideItem = menu.add(new MenuItem("Hidden Group"));
260
+ hideItem.addActionListener(this);
261
+ ungroupItem = menu.add(new MenuItem("Ungroup"));
262
+ ungroupItem.addActionListener(this);
234263 menu.add("-");
235
- randomItem = menu.add(new MenuItem("Random"));
264
+ randomItem = menu.add(new MenuItem("Switch node"));
236265 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);
241266 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
242267 switchGeoItem.addActionListener(this);
243268 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
244269 switchTransfoItem.addActionListener(this);
245
- morphItem = menu.add(new MenuItem("Morph"));
270
+ morphItem = menu.add(new MenuItem("Morph Group"));
246271 morphItem.addActionListener(this);
272
+
273
+ if (Globals.ADVANCED)
274
+ {
275
+ physicsItem = menu.add(new MenuItem("Physics"));
276
+ physicsItem.addActionListener(this);
277
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
278
+ frameselectorItem.addActionListener(this);
247279 scriptNodeItem = menu.add(new MenuItem("Script Node"));
248280 scriptNodeItem.addActionListener(this);
249281 cameraItem = menu.add(new MenuItem("Camera"));
250282 cameraItem.addActionListener(this);
283
+ }
251284
252285 oe.menuBar.add(menu = new Menu("Object"));
253286 textureItem = menu.add(new MenuItem("Texture"));
254287 textureItem.addActionListener(this);
288
+ billboardItem = menu.add(new MenuItem("Billboard"));
289
+ billboardItem.addActionListener(this);
255290 csgItem = menu.add(new MenuItem("CSG"));
256291 csgItem.addActionListener(this);
257292 shadowXItem = menu.add(new MenuItem("Shadow X"));
....@@ -260,23 +295,24 @@
260295 shadowYItem.addActionListener(this);
261296 shadowZItem = menu.add(new MenuItem("Shadow Z"));
262297 shadowZItem.addActionListener(this);
298
+ if (Globals.ADVANCED)
299
+ {
263300 linkerItem = menu.add(new MenuItem("Linker"));
264301 linkerItem.addActionListener(this);
265
- templateItem = menu.add(new MenuItem("Template"));
266
- templateItem.addActionListener(this);
267302 attributeItem = menu.add(new MenuItem("Attribute"));
268303 attributeItem.addActionListener(this);
304
+ templateItem = menu.add(new MenuItem("Template"));
305
+ templateItem.addActionListener(this);
269306 pointflowItem = menu.add(new MenuItem("Point Flow"));
270307 pointflowItem.addActionListener(this);
271308 menu.add("-");
272
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
273
- transformgeometryItem.addActionListener(this);
309
+ }
274310 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
275311 resetTransformItem.addActionListener(this);
276312 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
277313 resetCentroidItem.addActionListener(this);
278
- ungroupItem = menu.add(new MenuItem("Ungroup"));
279
- ungroupItem.addActionListener(this);
314
+ transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
315
+ transformgeometryItem.addActionListener(this);
280316
281317 oe.menuBar.add(menu = new Menu("Geometry"));
282318 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -285,6 +321,13 @@
285321 genNormalsORGANItem.addActionListener(this);
286322 genNormalsCADItem = menu.add(new MenuItem("CAD Normals"));
287323 genNormalsCADItem.addActionListener(this);
324
+ genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
325
+ genNormalsMESHItem.addActionListener(this);
326
+ if (Globals.ADVANCED)
327
+ {
328
+ genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
329
+ genNormalsMINEItem.addActionListener(this);
330
+ }
288331 stripifyItem = menu.add(new MenuItem("Stripify"));
289332 stripifyItem.addActionListener(this);
290333 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -306,10 +349,14 @@
306349 reduce34MeshItem.addActionListener(this);
307350 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
308351 increaseMeshItem.addActionListener(this);
309
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
310
- smoothMeshItem.addActionListener(this);
311352 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
312353 clipMeshItem.addActionListener(this);
354
+
355
+ if (Globals.ADVANCED)
356
+ {
357
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
358
+ smoothMeshItem.addActionListener(this);
359
+ }
313360
314361 oe.menuBar.add(menu = new Menu("Attributes"));
315362 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
....@@ -319,10 +366,13 @@
319366 liveleavesItem.addActionListener(this);
320367 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
321368 unliveleavesItem.addActionListener(this);
369
+ if (Globals.ADVANCED)
370
+ {
322371 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
323372 supportleavesItem.addActionListener(this);
324373 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
325374 unsupportleavesItem.addActionListener(this);
375
+ }
326376 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
327377 hideleavesItem.addActionListener(this);
328378 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -365,6 +415,8 @@
365415 sortbysizeItem.addActionListener(this);
366416 sortbynameItem = menu.add(new MenuItem("Sort by name"));
367417 sortbynameItem.addActionListener(this);
418
+ if (Globals.ADVANCED)
419
+ {
368420 menu.add("-");
369421 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
370422 extractGeometriesItem.addActionListener(this);
....@@ -374,13 +426,13 @@
374426 shareGeometriesItem.addActionListener(this);
375427 mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
376428 mergeGeometriesItem.addActionListener(this);
429
+ }
377430
378431 oe.menuBar.add(menu = new Menu("Insert"));
379432 buildCreateMenu(menu);
380433
381
-
382434 oe.menuBar.add(menu = new Menu("Include"));
383
- importGFDItem = menu.add(new MenuItem("GraphreeD Object..."));
435
+ importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
384436 importGFDItem.addActionListener(this);
385437 importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
386438 importVRMLX3DItem.addActionListener(this);
....@@ -423,150 +475,98 @@
423475 oe.radioPanel.add(dummyButton);
424476 oe.buttonGroup.add(dummyButton);
425477 */
426
- aConstraints.gridy += 1;
427
- oe.aConstraints.gridwidth = 1;
428
- oe.aConstraints.gridx = 0;
478
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
429479
430
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints);
480
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
481
+ liveCB.setToolTipText("Enabled animation");
431482 liveCB.addItemListener(this);
432483
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);
484
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
485
+ oneStepButton.setToolTipText("Animate one step forward");
486
+ oneStepButton.addActionListener(this);
487
+
488
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
489
+ fastCB.setToolTipText("Fast mode");
451490 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);
491
+
492
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
493
+ trackCB.setToolTipText("Enable tracking");
493494 trackCB.addItemListener(this);
494495
495
- oe.aConstraints.gridx += 1;
496
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
496
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
497
+ screenfitButton.setToolTipText("Screen fit");
497498 screenfitButton.addActionListener(this);
498
- oe.aConstraints.gridx += 1;
499
+
499500 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
500501 // 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;
505502
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);
503
+ if (Globals.ADVANCED)
504
+ {
505
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
506
+ snapobjectButton.addActionListener(this);
507
+ snapobjectButton.setToolTipText("Snap Object");
508
+ }
509
+
510
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
511
+ flashSelectionButton.setToolTipText("Show selection");
512512 flashSelectionButton.addActionListener(this);
513
- oe.aConstraints.gridx += 1;
514
- oe.aConstraints.weighty = 0;
515
- oe.aConstraints.gridwidth = 1;
516513
517
- //
518
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
514
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
515
+
516
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
517
+ twoButton.setToolTipText("Show center view only");
519518 twoButton.addActionListener(this);
520
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
519
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
521520 fourButton.addActionListener(this);
522
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
521
+ fourButton.setToolTipText("Show left panel only");
522
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
523
+ sixButton.setToolTipText("2-column layout left");
523524 sixButton.addActionListener(this);
524
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
525
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
526
+ threeButton.setToolTipText("2-column layout right");
525527 threeButton.addActionListener(this);
526
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
528
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
529
+ sevenButton.setToolTipText("3-column layout");
527530 sevenButton.addActionListener(this);
528531 //
529532
530
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
533
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
534
+ rootButton.setToolTipText("Edit selection in new tab");
531535 rootButton.addActionListener(this);
532
- oe.aConstraints.gridx += 1;
533
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
536
+
537
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
538
+ closeButton.setToolTipText("Close tab");
534539 closeButton.addActionListener(this);
535540 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
536541 //clearButton.addActionListener(this);
537
- oe.aConstraints.gridx += 1;
538542
539
- oe.aConstraints.gridx = 1; //
540
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
543
+ cGridBag commandsPanel = new cGridBag();
544
+
545
+ commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
546
+ editButton.setToolTipText("Edit selection");
541547 editButton.addActionListener(this);
542
- oe.aConstraints.gridx += 1;
543
- oe.aConstraints.weighty = 0;
544
- oe.aConstraints.gridwidth = 1;
545548
546
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
549
+ commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
550
+ uneditButton.setToolTipText("Unedit selection");
547551 uneditButton.addActionListener(this);
548552
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);
553
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
554
+ allParamsButton.setToolTipText("Edit all params");
561555 allParamsButton.addActionListener(this);
562556
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);
557
+ commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
558
+ clearPanelButton.setToolTipText("Clear edit panel");
559
+ clearPanelButton.addActionListener(this);
560
+
561
+ commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
562
+ unselectButton.setToolTipText("Unselect");
568563 unselectButton.addActionListener(this);
569564
565
+ commandsPanel.preferredHeight = 1;
566
+
567
+ oe.treePanel.add(commandsPanel);
568
+ oe.treePanel.Return();
569
+
570570 // oe.aConstraints.gridx += 1;
571571 // oe.aConstraints.weighty = 0;
572572 // oe.aConstraints.gridwidth = 1;
....@@ -578,40 +578,37 @@
578578 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
579579 // gcButton.addActionListener(this);
580580
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;
581
+ cGridBag jSPPanel = new cGridBag();
582
+
583
+ JScrollPane jSP;
592584 //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);
585
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
594586 ResetModel();
595
- oe.aConstraints.weighty = 0.5;
596
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
597
- oe.aConstraints.gridy += 1;
598
- oe.aConstraints.gridwidth = 1;
587
+
588
+ oe.treePanel.add(jSPPanel);
589
+ oe.treePanel.Return();
599590
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);
591
+ cGridBag copyOptionsPanel = new cGridBag();
592
+
593
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
594
+ colorCB.setToolTipText("Copy color when dropped");
604595 colorCB.addItemListener(this);
605
- oe.aConstraints.gridx += 2;
606
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
596
+
597
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
598
+ materialCB.setToolTipText("Copy material when dropped");
607599 materialCB.addItemListener(this);
608
- oe.aConstraints.gridx += 2;
609
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
600
+
601
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
602
+ textureCB.setToolTipText("Copy texture when dropped");
610603 textureCB.addItemListener(this);
611604
612
- oe.aConstraints.gridx = 0;
613
- oe.aConstraints.gridy += 1;
605
+ copyOptionsPanel.preferredHeight = 1;
606
+ oe.treePanel.add(copyOptionsPanel);
607
+ oe.treePanel.Return();
614608
609
+// mainPanel.setDividerLocation(0.5); //1.0);
610
+// mainPanel.setResizeWeight(0.5);
611
+
615612 //jList.addListSelectionListener(this);
616613 oe.jTree.addTreeSelectionListener(this);
617614 //jTree.setRootVisible(false);
....@@ -633,17 +630,89 @@
633630 radio.layout = sevenButton;
634631 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
635632 }
633
+
634
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
635
+ {
636
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
637
+ boxCB.setToolTipText("Display bounding boxes");
638
+ boxCB.addItemListener(this);
639
+
640
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
641
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
642
+ zoomBoxCB.addItemListener(this);
643
+
644
+ if (Globals.ADVANCED)
645
+ {
646
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
647
+ supportCB.setToolTipText("Enable rigging");
648
+ supportCB.addItemListener(this);
649
+
650
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
651
+ // localCB.addItemListener(this);
652
+
653
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
654
+ crowdCB.setToolTipText("Used for crowds");
655
+ crowdCB.addItemListener(this);
656
+
657
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
658
+ smoothCB.setToolTipText("Snapping delay");
659
+ smoothCB.addItemListener(this);
660
+
661
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
662
+ slowCB.setToolTipText("Smooth interpolation");
663
+ slowCB.addItemListener(this);
664
+
665
+// constraints.gridy += 1;
666
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
667
+// speakerMocapCB.addItemListener(this);
668
+
669
+ if (false)
670
+ {
671
+ // handled in scripts
672
+ //constraints.gridy += 1;
673
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
674
+ speakerCameraCB.addItemListener(this);
675
+
676
+ //constraints.gridy += 1;
677
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
678
+ speakerFocusCB.addItemListener(this);
679
+
680
+ //constraints.gridy += 1;
681
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
682
+ smoothfocusCB.addItemListener(this);
683
+ }
684
+
685
+//constraints.gridx += 1;
686
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
687
+// debugCB.addItemListener(this);
688
+
689
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
690
+ oeilCB.addItemListener(this);
691
+
692
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
693
+ lookAtCB.setToolTipText("Look-at target");
694
+ lookAtCB.addItemListener(this);
695
+
696
+ }
697
+
698
+ cGridBag fill = new cGridBag();
699
+
700
+ fill.preferredHeight = 200;
701
+
702
+ panel.add(fill);
703
+
704
+ }
636705
637706 void EditObject(Object3D obj)
638707 {
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();
708
+ cRadio radioButton = new cRadio(obj.name);
709
+ radioButton.SetObject(obj);
710
+ radioButton.layout = sevenButton;
711
+ radioButton.SetCamera(cameraView.renderCamera, false);
712
+ radioButton.addActionListener(this);
713
+ radioPanel.add(radioButton);
714
+ buttonGroup.add(radioButton);
715
+ radioButton.doClick();
647716 }
648717 void SetupViews(ObjEditor oe)
649718 {
....@@ -663,6 +732,7 @@
663732 JCheckBox fastCB;
664733 JCheckBox slowCB;
665734 JCheckBox boxCB;
735
+ JCheckBox zoomBoxCB;
666736 JCheckBox trackCB;
667737 JCheckBox smoothfocusCB;
668738 // JCheckBox speakerMocapCB;
....@@ -705,8 +775,7 @@
705775 dropAttributes |= Object3D.TEXTURE;
706776 else
707777 dropAttributes &= ~Object3D.TEXTURE;
708
- }
709
- else if(e.getSource() == liveCB)
778
+ } else if(e.getSource() == liveCB)
710779 {
711780 cameraView.ToggleLive();
712781 }
....@@ -743,6 +812,10 @@
743812 Recompile();
744813 cameraView.repaint();
745814 // refreshContents();
815
+ }
816
+ else if(e.getSource() == zoomBoxCB)
817
+ {
818
+ cameraView.ToggleZoomBoxMode();
746819 }
747820 else if(e.getSource() == smoothfocusCB)
748821 {
....@@ -911,11 +984,11 @@
911984 {
912985 loadClipboard(true);
913986 objEditor.jTree.setSelectionPath(destinationPath);
914
- pasteInto(false);
987
+ pasteInto(false, false);
915988 } else {
916989 loadClipboard(false);
917990 objEditor.jTree.setSelectionPath(destinationPath);
918
- pasteInto(false); // true); // ???
991
+ pasteInto(false, false); // true); // ???
919992 }
920993 }
921994 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1033,29 +1106,37 @@
10331106 torusItem.addActionListener(this);
10341107 superItem = menu.add(new MenuItem("Superellipsoid"));
10351108 superItem.addActionListener(this);
1109
+ kleinItem = menu.add(new MenuItem("Klein Bottle"));
1110
+ kleinItem.addActionListener(this);
10361111 particleItem = menu.add(new MenuItem("Particle system"));
10371112 particleItem.addActionListener(this);
1113
+ if (Globals.ADVANCED)
1114
+ {
10381115 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10391116 ragdollItem.addActionListener(this);
10401117 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10411118 ragdoll2Item.addActionListener(this);
1119
+ }
10421120 menu.add("-");
1043
- meshItem = menu.add(new MenuItem("Mesh"));
1121
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10441122 meshItem.addActionListener(this);
10451123 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10461124 // meshGroupItem.addActionListener(this);
1125
+ if (Globals.ADVANCED)
1126
+ {
10471127 springItem = menu.add(new MenuItem("Spring"));
10481128 springItem.addActionListener(this);
10491129 flagItem = menu.add(new MenuItem("Flag"));
10501130 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);
10551131 blobItem = menu.add(new MenuItem("Blob"));
10561132 blobItem.addActionListener(this);
10571133 latheItem = menu.add(new MenuItem("Lathe"));
10581134 latheItem.addActionListener(this);
1135
+ }
1136
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1137
+ bezierItem.addActionListener(this);
1138
+ overlayItem = menu.add(new MenuItem("Overlay"));
1139
+ overlayItem.addActionListener(this);
10591140 lightItem = menu.add(new MenuItem("Light"));
10601141 lightItem.addActionListener(this);
10611142 menu.add("-");
....@@ -1065,25 +1146,26 @@
10651146 loopItem.addActionListener(this);
10661147 doubleItem = menu.add(new MenuItem("Fork"));
10671148 doubleItem.addActionListener(this);
1149
+ if (Globals.ADVANCED)
1150
+ {
10681151 tripleItem = menu.add(new MenuItem("Trident"));
10691152 tripleItem.addActionListener(this);
1153
+ }
10701154 }
10711155
10721156 void buildToolsMenu(Menu menu)
10731157 {
10741158 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10751159 animationItem.addItemListener(this);
1076
- animationItem.setState(CameraPane.ANIMATION);
1160
+ animationItem.setState(Globals.ANIMATION);
10771161
10781162 menu.add("-");
10791163 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
10801164 parseverticesItem.addActionListener(this);
10811165 textureFieldItem = menu.add(new MenuItem("Texture Field"));
10821166 textureFieldItem.addActionListener(this);
1083
- alignItem = menu.add(new MenuItem("Align"));
1167
+ alignItem = menu.add(new MenuItem("Align Object"));
10841168 alignItem.addActionListener(this);
1085
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1086
- mirrorItem.addActionListener(this);
10871169 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
10881170 reduceMorphItem.addActionListener(this);
10891171 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
....@@ -1091,8 +1173,12 @@
10911173
10921174 menu.add(computeAOItem = new MenuItem("Compute AO"));
10931175 computeAOItem.addActionListener(this);
1094
- menu.add("-");
10951176
1177
+ if (Globals.ADVANCED)
1178
+ {
1179
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1180
+ mirrorItem.addActionListener(this);
1181
+ menu.add("-");
10961182 menu.add(memoryItem = new MenuItem("Memory Usage"));
10971183 memoryItem.addActionListener(this);
10981184 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1106,6 +1192,8 @@
11061192 resetParentItem.addActionListener(this);
11071193 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11081194 repairParentItem.addActionListener(this);
1195
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1196
+ repairShadowItem.addActionListener(this);
11091197 menu.add(invariantsItem = new MenuItem("Invariants"));
11101198 invariantsItem.addActionListener(this);
11111199 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1113,6 +1201,7 @@
11131201 menu.add("-");
11141202 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11151203 editScriptItem.addActionListener(this);
1204
+ }
11161205 }
11171206
11181207 void ScreenFit()
....@@ -1441,9 +1530,9 @@
14411530
14421531 void Overwrite(int mask)
14431532 {
1444
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
1533
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
14451534 {
1446
- Object3D content = GraphreeD.clipboard.get(0);
1535
+ Object3D content = GrafreeD.clipboard.get(0);
14471536
14481537 if (content instanceof cGroup && ((cGroup)content).transientlink )
14491538 content = ((cGroup)content).get(0);
....@@ -1466,6 +1555,7 @@
14661555 //
14671556 public void actionPerformed(ActionEvent event) // , Object arg)
14681557 {
1558
+ Object source = event.getSource();
14691559 /*
14701560 if (event.getSource() == nameField)
14711561 {
....@@ -1477,11 +1567,11 @@
14771567 }
14781568 else
14791569 */
1480
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1570
+ if (source == lookAtItem || source == lookFromItem)
14811571 {
14821572 ScreenFit();
14831573 } else
1484
- if (event.getSource() == switchItem)
1574
+ if (source == switchItem)
14851575 {
14861576 cVector v1 = new cVector();
14871577 cVector v2 = new cVector();
....@@ -1490,11 +1580,11 @@
14901580 objEditor.cameraView.renderCamera.setAim(v2, v1);
14911581 objEditor.cameraView.repaint();
14921582 } else
1493
- if (event.getSource() == rectoidItem)
1583
+ if (source == rectoidItem)
14941584 {
14951585 makeSomething(new Box());
14961586 } else
1497
- if (event.getSource() == particleItem)
1587
+ if (source == particleItem)
14981588 {
14991589 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15001590 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1515,9 +1605,9 @@
15151605 applyExample(particleGeom, "SMOKE");
15161606 makeSomething(particleGeom);
15171607 } else
1518
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1608
+ if (source == ragdollItem || source == ragdoll2Item)
15191609 {
1520
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1610
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15211611
15221612 ragdoll.toParent = LA.newMatrix();
15231613 ragdoll.fromParent = LA.newMatrix();
....@@ -1535,7 +1625,7 @@
15351625 } else
15361626 /*
15371627 */
1538
- if (event.getSource() == heightFieldItem)
1628
+ if (source == heightFieldItem)
15391629 {
15401630 Object3D obj = new Object3D();
15411631
....@@ -1573,27 +1663,31 @@
15731663
15741664 makeSomething(obj);
15751665 } else
1576
- if (event.getSource() == gridItem)
1666
+ if (source == gridItem)
15771667 {
15781668 makeSomething(new Grid());
15791669 } else
1580
- if (event.getSource() == ellipsoidItem)
1670
+ if (source == ellipsoidItem)
15811671 {
15821672 makeSomething(new Sphere());
15831673 } else
1584
- if (event.getSource() == coneItem)
1674
+ if (source == coneItem)
15851675 {
15861676 makeSomething(new Cone());
15871677 } else
1588
- if (event.getSource() == torusItem)
1678
+ if (source == torusItem)
15891679 {
15901680 makeSomething(new Torus());
15911681 } else
1592
- if (event.getSource() == superItem)
1682
+ if (source == superItem)
15931683 {
15941684 makeSomething(new Superellipsoid());
15951685 } else
1596
- if (event.getSource() == blobItem)
1686
+ if (source == kleinItem)
1687
+ {
1688
+ makeSomething(new Klein());
1689
+ } else
1690
+ if (source == blobItem)
15971691 {
15981692 Blob blob = new Blob();
15991693 BlobComponent comp = new BlobComponent();
....@@ -1601,15 +1695,15 @@
16011695 //blob.retile();
16021696 makeSomething(blob);
16031697 } else
1604
- if (event.getSource() == latheItem)
1698
+ if (source == latheItem)
16051699 {
16061700 makeSomething(new Lathe());
16071701 } else
1608
- if (event.getSource() == bezierItem)
1702
+ if (source == bezierItem)
16091703 {
16101704 makeSomething(new BezierSurface());
16111705 } else
1612
- if (event.getSource() == checkerItem)
1706
+ if (source == overlayItem)
16131707 {
16141708 /*
16151709 Object3D obj = new BezierSurface(5,8);
....@@ -1624,7 +1718,7 @@
16241718 */
16251719 makeSomething(new Checker());
16261720 } else
1627
- if (event.getSource() == meshItem)
1721
+ if (source == meshItem)
16281722 {
16291723 Object3D itemtomake = new Object3D();
16301724 Object3D child;
....@@ -1645,35 +1739,35 @@
16451739 makeSomething(child);
16461740 }
16471741 } else
1648
- if (event.getSource() == springItem)
1742
+ if (source == springItem)
16491743 {
16501744 cSpring s = new cSpring();
16511745 s.setup();
16521746 makeSomething(s);
16531747 } else
1654
- if (event.getSource() == flagItem)
1748
+ if (source == flagItem)
16551749 {
16561750 cSpring s = new cFlag();
16571751 s.setup();
16581752 makeSomething(s);
16591753 } else
1660
- if (event.getSource() == lightItem)
1754
+ if (source == lightItem)
16611755 {
16621756 makeSomething(new Light());
16631757 } else
1664
- if (event.getSource() == csgItem)
1758
+ if (source == csgItem)
16651759 {
16661760 group(new CSG());
16671761 } else
1668
- if (event.getSource() == templateItem)
1762
+ if (source == templateItem)
16691763 {
16701764 group(new cTemplate());
16711765 } else
1672
- if (event.getSource() == attributeItem)
1766
+ if (source == attributeItem)
16731767 {
16741768 makeSomething(new Attribute());
16751769 } else
1676
- if (event.getSource() == pointflowItem)
1770
+ if (source == pointflowItem)
16771771 {
16781772 makeSomething(new PointFlow());
16791773 } else
....@@ -1685,7 +1779,7 @@
16851779 } else
16861780 */
16871781
1688
- if (event.getSource() == superLoopItem)
1782
+ if (source == superLoopItem)
16891783 {
16901784 Composite g = new cGroup();
16911785 for (int i=0; i<15; i++)
....@@ -1707,7 +1801,7 @@
17071801
17081802 group(g);
17091803 } else
1710
- if (event.getSource() == loopItem)
1804
+ if (source == loopItem)
17111805 {
17121806 Composite csg = new GroupLeaf();
17131807 csg.count = 5;
....@@ -1716,7 +1810,7 @@
17161810 csg.addChild(child);
17171811 child.addChild(csg);
17181812 } else
1719
- if (event.getSource() == doubleItem)
1813
+ if (source == doubleItem)
17201814 {
17211815 Composite csg = new GroupLeaf();
17221816 csg.count = 5;
....@@ -1728,7 +1822,7 @@
17281822 csg.addChild(child);
17291823 child.addChild(csg);
17301824 } else
1731
- if (event.getSource() == tripleItem)
1825
+ if (source == tripleItem)
17321826 {
17331827 Composite csg = new GroupLeaf();
17341828 csg.count = 4;
....@@ -1744,70 +1838,75 @@
17441838 child.addChild(csg);
17451839 } else
17461840
1747
- if (event.getSource() == importGFDItem)
1841
+ if (source == importGFDItem)
17481842 {
17491843 ImportGFD();
17501844 } else
1751
- if (event.getSource() == importVRMLX3DItem)
1845
+ if (source == importVRMLX3DItem)
17521846 {
17531847 ImportVRMLX3D();
17541848 } else
1755
- if (event.getSource() == import3DSItem)
1849
+ if (source == import3DSItem)
17561850 {
17571851 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17581852 } else
1759
- if (event.getSource() == importOBJItem)
1853
+ if (source == importOBJItem)
17601854 {
17611855 objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
17621856 } else
1763
- if (event.getSource() == computeAOItem)
1857
+ if (source == computeAOItem)
17641858 {
1765
- CameraPane.drawMode = CameraPane.OCCLUSION;
1766
- CameraPane.theRenderer.repaint();
1859
+ Globals.drawMode = CameraPane.OCCLUSION;
1860
+ Globals.theRenderer.repaint();
17671861 } else
1768
- if (event.getSource() == recompileItem)
1862
+ if (source == recompileItem)
17691863 {
17701864 Recompile();
17711865 refreshContents();
17721866 } else
1773
- if (event.getSource() == editScriptItem)
1867
+ if (source == editScriptItem)
17741868 {
17751869 OpenDialog();
17761870 refreshContents();
17771871 } else
1778
- if (event.getSource() == invariantsItem)
1872
+ if (source == invariantsItem)
17791873 {
17801874 System.out.println("Invariants:");
1781
- GraphreeD.theApplet3D.universe.invariants();
1875
+ GrafreeD.grafreeD.universe.invariants();
17821876 } else
1783
- if (event.getSource() == memoryItem)
1877
+ if (source == memoryItem)
17841878 {
17851879 //System.out.println("Invariants:");
17861880 PrintMemory();
17871881 } else
1788
- if (event.getSource() == pathItem)
1882
+ if (source == pathItem)
17891883 {
17901884 PrintPath();
17911885 } else
1792
- if (event.getSource() == analyzeItem)
1886
+ if (source == analyzeItem)
17931887 {
17941888 AnalyzeObject();
17951889 } else
1796
- if (event.getSource() == dumpItem)
1890
+ if (source == dumpItem)
17971891 {
17981892 DumpObject();
17991893 } else
1800
- if (event.getSource() == screenfitButton)
1894
+ if (source == oneStepButton)
1895
+ {
1896
+ Globals.ONESTEP = true;
1897
+ cameraView.repaint();
1898
+ } else
1899
+ if (source == screenfitButton)
18011900 {
18021901 //Reload(lastConverter, lastFilename, true);
18031902 ScreenFit();
18041903 } else
1805
- if (event.getSource() == screenfitpointButton)
1904
+ if (source == screenfitpointButton)
18061905 {
18071906 //Reload(lastConverter, lastFilename, true);
18081907 ScreenFitPoint();
18091908 } else
1810
- if (event.getSource() == snapobjectButton)
1909
+ if (source == snapobjectButton)
18111910 {
18121911 //Reload(lastConverter, lastFilename, true);
18131912 SnapObject();
....@@ -1818,13 +1917,13 @@
18181917 // Recompile();
18191918 // refreshContents();
18201919 // } else
1821
- if (event.getSource() == gcButton)
1920
+ if (source == gcButton)
18221921 {
18231922 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18241923 System.gc();
18251924 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18261925 } else
1827
- if (event.getSource() == editLeafItem)
1926
+ if (source == editLeafItem)
18281927 {
18291928 Object3D obj;
18301929 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1838,65 +1937,70 @@
18381937 }
18391938 refreshContents(true);
18401939 } else
1841
- if (event.getSource() == openWindowItem)
1940
+ if (source == openWindowItem)
18421941 {
18431942 EditSelection(true);
18441943 } else
1845
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1944
+ if (source == cutItem || source == clearButton)
18461945 {
18471946 loadClipboard(true);
18481947 } else
1849
- if (event.getSource() == duplicateItem)
1948
+ if (source == duplicateItem)
18501949 {
1851
- Object3D keep = GraphreeD.clipboard;
1950
+ Object3D keep = GrafreeD.clipboard;
18521951 loadClipboard(false);
18531952 paste(false);
1854
- GraphreeD.clipboard = keep;
1953
+ GrafreeD.clipboard = keep;
18551954 } else
1856
- if (event.getSource() == cloneItem)
1955
+ if (source == cloneItem)
18571956 {
18581957 CloneSelection(false);
18591958 } else
1860
- if (event.getSource() == cloneSupportItem)
1959
+ if (source == cloneSupportItem)
18611960 {
18621961 CloneSelection(true);
18631962 } else
1864
- if (event.getSource() == copyItem)
1963
+ if (source == copyItem)
18651964 {
18661965 loadClipboard(false);
18671966 } else
1868
- if (event.getSource() == pasteItem)
1967
+ if (source == pasteItem)
18691968 {
18701969 paste(false);
18711970 } else
1872
- if (event.getSource() == pasteLinkItem)
1971
+ if (source == pasteIntoItem)
18731972 {
1874
- pasteInto(false);
1973
+ pasteInto(true, false);
18751974 } else
1876
- if (event.getSource() == pasteCloneItem)
1975
+ if (source == pasteLinkItem)
18771976 {
1878
- pasteInto(true);
1977
+ pasteInto(false, false);
18791978 } else
1880
- if (event.getSource() == pasteExpandItem)
1979
+ if (source == pasteCloneItem)
1980
+ {
1981
+ pasteInto(true, true);
1982
+ } else
1983
+ if (source == pasteExpandItem)
18811984 {
18821985 paste(true);
18831986 } else
1884
- if (event.getSource() == synchronizeItem)
1987
+ if (source == synchronizeItem)
18851988 {
18861989 Overwrite(Object3D.TRANSFORM);
18871990 } else
1888
- if (event.getSource() == overwriteNameItem)
1991
+ if (source == overwriteNameItem)
18891992 {
18901993 Overwrite(Object3D.NAME);
18911994 } else
1892
- if (event.getSource() == overwriteUVItem)
1995
+ if (source == overwriteUVItem)
18931996 {
18941997 Overwrite(Object3D.UV);
18951998 } else
1896
- if (event.getSource() == overwriteMatItem)
1999
+ if (source == overwriteMatItem)
18972000 {
2001
+ /* july 2015
18982002 if ((dropAttributes & Object3D.TEXTURE) == 0)
1899
- Overwrite(Object3D.MATERIAL);
2003
+ Overwrite(Object3D.MATERIAL | Object3D.COLOR);
19002004 else
19012005 {
19022006 if ((dropAttributes & Object3D.COLOR) == 0 && (dropAttributes & Object3D.MATERIAL) == 0)
....@@ -1908,13 +2012,16 @@
19082012 Overwrite(Object3D.MATERIAL | Object3D.TEXTURE);
19092013 }
19102014 }
2015
+ */
2016
+
2017
+ Overwrite(dropAttributes);
19112018 }
1912
- if (event.getSource() == overwriteGeoItem)
2019
+ if (source == overwriteGeoItem)
19132020 {
19142021 Overwrite(Object3D.GEOMETRY);
1915
-// if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
2022
+// if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
19162023 // {
1917
-// Object3D content = GraphreeD.clipboard.get(0);
2024
+// Object3D content = GrafreeD.clipboard.get(0);
19182025 //
19192026 // if (content instanceof cGroup && ((cGroup)content).transientlink )
19202027 // content = ((cGroup)content).get(0);
....@@ -1926,7 +2033,7 @@
19262033 // refreshContents();
19272034 // }
19282035 } else
1929
- if (event.getSource() == generateMeshItem)
2036
+ if (source == generateMeshItem)
19302037 {
19312038 //if (group.selection.size() == 1)
19322039 // for (int i=0; i<group.selection.size(); i++)
....@@ -1937,7 +2044,7 @@
19372044 ResetModel();
19382045 refreshContents();
19392046 } else
1940
- if (event.getSource() == extractGeometriesItem)
2047
+ if (source == extractGeometriesItem)
19412048 {
19422049 boolean one = false;
19432050
....@@ -1964,7 +2071,7 @@
19642071 ResetModel();
19652072 refreshContents();
19662073 } else
1967
- if (event.getSource() == cloneGeometriesItem)
2074
+ if (source == cloneGeometriesItem)
19682075 {
19692076 boolean one = false;
19702077
....@@ -1990,32 +2097,37 @@
19902097 ResetModel();
19912098 refreshContents();
19922099 } else
1993
- if (event.getSource() == shareGeometriesItem)
2100
+ if (source == shareGeometriesItem)
19942101 {
19952102 boolean one = false;
19962103
19972104 if (group.selection.size() == 1)
19982105 one = true;
19992106
2107
+ Object3D merge = null;
2108
+
20002109 Object3D content = new cGroup();
20012110
20022111 for (int i=0; i<group.selection.size(); i++)
20032112 {
2004
- Object3D sel = new Merge(group.selection.get(i));
2113
+ merge = new Merge(group.selection.get(i));
20052114
20062115 if (one)
2007
- makeSomething(sel, false);
2116
+ makeSomething(merge, false);
20082117 else
2009
- content.addChild(sel);
2118
+ content.addChild(merge);
20102119 }
20112120
20122121 if (!one)
2013
- makeSomething(content, false);
2014
-
2015
- ResetModel();
2016
- refreshContents();
2122
+ makeSomething(content, true);
2123
+ else
2124
+ {
2125
+ ResetModel();
2126
+ Select(merge.GetTreePath(), true, false); // unselect... false);
2127
+ refreshContents();
2128
+ }
20172129 } else
2018
- if (event.getSource() == mergeGeometriesItem)
2130
+ if (source == mergeGeometriesItem)
20192131 {
20202132 boolean one = false;
20212133
....@@ -2045,11 +2157,11 @@
20452157 ResetModel();
20462158 refreshContents();
20472159 } else
2048
- if (event.getSource() == linkverticesItem)
2160
+ if (source == linkverticesItem)
20492161 {
2050
-// if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2162
+// if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20512163 // {
2052
-// Object3D content = GraphreeD.clipboard.get(0);
2164
+// Object3D content = GrafreeD.clipboard.get(0);
20532165 //
20542166 // if (content instanceof cGroup && ((cGroup)content).transientlink )
20552167 // content = ((cGroup)content).get(0);
....@@ -2058,39 +2170,48 @@
20582170 // group.selection.get(0).setMasterThis(content); // should be identity
20592171 // refreshContents();
20602172 // }
2061
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
2173
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
20622174 {
2063
- Object3D content = GraphreeD.clipboard.get(0);
2175
+ Object3D content = GrafreeD.clipboard.get(0);
20642176
20652177 if (content instanceof cGroup && ((cGroup)content).transientlink )
20662178 content = ((cGroup)content).get(0);
20672179
2068
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2180
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20692181 for (int i=0; i<group.selection.size(); i++)
20702182 {
2071
- boolean random = CameraPane.RANDOM;
2072
- CameraPane.RANDOM = false; // parse all random nodes
2183
+ boolean random = CameraPane.SWITCH;
2184
+ CameraPane.SWITCH = false; // parse all random nodes
20732185 group.selection.get(i).linkVerticesThis(content);
20742186 // group.selection.get(i).setMasterThis(content); // should be identity
2075
- CameraPane.RANDOM = random;
2187
+ CameraPane.SWITCH = random;
20762188 }
2077
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2189
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
20782190 refreshContents();
20792191 }
20802192 } else
2081
- if (event.getSource() == resetsupportItem)
2193
+ if (source == resetsupportItem)
20822194 {
20832195 for (int i=0; i<group.selection.size(); i++)
20842196 {
2085
- boolean random = CameraPane.RANDOM;
2086
- CameraPane.RANDOM = false; // parse all random nodes
2197
+ boolean random = CameraPane.SWITCH;
2198
+ CameraPane.SWITCH = false; // parse all random nodes
20872199 group.selection.get(i).linkVerticesThis(null);
2088
- CameraPane.RANDOM = random;
2200
+ CameraPane.SWITCH = random;
20892201 }
20902202
20912203 refreshContents();
20922204 } else
2093
- if (event.getSource() == resetreferencesItem)
2205
+ if (source == relinkverticesItem)
2206
+ {
2207
+ boolean random = CameraPane.SWITCH;
2208
+ CameraPane.SWITCH = false; // parse all random nodes
2209
+ group.selection.RelinkToSupport();
2210
+ CameraPane.SWITCH = random;
2211
+
2212
+ refreshContents();
2213
+ } else
2214
+ if (source == resetreferencesItem)
20942215 {
20952216 for (int i=0; i<group.selection.size(); i++)
20962217 {
....@@ -2099,11 +2220,11 @@
20992220
21002221 refreshContents();
21012222 } else
2102
- if (event.getSource() == setMasterItem)
2223
+ if (source == setMasterItem)
21032224 {
2104
- if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2225
+ if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21052226 {
2106
- Object3D content = GraphreeD.clipboard.get(0);
2227
+ Object3D content = GrafreeD.clipboard.get(0);
21072228
21082229 if (content instanceof cGroup && ((cGroup)content).transientlink )
21092230 content = ((cGroup)content).get(0);
....@@ -2112,13 +2233,13 @@
21122233 refreshContents();
21132234 }
21142235 } else
2115
- if (event.getSource() == poseMeshItem)
2236
+ if (source == poseMeshItem)
21162237 {
21172238 if (group.selection.size() == 1)
21182239 {
2119
- if (GraphreeD.clipboard.size() == 1)
2240
+ if (GrafreeD.clipboard.size() == 1)
21202241 {
2121
- Object3D content = GraphreeD.clipboard.get(0);
2242
+ Object3D content = GrafreeD.clipboard.get(0);
21222243
21232244 if (content instanceof cGroup && ((cGroup)content).transientlink )
21242245 content = ((cGroup)content).get(0);
....@@ -2131,19 +2252,19 @@
21312252 }
21322253
21332254 } else
2134
- if (event.getSource() == revertMeshItem)
2255
+ if (source == revertMeshItem)
21352256 {
21362257 RevertMeshes();
21372258 } else
2138
- if (event.getSource() == resetMeshItem)
2259
+ if (source == resetMeshItem)
21392260 {
21402261 ResetAll();
21412262 } else
2142
- if (event.getSource() == stepAllItem)
2263
+ if (source == stepAllItem)
21432264 {
21442265 StepAll();
21452266 } else
2146
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2267
+ if (source == clearItem) // || event.getSource() == clearButton)
21472268 {
21482269 //int indices[] = jList.getSelectedIndices();
21492270 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2151,42 +2272,46 @@
21512272
21522273 ClearSelection(false);
21532274 } else
2154
- if (event.getSource() == clearAllItem)
2275
+ if (source == clearAllItem)
21552276 {
21562277 ClearSelection(true);
21572278 } else
2158
- if (event.getSource() == grabItem)
2279
+ if (source == grabItem)
21592280 {
21602281 group(new cGroup(), true);
21612282 } else
2162
- if (event.getSource() == frontItem)
2283
+ if (source == hideItem)
2284
+ {
2285
+ group(new HiddenObject());
2286
+ } else
2287
+ if (source == frontItem)
21632288 {
21642289 front();
21652290 } else
2166
- if (event.getSource() == backItem)
2291
+ if (source == backItem)
21672292 {
21682293 back();
21692294 } else
2170
- if (event.getSource() == cameraItem)
2295
+ if (source == cameraItem)
21712296 {
21722297 makeSomething(new Camera());
21732298 } else
2174
- if (event.getSource() == compositeItem)
2299
+ if (source == compositeItem)
21752300 {
21762301 group(new Composite());
21772302 } else
2178
- if (event.getSource() == randomItem)
2303
+ if (source == randomItem)
21792304 {
21802305 RandomNode random = new RandomNode();
21812306 group(random);
21822307 if (random.size() > 0)
2183
- random.name = random.get(0).name + "Rnd";
2308
+ random.name = random.get(0).name + "Switch";
21842309 } else
2185
- if (event.getSource() == physicsItem)
2310
+ if (source == physicsItem)
21862311 {
21872312 group(new PhysicsNode());
21882313 } else
2189
- if (event.getSource() == frameselectorItem)
2314
+ if (source == frameselectorItem)
21902315 {
21912316 for (int i=0; i<group.selection.size(); i++)
21922317 {
....@@ -2198,7 +2323,7 @@
21982323 ResetModel();
21992324 refreshContents();
22002325 } else
2201
- if (event.getSource() == switchGeoItem)
2326
+ if (source == switchGeoItem)
22022327 {
22032328 for (int i=0; i<group.selection.size(); i++)
22042329 {
....@@ -2210,7 +2335,7 @@
22102335 ResetModel();
22112336 refreshContents();
22122337 } else
2213
- if (event.getSource() == switchTransfoItem)
2338
+ if (source == switchTransfoItem)
22142339 {
22152340 for (int i=0; i<group.selection.size(); i++)
22162341 {
....@@ -2222,7 +2347,7 @@
22222347 ResetModel();
22232348 refreshContents();
22242349 } else
2225
- if (event.getSource() == morphItem)
2350
+ if (source == morphItem)
22262351 {
22272352 for (int i=0; i<group.selection.size(); i++)
22282353 {
....@@ -2234,7 +2359,7 @@
22342359 ResetModel();
22352360 refreshContents();
22362361 } else
2237
- if (event.getSource() == scriptNodeItem)
2362
+ if (source == scriptNodeItem)
22382363 {
22392364 boolean atleastone = false;
22402365
....@@ -2273,195 +2398,215 @@
22732398 }
22742399 }
22752400 } else
2276
- if (event.getSource() == linkerItem)
2401
+ if (source == linkerItem)
22772402 {
22782403 group(new cLinker());
22792404 } else
2280
- if (event.getSource() == textureItem)
2405
+ if (source == textureItem)
22812406 {
22822407 group(new TextureNode());
22832408 } else
2284
- if (event.getSource() == shadowXItem)
2409
+ if (source == billboardItem)
2410
+ {
2411
+ group(new BillboardNode());
2412
+ } else
2413
+ if (source == shadowXItem)
22852414 {
22862415 CastShadow(0);
22872416 } else
2288
- if (event.getSource() == shadowYItem)
2417
+ if (source == shadowYItem)
22892418 {
22902419 CastShadow(1);
22912420 } else
2292
- if (event.getSource() == shadowZItem)
2421
+ if (source == shadowZItem)
22932422 {
22942423 CastShadow(2);
22952424 } else
2296
- if (event.getSource() == ungroupItem)
2425
+ if (source == ungroupItem)
22972426 {
2298
- ungroup();
2427
+ //ungroup();
2428
+ for (int i=0; i<group.selection.size(); i++)
2429
+ {
2430
+ Ungroup(group.selection.get(i));
2431
+ }
2432
+
2433
+ ClearSelection(false);
2434
+
2435
+ refreshContents();
22992436 } else
2300
- if (event.getSource() == genUVItem)
2437
+ if (source == genUVItem)
23012438 {
23022439 GenUV();
23032440 } else
2304
- if (event.getSource() == genNormalsCADItem)
2441
+ if (source == genNormalsCADItem)
23052442 {
23062443 GenNormals(true);
23072444 } else
2308
- if (event.getSource() == genNormalsORGANItem)
2445
+ if (source == genNormalsMESHItem)
2446
+ {
2447
+ GenNormals(true); // TODO
2448
+ } else
2449
+ if (source == genNormalsORGANItem)
23092450 {
23102451 GenNormals(false);
23112452 } else
2312
- if (event.getSource() == stripifyItem)
2453
+ if (source == genNormalsMINEItem)
2454
+ {
2455
+ GenNormalsMINE();
2456
+ } else
2457
+ if (source == stripifyItem)
23132458 {
23142459 Stripify();
23152460 } else
2316
- if (event.getSource() == unstripifyItem)
2461
+ if (source == unstripifyItem)
23172462 {
23182463 Unstripify();
23192464 } else
2320
- if (event.getSource() == trimItem)
2465
+ if (source == trimItem)
23212466 {
23222467 Trim();
23232468 } else
2324
- if (event.getSource() == untrimItem)
2469
+ if (source == untrimItem)
23252470 {
23262471 Untrim();
23272472 } else
2328
- if (event.getSource() == clearColorsItem)
2473
+ if (source == clearColorsItem)
23292474 {
23302475 ClearColors();
23312476 } else
2332
- if (event.getSource() == clearMaterialsItem)
2477
+ if (source == clearMaterialsItem)
23332478 {
23342479 ClearMaterials();
23352480 } else
2336
- if (event.getSource() == liveleavesItem)
2481
+ if (source == liveleavesItem)
23372482 {
23382483 LiveLeaves(true);
23392484 } else
2340
- if (event.getSource() == unliveleavesItem)
2485
+ if (source == unliveleavesItem)
23412486 {
23422487 LiveLeaves(false);
23432488 } else
2344
- if (event.getSource() == supportleavesItem)
2489
+ if (source == supportleavesItem)
23452490 {
23462491 SupportLeaves(true);
23472492 } else
2348
- if (event.getSource() == unsupportleavesItem)
2493
+ if (source == unsupportleavesItem)
23492494 {
23502495 SupportLeaves(false);
23512496 } else
2352
- if (event.getSource() == hideleavesItem)
2497
+ if (source == hideleavesItem)
23532498 {
23542499 HideLeaves(true);
23552500 } else
2356
- if (event.getSource() == showleavesItem)
2501
+ if (source == showleavesItem)
23572502 {
23582503 HideLeaves(false);
23592504 } else
2360
- if (event.getSource() == markleavesItem)
2505
+ if (source == markleavesItem)
23612506 {
23622507 MarkLeaves(true);
23632508 } else
2364
- if (event.getSource() == unmarkleavesItem)
2509
+ if (source == unmarkleavesItem)
23652510 {
23662511 MarkLeaves(false);
23672512 } else
2368
- if (event.getSource() == flipVItem)
2513
+ if (source == flipVItem)
23692514 {
23702515 FlipV(true);
23712516 } else
2372
- if (event.getSource() == unflipVItem)
2517
+ if (source == unflipVItem)
23732518 {
23742519 FlipV(false);
23752520 } else
2376
- if (event.getSource() == lowTexturesItem)
2521
+ if (source == lowTexturesItem)
23772522 {
23782523 SetTexRes(0);
23792524 } else
2380
- if (event.getSource() == normalTexturesItem)
2525
+ if (source == normalTexturesItem)
23812526 {
23822527 SetTexRes(1);
23832528 } else
2384
- if (event.getSource() == highTexturesItem)
2529
+ if (source == highTexturesItem)
23852530 {
23862531 SetTexRes(2);
23872532 } else
2388
- if (event.getSource() == veryhighTexturesItem)
2533
+ if (source == veryhighTexturesItem)
23892534 {
23902535 SetTexRes(3);
23912536 } else
2392
- if (event.getSource() == maxTexturesItem)
2537
+ if (source == maxTexturesItem)
23932538 {
23942539 SetTexRes(4);
23952540 } else
2396
- if (event.getSource() == panoTexturesItem)
2541
+ if (source == panoTexturesItem)
23972542 {
23982543 SetTexRes(5);
23992544 } else
2400
- if (event.getSource() == reverseNormalsItem)
2545
+ if (source == reverseNormalsItem)
24012546 {
24022547 ReverseNormals();
24032548 } else
2404
- if (event.getSource() == parseverticesItem)
2549
+ if (source == parseverticesItem)
24052550 {
24062551 ParseVertices();
24072552 } else
2408
- if (event.getSource() == textureFieldItem)
2553
+ if (source == textureFieldItem)
24092554 {
24102555 TextureVertices();
24112556 } else
2412
- if (event.getSource() == alignItem)
2557
+ if (source == alignItem)
24132558 {
24142559 Align();
24152560 } else
2416
- if (event.getSource() == mirrorItem)
2561
+ if (source == mirrorItem)
24172562 {
24182563 MirrorPoses();
24192564 } else
2420
- if (event.getSource() == reduceMorphItem)
2565
+ if (source == reduceMorphItem)
24212566 {
24222567 MeshReduction(false);
24232568 } else
2424
- if (event.getSource() == reduce34MorphItem)
2569
+ if (source == reduce34MorphItem)
24252570 {
24262571 MeshReduction(true);
24272572 } else
2428
- if (event.getSource() == reverseTrianglesItem)
2573
+ if (source == reverseTrianglesItem)
24292574 {
24302575 ReverseTriangles();
24312576 } else
2432
- if (event.getSource() == reduceMeshItem)
2577
+ if (source == reduceMeshItem)
24332578 {
24342579 ReduceMesh(false);
24352580 } else
2436
- if (event.getSource() == reduce34MeshItem)
2581
+ if (source == reduce34MeshItem)
24372582 {
24382583 ReduceMesh(true);
24392584 } else
2440
- if (event.getSource() == increaseMeshItem)
2585
+ if (source == increaseMeshItem)
24412586 {
24422587 IncreaseMesh();
24432588 } else
2444
- if (event.getSource() == clipMeshItem)
2589
+ if (source == clipMeshItem)
24452590 {
24462591 ClipMesh();
24472592 } else
2448
- if (event.getSource() == smoothMeshItem)
2593
+ if (source == smoothMeshItem)
24492594 {
24502595 SmoothMesh();
24512596 } else
2452
- if (event.getSource() == transformgeometryItem)
2597
+ if (source == transformgeometryItem)
24532598 {
24542599 TransformGeometry();
24552600 } else
2456
- if (event.getSource() == resetTransformItem)
2601
+ if (source == resetTransformItem)
24572602 {
24582603 ResetTransform();
24592604 } else
2460
- if (event.getSource() == resetCentroidItem)
2605
+ if (source == resetCentroidItem)
24612606 {
24622607 ResetCentroid();
24632608 } else
2464
- if (event.getSource() == resetParentItem)
2609
+ if (source == resetParentItem)
24652610 {
24662611 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24672612 {
....@@ -2471,7 +2616,7 @@
24712616
24722617 refreshContents();
24732618 } else
2474
- if (event.getSource() == repairParentItem)
2619
+ if (source == repairParentItem)
24752620 {
24762621 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24772622 {
....@@ -2485,7 +2630,21 @@
24852630
24862631 refreshContents();
24872632 } else
2488
- if (event.getSource() == sortbysizeItem)
2633
+ if (source == repairShadowItem)
2634
+ {
2635
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2636
+ {
2637
+ Object3D obj = (Object3D)e.nextElement();
2638
+ obj.RepairShadow();
2639
+// for (int i=0; i<obj.size(); i++)
2640
+// {
2641
+// obj.get(i).parent = obj;
2642
+// }
2643
+ }
2644
+
2645
+ refreshContents();
2646
+ } else
2647
+ if (source == sortbysizeItem)
24892648 {
24902649 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24912650 {
....@@ -2497,7 +2656,7 @@
24972656 ResetModel();
24982657 refreshContents();
24992658 } else
2500
- if (event.getSource() == sortbynameItem)
2659
+ if (source == sortbynameItem)
25012660 {
25022661 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25032662 {
....@@ -2509,7 +2668,7 @@
25092668 ResetModel();
25102669 refreshContents();
25112670 } else
2512
- if (event.getSource() == attachPigmentItem)
2671
+ if (source == attachPigmentItem)
25132672 {
25142673 String texture = GetFile("Attach pigment");
25152674 Object3D obj;
....@@ -2521,7 +2680,7 @@
25212680
25222681 refreshContents();
25232682 } else
2524
- if (event.getSource() == detachPigmentItem)
2683
+ if (source == detachPigmentItem)
25252684 {
25262685 Object3D obj;
25272686 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2532,7 +2691,7 @@
25322691
25332692 refreshContents();
25342693 } else
2535
- if (event.getSource() == attachBumpItem)
2694
+ if (source == attachBumpItem)
25362695 {
25372696 String texture = GetFile("Attach bump");
25382697 Object3D obj;
....@@ -2544,7 +2703,7 @@
25442703
25452704 refreshContents();
25462705 } else
2547
- if (event.getSource() == detachBumpItem)
2706
+ if (source == detachBumpItem)
25482707 {
25492708 Object3D obj;
25502709 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2555,7 +2714,7 @@
25552714
25562715 refreshContents();
25572716 } else
2558
- if (event.getSource() == pigmentBumpItem)
2717
+ if (source == pigmentBumpItem)
25592718 {
25602719 Object3D obj;
25612720 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2566,158 +2725,195 @@
25662725
25672726 refreshContents();
25682727 } else
2569
- if (event.getSource() == flashSelectionButton)
2728
+ if (source == flashSelectionButton)
25702729 {
25712730 CameraPane.flash = true;
25722731 refreshContents();
25732732 } else
2574
- if (event.getSource() == oneButton)
2733
+ if (source == oneButton)
25752734 {
25762735 } else
2577
- if (event.getSource() == twoButton)
2736
+ if (source == twoButton)
25782737 {
25792738 radio.layout = twoButton;
25802739 // bug
25812740 //gridPanel.setDividerLocation(1.0);
25822741 //bigPanel.setDividerLocation(0.0);
2583
- bigThree.remove(jtp);
2584
- bigThree.remove(cameraPanel);
2585
- bigThree.remove(XYZPanel);
2586
- aWindowConstraints.gridx = 0;
2587
- aWindowConstraints.gridy = 0;
2588
- aWindowConstraints.gridwidth = 1;
2589
- // aConstraints.gridheight = 3;
2590
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2591
- aWindowConstraints.weightx = 0;
2592
- aWindowConstraints.weighty = 1;
2593
- //bigThree.add(jtp, aWindowConstraints);
2594
- aWindowConstraints.weightx = 1;
2595
- aWindowConstraints.gridwidth = 3;
2596
- // aConstraints.gridheight = 3;
2597
- aWindowConstraints.gridx = 1;
2598
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2599
- bigThree.add(cameraPanel, aWindowConstraints);
2600
- aWindowConstraints.weightx = 0;
2601
- aWindowConstraints.gridx = 4;
2602
- aWindowConstraints.gridwidth = 1;
2603
- // aConstraints.gridheight = 3;
2604
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2605
- //bigThree.add(XYZPanel, aWindowConstraints);
2606
- bigThree.revalidate();
2742
+// bigThree.remove(scenePanel);
2743
+// bigThree.remove(centralPanel);
2744
+// bigThree.remove(XYZPanel);
2745
+// aWindowConstraints.gridx = 0;
2746
+// aWindowConstraints.gridy = 0;
2747
+// aWindowConstraints.gridwidth = 1;
2748
+// // aConstraints.gridheight = 3;
2749
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2750
+// aWindowConstraints.weightx = 0;
2751
+// aWindowConstraints.weighty = 1;
2752
+// //bigThree.add(jtp, aWindowConstraints);
2753
+// aWindowConstraints.weightx = 1;
2754
+// aWindowConstraints.gridwidth = 3;
2755
+// // aConstraints.gridheight = 3;
2756
+// aWindowConstraints.gridx = 1;
2757
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2758
+// bigThree.add(centralPanel, aWindowConstraints);
2759
+// aWindowConstraints.weightx = 0;
2760
+// aWindowConstraints.gridx = 4;
2761
+// aWindowConstraints.gridwidth = 1;
2762
+// // aConstraints.gridheight = 3;
2763
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2764
+// //bigThree.add(XYZPanel, aWindowConstraints);
2765
+// scenePanel.setVisible(false);
2766
+// centralPanel.setVisible(true);
2767
+// XYZPanel.setVisible(false);
2768
+ bigThree.ClearUI();
2769
+ bigThree.add(centralPanel);
2770
+ bigThree.FlushUI();
26072771 } else
2608
- if (event.getSource() == threeButton)
2772
+ if (source == threeButton)
26092773 {
26102774 radio.layout = threeButton;
2611
- bigThree.remove(jtp);
2612
- bigThree.remove(cameraPanel);
2613
- bigThree.remove(XYZPanel);
2614
- aWindowConstraints.gridx = 0;
2615
- aWindowConstraints.gridy = 0;
2616
- aWindowConstraints.gridwidth = 1;
2617
- // aConstraints.gridheight = 3;
2618
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2619
- aWindowConstraints.weightx = 0;
2620
- aWindowConstraints.weighty = 1;
2621
- //bigThree.add(jtp, aWindowConstraints);
2622
- aWindowConstraints.weightx = 1;
2623
- aWindowConstraints.gridwidth = 3;
2624
- // aConstraints.gridheight = 3;
2625
- aWindowConstraints.gridx = 1;
2626
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2627
- bigThree.add(cameraPanel, aWindowConstraints);
2628
- aWindowConstraints.weightx = 0;
2629
- aWindowConstraints.gridx = 4;
2630
- aWindowConstraints.gridwidth = 1;
2631
- // aConstraints.gridheight = 3;
2632
- aConstraints.fill = GridBagConstraints.VERTICAL;
2633
- bigThree.add(XYZPanel, aWindowConstraints);
2634
- bigThree.revalidate();
2775
+
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
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2798
+// bigThree.add(XYZPanel, aWindowConstraints);
2799
+// bigThree.validate();
2800
+// scenePanel.setVisible(false);
2801
+// centralPanel.setVisible(true);
2802
+// XYZPanel.setVisible(true);
2803
+ bigThree.ClearUI();
2804
+ bigThree.add(centralPanel);
2805
+ bigThree.add(XYZPanel);
2806
+ bigThree.FlushUI();
26352807 } else
2636
- if (event.getSource() == fourButton)
2808
+ if (source == fourButton)
26372809 {
26382810 radio.layout = fourButton;
2639
- bigThree.remove(jtp);
2640
- bigThree.remove(cameraPanel);
2641
- bigThree.remove(XYZPanel);
2642
- aWindowConstraints.gridx = 0;
2643
- aWindowConstraints.gridy = 0;
2644
- aWindowConstraints.gridwidth = 1;
2645
- // aWindowConstraints.gridheight = 3;
2646
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2647
- aWindowConstraints.weightx = 1;
2648
- aWindowConstraints.weighty = 1;
2649
- bigThree.add(jtp, aWindowConstraints);
2650
- aWindowConstraints.weightx = 1;
2651
- aWindowConstraints.gridwidth = 3;
2652
- // aConstraints.gridheight = 3;
2653
- aWindowConstraints.gridx = 1;
2654
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2655
- //bigThree.add(cameraPanel, aWindowConstraints);
2656
- aWindowConstraints.weightx = 0;
2657
- aWindowConstraints.gridx = 4;
2658
- aWindowConstraints.gridwidth = 1;
2659
- // aWindowConstraints.gridheight = 3;
2660
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2661
- //bigThree.add(XYZPanel, aWindowConstraints);
2662
- bigThree.revalidate();
2811
+
2812
+// bigThree.remove(scenePanel);
2813
+// bigThree.remove(centralPanel);
2814
+// bigThree.remove(XYZPanel);
2815
+// aWindowConstraints.gridx = 0;
2816
+// aWindowConstraints.gridy = 0;
2817
+// aWindowConstraints.gridwidth = 1;
2818
+// // aWindowConstraints.gridheight = 3;
2819
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2820
+// aWindowConstraints.weightx = 1;
2821
+// aWindowConstraints.weighty = 1;
2822
+// bigThree.add(scenePanel, aWindowConstraints);
2823
+// aWindowConstraints.weightx = 1;
2824
+// aWindowConstraints.gridwidth = 3;
2825
+// // aConstraints.gridheight = 3;
2826
+// aWindowConstraints.gridx = 1;
2827
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2828
+// //bigThree.add(cameraPanel, aWindowConstraints);
2829
+// aWindowConstraints.weightx = 0;
2830
+// aWindowConstraints.gridx = 4;
2831
+// aWindowConstraints.gridwidth = 1;
2832
+// // aWindowConstraints.gridheight = 3;
2833
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2834
+// //bigThree.add(XYZPanel, aWindowConstraints);
2835
+// bigThree.validate();
2836
+// scenePanel.setVisible(true);
2837
+// centralPanel.setVisible(false);
2838
+// XYZPanel.setVisible(false);
2839
+ bigThree.ClearUI();
2840
+ bigThree.add(scenePanel);
2841
+ bigThree.FlushUI();
26632842 } else
2664
- if (event.getSource() == sixButton)
2843
+ if (source == sixButton)
26652844 {
26662845 radio.layout = sixButton;
2667
- bigThree.remove(jtp);
2668
- bigThree.remove(cameraPanel);
2669
- bigThree.remove(XYZPanel);
2670
- aWindowConstraints.gridx = 0;
2671
- aWindowConstraints.gridy = 0;
2672
- aWindowConstraints.gridwidth = 1;
2673
- // aConstraints.gridheight = 3;
2674
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2675
- aWindowConstraints.weightx = 0;
2676
- aWindowConstraints.weighty = 1;
2677
- bigThree.add(jtp, aWindowConstraints);
2678
- aWindowConstraints.weightx = 1;
2679
- aWindowConstraints.gridwidth = 3;
2680
- // aWindowConstraints.gridheight = 3;
2681
- aWindowConstraints.gridx = 1;
2682
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2683
- bigThree.add(cameraPanel, aWindowConstraints);
2684
- aWindowConstraints.weightx = 0;
2685
- aWindowConstraints.gridx = 4;
2686
- aWindowConstraints.gridwidth = 1;
2687
- // aWindowConstraints.gridheight = 3;
2688
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2689
- //bigThree.add(XYZPanel, aConstraints);
2690
- bigThree.revalidate();
2846
+
2847
+// bigThree.remove(scenePanel);
2848
+// bigThree.remove(centralPanel);
2849
+// bigThree.remove(XYZPanel);
2850
+// aWindowConstraints.gridx = 0;
2851
+// aWindowConstraints.gridy = 0;
2852
+// aWindowConstraints.gridwidth = 1;
2853
+// // aConstraints.gridheight = 3;
2854
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2855
+// aWindowConstraints.weightx = 0;
2856
+// aWindowConstraints.weighty = 1;
2857
+// bigThree.add(scenePanel, aWindowConstraints);
2858
+// aWindowConstraints.weightx = 1;
2859
+// aWindowConstraints.gridwidth = 3;
2860
+// // aWindowConstraints.gridheight = 3;
2861
+// aWindowConstraints.gridx = 1;
2862
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2863
+// bigThree.add(centralPanel, aWindowConstraints);
2864
+// aWindowConstraints.weightx = 0;
2865
+// aWindowConstraints.gridx = 4;
2866
+// aWindowConstraints.gridwidth = 1;
2867
+// // aWindowConstraints.gridheight = 3;
2868
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2869
+// //bigThree.add(XYZPanel, aConstraints);
2870
+// bigThree.validate();
2871
+// scenePanel.setVisible(true);
2872
+// centralPanel.setVisible(true);
2873
+// XYZPanel.setVisible(false);
2874
+ bigThree.ClearUI();
2875
+ bigThree.add(scenePanel);
2876
+ bigThree.add(centralPanel);
2877
+ bigThree.FlushUI();
26912878 } else
2692
- if (event.getSource() == sevenButton)
2879
+ if (source == sevenButton)
26932880 {
26942881 radio.layout = sevenButton;
2695
- bigThree.remove(jtp);
2696
- bigThree.remove(cameraPanel);
2697
- bigThree.remove(XYZPanel);
2698
- aWindowConstraints.gridx = 0;
2699
- aWindowConstraints.gridy = 0;
2700
- aWindowConstraints.gridwidth = 1;
2701
- // aWindowConstraints.gridheight = 3;
2702
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2703
- aWindowConstraints.weightx = 0;
2704
- aWindowConstraints.weighty = 1;
2705
- bigThree.add(jtp, aWindowConstraints);
2706
- aWindowConstraints.weightx = 1;
2707
- aWindowConstraints.gridwidth = 3;
2708
- // aWindowConstraints.gridheight = 3;
2709
- aWindowConstraints.gridx = 1;
2710
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2711
- bigThree.add(cameraPanel, aWindowConstraints);
2712
- aWindowConstraints.weightx = 0;
2713
- aWindowConstraints.gridx = 4;
2714
- aWindowConstraints.gridwidth = 1;
2715
- // aConstraints.gridheight = 3;
2716
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2717
- bigThree.add(XYZPanel, aWindowConstraints);
2718
- bigThree.revalidate();
2882
+
2883
+// bigThree.remove(scenePanel);
2884
+// bigThree.remove(centralPanel);
2885
+// bigThree.remove(XYZPanel);
2886
+// aWindowConstraints.gridx = 0;
2887
+// aWindowConstraints.gridy = 0;
2888
+// aWindowConstraints.gridwidth = 1;
2889
+// // aWindowConstraints.gridheight = 3;
2890
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2891
+// aWindowConstraints.weightx = 0;
2892
+// aWindowConstraints.weighty = 1;
2893
+// bigThree.add(scenePanel, aWindowConstraints);
2894
+// aWindowConstraints.weightx = 1;
2895
+// aWindowConstraints.gridwidth = 3;
2896
+// // aWindowConstraints.gridheight = 3;
2897
+// aWindowConstraints.gridx = 1;
2898
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2899
+// bigThree.add(centralPanel, aWindowConstraints);
2900
+// aWindowConstraints.weightx = 0;
2901
+// aWindowConstraints.gridx = 4;
2902
+// aWindowConstraints.gridwidth = 1;
2903
+// // aConstraints.gridheight = 3;
2904
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2905
+// bigThree.add(XYZPanel, aWindowConstraints);
2906
+// bigThree.validate();
2907
+// scenePanel.setVisible(true);
2908
+// centralPanel.setVisible(true);
2909
+// XYZPanel.setVisible(true);
2910
+ bigThree.ClearUI();
2911
+ bigThree.add(scenePanel);
2912
+ bigThree.add(centralPanel);
2913
+ bigThree.add(XYZPanel);
2914
+ bigThree.FlushUI();
27192915 } else
2720
- if (event.getSource() == rootButton)
2916
+ if (source == rootButton)
27212917 {
27222918 Object3D obj;
27232919 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2729,7 +2925,7 @@
27292925
27302926 refreshContents(true);
27312927 } else
2732
- if (event.getSource() == closeButton)
2928
+ if (source == closeButton)
27332929 {
27342930 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27352931 cRadio ab;
....@@ -2750,11 +2946,11 @@
27502946 }
27512947 refreshContents(true);
27522948 } else
2753
- if (event.getSource() == editItem || event.getSource() == editButton)
2949
+ if (source == editItem || source == editButton)
27542950 {
27552951 EditSelection(false);
27562952 } else
2757
- if (event.getSource() == uneditButton)
2953
+ if (source == uneditButton)
27582954 {
27592955 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
27602956 {
....@@ -2766,12 +2962,12 @@
27662962
27672963 child.editWindow = null; // ???????????
27682964 }
2769
- objEditor.ctrlPanel.revalidate();
2965
+ objEditor.ctrlPanel.FlushUI();
27702966 //objEditor.jTree.clearSelection();
27712967 //objEditor.ResetSliders();
27722968 refreshContents(true);
27732969 } else
2774
- if (event.getSource() == clearPanelButton)
2970
+ if (source == clearPanelButton)
27752971 {
27762972 assert(copy == group);
27772973 //copy.ClearUI();
....@@ -2782,7 +2978,7 @@
27822978 listUI.clear();
27832979 refreshContents(true);
27842980 } else
2785
- if (event.getSource() == allParamsButton)
2981
+ if (source == allParamsButton)
27862982 {
27872983 assert(copy == group);
27882984
....@@ -2803,19 +2999,19 @@
28032999
28043000 refreshContents(true);
28053001 } else
2806
- if (event.getSource() == unselectButton)
3002
+ if (source == unselectButton)
28073003 {
28083004 objEditor.jTree.clearSelection();
2809
- // ?? oct 2012 GraphreeD.clipboard.clear();
3005
+ // ?? oct 2012 GrafreeD.clipboard.clear();
28103006 objEditor.ResetSliders();
28113007 refreshContents(true);
28123008 } else
2813
- if(event.getSource() instanceof cRadio)
3009
+ if(source instanceof cRadio)
28143010 {
28153011 group.parent = keepparent;
28163012 group.attributes = 0;
28173013 //group.editWindow = null;
2818
- /*cRadio*/ radio = (cRadio)event.getSource();
3014
+ /*cRadio*/ radio = (cRadio)source;
28193015 Object3D obj = radio.GetObject();
28203016 System.out.println("Edit " + obj);
28213017 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2835,7 +3031,7 @@
28353031 }
28363032
28373033 copy = group;
2838
- //CameraPane.theRenderer.object = group;
3034
+ //Globals.theRenderer.object = group;
28393035 if(!useclient)
28403036 {
28413037 cameraView.renderCamera = radio.camera;
....@@ -2844,7 +3040,8 @@
28443040 cameraView.cameras[cameraView.cameracount] = radio.camera;
28453041 cameraView.targetLookAt.set(radio.camera.lookAt);
28463042 cameraView.object = group;
2847
- cameraView.lighttouched = true;
3043
+ //cameraView.lighttouched = true;
3044
+ Globals.lighttouched = true;
28483045 topView.object = group;
28493046 frontView.object = group;
28503047 sideView.object = group;
....@@ -2880,7 +3077,7 @@
28803077 if (useclient)
28813078 {
28823079 cameraView.object = client;
2883
- cameraView.lighttouched = true;
3080
+ Globals.lighttouched = true;
28843081 //topView.object = client;
28853082 //frontView.object = client;
28863083 //sideView.object = client;
....@@ -2888,7 +3085,7 @@
28883085 else
28893086 {
28903087 cameraView.object = group;
2891
- cameraView.lighttouched = true;
3088
+ Globals.lighttouched = true;
28923089 //topView.object = group;
28933090 //frontView.object = group;
28943091 //sideView.object = group;
....@@ -3121,9 +3318,9 @@
31213318 obj = (Object3D)e.nextElement();
31223319
31233320 System.out.println("Object is: " + obj);
3124
- GraphreeD.AnalyzeObject(obj);
3321
+ GrafreeD.AnalyzeObject(obj);
31253322 System.out.println("Boundary rep: " + obj.bRep);
3126
- GraphreeD.AnalyzeObject(obj.bRep);
3323
+ GrafreeD.AnalyzeObject(obj.bRep);
31273324
31283325 // System.err.println((size/1024) + " KB is the size of " + obj);
31293326 }
....@@ -3165,6 +3362,13 @@
31653362 void GenNormals(boolean crease)
31663363 {
31673364 group.GenNormalsS(crease);
3365
+
3366
+ refreshContents();
3367
+ }
3368
+
3369
+ void GenNormalsMINE()
3370
+ {
3371
+ group.selection.GenNormalsMINE();
31683372
31693373 refreshContents();
31703374 }
....@@ -3250,7 +3454,7 @@
32503454 // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
32513455 // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
32523456 //
3253
-// g.add(GraphreeD.clipboard);
3457
+// g.add(GrafreeD.clipboard);
32543458 //
32553459 // buffer.add(g);
32563460 // }
....@@ -3269,8 +3473,8 @@
32693473 // nodes = new Object3D();
32703474 // vertices = new Vector<Vertex>();
32713475 //
3272
-// boolean epsequal = GraphreeD.epsequal;
3273
-// GraphreeD.epsequal = true;
3476
+// boolean epsequal = GrafreeD.epsequal;
3477
+// GrafreeD.epsequal = true;
32743478 //
32753479 // for (int i=0; i<group.selection.size(); i++)
32763480 // {
....@@ -3311,7 +3515,7 @@
33113515 // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33123516 // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33133517 //
3314
-// g.add(GraphreeD.clipboard);
3518
+// g.add(GrafreeD.clipboard);
33153519 //
33163520 // buffer.add(g);
33173521 // }
....@@ -3319,7 +3523,7 @@
33193523 // makeSomething(buffer, i==group.selection.size()-1);
33203524 // }
33213525 //
3322
-// GraphreeD.epsequal = epsequal;
3526
+// GrafreeD.epsequal = epsequal;
33233527 //
33243528 // //buffer = null;
33253529 // temprep = null;
....@@ -3330,8 +3534,8 @@
33303534
33313535 void ParseVertices()
33323536 {
3333
- boolean epsequal = GraphreeD.epsequal;
3334
- GraphreeD.epsequal = true;
3537
+ boolean epsequal = GrafreeD.epsequal;
3538
+ GrafreeD.epsequal = true;
33353539
33363540 for (int i=0; i<group.selection.size(); i++)
33373541 {
....@@ -3356,7 +3560,7 @@
33563560 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33573561 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33583562
3359
- g.add(GraphreeD.clipboard);
3563
+ g.add(GrafreeD.clipboard);
33603564
33613565 buffer.add(g);
33623566 }
....@@ -3371,7 +3575,7 @@
33713575 makeSomething(buffer, i==group.selection.size()-1);
33723576 }
33733577
3374
- GraphreeD.epsequal = epsequal;
3578
+ GrafreeD.epsequal = epsequal;
33753579
33763580 refreshContents();
33773581 }
....@@ -3389,7 +3593,7 @@
33893593 String pigment = Object3D.GetPigment(tex);
33903594 //String bump = Object3D.GetBump(tex);
33913595
3392
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3596
+ com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
33933597
33943598 double s = v.s;
33953599
....@@ -3416,7 +3620,7 @@
34163620 scale /= 3;
34173621
34183622 scale /= 0xFF;
3419
- scale /= 4;
3623
+ // c'est quoi ca? scale /= 4;
34203624
34213625 //v.AO = scale;
34223626
....@@ -3437,12 +3641,26 @@
34373641
34383642 void Align()
34393643 {
3644
+ if (group.selection.size() == 0)
3645
+ return;
3646
+
3647
+ cVector bbmin = new cVector();
3648
+ cVector bbmax = new cVector();
3649
+
3650
+ group.selection.get(0).getBounds(bbmin, bbmax, true);
3651
+
3652
+ double dx = bbmax.x - bbmin.x;
3653
+ double dy = bbmax.y - bbmin.y;
3654
+ double dz = bbmax.z - bbmin.z;
3655
+
3656
+ double scale = Math.sqrt(dx*dx + dy*dy + dz*dz);
3657
+
34403658 for (int i=0; i<group.selection.size(); i++)
34413659 {
34423660 Object3D obj = group.selection.get(i);
34433661
3444
- LA.matTranslate(obj.toParent, i/2f, 0, 0);
3445
- LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0);
3662
+ LA.matTranslate(obj.toParent, i * scale, 0, 0);
3663
+ LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0);
34463664 }
34473665
34483666 refreshContents();
....@@ -3455,7 +3673,7 @@
34553673 // ref.SaveSupports();
34563674 // Object3D par = ref.parent;
34573675 // ref.parent = null;
3458
-// Object3D lowres = (Object3D) GraphreeD.clone(ref);
3676
+// Object3D lowres = (Object3D) GrafreeD.clone(ref);
34593677 // ref.parent = par;
34603678 // ref.RestoreSupports();
34613679
....@@ -3463,11 +3681,11 @@
34633681
34643682 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
34653683
3466
- boolean random = CameraPane.RANDOM;
3467
- CameraPane.RANDOM = false; // parse all random nodes
3684
+ boolean random = CameraPane.SWITCH;
3685
+ CameraPane.SWITCH = false; // parse all random nodes
34683686 lowres.linkVerticesThis(null);
34693687 lowres.linkVerticesThis(sn);
3470
- CameraPane.RANDOM = random;
3688
+ CameraPane.SWITCH = random;
34713689
34723690 System.err.flush();
34733691
....@@ -3485,7 +3703,7 @@
34853703 // lowres.SaveSupports();
34863704 // par = lowres.parent;
34873705 // lowres.parent = null;
3488
-// Object3D newlow = (Object3D) GraphreeD.clone(lowres);
3706
+// Object3D newlow = (Object3D) GrafreeD.clone(lowres);
34893707 Object3D newlow = CloneObject(lowres, false);
34903708 newlow.name = sn.switchobject.get(i).name;
34913709 System.out.println(" pose#" + i + " = " + newlow);
....@@ -3507,7 +3725,7 @@
35073725 return;
35083726
35093727 Object3D poses = group.selection.get(0);
3510
- Object3D ref = GraphreeD.clipboard.get(0);
3728
+ Object3D ref = GrafreeD.clipboard.get(0);
35113729
35123730 Object3D newgroup = new Object3D("Po:" + poses.name);
35133731
....@@ -3676,7 +3894,7 @@
36763894 group.selection.RelinkToSupport(); // july 2014
36773895 System.out.println("DONE.");
36783896 refreshContents();
3679
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3897
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
36803898 }
36813899
36823900 void ReduceMesh(boolean reduction34)
....@@ -3701,20 +3919,20 @@
37013919
37023920 void ClipMesh()
37033921 {
3704
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
3922
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
37053923 {
3706
- Object3D content = GraphreeD.clipboard.get(0);
3924
+ Object3D content = GrafreeD.clipboard.get(0);
37073925
37083926 if (content instanceof cGroup && ((cGroup)content).transientlink )
37093927 content = ((cGroup)content).get(0);
37103928
37113929 // for (int i=0; i<group.selection.size(); i++)
37123930 // {
3713
-// group.selection.get(i).ClipMesh(GraphreeD.clipboard);
3931
+// group.selection.get(i).ClipMesh(GrafreeD.clipboard);
37143932 // }
3715
- group.selection.ClipMesh(GraphreeD.clipboard);
3933
+ group.selection.ClipMesh(GrafreeD.clipboard);
37163934 }
3717
-// group.selection.ClipMesh(GraphreeD.clipboard);
3935
+// group.selection.ClipMesh(GrafreeD.clipboard);
37183936 System.out.println("DONE.");
37193937 refreshContents();
37203938 }
....@@ -3952,25 +4170,25 @@
39524170 System.err.println("info : " + child.GetPath());
39534171 }
39544172 }
3955
- else
3956
- {
3957
- objEditor.SetMaterial(group); // .GetMaterial());
3958
- objEditor.AddInfo(group, this, true); // .GetMaterial());
3959
- System.err.println("info : " + group.GetPath());
3960
- }
4173
+// else
4174
+// {
4175
+// objEditor.SetMaterial(group); // .GetMaterial());
4176
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4177
+// System.err.println("info : " + group.GetPath());
4178
+// }
39614179
39624180 objEditor.SetText(); // jan 2014
39634181
3964
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4182
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
39654183 CameraPane.flash = true;
39664184
39674185 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
39684186 // a camera
39694187 {
39704188 CameraPane.camerachangeframe = 0; // don't refuse it
3971
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
3972
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
3973
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4189
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4190
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4191
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
39744192 }
39754193
39764194 refreshContents();
....@@ -4052,12 +4270,12 @@
40524270 {
40534271 if (group.selection.isEmpty())
40544272 return;
4055
- GraphreeD.clipboardIsTempGroup = false;
4273
+ GrafreeD.clipboardIsTempGroup = false;
40564274 Composite tGroup = null;
40574275 if (group.selection.size() > 0) // 1)
40584276 {
40594277 tGroup = new cGroup();
4060
- GraphreeD.clipboardIsTempGroup = true;
4278
+ GrafreeD.clipboardIsTempGroup = true;
40614279 }
40624280
40634281 if (cut)
....@@ -4097,16 +4315,16 @@
40974315 //System.out.println("cut " + child);
40984316 //System.out.println("parent = " + child.parent);
40994317 // tmp.addChild(child);
4100
- if (GraphreeD.clipboardIsTempGroup)
4318
+ if (GrafreeD.clipboardIsTempGroup)
41014319 tGroup.add/*Child*/(tmp);
41024320 else
4103
- GraphreeD.clipboard = tmp;
4321
+ GrafreeD.clipboard = tmp;
41044322 }
41054323 else
4106
- if (GraphreeD.clipboardIsTempGroup)
4324
+ if (GrafreeD.clipboardIsTempGroup)
41074325 tGroup.add/*Child*/(child);
41084326 else
4109
- GraphreeD.clipboard = child;
4327
+ GrafreeD.clipboard = child;
41104328 }
41114329
41124330 //ResetModel();
....@@ -4138,21 +4356,21 @@
41384356 //System.out.println("cut " + elem);
41394357 //System.out.println("parent = " + elem.parent);
41404358 // tmp.addChild(elem);
4141
- if (GraphreeD.clipboardIsTempGroup)
4359
+ if (GrafreeD.clipboardIsTempGroup)
41424360 tGroup.add/*Child*/(tmp);
41434361 else
4144
- GraphreeD.clipboard = tmp;
4362
+ GrafreeD.clipboard = tmp;
41454363 }
41464364 else
4147
- if (GraphreeD.clipboardIsTempGroup)
4365
+ if (GrafreeD.clipboardIsTempGroup)
41484366 tGroup.add/*Child*/(child);
41494367 else
4150
- GraphreeD.clipboard = child;
4368
+ GrafreeD.clipboard = child;
41514369 }
41524370
41534371 }
4154
- if (GraphreeD.clipboardIsTempGroup)
4155
- GraphreeD.clipboard = tGroup;
4372
+ if (GrafreeD.clipboardIsTempGroup)
4373
+ GrafreeD.clipboard = tGroup;
41564374 if (cut)
41574375 {
41584376 ResetModel();
....@@ -4162,11 +4380,11 @@
41624380
41634381 void paste(boolean expand)
41644382 {
4165
- // if (GraphreeD.clipboard == null)
4383
+ // if (GrafreeD.clipboard == null)
41664384 // return;
41674385 boolean first = true;
41684386
4169
- if (GraphreeD.clipboardIsTempGroup)
4387
+ if (GrafreeD.clipboardIsTempGroup)
41704388 {
41714389 Composite temp;
41724390
....@@ -4177,7 +4395,7 @@
41774395 temp = (Composite)Applet3D.clipboard.deepCopy();
41784396 */
41794397 Object3D elem;
4180
- for (Enumeration e = /*temp.children*/GraphreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4398
+ for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
41814399 {
41824400 Object3D child = (Object3D)e.nextElement();
41834401
....@@ -4191,7 +4409,7 @@
41914409 else
41924410 elem = child.deepCopy(); // ?
41934411 child.parent = keepparent;
4194
- //if (GraphreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
4412
+ //if (GrafreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
41954413 // elem = elem.get(0);
41964414 makeSomething(elem, true); // ?? first);
41974415 //group.addChild(elem);
....@@ -4211,23 +4429,23 @@
42114429 //Object3D cb = Applet3D.clipboard;
42124430 //temp.addChild(cb);
42134431 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4214
- assert(GraphreeD.clipboard.parent == null);
4215
- Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent;
4216
- GraphreeD.clipboard.get(0).parent = null; // Avoid copy?
4217
- if (LA.isIdentity(GraphreeD.clipboard.toParent))
4218
- makeSomething(expand?GraphreeD.clipboard.get(0).copyExpand():GraphreeD.clipboard.get(0).deepCopy());
4432
+ assert(GrafreeD.clipboard.parent == null);
4433
+ Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4434
+ GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4435
+ if (LA.isIdentity(GrafreeD.clipboard.toParent))
4436
+ makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
42194437 else
4220
- makeSomething(expand?GraphreeD.clipboard.copyExpand():GraphreeD.clipboard.deepCopy());
4221
- GraphreeD.clipboard.get(0).parent = keepparent;
4438
+ makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4439
+ GrafreeD.clipboard.get(0).parent = keepparent;
42224440 }
42234441
42244442 ResetModel();
42254443 refreshContents();
42264444 }
42274445
4228
- void pasteInto(boolean copyit)
4446
+ void pasteInto(boolean copyit, boolean clone)
42294447 {
4230
-// if (GraphreeD.clipboard == null)
4448
+// if (GrafreeD.clipboard == null)
42314449 // return;
42324450
42334451 if (group.selection.size() != 1)
....@@ -4254,15 +4472,22 @@
42544472 if (copyit)
42554473 {
42564474 // paste(false);
4257
- CloneClipboard(false); // sept 2014
4475
+ if (clone)
4476
+ {
4477
+ CloneClipboard(false); // sept 2014
4478
+ }
4479
+ else
4480
+ {
4481
+ paste(false);
4482
+ }
42584483 }
42594484 else
42604485 {
42614486 boolean first = true;
42624487
4263
- if (GraphreeD.clipboardIsTempGroup)
4488
+ if (GrafreeD.clipboardIsTempGroup)
42644489 {
4265
- Composite temp = (Composite)GraphreeD.clipboard;
4490
+ Composite temp = (Composite)GrafreeD.clipboard;
42664491 Object3D copy;
42674492 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
42684493 {
....@@ -4272,7 +4497,7 @@
42724497 }
42734498 } else
42744499 {
4275
- linkSomething(GraphreeD.clipboard); //.get(0));
4500
+ linkSomething(GrafreeD.clipboard); //.get(0));
42764501 }
42774502 }
42784503 }
....@@ -4464,6 +4689,26 @@
44644689 makeSomething(csg);
44654690 }
44664691
4692
+ void Ungroup(Object3D g)
4693
+ {
4694
+ if (g instanceof HiddenObject)
4695
+ {
4696
+ HiddenObject h = (HiddenObject) g;
4697
+
4698
+ for (int i=0; i<h.ActualSize(); i++)
4699
+ {
4700
+ objEditor.makeSomething(h.get(i), false);
4701
+ }
4702
+ }
4703
+ else
4704
+ {
4705
+ for (int i=0; i<g.Size(); i++)
4706
+ {
4707
+ objEditor.makeSomething(g.get(i), false);
4708
+ }
4709
+ }
4710
+ }
4711
+
44674712 void ungroup()
44684713 {
44694714 /*
....@@ -4659,7 +4904,7 @@
46594904
46604905 void ImportGFD()
46614906 {
4662
- FileDialog browser = new FileDialog(objEditor.frame, "Import GraphreeD", FileDialog.LOAD);
4907
+ FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
46634908 browser.show();
46644909 String filename = browser.getFile();
46654910 if (filename != null && filename.length() > 0)
....@@ -4697,7 +4942,7 @@
46974942
46984943 void ImportVRMLX3D()
46994944 {
4700
- if (GraphreeD.standAlone)
4945
+ if (GrafreeD.standAlone)
47014946 {
47024947 /**/
47034948 FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
....@@ -4714,7 +4959,7 @@
47144959
47154960 String GetFile(String dialogName)
47164961 {
4717
- if (GraphreeD.standAlone)
4962
+ if (GrafreeD.standAlone)
47184963 {
47194964 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
47204965 browser.show();
....@@ -4778,10 +5023,12 @@
47785023 cButton flashSelectionButton;
47795024 cButton editButton;
47805025 cButton uneditButton;
5026
+ JCheckBox allParamsButton;
47815027 cButton clearpanelButton;
4782
- cButton allParamsButton;
47835028 cButton unselectButton;
47845029
5030
+ cButton oneStepButton;
5031
+
47855032 cButton screenfitButton;
47865033 cButton screenfitpointButton;
47875034 cButton snapobjectButton;
....@@ -4823,6 +5070,7 @@
48235070 private MenuItem resetsupportItem;
48245071 private MenuItem resetreferencesItem;
48255072 private MenuItem linkverticesItem;
5073
+ private MenuItem relinkverticesItem;
48265074 private MenuItem setMasterItem;
48275075 private MenuItem resetMeshItem;
48285076 private MenuItem stepAllItem;
....@@ -4835,14 +5083,17 @@
48355083 private MenuItem mergeGeometriesItem;
48365084 private MenuItem copyItem;
48375085 private MenuItem pasteItem;
5086
+ private MenuItem pasteIntoItem;
48385087 private MenuItem pasteLinkItem;
48395088 private MenuItem pasteCloneItem;
48405089 private MenuItem pasteExpandItem;
48415090 private MenuItem clearItem;
48425091 private MenuItem clearAllItem;
48435092 private MenuItem genUVItem;
5093
+ private MenuItem genNormalsMESHItem;
48445094 private MenuItem genNormalsCADItem;
48455095 private MenuItem genNormalsORGANItem;
5096
+ private MenuItem genNormalsMINEItem;
48465097 private MenuItem stripifyItem;
48475098 private MenuItem unstripifyItem;
48485099 private MenuItem trimItem;
....@@ -4884,6 +5135,7 @@
48845135 private MenuItem resetCentroidItem;
48855136 private MenuItem transformgeometryItem;
48865137 private MenuItem resetTransformItem;
5138
+ private MenuItem hideItem;
48875139 private MenuItem grabItem;
48885140 private MenuItem backItem;
48895141 private MenuItem frontItem;
....@@ -4904,6 +5156,7 @@
49045156
49055157 private MenuItem resetParentItem;
49065158 private MenuItem repairParentItem;
5159
+ private MenuItem repairShadowItem;
49075160 private MenuItem sortbysizeItem;
49085161 private MenuItem sortbynameItem;
49095162
....@@ -4924,10 +5177,11 @@
49245177 private MenuItem coneItem;
49255178 private MenuItem torusItem;
49265179 private MenuItem superItem;
5180
+ private MenuItem kleinItem;
49275181 private MenuItem blobItem;
49285182 private MenuItem latheItem;
49295183 private MenuItem bezierItem;
4930
- private MenuItem checkerItem;
5184
+ private MenuItem overlayItem;
49315185 private MenuItem meshItem;
49325186 // private MenuItem meshGroupItem;
49335187 private MenuItem springItem;
....@@ -4936,6 +5190,7 @@
49365190 private MenuItem csgItem;
49375191 private MenuItem templateItem;
49385192 private MenuItem textureItem;
5193
+ private MenuItem billboardItem;
49395194 private MenuItem shadowXItem;
49405195 private MenuItem shadowYItem;
49415196 private MenuItem shadowZItem;