Normand Briere
2019-05-05 1e1c7fcdb3d0f8be350c5f6c32b6afa6705168ea
GroupEditor.java
....@@ -12,6 +12,7 @@
1212 import com.jme.math.Vector3f;
1313 import com.jme.renderer.ColorRGBA;
1414
15
+import grafeme.ui.*;
1516 //import buoy.widget.BFileChooser;
1617
1718 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
....@@ -149,6 +150,8 @@
149150
150151 void SetupMenu2(ObjEditor oe)
151152 {
153
+ if (Globals.ADVANCED)
154
+ {
152155 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
153156 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
154157 //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
....@@ -160,17 +163,21 @@
160163 lookAtItem.addActionListener(this);
161164 //lookFromItem.addActinoListener(this);
162165 //switchItem.addActionListener(this);
166
+ }
167
+
163168 Menu menu;
164169 oe.menuBar.add(menu = new Menu("Edit"));
165170 //editItem = menu.add(new MenuItem("Edit"));
166171 //editItem.addActionListener(this);
167172 duplicateItem = menu.add(new MenuItem("Duplicate"));
168173 duplicateItem.addActionListener(this);
169
- menu.add("-");
170174 cloneItem = menu.add(new MenuItem("Clone"));
171175 cloneItem.addActionListener(this);
176
+ if (Globals.ADVANCED)
177
+ {
172178 cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
173179 cloneSupportItem.addActionListener(this);
180
+ }
174181 menu.add("-");
175182 cutItem = menu.add(new MenuItem("Cut"));
176183 cutItem.addActionListener(this);
....@@ -178,18 +185,31 @@
178185 copyItem.addActionListener(this);
179186 pasteItem = menu.add(new MenuItem("Paste"));
180187 pasteItem.addActionListener(this);
188
+ menu.add("-");
189
+
190
+ menu.add("-");
191
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
192
+ pasteIntoItem.addActionListener(this);
181193 pasteLinkItem = menu.add(new MenuItem("Paste link"));
182194 pasteLinkItem.addActionListener(this);
183195 pasteCloneItem = menu.add(new MenuItem("Paste clone"));
184196 pasteCloneItem.addActionListener(this);
185197 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
186198 // pasteExpandItem.addActionListener(this);
199
+ menu.add("-");
187200 clearItem = menu.add(new MenuItem("Clear"));
188201 clearItem.addActionListener(this);
202
+
203
+ if (Globals.ADVANCED)
204
+ {
205
+ // Deletes the cameras...
189206 clearAllItem = menu.add(new MenuItem("Clear All"));
190207 clearAllItem.addActionListener(this);
208
+ }
191209
192210 oe.menuBar.add(menu = new Menu("Setting"));
211
+ if (Globals.ADVANCED)
212
+ {
193213 resetMeshItem = menu.add(new MenuItem("Reset All"));
194214 resetMeshItem.addActionListener(this);
195215 stepAllItem = menu.add(new MenuItem("Step All"));
....@@ -199,6 +219,7 @@
199219 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
200220 resetreferencesItem.addActionListener(this);
201221 menu.add("-");
222
+ }
202223 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
203224 overwriteGeoItem.addActionListener(this);
204225 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -210,19 +231,26 @@
210231 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
211232 overwriteUVItem.addActionListener(this);
212233 menu.add("-");
234
+ if (Globals.ADVANCED)
235
+ {
213236 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
214237 generateMeshItem.addActionListener(this);
215238 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
216239 poseMeshItem.addActionListener(this);
217240 menu.add("-");
241
+ }
218242 resetsupportItem = menu.add(new MenuItem("Reset support"));
219243 resetsupportItem.addActionListener(this);
220244 linkverticesItem = menu.add(new MenuItem("Link to Support"));
221245 linkverticesItem.addActionListener(this);
222246 relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
223247 relinkverticesItem.addActionListener(this);
248
+
249
+ if (Globals.ADVANCED)
250
+ {
224251 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
225252 setMasterItem.addActionListener(this);
253
+ }
226254
227255 oe.menuBar.add(menu = new Menu("Group"));
228256 grabItem = menu.add(new MenuItem("Grab"));
....@@ -233,27 +261,32 @@
233261 frontItem.addActionListener(this);
234262 compositeItem = menu.add(new MenuItem("Composite"));
235263 compositeItem.addActionListener(this);
236
- hideItem = menu.add(new MenuItem("Hide"));
264
+ hideItem = menu.add(new MenuItem("Hidden Group"));
237265 hideItem.addActionListener(this);
238266 ungroupItem = menu.add(new MenuItem("Ungroup"));
239267 ungroupItem.addActionListener(this);
240268 menu.add("-");
241
- randomItem = menu.add(new MenuItem("Random"));
269
+ randomItem = menu.add(new MenuItem("Switch node"));
242270 randomItem.addActionListener(this);
243
- physicsItem = menu.add(new MenuItem("Physics"));
244
- physicsItem.addActionListener(this);
245
- frameselectorItem = menu.add(new MenuItem("Frame Selector"));
246
- frameselectorItem.addActionListener(this);
247271 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
248272 switchGeoItem.addActionListener(this);
249273 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
250274 switchTransfoItem.addActionListener(this);
251
- morphItem = menu.add(new MenuItem("Morph"));
275
+ morphItem = menu.add(new MenuItem("Morph Group"));
252276 morphItem.addActionListener(this);
277
+
278
+ if (Globals.ADVANCED)
279
+ {
280
+ menu.add("-");
281
+ physicsItem = menu.add(new MenuItem("Physics"));
282
+ physicsItem.addActionListener(this);
283
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
284
+ frameselectorItem.addActionListener(this);
253285 scriptNodeItem = menu.add(new MenuItem("Script Node"));
254286 scriptNodeItem.addActionListener(this);
255287 cameraItem = menu.add(new MenuItem("Camera"));
256288 cameraItem.addActionListener(this);
289
+ }
257290
258291 oe.menuBar.add(menu = new Menu("Object"));
259292 textureItem = menu.add(new MenuItem("Texture"));
....@@ -268,14 +301,18 @@
268301 shadowYItem.addActionListener(this);
269302 shadowZItem = menu.add(new MenuItem("Shadow Z"));
270303 shadowZItem.addActionListener(this);
304
+ if (Globals.ADVANCED)
305
+ {
306
+ menu.add("-");
271307 linkerItem = menu.add(new MenuItem("Linker"));
272308 linkerItem.addActionListener(this);
273
- templateItem = menu.add(new MenuItem("Template"));
274
- templateItem.addActionListener(this);
275309 attributeItem = menu.add(new MenuItem("Attribute"));
276310 attributeItem.addActionListener(this);
311
+ templateItem = menu.add(new MenuItem("Template"));
312
+ templateItem.addActionListener(this);
277313 pointflowItem = menu.add(new MenuItem("Point Flow"));
278314 pointflowItem.addActionListener(this);
315
+ }
279316 menu.add("-");
280317 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
281318 resetTransformItem.addActionListener(this);
....@@ -293,8 +330,11 @@
293330 genNormalsCADItem.addActionListener(this);
294331 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
295332 genNormalsMESHItem.addActionListener(this);
333
+ if (Globals.ADVANCED)
334
+ {
296335 genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
297336 genNormalsMINEItem.addActionListener(this);
337
+ }
298338 stripifyItem = menu.add(new MenuItem("Stripify"));
299339 stripifyItem.addActionListener(this);
300340 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -316,10 +356,14 @@
316356 reduce34MeshItem.addActionListener(this);
317357 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
318358 increaseMeshItem.addActionListener(this);
319
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
320
- smoothMeshItem.addActionListener(this);
321359 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
322360 clipMeshItem.addActionListener(this);
361
+
362
+ if (Globals.ADVANCED)
363
+ {
364
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
365
+ smoothMeshItem.addActionListener(this);
366
+ }
323367
324368 oe.menuBar.add(menu = new Menu("Attributes"));
325369 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
....@@ -329,10 +373,13 @@
329373 liveleavesItem.addActionListener(this);
330374 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
331375 unliveleavesItem.addActionListener(this);
376
+ if (Globals.ADVANCED)
377
+ {
332378 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
333379 supportleavesItem.addActionListener(this);
334380 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
335381 unsupportleavesItem.addActionListener(this);
382
+ }
336383 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
337384 hideleavesItem.addActionListener(this);
338385 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -375,6 +422,8 @@
375422 sortbysizeItem.addActionListener(this);
376423 sortbynameItem = menu.add(new MenuItem("Sort by name"));
377424 sortbynameItem.addActionListener(this);
425
+ if (Globals.ADVANCED)
426
+ {
378427 menu.add("-");
379428 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
380429 extractGeometriesItem.addActionListener(this);
....@@ -384,20 +433,23 @@
384433 shareGeometriesItem.addActionListener(this);
385434 mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
386435 mergeGeometriesItem.addActionListener(this);
436
+ }
387437
388438 oe.menuBar.add(menu = new Menu("Insert"));
389439 buildCreateMenu(menu);
390440
391
-
392441 oe.menuBar.add(menu = new Menu("Include"));
393
- importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
394
- importGFDItem.addActionListener(this);
395
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
396
- importVRMLX3DItem.addActionListener(this);
397
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
442
+ importOBJItem = menu.add(new MenuItem("OBJ file..."));
398443 importOBJItem.addActionListener(this);
399
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
444
+ menu.add("-");
445
+ import3DSItem = menu.add(new MenuItem("3DS file..."));
400446 import3DSItem.addActionListener(this);
447
+ menu.add("-");
448
+ importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file..."));
449
+ importVRMLX3DItem.addActionListener(this);
450
+ menu.add("-");
451
+ importGFDItem = menu.add(new MenuItem("GrafreeD file..."));
452
+ importGFDItem.addActionListener(this);
401453
402454 oe.menuBar.add(menu = new Menu("Tools"));
403455 buildToolsMenu(menu);
....@@ -433,150 +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);
523
- oe.aConstraints.gridx += 1;
524
- oe.aConstraints.weighty = 0;
525
- oe.aConstraints.gridwidth = 1;
526523
527
- //
528
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
524
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
525
+
526
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
527
+ twoButton.setToolTipText("Show center view only");
529528 twoButton.addActionListener(this);
530
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
529
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
531530 fourButton.addActionListener(this);
532
- 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");
533534 sixButton.addActionListener(this);
534
- 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");
535537 threeButton.addActionListener(this);
536
- 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");
537540 sevenButton.addActionListener(this);
538541 //
539542
540
- 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");
541545 rootButton.addActionListener(this);
542
- oe.aConstraints.gridx += 1;
543
- 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");
544549 closeButton.addActionListener(this);
545550 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
546551 //clearButton.addActionListener(this);
547
- oe.aConstraints.gridx += 1;
548552
549
- oe.aConstraints.gridx = 1; //
550
- 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");
551557 editButton.addActionListener(this);
552
- oe.aConstraints.gridx += 1;
553
- oe.aConstraints.weighty = 0;
554
- oe.aConstraints.gridwidth = 1;
555558
556
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
559
+ commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
560
+ uneditButton.setToolTipText("Unedit selection");
557561 uneditButton.addActionListener(this);
558562
559
- oe.aConstraints.gridx += 1;
560
- oe.aConstraints.weighty = 0;
561
- oe.aConstraints.gridwidth = 1;
562
-
563
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
564
- clearPanelButton.addActionListener(this);
565
-
566
- oe.aConstraints.gridx += 1;
567
- oe.aConstraints.weighty = 0;
568
- oe.aConstraints.gridwidth = 1;
569
-
570
- 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");
571565 allParamsButton.addActionListener(this);
572566
573
- oe.aConstraints.gridx += 1;
574
- oe.aConstraints.weighty = 0;
575
- oe.aConstraints.gridwidth = 1;
576
-
577
- 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");
578573 unselectButton.addActionListener(this);
579574
575
+ commandsPanel.preferredHeight = 1;
576
+
577
+ oe.treePanel.add(commandsPanel);
578
+ oe.treePanel.Return();
579
+
580580 // oe.aConstraints.gridx += 1;
581581 // oe.aConstraints.weighty = 0;
582582 // oe.aConstraints.gridwidth = 1;
....@@ -588,40 +588,37 @@
588588 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
589589 // gcButton.addActionListener(this);
590590
591
- oe.aConstraints.gridx = 0;
592
- oe.aConstraints.gridy += 1;
593
-
594
- //ctrlPanel.add(objList = new List(5, true));
595
- oe.aConstraints.gridwidth = 100;
596
- // oe.aConstraints.gridheight = 100;
597
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
598
- oe.aConstraints.gridheight = 1;
599
- oe.aConstraints.weighty = 0.5;
600
- oe.aConstraints.gridx = 0;
601
- JScrollPane jSP;
591
+ cGridBag jSPPanel = new cGridBag();
592
+
593
+ JScrollPane jSP;
602594 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
603
- 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);
604596 ResetModel();
605
- oe.aConstraints.weighty = 0.5;
606
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
607
- oe.aConstraints.gridy += 1;
608
- oe.aConstraints.gridwidth = 1;
597
+
598
+ oe.treePanel.add(jSPPanel);
599
+ oe.treePanel.Return();
609600
610
- oe.aConstraints.weighty = 0;
611
- oe.aConstraints.gridwidth = 2;
612
-
613
- 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");
614605 colorCB.addItemListener(this);
615
- oe.aConstraints.gridx += 2;
616
- 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");
617609 materialCB.addItemListener(this);
618
- oe.aConstraints.gridx += 2;
619
- 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");
620613 textureCB.addItemListener(this);
621614
622
- oe.aConstraints.gridx = 0;
623
- oe.aConstraints.gridy += 1;
615
+ copyOptionsPanel.preferredHeight = 1;
616
+ oe.treePanel.add(copyOptionsPanel);
617
+ oe.treePanel.Return();
624618
619
+// mainPanel.setDividerLocation(0.5); //1.0);
620
+// mainPanel.setResizeWeight(0.5);
621
+
625622 //jList.addListSelectionListener(this);
626623 oe.jTree.addTreeSelectionListener(this);
627624 //jTree.setRootVisible(false);
....@@ -643,17 +640,89 @@
643640 radio.layout = sevenButton;
644641 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
645642 }
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
+ }
646715
647716 void EditObject(Object3D obj)
648717 {
649
- cRadio dummyButton = new cRadio(obj.name);
650
- dummyButton.SetObject(obj);
651
- dummyButton.layout = sevenButton;
652
- dummyButton.SetCamera(cameraView.renderCamera, false);
653
- dummyButton.addActionListener(this);
654
- radioPanel.add(dummyButton);
655
- buttonGroup.add(dummyButton);
656
- dummyButton.doClick();
718
+ cRadio radioButton = new cRadio(obj.name);
719
+ radioButton.SetObject(obj);
720
+ radioButton.layout = sevenButton;
721
+ radioButton.SetCamera(cameraView.renderCamera, false);
722
+ radioButton.addActionListener(this);
723
+ radioPanel.add(radioButton);
724
+ buttonGroup.add(radioButton);
725
+ radioButton.doClick();
657726 }
658727 void SetupViews(ObjEditor oe)
659728 {
....@@ -673,6 +742,7 @@
673742 JCheckBox fastCB;
674743 JCheckBox slowCB;
675744 JCheckBox boxCB;
745
+ JCheckBox zoomBoxCB;
676746 JCheckBox trackCB;
677747 JCheckBox smoothfocusCB;
678748 // JCheckBox speakerMocapCB;
....@@ -715,8 +785,7 @@
715785 dropAttributes |= Object3D.TEXTURE;
716786 else
717787 dropAttributes &= ~Object3D.TEXTURE;
718
- }
719
- else if(e.getSource() == liveCB)
788
+ } else if(e.getSource() == liveCB)
720789 {
721790 cameraView.ToggleLive();
722791 }
....@@ -753,6 +822,10 @@
753822 Recompile();
754823 cameraView.repaint();
755824 // refreshContents();
825
+ }
826
+ else if(e.getSource() == zoomBoxCB)
827
+ {
828
+ cameraView.ToggleZoomBoxMode();
756829 }
757830 else if(e.getSource() == smoothfocusCB)
758831 {
....@@ -921,11 +994,11 @@
921994 {
922995 loadClipboard(true);
923996 objEditor.jTree.setSelectionPath(destinationPath);
924
- pasteInto(false);
997
+ pasteInto(false, false);
925998 } else {
926999 loadClipboard(false);
9271000 objEditor.jTree.setSelectionPath(destinationPath);
928
- pasteInto(false); // true); // ???
1001
+ pasteInto(false, false); // true); // ???
9291002 }
9301003 }
9311004 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1047,27 +1120,33 @@
10471120 kleinItem.addActionListener(this);
10481121 particleItem = menu.add(new MenuItem("Particle system"));
10491122 particleItem.addActionListener(this);
1123
+ if (Globals.ADVANCED)
1124
+ {
10501125 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10511126 ragdollItem.addActionListener(this);
10521127 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10531128 ragdoll2Item.addActionListener(this);
1129
+ }
10541130 menu.add("-");
1055
- meshItem = menu.add(new MenuItem("Mesh"));
1131
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10561132 meshItem.addActionListener(this);
10571133 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10581134 // meshGroupItem.addActionListener(this);
1135
+ if (Globals.ADVANCED)
1136
+ {
10591137 springItem = menu.add(new MenuItem("Spring"));
10601138 springItem.addActionListener(this);
10611139 flagItem = menu.add(new MenuItem("Flag"));
10621140 flagItem.addActionListener(this);
1063
- bezierItem = menu.add(new MenuItem("Patch"));
1064
- bezierItem.addActionListener(this);
1065
- checkerItem = menu.add(new MenuItem("Checker"));
1066
- checkerItem.addActionListener(this);
10671141 blobItem = menu.add(new MenuItem("Blob"));
10681142 blobItem.addActionListener(this);
10691143 latheItem = menu.add(new MenuItem("Lathe"));
10701144 latheItem.addActionListener(this);
1145
+ }
1146
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1147
+ bezierItem.addActionListener(this);
1148
+ overlayItem = menu.add(new MenuItem("Overlay"));
1149
+ overlayItem.addActionListener(this);
10711150 lightItem = menu.add(new MenuItem("Light"));
10721151 lightItem.addActionListener(this);
10731152 menu.add("-");
....@@ -1077,34 +1156,39 @@
10771156 loopItem.addActionListener(this);
10781157 doubleItem = menu.add(new MenuItem("Fork"));
10791158 doubleItem.addActionListener(this);
1159
+ if (Globals.ADVANCED)
1160
+ {
10801161 tripleItem = menu.add(new MenuItem("Trident"));
10811162 tripleItem.addActionListener(this);
1163
+ }
10821164 }
10831165
10841166 void buildToolsMenu(Menu menu)
10851167 {
10861168 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10871169 animationItem.addItemListener(this);
1088
- animationItem.setState(CameraPane.ANIMATION);
1170
+ animationItem.setState(Globals.ANIMATION);
10891171
10901172 menu.add("-");
10911173 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
10921174 parseverticesItem.addActionListener(this);
10931175 textureFieldItem = menu.add(new MenuItem("Texture Field"));
10941176 textureFieldItem.addActionListener(this);
1095
- alignItem = menu.add(new MenuItem("Align"));
1177
+ alignItem = menu.add(new MenuItem("Align Objects"));
10961178 alignItem.addActionListener(this);
1097
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1098
- mirrorItem.addActionListener(this);
10991179 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11001180 reduceMorphItem.addActionListener(this);
11011181 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11021182 reduce34MorphItem.addActionListener(this);
1103
-
1183
+ menu.add("-");
11041184 menu.add(computeAOItem = new MenuItem("Compute AO"));
11051185 computeAOItem.addActionListener(this);
1106
- menu.add("-");
11071186
1187
+ if (Globals.ADVANCED)
1188
+ {
1189
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1190
+ mirrorItem.addActionListener(this);
1191
+ menu.add("-");
11081192 menu.add(memoryItem = new MenuItem("Memory Usage"));
11091193 memoryItem.addActionListener(this);
11101194 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1118,6 +1202,8 @@
11181202 resetParentItem.addActionListener(this);
11191203 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11201204 repairParentItem.addActionListener(this);
1205
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1206
+ repairShadowItem.addActionListener(this);
11211207 menu.add(invariantsItem = new MenuItem("Invariants"));
11221208 invariantsItem.addActionListener(this);
11231209 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1125,6 +1211,7 @@
11251211 menu.add("-");
11261212 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11271213 editScriptItem.addActionListener(this);
1214
+ }
11281215 }
11291216
11301217 void ScreenFit()
....@@ -1478,6 +1565,7 @@
14781565 //
14791566 public void actionPerformed(ActionEvent event) // , Object arg)
14801567 {
1568
+ Object source = event.getSource();
14811569 /*
14821570 if (event.getSource() == nameField)
14831571 {
....@@ -1489,11 +1577,11 @@
14891577 }
14901578 else
14911579 */
1492
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1580
+ if (source == lookAtItem || source == lookFromItem)
14931581 {
14941582 ScreenFit();
14951583 } else
1496
- if (event.getSource() == switchItem)
1584
+ if (source == switchItem)
14971585 {
14981586 cVector v1 = new cVector();
14991587 cVector v2 = new cVector();
....@@ -1502,11 +1590,11 @@
15021590 objEditor.cameraView.renderCamera.setAim(v2, v1);
15031591 objEditor.cameraView.repaint();
15041592 } else
1505
- if (event.getSource() == rectoidItem)
1593
+ if (source == rectoidItem)
15061594 {
15071595 makeSomething(new Box());
15081596 } else
1509
- if (event.getSource() == particleItem)
1597
+ if (source == particleItem)
15101598 {
15111599 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15121600 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1527,9 +1615,9 @@
15271615 applyExample(particleGeom, "SMOKE");
15281616 makeSomething(particleGeom);
15291617 } else
1530
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1618
+ if (source == ragdollItem || source == ragdoll2Item)
15311619 {
1532
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1620
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15331621
15341622 ragdoll.toParent = LA.newMatrix();
15351623 ragdoll.fromParent = LA.newMatrix();
....@@ -1547,7 +1635,7 @@
15471635 } else
15481636 /*
15491637 */
1550
- if (event.getSource() == heightFieldItem)
1638
+ if (source == heightFieldItem)
15511639 {
15521640 Object3D obj = new Object3D();
15531641
....@@ -1585,31 +1673,31 @@
15851673
15861674 makeSomething(obj);
15871675 } else
1588
- if (event.getSource() == gridItem)
1676
+ if (source == gridItem)
15891677 {
15901678 makeSomething(new Grid());
15911679 } else
1592
- if (event.getSource() == ellipsoidItem)
1680
+ if (source == ellipsoidItem)
15931681 {
15941682 makeSomething(new Sphere());
15951683 } else
1596
- if (event.getSource() == coneItem)
1684
+ if (source == coneItem)
15971685 {
15981686 makeSomething(new Cone());
15991687 } else
1600
- if (event.getSource() == torusItem)
1688
+ if (source == torusItem)
16011689 {
16021690 makeSomething(new Torus());
16031691 } else
1604
- if (event.getSource() == superItem)
1692
+ if (source == superItem)
16051693 {
16061694 makeSomething(new Superellipsoid());
16071695 } else
1608
- if (event.getSource() == kleinItem)
1696
+ if (source == kleinItem)
16091697 {
16101698 makeSomething(new Klein());
16111699 } else
1612
- if (event.getSource() == blobItem)
1700
+ if (source == blobItem)
16131701 {
16141702 Blob blob = new Blob();
16151703 BlobComponent comp = new BlobComponent();
....@@ -1617,15 +1705,15 @@
16171705 //blob.retile();
16181706 makeSomething(blob);
16191707 } else
1620
- if (event.getSource() == latheItem)
1708
+ if (source == latheItem)
16211709 {
16221710 makeSomething(new Lathe());
16231711 } else
1624
- if (event.getSource() == bezierItem)
1712
+ if (source == bezierItem)
16251713 {
16261714 makeSomething(new BezierSurface());
16271715 } else
1628
- if (event.getSource() == checkerItem)
1716
+ if (source == overlayItem)
16291717 {
16301718 /*
16311719 Object3D obj = new BezierSurface(5,8);
....@@ -1640,7 +1728,7 @@
16401728 */
16411729 makeSomething(new Checker());
16421730 } else
1643
- if (event.getSource() == meshItem)
1731
+ if (source == meshItem)
16441732 {
16451733 Object3D itemtomake = new Object3D();
16461734 Object3D child;
....@@ -1661,35 +1749,35 @@
16611749 makeSomething(child);
16621750 }
16631751 } else
1664
- if (event.getSource() == springItem)
1752
+ if (source == springItem)
16651753 {
16661754 cSpring s = new cSpring();
16671755 s.setup();
16681756 makeSomething(s);
16691757 } else
1670
- if (event.getSource() == flagItem)
1758
+ if (source == flagItem)
16711759 {
16721760 cSpring s = new cFlag();
16731761 s.setup();
16741762 makeSomething(s);
16751763 } else
1676
- if (event.getSource() == lightItem)
1764
+ if (source == lightItem)
16771765 {
16781766 makeSomething(new Light());
16791767 } else
1680
- if (event.getSource() == csgItem)
1768
+ if (source == csgItem)
16811769 {
16821770 group(new CSG());
16831771 } else
1684
- if (event.getSource() == templateItem)
1772
+ if (source == templateItem)
16851773 {
16861774 group(new cTemplate());
16871775 } else
1688
- if (event.getSource() == attributeItem)
1776
+ if (source == attributeItem)
16891777 {
16901778 makeSomething(new Attribute());
16911779 } else
1692
- if (event.getSource() == pointflowItem)
1780
+ if (source == pointflowItem)
16931781 {
16941782 makeSomething(new PointFlow());
16951783 } else
....@@ -1701,7 +1789,7 @@
17011789 } else
17021790 */
17031791
1704
- if (event.getSource() == superLoopItem)
1792
+ if (source == superLoopItem)
17051793 {
17061794 Composite g = new cGroup();
17071795 for (int i=0; i<15; i++)
....@@ -1723,7 +1811,7 @@
17231811
17241812 group(g);
17251813 } else
1726
- if (event.getSource() == loopItem)
1814
+ if (source == loopItem)
17271815 {
17281816 Composite csg = new GroupLeaf();
17291817 csg.count = 5;
....@@ -1732,7 +1820,7 @@
17321820 csg.addChild(child);
17331821 child.addChild(csg);
17341822 } else
1735
- if (event.getSource() == doubleItem)
1823
+ if (source == doubleItem)
17361824 {
17371825 Composite csg = new GroupLeaf();
17381826 csg.count = 5;
....@@ -1744,7 +1832,7 @@
17441832 csg.addChild(child);
17451833 child.addChild(csg);
17461834 } else
1747
- if (event.getSource() == tripleItem)
1835
+ if (source == tripleItem)
17481836 {
17491837 Composite csg = new GroupLeaf();
17501838 csg.count = 4;
....@@ -1760,70 +1848,83 @@
17601848 child.addChild(csg);
17611849 } else
17621850
1763
- if (event.getSource() == importGFDItem)
1851
+ if (source == importGFDItem)
17641852 {
17651853 ImportGFD();
17661854 } else
1767
- if (event.getSource() == importVRMLX3DItem)
1855
+ if (source == importVRMLX3DItem)
17681856 {
17691857 ImportVRMLX3D();
17701858 } else
1771
- if (event.getSource() == import3DSItem)
1859
+ if (source == import3DSItem)
17721860 {
17731861 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17741862 } else
1775
- if (event.getSource() == importOBJItem)
1863
+ if (source == importOBJItem)
17761864 {
1777
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1865
+ //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1866
+ FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD);
1867
+ browser.setVisible(true);
1868
+ String filename = browser.getFile();
1869
+ if (filename != null && filename.length() > 0)
1870
+ {
1871
+ String fullname = browser.getDirectory() + filename;
1872
+ makeSomething(ReadOBJ(fullname), true);
1873
+ }
17781874 } else
1779
- if (event.getSource() == computeAOItem)
1875
+ if (source == computeAOItem)
17801876 {
1781
- CameraPane.drawMode = CameraPane.OCCLUSION;
1782
- CameraPane.theRenderer.repaint();
1877
+ Globals.drawMode = CameraPane.OCCLUSION;
1878
+ Globals.theRenderer.repaint();
17831879 } else
1784
- if (event.getSource() == recompileItem)
1880
+ if (source == recompileItem)
17851881 {
17861882 Recompile();
17871883 refreshContents();
17881884 } else
1789
- if (event.getSource() == editScriptItem)
1885
+ if (source == editScriptItem)
17901886 {
17911887 OpenDialog();
17921888 refreshContents();
17931889 } else
1794
- if (event.getSource() == invariantsItem)
1890
+ if (source == invariantsItem)
17951891 {
17961892 System.out.println("Invariants:");
17971893 GrafreeD.grafreeD.universe.invariants();
17981894 } else
1799
- if (event.getSource() == memoryItem)
1895
+ if (source == memoryItem)
18001896 {
18011897 //System.out.println("Invariants:");
18021898 PrintMemory();
18031899 } else
1804
- if (event.getSource() == pathItem)
1900
+ if (source == pathItem)
18051901 {
18061902 PrintPath();
18071903 } else
1808
- if (event.getSource() == analyzeItem)
1904
+ if (source == analyzeItem)
18091905 {
18101906 AnalyzeObject();
18111907 } else
1812
- if (event.getSource() == dumpItem)
1908
+ if (source == dumpItem)
18131909 {
18141910 DumpObject();
18151911 } else
1816
- if (event.getSource() == screenfitButton)
1912
+ if (source == oneStepButton)
1913
+ {
1914
+ Globals.ONESTEP = true;
1915
+ cameraView.repaint();
1916
+ } else
1917
+ if (source == screenfitButton)
18171918 {
18181919 //Reload(lastConverter, lastFilename, true);
18191920 ScreenFit();
18201921 } else
1821
- if (event.getSource() == screenfitpointButton)
1922
+ if (source == screenfitpointButton)
18221923 {
18231924 //Reload(lastConverter, lastFilename, true);
18241925 ScreenFitPoint();
18251926 } else
1826
- if (event.getSource() == snapobjectButton)
1927
+ if (source == snapobjectButton)
18271928 {
18281929 //Reload(lastConverter, lastFilename, true);
18291930 SnapObject();
....@@ -1834,13 +1935,13 @@
18341935 // Recompile();
18351936 // refreshContents();
18361937 // } else
1837
- if (event.getSource() == gcButton)
1938
+ if (source == gcButton)
18381939 {
18391940 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18401941 System.gc();
18411942 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18421943 } else
1843
- if (event.getSource() == editLeafItem)
1944
+ if (source == editLeafItem)
18441945 {
18451946 Object3D obj;
18461947 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1854,62 +1955,66 @@
18541955 }
18551956 refreshContents(true);
18561957 } else
1857
- if (event.getSource() == openWindowItem)
1958
+ if (source == openWindowItem)
18581959 {
18591960 EditSelection(true);
18601961 } else
1861
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1962
+ if (source == cutItem || source == clearButton)
18621963 {
18631964 loadClipboard(true);
18641965 } else
1865
- if (event.getSource() == duplicateItem)
1966
+ if (source == duplicateItem)
18661967 {
18671968 Object3D keep = GrafreeD.clipboard;
18681969 loadClipboard(false);
18691970 paste(false);
18701971 GrafreeD.clipboard = keep;
18711972 } else
1872
- if (event.getSource() == cloneItem)
1973
+ if (source == cloneItem)
18731974 {
18741975 CloneSelection(false);
18751976 } else
1876
- if (event.getSource() == cloneSupportItem)
1977
+ if (source == cloneSupportItem)
18771978 {
18781979 CloneSelection(true);
18791980 } else
1880
- if (event.getSource() == copyItem)
1981
+ if (source == copyItem)
18811982 {
18821983 loadClipboard(false);
18831984 } else
1884
- if (event.getSource() == pasteItem)
1985
+ if (source == pasteItem)
18851986 {
18861987 paste(false);
18871988 } else
1888
- if (event.getSource() == pasteLinkItem)
1989
+ if (source == pasteIntoItem)
18891990 {
1890
- pasteInto(false);
1991
+ pasteInto(true, false);
18911992 } else
1892
- if (event.getSource() == pasteCloneItem)
1993
+ if (source == pasteLinkItem)
18931994 {
1894
- pasteInto(true);
1995
+ pasteInto(false, false);
18951996 } else
1896
- if (event.getSource() == pasteExpandItem)
1997
+ if (source == pasteCloneItem)
1998
+ {
1999
+ pasteInto(true, true);
2000
+ } else
2001
+ if (source == pasteExpandItem)
18972002 {
18982003 paste(true);
18992004 } else
1900
- if (event.getSource() == synchronizeItem)
2005
+ if (source == synchronizeItem)
19012006 {
19022007 Overwrite(Object3D.TRANSFORM);
19032008 } else
1904
- if (event.getSource() == overwriteNameItem)
2009
+ if (source == overwriteNameItem)
19052010 {
19062011 Overwrite(Object3D.NAME);
19072012 } else
1908
- if (event.getSource() == overwriteUVItem)
2013
+ if (source == overwriteUVItem)
19092014 {
19102015 Overwrite(Object3D.UV);
19112016 } else
1912
- if (event.getSource() == overwriteMatItem)
2017
+ if (source == overwriteMatItem)
19132018 {
19142019 /* july 2015
19152020 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1929,7 +2034,7 @@
19292034
19302035 Overwrite(dropAttributes);
19312036 }
1932
- if (event.getSource() == overwriteGeoItem)
2037
+ if (source == overwriteGeoItem)
19332038 {
19342039 Overwrite(Object3D.GEOMETRY);
19352040 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1946,7 +2051,7 @@
19462051 // refreshContents();
19472052 // }
19482053 } else
1949
- if (event.getSource() == generateMeshItem)
2054
+ if (source == generateMeshItem)
19502055 {
19512056 //if (group.selection.size() == 1)
19522057 // for (int i=0; i<group.selection.size(); i++)
....@@ -1957,7 +2062,7 @@
19572062 ResetModel();
19582063 refreshContents();
19592064 } else
1960
- if (event.getSource() == extractGeometriesItem)
2065
+ if (source == extractGeometriesItem)
19612066 {
19622067 boolean one = false;
19632068
....@@ -1984,7 +2089,7 @@
19842089 ResetModel();
19852090 refreshContents();
19862091 } else
1987
- if (event.getSource() == cloneGeometriesItem)
2092
+ if (source == cloneGeometriesItem)
19882093 {
19892094 boolean one = false;
19902095
....@@ -2010,7 +2115,7 @@
20102115 ResetModel();
20112116 refreshContents();
20122117 } else
2013
- if (event.getSource() == shareGeometriesItem)
2118
+ if (source == shareGeometriesItem)
20142119 {
20152120 boolean one = false;
20162121
....@@ -2040,7 +2145,7 @@
20402145 refreshContents();
20412146 }
20422147 } else
2043
- if (event.getSource() == mergeGeometriesItem)
2148
+ if (source == mergeGeometriesItem)
20442149 {
20452150 boolean one = false;
20462151
....@@ -2070,7 +2175,7 @@
20702175 ResetModel();
20712176 refreshContents();
20722177 } else
2073
- if (event.getSource() == linkverticesItem)
2178
+ if (source == linkverticesItem)
20742179 {
20752180 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20762181 // {
....@@ -2090,41 +2195,41 @@
20902195 if (content instanceof cGroup && ((cGroup)content).transientlink )
20912196 content = ((cGroup)content).get(0);
20922197
2093
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2198
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20942199 for (int i=0; i<group.selection.size(); i++)
20952200 {
2096
- boolean random = CameraPane.RANDOM;
2097
- CameraPane.RANDOM = false; // parse all random nodes
2201
+ boolean random = CameraPane.SWITCH;
2202
+ CameraPane.SWITCH = false; // parse all random nodes
20982203 group.selection.get(i).linkVerticesThis(content);
20992204 // group.selection.get(i).setMasterThis(content); // should be identity
2100
- CameraPane.RANDOM = random;
2205
+ CameraPane.SWITCH = random;
21012206 }
2102
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2207
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21032208 refreshContents();
21042209 }
21052210 } else
2106
- if (event.getSource() == resetsupportItem)
2211
+ if (source == resetsupportItem)
21072212 {
21082213 for (int i=0; i<group.selection.size(); i++)
21092214 {
2110
- boolean random = CameraPane.RANDOM;
2111
- CameraPane.RANDOM = false; // parse all random nodes
2215
+ boolean random = CameraPane.SWITCH;
2216
+ CameraPane.SWITCH = false; // parse all random nodes
21122217 group.selection.get(i).linkVerticesThis(null);
2113
- CameraPane.RANDOM = random;
2218
+ CameraPane.SWITCH = random;
21142219 }
21152220
21162221 refreshContents();
21172222 } else
2118
- if (event.getSource() == relinkverticesItem)
2223
+ if (source == relinkverticesItem)
21192224 {
2120
- boolean random = CameraPane.RANDOM;
2121
- CameraPane.RANDOM = false; // parse all random nodes
2225
+ boolean random = CameraPane.SWITCH;
2226
+ CameraPane.SWITCH = false; // parse all random nodes
21222227 group.selection.RelinkToSupport();
2123
- CameraPane.RANDOM = random;
2228
+ CameraPane.SWITCH = random;
21242229
21252230 refreshContents();
21262231 } else
2127
- if (event.getSource() == resetreferencesItem)
2232
+ if (source == resetreferencesItem)
21282233 {
21292234 for (int i=0; i<group.selection.size(); i++)
21302235 {
....@@ -2133,7 +2238,7 @@
21332238
21342239 refreshContents();
21352240 } else
2136
- if (event.getSource() == setMasterItem)
2241
+ if (source == setMasterItem)
21372242 {
21382243 if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21392244 {
....@@ -2146,7 +2251,7 @@
21462251 refreshContents();
21472252 }
21482253 } else
2149
- if (event.getSource() == poseMeshItem)
2254
+ if (source == poseMeshItem)
21502255 {
21512256 if (group.selection.size() == 1)
21522257 {
....@@ -2165,19 +2270,19 @@
21652270 }
21662271
21672272 } else
2168
- if (event.getSource() == revertMeshItem)
2273
+ if (source == revertMeshItem)
21692274 {
21702275 RevertMeshes();
21712276 } else
2172
- if (event.getSource() == resetMeshItem)
2277
+ if (source == resetMeshItem)
21732278 {
21742279 ResetAll();
21752280 } else
2176
- if (event.getSource() == stepAllItem)
2281
+ if (source == stepAllItem)
21772282 {
21782283 StepAll();
21792284 } else
2180
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2285
+ if (source == clearItem) // || event.getSource() == clearButton)
21812286 {
21822287 //int indices[] = jList.getSelectedIndices();
21832288 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2185,46 +2290,46 @@
21852290
21862291 ClearSelection(false);
21872292 } else
2188
- if (event.getSource() == clearAllItem)
2293
+ if (source == clearAllItem)
21892294 {
21902295 ClearSelection(true);
21912296 } else
2192
- if (event.getSource() == grabItem)
2297
+ if (source == grabItem)
21932298 {
21942299 group(new cGroup(), true);
21952300 } else
2196
- if (event.getSource() == hideItem)
2301
+ if (source == hideItem)
21972302 {
21982303 group(new HiddenObject());
21992304 } else
2200
- if (event.getSource() == frontItem)
2305
+ if (source == frontItem)
22012306 {
22022307 front();
22032308 } else
2204
- if (event.getSource() == backItem)
2309
+ if (source == backItem)
22052310 {
22062311 back();
22072312 } else
2208
- if (event.getSource() == cameraItem)
2313
+ if (source == cameraItem)
22092314 {
22102315 makeSomething(new Camera());
22112316 } else
2212
- if (event.getSource() == compositeItem)
2317
+ if (source == compositeItem)
22132318 {
22142319 group(new Composite());
22152320 } else
2216
- if (event.getSource() == randomItem)
2321
+ if (source == randomItem)
22172322 {
22182323 RandomNode random = new RandomNode();
22192324 group(random);
22202325 if (random.size() > 0)
2221
- random.name = random.get(0).name + "Rnd";
2326
+ random.name = random.get(0).name + "Switch";
22222327 } else
2223
- if (event.getSource() == physicsItem)
2328
+ if (source == physicsItem)
22242329 {
22252330 group(new PhysicsNode());
22262331 } else
2227
- if (event.getSource() == frameselectorItem)
2332
+ if (source == frameselectorItem)
22282333 {
22292334 for (int i=0; i<group.selection.size(); i++)
22302335 {
....@@ -2236,7 +2341,7 @@
22362341 ResetModel();
22372342 refreshContents();
22382343 } else
2239
- if (event.getSource() == switchGeoItem)
2344
+ if (source == switchGeoItem)
22402345 {
22412346 for (int i=0; i<group.selection.size(); i++)
22422347 {
....@@ -2248,7 +2353,7 @@
22482353 ResetModel();
22492354 refreshContents();
22502355 } else
2251
- if (event.getSource() == switchTransfoItem)
2356
+ if (source == switchTransfoItem)
22522357 {
22532358 for (int i=0; i<group.selection.size(); i++)
22542359 {
....@@ -2260,7 +2365,7 @@
22602365 ResetModel();
22612366 refreshContents();
22622367 } else
2263
- if (event.getSource() == morphItem)
2368
+ if (source == morphItem)
22642369 {
22652370 for (int i=0; i<group.selection.size(); i++)
22662371 {
....@@ -2272,7 +2377,7 @@
22722377 ResetModel();
22732378 refreshContents();
22742379 } else
2275
- if (event.getSource() == scriptNodeItem)
2380
+ if (source == scriptNodeItem)
22762381 {
22772382 boolean atleastone = false;
22782383
....@@ -2311,31 +2416,31 @@
23112416 }
23122417 }
23132418 } else
2314
- if (event.getSource() == linkerItem)
2419
+ if (source == linkerItem)
23152420 {
23162421 group(new cLinker());
23172422 } else
2318
- if (event.getSource() == textureItem)
2423
+ if (source == textureItem)
23192424 {
23202425 group(new TextureNode());
23212426 } else
2322
- if (event.getSource() == billboardItem)
2427
+ if (source == billboardItem)
23232428 {
23242429 group(new BillboardNode());
23252430 } else
2326
- if (event.getSource() == shadowXItem)
2431
+ if (source == shadowXItem)
23272432 {
23282433 CastShadow(0);
23292434 } else
2330
- if (event.getSource() == shadowYItem)
2435
+ if (source == shadowYItem)
23312436 {
23322437 CastShadow(1);
23332438 } else
2334
- if (event.getSource() == shadowZItem)
2439
+ if (source == shadowZItem)
23352440 {
23362441 CastShadow(2);
23372442 } else
2338
- if (event.getSource() == ungroupItem)
2443
+ if (source == ungroupItem)
23392444 {
23402445 //ungroup();
23412446 for (int i=0; i<group.selection.size(); i++)
....@@ -2347,179 +2452,179 @@
23472452
23482453 refreshContents();
23492454 } else
2350
- if (event.getSource() == genUVItem)
2455
+ if (source == genUVItem)
23512456 {
23522457 GenUV();
23532458 } else
2354
- if (event.getSource() == genNormalsCADItem)
2459
+ if (source == genNormalsCADItem)
23552460 {
23562461 GenNormals(true);
23572462 } else
2358
- if (event.getSource() == genNormalsMESHItem)
2463
+ if (source == genNormalsMESHItem)
23592464 {
23602465 GenNormals(true); // TODO
23612466 } else
2362
- if (event.getSource() == genNormalsORGANItem)
2467
+ if (source == genNormalsORGANItem)
23632468 {
23642469 GenNormals(false);
23652470 } else
2366
- if (event.getSource() == genNormalsMINEItem)
2471
+ if (source == genNormalsMINEItem)
23672472 {
23682473 GenNormalsMINE();
23692474 } else
2370
- if (event.getSource() == stripifyItem)
2475
+ if (source == stripifyItem)
23712476 {
23722477 Stripify();
23732478 } else
2374
- if (event.getSource() == unstripifyItem)
2479
+ if (source == unstripifyItem)
23752480 {
23762481 Unstripify();
23772482 } else
2378
- if (event.getSource() == trimItem)
2483
+ if (source == trimItem)
23792484 {
23802485 Trim();
23812486 } else
2382
- if (event.getSource() == untrimItem)
2487
+ if (source == untrimItem)
23832488 {
23842489 Untrim();
23852490 } else
2386
- if (event.getSource() == clearColorsItem)
2491
+ if (source == clearColorsItem)
23872492 {
23882493 ClearColors();
23892494 } else
2390
- if (event.getSource() == clearMaterialsItem)
2495
+ if (source == clearMaterialsItem)
23912496 {
23922497 ClearMaterials();
23932498 } else
2394
- if (event.getSource() == liveleavesItem)
2499
+ if (source == liveleavesItem)
23952500 {
23962501 LiveLeaves(true);
23972502 } else
2398
- if (event.getSource() == unliveleavesItem)
2503
+ if (source == unliveleavesItem)
23992504 {
24002505 LiveLeaves(false);
24012506 } else
2402
- if (event.getSource() == supportleavesItem)
2507
+ if (source == supportleavesItem)
24032508 {
24042509 SupportLeaves(true);
24052510 } else
2406
- if (event.getSource() == unsupportleavesItem)
2511
+ if (source == unsupportleavesItem)
24072512 {
24082513 SupportLeaves(false);
24092514 } else
2410
- if (event.getSource() == hideleavesItem)
2515
+ if (source == hideleavesItem)
24112516 {
24122517 HideLeaves(true);
24132518 } else
2414
- if (event.getSource() == showleavesItem)
2519
+ if (source == showleavesItem)
24152520 {
24162521 HideLeaves(false);
24172522 } else
2418
- if (event.getSource() == markleavesItem)
2523
+ if (source == markleavesItem)
24192524 {
24202525 MarkLeaves(true);
24212526 } else
2422
- if (event.getSource() == unmarkleavesItem)
2527
+ if (source == unmarkleavesItem)
24232528 {
24242529 MarkLeaves(false);
24252530 } else
2426
- if (event.getSource() == flipVItem)
2531
+ if (source == flipVItem)
24272532 {
24282533 FlipV(true);
24292534 } else
2430
- if (event.getSource() == unflipVItem)
2535
+ if (source == unflipVItem)
24312536 {
24322537 FlipV(false);
24332538 } else
2434
- if (event.getSource() == lowTexturesItem)
2539
+ if (source == lowTexturesItem)
24352540 {
24362541 SetTexRes(0);
24372542 } else
2438
- if (event.getSource() == normalTexturesItem)
2543
+ if (source == normalTexturesItem)
24392544 {
24402545 SetTexRes(1);
24412546 } else
2442
- if (event.getSource() == highTexturesItem)
2547
+ if (source == highTexturesItem)
24432548 {
24442549 SetTexRes(2);
24452550 } else
2446
- if (event.getSource() == veryhighTexturesItem)
2551
+ if (source == veryhighTexturesItem)
24472552 {
24482553 SetTexRes(3);
24492554 } else
2450
- if (event.getSource() == maxTexturesItem)
2555
+ if (source == maxTexturesItem)
24512556 {
24522557 SetTexRes(4);
24532558 } else
2454
- if (event.getSource() == panoTexturesItem)
2559
+ if (source == panoTexturesItem)
24552560 {
24562561 SetTexRes(5);
24572562 } else
2458
- if (event.getSource() == reverseNormalsItem)
2563
+ if (source == reverseNormalsItem)
24592564 {
24602565 ReverseNormals();
24612566 } else
2462
- if (event.getSource() == parseverticesItem)
2567
+ if (source == parseverticesItem)
24632568 {
24642569 ParseVertices();
24652570 } else
2466
- if (event.getSource() == textureFieldItem)
2571
+ if (source == textureFieldItem)
24672572 {
24682573 TextureVertices();
24692574 } else
2470
- if (event.getSource() == alignItem)
2575
+ if (source == alignItem)
24712576 {
24722577 Align();
24732578 } else
2474
- if (event.getSource() == mirrorItem)
2579
+ if (source == mirrorItem)
24752580 {
24762581 MirrorPoses();
24772582 } else
2478
- if (event.getSource() == reduceMorphItem)
2583
+ if (source == reduceMorphItem)
24792584 {
24802585 MeshReduction(false);
24812586 } else
2482
- if (event.getSource() == reduce34MorphItem)
2587
+ if (source == reduce34MorphItem)
24832588 {
24842589 MeshReduction(true);
24852590 } else
2486
- if (event.getSource() == reverseTrianglesItem)
2591
+ if (source == reverseTrianglesItem)
24872592 {
24882593 ReverseTriangles();
24892594 } else
2490
- if (event.getSource() == reduceMeshItem)
2595
+ if (source == reduceMeshItem)
24912596 {
24922597 ReduceMesh(false);
24932598 } else
2494
- if (event.getSource() == reduce34MeshItem)
2599
+ if (source == reduce34MeshItem)
24952600 {
24962601 ReduceMesh(true);
24972602 } else
2498
- if (event.getSource() == increaseMeshItem)
2603
+ if (source == increaseMeshItem)
24992604 {
25002605 IncreaseMesh();
25012606 } else
2502
- if (event.getSource() == clipMeshItem)
2607
+ if (source == clipMeshItem)
25032608 {
25042609 ClipMesh();
25052610 } else
2506
- if (event.getSource() == smoothMeshItem)
2611
+ if (source == smoothMeshItem)
25072612 {
25082613 SmoothMesh();
25092614 } else
2510
- if (event.getSource() == transformgeometryItem)
2615
+ if (source == transformgeometryItem)
25112616 {
25122617 TransformGeometry();
25132618 } else
2514
- if (event.getSource() == resetTransformItem)
2619
+ if (source == resetTransformItem)
25152620 {
25162621 ResetTransform();
25172622 } else
2518
- if (event.getSource() == resetCentroidItem)
2623
+ if (source == resetCentroidItem)
25192624 {
25202625 ResetCentroid();
25212626 } else
2522
- if (event.getSource() == resetParentItem)
2627
+ if (source == resetParentItem)
25232628 {
25242629 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25252630 {
....@@ -2529,7 +2634,7 @@
25292634
25302635 refreshContents();
25312636 } else
2532
- if (event.getSource() == repairParentItem)
2637
+ if (source == repairParentItem)
25332638 {
25342639 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25352640 {
....@@ -2543,7 +2648,21 @@
25432648
25442649 refreshContents();
25452650 } else
2546
- if (event.getSource() == sortbysizeItem)
2651
+ if (source == repairShadowItem)
2652
+ {
2653
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2654
+ {
2655
+ Object3D obj = (Object3D)e.nextElement();
2656
+ obj.RepairShadow();
2657
+// for (int i=0; i<obj.size(); i++)
2658
+// {
2659
+// obj.get(i).parent = obj;
2660
+// }
2661
+ }
2662
+
2663
+ refreshContents();
2664
+ } else
2665
+ if (source == sortbysizeItem)
25472666 {
25482667 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25492668 {
....@@ -2555,7 +2674,7 @@
25552674 ResetModel();
25562675 refreshContents();
25572676 } else
2558
- if (event.getSource() == sortbynameItem)
2677
+ if (source == sortbynameItem)
25592678 {
25602679 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25612680 {
....@@ -2567,7 +2686,7 @@
25672686 ResetModel();
25682687 refreshContents();
25692688 } else
2570
- if (event.getSource() == attachPigmentItem)
2689
+ if (source == attachPigmentItem)
25712690 {
25722691 String texture = GetFile("Attach pigment");
25732692 Object3D obj;
....@@ -2579,7 +2698,7 @@
25792698
25802699 refreshContents();
25812700 } else
2582
- if (event.getSource() == detachPigmentItem)
2701
+ if (source == detachPigmentItem)
25832702 {
25842703 Object3D obj;
25852704 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2590,7 +2709,7 @@
25902709
25912710 refreshContents();
25922711 } else
2593
- if (event.getSource() == attachBumpItem)
2712
+ if (source == attachBumpItem)
25942713 {
25952714 String texture = GetFile("Attach bump");
25962715 Object3D obj;
....@@ -2602,7 +2721,7 @@
26022721
26032722 refreshContents();
26042723 } else
2605
- if (event.getSource() == detachBumpItem)
2724
+ if (source == detachBumpItem)
26062725 {
26072726 Object3D obj;
26082727 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2613,7 +2732,7 @@
26132732
26142733 refreshContents();
26152734 } else
2616
- if (event.getSource() == pigmentBumpItem)
2735
+ if (source == pigmentBumpItem)
26172736 {
26182737 Object3D obj;
26192738 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2624,158 +2743,195 @@
26242743
26252744 refreshContents();
26262745 } else
2627
- if (event.getSource() == flashSelectionButton)
2746
+ if (source == flashSelectionButton)
26282747 {
26292748 CameraPane.flash = true;
26302749 refreshContents();
26312750 } else
2632
- if (event.getSource() == oneButton)
2751
+ if (source == oneButton)
26332752 {
26342753 } else
2635
- if (event.getSource() == twoButton)
2754
+ if (source == twoButton)
26362755 {
26372756 radio.layout = twoButton;
26382757 // bug
26392758 //gridPanel.setDividerLocation(1.0);
26402759 //bigPanel.setDividerLocation(0.0);
2641
- bigThree.remove(scenePanel);
2642
- bigThree.remove(cameraPanel);
2643
- bigThree.remove(XYZPanel);
2644
- aWindowConstraints.gridx = 0;
2645
- aWindowConstraints.gridy = 0;
2646
- aWindowConstraints.gridwidth = 1;
2647
- // aConstraints.gridheight = 3;
2648
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2649
- aWindowConstraints.weightx = 0;
2650
- aWindowConstraints.weighty = 1;
2651
- //bigThree.add(jtp, aWindowConstraints);
2652
- aWindowConstraints.weightx = 1;
2653
- aWindowConstraints.gridwidth = 3;
2654
- // aConstraints.gridheight = 3;
2655
- aWindowConstraints.gridx = 1;
2656
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2657
- bigThree.add(cameraPanel, aWindowConstraints);
2658
- aWindowConstraints.weightx = 0;
2659
- aWindowConstraints.gridx = 4;
2660
- aWindowConstraints.gridwidth = 1;
2661
- // aConstraints.gridheight = 3;
2662
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2663
- //bigThree.add(XYZPanel, aWindowConstraints);
2664
- bigThree.revalidate();
2760
+// bigThree.remove(scenePanel);
2761
+// bigThree.remove(centralPanel);
2762
+// bigThree.remove(XYZPanel);
2763
+// aWindowConstraints.gridx = 0;
2764
+// aWindowConstraints.gridy = 0;
2765
+// aWindowConstraints.gridwidth = 1;
2766
+// // aConstraints.gridheight = 3;
2767
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2768
+// aWindowConstraints.weightx = 0;
2769
+// aWindowConstraints.weighty = 1;
2770
+// //bigThree.add(jtp, aWindowConstraints);
2771
+// aWindowConstraints.weightx = 1;
2772
+// aWindowConstraints.gridwidth = 3;
2773
+// // aConstraints.gridheight = 3;
2774
+// aWindowConstraints.gridx = 1;
2775
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2776
+// bigThree.add(centralPanel, aWindowConstraints);
2777
+// aWindowConstraints.weightx = 0;
2778
+// aWindowConstraints.gridx = 4;
2779
+// aWindowConstraints.gridwidth = 1;
2780
+// // aConstraints.gridheight = 3;
2781
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2782
+// //bigThree.add(XYZPanel, aWindowConstraints);
2783
+// scenePanel.setVisible(false);
2784
+// centralPanel.setVisible(true);
2785
+// XYZPanel.setVisible(false);
2786
+ bigThree.ClearUI();
2787
+ bigThree.add(centralPanel);
2788
+ bigThree.FlushUI();
26652789 } else
2666
- if (event.getSource() == threeButton)
2790
+ if (source == threeButton)
26672791 {
26682792 radio.layout = threeButton;
2669
- bigThree.remove(scenePanel);
2670
- bigThree.remove(cameraPanel);
2671
- bigThree.remove(XYZPanel);
2672
- aWindowConstraints.gridx = 0;
2673
- aWindowConstraints.gridy = 0;
2674
- aWindowConstraints.gridwidth = 1;
2675
- // aConstraints.gridheight = 3;
2676
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2677
- aWindowConstraints.weightx = 0;
2678
- aWindowConstraints.weighty = 1;
2679
- //bigThree.add(jtp, aWindowConstraints);
2680
- aWindowConstraints.weightx = 1;
2681
- aWindowConstraints.gridwidth = 3;
2682
- // aConstraints.gridheight = 3;
2683
- aWindowConstraints.gridx = 1;
2684
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2685
- bigThree.add(cameraPanel, aWindowConstraints);
2686
- aWindowConstraints.weightx = 0;
2687
- aWindowConstraints.gridx = 4;
2688
- aWindowConstraints.gridwidth = 1;
2689
- // aConstraints.gridheight = 3;
2690
- aConstraints.fill = GridBagConstraints.VERTICAL;
2691
- bigThree.add(XYZPanel, aWindowConstraints);
2692
- bigThree.revalidate();
2793
+
2794
+// bigThree.remove(scenePanel);
2795
+// bigThree.remove(centralPanel);
2796
+// bigThree.remove(XYZPanel);
2797
+// aWindowConstraints.gridx = 0;
2798
+// aWindowConstraints.gridy = 0;
2799
+// aWindowConstraints.gridwidth = 1;
2800
+// // aConstraints.gridheight = 3;
2801
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2802
+// aWindowConstraints.weightx = 0;
2803
+// aWindowConstraints.weighty = 1;
2804
+// //bigThree.add(jtp, aWindowConstraints);
2805
+// aWindowConstraints.weightx = 1;
2806
+// aWindowConstraints.gridwidth = 3;
2807
+// // aConstraints.gridheight = 3;
2808
+// aWindowConstraints.gridx = 1;
2809
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2810
+// bigThree.add(centralPanel, aWindowConstraints);
2811
+// aWindowConstraints.weightx = 0;
2812
+// aWindowConstraints.gridx = 4;
2813
+// aWindowConstraints.gridwidth = 1;
2814
+// // aConstraints.gridheight = 3;
2815
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2816
+// bigThree.add(XYZPanel, aWindowConstraints);
2817
+// bigThree.validate();
2818
+// scenePanel.setVisible(false);
2819
+// centralPanel.setVisible(true);
2820
+// XYZPanel.setVisible(true);
2821
+ bigThree.ClearUI();
2822
+ bigThree.add(centralPanel);
2823
+ bigThree.add(XYZPanel);
2824
+ bigThree.FlushUI();
26932825 } else
2694
- if (event.getSource() == fourButton)
2826
+ if (source == fourButton)
26952827 {
26962828 radio.layout = fourButton;
2697
- bigThree.remove(scenePanel);
2698
- bigThree.remove(cameraPanel);
2699
- bigThree.remove(XYZPanel);
2700
- aWindowConstraints.gridx = 0;
2701
- aWindowConstraints.gridy = 0;
2702
- aWindowConstraints.gridwidth = 1;
2703
- // aWindowConstraints.gridheight = 3;
2704
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2705
- aWindowConstraints.weightx = 1;
2706
- aWindowConstraints.weighty = 1;
2707
- bigThree.add(scenePanel, aWindowConstraints);
2708
- aWindowConstraints.weightx = 1;
2709
- aWindowConstraints.gridwidth = 3;
2710
- // aConstraints.gridheight = 3;
2711
- aWindowConstraints.gridx = 1;
2712
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2713
- //bigThree.add(cameraPanel, aWindowConstraints);
2714
- aWindowConstraints.weightx = 0;
2715
- aWindowConstraints.gridx = 4;
2716
- aWindowConstraints.gridwidth = 1;
2717
- // aWindowConstraints.gridheight = 3;
2718
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2719
- //bigThree.add(XYZPanel, aWindowConstraints);
2720
- bigThree.revalidate();
2829
+
2830
+// bigThree.remove(scenePanel);
2831
+// bigThree.remove(centralPanel);
2832
+// bigThree.remove(XYZPanel);
2833
+// aWindowConstraints.gridx = 0;
2834
+// aWindowConstraints.gridy = 0;
2835
+// aWindowConstraints.gridwidth = 1;
2836
+// // aWindowConstraints.gridheight = 3;
2837
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2838
+// aWindowConstraints.weightx = 1;
2839
+// aWindowConstraints.weighty = 1;
2840
+// bigThree.add(scenePanel, aWindowConstraints);
2841
+// aWindowConstraints.weightx = 1;
2842
+// aWindowConstraints.gridwidth = 3;
2843
+// // aConstraints.gridheight = 3;
2844
+// aWindowConstraints.gridx = 1;
2845
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2846
+// //bigThree.add(cameraPanel, aWindowConstraints);
2847
+// aWindowConstraints.weightx = 0;
2848
+// aWindowConstraints.gridx = 4;
2849
+// aWindowConstraints.gridwidth = 1;
2850
+// // aWindowConstraints.gridheight = 3;
2851
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2852
+// //bigThree.add(XYZPanel, aWindowConstraints);
2853
+// bigThree.validate();
2854
+// scenePanel.setVisible(true);
2855
+// centralPanel.setVisible(false);
2856
+// XYZPanel.setVisible(false);
2857
+ bigThree.ClearUI();
2858
+ bigThree.add(scenePanel);
2859
+ bigThree.FlushUI();
27212860 } else
2722
- if (event.getSource() == sixButton)
2861
+ if (source == sixButton)
27232862 {
27242863 radio.layout = sixButton;
2725
- bigThree.remove(scenePanel);
2726
- bigThree.remove(cameraPanel);
2727
- bigThree.remove(XYZPanel);
2728
- aWindowConstraints.gridx = 0;
2729
- aWindowConstraints.gridy = 0;
2730
- aWindowConstraints.gridwidth = 1;
2731
- // aConstraints.gridheight = 3;
2732
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2733
- aWindowConstraints.weightx = 0;
2734
- aWindowConstraints.weighty = 1;
2735
- bigThree.add(scenePanel, aWindowConstraints);
2736
- aWindowConstraints.weightx = 1;
2737
- aWindowConstraints.gridwidth = 3;
2738
- // aWindowConstraints.gridheight = 3;
2739
- aWindowConstraints.gridx = 1;
2740
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2741
- bigThree.add(cameraPanel, aWindowConstraints);
2742
- aWindowConstraints.weightx = 0;
2743
- aWindowConstraints.gridx = 4;
2744
- aWindowConstraints.gridwidth = 1;
2745
- // aWindowConstraints.gridheight = 3;
2746
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2747
- //bigThree.add(XYZPanel, aConstraints);
2748
- bigThree.revalidate();
2864
+
2865
+// bigThree.remove(scenePanel);
2866
+// bigThree.remove(centralPanel);
2867
+// bigThree.remove(XYZPanel);
2868
+// aWindowConstraints.gridx = 0;
2869
+// aWindowConstraints.gridy = 0;
2870
+// aWindowConstraints.gridwidth = 1;
2871
+// // aConstraints.gridheight = 3;
2872
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2873
+// aWindowConstraints.weightx = 0;
2874
+// aWindowConstraints.weighty = 1;
2875
+// bigThree.add(scenePanel, aWindowConstraints);
2876
+// aWindowConstraints.weightx = 1;
2877
+// aWindowConstraints.gridwidth = 3;
2878
+// // aWindowConstraints.gridheight = 3;
2879
+// aWindowConstraints.gridx = 1;
2880
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2881
+// bigThree.add(centralPanel, aWindowConstraints);
2882
+// aWindowConstraints.weightx = 0;
2883
+// aWindowConstraints.gridx = 4;
2884
+// aWindowConstraints.gridwidth = 1;
2885
+// // aWindowConstraints.gridheight = 3;
2886
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2887
+// //bigThree.add(XYZPanel, aConstraints);
2888
+// bigThree.validate();
2889
+// scenePanel.setVisible(true);
2890
+// centralPanel.setVisible(true);
2891
+// XYZPanel.setVisible(false);
2892
+ bigThree.ClearUI();
2893
+ bigThree.add(scenePanel);
2894
+ bigThree.add(centralPanel);
2895
+ bigThree.FlushUI();
27492896 } else
2750
- if (event.getSource() == sevenButton)
2897
+ if (source == sevenButton)
27512898 {
27522899 radio.layout = sevenButton;
2753
- bigThree.remove(scenePanel);
2754
- bigThree.remove(cameraPanel);
2755
- bigThree.remove(XYZPanel);
2756
- aWindowConstraints.gridx = 0;
2757
- aWindowConstraints.gridy = 0;
2758
- aWindowConstraints.gridwidth = 1;
2759
- // aWindowConstraints.gridheight = 3;
2760
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2761
- aWindowConstraints.weightx = 0;
2762
- aWindowConstraints.weighty = 1;
2763
- bigThree.add(scenePanel, aWindowConstraints);
2764
- aWindowConstraints.weightx = 1;
2765
- aWindowConstraints.gridwidth = 3;
2766
- // aWindowConstraints.gridheight = 3;
2767
- aWindowConstraints.gridx = 1;
2768
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2769
- bigThree.add(cameraPanel, aWindowConstraints);
2770
- aWindowConstraints.weightx = 0;
2771
- aWindowConstraints.gridx = 4;
2772
- aWindowConstraints.gridwidth = 1;
2773
- // aConstraints.gridheight = 3;
2774
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2775
- bigThree.add(XYZPanel, aWindowConstraints);
2776
- bigThree.revalidate();
2900
+
2901
+// bigThree.remove(scenePanel);
2902
+// bigThree.remove(centralPanel);
2903
+// bigThree.remove(XYZPanel);
2904
+// aWindowConstraints.gridx = 0;
2905
+// aWindowConstraints.gridy = 0;
2906
+// aWindowConstraints.gridwidth = 1;
2907
+// // aWindowConstraints.gridheight = 3;
2908
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2909
+// aWindowConstraints.weightx = 0;
2910
+// aWindowConstraints.weighty = 1;
2911
+// bigThree.add(scenePanel, aWindowConstraints);
2912
+// aWindowConstraints.weightx = 1;
2913
+// aWindowConstraints.gridwidth = 3;
2914
+// // aWindowConstraints.gridheight = 3;
2915
+// aWindowConstraints.gridx = 1;
2916
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2917
+// bigThree.add(centralPanel, aWindowConstraints);
2918
+// aWindowConstraints.weightx = 0;
2919
+// aWindowConstraints.gridx = 4;
2920
+// aWindowConstraints.gridwidth = 1;
2921
+// // aConstraints.gridheight = 3;
2922
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2923
+// bigThree.add(XYZPanel, aWindowConstraints);
2924
+// bigThree.validate();
2925
+// scenePanel.setVisible(true);
2926
+// centralPanel.setVisible(true);
2927
+// XYZPanel.setVisible(true);
2928
+ bigThree.ClearUI();
2929
+ bigThree.add(scenePanel);
2930
+ bigThree.add(centralPanel);
2931
+ bigThree.add(XYZPanel);
2932
+ bigThree.FlushUI();
27772933 } else
2778
- if (event.getSource() == rootButton)
2934
+ if (source == rootButton)
27792935 {
27802936 Object3D obj;
27812937 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2787,7 +2943,7 @@
27872943
27882944 refreshContents(true);
27892945 } else
2790
- if (event.getSource() == closeButton)
2946
+ if (source == closeButton)
27912947 {
27922948 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27932949 cRadio ab;
....@@ -2808,11 +2964,11 @@
28082964 }
28092965 refreshContents(true);
28102966 } else
2811
- if (event.getSource() == editItem || event.getSource() == editButton)
2967
+ if (source == editItem || source == editButton)
28122968 {
28132969 EditSelection(false);
28142970 } else
2815
- if (event.getSource() == uneditButton)
2971
+ if (source == uneditButton)
28162972 {
28172973 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28182974 {
....@@ -2824,12 +2980,12 @@
28242980
28252981 child.editWindow = null; // ???????????
28262982 }
2827
- objEditor.ctrlPanel.revalidate();
2983
+ objEditor.ctrlPanel.FlushUI();
28282984 //objEditor.jTree.clearSelection();
28292985 //objEditor.ResetSliders();
28302986 refreshContents(true);
28312987 } else
2832
- if (event.getSource() == clearPanelButton)
2988
+ if (source == clearPanelButton)
28332989 {
28342990 assert(copy == group);
28352991 //copy.ClearUI();
....@@ -2840,7 +2996,7 @@
28402996 listUI.clear();
28412997 refreshContents(true);
28422998 } else
2843
- if (event.getSource() == allParamsButton)
2999
+ if (source == allParamsButton)
28443000 {
28453001 assert(copy == group);
28463002
....@@ -2861,19 +3017,19 @@
28613017
28623018 refreshContents(true);
28633019 } else
2864
- if (event.getSource() == unselectButton)
3020
+ if (source == unselectButton)
28653021 {
28663022 objEditor.jTree.clearSelection();
28673023 // ?? oct 2012 GrafreeD.clipboard.clear();
28683024 objEditor.ResetSliders();
28693025 refreshContents(true);
28703026 } else
2871
- if(event.getSource() instanceof cRadio)
3027
+ if(source instanceof cRadio)
28723028 {
28733029 group.parent = keepparent;
28743030 group.attributes = 0;
28753031 //group.editWindow = null;
2876
- /*cRadio*/ radio = (cRadio)event.getSource();
3032
+ /*cRadio*/ radio = (cRadio)source;
28773033 Object3D obj = radio.GetObject();
28783034 System.out.println("Edit " + obj);
28793035 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2893,7 +3049,7 @@
28933049 }
28943050
28953051 copy = group;
2896
- //CameraPane.theRenderer.object = group;
3052
+ //Globals.theRenderer.object = group;
28973053 if(!useclient)
28983054 {
28993055 cameraView.renderCamera = radio.camera;
....@@ -2902,7 +3058,8 @@
29023058 cameraView.cameras[cameraView.cameracount] = radio.camera;
29033059 cameraView.targetLookAt.set(radio.camera.lookAt);
29043060 cameraView.object = group;
2905
- cameraView.lighttouched = true;
3061
+ //cameraView.lighttouched = true;
3062
+ Globals.lighttouched = true;
29063063 topView.object = group;
29073064 frontView.object = group;
29083065 sideView.object = group;
....@@ -2938,7 +3095,7 @@
29383095 if (useclient)
29393096 {
29403097 cameraView.object = client;
2941
- cameraView.lighttouched = true;
3098
+ Globals.lighttouched = true;
29423099 //topView.object = client;
29433100 //frontView.object = client;
29443101 //sideView.object = client;
....@@ -2946,7 +3103,7 @@
29463103 else
29473104 {
29483105 cameraView.object = group;
2949
- cameraView.lighttouched = true;
3106
+ Globals.lighttouched = true;
29503107 //topView.object = group;
29513108 //frontView.object = group;
29523109 //sideView.object = group;
....@@ -3454,7 +3611,7 @@
34543611 String pigment = Object3D.GetPigment(tex);
34553612 //String bump = Object3D.GetBump(tex);
34563613
3457
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3614
+ com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
34583615
34593616 double s = v.s;
34603617
....@@ -3542,11 +3699,11 @@
35423699
35433700 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
35443701
3545
- boolean random = CameraPane.RANDOM;
3546
- CameraPane.RANDOM = false; // parse all random nodes
3702
+ boolean random = CameraPane.SWITCH;
3703
+ CameraPane.SWITCH = false; // parse all random nodes
35473704 lowres.linkVerticesThis(null);
35483705 lowres.linkVerticesThis(sn);
3549
- CameraPane.RANDOM = random;
3706
+ CameraPane.SWITCH = random;
35503707
35513708 System.err.flush();
35523709
....@@ -3755,7 +3912,7 @@
37553912 group.selection.RelinkToSupport(); // july 2014
37563913 System.out.println("DONE.");
37573914 refreshContents();
3758
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3915
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
37593916 }
37603917
37613918 void ReduceMesh(boolean reduction34)
....@@ -4031,25 +4188,25 @@
40314188 System.err.println("info : " + child.GetPath());
40324189 }
40334190 }
4034
- else
4035
- {
4036
- objEditor.SetMaterial(group); // .GetMaterial());
4037
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4038
- System.err.println("info : " + group.GetPath());
4039
- }
4191
+// else
4192
+// {
4193
+// objEditor.SetMaterial(group); // .GetMaterial());
4194
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4195
+// System.err.println("info : " + group.GetPath());
4196
+// }
40404197
40414198 objEditor.SetText(); // jan 2014
40424199
4043
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4200
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
40444201 CameraPane.flash = true;
40454202
40464203 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
40474204 // a camera
40484205 {
40494206 CameraPane.camerachangeframe = 0; // don't refuse it
4050
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4051
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
4052
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4207
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4208
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4209
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
40534210 }
40544211
40554212 refreshContents();
....@@ -4304,7 +4461,7 @@
43044461 refreshContents();
43054462 }
43064463
4307
- void pasteInto(boolean copyit)
4464
+ void pasteInto(boolean copyit, boolean clone)
43084465 {
43094466 // if (GrafreeD.clipboard == null)
43104467 // return;
....@@ -4333,7 +4490,14 @@
43334490 if (copyit)
43344491 {
43354492 // paste(false);
4336
- CloneClipboard(false); // sept 2014
4493
+ if (clone)
4494
+ {
4495
+ CloneClipboard(false); // sept 2014
4496
+ }
4497
+ else
4498
+ {
4499
+ paste(false);
4500
+ }
43374501 }
43384502 else
43394503 {
....@@ -4877,10 +5041,12 @@
48775041 cButton flashSelectionButton;
48785042 cButton editButton;
48795043 cButton uneditButton;
5044
+ JCheckBox allParamsButton;
48805045 cButton clearpanelButton;
4881
- cButton allParamsButton;
48825046 cButton unselectButton;
48835047
5048
+ cButton oneStepButton;
5049
+
48845050 cButton screenfitButton;
48855051 cButton screenfitpointButton;
48865052 cButton snapobjectButton;
....@@ -4935,6 +5101,7 @@
49355101 private MenuItem mergeGeometriesItem;
49365102 private MenuItem copyItem;
49375103 private MenuItem pasteItem;
5104
+ private MenuItem pasteIntoItem;
49385105 private MenuItem pasteLinkItem;
49395106 private MenuItem pasteCloneItem;
49405107 private MenuItem pasteExpandItem;
....@@ -5007,6 +5174,7 @@
50075174
50085175 private MenuItem resetParentItem;
50095176 private MenuItem repairParentItem;
5177
+ private MenuItem repairShadowItem;
50105178 private MenuItem sortbysizeItem;
50115179 private MenuItem sortbynameItem;
50125180
....@@ -5031,7 +5199,7 @@
50315199 private MenuItem blobItem;
50325200 private MenuItem latheItem;
50335201 private MenuItem bezierItem;
5034
- private MenuItem checkerItem;
5202
+ private MenuItem overlayItem;
50355203 private MenuItem meshItem;
50365204 // private MenuItem meshGroupItem;
50375205 private MenuItem springItem;