Normand Briere
2019-05-05 44b1501b5c4cd60ea67cc3d0971ed53f53b594e6
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"));
....@@ -1120,6 +1204,8 @@
11201204 resetParentItem.addActionListener(this);
11211205 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11221206 repairParentItem.addActionListener(this);
1207
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1208
+ repairShadowItem.addActionListener(this);
11231209 menu.add(invariantsItem = new MenuItem("Invariants"));
11241210 invariantsItem.addActionListener(this);
11251211 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1127,6 +1213,7 @@
11271213 menu.add("-");
11281214 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11291215 editScriptItem.addActionListener(this);
1216
+ }
11301217 }
11311218
11321219 void ScreenFit()
....@@ -1480,6 +1567,7 @@
14801567 //
14811568 public void actionPerformed(ActionEvent event) // , Object arg)
14821569 {
1570
+ Object source = event.getSource();
14831571 /*
14841572 if (event.getSource() == nameField)
14851573 {
....@@ -1491,11 +1579,11 @@
14911579 }
14921580 else
14931581 */
1494
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1582
+ if (source == lookAtItem || source == lookFromItem)
14951583 {
14961584 ScreenFit();
14971585 } else
1498
- if (event.getSource() == switchItem)
1586
+ if (source == switchItem)
14991587 {
15001588 cVector v1 = new cVector();
15011589 cVector v2 = new cVector();
....@@ -1504,11 +1592,11 @@
15041592 objEditor.cameraView.renderCamera.setAim(v2, v1);
15051593 objEditor.cameraView.repaint();
15061594 } else
1507
- if (event.getSource() == rectoidItem)
1595
+ if (source == rectoidItem)
15081596 {
15091597 makeSomething(new Box());
15101598 } else
1511
- if (event.getSource() == particleItem)
1599
+ if (source == particleItem)
15121600 {
15131601 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15141602 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1529,9 +1617,9 @@
15291617 applyExample(particleGeom, "SMOKE");
15301618 makeSomething(particleGeom);
15311619 } else
1532
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1620
+ if (source == ragdollItem || source == ragdoll2Item)
15331621 {
1534
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1622
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15351623
15361624 ragdoll.toParent = LA.newMatrix();
15371625 ragdoll.fromParent = LA.newMatrix();
....@@ -1549,7 +1637,7 @@
15491637 } else
15501638 /*
15511639 */
1552
- if (event.getSource() == heightFieldItem)
1640
+ if (source == heightFieldItem)
15531641 {
15541642 Object3D obj = new Object3D();
15551643
....@@ -1587,31 +1675,31 @@
15871675
15881676 makeSomething(obj);
15891677 } else
1590
- if (event.getSource() == gridItem)
1678
+ if (source == gridItem)
15911679 {
15921680 makeSomething(new Grid());
15931681 } else
1594
- if (event.getSource() == ellipsoidItem)
1682
+ if (source == ellipsoidItem)
15951683 {
15961684 makeSomething(new Sphere());
15971685 } else
1598
- if (event.getSource() == coneItem)
1686
+ if (source == coneItem)
15991687 {
16001688 makeSomething(new Cone());
16011689 } else
1602
- if (event.getSource() == torusItem)
1690
+ if (source == torusItem)
16031691 {
16041692 makeSomething(new Torus());
16051693 } else
1606
- if (event.getSource() == superItem)
1694
+ if (source == superItem)
16071695 {
16081696 makeSomething(new Superellipsoid());
16091697 } else
1610
- if (event.getSource() == kleinItem)
1698
+ if (source == kleinItem)
16111699 {
16121700 makeSomething(new Klein());
16131701 } else
1614
- if (event.getSource() == blobItem)
1702
+ if (source == blobItem)
16151703 {
16161704 Blob blob = new Blob();
16171705 BlobComponent comp = new BlobComponent();
....@@ -1619,15 +1707,15 @@
16191707 //blob.retile();
16201708 makeSomething(blob);
16211709 } else
1622
- if (event.getSource() == latheItem)
1710
+ if (source == latheItem)
16231711 {
16241712 makeSomething(new Lathe());
16251713 } else
1626
- if (event.getSource() == bezierItem)
1714
+ if (source == bezierItem)
16271715 {
16281716 makeSomething(new BezierSurface());
16291717 } else
1630
- if (event.getSource() == checkerItem)
1718
+ if (source == overlayItem)
16311719 {
16321720 /*
16331721 Object3D obj = new BezierSurface(5,8);
....@@ -1642,7 +1730,7 @@
16421730 */
16431731 makeSomething(new Checker());
16441732 } else
1645
- if (event.getSource() == meshItem)
1733
+ if (source == meshItem)
16461734 {
16471735 Object3D itemtomake = new Object3D();
16481736 Object3D child;
....@@ -1663,35 +1751,35 @@
16631751 makeSomething(child);
16641752 }
16651753 } else
1666
- if (event.getSource() == springItem)
1754
+ if (source == springItem)
16671755 {
16681756 cSpring s = new cSpring();
16691757 s.setup();
16701758 makeSomething(s);
16711759 } else
1672
- if (event.getSource() == flagItem)
1760
+ if (source == flagItem)
16731761 {
16741762 cSpring s = new cFlag();
16751763 s.setup();
16761764 makeSomething(s);
16771765 } else
1678
- if (event.getSource() == lightItem)
1766
+ if (source == lightItem)
16791767 {
16801768 makeSomething(new Light());
16811769 } else
1682
- if (event.getSource() == csgItem)
1770
+ if (source == csgItem)
16831771 {
16841772 group(new CSG());
16851773 } else
1686
- if (event.getSource() == templateItem)
1774
+ if (source == templateItem)
16871775 {
16881776 group(new cTemplate());
16891777 } else
1690
- if (event.getSource() == attributeItem)
1778
+ if (source == attributeItem)
16911779 {
16921780 makeSomething(new Attribute());
16931781 } else
1694
- if (event.getSource() == pointflowItem)
1782
+ if (source == pointflowItem)
16951783 {
16961784 makeSomething(new PointFlow());
16971785 } else
....@@ -1703,7 +1791,7 @@
17031791 } else
17041792 */
17051793
1706
- if (event.getSource() == superLoopItem)
1794
+ if (source == superLoopItem)
17071795 {
17081796 Composite g = new cGroup();
17091797 for (int i=0; i<15; i++)
....@@ -1725,7 +1813,7 @@
17251813
17261814 group(g);
17271815 } else
1728
- if (event.getSource() == loopItem)
1816
+ if (source == loopItem)
17291817 {
17301818 Composite csg = new GroupLeaf();
17311819 csg.count = 5;
....@@ -1734,7 +1822,7 @@
17341822 csg.addChild(child);
17351823 child.addChild(csg);
17361824 } else
1737
- if (event.getSource() == doubleItem)
1825
+ if (source == doubleItem)
17381826 {
17391827 Composite csg = new GroupLeaf();
17401828 csg.count = 5;
....@@ -1746,7 +1834,7 @@
17461834 csg.addChild(child);
17471835 child.addChild(csg);
17481836 } else
1749
- if (event.getSource() == tripleItem)
1837
+ if (source == tripleItem)
17501838 {
17511839 Composite csg = new GroupLeaf();
17521840 csg.count = 4;
....@@ -1762,70 +1850,83 @@
17621850 child.addChild(csg);
17631851 } else
17641852
1765
- if (event.getSource() == importGFDItem)
1853
+ if (source == importGFDItem)
17661854 {
17671855 ImportGFD();
17681856 } else
1769
- if (event.getSource() == importVRMLX3DItem)
1857
+ if (source == importVRMLX3DItem)
17701858 {
17711859 ImportVRMLX3D();
17721860 } else
1773
- if (event.getSource() == import3DSItem)
1861
+ if (source == import3DSItem)
17741862 {
17751863 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17761864 } else
1777
- if (event.getSource() == importOBJItem)
1865
+ if (source == importOBJItem)
17781866 {
1779
- 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
+ }
17801876 } else
1781
- if (event.getSource() == computeAOItem)
1877
+ if (source == computeAOItem)
17821878 {
1783
- CameraPane.drawMode = CameraPane.OCCLUSION;
1784
- CameraPane.theRenderer.repaint();
1879
+ Globals.drawMode = CameraPane.OCCLUSION;
1880
+ Globals.theRenderer.repaint();
17851881 } else
1786
- if (event.getSource() == recompileItem)
1882
+ if (source == recompileItem)
17871883 {
17881884 Recompile();
17891885 refreshContents();
17901886 } else
1791
- if (event.getSource() == editScriptItem)
1887
+ if (source == editScriptItem)
17921888 {
17931889 OpenDialog();
17941890 refreshContents();
17951891 } else
1796
- if (event.getSource() == invariantsItem)
1892
+ if (source == invariantsItem)
17971893 {
17981894 System.out.println("Invariants:");
17991895 GrafreeD.grafreeD.universe.invariants();
18001896 } else
1801
- if (event.getSource() == memoryItem)
1897
+ if (source == memoryItem)
18021898 {
18031899 //System.out.println("Invariants:");
18041900 PrintMemory();
18051901 } else
1806
- if (event.getSource() == pathItem)
1902
+ if (source == pathItem)
18071903 {
18081904 PrintPath();
18091905 } else
1810
- if (event.getSource() == analyzeItem)
1906
+ if (source == analyzeItem)
18111907 {
18121908 AnalyzeObject();
18131909 } else
1814
- if (event.getSource() == dumpItem)
1910
+ if (source == dumpItem)
18151911 {
18161912 DumpObject();
18171913 } else
1818
- if (event.getSource() == screenfitButton)
1914
+ if (source == oneStepButton)
1915
+ {
1916
+ Globals.ONESTEP = true;
1917
+ cameraView.repaint();
1918
+ } else
1919
+ if (source == screenfitButton)
18191920 {
18201921 //Reload(lastConverter, lastFilename, true);
18211922 ScreenFit();
18221923 } else
1823
- if (event.getSource() == screenfitpointButton)
1924
+ if (source == screenfitpointButton)
18241925 {
18251926 //Reload(lastConverter, lastFilename, true);
18261927 ScreenFitPoint();
18271928 } else
1828
- if (event.getSource() == snapobjectButton)
1929
+ if (source == snapobjectButton)
18291930 {
18301931 //Reload(lastConverter, lastFilename, true);
18311932 SnapObject();
....@@ -1836,13 +1937,13 @@
18361937 // Recompile();
18371938 // refreshContents();
18381939 // } else
1839
- if (event.getSource() == gcButton)
1940
+ if (source == gcButton)
18401941 {
18411942 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18421943 System.gc();
18431944 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18441945 } else
1845
- if (event.getSource() == editLeafItem)
1946
+ if (source == editLeafItem)
18461947 {
18471948 Object3D obj;
18481949 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1856,62 +1957,66 @@
18561957 }
18571958 refreshContents(true);
18581959 } else
1859
- if (event.getSource() == openWindowItem)
1960
+ if (source == openWindowItem)
18601961 {
18611962 EditSelection(true);
18621963 } else
1863
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1964
+ if (source == cutItem || source == clearButton)
18641965 {
18651966 loadClipboard(true);
18661967 } else
1867
- if (event.getSource() == duplicateItem)
1968
+ if (source == duplicateItem)
18681969 {
18691970 Object3D keep = GrafreeD.clipboard;
18701971 loadClipboard(false);
18711972 paste(false);
18721973 GrafreeD.clipboard = keep;
18731974 } else
1874
- if (event.getSource() == cloneItem)
1975
+ if (source == cloneItem)
18751976 {
18761977 CloneSelection(false);
18771978 } else
1878
- if (event.getSource() == cloneSupportItem)
1979
+ if (source == cloneSupportItem)
18791980 {
18801981 CloneSelection(true);
18811982 } else
1882
- if (event.getSource() == copyItem)
1983
+ if (source == copyItem)
18831984 {
18841985 loadClipboard(false);
18851986 } else
1886
- if (event.getSource() == pasteItem)
1987
+ if (source == pasteItem)
18871988 {
18881989 paste(false);
18891990 } else
1890
- if (event.getSource() == pasteLinkItem)
1991
+ if (source == pasteIntoItem)
18911992 {
1892
- pasteInto(false);
1993
+ pasteInto(true, false);
18931994 } else
1894
- if (event.getSource() == pasteCloneItem)
1995
+ if (source == pasteLinkItem)
18951996 {
1896
- pasteInto(true);
1997
+ pasteInto(false, false);
18971998 } else
1898
- if (event.getSource() == pasteExpandItem)
1999
+ if (source == pasteCloneItem)
2000
+ {
2001
+ pasteInto(true, true);
2002
+ } else
2003
+ if (source == pasteExpandItem)
18992004 {
19002005 paste(true);
19012006 } else
1902
- if (event.getSource() == synchronizeItem)
2007
+ if (source == synchronizeItem)
19032008 {
19042009 Overwrite(Object3D.TRANSFORM);
19052010 } else
1906
- if (event.getSource() == overwriteNameItem)
2011
+ if (source == overwriteNameItem)
19072012 {
19082013 Overwrite(Object3D.NAME);
19092014 } else
1910
- if (event.getSource() == overwriteUVItem)
2015
+ if (source == overwriteUVItem)
19112016 {
19122017 Overwrite(Object3D.UV);
19132018 } else
1914
- if (event.getSource() == overwriteMatItem)
2019
+ if (source == overwriteMatItem)
19152020 {
19162021 /* july 2015
19172022 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1931,7 +2036,7 @@
19312036
19322037 Overwrite(dropAttributes);
19332038 }
1934
- if (event.getSource() == overwriteGeoItem)
2039
+ if (source == overwriteGeoItem)
19352040 {
19362041 Overwrite(Object3D.GEOMETRY);
19372042 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1948,7 +2053,7 @@
19482053 // refreshContents();
19492054 // }
19502055 } else
1951
- if (event.getSource() == generateMeshItem)
2056
+ if (source == generateMeshItem)
19522057 {
19532058 //if (group.selection.size() == 1)
19542059 // for (int i=0; i<group.selection.size(); i++)
....@@ -1959,7 +2064,7 @@
19592064 ResetModel();
19602065 refreshContents();
19612066 } else
1962
- if (event.getSource() == extractGeometriesItem)
2067
+ if (source == extractGeometriesItem)
19632068 {
19642069 boolean one = false;
19652070
....@@ -1986,7 +2091,7 @@
19862091 ResetModel();
19872092 refreshContents();
19882093 } else
1989
- if (event.getSource() == cloneGeometriesItem)
2094
+ if (source == cloneGeometriesItem)
19902095 {
19912096 boolean one = false;
19922097
....@@ -2012,7 +2117,7 @@
20122117 ResetModel();
20132118 refreshContents();
20142119 } else
2015
- if (event.getSource() == shareGeometriesItem)
2120
+ if (source == shareGeometriesItem)
20162121 {
20172122 boolean one = false;
20182123
....@@ -2042,7 +2147,7 @@
20422147 refreshContents();
20432148 }
20442149 } else
2045
- if (event.getSource() == mergeGeometriesItem)
2150
+ if (source == mergeGeometriesItem)
20462151 {
20472152 boolean one = false;
20482153
....@@ -2072,7 +2177,7 @@
20722177 ResetModel();
20732178 refreshContents();
20742179 } else
2075
- if (event.getSource() == linkverticesItem)
2180
+ if (source == linkverticesItem)
20762181 {
20772182 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20782183 // {
....@@ -2092,41 +2197,41 @@
20922197 if (content instanceof cGroup && ((cGroup)content).transientlink )
20932198 content = ((cGroup)content).get(0);
20942199
2095
- 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));
20962201 for (int i=0; i<group.selection.size(); i++)
20972202 {
2098
- boolean random = CameraPane.RANDOM;
2099
- CameraPane.RANDOM = false; // parse all random nodes
2203
+ boolean random = CameraPane.SWITCH;
2204
+ CameraPane.SWITCH = false; // parse all random nodes
21002205 group.selection.get(i).linkVerticesThis(content);
21012206 // group.selection.get(i).setMasterThis(content); // should be identity
2102
- CameraPane.RANDOM = random;
2207
+ CameraPane.SWITCH = random;
21032208 }
2104
- 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));
21052210 refreshContents();
21062211 }
21072212 } else
2108
- if (event.getSource() == resetsupportItem)
2213
+ if (source == resetsupportItem)
21092214 {
21102215 for (int i=0; i<group.selection.size(); i++)
21112216 {
2112
- boolean random = CameraPane.RANDOM;
2113
- CameraPane.RANDOM = false; // parse all random nodes
2217
+ boolean random = CameraPane.SWITCH;
2218
+ CameraPane.SWITCH = false; // parse all random nodes
21142219 group.selection.get(i).linkVerticesThis(null);
2115
- CameraPane.RANDOM = random;
2220
+ CameraPane.SWITCH = random;
21162221 }
21172222
21182223 refreshContents();
21192224 } else
2120
- if (event.getSource() == relinkverticesItem)
2225
+ if (source == relinkverticesItem)
21212226 {
2122
- boolean random = CameraPane.RANDOM;
2123
- CameraPane.RANDOM = false; // parse all random nodes
2227
+ boolean random = CameraPane.SWITCH;
2228
+ CameraPane.SWITCH = false; // parse all random nodes
21242229 group.selection.RelinkToSupport();
2125
- CameraPane.RANDOM = random;
2230
+ CameraPane.SWITCH = random;
21262231
21272232 refreshContents();
21282233 } else
2129
- if (event.getSource() == resetreferencesItem)
2234
+ if (source == resetreferencesItem)
21302235 {
21312236 for (int i=0; i<group.selection.size(); i++)
21322237 {
....@@ -2135,7 +2240,7 @@
21352240
21362241 refreshContents();
21372242 } else
2138
- if (event.getSource() == setMasterItem)
2243
+ if (source == setMasterItem)
21392244 {
21402245 if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21412246 {
....@@ -2148,7 +2253,7 @@
21482253 refreshContents();
21492254 }
21502255 } else
2151
- if (event.getSource() == poseMeshItem)
2256
+ if (source == poseMeshItem)
21522257 {
21532258 if (group.selection.size() == 1)
21542259 {
....@@ -2167,19 +2272,19 @@
21672272 }
21682273
21692274 } else
2170
- if (event.getSource() == revertMeshItem)
2275
+ if (source == revertMeshItem)
21712276 {
21722277 RevertMeshes();
21732278 } else
2174
- if (event.getSource() == resetMeshItem)
2279
+ if (source == resetMeshItem)
21752280 {
21762281 ResetAll();
21772282 } else
2178
- if (event.getSource() == stepAllItem)
2283
+ if (source == stepAllItem)
21792284 {
21802285 StepAll();
21812286 } else
2182
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2287
+ if (source == clearItem) // || event.getSource() == clearButton)
21832288 {
21842289 //int indices[] = jList.getSelectedIndices();
21852290 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2187,46 +2292,46 @@
21872292
21882293 ClearSelection(false);
21892294 } else
2190
- if (event.getSource() == clearAllItem)
2295
+ if (source == clearAllItem)
21912296 {
21922297 ClearSelection(true);
21932298 } else
2194
- if (event.getSource() == grabItem)
2299
+ if (source == grabItem)
21952300 {
21962301 group(new cGroup(), true);
21972302 } else
2198
- if (event.getSource() == hideItem)
2303
+ if (source == hideItem)
21992304 {
22002305 group(new HiddenObject());
22012306 } else
2202
- if (event.getSource() == frontItem)
2307
+ if (source == frontItem)
22032308 {
22042309 front();
22052310 } else
2206
- if (event.getSource() == backItem)
2311
+ if (source == backItem)
22072312 {
22082313 back();
22092314 } else
2210
- if (event.getSource() == cameraItem)
2315
+ if (source == cameraItem)
22112316 {
22122317 makeSomething(new Camera());
22132318 } else
2214
- if (event.getSource() == compositeItem)
2319
+ if (source == compositeItem)
22152320 {
22162321 group(new Composite());
22172322 } else
2218
- if (event.getSource() == randomItem)
2323
+ if (source == randomItem)
22192324 {
22202325 RandomNode random = new RandomNode();
22212326 group(random);
22222327 if (random.size() > 0)
2223
- random.name = random.get(0).name + "Rnd";
2328
+ random.name = random.get(0).name + "Switch";
22242329 } else
2225
- if (event.getSource() == physicsItem)
2330
+ if (source == physicsItem)
22262331 {
22272332 group(new PhysicsNode());
22282333 } else
2229
- if (event.getSource() == frameselectorItem)
2334
+ if (source == frameselectorItem)
22302335 {
22312336 for (int i=0; i<group.selection.size(); i++)
22322337 {
....@@ -2238,7 +2343,7 @@
22382343 ResetModel();
22392344 refreshContents();
22402345 } else
2241
- if (event.getSource() == switchGeoItem)
2346
+ if (source == switchGeoItem)
22422347 {
22432348 for (int i=0; i<group.selection.size(); i++)
22442349 {
....@@ -2250,7 +2355,7 @@
22502355 ResetModel();
22512356 refreshContents();
22522357 } else
2253
- if (event.getSource() == switchTransfoItem)
2358
+ if (source == switchTransfoItem)
22542359 {
22552360 for (int i=0; i<group.selection.size(); i++)
22562361 {
....@@ -2262,7 +2367,7 @@
22622367 ResetModel();
22632368 refreshContents();
22642369 } else
2265
- if (event.getSource() == morphItem)
2370
+ if (source == morphItem)
22662371 {
22672372 for (int i=0; i<group.selection.size(); i++)
22682373 {
....@@ -2274,7 +2379,7 @@
22742379 ResetModel();
22752380 refreshContents();
22762381 } else
2277
- if (event.getSource() == scriptNodeItem)
2382
+ if (source == scriptNodeItem)
22782383 {
22792384 boolean atleastone = false;
22802385
....@@ -2313,31 +2418,31 @@
23132418 }
23142419 }
23152420 } else
2316
- if (event.getSource() == linkerItem)
2421
+ if (source == linkerItem)
23172422 {
23182423 group(new cLinker());
23192424 } else
2320
- if (event.getSource() == textureItem)
2425
+ if (source == textureItem)
23212426 {
23222427 group(new TextureNode());
23232428 } else
2324
- if (event.getSource() == billboardItem)
2429
+ if (source == billboardItem)
23252430 {
23262431 group(new BillboardNode());
23272432 } else
2328
- if (event.getSource() == shadowXItem)
2433
+ if (source == shadowXItem)
23292434 {
23302435 CastShadow(0);
23312436 } else
2332
- if (event.getSource() == shadowYItem)
2437
+ if (source == shadowYItem)
23332438 {
23342439 CastShadow(1);
23352440 } else
2336
- if (event.getSource() == shadowZItem)
2441
+ if (source == shadowZItem)
23372442 {
23382443 CastShadow(2);
23392444 } else
2340
- if (event.getSource() == ungroupItem)
2445
+ if (source == ungroupItem)
23412446 {
23422447 //ungroup();
23432448 for (int i=0; i<group.selection.size(); i++)
....@@ -2349,179 +2454,179 @@
23492454
23502455 refreshContents();
23512456 } else
2352
- if (event.getSource() == genUVItem)
2457
+ if (source == genUVItem)
23532458 {
23542459 GenUV();
23552460 } else
2356
- if (event.getSource() == genNormalsCADItem)
2461
+ if (source == genNormalsCADItem)
23572462 {
23582463 GenNormals(true);
23592464 } else
2360
- if (event.getSource() == genNormalsMESHItem)
2465
+ if (source == genNormalsMESHItem)
23612466 {
23622467 GenNormals(true); // TODO
23632468 } else
2364
- if (event.getSource() == genNormalsORGANItem)
2469
+ if (source == genNormalsORGANItem)
23652470 {
23662471 GenNormals(false);
23672472 } else
2368
- if (event.getSource() == genNormalsMINEItem)
2473
+ if (source == genNormalsMINEItem)
23692474 {
23702475 GenNormalsMINE();
23712476 } else
2372
- if (event.getSource() == stripifyItem)
2477
+ if (source == stripifyItem)
23732478 {
23742479 Stripify();
23752480 } else
2376
- if (event.getSource() == unstripifyItem)
2481
+ if (source == unstripifyItem)
23772482 {
23782483 Unstripify();
23792484 } else
2380
- if (event.getSource() == trimItem)
2485
+ if (source == trimItem)
23812486 {
23822487 Trim();
23832488 } else
2384
- if (event.getSource() == untrimItem)
2489
+ if (source == untrimItem)
23852490 {
23862491 Untrim();
23872492 } else
2388
- if (event.getSource() == clearColorsItem)
2493
+ if (source == clearColorsItem)
23892494 {
23902495 ClearColors();
23912496 } else
2392
- if (event.getSource() == clearMaterialsItem)
2497
+ if (source == clearMaterialsItem)
23932498 {
23942499 ClearMaterials();
23952500 } else
2396
- if (event.getSource() == liveleavesItem)
2501
+ if (source == liveleavesItem)
23972502 {
23982503 LiveLeaves(true);
23992504 } else
2400
- if (event.getSource() == unliveleavesItem)
2505
+ if (source == unliveleavesItem)
24012506 {
24022507 LiveLeaves(false);
24032508 } else
2404
- if (event.getSource() == supportleavesItem)
2509
+ if (source == supportleavesItem)
24052510 {
24062511 SupportLeaves(true);
24072512 } else
2408
- if (event.getSource() == unsupportleavesItem)
2513
+ if (source == unsupportleavesItem)
24092514 {
24102515 SupportLeaves(false);
24112516 } else
2412
- if (event.getSource() == hideleavesItem)
2517
+ if (source == hideleavesItem)
24132518 {
24142519 HideLeaves(true);
24152520 } else
2416
- if (event.getSource() == showleavesItem)
2521
+ if (source == showleavesItem)
24172522 {
24182523 HideLeaves(false);
24192524 } else
2420
- if (event.getSource() == markleavesItem)
2525
+ if (source == markleavesItem)
24212526 {
24222527 MarkLeaves(true);
24232528 } else
2424
- if (event.getSource() == unmarkleavesItem)
2529
+ if (source == unmarkleavesItem)
24252530 {
24262531 MarkLeaves(false);
24272532 } else
2428
- if (event.getSource() == flipVItem)
2533
+ if (source == flipVItem)
24292534 {
24302535 FlipV(true);
24312536 } else
2432
- if (event.getSource() == unflipVItem)
2537
+ if (source == unflipVItem)
24332538 {
24342539 FlipV(false);
24352540 } else
2436
- if (event.getSource() == lowTexturesItem)
2541
+ if (source == lowTexturesItem)
24372542 {
24382543 SetTexRes(0);
24392544 } else
2440
- if (event.getSource() == normalTexturesItem)
2545
+ if (source == normalTexturesItem)
24412546 {
24422547 SetTexRes(1);
24432548 } else
2444
- if (event.getSource() == highTexturesItem)
2549
+ if (source == highTexturesItem)
24452550 {
24462551 SetTexRes(2);
24472552 } else
2448
- if (event.getSource() == veryhighTexturesItem)
2553
+ if (source == veryhighTexturesItem)
24492554 {
24502555 SetTexRes(3);
24512556 } else
2452
- if (event.getSource() == maxTexturesItem)
2557
+ if (source == maxTexturesItem)
24532558 {
24542559 SetTexRes(4);
24552560 } else
2456
- if (event.getSource() == panoTexturesItem)
2561
+ if (source == panoTexturesItem)
24572562 {
24582563 SetTexRes(5);
24592564 } else
2460
- if (event.getSource() == reverseNormalsItem)
2565
+ if (source == reverseNormalsItem)
24612566 {
24622567 ReverseNormals();
24632568 } else
2464
- if (event.getSource() == parseverticesItem)
2569
+ if (source == parseverticesItem)
24652570 {
24662571 ParseVertices();
24672572 } else
2468
- if (event.getSource() == textureFieldItem)
2573
+ if (source == textureFieldItem)
24692574 {
24702575 TextureVertices();
24712576 } else
2472
- if (event.getSource() == alignItem)
2577
+ if (source == alignItem)
24732578 {
24742579 Align();
24752580 } else
2476
- if (event.getSource() == mirrorItem)
2581
+ if (source == mirrorItem)
24772582 {
24782583 MirrorPoses();
24792584 } else
2480
- if (event.getSource() == reduceMorphItem)
2585
+ if (source == reduceMorphItem)
24812586 {
24822587 MeshReduction(false);
24832588 } else
2484
- if (event.getSource() == reduce34MorphItem)
2589
+ if (source == reduce34MorphItem)
24852590 {
24862591 MeshReduction(true);
24872592 } else
2488
- if (event.getSource() == reverseTrianglesItem)
2593
+ if (source == reverseTrianglesItem)
24892594 {
24902595 ReverseTriangles();
24912596 } else
2492
- if (event.getSource() == reduceMeshItem)
2597
+ if (source == reduceMeshItem)
24932598 {
24942599 ReduceMesh(false);
24952600 } else
2496
- if (event.getSource() == reduce34MeshItem)
2601
+ if (source == reduce34MeshItem)
24972602 {
24982603 ReduceMesh(true);
24992604 } else
2500
- if (event.getSource() == increaseMeshItem)
2605
+ if (source == increaseMeshItem)
25012606 {
25022607 IncreaseMesh();
25032608 } else
2504
- if (event.getSource() == clipMeshItem)
2609
+ if (source == clipMeshItem)
25052610 {
25062611 ClipMesh();
25072612 } else
2508
- if (event.getSource() == smoothMeshItem)
2613
+ if (source == smoothMeshItem)
25092614 {
25102615 SmoothMesh();
25112616 } else
2512
- if (event.getSource() == transformgeometryItem)
2617
+ if (source == transformgeometryItem)
25132618 {
25142619 TransformGeometry();
25152620 } else
2516
- if (event.getSource() == resetTransformItem)
2621
+ if (source == resetTransformItem)
25172622 {
25182623 ResetTransform();
25192624 } else
2520
- if (event.getSource() == resetCentroidItem)
2625
+ if (source == resetCentroidItem)
25212626 {
25222627 ResetCentroid();
25232628 } else
2524
- if (event.getSource() == resetParentItem)
2629
+ if (source == resetParentItem)
25252630 {
25262631 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25272632 {
....@@ -2531,7 +2636,7 @@
25312636
25322637 refreshContents();
25332638 } else
2534
- if (event.getSource() == repairParentItem)
2639
+ if (source == repairParentItem)
25352640 {
25362641 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25372642 {
....@@ -2545,7 +2650,21 @@
25452650
25462651 refreshContents();
25472652 } else
2548
- if (event.getSource() == sortbysizeItem)
2653
+ if (source == repairShadowItem)
2654
+ {
2655
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2656
+ {
2657
+ Object3D obj = (Object3D)e.nextElement();
2658
+ obj.RepairShadow();
2659
+// for (int i=0; i<obj.size(); i++)
2660
+// {
2661
+// obj.get(i).parent = obj;
2662
+// }
2663
+ }
2664
+
2665
+ refreshContents();
2666
+ } else
2667
+ if (source == sortbysizeItem)
25492668 {
25502669 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25512670 {
....@@ -2557,7 +2676,7 @@
25572676 ResetModel();
25582677 refreshContents();
25592678 } else
2560
- if (event.getSource() == sortbynameItem)
2679
+ if (source == sortbynameItem)
25612680 {
25622681 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25632682 {
....@@ -2569,7 +2688,7 @@
25692688 ResetModel();
25702689 refreshContents();
25712690 } else
2572
- if (event.getSource() == attachPigmentItem)
2691
+ if (source == attachPigmentItem)
25732692 {
25742693 String texture = GetFile("Attach pigment");
25752694 Object3D obj;
....@@ -2581,7 +2700,7 @@
25812700
25822701 refreshContents();
25832702 } else
2584
- if (event.getSource() == detachPigmentItem)
2703
+ if (source == detachPigmentItem)
25852704 {
25862705 Object3D obj;
25872706 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2592,7 +2711,7 @@
25922711
25932712 refreshContents();
25942713 } else
2595
- if (event.getSource() == attachBumpItem)
2714
+ if (source == attachBumpItem)
25962715 {
25972716 String texture = GetFile("Attach bump");
25982717 Object3D obj;
....@@ -2604,7 +2723,7 @@
26042723
26052724 refreshContents();
26062725 } else
2607
- if (event.getSource() == detachBumpItem)
2726
+ if (source == detachBumpItem)
26082727 {
26092728 Object3D obj;
26102729 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2615,7 +2734,7 @@
26152734
26162735 refreshContents();
26172736 } else
2618
- if (event.getSource() == pigmentBumpItem)
2737
+ if (source == pigmentBumpItem)
26192738 {
26202739 Object3D obj;
26212740 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2626,158 +2745,195 @@
26262745
26272746 refreshContents();
26282747 } else
2629
- if (event.getSource() == flashSelectionButton)
2748
+ if (source == flashSelectionButton)
26302749 {
26312750 CameraPane.flash = true;
26322751 refreshContents();
26332752 } else
2634
- if (event.getSource() == oneButton)
2753
+ if (source == oneButton)
26352754 {
26362755 } else
2637
- if (event.getSource() == twoButton)
2756
+ if (source == twoButton)
26382757 {
26392758 radio.layout = twoButton;
26402759 // bug
26412760 //gridPanel.setDividerLocation(1.0);
26422761 //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();
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();
26672791 } else
2668
- if (event.getSource() == threeButton)
2792
+ if (source == threeButton)
26692793 {
26702794 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();
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();
26952827 } else
2696
- if (event.getSource() == fourButton)
2828
+ if (source == fourButton)
26972829 {
26982830 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();
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();
27232862 } else
2724
- if (event.getSource() == sixButton)
2863
+ if (source == sixButton)
27252864 {
27262865 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();
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();
27512898 } else
2752
- if (event.getSource() == sevenButton)
2899
+ if (source == sevenButton)
27532900 {
27542901 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();
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();
27792935 } else
2780
- if (event.getSource() == rootButton)
2936
+ if (source == rootButton)
27812937 {
27822938 Object3D obj;
27832939 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2789,7 +2945,7 @@
27892945
27902946 refreshContents(true);
27912947 } else
2792
- if (event.getSource() == closeButton)
2948
+ if (source == closeButton)
27932949 {
27942950 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27952951 cRadio ab;
....@@ -2810,11 +2966,11 @@
28102966 }
28112967 refreshContents(true);
28122968 } else
2813
- if (event.getSource() == editItem || event.getSource() == editButton)
2969
+ if (source == editItem || source == editButton)
28142970 {
28152971 EditSelection(false);
28162972 } else
2817
- if (event.getSource() == uneditButton)
2973
+ if (source == uneditButton)
28182974 {
28192975 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28202976 {
....@@ -2826,12 +2982,12 @@
28262982
28272983 child.editWindow = null; // ???????????
28282984 }
2829
- objEditor.ctrlPanel.revalidate();
2985
+ objEditor.ctrlPanel.FlushUI();
28302986 //objEditor.jTree.clearSelection();
28312987 //objEditor.ResetSliders();
28322988 refreshContents(true);
28332989 } else
2834
- if (event.getSource() == clearPanelButton)
2990
+ if (source == clearPanelButton)
28352991 {
28362992 assert(copy == group);
28372993 //copy.ClearUI();
....@@ -2842,7 +2998,7 @@
28422998 listUI.clear();
28432999 refreshContents(true);
28443000 } else
2845
- if (event.getSource() == allParamsButton)
3001
+ if (source == allParamsButton)
28463002 {
28473003 assert(copy == group);
28483004
....@@ -2863,19 +3019,19 @@
28633019
28643020 refreshContents(true);
28653021 } else
2866
- if (event.getSource() == unselectButton)
3022
+ if (source == unselectButton)
28673023 {
28683024 objEditor.jTree.clearSelection();
28693025 // ?? oct 2012 GrafreeD.clipboard.clear();
28703026 objEditor.ResetSliders();
28713027 refreshContents(true);
28723028 } else
2873
- if(event.getSource() instanceof cRadio)
3029
+ if(source instanceof cRadio)
28743030 {
28753031 group.parent = keepparent;
28763032 group.attributes = 0;
28773033 //group.editWindow = null;
2878
- /*cRadio*/ radio = (cRadio)event.getSource();
3034
+ /*cRadio*/ radio = (cRadio)source;
28793035 Object3D obj = radio.GetObject();
28803036 System.out.println("Edit " + obj);
28813037 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2895,7 +3051,7 @@
28953051 }
28963052
28973053 copy = group;
2898
- //CameraPane.theRenderer.object = group;
3054
+ //Globals.theRenderer.object = group;
28993055 if(!useclient)
29003056 {
29013057 cameraView.renderCamera = radio.camera;
....@@ -2904,7 +3060,8 @@
29043060 cameraView.cameras[cameraView.cameracount] = radio.camera;
29053061 cameraView.targetLookAt.set(radio.camera.lookAt);
29063062 cameraView.object = group;
2907
- cameraView.lighttouched = true;
3063
+ //cameraView.lighttouched = true;
3064
+ Globals.lighttouched = true;
29083065 topView.object = group;
29093066 frontView.object = group;
29103067 sideView.object = group;
....@@ -2940,7 +3097,7 @@
29403097 if (useclient)
29413098 {
29423099 cameraView.object = client;
2943
- cameraView.lighttouched = true;
3100
+ Globals.lighttouched = true;
29443101 //topView.object = client;
29453102 //frontView.object = client;
29463103 //sideView.object = client;
....@@ -2948,7 +3105,7 @@
29483105 else
29493106 {
29503107 cameraView.object = group;
2951
- cameraView.lighttouched = true;
3108
+ Globals.lighttouched = true;
29523109 //topView.object = group;
29533110 //frontView.object = group;
29543111 //sideView.object = group;
....@@ -3456,7 +3613,7 @@
34563613 String pigment = Object3D.GetPigment(tex);
34573614 //String bump = Object3D.GetBump(tex);
34583615
3459
- 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);
34603617
34613618 double s = v.s;
34623619
....@@ -3544,11 +3701,11 @@
35443701
35453702 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
35463703
3547
- boolean random = CameraPane.RANDOM;
3548
- CameraPane.RANDOM = false; // parse all random nodes
3704
+ boolean random = CameraPane.SWITCH;
3705
+ CameraPane.SWITCH = false; // parse all random nodes
35493706 lowres.linkVerticesThis(null);
35503707 lowres.linkVerticesThis(sn);
3551
- CameraPane.RANDOM = random;
3708
+ CameraPane.SWITCH = random;
35523709
35533710 System.err.flush();
35543711
....@@ -3757,7 +3914,7 @@
37573914 group.selection.RelinkToSupport(); // july 2014
37583915 System.out.println("DONE.");
37593916 refreshContents();
3760
- 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));
37613918 }
37623919
37633920 void ReduceMesh(boolean reduction34)
....@@ -4033,25 +4190,25 @@
40334190 System.err.println("info : " + child.GetPath());
40344191 }
40354192 }
4036
- else
4037
- {
4038
- objEditor.SetMaterial(group); // .GetMaterial());
4039
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4040
- System.err.println("info : " + group.GetPath());
4041
- }
4193
+// else
4194
+// {
4195
+// objEditor.SetMaterial(group); // .GetMaterial());
4196
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4197
+// System.err.println("info : " + group.GetPath());
4198
+// }
40424199
40434200 objEditor.SetText(); // jan 2014
40444201
4045
- 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))
40464203 CameraPane.flash = true;
40474204
40484205 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
40494206 // a camera
40504207 {
40514208 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;
4209
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4210
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4211
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
40554212 }
40564213
40574214 refreshContents();
....@@ -4306,7 +4463,7 @@
43064463 refreshContents();
43074464 }
43084465
4309
- void pasteInto(boolean copyit)
4466
+ void pasteInto(boolean copyit, boolean clone)
43104467 {
43114468 // if (GrafreeD.clipboard == null)
43124469 // return;
....@@ -4335,7 +4492,14 @@
43354492 if (copyit)
43364493 {
43374494 // paste(false);
4338
- CloneClipboard(false); // sept 2014
4495
+ if (clone)
4496
+ {
4497
+ CloneClipboard(false); // sept 2014
4498
+ }
4499
+ else
4500
+ {
4501
+ paste(false);
4502
+ }
43394503 }
43404504 else
43414505 {
....@@ -4879,10 +5043,12 @@
48795043 cButton flashSelectionButton;
48805044 cButton editButton;
48815045 cButton uneditButton;
5046
+ JCheckBox allParamsButton;
48825047 cButton clearpanelButton;
4883
- cButton allParamsButton;
48845048 cButton unselectButton;
48855049
5050
+ cButton oneStepButton;
5051
+
48865052 cButton screenfitButton;
48875053 cButton screenfitpointButton;
48885054 cButton snapobjectButton;
....@@ -4937,6 +5103,7 @@
49375103 private MenuItem mergeGeometriesItem;
49385104 private MenuItem copyItem;
49395105 private MenuItem pasteItem;
5106
+ private MenuItem pasteIntoItem;
49405107 private MenuItem pasteLinkItem;
49415108 private MenuItem pasteCloneItem;
49425109 private MenuItem pasteExpandItem;
....@@ -5009,6 +5176,7 @@
50095176
50105177 private MenuItem resetParentItem;
50115178 private MenuItem repairParentItem;
5179
+ private MenuItem repairShadowItem;
50125180 private MenuItem sortbysizeItem;
50135181 private MenuItem sortbynameItem;
50145182
....@@ -5033,7 +5201,7 @@
50335201 private MenuItem blobItem;
50345202 private MenuItem latheItem;
50355203 private MenuItem bezierItem;
5036
- private MenuItem checkerItem;
5204
+ private MenuItem overlayItem;
50375205 private MenuItem meshItem;
50385206 // private MenuItem meshGroupItem;
50395207 private MenuItem springItem;