Normand Briere
2019-05-05 631719825b865aaf9fa1cb124d9fc5bd9dd78bd4
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 {
....@@ -869,7 +940,9 @@
869940 // objEditor.DropFile((java.io.File[]) object, true);
870941 // return;
871942 // }
872
- if (string.charAt(0) == '/')
943
+
944
+ // File path for Mac and Windows
945
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
873946 {
874947 // file(s)
875948 String[] names = string.split("\n");
....@@ -896,7 +969,7 @@
896969
897970 flashIt = false;
898971 CameraPane pane = (CameraPane) target;
899
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
972
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
900973 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
901974
902975 if (group.selection.size() == 1)
....@@ -923,11 +996,11 @@
923996 {
924997 loadClipboard(true);
925998 objEditor.jTree.setSelectionPath(destinationPath);
926
- pasteInto(false);
999
+ pasteInto(false, false);
9271000 } else {
9281001 loadClipboard(false);
9291002 objEditor.jTree.setSelectionPath(destinationPath);
930
- pasteInto(false); // true); // ???
1003
+ pasteInto(false, false); // true); // ???
9311004 }
9321005 }
9331006 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1049,27 +1122,33 @@
10491122 kleinItem.addActionListener(this);
10501123 particleItem = menu.add(new MenuItem("Particle system"));
10511124 particleItem.addActionListener(this);
1125
+ if (Globals.ADVANCED)
1126
+ {
10521127 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10531128 ragdollItem.addActionListener(this);
10541129 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10551130 ragdoll2Item.addActionListener(this);
1131
+ }
10561132 menu.add("-");
1057
- meshItem = menu.add(new MenuItem("Mesh"));
1133
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10581134 meshItem.addActionListener(this);
10591135 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10601136 // meshGroupItem.addActionListener(this);
1137
+ if (Globals.ADVANCED)
1138
+ {
10611139 springItem = menu.add(new MenuItem("Spring"));
10621140 springItem.addActionListener(this);
10631141 flagItem = menu.add(new MenuItem("Flag"));
10641142 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);
10691143 blobItem = menu.add(new MenuItem("Blob"));
10701144 blobItem.addActionListener(this);
10711145 latheItem = menu.add(new MenuItem("Lathe"));
10721146 latheItem.addActionListener(this);
1147
+ }
1148
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1149
+ bezierItem.addActionListener(this);
1150
+ overlayItem = menu.add(new MenuItem("Overlay"));
1151
+ overlayItem.addActionListener(this);
10731152 lightItem = menu.add(new MenuItem("Light"));
10741153 lightItem.addActionListener(this);
10751154 menu.add("-");
....@@ -1079,34 +1158,39 @@
10791158 loopItem.addActionListener(this);
10801159 doubleItem = menu.add(new MenuItem("Fork"));
10811160 doubleItem.addActionListener(this);
1161
+ if (Globals.ADVANCED)
1162
+ {
10821163 tripleItem = menu.add(new MenuItem("Trident"));
10831164 tripleItem.addActionListener(this);
1165
+ }
10841166 }
10851167
10861168 void buildToolsMenu(Menu menu)
10871169 {
10881170 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10891171 animationItem.addItemListener(this);
1090
- animationItem.setState(CameraPane.ANIMATION);
1172
+ animationItem.setState(Globals.ANIMATION);
10911173
10921174 menu.add("-");
10931175 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
10941176 parseverticesItem.addActionListener(this);
10951177 textureFieldItem = menu.add(new MenuItem("Texture Field"));
10961178 textureFieldItem.addActionListener(this);
1097
- alignItem = menu.add(new MenuItem("Align"));
1179
+ alignItem = menu.add(new MenuItem("Align Objects"));
10981180 alignItem.addActionListener(this);
1099
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1100
- mirrorItem.addActionListener(this);
11011181 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11021182 reduceMorphItem.addActionListener(this);
11031183 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11041184 reduce34MorphItem.addActionListener(this);
1105
-
1185
+ menu.add("-");
11061186 menu.add(computeAOItem = new MenuItem("Compute AO"));
11071187 computeAOItem.addActionListener(this);
1108
- menu.add("-");
11091188
1189
+ if (Globals.ADVANCED)
1190
+ {
1191
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1192
+ mirrorItem.addActionListener(this);
1193
+ menu.add("-");
11101194 menu.add(memoryItem = new MenuItem("Memory Usage"));
11111195 memoryItem.addActionListener(this);
11121196 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1129,6 +1213,7 @@
11291213 menu.add("-");
11301214 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11311215 editScriptItem.addActionListener(this);
1216
+ }
11321217 }
11331218
11341219 void ScreenFit()
....@@ -1482,6 +1567,7 @@
14821567 //
14831568 public void actionPerformed(ActionEvent event) // , Object arg)
14841569 {
1570
+ Object source = event.getSource();
14851571 /*
14861572 if (event.getSource() == nameField)
14871573 {
....@@ -1493,11 +1579,11 @@
14931579 }
14941580 else
14951581 */
1496
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1582
+ if (source == lookAtItem || source == lookFromItem)
14971583 {
14981584 ScreenFit();
14991585 } else
1500
- if (event.getSource() == switchItem)
1586
+ if (source == switchItem)
15011587 {
15021588 cVector v1 = new cVector();
15031589 cVector v2 = new cVector();
....@@ -1506,11 +1592,11 @@
15061592 objEditor.cameraView.renderCamera.setAim(v2, v1);
15071593 objEditor.cameraView.repaint();
15081594 } else
1509
- if (event.getSource() == rectoidItem)
1595
+ if (source == rectoidItem)
15101596 {
15111597 makeSomething(new Box());
15121598 } else
1513
- if (event.getSource() == particleItem)
1599
+ if (source == particleItem)
15141600 {
15151601 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15161602 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1531,9 +1617,9 @@
15311617 applyExample(particleGeom, "SMOKE");
15321618 makeSomething(particleGeom);
15331619 } else
1534
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1620
+ if (source == ragdollItem || source == ragdoll2Item)
15351621 {
1536
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1622
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15371623
15381624 ragdoll.toParent = LA.newMatrix();
15391625 ragdoll.fromParent = LA.newMatrix();
....@@ -1551,7 +1637,7 @@
15511637 } else
15521638 /*
15531639 */
1554
- if (event.getSource() == heightFieldItem)
1640
+ if (source == heightFieldItem)
15551641 {
15561642 Object3D obj = new Object3D();
15571643
....@@ -1589,31 +1675,31 @@
15891675
15901676 makeSomething(obj);
15911677 } else
1592
- if (event.getSource() == gridItem)
1678
+ if (source == gridItem)
15931679 {
15941680 makeSomething(new Grid());
15951681 } else
1596
- if (event.getSource() == ellipsoidItem)
1682
+ if (source == ellipsoidItem)
15971683 {
15981684 makeSomething(new Sphere());
15991685 } else
1600
- if (event.getSource() == coneItem)
1686
+ if (source == coneItem)
16011687 {
16021688 makeSomething(new Cone());
16031689 } else
1604
- if (event.getSource() == torusItem)
1690
+ if (source == torusItem)
16051691 {
16061692 makeSomething(new Torus());
16071693 } else
1608
- if (event.getSource() == superItem)
1694
+ if (source == superItem)
16091695 {
16101696 makeSomething(new Superellipsoid());
16111697 } else
1612
- if (event.getSource() == kleinItem)
1698
+ if (source == kleinItem)
16131699 {
16141700 makeSomething(new Klein());
16151701 } else
1616
- if (event.getSource() == blobItem)
1702
+ if (source == blobItem)
16171703 {
16181704 Blob blob = new Blob();
16191705 BlobComponent comp = new BlobComponent();
....@@ -1621,15 +1707,15 @@
16211707 //blob.retile();
16221708 makeSomething(blob);
16231709 } else
1624
- if (event.getSource() == latheItem)
1710
+ if (source == latheItem)
16251711 {
16261712 makeSomething(new Lathe());
16271713 } else
1628
- if (event.getSource() == bezierItem)
1714
+ if (source == bezierItem)
16291715 {
16301716 makeSomething(new BezierSurface());
16311717 } else
1632
- if (event.getSource() == checkerItem)
1718
+ if (source == overlayItem)
16331719 {
16341720 /*
16351721 Object3D obj = new BezierSurface(5,8);
....@@ -1644,7 +1730,7 @@
16441730 */
16451731 makeSomething(new Checker());
16461732 } else
1647
- if (event.getSource() == meshItem)
1733
+ if (source == meshItem)
16481734 {
16491735 Object3D itemtomake = new Object3D();
16501736 Object3D child;
....@@ -1665,35 +1751,35 @@
16651751 makeSomething(child);
16661752 }
16671753 } else
1668
- if (event.getSource() == springItem)
1754
+ if (source == springItem)
16691755 {
16701756 cSpring s = new cSpring();
16711757 s.setup();
16721758 makeSomething(s);
16731759 } else
1674
- if (event.getSource() == flagItem)
1760
+ if (source == flagItem)
16751761 {
16761762 cSpring s = new cFlag();
16771763 s.setup();
16781764 makeSomething(s);
16791765 } else
1680
- if (event.getSource() == lightItem)
1766
+ if (source == lightItem)
16811767 {
16821768 makeSomething(new Light());
16831769 } else
1684
- if (event.getSource() == csgItem)
1770
+ if (source == csgItem)
16851771 {
16861772 group(new CSG());
16871773 } else
1688
- if (event.getSource() == templateItem)
1774
+ if (source == templateItem)
16891775 {
16901776 group(new cTemplate());
16911777 } else
1692
- if (event.getSource() == attributeItem)
1778
+ if (source == attributeItem)
16931779 {
16941780 makeSomething(new Attribute());
16951781 } else
1696
- if (event.getSource() == pointflowItem)
1782
+ if (source == pointflowItem)
16971783 {
16981784 makeSomething(new PointFlow());
16991785 } else
....@@ -1705,7 +1791,7 @@
17051791 } else
17061792 */
17071793
1708
- if (event.getSource() == superLoopItem)
1794
+ if (source == superLoopItem)
17091795 {
17101796 Composite g = new cGroup();
17111797 for (int i=0; i<15; i++)
....@@ -1727,7 +1813,7 @@
17271813
17281814 group(g);
17291815 } else
1730
- if (event.getSource() == loopItem)
1816
+ if (source == loopItem)
17311817 {
17321818 Composite csg = new GroupLeaf();
17331819 csg.count = 5;
....@@ -1736,7 +1822,7 @@
17361822 csg.addChild(child);
17371823 child.addChild(csg);
17381824 } else
1739
- if (event.getSource() == doubleItem)
1825
+ if (source == doubleItem)
17401826 {
17411827 Composite csg = new GroupLeaf();
17421828 csg.count = 5;
....@@ -1748,7 +1834,7 @@
17481834 csg.addChild(child);
17491835 child.addChild(csg);
17501836 } else
1751
- if (event.getSource() == tripleItem)
1837
+ if (source == tripleItem)
17521838 {
17531839 Composite csg = new GroupLeaf();
17541840 csg.count = 4;
....@@ -1764,70 +1850,83 @@
17641850 child.addChild(csg);
17651851 } else
17661852
1767
- if (event.getSource() == importGFDItem)
1853
+ if (source == importGFDItem)
17681854 {
17691855 ImportGFD();
17701856 } else
1771
- if (event.getSource() == importVRMLX3DItem)
1857
+ if (source == importVRMLX3DItem)
17721858 {
17731859 ImportVRMLX3D();
17741860 } else
1775
- if (event.getSource() == import3DSItem)
1861
+ if (source == import3DSItem)
17761862 {
17771863 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17781864 } else
1779
- if (event.getSource() == importOBJItem)
1865
+ if (source == importOBJItem)
17801866 {
1781
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1867
+ //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1868
+ FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD);
1869
+ browser.setVisible(true);
1870
+ String filename = browser.getFile();
1871
+ if (filename != null && filename.length() > 0)
1872
+ {
1873
+ String fullname = browser.getDirectory() + filename;
1874
+ makeSomething(ReadOBJ(fullname), true);
1875
+ }
17821876 } else
1783
- if (event.getSource() == computeAOItem)
1877
+ if (source == computeAOItem)
17841878 {
1785
- CameraPane.drawMode = CameraPane.OCCLUSION;
1786
- CameraPane.theRenderer.repaint();
1879
+ Globals.drawMode = CameraPane.OCCLUSION;
1880
+ Globals.theRenderer.repaint();
17871881 } else
1788
- if (event.getSource() == recompileItem)
1882
+ if (source == recompileItem)
17891883 {
17901884 Recompile();
17911885 refreshContents();
17921886 } else
1793
- if (event.getSource() == editScriptItem)
1887
+ if (source == editScriptItem)
17941888 {
17951889 OpenDialog();
17961890 refreshContents();
17971891 } else
1798
- if (event.getSource() == invariantsItem)
1892
+ if (source == invariantsItem)
17991893 {
18001894 System.out.println("Invariants:");
18011895 GrafreeD.grafreeD.universe.invariants();
18021896 } else
1803
- if (event.getSource() == memoryItem)
1897
+ if (source == memoryItem)
18041898 {
18051899 //System.out.println("Invariants:");
18061900 PrintMemory();
18071901 } else
1808
- if (event.getSource() == pathItem)
1902
+ if (source == pathItem)
18091903 {
18101904 PrintPath();
18111905 } else
1812
- if (event.getSource() == analyzeItem)
1906
+ if (source == analyzeItem)
18131907 {
18141908 AnalyzeObject();
18151909 } else
1816
- if (event.getSource() == dumpItem)
1910
+ if (source == dumpItem)
18171911 {
18181912 DumpObject();
18191913 } else
1820
- if (event.getSource() == screenfitButton)
1914
+ if (source == oneStepButton)
1915
+ {
1916
+ Globals.ONESTEP = true;
1917
+ cameraView.repaint();
1918
+ } else
1919
+ if (source == screenfitButton)
18211920 {
18221921 //Reload(lastConverter, lastFilename, true);
18231922 ScreenFit();
18241923 } else
1825
- if (event.getSource() == screenfitpointButton)
1924
+ if (source == screenfitpointButton)
18261925 {
18271926 //Reload(lastConverter, lastFilename, true);
18281927 ScreenFitPoint();
18291928 } else
1830
- if (event.getSource() == snapobjectButton)
1929
+ if (source == snapobjectButton)
18311930 {
18321931 //Reload(lastConverter, lastFilename, true);
18331932 SnapObject();
....@@ -1838,13 +1937,13 @@
18381937 // Recompile();
18391938 // refreshContents();
18401939 // } else
1841
- if (event.getSource() == gcButton)
1940
+ if (source == gcButton)
18421941 {
18431942 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18441943 System.gc();
18451944 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18461945 } else
1847
- if (event.getSource() == editLeafItem)
1946
+ if (source == editLeafItem)
18481947 {
18491948 Object3D obj;
18501949 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1858,62 +1957,66 @@
18581957 }
18591958 refreshContents(true);
18601959 } else
1861
- if (event.getSource() == openWindowItem)
1960
+ if (source == openWindowItem)
18621961 {
18631962 EditSelection(true);
18641963 } else
1865
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1964
+ if (source == cutItem || source == clearButton)
18661965 {
18671966 loadClipboard(true);
18681967 } else
1869
- if (event.getSource() == duplicateItem)
1968
+ if (source == duplicateItem)
18701969 {
18711970 Object3D keep = GrafreeD.clipboard;
18721971 loadClipboard(false);
18731972 paste(false);
18741973 GrafreeD.clipboard = keep;
18751974 } else
1876
- if (event.getSource() == cloneItem)
1975
+ if (source == cloneItem)
18771976 {
18781977 CloneSelection(false);
18791978 } else
1880
- if (event.getSource() == cloneSupportItem)
1979
+ if (source == cloneSupportItem)
18811980 {
18821981 CloneSelection(true);
18831982 } else
1884
- if (event.getSource() == copyItem)
1983
+ if (source == copyItem)
18851984 {
18861985 loadClipboard(false);
18871986 } else
1888
- if (event.getSource() == pasteItem)
1987
+ if (source == pasteItem)
18891988 {
18901989 paste(false);
18911990 } else
1892
- if (event.getSource() == pasteLinkItem)
1991
+ if (source == pasteIntoItem)
18931992 {
1894
- pasteInto(false);
1993
+ pasteInto(true, false);
18951994 } else
1896
- if (event.getSource() == pasteCloneItem)
1995
+ if (source == pasteLinkItem)
18971996 {
1898
- pasteInto(true);
1997
+ pasteInto(false, false);
18991998 } else
1900
- if (event.getSource() == pasteExpandItem)
1999
+ if (source == pasteCloneItem)
2000
+ {
2001
+ pasteInto(true, true);
2002
+ } else
2003
+ if (source == pasteExpandItem)
19012004 {
19022005 paste(true);
19032006 } else
1904
- if (event.getSource() == synchronizeItem)
2007
+ if (source == synchronizeItem)
19052008 {
19062009 Overwrite(Object3D.TRANSFORM);
19072010 } else
1908
- if (event.getSource() == overwriteNameItem)
2011
+ if (source == overwriteNameItem)
19092012 {
19102013 Overwrite(Object3D.NAME);
19112014 } else
1912
- if (event.getSource() == overwriteUVItem)
2015
+ if (source == overwriteUVItem)
19132016 {
19142017 Overwrite(Object3D.UV);
19152018 } else
1916
- if (event.getSource() == overwriteMatItem)
2019
+ if (source == overwriteMatItem)
19172020 {
19182021 /* july 2015
19192022 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1933,7 +2036,7 @@
19332036
19342037 Overwrite(dropAttributes);
19352038 }
1936
- if (event.getSource() == overwriteGeoItem)
2039
+ if (source == overwriteGeoItem)
19372040 {
19382041 Overwrite(Object3D.GEOMETRY);
19392042 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1950,7 +2053,7 @@
19502053 // refreshContents();
19512054 // }
19522055 } else
1953
- if (event.getSource() == generateMeshItem)
2056
+ if (source == generateMeshItem)
19542057 {
19552058 //if (group.selection.size() == 1)
19562059 // for (int i=0; i<group.selection.size(); i++)
....@@ -1961,7 +2064,7 @@
19612064 ResetModel();
19622065 refreshContents();
19632066 } else
1964
- if (event.getSource() == extractGeometriesItem)
2067
+ if (source == extractGeometriesItem)
19652068 {
19662069 boolean one = false;
19672070
....@@ -1988,7 +2091,7 @@
19882091 ResetModel();
19892092 refreshContents();
19902093 } else
1991
- if (event.getSource() == cloneGeometriesItem)
2094
+ if (source == cloneGeometriesItem)
19922095 {
19932096 boolean one = false;
19942097
....@@ -2014,7 +2117,7 @@
20142117 ResetModel();
20152118 refreshContents();
20162119 } else
2017
- if (event.getSource() == shareGeometriesItem)
2120
+ if (source == shareGeometriesItem)
20182121 {
20192122 boolean one = false;
20202123
....@@ -2044,7 +2147,7 @@
20442147 refreshContents();
20452148 }
20462149 } else
2047
- if (event.getSource() == mergeGeometriesItem)
2150
+ if (source == mergeGeometriesItem)
20482151 {
20492152 boolean one = false;
20502153
....@@ -2074,7 +2177,7 @@
20742177 ResetModel();
20752178 refreshContents();
20762179 } else
2077
- if (event.getSource() == linkverticesItem)
2180
+ if (source == linkverticesItem)
20782181 {
20792182 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20802183 // {
....@@ -2094,41 +2197,41 @@
20942197 if (content instanceof cGroup && ((cGroup)content).transientlink )
20952198 content = ((cGroup)content).get(0);
20962199
2097
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2200
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20982201 for (int i=0; i<group.selection.size(); i++)
20992202 {
2100
- boolean random = CameraPane.RANDOM;
2101
- CameraPane.RANDOM = false; // parse all random nodes
2203
+ boolean random = CameraPane.SWITCH;
2204
+ CameraPane.SWITCH = false; // parse all random nodes
21022205 group.selection.get(i).linkVerticesThis(content);
21032206 // group.selection.get(i).setMasterThis(content); // should be identity
2104
- CameraPane.RANDOM = random;
2207
+ CameraPane.SWITCH = random;
21052208 }
2106
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2209
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21072210 refreshContents();
21082211 }
21092212 } else
2110
- if (event.getSource() == resetsupportItem)
2213
+ if (source == resetsupportItem)
21112214 {
21122215 for (int i=0; i<group.selection.size(); i++)
21132216 {
2114
- boolean random = CameraPane.RANDOM;
2115
- CameraPane.RANDOM = false; // parse all random nodes
2217
+ boolean random = CameraPane.SWITCH;
2218
+ CameraPane.SWITCH = false; // parse all random nodes
21162219 group.selection.get(i).linkVerticesThis(null);
2117
- CameraPane.RANDOM = random;
2220
+ CameraPane.SWITCH = random;
21182221 }
21192222
21202223 refreshContents();
21212224 } else
2122
- if (event.getSource() == relinkverticesItem)
2225
+ if (source == relinkverticesItem)
21232226 {
2124
- boolean random = CameraPane.RANDOM;
2125
- CameraPane.RANDOM = false; // parse all random nodes
2227
+ boolean random = CameraPane.SWITCH;
2228
+ CameraPane.SWITCH = false; // parse all random nodes
21262229 group.selection.RelinkToSupport();
2127
- CameraPane.RANDOM = random;
2230
+ CameraPane.SWITCH = random;
21282231
21292232 refreshContents();
21302233 } else
2131
- if (event.getSource() == resetreferencesItem)
2234
+ if (source == resetreferencesItem)
21322235 {
21332236 for (int i=0; i<group.selection.size(); i++)
21342237 {
....@@ -2137,7 +2240,7 @@
21372240
21382241 refreshContents();
21392242 } else
2140
- if (event.getSource() == setMasterItem)
2243
+ if (source == setMasterItem)
21412244 {
21422245 if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21432246 {
....@@ -2150,7 +2253,7 @@
21502253 refreshContents();
21512254 }
21522255 } else
2153
- if (event.getSource() == poseMeshItem)
2256
+ if (source == poseMeshItem)
21542257 {
21552258 if (group.selection.size() == 1)
21562259 {
....@@ -2169,19 +2272,19 @@
21692272 }
21702273
21712274 } else
2172
- if (event.getSource() == revertMeshItem)
2275
+ if (source == revertMeshItem)
21732276 {
21742277 RevertMeshes();
21752278 } else
2176
- if (event.getSource() == resetMeshItem)
2279
+ if (source == resetMeshItem)
21772280 {
21782281 ResetAll();
21792282 } else
2180
- if (event.getSource() == stepAllItem)
2283
+ if (source == stepAllItem)
21812284 {
21822285 StepAll();
21832286 } else
2184
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2287
+ if (source == clearItem) // || event.getSource() == clearButton)
21852288 {
21862289 //int indices[] = jList.getSelectedIndices();
21872290 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2189,46 +2292,46 @@
21892292
21902293 ClearSelection(false);
21912294 } else
2192
- if (event.getSource() == clearAllItem)
2295
+ if (source == clearAllItem)
21932296 {
21942297 ClearSelection(true);
21952298 } else
2196
- if (event.getSource() == grabItem)
2299
+ if (source == grabItem)
21972300 {
21982301 group(new cGroup(), true);
21992302 } else
2200
- if (event.getSource() == hideItem)
2303
+ if (source == hideItem)
22012304 {
22022305 group(new HiddenObject());
22032306 } else
2204
- if (event.getSource() == frontItem)
2307
+ if (source == frontItem)
22052308 {
22062309 front();
22072310 } else
2208
- if (event.getSource() == backItem)
2311
+ if (source == backItem)
22092312 {
22102313 back();
22112314 } else
2212
- if (event.getSource() == cameraItem)
2315
+ if (source == cameraItem)
22132316 {
22142317 makeSomething(new Camera());
22152318 } else
2216
- if (event.getSource() == compositeItem)
2319
+ if (source == compositeItem)
22172320 {
22182321 group(new Composite());
22192322 } else
2220
- if (event.getSource() == randomItem)
2323
+ if (source == randomItem)
22212324 {
22222325 RandomNode random = new RandomNode();
22232326 group(random);
22242327 if (random.size() > 0)
2225
- random.name = random.get(0).name + "Rnd";
2328
+ random.name = random.get(0).name + "Switch";
22262329 } else
2227
- if (event.getSource() == physicsItem)
2330
+ if (source == physicsItem)
22282331 {
22292332 group(new PhysicsNode());
22302333 } else
2231
- if (event.getSource() == frameselectorItem)
2334
+ if (source == frameselectorItem)
22322335 {
22332336 for (int i=0; i<group.selection.size(); i++)
22342337 {
....@@ -2240,7 +2343,7 @@
22402343 ResetModel();
22412344 refreshContents();
22422345 } else
2243
- if (event.getSource() == switchGeoItem)
2346
+ if (source == switchGeoItem)
22442347 {
22452348 for (int i=0; i<group.selection.size(); i++)
22462349 {
....@@ -2252,7 +2355,7 @@
22522355 ResetModel();
22532356 refreshContents();
22542357 } else
2255
- if (event.getSource() == switchTransfoItem)
2358
+ if (source == switchTransfoItem)
22562359 {
22572360 for (int i=0; i<group.selection.size(); i++)
22582361 {
....@@ -2264,7 +2367,7 @@
22642367 ResetModel();
22652368 refreshContents();
22662369 } else
2267
- if (event.getSource() == morphItem)
2370
+ if (source == morphItem)
22682371 {
22692372 for (int i=0; i<group.selection.size(); i++)
22702373 {
....@@ -2276,7 +2379,7 @@
22762379 ResetModel();
22772380 refreshContents();
22782381 } else
2279
- if (event.getSource() == scriptNodeItem)
2382
+ if (source == scriptNodeItem)
22802383 {
22812384 boolean atleastone = false;
22822385
....@@ -2315,31 +2418,31 @@
23152418 }
23162419 }
23172420 } else
2318
- if (event.getSource() == linkerItem)
2421
+ if (source == linkerItem)
23192422 {
23202423 group(new cLinker());
23212424 } else
2322
- if (event.getSource() == textureItem)
2425
+ if (source == textureItem)
23232426 {
23242427 group(new TextureNode());
23252428 } else
2326
- if (event.getSource() == billboardItem)
2429
+ if (source == billboardItem)
23272430 {
23282431 group(new BillboardNode());
23292432 } else
2330
- if (event.getSource() == shadowXItem)
2433
+ if (source == shadowXItem)
23312434 {
23322435 CastShadow(0);
23332436 } else
2334
- if (event.getSource() == shadowYItem)
2437
+ if (source == shadowYItem)
23352438 {
23362439 CastShadow(1);
23372440 } else
2338
- if (event.getSource() == shadowZItem)
2441
+ if (source == shadowZItem)
23392442 {
23402443 CastShadow(2);
23412444 } else
2342
- if (event.getSource() == ungroupItem)
2445
+ if (source == ungroupItem)
23432446 {
23442447 //ungroup();
23452448 for (int i=0; i<group.selection.size(); i++)
....@@ -2351,179 +2454,179 @@
23512454
23522455 refreshContents();
23532456 } else
2354
- if (event.getSource() == genUVItem)
2457
+ if (source == genUVItem)
23552458 {
23562459 GenUV();
23572460 } else
2358
- if (event.getSource() == genNormalsCADItem)
2461
+ if (source == genNormalsCADItem)
23592462 {
23602463 GenNormals(true);
23612464 } else
2362
- if (event.getSource() == genNormalsMESHItem)
2465
+ if (source == genNormalsMESHItem)
23632466 {
23642467 GenNormals(true); // TODO
23652468 } else
2366
- if (event.getSource() == genNormalsORGANItem)
2469
+ if (source == genNormalsORGANItem)
23672470 {
23682471 GenNormals(false);
23692472 } else
2370
- if (event.getSource() == genNormalsMINEItem)
2473
+ if (source == genNormalsMINEItem)
23712474 {
23722475 GenNormalsMINE();
23732476 } else
2374
- if (event.getSource() == stripifyItem)
2477
+ if (source == stripifyItem)
23752478 {
23762479 Stripify();
23772480 } else
2378
- if (event.getSource() == unstripifyItem)
2481
+ if (source == unstripifyItem)
23792482 {
23802483 Unstripify();
23812484 } else
2382
- if (event.getSource() == trimItem)
2485
+ if (source == trimItem)
23832486 {
23842487 Trim();
23852488 } else
2386
- if (event.getSource() == untrimItem)
2489
+ if (source == untrimItem)
23872490 {
23882491 Untrim();
23892492 } else
2390
- if (event.getSource() == clearColorsItem)
2493
+ if (source == clearColorsItem)
23912494 {
23922495 ClearColors();
23932496 } else
2394
- if (event.getSource() == clearMaterialsItem)
2497
+ if (source == clearMaterialsItem)
23952498 {
23962499 ClearMaterials();
23972500 } else
2398
- if (event.getSource() == liveleavesItem)
2501
+ if (source == liveleavesItem)
23992502 {
24002503 LiveLeaves(true);
24012504 } else
2402
- if (event.getSource() == unliveleavesItem)
2505
+ if (source == unliveleavesItem)
24032506 {
24042507 LiveLeaves(false);
24052508 } else
2406
- if (event.getSource() == supportleavesItem)
2509
+ if (source == supportleavesItem)
24072510 {
24082511 SupportLeaves(true);
24092512 } else
2410
- if (event.getSource() == unsupportleavesItem)
2513
+ if (source == unsupportleavesItem)
24112514 {
24122515 SupportLeaves(false);
24132516 } else
2414
- if (event.getSource() == hideleavesItem)
2517
+ if (source == hideleavesItem)
24152518 {
24162519 HideLeaves(true);
24172520 } else
2418
- if (event.getSource() == showleavesItem)
2521
+ if (source == showleavesItem)
24192522 {
24202523 HideLeaves(false);
24212524 } else
2422
- if (event.getSource() == markleavesItem)
2525
+ if (source == markleavesItem)
24232526 {
24242527 MarkLeaves(true);
24252528 } else
2426
- if (event.getSource() == unmarkleavesItem)
2529
+ if (source == unmarkleavesItem)
24272530 {
24282531 MarkLeaves(false);
24292532 } else
2430
- if (event.getSource() == flipVItem)
2533
+ if (source == flipVItem)
24312534 {
24322535 FlipV(true);
24332536 } else
2434
- if (event.getSource() == unflipVItem)
2537
+ if (source == unflipVItem)
24352538 {
24362539 FlipV(false);
24372540 } else
2438
- if (event.getSource() == lowTexturesItem)
2541
+ if (source == lowTexturesItem)
24392542 {
24402543 SetTexRes(0);
24412544 } else
2442
- if (event.getSource() == normalTexturesItem)
2545
+ if (source == normalTexturesItem)
24432546 {
24442547 SetTexRes(1);
24452548 } else
2446
- if (event.getSource() == highTexturesItem)
2549
+ if (source == highTexturesItem)
24472550 {
24482551 SetTexRes(2);
24492552 } else
2450
- if (event.getSource() == veryhighTexturesItem)
2553
+ if (source == veryhighTexturesItem)
24512554 {
24522555 SetTexRes(3);
24532556 } else
2454
- if (event.getSource() == maxTexturesItem)
2557
+ if (source == maxTexturesItem)
24552558 {
24562559 SetTexRes(4);
24572560 } else
2458
- if (event.getSource() == panoTexturesItem)
2561
+ if (source == panoTexturesItem)
24592562 {
24602563 SetTexRes(5);
24612564 } else
2462
- if (event.getSource() == reverseNormalsItem)
2565
+ if (source == reverseNormalsItem)
24632566 {
24642567 ReverseNormals();
24652568 } else
2466
- if (event.getSource() == parseverticesItem)
2569
+ if (source == parseverticesItem)
24672570 {
24682571 ParseVertices();
24692572 } else
2470
- if (event.getSource() == textureFieldItem)
2573
+ if (source == textureFieldItem)
24712574 {
24722575 TextureVertices();
24732576 } else
2474
- if (event.getSource() == alignItem)
2577
+ if (source == alignItem)
24752578 {
24762579 Align();
24772580 } else
2478
- if (event.getSource() == mirrorItem)
2581
+ if (source == mirrorItem)
24792582 {
24802583 MirrorPoses();
24812584 } else
2482
- if (event.getSource() == reduceMorphItem)
2585
+ if (source == reduceMorphItem)
24832586 {
24842587 MeshReduction(false);
24852588 } else
2486
- if (event.getSource() == reduce34MorphItem)
2589
+ if (source == reduce34MorphItem)
24872590 {
24882591 MeshReduction(true);
24892592 } else
2490
- if (event.getSource() == reverseTrianglesItem)
2593
+ if (source == reverseTrianglesItem)
24912594 {
24922595 ReverseTriangles();
24932596 } else
2494
- if (event.getSource() == reduceMeshItem)
2597
+ if (source == reduceMeshItem)
24952598 {
24962599 ReduceMesh(false);
24972600 } else
2498
- if (event.getSource() == reduce34MeshItem)
2601
+ if (source == reduce34MeshItem)
24992602 {
25002603 ReduceMesh(true);
25012604 } else
2502
- if (event.getSource() == increaseMeshItem)
2605
+ if (source == increaseMeshItem)
25032606 {
25042607 IncreaseMesh();
25052608 } else
2506
- if (event.getSource() == clipMeshItem)
2609
+ if (source == clipMeshItem)
25072610 {
25082611 ClipMesh();
25092612 } else
2510
- if (event.getSource() == smoothMeshItem)
2613
+ if (source == smoothMeshItem)
25112614 {
25122615 SmoothMesh();
25132616 } else
2514
- if (event.getSource() == transformgeometryItem)
2617
+ if (source == transformgeometryItem)
25152618 {
25162619 TransformGeometry();
25172620 } else
2518
- if (event.getSource() == resetTransformItem)
2621
+ if (source == resetTransformItem)
25192622 {
25202623 ResetTransform();
25212624 } else
2522
- if (event.getSource() == resetCentroidItem)
2625
+ if (source == resetCentroidItem)
25232626 {
25242627 ResetCentroid();
25252628 } else
2526
- if (event.getSource() == resetParentItem)
2629
+ if (source == resetParentItem)
25272630 {
25282631 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25292632 {
....@@ -2533,7 +2636,7 @@
25332636
25342637 refreshContents();
25352638 } else
2536
- if (event.getSource() == repairParentItem)
2639
+ if (source == repairParentItem)
25372640 {
25382641 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25392642 {
....@@ -2547,7 +2650,7 @@
25472650
25482651 refreshContents();
25492652 } else
2550
- if (event.getSource() == repairShadowItem)
2653
+ if (source == repairShadowItem)
25512654 {
25522655 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25532656 {
....@@ -2561,7 +2664,7 @@
25612664
25622665 refreshContents();
25632666 } else
2564
- if (event.getSource() == sortbysizeItem)
2667
+ if (source == sortbysizeItem)
25652668 {
25662669 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25672670 {
....@@ -2573,7 +2676,7 @@
25732676 ResetModel();
25742677 refreshContents();
25752678 } else
2576
- if (event.getSource() == sortbynameItem)
2679
+ if (source == sortbynameItem)
25772680 {
25782681 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25792682 {
....@@ -2585,7 +2688,7 @@
25852688 ResetModel();
25862689 refreshContents();
25872690 } else
2588
- if (event.getSource() == attachPigmentItem)
2691
+ if (source == attachPigmentItem)
25892692 {
25902693 String texture = GetFile("Attach pigment");
25912694 Object3D obj;
....@@ -2597,7 +2700,7 @@
25972700
25982701 refreshContents();
25992702 } else
2600
- if (event.getSource() == detachPigmentItem)
2703
+ if (source == detachPigmentItem)
26012704 {
26022705 Object3D obj;
26032706 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2608,7 +2711,7 @@
26082711
26092712 refreshContents();
26102713 } else
2611
- if (event.getSource() == attachBumpItem)
2714
+ if (source == attachBumpItem)
26122715 {
26132716 String texture = GetFile("Attach bump");
26142717 Object3D obj;
....@@ -2620,7 +2723,7 @@
26202723
26212724 refreshContents();
26222725 } else
2623
- if (event.getSource() == detachBumpItem)
2726
+ if (source == detachBumpItem)
26242727 {
26252728 Object3D obj;
26262729 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2631,7 +2734,7 @@
26312734
26322735 refreshContents();
26332736 } else
2634
- if (event.getSource() == pigmentBumpItem)
2737
+ if (source == pigmentBumpItem)
26352738 {
26362739 Object3D obj;
26372740 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2642,158 +2745,195 @@
26422745
26432746 refreshContents();
26442747 } else
2645
- if (event.getSource() == flashSelectionButton)
2748
+ if (source == flashSelectionButton)
26462749 {
26472750 CameraPane.flash = true;
26482751 refreshContents();
26492752 } else
2650
- if (event.getSource() == oneButton)
2753
+ if (source == oneButton)
26512754 {
26522755 } else
2653
- if (event.getSource() == twoButton)
2756
+ if (source == twoButton)
26542757 {
26552758 radio.layout = twoButton;
26562759 // bug
26572760 //gridPanel.setDividerLocation(1.0);
26582761 //bigPanel.setDividerLocation(0.0);
2659
- bigThree.remove(scenePanel);
2660
- bigThree.remove(centralPanel);
2661
- bigThree.remove(XYZPanel);
2662
- aWindowConstraints.gridx = 0;
2663
- aWindowConstraints.gridy = 0;
2664
- aWindowConstraints.gridwidth = 1;
2665
- // aConstraints.gridheight = 3;
2666
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2667
- aWindowConstraints.weightx = 0;
2668
- aWindowConstraints.weighty = 1;
2669
- //bigThree.add(jtp, aWindowConstraints);
2670
- aWindowConstraints.weightx = 1;
2671
- aWindowConstraints.gridwidth = 3;
2672
- // aConstraints.gridheight = 3;
2673
- aWindowConstraints.gridx = 1;
2674
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2675
- bigThree.add(centralPanel, aWindowConstraints);
2676
- aWindowConstraints.weightx = 0;
2677
- aWindowConstraints.gridx = 4;
2678
- aWindowConstraints.gridwidth = 1;
2679
- // aConstraints.gridheight = 3;
2680
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2681
- //bigThree.add(XYZPanel, aWindowConstraints);
2682
- bigThree.revalidate();
2762
+// bigThree.remove(scenePanel);
2763
+// bigThree.remove(centralPanel);
2764
+// bigThree.remove(XYZPanel);
2765
+// aWindowConstraints.gridx = 0;
2766
+// aWindowConstraints.gridy = 0;
2767
+// aWindowConstraints.gridwidth = 1;
2768
+// // aConstraints.gridheight = 3;
2769
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2770
+// aWindowConstraints.weightx = 0;
2771
+// aWindowConstraints.weighty = 1;
2772
+// //bigThree.add(jtp, aWindowConstraints);
2773
+// aWindowConstraints.weightx = 1;
2774
+// aWindowConstraints.gridwidth = 3;
2775
+// // aConstraints.gridheight = 3;
2776
+// aWindowConstraints.gridx = 1;
2777
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2778
+// bigThree.add(centralPanel, aWindowConstraints);
2779
+// aWindowConstraints.weightx = 0;
2780
+// aWindowConstraints.gridx = 4;
2781
+// aWindowConstraints.gridwidth = 1;
2782
+// // aConstraints.gridheight = 3;
2783
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2784
+// //bigThree.add(XYZPanel, aWindowConstraints);
2785
+// scenePanel.setVisible(false);
2786
+// centralPanel.setVisible(true);
2787
+// XYZPanel.setVisible(false);
2788
+ bigThree.ClearUI();
2789
+ bigThree.add(centralPanel);
2790
+ bigThree.FlushUI();
26832791 } else
2684
- if (event.getSource() == threeButton)
2792
+ if (source == threeButton)
26852793 {
26862794 radio.layout = threeButton;
2687
- bigThree.remove(scenePanel);
2688
- bigThree.remove(centralPanel);
2689
- bigThree.remove(XYZPanel);
2690
- aWindowConstraints.gridx = 0;
2691
- aWindowConstraints.gridy = 0;
2692
- aWindowConstraints.gridwidth = 1;
2693
- // aConstraints.gridheight = 3;
2694
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2695
- aWindowConstraints.weightx = 0;
2696
- aWindowConstraints.weighty = 1;
2697
- //bigThree.add(jtp, aWindowConstraints);
2698
- aWindowConstraints.weightx = 1;
2699
- aWindowConstraints.gridwidth = 3;
2700
- // aConstraints.gridheight = 3;
2701
- aWindowConstraints.gridx = 1;
2702
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2703
- bigThree.add(centralPanel, aWindowConstraints);
2704
- aWindowConstraints.weightx = 0;
2705
- aWindowConstraints.gridx = 4;
2706
- aWindowConstraints.gridwidth = 1;
2707
- // aConstraints.gridheight = 3;
2708
- aConstraints.fill = GridBagConstraints.VERTICAL;
2709
- bigThree.add(XYZPanel, aWindowConstraints);
2710
- bigThree.revalidate();
2795
+
2796
+// bigThree.remove(scenePanel);
2797
+// bigThree.remove(centralPanel);
2798
+// bigThree.remove(XYZPanel);
2799
+// aWindowConstraints.gridx = 0;
2800
+// aWindowConstraints.gridy = 0;
2801
+// aWindowConstraints.gridwidth = 1;
2802
+// // aConstraints.gridheight = 3;
2803
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2804
+// aWindowConstraints.weightx = 0;
2805
+// aWindowConstraints.weighty = 1;
2806
+// //bigThree.add(jtp, aWindowConstraints);
2807
+// aWindowConstraints.weightx = 1;
2808
+// aWindowConstraints.gridwidth = 3;
2809
+// // aConstraints.gridheight = 3;
2810
+// aWindowConstraints.gridx = 1;
2811
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2812
+// bigThree.add(centralPanel, aWindowConstraints);
2813
+// aWindowConstraints.weightx = 0;
2814
+// aWindowConstraints.gridx = 4;
2815
+// aWindowConstraints.gridwidth = 1;
2816
+// // aConstraints.gridheight = 3;
2817
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2818
+// bigThree.add(XYZPanel, aWindowConstraints);
2819
+// bigThree.validate();
2820
+// scenePanel.setVisible(false);
2821
+// centralPanel.setVisible(true);
2822
+// XYZPanel.setVisible(true);
2823
+ bigThree.ClearUI();
2824
+ bigThree.add(centralPanel);
2825
+ bigThree.add(XYZPanel);
2826
+ bigThree.FlushUI();
27112827 } else
2712
- if (event.getSource() == fourButton)
2828
+ if (source == fourButton)
27132829 {
27142830 radio.layout = fourButton;
2715
- bigThree.remove(scenePanel);
2716
- bigThree.remove(centralPanel);
2717
- bigThree.remove(XYZPanel);
2718
- aWindowConstraints.gridx = 0;
2719
- aWindowConstraints.gridy = 0;
2720
- aWindowConstraints.gridwidth = 1;
2721
- // aWindowConstraints.gridheight = 3;
2722
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2723
- aWindowConstraints.weightx = 1;
2724
- aWindowConstraints.weighty = 1;
2725
- bigThree.add(scenePanel, aWindowConstraints);
2726
- aWindowConstraints.weightx = 1;
2727
- aWindowConstraints.gridwidth = 3;
2728
- // aConstraints.gridheight = 3;
2729
- aWindowConstraints.gridx = 1;
2730
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2731
- //bigThree.add(cameraPanel, aWindowConstraints);
2732
- aWindowConstraints.weightx = 0;
2733
- aWindowConstraints.gridx = 4;
2734
- aWindowConstraints.gridwidth = 1;
2735
- // aWindowConstraints.gridheight = 3;
2736
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2737
- //bigThree.add(XYZPanel, aWindowConstraints);
2738
- bigThree.revalidate();
2831
+
2832
+// bigThree.remove(scenePanel);
2833
+// bigThree.remove(centralPanel);
2834
+// bigThree.remove(XYZPanel);
2835
+// aWindowConstraints.gridx = 0;
2836
+// aWindowConstraints.gridy = 0;
2837
+// aWindowConstraints.gridwidth = 1;
2838
+// // aWindowConstraints.gridheight = 3;
2839
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2840
+// aWindowConstraints.weightx = 1;
2841
+// aWindowConstraints.weighty = 1;
2842
+// bigThree.add(scenePanel, aWindowConstraints);
2843
+// aWindowConstraints.weightx = 1;
2844
+// aWindowConstraints.gridwidth = 3;
2845
+// // aConstraints.gridheight = 3;
2846
+// aWindowConstraints.gridx = 1;
2847
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2848
+// //bigThree.add(cameraPanel, aWindowConstraints);
2849
+// aWindowConstraints.weightx = 0;
2850
+// aWindowConstraints.gridx = 4;
2851
+// aWindowConstraints.gridwidth = 1;
2852
+// // aWindowConstraints.gridheight = 3;
2853
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2854
+// //bigThree.add(XYZPanel, aWindowConstraints);
2855
+// bigThree.validate();
2856
+// scenePanel.setVisible(true);
2857
+// centralPanel.setVisible(false);
2858
+// XYZPanel.setVisible(false);
2859
+ bigThree.ClearUI();
2860
+ bigThree.add(scenePanel);
2861
+ bigThree.FlushUI();
27392862 } else
2740
- if (event.getSource() == sixButton)
2863
+ if (source == sixButton)
27412864 {
27422865 radio.layout = sixButton;
2743
- bigThree.remove(scenePanel);
2744
- bigThree.remove(centralPanel);
2745
- bigThree.remove(XYZPanel);
2746
- aWindowConstraints.gridx = 0;
2747
- aWindowConstraints.gridy = 0;
2748
- aWindowConstraints.gridwidth = 1;
2749
- // aConstraints.gridheight = 3;
2750
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2751
- aWindowConstraints.weightx = 0;
2752
- aWindowConstraints.weighty = 1;
2753
- bigThree.add(scenePanel, aWindowConstraints);
2754
- aWindowConstraints.weightx = 1;
2755
- aWindowConstraints.gridwidth = 3;
2756
- // aWindowConstraints.gridheight = 3;
2757
- aWindowConstraints.gridx = 1;
2758
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2759
- bigThree.add(centralPanel, aWindowConstraints);
2760
- aWindowConstraints.weightx = 0;
2761
- aWindowConstraints.gridx = 4;
2762
- aWindowConstraints.gridwidth = 1;
2763
- // aWindowConstraints.gridheight = 3;
2764
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2765
- //bigThree.add(XYZPanel, aConstraints);
2766
- bigThree.revalidate();
2866
+
2867
+// bigThree.remove(scenePanel);
2868
+// bigThree.remove(centralPanel);
2869
+// bigThree.remove(XYZPanel);
2870
+// aWindowConstraints.gridx = 0;
2871
+// aWindowConstraints.gridy = 0;
2872
+// aWindowConstraints.gridwidth = 1;
2873
+// // aConstraints.gridheight = 3;
2874
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2875
+// aWindowConstraints.weightx = 0;
2876
+// aWindowConstraints.weighty = 1;
2877
+// bigThree.add(scenePanel, aWindowConstraints);
2878
+// aWindowConstraints.weightx = 1;
2879
+// aWindowConstraints.gridwidth = 3;
2880
+// // aWindowConstraints.gridheight = 3;
2881
+// aWindowConstraints.gridx = 1;
2882
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2883
+// bigThree.add(centralPanel, aWindowConstraints);
2884
+// aWindowConstraints.weightx = 0;
2885
+// aWindowConstraints.gridx = 4;
2886
+// aWindowConstraints.gridwidth = 1;
2887
+// // aWindowConstraints.gridheight = 3;
2888
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2889
+// //bigThree.add(XYZPanel, aConstraints);
2890
+// bigThree.validate();
2891
+// scenePanel.setVisible(true);
2892
+// centralPanel.setVisible(true);
2893
+// XYZPanel.setVisible(false);
2894
+ bigThree.ClearUI();
2895
+ bigThree.add(scenePanel);
2896
+ bigThree.add(centralPanel);
2897
+ bigThree.FlushUI();
27672898 } else
2768
- if (event.getSource() == sevenButton)
2899
+ if (source == sevenButton)
27692900 {
27702901 radio.layout = sevenButton;
2771
- bigThree.remove(scenePanel);
2772
- bigThree.remove(centralPanel);
2773
- bigThree.remove(XYZPanel);
2774
- aWindowConstraints.gridx = 0;
2775
- aWindowConstraints.gridy = 0;
2776
- aWindowConstraints.gridwidth = 1;
2777
- // aWindowConstraints.gridheight = 3;
2778
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2779
- aWindowConstraints.weightx = 0;
2780
- aWindowConstraints.weighty = 1;
2781
- bigThree.add(scenePanel, aWindowConstraints);
2782
- aWindowConstraints.weightx = 1;
2783
- aWindowConstraints.gridwidth = 3;
2784
- // aWindowConstraints.gridheight = 3;
2785
- aWindowConstraints.gridx = 1;
2786
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2787
- bigThree.add(centralPanel, aWindowConstraints);
2788
- aWindowConstraints.weightx = 0;
2789
- aWindowConstraints.gridx = 4;
2790
- aWindowConstraints.gridwidth = 1;
2791
- // aConstraints.gridheight = 3;
2792
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2793
- bigThree.add(XYZPanel, aWindowConstraints);
2794
- bigThree.revalidate();
2902
+
2903
+// bigThree.remove(scenePanel);
2904
+// bigThree.remove(centralPanel);
2905
+// bigThree.remove(XYZPanel);
2906
+// aWindowConstraints.gridx = 0;
2907
+// aWindowConstraints.gridy = 0;
2908
+// aWindowConstraints.gridwidth = 1;
2909
+// // aWindowConstraints.gridheight = 3;
2910
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2911
+// aWindowConstraints.weightx = 0;
2912
+// aWindowConstraints.weighty = 1;
2913
+// bigThree.add(scenePanel, aWindowConstraints);
2914
+// aWindowConstraints.weightx = 1;
2915
+// aWindowConstraints.gridwidth = 3;
2916
+// // aWindowConstraints.gridheight = 3;
2917
+// aWindowConstraints.gridx = 1;
2918
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2919
+// bigThree.add(centralPanel, aWindowConstraints);
2920
+// aWindowConstraints.weightx = 0;
2921
+// aWindowConstraints.gridx = 4;
2922
+// aWindowConstraints.gridwidth = 1;
2923
+// // aConstraints.gridheight = 3;
2924
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2925
+// bigThree.add(XYZPanel, aWindowConstraints);
2926
+// bigThree.validate();
2927
+// scenePanel.setVisible(true);
2928
+// centralPanel.setVisible(true);
2929
+// XYZPanel.setVisible(true);
2930
+ bigThree.ClearUI();
2931
+ bigThree.add(scenePanel);
2932
+ bigThree.add(centralPanel);
2933
+ bigThree.add(XYZPanel);
2934
+ bigThree.FlushUI();
27952935 } else
2796
- if (event.getSource() == rootButton)
2936
+ if (source == rootButton)
27972937 {
27982938 Object3D obj;
27992939 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2805,7 +2945,7 @@
28052945
28062946 refreshContents(true);
28072947 } else
2808
- if (event.getSource() == closeButton)
2948
+ if (source == closeButton)
28092949 {
28102950 //System.out.println("CLOSE: " + buttonGroup.getSelection());
28112951 cRadio ab;
....@@ -2826,11 +2966,11 @@
28262966 }
28272967 refreshContents(true);
28282968 } else
2829
- if (event.getSource() == editItem || event.getSource() == editButton)
2969
+ if (source == editItem || source == editButton)
28302970 {
28312971 EditSelection(false);
28322972 } else
2833
- if (event.getSource() == uneditButton)
2973
+ if (source == uneditButton)
28342974 {
28352975 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28362976 {
....@@ -2842,12 +2982,12 @@
28422982
28432983 child.editWindow = null; // ???????????
28442984 }
2845
- objEditor.ctrlPanel.revalidate();
2985
+ objEditor.ctrlPanel.FlushUI();
28462986 //objEditor.jTree.clearSelection();
28472987 //objEditor.ResetSliders();
28482988 refreshContents(true);
28492989 } else
2850
- if (event.getSource() == clearPanelButton)
2990
+ if (source == clearPanelButton)
28512991 {
28522992 assert(copy == group);
28532993 //copy.ClearUI();
....@@ -2858,7 +2998,7 @@
28582998 listUI.clear();
28592999 refreshContents(true);
28603000 } else
2861
- if (event.getSource() == allParamsButton)
3001
+ if (source == allParamsButton)
28623002 {
28633003 assert(copy == group);
28643004
....@@ -2879,19 +3019,19 @@
28793019
28803020 refreshContents(true);
28813021 } else
2882
- if (event.getSource() == unselectButton)
3022
+ if (source == unselectButton)
28833023 {
28843024 objEditor.jTree.clearSelection();
28853025 // ?? oct 2012 GrafreeD.clipboard.clear();
28863026 objEditor.ResetSliders();
28873027 refreshContents(true);
28883028 } else
2889
- if(event.getSource() instanceof cRadio)
3029
+ if(source instanceof cRadio)
28903030 {
28913031 group.parent = keepparent;
28923032 group.attributes = 0;
28933033 //group.editWindow = null;
2894
- /*cRadio*/ radio = (cRadio)event.getSource();
3034
+ /*cRadio*/ radio = (cRadio)source;
28953035 Object3D obj = radio.GetObject();
28963036 System.out.println("Edit " + obj);
28973037 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2911,7 +3051,7 @@
29113051 }
29123052
29133053 copy = group;
2914
- //CameraPane.theRenderer.object = group;
3054
+ //Globals.theRenderer.object = group;
29153055 if(!useclient)
29163056 {
29173057 cameraView.renderCamera = radio.camera;
....@@ -2920,7 +3060,8 @@
29203060 cameraView.cameras[cameraView.cameracount] = radio.camera;
29213061 cameraView.targetLookAt.set(radio.camera.lookAt);
29223062 cameraView.object = group;
2923
- cameraView.lighttouched = true;
3063
+ //cameraView.lighttouched = true;
3064
+ Globals.lighttouched = true;
29243065 topView.object = group;
29253066 frontView.object = group;
29263067 sideView.object = group;
....@@ -2956,7 +3097,7 @@
29563097 if (useclient)
29573098 {
29583099 cameraView.object = client;
2959
- cameraView.lighttouched = true;
3100
+ Globals.lighttouched = true;
29603101 //topView.object = client;
29613102 //frontView.object = client;
29623103 //sideView.object = client;
....@@ -2964,7 +3105,7 @@
29643105 else
29653106 {
29663107 cameraView.object = group;
2967
- cameraView.lighttouched = true;
3108
+ Globals.lighttouched = true;
29683109 //topView.object = group;
29693110 //frontView.object = group;
29703111 //sideView.object = group;
....@@ -3472,7 +3613,7 @@
34723613 String pigment = Object3D.GetPigment(tex);
34733614 //String bump = Object3D.GetBump(tex);
34743615
3475
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3616
+ com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
34763617
34773618 double s = v.s;
34783619
....@@ -3560,11 +3701,11 @@
35603701
35613702 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
35623703
3563
- boolean random = CameraPane.RANDOM;
3564
- CameraPane.RANDOM = false; // parse all random nodes
3704
+ boolean random = CameraPane.SWITCH;
3705
+ CameraPane.SWITCH = false; // parse all random nodes
35653706 lowres.linkVerticesThis(null);
35663707 lowres.linkVerticesThis(sn);
3567
- CameraPane.RANDOM = random;
3708
+ CameraPane.SWITCH = random;
35683709
35693710 System.err.flush();
35703711
....@@ -3773,7 +3914,7 @@
37733914 group.selection.RelinkToSupport(); // july 2014
37743915 System.out.println("DONE.");
37753916 refreshContents();
3776
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3917
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
37773918 }
37783919
37793920 void ReduceMesh(boolean reduction34)
....@@ -4049,25 +4190,25 @@
40494190 System.err.println("info : " + child.GetPath());
40504191 }
40514192 }
4052
- else
4053
- {
4054
- objEditor.SetMaterial(group); // .GetMaterial());
4055
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4056
- System.err.println("info : " + group.GetPath());
4057
- }
4193
+// else
4194
+// {
4195
+// objEditor.SetMaterial(group); // .GetMaterial());
4196
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4197
+// System.err.println("info : " + group.GetPath());
4198
+// }
40584199
40594200 objEditor.SetText(); // jan 2014
40604201
4061
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4202
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
40624203 CameraPane.flash = true;
40634204
40644205 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
40654206 // a camera
40664207 {
40674208 CameraPane.camerachangeframe = 0; // don't refuse it
4068
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4069
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
4070
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4209
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4210
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4211
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
40714212 }
40724213
40734214 refreshContents();
....@@ -4322,7 +4463,7 @@
43224463 refreshContents();
43234464 }
43244465
4325
- void pasteInto(boolean copyit)
4466
+ void pasteInto(boolean copyit, boolean clone)
43264467 {
43274468 // if (GrafreeD.clipboard == null)
43284469 // return;
....@@ -4351,7 +4492,14 @@
43514492 if (copyit)
43524493 {
43534494 // paste(false);
4354
- CloneClipboard(false); // sept 2014
4495
+ if (clone)
4496
+ {
4497
+ CloneClipboard(false); // sept 2014
4498
+ }
4499
+ else
4500
+ {
4501
+ paste(false);
4502
+ }
43554503 }
43564504 else
43574505 {
....@@ -4895,10 +5043,12 @@
48955043 cButton flashSelectionButton;
48965044 cButton editButton;
48975045 cButton uneditButton;
5046
+ JCheckBox allParamsButton;
48985047 cButton clearpanelButton;
4899
- cButton allParamsButton;
49005048 cButton unselectButton;
49015049
5050
+ cButton oneStepButton;
5051
+
49025052 cButton screenfitButton;
49035053 cButton screenfitpointButton;
49045054 cButton snapobjectButton;
....@@ -4953,6 +5103,7 @@
49535103 private MenuItem mergeGeometriesItem;
49545104 private MenuItem copyItem;
49555105 private MenuItem pasteItem;
5106
+ private MenuItem pasteIntoItem;
49565107 private MenuItem pasteLinkItem;
49575108 private MenuItem pasteCloneItem;
49585109 private MenuItem pasteExpandItem;
....@@ -5050,7 +5201,7 @@
50505201 private MenuItem blobItem;
50515202 private MenuItem latheItem;
50525203 private MenuItem bezierItem;
5053
- private MenuItem checkerItem;
5204
+ private MenuItem overlayItem;
50545205 private MenuItem meshItem;
50555206 // private MenuItem meshGroupItem;
50565207 private MenuItem springItem;