Normand Briere
2019-05-05 1e1c7fcdb3d0f8be350c5f6c32b6afa6705168ea
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,
....@@ -149,6 +150,8 @@
149150
150151 void SetupMenu2(ObjEditor oe)
151152 {
153
+ if (Globals.ADVANCED)
154
+ {
152155 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
153156 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
154157 //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
....@@ -160,17 +163,21 @@
160163 lookAtItem.addActionListener(this);
161164 //lookFromItem.addActinoListener(this);
162165 //switchItem.addActionListener(this);
166
+ }
167
+
163168 Menu menu;
164169 oe.menuBar.add(menu = new Menu("Edit"));
165170 //editItem = menu.add(new MenuItem("Edit"));
166171 //editItem.addActionListener(this);
167172 duplicateItem = menu.add(new MenuItem("Duplicate"));
168173 duplicateItem.addActionListener(this);
169
- menu.add("-");
170174 cloneItem = menu.add(new MenuItem("Clone"));
171175 cloneItem.addActionListener(this);
176
+ if (Globals.ADVANCED)
177
+ {
172178 cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
173179 cloneSupportItem.addActionListener(this);
180
+ }
174181 menu.add("-");
175182 cutItem = menu.add(new MenuItem("Cut"));
176183 cutItem.addActionListener(this);
....@@ -178,18 +185,31 @@
178185 copyItem.addActionListener(this);
179186 pasteItem = menu.add(new MenuItem("Paste"));
180187 pasteItem.addActionListener(this);
188
+ menu.add("-");
189
+
190
+ menu.add("-");
191
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
192
+ pasteIntoItem.addActionListener(this);
181193 pasteLinkItem = menu.add(new MenuItem("Paste link"));
182194 pasteLinkItem.addActionListener(this);
183195 pasteCloneItem = menu.add(new MenuItem("Paste clone"));
184196 pasteCloneItem.addActionListener(this);
185197 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
186198 // pasteExpandItem.addActionListener(this);
199
+ menu.add("-");
187200 clearItem = menu.add(new MenuItem("Clear"));
188201 clearItem.addActionListener(this);
202
+
203
+ if (Globals.ADVANCED)
204
+ {
205
+ // Deletes the cameras...
189206 clearAllItem = menu.add(new MenuItem("Clear All"));
190207 clearAllItem.addActionListener(this);
208
+ }
191209
192210 oe.menuBar.add(menu = new Menu("Setting"));
211
+ if (Globals.ADVANCED)
212
+ {
193213 resetMeshItem = menu.add(new MenuItem("Reset All"));
194214 resetMeshItem.addActionListener(this);
195215 stepAllItem = menu.add(new MenuItem("Step All"));
....@@ -199,6 +219,7 @@
199219 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
200220 resetreferencesItem.addActionListener(this);
201221 menu.add("-");
222
+ }
202223 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
203224 overwriteGeoItem.addActionListener(this);
204225 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -210,19 +231,26 @@
210231 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
211232 overwriteUVItem.addActionListener(this);
212233 menu.add("-");
234
+ if (Globals.ADVANCED)
235
+ {
213236 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
214237 generateMeshItem.addActionListener(this);
215238 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
216239 poseMeshItem.addActionListener(this);
217240 menu.add("-");
241
+ }
218242 resetsupportItem = menu.add(new MenuItem("Reset support"));
219243 resetsupportItem.addActionListener(this);
220244 linkverticesItem = menu.add(new MenuItem("Link to Support"));
221245 linkverticesItem.addActionListener(this);
222246 relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
223247 relinkverticesItem.addActionListener(this);
248
+
249
+ if (Globals.ADVANCED)
250
+ {
224251 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
225252 setMasterItem.addActionListener(this);
253
+ }
226254
227255 oe.menuBar.add(menu = new Menu("Group"));
228256 grabItem = menu.add(new MenuItem("Grab"));
....@@ -233,27 +261,32 @@
233261 frontItem.addActionListener(this);
234262 compositeItem = menu.add(new MenuItem("Composite"));
235263 compositeItem.addActionListener(this);
236
- hideItem = menu.add(new MenuItem("Hide"));
264
+ hideItem = menu.add(new MenuItem("Hidden Group"));
237265 hideItem.addActionListener(this);
238266 ungroupItem = menu.add(new MenuItem("Ungroup"));
239267 ungroupItem.addActionListener(this);
240268 menu.add("-");
241
- randomItem = menu.add(new MenuItem("Random"));
269
+ randomItem = menu.add(new MenuItem("Switch node"));
242270 randomItem.addActionListener(this);
243
- physicsItem = menu.add(new MenuItem("Physics"));
244
- physicsItem.addActionListener(this);
245
- frameselectorItem = menu.add(new MenuItem("Frame Selector"));
246
- frameselectorItem.addActionListener(this);
247271 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
248272 switchGeoItem.addActionListener(this);
249273 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
250274 switchTransfoItem.addActionListener(this);
251
- morphItem = menu.add(new MenuItem("Morph"));
275
+ morphItem = menu.add(new MenuItem("Morph Group"));
252276 morphItem.addActionListener(this);
277
+
278
+ if (Globals.ADVANCED)
279
+ {
280
+ menu.add("-");
281
+ physicsItem = menu.add(new MenuItem("Physics"));
282
+ physicsItem.addActionListener(this);
283
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
284
+ frameselectorItem.addActionListener(this);
253285 scriptNodeItem = menu.add(new MenuItem("Script Node"));
254286 scriptNodeItem.addActionListener(this);
255287 cameraItem = menu.add(new MenuItem("Camera"));
256288 cameraItem.addActionListener(this);
289
+ }
257290
258291 oe.menuBar.add(menu = new Menu("Object"));
259292 textureItem = menu.add(new MenuItem("Texture"));
....@@ -268,14 +301,18 @@
268301 shadowYItem.addActionListener(this);
269302 shadowZItem = menu.add(new MenuItem("Shadow Z"));
270303 shadowZItem.addActionListener(this);
304
+ if (Globals.ADVANCED)
305
+ {
306
+ menu.add("-");
271307 linkerItem = menu.add(new MenuItem("Linker"));
272308 linkerItem.addActionListener(this);
273
- templateItem = menu.add(new MenuItem("Template"));
274
- templateItem.addActionListener(this);
275309 attributeItem = menu.add(new MenuItem("Attribute"));
276310 attributeItem.addActionListener(this);
311
+ templateItem = menu.add(new MenuItem("Template"));
312
+ templateItem.addActionListener(this);
277313 pointflowItem = menu.add(new MenuItem("Point Flow"));
278314 pointflowItem.addActionListener(this);
315
+ }
279316 menu.add("-");
280317 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
281318 resetTransformItem.addActionListener(this);
....@@ -293,8 +330,11 @@
293330 genNormalsCADItem.addActionListener(this);
294331 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
295332 genNormalsMESHItem.addActionListener(this);
333
+ if (Globals.ADVANCED)
334
+ {
296335 genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
297336 genNormalsMINEItem.addActionListener(this);
337
+ }
298338 stripifyItem = menu.add(new MenuItem("Stripify"));
299339 stripifyItem.addActionListener(this);
300340 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -316,10 +356,14 @@
316356 reduce34MeshItem.addActionListener(this);
317357 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
318358 increaseMeshItem.addActionListener(this);
319
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
320
- smoothMeshItem.addActionListener(this);
321359 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
322360 clipMeshItem.addActionListener(this);
361
+
362
+ if (Globals.ADVANCED)
363
+ {
364
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
365
+ smoothMeshItem.addActionListener(this);
366
+ }
323367
324368 oe.menuBar.add(menu = new Menu("Attributes"));
325369 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
....@@ -329,10 +373,13 @@
329373 liveleavesItem.addActionListener(this);
330374 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
331375 unliveleavesItem.addActionListener(this);
376
+ if (Globals.ADVANCED)
377
+ {
332378 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
333379 supportleavesItem.addActionListener(this);
334380 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
335381 unsupportleavesItem.addActionListener(this);
382
+ }
336383 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
337384 hideleavesItem.addActionListener(this);
338385 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -375,6 +422,8 @@
375422 sortbysizeItem.addActionListener(this);
376423 sortbynameItem = menu.add(new MenuItem("Sort by name"));
377424 sortbynameItem.addActionListener(this);
425
+ if (Globals.ADVANCED)
426
+ {
378427 menu.add("-");
379428 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
380429 extractGeometriesItem.addActionListener(this);
....@@ -384,20 +433,23 @@
384433 shareGeometriesItem.addActionListener(this);
385434 mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
386435 mergeGeometriesItem.addActionListener(this);
436
+ }
387437
388438 oe.menuBar.add(menu = new Menu("Insert"));
389439 buildCreateMenu(menu);
390440
391
-
392441 oe.menuBar.add(menu = new Menu("Include"));
393
- importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
394
- importGFDItem.addActionListener(this);
395
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
396
- importVRMLX3DItem.addActionListener(this);
397
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
442
+ importOBJItem = menu.add(new MenuItem("OBJ file..."));
398443 importOBJItem.addActionListener(this);
399
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
444
+ menu.add("-");
445
+ import3DSItem = menu.add(new MenuItem("3DS file..."));
400446 import3DSItem.addActionListener(this);
447
+ menu.add("-");
448
+ importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file..."));
449
+ importVRMLX3DItem.addActionListener(this);
450
+ menu.add("-");
451
+ importGFDItem = menu.add(new MenuItem("GrafreeD file..."));
452
+ importGFDItem.addActionListener(this);
401453
402454 oe.menuBar.add(menu = new Menu("Tools"));
403455 buildToolsMenu(menu);
....@@ -433,153 +485,98 @@
433485 oe.radioPanel.add(dummyButton);
434486 oe.buttonGroup.add(dummyButton);
435487 */
436
- aConstraints.gridy += 1;
437
- oe.aConstraints.gridwidth = 1;
438
- oe.aConstraints.gridx = 0;
488
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
439489
440
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints);
490
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
491
+ liveCB.setToolTipText("Enabled animation");
441492 liveCB.addItemListener(this);
442493
443
- oe.aConstraints.gridx += 1;
444
- oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints);
445
- supportCB.addItemListener(this);
446
-
447
- // oe.aConstraints.gridx += 1;
448
- // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints);
449
- // localCB.addItemListener(this);
450
-
451
- oe.aConstraints.gridx += 1;
452
- oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints);
453
- crowdCB.addItemListener(this);
454
-
455
- oe.aConstraints.gridx += 1;
456
- oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints);
457
- smoothCB.addItemListener(this);
458
-
459
- oe.aConstraints.gridx += 1;
460
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints);
494
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
495
+ oneStepButton.setToolTipText("Animate one step forward");
496
+ oneStepButton.addActionListener(this);
497
+
498
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
499
+ fastCB.setToolTipText("Fast mode");
461500 fastCB.addItemListener(this);
462
- oe.aConstraints.gridx += 1;
463
- oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints);
464
- slowCB.addItemListener(this);
465
- oe.aConstraints.gridx += 1;
466
- oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints);
467
- boxCB.addItemListener(this);
468
-
469
-// oe.aConstraints.gridx += 1;
470
-// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints);
471
-// speakerMocapCB.addItemListener(this);
472
-
473
- if (false)
474
- {
475
- // handled in scripts
476
- oe.aConstraints.gridx += 1;
477
- oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints);
478
- speakerCameraCB.addItemListener(this);
479
-
480
- oe.aConstraints.gridx += 1;
481
- oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints);
482
- speakerFocusCB.addItemListener(this);
483
-
484
- oe.aConstraints.gridx += 1;
485
- oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints);
486
- smoothfocusCB.addItemListener(this);
487
- }
488
-
489
-//oe.aConstraints.gridx += 1;
490
-//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints);
491
-// debugCB.addItemListener(this);
492
-
493
- oe.aConstraints.gridx += 1;
494
- oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints);
495
- oeilCB.addItemListener(this);
496
-
497
- oe.aConstraints.gridx += 1;
498
- oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints);
499
- lookAtCB.addItemListener(this);
500
-
501
- oe.aConstraints.gridx += 1;
502
- oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints);
501
+
502
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
503
+ trackCB.setToolTipText("Enable tracking");
503504 trackCB.addItemListener(this);
504505
505
- oe.aConstraints.gridx += 1;
506
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
506
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
507
+ screenfitButton.setToolTipText("Screen fit");
507508 screenfitButton.addActionListener(this);
508
- oe.aConstraints.gridx += 1;
509
+
509510 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
510511 // screenfitpointButton.addActionListener(this);
511
-// oe.aConstraints.gridx += 1;
512
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
513
- snapobjectButton.addActionListener(this);
514
- oe.aConstraints.gridx += 1;
515512
516
- //aConstraints.gridx = 0;
517
- //aConstraints.gridy += 1;
518
- oe.aConstraints.weighty = 0;
519
- oe.aConstraints.gridwidth = 1;
520
-
521
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
513
+ if (Globals.ADVANCED)
514
+ {
515
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
516
+ snapobjectButton.addActionListener(this);
517
+ snapobjectButton.setToolTipText("Snap Object");
518
+ }
519
+
520
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
521
+ flashSelectionButton.setToolTipText("Show selection");
522522 flashSelectionButton.addActionListener(this);
523523
524
- oe.toolbarPanel.add(new cButton(" ", false));
524
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
525525
526
- oe.aConstraints.gridx += 1;
527
- oe.aConstraints.weighty = 0;
528
- oe.aConstraints.gridwidth = 1;
529
-
530
- //
531
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
526
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
527
+ twoButton.setToolTipText("Show center view only");
532528 twoButton.addActionListener(this);
533
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
529
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
534530 fourButton.addActionListener(this);
535
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
531
+ fourButton.setToolTipText("Show left panel only");
532
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
533
+ sixButton.setToolTipText("2-column layout left");
536534 sixButton.addActionListener(this);
537
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
535
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
536
+ threeButton.setToolTipText("2-column layout right");
538537 threeButton.addActionListener(this);
539
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
538
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
539
+ sevenButton.setToolTipText("3-column layout");
540540 sevenButton.addActionListener(this);
541541 //
542542
543
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
543
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
544
+ rootButton.setToolTipText("Edit selection in new tab");
544545 rootButton.addActionListener(this);
545
- oe.aConstraints.gridx += 1;
546
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
546
+
547
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
548
+ closeButton.setToolTipText("Close tab");
547549 closeButton.addActionListener(this);
548550 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
549551 //clearButton.addActionListener(this);
550
- oe.aConstraints.gridx += 1;
551552
552
- oe.aConstraints.gridx = 1; //
553
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
553
+ cGridBag commandsPanel = new cGridBag();
554
+
555
+ commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
556
+ editButton.setToolTipText("Edit selection");
554557 editButton.addActionListener(this);
555
- oe.aConstraints.gridx += 1;
556
- oe.aConstraints.weighty = 0;
557
- oe.aConstraints.gridwidth = 1;
558558
559
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
559
+ commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
560
+ uneditButton.setToolTipText("Unedit selection");
560561 uneditButton.addActionListener(this);
561562
562
- oe.aConstraints.gridx += 1;
563
- oe.aConstraints.weighty = 0;
564
- oe.aConstraints.gridwidth = 1;
565
-
566
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
567
- clearPanelButton.addActionListener(this);
568
-
569
- oe.aConstraints.gridx += 1;
570
- oe.aConstraints.weighty = 0;
571
- oe.aConstraints.gridwidth = 1;
572
-
573
- oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints);
563
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
564
+ allParamsButton.setToolTipText("Edit all params");
574565 allParamsButton.addActionListener(this);
575566
576
- oe.aConstraints.gridx += 1;
577
- oe.aConstraints.weighty = 0;
578
- oe.aConstraints.gridwidth = 1;
579
-
580
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
567
+ commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
568
+ clearPanelButton.setToolTipText("Clear edit panel");
569
+ clearPanelButton.addActionListener(this);
570
+
571
+ commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
572
+ unselectButton.setToolTipText("Unselect");
581573 unselectButton.addActionListener(this);
582574
575
+ commandsPanel.preferredHeight = 1;
576
+
577
+ oe.treePanel.add(commandsPanel);
578
+ oe.treePanel.Return();
579
+
583580 // oe.aConstraints.gridx += 1;
584581 // oe.aConstraints.weighty = 0;
585582 // oe.aConstraints.gridwidth = 1;
....@@ -591,40 +588,37 @@
591588 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
592589 // gcButton.addActionListener(this);
593590
594
- oe.aConstraints.gridx = 0;
595
- oe.aConstraints.gridy += 1;
596
-
597
- //ctrlPanel.add(objList = new List(5, true));
598
- oe.aConstraints.gridwidth = 100;
599
- // oe.aConstraints.gridheight = 100;
600
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
601
- oe.aConstraints.gridheight = 1;
602
- oe.aConstraints.weighty = 0.5;
603
- oe.aConstraints.gridx = 0;
604
- JScrollPane jSP;
591
+ cGridBag jSPPanel = new cGridBag();
592
+
593
+ JScrollPane jSP;
605594 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
606
- oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints);
595
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
607596 ResetModel();
608
- oe.aConstraints.weighty = 0.5;
609
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
610
- oe.aConstraints.gridy += 1;
611
- oe.aConstraints.gridwidth = 1;
597
+
598
+ oe.treePanel.add(jSPPanel);
599
+ oe.treePanel.Return();
612600
613
- oe.aConstraints.weighty = 0;
614
- oe.aConstraints.gridwidth = 2;
615
-
616
- oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints);
601
+ cGridBag copyOptionsPanel = new cGridBag();
602
+
603
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
604
+ colorCB.setToolTipText("Copy color when dropped");
617605 colorCB.addItemListener(this);
618
- oe.aConstraints.gridx += 2;
619
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
606
+
607
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
608
+ materialCB.setToolTipText("Copy material when dropped");
620609 materialCB.addItemListener(this);
621
- oe.aConstraints.gridx += 2;
622
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
610
+
611
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
612
+ textureCB.setToolTipText("Copy texture when dropped");
623613 textureCB.addItemListener(this);
624614
625
- oe.aConstraints.gridx = 0;
626
- oe.aConstraints.gridy += 1;
615
+ copyOptionsPanel.preferredHeight = 1;
616
+ oe.treePanel.add(copyOptionsPanel);
617
+ oe.treePanel.Return();
627618
619
+// mainPanel.setDividerLocation(0.5); //1.0);
620
+// mainPanel.setResizeWeight(0.5);
621
+
628622 //jList.addListSelectionListener(this);
629623 oe.jTree.addTreeSelectionListener(this);
630624 //jTree.setRootVisible(false);
....@@ -646,6 +640,78 @@
646640 radio.layout = sevenButton;
647641 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
648642 }
643
+
644
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
645
+ {
646
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
647
+ boxCB.setToolTipText("Display bounding boxes");
648
+ boxCB.addItemListener(this);
649
+
650
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
651
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
652
+ zoomBoxCB.addItemListener(this);
653
+
654
+ if (Globals.ADVANCED)
655
+ {
656
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
657
+ supportCB.setToolTipText("Enable rigging");
658
+ supportCB.addItemListener(this);
659
+
660
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
661
+ // localCB.addItemListener(this);
662
+
663
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
664
+ crowdCB.setToolTipText("Used for crowds");
665
+ crowdCB.addItemListener(this);
666
+
667
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
668
+ smoothCB.setToolTipText("Snapping delay");
669
+ smoothCB.addItemListener(this);
670
+
671
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
672
+ slowCB.setToolTipText("Smooth interpolation");
673
+ slowCB.addItemListener(this);
674
+
675
+// constraints.gridy += 1;
676
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
677
+// speakerMocapCB.addItemListener(this);
678
+
679
+ if (false)
680
+ {
681
+ // handled in scripts
682
+ //constraints.gridy += 1;
683
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
684
+ speakerCameraCB.addItemListener(this);
685
+
686
+ //constraints.gridy += 1;
687
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
688
+ speakerFocusCB.addItemListener(this);
689
+
690
+ //constraints.gridy += 1;
691
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
692
+ smoothfocusCB.addItemListener(this);
693
+ }
694
+
695
+//constraints.gridx += 1;
696
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
697
+// debugCB.addItemListener(this);
698
+
699
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
700
+ oeilCB.addItemListener(this);
701
+
702
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
703
+ lookAtCB.setToolTipText("Look-at target");
704
+ lookAtCB.addItemListener(this);
705
+
706
+ }
707
+
708
+ cGridBag fill = new cGridBag();
709
+
710
+ fill.preferredHeight = 200;
711
+
712
+ panel.add(fill);
713
+
714
+ }
649715
650716 void EditObject(Object3D obj)
651717 {
....@@ -676,6 +742,7 @@
676742 JCheckBox fastCB;
677743 JCheckBox slowCB;
678744 JCheckBox boxCB;
745
+ JCheckBox zoomBoxCB;
679746 JCheckBox trackCB;
680747 JCheckBox smoothfocusCB;
681748 // JCheckBox speakerMocapCB;
....@@ -755,6 +822,10 @@
755822 Recompile();
756823 cameraView.repaint();
757824 // refreshContents();
825
+ }
826
+ else if(e.getSource() == zoomBoxCB)
827
+ {
828
+ cameraView.ToggleZoomBoxMode();
758829 }
759830 else if(e.getSource() == smoothfocusCB)
760831 {
....@@ -923,11 +994,11 @@
923994 {
924995 loadClipboard(true);
925996 objEditor.jTree.setSelectionPath(destinationPath);
926
- pasteInto(false);
997
+ pasteInto(false, false);
927998 } else {
928999 loadClipboard(false);
9291000 objEditor.jTree.setSelectionPath(destinationPath);
930
- pasteInto(false); // true); // ???
1001
+ pasteInto(false, false); // true); // ???
9311002 }
9321003 }
9331004 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1049,27 +1120,33 @@
10491120 kleinItem.addActionListener(this);
10501121 particleItem = menu.add(new MenuItem("Particle system"));
10511122 particleItem.addActionListener(this);
1123
+ if (Globals.ADVANCED)
1124
+ {
10521125 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10531126 ragdollItem.addActionListener(this);
10541127 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10551128 ragdoll2Item.addActionListener(this);
1129
+ }
10561130 menu.add("-");
1057
- meshItem = menu.add(new MenuItem("Mesh"));
1131
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10581132 meshItem.addActionListener(this);
10591133 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10601134 // meshGroupItem.addActionListener(this);
1135
+ if (Globals.ADVANCED)
1136
+ {
10611137 springItem = menu.add(new MenuItem("Spring"));
10621138 springItem.addActionListener(this);
10631139 flagItem = menu.add(new MenuItem("Flag"));
10641140 flagItem.addActionListener(this);
1065
- bezierItem = menu.add(new MenuItem("Patch"));
1066
- bezierItem.addActionListener(this);
1067
- checkerItem = menu.add(new MenuItem("Checker"));
1068
- checkerItem.addActionListener(this);
10691141 blobItem = menu.add(new MenuItem("Blob"));
10701142 blobItem.addActionListener(this);
10711143 latheItem = menu.add(new MenuItem("Lathe"));
10721144 latheItem.addActionListener(this);
1145
+ }
1146
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1147
+ bezierItem.addActionListener(this);
1148
+ overlayItem = menu.add(new MenuItem("Overlay"));
1149
+ overlayItem.addActionListener(this);
10731150 lightItem = menu.add(new MenuItem("Light"));
10741151 lightItem.addActionListener(this);
10751152 menu.add("-");
....@@ -1079,34 +1156,39 @@
10791156 loopItem.addActionListener(this);
10801157 doubleItem = menu.add(new MenuItem("Fork"));
10811158 doubleItem.addActionListener(this);
1159
+ if (Globals.ADVANCED)
1160
+ {
10821161 tripleItem = menu.add(new MenuItem("Trident"));
10831162 tripleItem.addActionListener(this);
1163
+ }
10841164 }
10851165
10861166 void buildToolsMenu(Menu menu)
10871167 {
10881168 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10891169 animationItem.addItemListener(this);
1090
- animationItem.setState(CameraPane.ANIMATION);
1170
+ animationItem.setState(Globals.ANIMATION);
10911171
10921172 menu.add("-");
10931173 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
10941174 parseverticesItem.addActionListener(this);
10951175 textureFieldItem = menu.add(new MenuItem("Texture Field"));
10961176 textureFieldItem.addActionListener(this);
1097
- alignItem = menu.add(new MenuItem("Align"));
1177
+ alignItem = menu.add(new MenuItem("Align Objects"));
10981178 alignItem.addActionListener(this);
1099
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1100
- mirrorItem.addActionListener(this);
11011179 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11021180 reduceMorphItem.addActionListener(this);
11031181 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11041182 reduce34MorphItem.addActionListener(this);
1105
-
1183
+ menu.add("-");
11061184 menu.add(computeAOItem = new MenuItem("Compute AO"));
11071185 computeAOItem.addActionListener(this);
1108
- menu.add("-");
11091186
1187
+ if (Globals.ADVANCED)
1188
+ {
1189
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1190
+ mirrorItem.addActionListener(this);
1191
+ menu.add("-");
11101192 menu.add(memoryItem = new MenuItem("Memory Usage"));
11111193 memoryItem.addActionListener(this);
11121194 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1120,6 +1202,8 @@
11201202 resetParentItem.addActionListener(this);
11211203 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11221204 repairParentItem.addActionListener(this);
1205
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1206
+ repairShadowItem.addActionListener(this);
11231207 menu.add(invariantsItem = new MenuItem("Invariants"));
11241208 invariantsItem.addActionListener(this);
11251209 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1127,6 +1211,7 @@
11271211 menu.add("-");
11281212 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11291213 editScriptItem.addActionListener(this);
1214
+ }
11301215 }
11311216
11321217 void ScreenFit()
....@@ -1480,6 +1565,7 @@
14801565 //
14811566 public void actionPerformed(ActionEvent event) // , Object arg)
14821567 {
1568
+ Object source = event.getSource();
14831569 /*
14841570 if (event.getSource() == nameField)
14851571 {
....@@ -1491,11 +1577,11 @@
14911577 }
14921578 else
14931579 */
1494
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1580
+ if (source == lookAtItem || source == lookFromItem)
14951581 {
14961582 ScreenFit();
14971583 } else
1498
- if (event.getSource() == switchItem)
1584
+ if (source == switchItem)
14991585 {
15001586 cVector v1 = new cVector();
15011587 cVector v2 = new cVector();
....@@ -1504,11 +1590,11 @@
15041590 objEditor.cameraView.renderCamera.setAim(v2, v1);
15051591 objEditor.cameraView.repaint();
15061592 } else
1507
- if (event.getSource() == rectoidItem)
1593
+ if (source == rectoidItem)
15081594 {
15091595 makeSomething(new Box());
15101596 } else
1511
- if (event.getSource() == particleItem)
1597
+ if (source == particleItem)
15121598 {
15131599 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15141600 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1529,9 +1615,9 @@
15291615 applyExample(particleGeom, "SMOKE");
15301616 makeSomething(particleGeom);
15311617 } else
1532
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1618
+ if (source == ragdollItem || source == ragdoll2Item)
15331619 {
1534
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1620
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15351621
15361622 ragdoll.toParent = LA.newMatrix();
15371623 ragdoll.fromParent = LA.newMatrix();
....@@ -1549,7 +1635,7 @@
15491635 } else
15501636 /*
15511637 */
1552
- if (event.getSource() == heightFieldItem)
1638
+ if (source == heightFieldItem)
15531639 {
15541640 Object3D obj = new Object3D();
15551641
....@@ -1587,31 +1673,31 @@
15871673
15881674 makeSomething(obj);
15891675 } else
1590
- if (event.getSource() == gridItem)
1676
+ if (source == gridItem)
15911677 {
15921678 makeSomething(new Grid());
15931679 } else
1594
- if (event.getSource() == ellipsoidItem)
1680
+ if (source == ellipsoidItem)
15951681 {
15961682 makeSomething(new Sphere());
15971683 } else
1598
- if (event.getSource() == coneItem)
1684
+ if (source == coneItem)
15991685 {
16001686 makeSomething(new Cone());
16011687 } else
1602
- if (event.getSource() == torusItem)
1688
+ if (source == torusItem)
16031689 {
16041690 makeSomething(new Torus());
16051691 } else
1606
- if (event.getSource() == superItem)
1692
+ if (source == superItem)
16071693 {
16081694 makeSomething(new Superellipsoid());
16091695 } else
1610
- if (event.getSource() == kleinItem)
1696
+ if (source == kleinItem)
16111697 {
16121698 makeSomething(new Klein());
16131699 } else
1614
- if (event.getSource() == blobItem)
1700
+ if (source == blobItem)
16151701 {
16161702 Blob blob = new Blob();
16171703 BlobComponent comp = new BlobComponent();
....@@ -1619,15 +1705,15 @@
16191705 //blob.retile();
16201706 makeSomething(blob);
16211707 } else
1622
- if (event.getSource() == latheItem)
1708
+ if (source == latheItem)
16231709 {
16241710 makeSomething(new Lathe());
16251711 } else
1626
- if (event.getSource() == bezierItem)
1712
+ if (source == bezierItem)
16271713 {
16281714 makeSomething(new BezierSurface());
16291715 } else
1630
- if (event.getSource() == checkerItem)
1716
+ if (source == overlayItem)
16311717 {
16321718 /*
16331719 Object3D obj = new BezierSurface(5,8);
....@@ -1642,7 +1728,7 @@
16421728 */
16431729 makeSomething(new Checker());
16441730 } else
1645
- if (event.getSource() == meshItem)
1731
+ if (source == meshItem)
16461732 {
16471733 Object3D itemtomake = new Object3D();
16481734 Object3D child;
....@@ -1663,35 +1749,35 @@
16631749 makeSomething(child);
16641750 }
16651751 } else
1666
- if (event.getSource() == springItem)
1752
+ if (source == springItem)
16671753 {
16681754 cSpring s = new cSpring();
16691755 s.setup();
16701756 makeSomething(s);
16711757 } else
1672
- if (event.getSource() == flagItem)
1758
+ if (source == flagItem)
16731759 {
16741760 cSpring s = new cFlag();
16751761 s.setup();
16761762 makeSomething(s);
16771763 } else
1678
- if (event.getSource() == lightItem)
1764
+ if (source == lightItem)
16791765 {
16801766 makeSomething(new Light());
16811767 } else
1682
- if (event.getSource() == csgItem)
1768
+ if (source == csgItem)
16831769 {
16841770 group(new CSG());
16851771 } else
1686
- if (event.getSource() == templateItem)
1772
+ if (source == templateItem)
16871773 {
16881774 group(new cTemplate());
16891775 } else
1690
- if (event.getSource() == attributeItem)
1776
+ if (source == attributeItem)
16911777 {
16921778 makeSomething(new Attribute());
16931779 } else
1694
- if (event.getSource() == pointflowItem)
1780
+ if (source == pointflowItem)
16951781 {
16961782 makeSomething(new PointFlow());
16971783 } else
....@@ -1703,7 +1789,7 @@
17031789 } else
17041790 */
17051791
1706
- if (event.getSource() == superLoopItem)
1792
+ if (source == superLoopItem)
17071793 {
17081794 Composite g = new cGroup();
17091795 for (int i=0; i<15; i++)
....@@ -1725,7 +1811,7 @@
17251811
17261812 group(g);
17271813 } else
1728
- if (event.getSource() == loopItem)
1814
+ if (source == loopItem)
17291815 {
17301816 Composite csg = new GroupLeaf();
17311817 csg.count = 5;
....@@ -1734,7 +1820,7 @@
17341820 csg.addChild(child);
17351821 child.addChild(csg);
17361822 } else
1737
- if (event.getSource() == doubleItem)
1823
+ if (source == doubleItem)
17381824 {
17391825 Composite csg = new GroupLeaf();
17401826 csg.count = 5;
....@@ -1746,7 +1832,7 @@
17461832 csg.addChild(child);
17471833 child.addChild(csg);
17481834 } else
1749
- if (event.getSource() == tripleItem)
1835
+ if (source == tripleItem)
17501836 {
17511837 Composite csg = new GroupLeaf();
17521838 csg.count = 4;
....@@ -1762,70 +1848,83 @@
17621848 child.addChild(csg);
17631849 } else
17641850
1765
- if (event.getSource() == importGFDItem)
1851
+ if (source == importGFDItem)
17661852 {
17671853 ImportGFD();
17681854 } else
1769
- if (event.getSource() == importVRMLX3DItem)
1855
+ if (source == importVRMLX3DItem)
17701856 {
17711857 ImportVRMLX3D();
17721858 } else
1773
- if (event.getSource() == import3DSItem)
1859
+ if (source == import3DSItem)
17741860 {
17751861 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17761862 } else
1777
- if (event.getSource() == importOBJItem)
1863
+ if (source == importOBJItem)
17781864 {
1779
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1865
+ //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1866
+ FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD);
1867
+ browser.setVisible(true);
1868
+ String filename = browser.getFile();
1869
+ if (filename != null && filename.length() > 0)
1870
+ {
1871
+ String fullname = browser.getDirectory() + filename;
1872
+ makeSomething(ReadOBJ(fullname), true);
1873
+ }
17801874 } else
1781
- if (event.getSource() == computeAOItem)
1875
+ if (source == computeAOItem)
17821876 {
1783
- CameraPane.drawMode = CameraPane.OCCLUSION;
1784
- CameraPane.theRenderer.repaint();
1877
+ Globals.drawMode = CameraPane.OCCLUSION;
1878
+ Globals.theRenderer.repaint();
17851879 } else
1786
- if (event.getSource() == recompileItem)
1880
+ if (source == recompileItem)
17871881 {
17881882 Recompile();
17891883 refreshContents();
17901884 } else
1791
- if (event.getSource() == editScriptItem)
1885
+ if (source == editScriptItem)
17921886 {
17931887 OpenDialog();
17941888 refreshContents();
17951889 } else
1796
- if (event.getSource() == invariantsItem)
1890
+ if (source == invariantsItem)
17971891 {
17981892 System.out.println("Invariants:");
17991893 GrafreeD.grafreeD.universe.invariants();
18001894 } else
1801
- if (event.getSource() == memoryItem)
1895
+ if (source == memoryItem)
18021896 {
18031897 //System.out.println("Invariants:");
18041898 PrintMemory();
18051899 } else
1806
- if (event.getSource() == pathItem)
1900
+ if (source == pathItem)
18071901 {
18081902 PrintPath();
18091903 } else
1810
- if (event.getSource() == analyzeItem)
1904
+ if (source == analyzeItem)
18111905 {
18121906 AnalyzeObject();
18131907 } else
1814
- if (event.getSource() == dumpItem)
1908
+ if (source == dumpItem)
18151909 {
18161910 DumpObject();
18171911 } else
1818
- if (event.getSource() == screenfitButton)
1912
+ if (source == oneStepButton)
1913
+ {
1914
+ Globals.ONESTEP = true;
1915
+ cameraView.repaint();
1916
+ } else
1917
+ if (source == screenfitButton)
18191918 {
18201919 //Reload(lastConverter, lastFilename, true);
18211920 ScreenFit();
18221921 } else
1823
- if (event.getSource() == screenfitpointButton)
1922
+ if (source == screenfitpointButton)
18241923 {
18251924 //Reload(lastConverter, lastFilename, true);
18261925 ScreenFitPoint();
18271926 } else
1828
- if (event.getSource() == snapobjectButton)
1927
+ if (source == snapobjectButton)
18291928 {
18301929 //Reload(lastConverter, lastFilename, true);
18311930 SnapObject();
....@@ -1836,13 +1935,13 @@
18361935 // Recompile();
18371936 // refreshContents();
18381937 // } else
1839
- if (event.getSource() == gcButton)
1938
+ if (source == gcButton)
18401939 {
18411940 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18421941 System.gc();
18431942 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18441943 } else
1845
- if (event.getSource() == editLeafItem)
1944
+ if (source == editLeafItem)
18461945 {
18471946 Object3D obj;
18481947 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1856,62 +1955,66 @@
18561955 }
18571956 refreshContents(true);
18581957 } else
1859
- if (event.getSource() == openWindowItem)
1958
+ if (source == openWindowItem)
18601959 {
18611960 EditSelection(true);
18621961 } else
1863
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1962
+ if (source == cutItem || source == clearButton)
18641963 {
18651964 loadClipboard(true);
18661965 } else
1867
- if (event.getSource() == duplicateItem)
1966
+ if (source == duplicateItem)
18681967 {
18691968 Object3D keep = GrafreeD.clipboard;
18701969 loadClipboard(false);
18711970 paste(false);
18721971 GrafreeD.clipboard = keep;
18731972 } else
1874
- if (event.getSource() == cloneItem)
1973
+ if (source == cloneItem)
18751974 {
18761975 CloneSelection(false);
18771976 } else
1878
- if (event.getSource() == cloneSupportItem)
1977
+ if (source == cloneSupportItem)
18791978 {
18801979 CloneSelection(true);
18811980 } else
1882
- if (event.getSource() == copyItem)
1981
+ if (source == copyItem)
18831982 {
18841983 loadClipboard(false);
18851984 } else
1886
- if (event.getSource() == pasteItem)
1985
+ if (source == pasteItem)
18871986 {
18881987 paste(false);
18891988 } else
1890
- if (event.getSource() == pasteLinkItem)
1989
+ if (source == pasteIntoItem)
18911990 {
1892
- pasteInto(false);
1991
+ pasteInto(true, false);
18931992 } else
1894
- if (event.getSource() == pasteCloneItem)
1993
+ if (source == pasteLinkItem)
18951994 {
1896
- pasteInto(true);
1995
+ pasteInto(false, false);
18971996 } else
1898
- if (event.getSource() == pasteExpandItem)
1997
+ if (source == pasteCloneItem)
1998
+ {
1999
+ pasteInto(true, true);
2000
+ } else
2001
+ if (source == pasteExpandItem)
18992002 {
19002003 paste(true);
19012004 } else
1902
- if (event.getSource() == synchronizeItem)
2005
+ if (source == synchronizeItem)
19032006 {
19042007 Overwrite(Object3D.TRANSFORM);
19052008 } else
1906
- if (event.getSource() == overwriteNameItem)
2009
+ if (source == overwriteNameItem)
19072010 {
19082011 Overwrite(Object3D.NAME);
19092012 } else
1910
- if (event.getSource() == overwriteUVItem)
2013
+ if (source == overwriteUVItem)
19112014 {
19122015 Overwrite(Object3D.UV);
19132016 } else
1914
- if (event.getSource() == overwriteMatItem)
2017
+ if (source == overwriteMatItem)
19152018 {
19162019 /* july 2015
19172020 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1931,7 +2034,7 @@
19312034
19322035 Overwrite(dropAttributes);
19332036 }
1934
- if (event.getSource() == overwriteGeoItem)
2037
+ if (source == overwriteGeoItem)
19352038 {
19362039 Overwrite(Object3D.GEOMETRY);
19372040 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1948,7 +2051,7 @@
19482051 // refreshContents();
19492052 // }
19502053 } else
1951
- if (event.getSource() == generateMeshItem)
2054
+ if (source == generateMeshItem)
19522055 {
19532056 //if (group.selection.size() == 1)
19542057 // for (int i=0; i<group.selection.size(); i++)
....@@ -1959,7 +2062,7 @@
19592062 ResetModel();
19602063 refreshContents();
19612064 } else
1962
- if (event.getSource() == extractGeometriesItem)
2065
+ if (source == extractGeometriesItem)
19632066 {
19642067 boolean one = false;
19652068
....@@ -1986,7 +2089,7 @@
19862089 ResetModel();
19872090 refreshContents();
19882091 } else
1989
- if (event.getSource() == cloneGeometriesItem)
2092
+ if (source == cloneGeometriesItem)
19902093 {
19912094 boolean one = false;
19922095
....@@ -2012,7 +2115,7 @@
20122115 ResetModel();
20132116 refreshContents();
20142117 } else
2015
- if (event.getSource() == shareGeometriesItem)
2118
+ if (source == shareGeometriesItem)
20162119 {
20172120 boolean one = false;
20182121
....@@ -2042,7 +2145,7 @@
20422145 refreshContents();
20432146 }
20442147 } else
2045
- if (event.getSource() == mergeGeometriesItem)
2148
+ if (source == mergeGeometriesItem)
20462149 {
20472150 boolean one = false;
20482151
....@@ -2072,7 +2175,7 @@
20722175 ResetModel();
20732176 refreshContents();
20742177 } else
2075
- if (event.getSource() == linkverticesItem)
2178
+ if (source == linkverticesItem)
20762179 {
20772180 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20782181 // {
....@@ -2092,41 +2195,41 @@
20922195 if (content instanceof cGroup && ((cGroup)content).transientlink )
20932196 content = ((cGroup)content).get(0);
20942197
2095
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2198
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20962199 for (int i=0; i<group.selection.size(); i++)
20972200 {
2098
- boolean random = CameraPane.RANDOM;
2099
- CameraPane.RANDOM = false; // parse all random nodes
2201
+ boolean random = CameraPane.SWITCH;
2202
+ CameraPane.SWITCH = false; // parse all random nodes
21002203 group.selection.get(i).linkVerticesThis(content);
21012204 // group.selection.get(i).setMasterThis(content); // should be identity
2102
- CameraPane.RANDOM = random;
2205
+ CameraPane.SWITCH = random;
21032206 }
2104
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2207
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21052208 refreshContents();
21062209 }
21072210 } else
2108
- if (event.getSource() == resetsupportItem)
2211
+ if (source == resetsupportItem)
21092212 {
21102213 for (int i=0; i<group.selection.size(); i++)
21112214 {
2112
- boolean random = CameraPane.RANDOM;
2113
- CameraPane.RANDOM = false; // parse all random nodes
2215
+ boolean random = CameraPane.SWITCH;
2216
+ CameraPane.SWITCH = false; // parse all random nodes
21142217 group.selection.get(i).linkVerticesThis(null);
2115
- CameraPane.RANDOM = random;
2218
+ CameraPane.SWITCH = random;
21162219 }
21172220
21182221 refreshContents();
21192222 } else
2120
- if (event.getSource() == relinkverticesItem)
2223
+ if (source == relinkverticesItem)
21212224 {
2122
- boolean random = CameraPane.RANDOM;
2123
- CameraPane.RANDOM = false; // parse all random nodes
2225
+ boolean random = CameraPane.SWITCH;
2226
+ CameraPane.SWITCH = false; // parse all random nodes
21242227 group.selection.RelinkToSupport();
2125
- CameraPane.RANDOM = random;
2228
+ CameraPane.SWITCH = random;
21262229
21272230 refreshContents();
21282231 } else
2129
- if (event.getSource() == resetreferencesItem)
2232
+ if (source == resetreferencesItem)
21302233 {
21312234 for (int i=0; i<group.selection.size(); i++)
21322235 {
....@@ -2135,7 +2238,7 @@
21352238
21362239 refreshContents();
21372240 } else
2138
- if (event.getSource() == setMasterItem)
2241
+ if (source == setMasterItem)
21392242 {
21402243 if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21412244 {
....@@ -2148,7 +2251,7 @@
21482251 refreshContents();
21492252 }
21502253 } else
2151
- if (event.getSource() == poseMeshItem)
2254
+ if (source == poseMeshItem)
21522255 {
21532256 if (group.selection.size() == 1)
21542257 {
....@@ -2167,19 +2270,19 @@
21672270 }
21682271
21692272 } else
2170
- if (event.getSource() == revertMeshItem)
2273
+ if (source == revertMeshItem)
21712274 {
21722275 RevertMeshes();
21732276 } else
2174
- if (event.getSource() == resetMeshItem)
2277
+ if (source == resetMeshItem)
21752278 {
21762279 ResetAll();
21772280 } else
2178
- if (event.getSource() == stepAllItem)
2281
+ if (source == stepAllItem)
21792282 {
21802283 StepAll();
21812284 } else
2182
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2285
+ if (source == clearItem) // || event.getSource() == clearButton)
21832286 {
21842287 //int indices[] = jList.getSelectedIndices();
21852288 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2187,46 +2290,46 @@
21872290
21882291 ClearSelection(false);
21892292 } else
2190
- if (event.getSource() == clearAllItem)
2293
+ if (source == clearAllItem)
21912294 {
21922295 ClearSelection(true);
21932296 } else
2194
- if (event.getSource() == grabItem)
2297
+ if (source == grabItem)
21952298 {
21962299 group(new cGroup(), true);
21972300 } else
2198
- if (event.getSource() == hideItem)
2301
+ if (source == hideItem)
21992302 {
22002303 group(new HiddenObject());
22012304 } else
2202
- if (event.getSource() == frontItem)
2305
+ if (source == frontItem)
22032306 {
22042307 front();
22052308 } else
2206
- if (event.getSource() == backItem)
2309
+ if (source == backItem)
22072310 {
22082311 back();
22092312 } else
2210
- if (event.getSource() == cameraItem)
2313
+ if (source == cameraItem)
22112314 {
22122315 makeSomething(new Camera());
22132316 } else
2214
- if (event.getSource() == compositeItem)
2317
+ if (source == compositeItem)
22152318 {
22162319 group(new Composite());
22172320 } else
2218
- if (event.getSource() == randomItem)
2321
+ if (source == randomItem)
22192322 {
22202323 RandomNode random = new RandomNode();
22212324 group(random);
22222325 if (random.size() > 0)
2223
- random.name = random.get(0).name + "Rnd";
2326
+ random.name = random.get(0).name + "Switch";
22242327 } else
2225
- if (event.getSource() == physicsItem)
2328
+ if (source == physicsItem)
22262329 {
22272330 group(new PhysicsNode());
22282331 } else
2229
- if (event.getSource() == frameselectorItem)
2332
+ if (source == frameselectorItem)
22302333 {
22312334 for (int i=0; i<group.selection.size(); i++)
22322335 {
....@@ -2238,7 +2341,7 @@
22382341 ResetModel();
22392342 refreshContents();
22402343 } else
2241
- if (event.getSource() == switchGeoItem)
2344
+ if (source == switchGeoItem)
22422345 {
22432346 for (int i=0; i<group.selection.size(); i++)
22442347 {
....@@ -2250,7 +2353,7 @@
22502353 ResetModel();
22512354 refreshContents();
22522355 } else
2253
- if (event.getSource() == switchTransfoItem)
2356
+ if (source == switchTransfoItem)
22542357 {
22552358 for (int i=0; i<group.selection.size(); i++)
22562359 {
....@@ -2262,7 +2365,7 @@
22622365 ResetModel();
22632366 refreshContents();
22642367 } else
2265
- if (event.getSource() == morphItem)
2368
+ if (source == morphItem)
22662369 {
22672370 for (int i=0; i<group.selection.size(); i++)
22682371 {
....@@ -2274,7 +2377,7 @@
22742377 ResetModel();
22752378 refreshContents();
22762379 } else
2277
- if (event.getSource() == scriptNodeItem)
2380
+ if (source == scriptNodeItem)
22782381 {
22792382 boolean atleastone = false;
22802383
....@@ -2313,31 +2416,31 @@
23132416 }
23142417 }
23152418 } else
2316
- if (event.getSource() == linkerItem)
2419
+ if (source == linkerItem)
23172420 {
23182421 group(new cLinker());
23192422 } else
2320
- if (event.getSource() == textureItem)
2423
+ if (source == textureItem)
23212424 {
23222425 group(new TextureNode());
23232426 } else
2324
- if (event.getSource() == billboardItem)
2427
+ if (source == billboardItem)
23252428 {
23262429 group(new BillboardNode());
23272430 } else
2328
- if (event.getSource() == shadowXItem)
2431
+ if (source == shadowXItem)
23292432 {
23302433 CastShadow(0);
23312434 } else
2332
- if (event.getSource() == shadowYItem)
2435
+ if (source == shadowYItem)
23332436 {
23342437 CastShadow(1);
23352438 } else
2336
- if (event.getSource() == shadowZItem)
2439
+ if (source == shadowZItem)
23372440 {
23382441 CastShadow(2);
23392442 } else
2340
- if (event.getSource() == ungroupItem)
2443
+ if (source == ungroupItem)
23412444 {
23422445 //ungroup();
23432446 for (int i=0; i<group.selection.size(); i++)
....@@ -2349,179 +2452,179 @@
23492452
23502453 refreshContents();
23512454 } else
2352
- if (event.getSource() == genUVItem)
2455
+ if (source == genUVItem)
23532456 {
23542457 GenUV();
23552458 } else
2356
- if (event.getSource() == genNormalsCADItem)
2459
+ if (source == genNormalsCADItem)
23572460 {
23582461 GenNormals(true);
23592462 } else
2360
- if (event.getSource() == genNormalsMESHItem)
2463
+ if (source == genNormalsMESHItem)
23612464 {
23622465 GenNormals(true); // TODO
23632466 } else
2364
- if (event.getSource() == genNormalsORGANItem)
2467
+ if (source == genNormalsORGANItem)
23652468 {
23662469 GenNormals(false);
23672470 } else
2368
- if (event.getSource() == genNormalsMINEItem)
2471
+ if (source == genNormalsMINEItem)
23692472 {
23702473 GenNormalsMINE();
23712474 } else
2372
- if (event.getSource() == stripifyItem)
2475
+ if (source == stripifyItem)
23732476 {
23742477 Stripify();
23752478 } else
2376
- if (event.getSource() == unstripifyItem)
2479
+ if (source == unstripifyItem)
23772480 {
23782481 Unstripify();
23792482 } else
2380
- if (event.getSource() == trimItem)
2483
+ if (source == trimItem)
23812484 {
23822485 Trim();
23832486 } else
2384
- if (event.getSource() == untrimItem)
2487
+ if (source == untrimItem)
23852488 {
23862489 Untrim();
23872490 } else
2388
- if (event.getSource() == clearColorsItem)
2491
+ if (source == clearColorsItem)
23892492 {
23902493 ClearColors();
23912494 } else
2392
- if (event.getSource() == clearMaterialsItem)
2495
+ if (source == clearMaterialsItem)
23932496 {
23942497 ClearMaterials();
23952498 } else
2396
- if (event.getSource() == liveleavesItem)
2499
+ if (source == liveleavesItem)
23972500 {
23982501 LiveLeaves(true);
23992502 } else
2400
- if (event.getSource() == unliveleavesItem)
2503
+ if (source == unliveleavesItem)
24012504 {
24022505 LiveLeaves(false);
24032506 } else
2404
- if (event.getSource() == supportleavesItem)
2507
+ if (source == supportleavesItem)
24052508 {
24062509 SupportLeaves(true);
24072510 } else
2408
- if (event.getSource() == unsupportleavesItem)
2511
+ if (source == unsupportleavesItem)
24092512 {
24102513 SupportLeaves(false);
24112514 } else
2412
- if (event.getSource() == hideleavesItem)
2515
+ if (source == hideleavesItem)
24132516 {
24142517 HideLeaves(true);
24152518 } else
2416
- if (event.getSource() == showleavesItem)
2519
+ if (source == showleavesItem)
24172520 {
24182521 HideLeaves(false);
24192522 } else
2420
- if (event.getSource() == markleavesItem)
2523
+ if (source == markleavesItem)
24212524 {
24222525 MarkLeaves(true);
24232526 } else
2424
- if (event.getSource() == unmarkleavesItem)
2527
+ if (source == unmarkleavesItem)
24252528 {
24262529 MarkLeaves(false);
24272530 } else
2428
- if (event.getSource() == flipVItem)
2531
+ if (source == flipVItem)
24292532 {
24302533 FlipV(true);
24312534 } else
2432
- if (event.getSource() == unflipVItem)
2535
+ if (source == unflipVItem)
24332536 {
24342537 FlipV(false);
24352538 } else
2436
- if (event.getSource() == lowTexturesItem)
2539
+ if (source == lowTexturesItem)
24372540 {
24382541 SetTexRes(0);
24392542 } else
2440
- if (event.getSource() == normalTexturesItem)
2543
+ if (source == normalTexturesItem)
24412544 {
24422545 SetTexRes(1);
24432546 } else
2444
- if (event.getSource() == highTexturesItem)
2547
+ if (source == highTexturesItem)
24452548 {
24462549 SetTexRes(2);
24472550 } else
2448
- if (event.getSource() == veryhighTexturesItem)
2551
+ if (source == veryhighTexturesItem)
24492552 {
24502553 SetTexRes(3);
24512554 } else
2452
- if (event.getSource() == maxTexturesItem)
2555
+ if (source == maxTexturesItem)
24532556 {
24542557 SetTexRes(4);
24552558 } else
2456
- if (event.getSource() == panoTexturesItem)
2559
+ if (source == panoTexturesItem)
24572560 {
24582561 SetTexRes(5);
24592562 } else
2460
- if (event.getSource() == reverseNormalsItem)
2563
+ if (source == reverseNormalsItem)
24612564 {
24622565 ReverseNormals();
24632566 } else
2464
- if (event.getSource() == parseverticesItem)
2567
+ if (source == parseverticesItem)
24652568 {
24662569 ParseVertices();
24672570 } else
2468
- if (event.getSource() == textureFieldItem)
2571
+ if (source == textureFieldItem)
24692572 {
24702573 TextureVertices();
24712574 } else
2472
- if (event.getSource() == alignItem)
2575
+ if (source == alignItem)
24732576 {
24742577 Align();
24752578 } else
2476
- if (event.getSource() == mirrorItem)
2579
+ if (source == mirrorItem)
24772580 {
24782581 MirrorPoses();
24792582 } else
2480
- if (event.getSource() == reduceMorphItem)
2583
+ if (source == reduceMorphItem)
24812584 {
24822585 MeshReduction(false);
24832586 } else
2484
- if (event.getSource() == reduce34MorphItem)
2587
+ if (source == reduce34MorphItem)
24852588 {
24862589 MeshReduction(true);
24872590 } else
2488
- if (event.getSource() == reverseTrianglesItem)
2591
+ if (source == reverseTrianglesItem)
24892592 {
24902593 ReverseTriangles();
24912594 } else
2492
- if (event.getSource() == reduceMeshItem)
2595
+ if (source == reduceMeshItem)
24932596 {
24942597 ReduceMesh(false);
24952598 } else
2496
- if (event.getSource() == reduce34MeshItem)
2599
+ if (source == reduce34MeshItem)
24972600 {
24982601 ReduceMesh(true);
24992602 } else
2500
- if (event.getSource() == increaseMeshItem)
2603
+ if (source == increaseMeshItem)
25012604 {
25022605 IncreaseMesh();
25032606 } else
2504
- if (event.getSource() == clipMeshItem)
2607
+ if (source == clipMeshItem)
25052608 {
25062609 ClipMesh();
25072610 } else
2508
- if (event.getSource() == smoothMeshItem)
2611
+ if (source == smoothMeshItem)
25092612 {
25102613 SmoothMesh();
25112614 } else
2512
- if (event.getSource() == transformgeometryItem)
2615
+ if (source == transformgeometryItem)
25132616 {
25142617 TransformGeometry();
25152618 } else
2516
- if (event.getSource() == resetTransformItem)
2619
+ if (source == resetTransformItem)
25172620 {
25182621 ResetTransform();
25192622 } else
2520
- if (event.getSource() == resetCentroidItem)
2623
+ if (source == resetCentroidItem)
25212624 {
25222625 ResetCentroid();
25232626 } else
2524
- if (event.getSource() == resetParentItem)
2627
+ if (source == resetParentItem)
25252628 {
25262629 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25272630 {
....@@ -2531,7 +2634,7 @@
25312634
25322635 refreshContents();
25332636 } else
2534
- if (event.getSource() == repairParentItem)
2637
+ if (source == repairParentItem)
25352638 {
25362639 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25372640 {
....@@ -2545,7 +2648,21 @@
25452648
25462649 refreshContents();
25472650 } else
2548
- if (event.getSource() == sortbysizeItem)
2651
+ if (source == repairShadowItem)
2652
+ {
2653
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2654
+ {
2655
+ Object3D obj = (Object3D)e.nextElement();
2656
+ obj.RepairShadow();
2657
+// for (int i=0; i<obj.size(); i++)
2658
+// {
2659
+// obj.get(i).parent = obj;
2660
+// }
2661
+ }
2662
+
2663
+ refreshContents();
2664
+ } else
2665
+ if (source == sortbysizeItem)
25492666 {
25502667 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25512668 {
....@@ -2557,7 +2674,7 @@
25572674 ResetModel();
25582675 refreshContents();
25592676 } else
2560
- if (event.getSource() == sortbynameItem)
2677
+ if (source == sortbynameItem)
25612678 {
25622679 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25632680 {
....@@ -2569,7 +2686,7 @@
25692686 ResetModel();
25702687 refreshContents();
25712688 } else
2572
- if (event.getSource() == attachPigmentItem)
2689
+ if (source == attachPigmentItem)
25732690 {
25742691 String texture = GetFile("Attach pigment");
25752692 Object3D obj;
....@@ -2581,7 +2698,7 @@
25812698
25822699 refreshContents();
25832700 } else
2584
- if (event.getSource() == detachPigmentItem)
2701
+ if (source == detachPigmentItem)
25852702 {
25862703 Object3D obj;
25872704 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2592,7 +2709,7 @@
25922709
25932710 refreshContents();
25942711 } else
2595
- if (event.getSource() == attachBumpItem)
2712
+ if (source == attachBumpItem)
25962713 {
25972714 String texture = GetFile("Attach bump");
25982715 Object3D obj;
....@@ -2604,7 +2721,7 @@
26042721
26052722 refreshContents();
26062723 } else
2607
- if (event.getSource() == detachBumpItem)
2724
+ if (source == detachBumpItem)
26082725 {
26092726 Object3D obj;
26102727 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2615,7 +2732,7 @@
26152732
26162733 refreshContents();
26172734 } else
2618
- if (event.getSource() == pigmentBumpItem)
2735
+ if (source == pigmentBumpItem)
26192736 {
26202737 Object3D obj;
26212738 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2626,158 +2743,195 @@
26262743
26272744 refreshContents();
26282745 } else
2629
- if (event.getSource() == flashSelectionButton)
2746
+ if (source == flashSelectionButton)
26302747 {
26312748 CameraPane.flash = true;
26322749 refreshContents();
26332750 } else
2634
- if (event.getSource() == oneButton)
2751
+ if (source == oneButton)
26352752 {
26362753 } else
2637
- if (event.getSource() == twoButton)
2754
+ if (source == twoButton)
26382755 {
26392756 radio.layout = twoButton;
26402757 // bug
26412758 //gridPanel.setDividerLocation(1.0);
26422759 //bigPanel.setDividerLocation(0.0);
2643
- bigThree.remove(scenePanel);
2644
- bigThree.remove(centralPanel);
2645
- bigThree.remove(XYZPanel);
2646
- aWindowConstraints.gridx = 0;
2647
- aWindowConstraints.gridy = 0;
2648
- aWindowConstraints.gridwidth = 1;
2649
- // aConstraints.gridheight = 3;
2650
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2651
- aWindowConstraints.weightx = 0;
2652
- aWindowConstraints.weighty = 1;
2653
- //bigThree.add(jtp, aWindowConstraints);
2654
- aWindowConstraints.weightx = 1;
2655
- aWindowConstraints.gridwidth = 3;
2656
- // aConstraints.gridheight = 3;
2657
- aWindowConstraints.gridx = 1;
2658
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2659
- bigThree.add(centralPanel, aWindowConstraints);
2660
- aWindowConstraints.weightx = 0;
2661
- aWindowConstraints.gridx = 4;
2662
- aWindowConstraints.gridwidth = 1;
2663
- // aConstraints.gridheight = 3;
2664
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2665
- //bigThree.add(XYZPanel, aWindowConstraints);
2666
- bigThree.revalidate();
2760
+// bigThree.remove(scenePanel);
2761
+// bigThree.remove(centralPanel);
2762
+// bigThree.remove(XYZPanel);
2763
+// aWindowConstraints.gridx = 0;
2764
+// aWindowConstraints.gridy = 0;
2765
+// aWindowConstraints.gridwidth = 1;
2766
+// // aConstraints.gridheight = 3;
2767
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2768
+// aWindowConstraints.weightx = 0;
2769
+// aWindowConstraints.weighty = 1;
2770
+// //bigThree.add(jtp, aWindowConstraints);
2771
+// aWindowConstraints.weightx = 1;
2772
+// aWindowConstraints.gridwidth = 3;
2773
+// // aConstraints.gridheight = 3;
2774
+// aWindowConstraints.gridx = 1;
2775
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2776
+// bigThree.add(centralPanel, aWindowConstraints);
2777
+// aWindowConstraints.weightx = 0;
2778
+// aWindowConstraints.gridx = 4;
2779
+// aWindowConstraints.gridwidth = 1;
2780
+// // aConstraints.gridheight = 3;
2781
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2782
+// //bigThree.add(XYZPanel, aWindowConstraints);
2783
+// scenePanel.setVisible(false);
2784
+// centralPanel.setVisible(true);
2785
+// XYZPanel.setVisible(false);
2786
+ bigThree.ClearUI();
2787
+ bigThree.add(centralPanel);
2788
+ bigThree.FlushUI();
26672789 } else
2668
- if (event.getSource() == threeButton)
2790
+ if (source == threeButton)
26692791 {
26702792 radio.layout = threeButton;
2671
- bigThree.remove(scenePanel);
2672
- bigThree.remove(centralPanel);
2673
- bigThree.remove(XYZPanel);
2674
- aWindowConstraints.gridx = 0;
2675
- aWindowConstraints.gridy = 0;
2676
- aWindowConstraints.gridwidth = 1;
2677
- // aConstraints.gridheight = 3;
2678
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2679
- aWindowConstraints.weightx = 0;
2680
- aWindowConstraints.weighty = 1;
2681
- //bigThree.add(jtp, aWindowConstraints);
2682
- aWindowConstraints.weightx = 1;
2683
- aWindowConstraints.gridwidth = 3;
2684
- // aConstraints.gridheight = 3;
2685
- aWindowConstraints.gridx = 1;
2686
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2687
- bigThree.add(centralPanel, aWindowConstraints);
2688
- aWindowConstraints.weightx = 0;
2689
- aWindowConstraints.gridx = 4;
2690
- aWindowConstraints.gridwidth = 1;
2691
- // aConstraints.gridheight = 3;
2692
- aConstraints.fill = GridBagConstraints.VERTICAL;
2693
- bigThree.add(XYZPanel, aWindowConstraints);
2694
- bigThree.revalidate();
2793
+
2794
+// bigThree.remove(scenePanel);
2795
+// bigThree.remove(centralPanel);
2796
+// bigThree.remove(XYZPanel);
2797
+// aWindowConstraints.gridx = 0;
2798
+// aWindowConstraints.gridy = 0;
2799
+// aWindowConstraints.gridwidth = 1;
2800
+// // aConstraints.gridheight = 3;
2801
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2802
+// aWindowConstraints.weightx = 0;
2803
+// aWindowConstraints.weighty = 1;
2804
+// //bigThree.add(jtp, aWindowConstraints);
2805
+// aWindowConstraints.weightx = 1;
2806
+// aWindowConstraints.gridwidth = 3;
2807
+// // aConstraints.gridheight = 3;
2808
+// aWindowConstraints.gridx = 1;
2809
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2810
+// bigThree.add(centralPanel, aWindowConstraints);
2811
+// aWindowConstraints.weightx = 0;
2812
+// aWindowConstraints.gridx = 4;
2813
+// aWindowConstraints.gridwidth = 1;
2814
+// // aConstraints.gridheight = 3;
2815
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2816
+// bigThree.add(XYZPanel, aWindowConstraints);
2817
+// bigThree.validate();
2818
+// scenePanel.setVisible(false);
2819
+// centralPanel.setVisible(true);
2820
+// XYZPanel.setVisible(true);
2821
+ bigThree.ClearUI();
2822
+ bigThree.add(centralPanel);
2823
+ bigThree.add(XYZPanel);
2824
+ bigThree.FlushUI();
26952825 } else
2696
- if (event.getSource() == fourButton)
2826
+ if (source == fourButton)
26972827 {
26982828 radio.layout = fourButton;
2699
- bigThree.remove(scenePanel);
2700
- bigThree.remove(centralPanel);
2701
- bigThree.remove(XYZPanel);
2702
- aWindowConstraints.gridx = 0;
2703
- aWindowConstraints.gridy = 0;
2704
- aWindowConstraints.gridwidth = 1;
2705
- // aWindowConstraints.gridheight = 3;
2706
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2707
- aWindowConstraints.weightx = 1;
2708
- aWindowConstraints.weighty = 1;
2709
- bigThree.add(scenePanel, aWindowConstraints);
2710
- aWindowConstraints.weightx = 1;
2711
- aWindowConstraints.gridwidth = 3;
2712
- // aConstraints.gridheight = 3;
2713
- aWindowConstraints.gridx = 1;
2714
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2715
- //bigThree.add(cameraPanel, aWindowConstraints);
2716
- aWindowConstraints.weightx = 0;
2717
- aWindowConstraints.gridx = 4;
2718
- aWindowConstraints.gridwidth = 1;
2719
- // aWindowConstraints.gridheight = 3;
2720
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2721
- //bigThree.add(XYZPanel, aWindowConstraints);
2722
- bigThree.revalidate();
2829
+
2830
+// bigThree.remove(scenePanel);
2831
+// bigThree.remove(centralPanel);
2832
+// bigThree.remove(XYZPanel);
2833
+// aWindowConstraints.gridx = 0;
2834
+// aWindowConstraints.gridy = 0;
2835
+// aWindowConstraints.gridwidth = 1;
2836
+// // aWindowConstraints.gridheight = 3;
2837
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2838
+// aWindowConstraints.weightx = 1;
2839
+// aWindowConstraints.weighty = 1;
2840
+// bigThree.add(scenePanel, aWindowConstraints);
2841
+// aWindowConstraints.weightx = 1;
2842
+// aWindowConstraints.gridwidth = 3;
2843
+// // aConstraints.gridheight = 3;
2844
+// aWindowConstraints.gridx = 1;
2845
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2846
+// //bigThree.add(cameraPanel, aWindowConstraints);
2847
+// aWindowConstraints.weightx = 0;
2848
+// aWindowConstraints.gridx = 4;
2849
+// aWindowConstraints.gridwidth = 1;
2850
+// // aWindowConstraints.gridheight = 3;
2851
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2852
+// //bigThree.add(XYZPanel, aWindowConstraints);
2853
+// bigThree.validate();
2854
+// scenePanel.setVisible(true);
2855
+// centralPanel.setVisible(false);
2856
+// XYZPanel.setVisible(false);
2857
+ bigThree.ClearUI();
2858
+ bigThree.add(scenePanel);
2859
+ bigThree.FlushUI();
27232860 } else
2724
- if (event.getSource() == sixButton)
2861
+ if (source == sixButton)
27252862 {
27262863 radio.layout = sixButton;
2727
- bigThree.remove(scenePanel);
2728
- bigThree.remove(centralPanel);
2729
- bigThree.remove(XYZPanel);
2730
- aWindowConstraints.gridx = 0;
2731
- aWindowConstraints.gridy = 0;
2732
- aWindowConstraints.gridwidth = 1;
2733
- // aConstraints.gridheight = 3;
2734
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2735
- aWindowConstraints.weightx = 0;
2736
- aWindowConstraints.weighty = 1;
2737
- bigThree.add(scenePanel, aWindowConstraints);
2738
- aWindowConstraints.weightx = 1;
2739
- aWindowConstraints.gridwidth = 3;
2740
- // aWindowConstraints.gridheight = 3;
2741
- aWindowConstraints.gridx = 1;
2742
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2743
- bigThree.add(centralPanel, aWindowConstraints);
2744
- aWindowConstraints.weightx = 0;
2745
- aWindowConstraints.gridx = 4;
2746
- aWindowConstraints.gridwidth = 1;
2747
- // aWindowConstraints.gridheight = 3;
2748
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2749
- //bigThree.add(XYZPanel, aConstraints);
2750
- bigThree.revalidate();
2864
+
2865
+// bigThree.remove(scenePanel);
2866
+// bigThree.remove(centralPanel);
2867
+// bigThree.remove(XYZPanel);
2868
+// aWindowConstraints.gridx = 0;
2869
+// aWindowConstraints.gridy = 0;
2870
+// aWindowConstraints.gridwidth = 1;
2871
+// // aConstraints.gridheight = 3;
2872
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2873
+// aWindowConstraints.weightx = 0;
2874
+// aWindowConstraints.weighty = 1;
2875
+// bigThree.add(scenePanel, aWindowConstraints);
2876
+// aWindowConstraints.weightx = 1;
2877
+// aWindowConstraints.gridwidth = 3;
2878
+// // aWindowConstraints.gridheight = 3;
2879
+// aWindowConstraints.gridx = 1;
2880
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2881
+// bigThree.add(centralPanel, aWindowConstraints);
2882
+// aWindowConstraints.weightx = 0;
2883
+// aWindowConstraints.gridx = 4;
2884
+// aWindowConstraints.gridwidth = 1;
2885
+// // aWindowConstraints.gridheight = 3;
2886
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2887
+// //bigThree.add(XYZPanel, aConstraints);
2888
+// bigThree.validate();
2889
+// scenePanel.setVisible(true);
2890
+// centralPanel.setVisible(true);
2891
+// XYZPanel.setVisible(false);
2892
+ bigThree.ClearUI();
2893
+ bigThree.add(scenePanel);
2894
+ bigThree.add(centralPanel);
2895
+ bigThree.FlushUI();
27512896 } else
2752
- if (event.getSource() == sevenButton)
2897
+ if (source == sevenButton)
27532898 {
27542899 radio.layout = sevenButton;
2755
- bigThree.remove(scenePanel);
2756
- bigThree.remove(centralPanel);
2757
- bigThree.remove(XYZPanel);
2758
- aWindowConstraints.gridx = 0;
2759
- aWindowConstraints.gridy = 0;
2760
- aWindowConstraints.gridwidth = 1;
2761
- // aWindowConstraints.gridheight = 3;
2762
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2763
- aWindowConstraints.weightx = 0;
2764
- aWindowConstraints.weighty = 1;
2765
- bigThree.add(scenePanel, aWindowConstraints);
2766
- aWindowConstraints.weightx = 1;
2767
- aWindowConstraints.gridwidth = 3;
2768
- // aWindowConstraints.gridheight = 3;
2769
- aWindowConstraints.gridx = 1;
2770
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2771
- bigThree.add(centralPanel, aWindowConstraints);
2772
- aWindowConstraints.weightx = 0;
2773
- aWindowConstraints.gridx = 4;
2774
- aWindowConstraints.gridwidth = 1;
2775
- // aConstraints.gridheight = 3;
2776
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2777
- bigThree.add(XYZPanel, aWindowConstraints);
2778
- bigThree.revalidate();
2900
+
2901
+// bigThree.remove(scenePanel);
2902
+// bigThree.remove(centralPanel);
2903
+// bigThree.remove(XYZPanel);
2904
+// aWindowConstraints.gridx = 0;
2905
+// aWindowConstraints.gridy = 0;
2906
+// aWindowConstraints.gridwidth = 1;
2907
+// // aWindowConstraints.gridheight = 3;
2908
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2909
+// aWindowConstraints.weightx = 0;
2910
+// aWindowConstraints.weighty = 1;
2911
+// bigThree.add(scenePanel, aWindowConstraints);
2912
+// aWindowConstraints.weightx = 1;
2913
+// aWindowConstraints.gridwidth = 3;
2914
+// // aWindowConstraints.gridheight = 3;
2915
+// aWindowConstraints.gridx = 1;
2916
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2917
+// bigThree.add(centralPanel, aWindowConstraints);
2918
+// aWindowConstraints.weightx = 0;
2919
+// aWindowConstraints.gridx = 4;
2920
+// aWindowConstraints.gridwidth = 1;
2921
+// // aConstraints.gridheight = 3;
2922
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2923
+// bigThree.add(XYZPanel, aWindowConstraints);
2924
+// bigThree.validate();
2925
+// scenePanel.setVisible(true);
2926
+// centralPanel.setVisible(true);
2927
+// XYZPanel.setVisible(true);
2928
+ bigThree.ClearUI();
2929
+ bigThree.add(scenePanel);
2930
+ bigThree.add(centralPanel);
2931
+ bigThree.add(XYZPanel);
2932
+ bigThree.FlushUI();
27792933 } else
2780
- if (event.getSource() == rootButton)
2934
+ if (source == rootButton)
27812935 {
27822936 Object3D obj;
27832937 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2789,7 +2943,7 @@
27892943
27902944 refreshContents(true);
27912945 } else
2792
- if (event.getSource() == closeButton)
2946
+ if (source == closeButton)
27932947 {
27942948 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27952949 cRadio ab;
....@@ -2810,11 +2964,11 @@
28102964 }
28112965 refreshContents(true);
28122966 } else
2813
- if (event.getSource() == editItem || event.getSource() == editButton)
2967
+ if (source == editItem || source == editButton)
28142968 {
28152969 EditSelection(false);
28162970 } else
2817
- if (event.getSource() == uneditButton)
2971
+ if (source == uneditButton)
28182972 {
28192973 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28202974 {
....@@ -2826,12 +2980,12 @@
28262980
28272981 child.editWindow = null; // ???????????
28282982 }
2829
- objEditor.ctrlPanel.revalidate();
2983
+ objEditor.ctrlPanel.FlushUI();
28302984 //objEditor.jTree.clearSelection();
28312985 //objEditor.ResetSliders();
28322986 refreshContents(true);
28332987 } else
2834
- if (event.getSource() == clearPanelButton)
2988
+ if (source == clearPanelButton)
28352989 {
28362990 assert(copy == group);
28372991 //copy.ClearUI();
....@@ -2842,7 +2996,7 @@
28422996 listUI.clear();
28432997 refreshContents(true);
28442998 } else
2845
- if (event.getSource() == allParamsButton)
2999
+ if (source == allParamsButton)
28463000 {
28473001 assert(copy == group);
28483002
....@@ -2863,19 +3017,19 @@
28633017
28643018 refreshContents(true);
28653019 } else
2866
- if (event.getSource() == unselectButton)
3020
+ if (source == unselectButton)
28673021 {
28683022 objEditor.jTree.clearSelection();
28693023 // ?? oct 2012 GrafreeD.clipboard.clear();
28703024 objEditor.ResetSliders();
28713025 refreshContents(true);
28723026 } else
2873
- if(event.getSource() instanceof cRadio)
3027
+ if(source instanceof cRadio)
28743028 {
28753029 group.parent = keepparent;
28763030 group.attributes = 0;
28773031 //group.editWindow = null;
2878
- /*cRadio*/ radio = (cRadio)event.getSource();
3032
+ /*cRadio*/ radio = (cRadio)source;
28793033 Object3D obj = radio.GetObject();
28803034 System.out.println("Edit " + obj);
28813035 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2895,7 +3049,7 @@
28953049 }
28963050
28973051 copy = group;
2898
- //CameraPane.theRenderer.object = group;
3052
+ //Globals.theRenderer.object = group;
28993053 if(!useclient)
29003054 {
29013055 cameraView.renderCamera = radio.camera;
....@@ -2904,7 +3058,8 @@
29043058 cameraView.cameras[cameraView.cameracount] = radio.camera;
29053059 cameraView.targetLookAt.set(radio.camera.lookAt);
29063060 cameraView.object = group;
2907
- cameraView.lighttouched = true;
3061
+ //cameraView.lighttouched = true;
3062
+ Globals.lighttouched = true;
29083063 topView.object = group;
29093064 frontView.object = group;
29103065 sideView.object = group;
....@@ -2940,7 +3095,7 @@
29403095 if (useclient)
29413096 {
29423097 cameraView.object = client;
2943
- cameraView.lighttouched = true;
3098
+ Globals.lighttouched = true;
29443099 //topView.object = client;
29453100 //frontView.object = client;
29463101 //sideView.object = client;
....@@ -2948,7 +3103,7 @@
29483103 else
29493104 {
29503105 cameraView.object = group;
2951
- cameraView.lighttouched = true;
3106
+ Globals.lighttouched = true;
29523107 //topView.object = group;
29533108 //frontView.object = group;
29543109 //sideView.object = group;
....@@ -3456,7 +3611,7 @@
34563611 String pigment = Object3D.GetPigment(tex);
34573612 //String bump = Object3D.GetBump(tex);
34583613
3459
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3614
+ com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
34603615
34613616 double s = v.s;
34623617
....@@ -3544,11 +3699,11 @@
35443699
35453700 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
35463701
3547
- boolean random = CameraPane.RANDOM;
3548
- CameraPane.RANDOM = false; // parse all random nodes
3702
+ boolean random = CameraPane.SWITCH;
3703
+ CameraPane.SWITCH = false; // parse all random nodes
35493704 lowres.linkVerticesThis(null);
35503705 lowres.linkVerticesThis(sn);
3551
- CameraPane.RANDOM = random;
3706
+ CameraPane.SWITCH = random;
35523707
35533708 System.err.flush();
35543709
....@@ -3757,7 +3912,7 @@
37573912 group.selection.RelinkToSupport(); // july 2014
37583913 System.out.println("DONE.");
37593914 refreshContents();
3760
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3915
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
37613916 }
37623917
37633918 void ReduceMesh(boolean reduction34)
....@@ -4033,25 +4188,25 @@
40334188 System.err.println("info : " + child.GetPath());
40344189 }
40354190 }
4036
- else
4037
- {
4038
- objEditor.SetMaterial(group); // .GetMaterial());
4039
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4040
- System.err.println("info : " + group.GetPath());
4041
- }
4191
+// else
4192
+// {
4193
+// objEditor.SetMaterial(group); // .GetMaterial());
4194
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4195
+// System.err.println("info : " + group.GetPath());
4196
+// }
40424197
40434198 objEditor.SetText(); // jan 2014
40444199
4045
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4200
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
40464201 CameraPane.flash = true;
40474202
40484203 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
40494204 // a camera
40504205 {
40514206 CameraPane.camerachangeframe = 0; // don't refuse it
4052
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4053
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
4054
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4207
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4208
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4209
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
40554210 }
40564211
40574212 refreshContents();
....@@ -4306,7 +4461,7 @@
43064461 refreshContents();
43074462 }
43084463
4309
- void pasteInto(boolean copyit)
4464
+ void pasteInto(boolean copyit, boolean clone)
43104465 {
43114466 // if (GrafreeD.clipboard == null)
43124467 // return;
....@@ -4335,7 +4490,14 @@
43354490 if (copyit)
43364491 {
43374492 // paste(false);
4338
- CloneClipboard(false); // sept 2014
4493
+ if (clone)
4494
+ {
4495
+ CloneClipboard(false); // sept 2014
4496
+ }
4497
+ else
4498
+ {
4499
+ paste(false);
4500
+ }
43394501 }
43404502 else
43414503 {
....@@ -4879,10 +5041,12 @@
48795041 cButton flashSelectionButton;
48805042 cButton editButton;
48815043 cButton uneditButton;
5044
+ JCheckBox allParamsButton;
48825045 cButton clearpanelButton;
4883
- cButton allParamsButton;
48845046 cButton unselectButton;
48855047
5048
+ cButton oneStepButton;
5049
+
48865050 cButton screenfitButton;
48875051 cButton screenfitpointButton;
48885052 cButton snapobjectButton;
....@@ -4937,6 +5101,7 @@
49375101 private MenuItem mergeGeometriesItem;
49385102 private MenuItem copyItem;
49395103 private MenuItem pasteItem;
5104
+ private MenuItem pasteIntoItem;
49405105 private MenuItem pasteLinkItem;
49415106 private MenuItem pasteCloneItem;
49425107 private MenuItem pasteExpandItem;
....@@ -5009,6 +5174,7 @@
50095174
50105175 private MenuItem resetParentItem;
50115176 private MenuItem repairParentItem;
5177
+ private MenuItem repairShadowItem;
50125178 private MenuItem sortbysizeItem;
50135179 private MenuItem sortbynameItem;
50145180
....@@ -5033,7 +5199,7 @@
50335199 private MenuItem blobItem;
50345200 private MenuItem latheItem;
50355201 private MenuItem bezierItem;
5036
- private MenuItem checkerItem;
5202
+ private MenuItem overlayItem;
50375203 private MenuItem meshItem;
50385204 // private MenuItem meshGroupItem;
50395205 private MenuItem springItem;