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,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 {
....@@ -867,7 +940,9 @@
867940 // objEditor.DropFile((java.io.File[]) object, true);
868941 // return;
869942 // }
870
- if (string.charAt(0) == '/')
943
+
944
+ // File path for Mac and Windows
945
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
871946 {
872947 // file(s)
873948 String[] names = string.split("\n");
....@@ -894,7 +969,7 @@
894969
895970 flashIt = false;
896971 CameraPane pane = (CameraPane) target;
897
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
972
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
898973 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
899974
900975 if (group.selection.size() == 1)
....@@ -921,11 +996,11 @@
921996 {
922997 loadClipboard(true);
923998 objEditor.jTree.setSelectionPath(destinationPath);
924
- pasteInto(false);
999
+ pasteInto(false, false);
9251000 } else {
9261001 loadClipboard(false);
9271002 objEditor.jTree.setSelectionPath(destinationPath);
928
- pasteInto(false); // true); // ???
1003
+ pasteInto(false, false); // true); // ???
9291004 }
9301005 }
9311006 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1047,27 +1122,33 @@
10471122 kleinItem.addActionListener(this);
10481123 particleItem = menu.add(new MenuItem("Particle system"));
10491124 particleItem.addActionListener(this);
1125
+ if (Globals.ADVANCED)
1126
+ {
10501127 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10511128 ragdollItem.addActionListener(this);
10521129 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10531130 ragdoll2Item.addActionListener(this);
1131
+ }
10541132 menu.add("-");
1055
- meshItem = menu.add(new MenuItem("Mesh"));
1133
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10561134 meshItem.addActionListener(this);
10571135 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10581136 // meshGroupItem.addActionListener(this);
1137
+ if (Globals.ADVANCED)
1138
+ {
10591139 springItem = menu.add(new MenuItem("Spring"));
10601140 springItem.addActionListener(this);
10611141 flagItem = menu.add(new MenuItem("Flag"));
10621142 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);
10671143 blobItem = menu.add(new MenuItem("Blob"));
10681144 blobItem.addActionListener(this);
10691145 latheItem = menu.add(new MenuItem("Lathe"));
10701146 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);
10711152 lightItem = menu.add(new MenuItem("Light"));
10721153 lightItem.addActionListener(this);
10731154 menu.add("-");
....@@ -1077,34 +1158,39 @@
10771158 loopItem.addActionListener(this);
10781159 doubleItem = menu.add(new MenuItem("Fork"));
10791160 doubleItem.addActionListener(this);
1161
+ if (Globals.ADVANCED)
1162
+ {
10801163 tripleItem = menu.add(new MenuItem("Trident"));
10811164 tripleItem.addActionListener(this);
1165
+ }
10821166 }
10831167
10841168 void buildToolsMenu(Menu menu)
10851169 {
10861170 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10871171 animationItem.addItemListener(this);
1088
- animationItem.setState(CameraPane.ANIMATION);
1172
+ animationItem.setState(Globals.ANIMATION);
10891173
10901174 menu.add("-");
10911175 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
10921176 parseverticesItem.addActionListener(this);
10931177 textureFieldItem = menu.add(new MenuItem("Texture Field"));
10941178 textureFieldItem.addActionListener(this);
1095
- alignItem = menu.add(new MenuItem("Align"));
1179
+ alignItem = menu.add(new MenuItem("Align Objects"));
10961180 alignItem.addActionListener(this);
1097
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1098
- mirrorItem.addActionListener(this);
10991181 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11001182 reduceMorphItem.addActionListener(this);
11011183 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11021184 reduce34MorphItem.addActionListener(this);
1103
-
1185
+ menu.add("-");
11041186 menu.add(computeAOItem = new MenuItem("Compute AO"));
11051187 computeAOItem.addActionListener(this);
1106
- menu.add("-");
11071188
1189
+ if (Globals.ADVANCED)
1190
+ {
1191
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1192
+ mirrorItem.addActionListener(this);
1193
+ menu.add("-");
11081194 menu.add(memoryItem = new MenuItem("Memory Usage"));
11091195 memoryItem.addActionListener(this);
11101196 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1118,6 +1204,8 @@
11181204 resetParentItem.addActionListener(this);
11191205 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11201206 repairParentItem.addActionListener(this);
1207
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1208
+ repairShadowItem.addActionListener(this);
11211209 menu.add(invariantsItem = new MenuItem("Invariants"));
11221210 invariantsItem.addActionListener(this);
11231211 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1125,6 +1213,7 @@
11251213 menu.add("-");
11261214 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11271215 editScriptItem.addActionListener(this);
1216
+ }
11281217 }
11291218
11301219 void ScreenFit()
....@@ -1478,6 +1567,7 @@
14781567 //
14791568 public void actionPerformed(ActionEvent event) // , Object arg)
14801569 {
1570
+ Object source = event.getSource();
14811571 /*
14821572 if (event.getSource() == nameField)
14831573 {
....@@ -1489,11 +1579,11 @@
14891579 }
14901580 else
14911581 */
1492
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1582
+ if (source == lookAtItem || source == lookFromItem)
14931583 {
14941584 ScreenFit();
14951585 } else
1496
- if (event.getSource() == switchItem)
1586
+ if (source == switchItem)
14971587 {
14981588 cVector v1 = new cVector();
14991589 cVector v2 = new cVector();
....@@ -1502,11 +1592,11 @@
15021592 objEditor.cameraView.renderCamera.setAim(v2, v1);
15031593 objEditor.cameraView.repaint();
15041594 } else
1505
- if (event.getSource() == rectoidItem)
1595
+ if (source == rectoidItem)
15061596 {
15071597 makeSomething(new Box());
15081598 } else
1509
- if (event.getSource() == particleItem)
1599
+ if (source == particleItem)
15101600 {
15111601 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15121602 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1527,9 +1617,9 @@
15271617 applyExample(particleGeom, "SMOKE");
15281618 makeSomething(particleGeom);
15291619 } else
1530
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1620
+ if (source == ragdollItem || source == ragdoll2Item)
15311621 {
1532
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1622
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15331623
15341624 ragdoll.toParent = LA.newMatrix();
15351625 ragdoll.fromParent = LA.newMatrix();
....@@ -1547,7 +1637,7 @@
15471637 } else
15481638 /*
15491639 */
1550
- if (event.getSource() == heightFieldItem)
1640
+ if (source == heightFieldItem)
15511641 {
15521642 Object3D obj = new Object3D();
15531643
....@@ -1585,31 +1675,31 @@
15851675
15861676 makeSomething(obj);
15871677 } else
1588
- if (event.getSource() == gridItem)
1678
+ if (source == gridItem)
15891679 {
15901680 makeSomething(new Grid());
15911681 } else
1592
- if (event.getSource() == ellipsoidItem)
1682
+ if (source == ellipsoidItem)
15931683 {
15941684 makeSomething(new Sphere());
15951685 } else
1596
- if (event.getSource() == coneItem)
1686
+ if (source == coneItem)
15971687 {
15981688 makeSomething(new Cone());
15991689 } else
1600
- if (event.getSource() == torusItem)
1690
+ if (source == torusItem)
16011691 {
16021692 makeSomething(new Torus());
16031693 } else
1604
- if (event.getSource() == superItem)
1694
+ if (source == superItem)
16051695 {
16061696 makeSomething(new Superellipsoid());
16071697 } else
1608
- if (event.getSource() == kleinItem)
1698
+ if (source == kleinItem)
16091699 {
16101700 makeSomething(new Klein());
16111701 } else
1612
- if (event.getSource() == blobItem)
1702
+ if (source == blobItem)
16131703 {
16141704 Blob blob = new Blob();
16151705 BlobComponent comp = new BlobComponent();
....@@ -1617,15 +1707,15 @@
16171707 //blob.retile();
16181708 makeSomething(blob);
16191709 } else
1620
- if (event.getSource() == latheItem)
1710
+ if (source == latheItem)
16211711 {
16221712 makeSomething(new Lathe());
16231713 } else
1624
- if (event.getSource() == bezierItem)
1714
+ if (source == bezierItem)
16251715 {
16261716 makeSomething(new BezierSurface());
16271717 } else
1628
- if (event.getSource() == checkerItem)
1718
+ if (source == overlayItem)
16291719 {
16301720 /*
16311721 Object3D obj = new BezierSurface(5,8);
....@@ -1640,7 +1730,7 @@
16401730 */
16411731 makeSomething(new Checker());
16421732 } else
1643
- if (event.getSource() == meshItem)
1733
+ if (source == meshItem)
16441734 {
16451735 Object3D itemtomake = new Object3D();
16461736 Object3D child;
....@@ -1661,35 +1751,35 @@
16611751 makeSomething(child);
16621752 }
16631753 } else
1664
- if (event.getSource() == springItem)
1754
+ if (source == springItem)
16651755 {
16661756 cSpring s = new cSpring();
16671757 s.setup();
16681758 makeSomething(s);
16691759 } else
1670
- if (event.getSource() == flagItem)
1760
+ if (source == flagItem)
16711761 {
16721762 cSpring s = new cFlag();
16731763 s.setup();
16741764 makeSomething(s);
16751765 } else
1676
- if (event.getSource() == lightItem)
1766
+ if (source == lightItem)
16771767 {
16781768 makeSomething(new Light());
16791769 } else
1680
- if (event.getSource() == csgItem)
1770
+ if (source == csgItem)
16811771 {
16821772 group(new CSG());
16831773 } else
1684
- if (event.getSource() == templateItem)
1774
+ if (source == templateItem)
16851775 {
16861776 group(new cTemplate());
16871777 } else
1688
- if (event.getSource() == attributeItem)
1778
+ if (source == attributeItem)
16891779 {
16901780 makeSomething(new Attribute());
16911781 } else
1692
- if (event.getSource() == pointflowItem)
1782
+ if (source == pointflowItem)
16931783 {
16941784 makeSomething(new PointFlow());
16951785 } else
....@@ -1701,7 +1791,7 @@
17011791 } else
17021792 */
17031793
1704
- if (event.getSource() == superLoopItem)
1794
+ if (source == superLoopItem)
17051795 {
17061796 Composite g = new cGroup();
17071797 for (int i=0; i<15; i++)
....@@ -1723,7 +1813,7 @@
17231813
17241814 group(g);
17251815 } else
1726
- if (event.getSource() == loopItem)
1816
+ if (source == loopItem)
17271817 {
17281818 Composite csg = new GroupLeaf();
17291819 csg.count = 5;
....@@ -1732,7 +1822,7 @@
17321822 csg.addChild(child);
17331823 child.addChild(csg);
17341824 } else
1735
- if (event.getSource() == doubleItem)
1825
+ if (source == doubleItem)
17361826 {
17371827 Composite csg = new GroupLeaf();
17381828 csg.count = 5;
....@@ -1744,7 +1834,7 @@
17441834 csg.addChild(child);
17451835 child.addChild(csg);
17461836 } else
1747
- if (event.getSource() == tripleItem)
1837
+ if (source == tripleItem)
17481838 {
17491839 Composite csg = new GroupLeaf();
17501840 csg.count = 4;
....@@ -1760,70 +1850,83 @@
17601850 child.addChild(csg);
17611851 } else
17621852
1763
- if (event.getSource() == importGFDItem)
1853
+ if (source == importGFDItem)
17641854 {
17651855 ImportGFD();
17661856 } else
1767
- if (event.getSource() == importVRMLX3DItem)
1857
+ if (source == importVRMLX3DItem)
17681858 {
17691859 ImportVRMLX3D();
17701860 } else
1771
- if (event.getSource() == import3DSItem)
1861
+ if (source == import3DSItem)
17721862 {
17731863 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17741864 } else
1775
- if (event.getSource() == importOBJItem)
1865
+ if (source == importOBJItem)
17761866 {
1777
- 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
+ }
17781876 } else
1779
- if (event.getSource() == computeAOItem)
1877
+ if (source == computeAOItem)
17801878 {
1781
- CameraPane.drawMode = CameraPane.OCCLUSION;
1782
- CameraPane.theRenderer.repaint();
1879
+ Globals.drawMode = CameraPane.OCCLUSION;
1880
+ Globals.theRenderer.repaint();
17831881 } else
1784
- if (event.getSource() == recompileItem)
1882
+ if (source == recompileItem)
17851883 {
17861884 Recompile();
17871885 refreshContents();
17881886 } else
1789
- if (event.getSource() == editScriptItem)
1887
+ if (source == editScriptItem)
17901888 {
17911889 OpenDialog();
17921890 refreshContents();
17931891 } else
1794
- if (event.getSource() == invariantsItem)
1892
+ if (source == invariantsItem)
17951893 {
17961894 System.out.println("Invariants:");
17971895 GrafreeD.grafreeD.universe.invariants();
17981896 } else
1799
- if (event.getSource() == memoryItem)
1897
+ if (source == memoryItem)
18001898 {
18011899 //System.out.println("Invariants:");
18021900 PrintMemory();
18031901 } else
1804
- if (event.getSource() == pathItem)
1902
+ if (source == pathItem)
18051903 {
18061904 PrintPath();
18071905 } else
1808
- if (event.getSource() == analyzeItem)
1906
+ if (source == analyzeItem)
18091907 {
18101908 AnalyzeObject();
18111909 } else
1812
- if (event.getSource() == dumpItem)
1910
+ if (source == dumpItem)
18131911 {
18141912 DumpObject();
18151913 } else
1816
- if (event.getSource() == screenfitButton)
1914
+ if (source == oneStepButton)
1915
+ {
1916
+ Globals.ONESTEP = true;
1917
+ cameraView.repaint();
1918
+ } else
1919
+ if (source == screenfitButton)
18171920 {
18181921 //Reload(lastConverter, lastFilename, true);
18191922 ScreenFit();
18201923 } else
1821
- if (event.getSource() == screenfitpointButton)
1924
+ if (source == screenfitpointButton)
18221925 {
18231926 //Reload(lastConverter, lastFilename, true);
18241927 ScreenFitPoint();
18251928 } else
1826
- if (event.getSource() == snapobjectButton)
1929
+ if (source == snapobjectButton)
18271930 {
18281931 //Reload(lastConverter, lastFilename, true);
18291932 SnapObject();
....@@ -1834,13 +1937,13 @@
18341937 // Recompile();
18351938 // refreshContents();
18361939 // } else
1837
- if (event.getSource() == gcButton)
1940
+ if (source == gcButton)
18381941 {
18391942 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18401943 System.gc();
18411944 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18421945 } else
1843
- if (event.getSource() == editLeafItem)
1946
+ if (source == editLeafItem)
18441947 {
18451948 Object3D obj;
18461949 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1854,62 +1957,66 @@
18541957 }
18551958 refreshContents(true);
18561959 } else
1857
- if (event.getSource() == openWindowItem)
1960
+ if (source == openWindowItem)
18581961 {
18591962 EditSelection(true);
18601963 } else
1861
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1964
+ if (source == cutItem || source == clearButton)
18621965 {
18631966 loadClipboard(true);
18641967 } else
1865
- if (event.getSource() == duplicateItem)
1968
+ if (source == duplicateItem)
18661969 {
18671970 Object3D keep = GrafreeD.clipboard;
18681971 loadClipboard(false);
18691972 paste(false);
18701973 GrafreeD.clipboard = keep;
18711974 } else
1872
- if (event.getSource() == cloneItem)
1975
+ if (source == cloneItem)
18731976 {
18741977 CloneSelection(false);
18751978 } else
1876
- if (event.getSource() == cloneSupportItem)
1979
+ if (source == cloneSupportItem)
18771980 {
18781981 CloneSelection(true);
18791982 } else
1880
- if (event.getSource() == copyItem)
1983
+ if (source == copyItem)
18811984 {
18821985 loadClipboard(false);
18831986 } else
1884
- if (event.getSource() == pasteItem)
1987
+ if (source == pasteItem)
18851988 {
18861989 paste(false);
18871990 } else
1888
- if (event.getSource() == pasteLinkItem)
1991
+ if (source == pasteIntoItem)
18891992 {
1890
- pasteInto(false);
1993
+ pasteInto(true, false);
18911994 } else
1892
- if (event.getSource() == pasteCloneItem)
1995
+ if (source == pasteLinkItem)
18931996 {
1894
- pasteInto(true);
1997
+ pasteInto(false, false);
18951998 } else
1896
- if (event.getSource() == pasteExpandItem)
1999
+ if (source == pasteCloneItem)
2000
+ {
2001
+ pasteInto(true, true);
2002
+ } else
2003
+ if (source == pasteExpandItem)
18972004 {
18982005 paste(true);
18992006 } else
1900
- if (event.getSource() == synchronizeItem)
2007
+ if (source == synchronizeItem)
19012008 {
19022009 Overwrite(Object3D.TRANSFORM);
19032010 } else
1904
- if (event.getSource() == overwriteNameItem)
2011
+ if (source == overwriteNameItem)
19052012 {
19062013 Overwrite(Object3D.NAME);
19072014 } else
1908
- if (event.getSource() == overwriteUVItem)
2015
+ if (source == overwriteUVItem)
19092016 {
19102017 Overwrite(Object3D.UV);
19112018 } else
1912
- if (event.getSource() == overwriteMatItem)
2019
+ if (source == overwriteMatItem)
19132020 {
19142021 /* july 2015
19152022 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1929,7 +2036,7 @@
19292036
19302037 Overwrite(dropAttributes);
19312038 }
1932
- if (event.getSource() == overwriteGeoItem)
2039
+ if (source == overwriteGeoItem)
19332040 {
19342041 Overwrite(Object3D.GEOMETRY);
19352042 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1946,7 +2053,7 @@
19462053 // refreshContents();
19472054 // }
19482055 } else
1949
- if (event.getSource() == generateMeshItem)
2056
+ if (source == generateMeshItem)
19502057 {
19512058 //if (group.selection.size() == 1)
19522059 // for (int i=0; i<group.selection.size(); i++)
....@@ -1957,7 +2064,7 @@
19572064 ResetModel();
19582065 refreshContents();
19592066 } else
1960
- if (event.getSource() == extractGeometriesItem)
2067
+ if (source == extractGeometriesItem)
19612068 {
19622069 boolean one = false;
19632070
....@@ -1984,7 +2091,7 @@
19842091 ResetModel();
19852092 refreshContents();
19862093 } else
1987
- if (event.getSource() == cloneGeometriesItem)
2094
+ if (source == cloneGeometriesItem)
19882095 {
19892096 boolean one = false;
19902097
....@@ -2010,7 +2117,7 @@
20102117 ResetModel();
20112118 refreshContents();
20122119 } else
2013
- if (event.getSource() == shareGeometriesItem)
2120
+ if (source == shareGeometriesItem)
20142121 {
20152122 boolean one = false;
20162123
....@@ -2040,7 +2147,7 @@
20402147 refreshContents();
20412148 }
20422149 } else
2043
- if (event.getSource() == mergeGeometriesItem)
2150
+ if (source == mergeGeometriesItem)
20442151 {
20452152 boolean one = false;
20462153
....@@ -2070,7 +2177,7 @@
20702177 ResetModel();
20712178 refreshContents();
20722179 } else
2073
- if (event.getSource() == linkverticesItem)
2180
+ if (source == linkverticesItem)
20742181 {
20752182 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20762183 // {
....@@ -2090,41 +2197,41 @@
20902197 if (content instanceof cGroup && ((cGroup)content).transientlink )
20912198 content = ((cGroup)content).get(0);
20922199
2093
- 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));
20942201 for (int i=0; i<group.selection.size(); i++)
20952202 {
2096
- boolean random = CameraPane.RANDOM;
2097
- CameraPane.RANDOM = false; // parse all random nodes
2203
+ boolean random = CameraPane.SWITCH;
2204
+ CameraPane.SWITCH = false; // parse all random nodes
20982205 group.selection.get(i).linkVerticesThis(content);
20992206 // group.selection.get(i).setMasterThis(content); // should be identity
2100
- CameraPane.RANDOM = random;
2207
+ CameraPane.SWITCH = random;
21012208 }
2102
- 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));
21032210 refreshContents();
21042211 }
21052212 } else
2106
- if (event.getSource() == resetsupportItem)
2213
+ if (source == resetsupportItem)
21072214 {
21082215 for (int i=0; i<group.selection.size(); i++)
21092216 {
2110
- boolean random = CameraPane.RANDOM;
2111
- CameraPane.RANDOM = false; // parse all random nodes
2217
+ boolean random = CameraPane.SWITCH;
2218
+ CameraPane.SWITCH = false; // parse all random nodes
21122219 group.selection.get(i).linkVerticesThis(null);
2113
- CameraPane.RANDOM = random;
2220
+ CameraPane.SWITCH = random;
21142221 }
21152222
21162223 refreshContents();
21172224 } else
2118
- if (event.getSource() == relinkverticesItem)
2225
+ if (source == relinkverticesItem)
21192226 {
2120
- boolean random = CameraPane.RANDOM;
2121
- CameraPane.RANDOM = false; // parse all random nodes
2227
+ boolean random = CameraPane.SWITCH;
2228
+ CameraPane.SWITCH = false; // parse all random nodes
21222229 group.selection.RelinkToSupport();
2123
- CameraPane.RANDOM = random;
2230
+ CameraPane.SWITCH = random;
21242231
21252232 refreshContents();
21262233 } else
2127
- if (event.getSource() == resetreferencesItem)
2234
+ if (source == resetreferencesItem)
21282235 {
21292236 for (int i=0; i<group.selection.size(); i++)
21302237 {
....@@ -2133,7 +2240,7 @@
21332240
21342241 refreshContents();
21352242 } else
2136
- if (event.getSource() == setMasterItem)
2243
+ if (source == setMasterItem)
21372244 {
21382245 if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21392246 {
....@@ -2146,7 +2253,7 @@
21462253 refreshContents();
21472254 }
21482255 } else
2149
- if (event.getSource() == poseMeshItem)
2256
+ if (source == poseMeshItem)
21502257 {
21512258 if (group.selection.size() == 1)
21522259 {
....@@ -2165,19 +2272,19 @@
21652272 }
21662273
21672274 } else
2168
- if (event.getSource() == revertMeshItem)
2275
+ if (source == revertMeshItem)
21692276 {
21702277 RevertMeshes();
21712278 } else
2172
- if (event.getSource() == resetMeshItem)
2279
+ if (source == resetMeshItem)
21732280 {
21742281 ResetAll();
21752282 } else
2176
- if (event.getSource() == stepAllItem)
2283
+ if (source == stepAllItem)
21772284 {
21782285 StepAll();
21792286 } else
2180
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2287
+ if (source == clearItem) // || event.getSource() == clearButton)
21812288 {
21822289 //int indices[] = jList.getSelectedIndices();
21832290 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2185,46 +2292,46 @@
21852292
21862293 ClearSelection(false);
21872294 } else
2188
- if (event.getSource() == clearAllItem)
2295
+ if (source == clearAllItem)
21892296 {
21902297 ClearSelection(true);
21912298 } else
2192
- if (event.getSource() == grabItem)
2299
+ if (source == grabItem)
21932300 {
21942301 group(new cGroup(), true);
21952302 } else
2196
- if (event.getSource() == hideItem)
2303
+ if (source == hideItem)
21972304 {
21982305 group(new HiddenObject());
21992306 } else
2200
- if (event.getSource() == frontItem)
2307
+ if (source == frontItem)
22012308 {
22022309 front();
22032310 } else
2204
- if (event.getSource() == backItem)
2311
+ if (source == backItem)
22052312 {
22062313 back();
22072314 } else
2208
- if (event.getSource() == cameraItem)
2315
+ if (source == cameraItem)
22092316 {
22102317 makeSomething(new Camera());
22112318 } else
2212
- if (event.getSource() == compositeItem)
2319
+ if (source == compositeItem)
22132320 {
22142321 group(new Composite());
22152322 } else
2216
- if (event.getSource() == randomItem)
2323
+ if (source == randomItem)
22172324 {
22182325 RandomNode random = new RandomNode();
22192326 group(random);
22202327 if (random.size() > 0)
2221
- random.name = random.get(0).name + "Rnd";
2328
+ random.name = random.get(0).name + "Switch";
22222329 } else
2223
- if (event.getSource() == physicsItem)
2330
+ if (source == physicsItem)
22242331 {
22252332 group(new PhysicsNode());
22262333 } else
2227
- if (event.getSource() == frameselectorItem)
2334
+ if (source == frameselectorItem)
22282335 {
22292336 for (int i=0; i<group.selection.size(); i++)
22302337 {
....@@ -2236,7 +2343,7 @@
22362343 ResetModel();
22372344 refreshContents();
22382345 } else
2239
- if (event.getSource() == switchGeoItem)
2346
+ if (source == switchGeoItem)
22402347 {
22412348 for (int i=0; i<group.selection.size(); i++)
22422349 {
....@@ -2248,7 +2355,7 @@
22482355 ResetModel();
22492356 refreshContents();
22502357 } else
2251
- if (event.getSource() == switchTransfoItem)
2358
+ if (source == switchTransfoItem)
22522359 {
22532360 for (int i=0; i<group.selection.size(); i++)
22542361 {
....@@ -2260,7 +2367,7 @@
22602367 ResetModel();
22612368 refreshContents();
22622369 } else
2263
- if (event.getSource() == morphItem)
2370
+ if (source == morphItem)
22642371 {
22652372 for (int i=0; i<group.selection.size(); i++)
22662373 {
....@@ -2272,7 +2379,7 @@
22722379 ResetModel();
22732380 refreshContents();
22742381 } else
2275
- if (event.getSource() == scriptNodeItem)
2382
+ if (source == scriptNodeItem)
22762383 {
22772384 boolean atleastone = false;
22782385
....@@ -2311,31 +2418,31 @@
23112418 }
23122419 }
23132420 } else
2314
- if (event.getSource() == linkerItem)
2421
+ if (source == linkerItem)
23152422 {
23162423 group(new cLinker());
23172424 } else
2318
- if (event.getSource() == textureItem)
2425
+ if (source == textureItem)
23192426 {
23202427 group(new TextureNode());
23212428 } else
2322
- if (event.getSource() == billboardItem)
2429
+ if (source == billboardItem)
23232430 {
23242431 group(new BillboardNode());
23252432 } else
2326
- if (event.getSource() == shadowXItem)
2433
+ if (source == shadowXItem)
23272434 {
23282435 CastShadow(0);
23292436 } else
2330
- if (event.getSource() == shadowYItem)
2437
+ if (source == shadowYItem)
23312438 {
23322439 CastShadow(1);
23332440 } else
2334
- if (event.getSource() == shadowZItem)
2441
+ if (source == shadowZItem)
23352442 {
23362443 CastShadow(2);
23372444 } else
2338
- if (event.getSource() == ungroupItem)
2445
+ if (source == ungroupItem)
23392446 {
23402447 //ungroup();
23412448 for (int i=0; i<group.selection.size(); i++)
....@@ -2347,179 +2454,179 @@
23472454
23482455 refreshContents();
23492456 } else
2350
- if (event.getSource() == genUVItem)
2457
+ if (source == genUVItem)
23512458 {
23522459 GenUV();
23532460 } else
2354
- if (event.getSource() == genNormalsCADItem)
2461
+ if (source == genNormalsCADItem)
23552462 {
23562463 GenNormals(true);
23572464 } else
2358
- if (event.getSource() == genNormalsMESHItem)
2465
+ if (source == genNormalsMESHItem)
23592466 {
23602467 GenNormals(true); // TODO
23612468 } else
2362
- if (event.getSource() == genNormalsORGANItem)
2469
+ if (source == genNormalsORGANItem)
23632470 {
23642471 GenNormals(false);
23652472 } else
2366
- if (event.getSource() == genNormalsMINEItem)
2473
+ if (source == genNormalsMINEItem)
23672474 {
23682475 GenNormalsMINE();
23692476 } else
2370
- if (event.getSource() == stripifyItem)
2477
+ if (source == stripifyItem)
23712478 {
23722479 Stripify();
23732480 } else
2374
- if (event.getSource() == unstripifyItem)
2481
+ if (source == unstripifyItem)
23752482 {
23762483 Unstripify();
23772484 } else
2378
- if (event.getSource() == trimItem)
2485
+ if (source == trimItem)
23792486 {
23802487 Trim();
23812488 } else
2382
- if (event.getSource() == untrimItem)
2489
+ if (source == untrimItem)
23832490 {
23842491 Untrim();
23852492 } else
2386
- if (event.getSource() == clearColorsItem)
2493
+ if (source == clearColorsItem)
23872494 {
23882495 ClearColors();
23892496 } else
2390
- if (event.getSource() == clearMaterialsItem)
2497
+ if (source == clearMaterialsItem)
23912498 {
23922499 ClearMaterials();
23932500 } else
2394
- if (event.getSource() == liveleavesItem)
2501
+ if (source == liveleavesItem)
23952502 {
23962503 LiveLeaves(true);
23972504 } else
2398
- if (event.getSource() == unliveleavesItem)
2505
+ if (source == unliveleavesItem)
23992506 {
24002507 LiveLeaves(false);
24012508 } else
2402
- if (event.getSource() == supportleavesItem)
2509
+ if (source == supportleavesItem)
24032510 {
24042511 SupportLeaves(true);
24052512 } else
2406
- if (event.getSource() == unsupportleavesItem)
2513
+ if (source == unsupportleavesItem)
24072514 {
24082515 SupportLeaves(false);
24092516 } else
2410
- if (event.getSource() == hideleavesItem)
2517
+ if (source == hideleavesItem)
24112518 {
24122519 HideLeaves(true);
24132520 } else
2414
- if (event.getSource() == showleavesItem)
2521
+ if (source == showleavesItem)
24152522 {
24162523 HideLeaves(false);
24172524 } else
2418
- if (event.getSource() == markleavesItem)
2525
+ if (source == markleavesItem)
24192526 {
24202527 MarkLeaves(true);
24212528 } else
2422
- if (event.getSource() == unmarkleavesItem)
2529
+ if (source == unmarkleavesItem)
24232530 {
24242531 MarkLeaves(false);
24252532 } else
2426
- if (event.getSource() == flipVItem)
2533
+ if (source == flipVItem)
24272534 {
24282535 FlipV(true);
24292536 } else
2430
- if (event.getSource() == unflipVItem)
2537
+ if (source == unflipVItem)
24312538 {
24322539 FlipV(false);
24332540 } else
2434
- if (event.getSource() == lowTexturesItem)
2541
+ if (source == lowTexturesItem)
24352542 {
24362543 SetTexRes(0);
24372544 } else
2438
- if (event.getSource() == normalTexturesItem)
2545
+ if (source == normalTexturesItem)
24392546 {
24402547 SetTexRes(1);
24412548 } else
2442
- if (event.getSource() == highTexturesItem)
2549
+ if (source == highTexturesItem)
24432550 {
24442551 SetTexRes(2);
24452552 } else
2446
- if (event.getSource() == veryhighTexturesItem)
2553
+ if (source == veryhighTexturesItem)
24472554 {
24482555 SetTexRes(3);
24492556 } else
2450
- if (event.getSource() == maxTexturesItem)
2557
+ if (source == maxTexturesItem)
24512558 {
24522559 SetTexRes(4);
24532560 } else
2454
- if (event.getSource() == panoTexturesItem)
2561
+ if (source == panoTexturesItem)
24552562 {
24562563 SetTexRes(5);
24572564 } else
2458
- if (event.getSource() == reverseNormalsItem)
2565
+ if (source == reverseNormalsItem)
24592566 {
24602567 ReverseNormals();
24612568 } else
2462
- if (event.getSource() == parseverticesItem)
2569
+ if (source == parseverticesItem)
24632570 {
24642571 ParseVertices();
24652572 } else
2466
- if (event.getSource() == textureFieldItem)
2573
+ if (source == textureFieldItem)
24672574 {
24682575 TextureVertices();
24692576 } else
2470
- if (event.getSource() == alignItem)
2577
+ if (source == alignItem)
24712578 {
24722579 Align();
24732580 } else
2474
- if (event.getSource() == mirrorItem)
2581
+ if (source == mirrorItem)
24752582 {
24762583 MirrorPoses();
24772584 } else
2478
- if (event.getSource() == reduceMorphItem)
2585
+ if (source == reduceMorphItem)
24792586 {
24802587 MeshReduction(false);
24812588 } else
2482
- if (event.getSource() == reduce34MorphItem)
2589
+ if (source == reduce34MorphItem)
24832590 {
24842591 MeshReduction(true);
24852592 } else
2486
- if (event.getSource() == reverseTrianglesItem)
2593
+ if (source == reverseTrianglesItem)
24872594 {
24882595 ReverseTriangles();
24892596 } else
2490
- if (event.getSource() == reduceMeshItem)
2597
+ if (source == reduceMeshItem)
24912598 {
24922599 ReduceMesh(false);
24932600 } else
2494
- if (event.getSource() == reduce34MeshItem)
2601
+ if (source == reduce34MeshItem)
24952602 {
24962603 ReduceMesh(true);
24972604 } else
2498
- if (event.getSource() == increaseMeshItem)
2605
+ if (source == increaseMeshItem)
24992606 {
25002607 IncreaseMesh();
25012608 } else
2502
- if (event.getSource() == clipMeshItem)
2609
+ if (source == clipMeshItem)
25032610 {
25042611 ClipMesh();
25052612 } else
2506
- if (event.getSource() == smoothMeshItem)
2613
+ if (source == smoothMeshItem)
25072614 {
25082615 SmoothMesh();
25092616 } else
2510
- if (event.getSource() == transformgeometryItem)
2617
+ if (source == transformgeometryItem)
25112618 {
25122619 TransformGeometry();
25132620 } else
2514
- if (event.getSource() == resetTransformItem)
2621
+ if (source == resetTransformItem)
25152622 {
25162623 ResetTransform();
25172624 } else
2518
- if (event.getSource() == resetCentroidItem)
2625
+ if (source == resetCentroidItem)
25192626 {
25202627 ResetCentroid();
25212628 } else
2522
- if (event.getSource() == resetParentItem)
2629
+ if (source == resetParentItem)
25232630 {
25242631 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25252632 {
....@@ -2529,7 +2636,7 @@
25292636
25302637 refreshContents();
25312638 } else
2532
- if (event.getSource() == repairParentItem)
2639
+ if (source == repairParentItem)
25332640 {
25342641 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25352642 {
....@@ -2543,7 +2650,21 @@
25432650
25442651 refreshContents();
25452652 } else
2546
- 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)
25472668 {
25482669 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25492670 {
....@@ -2555,7 +2676,7 @@
25552676 ResetModel();
25562677 refreshContents();
25572678 } else
2558
- if (event.getSource() == sortbynameItem)
2679
+ if (source == sortbynameItem)
25592680 {
25602681 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25612682 {
....@@ -2567,7 +2688,7 @@
25672688 ResetModel();
25682689 refreshContents();
25692690 } else
2570
- if (event.getSource() == attachPigmentItem)
2691
+ if (source == attachPigmentItem)
25712692 {
25722693 String texture = GetFile("Attach pigment");
25732694 Object3D obj;
....@@ -2579,7 +2700,7 @@
25792700
25802701 refreshContents();
25812702 } else
2582
- if (event.getSource() == detachPigmentItem)
2703
+ if (source == detachPigmentItem)
25832704 {
25842705 Object3D obj;
25852706 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2590,7 +2711,7 @@
25902711
25912712 refreshContents();
25922713 } else
2593
- if (event.getSource() == attachBumpItem)
2714
+ if (source == attachBumpItem)
25942715 {
25952716 String texture = GetFile("Attach bump");
25962717 Object3D obj;
....@@ -2602,7 +2723,7 @@
26022723
26032724 refreshContents();
26042725 } else
2605
- if (event.getSource() == detachBumpItem)
2726
+ if (source == detachBumpItem)
26062727 {
26072728 Object3D obj;
26082729 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2613,7 +2734,7 @@
26132734
26142735 refreshContents();
26152736 } else
2616
- if (event.getSource() == pigmentBumpItem)
2737
+ if (source == pigmentBumpItem)
26172738 {
26182739 Object3D obj;
26192740 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2624,158 +2745,195 @@
26242745
26252746 refreshContents();
26262747 } else
2627
- if (event.getSource() == flashSelectionButton)
2748
+ if (source == flashSelectionButton)
26282749 {
26292750 CameraPane.flash = true;
26302751 refreshContents();
26312752 } else
2632
- if (event.getSource() == oneButton)
2753
+ if (source == oneButton)
26332754 {
26342755 } else
2635
- if (event.getSource() == twoButton)
2756
+ if (source == twoButton)
26362757 {
26372758 radio.layout = twoButton;
26382759 // bug
26392760 //gridPanel.setDividerLocation(1.0);
26402761 //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();
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();
26652791 } else
2666
- if (event.getSource() == threeButton)
2792
+ if (source == threeButton)
26672793 {
26682794 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();
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();
26932827 } else
2694
- if (event.getSource() == fourButton)
2828
+ if (source == fourButton)
26952829 {
26962830 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();
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();
27212862 } else
2722
- if (event.getSource() == sixButton)
2863
+ if (source == sixButton)
27232864 {
27242865 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();
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();
27492898 } else
2750
- if (event.getSource() == sevenButton)
2899
+ if (source == sevenButton)
27512900 {
27522901 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();
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();
27772935 } else
2778
- if (event.getSource() == rootButton)
2936
+ if (source == rootButton)
27792937 {
27802938 Object3D obj;
27812939 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2787,7 +2945,7 @@
27872945
27882946 refreshContents(true);
27892947 } else
2790
- if (event.getSource() == closeButton)
2948
+ if (source == closeButton)
27912949 {
27922950 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27932951 cRadio ab;
....@@ -2808,11 +2966,11 @@
28082966 }
28092967 refreshContents(true);
28102968 } else
2811
- if (event.getSource() == editItem || event.getSource() == editButton)
2969
+ if (source == editItem || source == editButton)
28122970 {
28132971 EditSelection(false);
28142972 } else
2815
- if (event.getSource() == uneditButton)
2973
+ if (source == uneditButton)
28162974 {
28172975 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28182976 {
....@@ -2824,12 +2982,12 @@
28242982
28252983 child.editWindow = null; // ???????????
28262984 }
2827
- objEditor.ctrlPanel.revalidate();
2985
+ objEditor.ctrlPanel.FlushUI();
28282986 //objEditor.jTree.clearSelection();
28292987 //objEditor.ResetSliders();
28302988 refreshContents(true);
28312989 } else
2832
- if (event.getSource() == clearPanelButton)
2990
+ if (source == clearPanelButton)
28332991 {
28342992 assert(copy == group);
28352993 //copy.ClearUI();
....@@ -2840,7 +2998,7 @@
28402998 listUI.clear();
28412999 refreshContents(true);
28423000 } else
2843
- if (event.getSource() == allParamsButton)
3001
+ if (source == allParamsButton)
28443002 {
28453003 assert(copy == group);
28463004
....@@ -2861,19 +3019,19 @@
28613019
28623020 refreshContents(true);
28633021 } else
2864
- if (event.getSource() == unselectButton)
3022
+ if (source == unselectButton)
28653023 {
28663024 objEditor.jTree.clearSelection();
28673025 // ?? oct 2012 GrafreeD.clipboard.clear();
28683026 objEditor.ResetSliders();
28693027 refreshContents(true);
28703028 } else
2871
- if(event.getSource() instanceof cRadio)
3029
+ if(source instanceof cRadio)
28723030 {
28733031 group.parent = keepparent;
28743032 group.attributes = 0;
28753033 //group.editWindow = null;
2876
- /*cRadio*/ radio = (cRadio)event.getSource();
3034
+ /*cRadio*/ radio = (cRadio)source;
28773035 Object3D obj = radio.GetObject();
28783036 System.out.println("Edit " + obj);
28793037 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2893,7 +3051,7 @@
28933051 }
28943052
28953053 copy = group;
2896
- //CameraPane.theRenderer.object = group;
3054
+ //Globals.theRenderer.object = group;
28973055 if(!useclient)
28983056 {
28993057 cameraView.renderCamera = radio.camera;
....@@ -2902,7 +3060,8 @@
29023060 cameraView.cameras[cameraView.cameracount] = radio.camera;
29033061 cameraView.targetLookAt.set(radio.camera.lookAt);
29043062 cameraView.object = group;
2905
- cameraView.lighttouched = true;
3063
+ //cameraView.lighttouched = true;
3064
+ Globals.lighttouched = true;
29063065 topView.object = group;
29073066 frontView.object = group;
29083067 sideView.object = group;
....@@ -2938,7 +3097,7 @@
29383097 if (useclient)
29393098 {
29403099 cameraView.object = client;
2941
- cameraView.lighttouched = true;
3100
+ Globals.lighttouched = true;
29423101 //topView.object = client;
29433102 //frontView.object = client;
29443103 //sideView.object = client;
....@@ -2946,7 +3105,7 @@
29463105 else
29473106 {
29483107 cameraView.object = group;
2949
- cameraView.lighttouched = true;
3108
+ Globals.lighttouched = true;
29503109 //topView.object = group;
29513110 //frontView.object = group;
29523111 //sideView.object = group;
....@@ -3454,7 +3613,7 @@
34543613 String pigment = Object3D.GetPigment(tex);
34553614 //String bump = Object3D.GetBump(tex);
34563615
3457
- 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);
34583617
34593618 double s = v.s;
34603619
....@@ -3542,11 +3701,11 @@
35423701
35433702 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
35443703
3545
- boolean random = CameraPane.RANDOM;
3546
- CameraPane.RANDOM = false; // parse all random nodes
3704
+ boolean random = CameraPane.SWITCH;
3705
+ CameraPane.SWITCH = false; // parse all random nodes
35473706 lowres.linkVerticesThis(null);
35483707 lowres.linkVerticesThis(sn);
3549
- CameraPane.RANDOM = random;
3708
+ CameraPane.SWITCH = random;
35503709
35513710 System.err.flush();
35523711
....@@ -3755,7 +3914,7 @@
37553914 group.selection.RelinkToSupport(); // july 2014
37563915 System.out.println("DONE.");
37573916 refreshContents();
3758
- 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));
37593918 }
37603919
37613920 void ReduceMesh(boolean reduction34)
....@@ -4031,25 +4190,25 @@
40314190 System.err.println("info : " + child.GetPath());
40324191 }
40334192 }
4034
- else
4035
- {
4036
- objEditor.SetMaterial(group); // .GetMaterial());
4037
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4038
- System.err.println("info : " + group.GetPath());
4039
- }
4193
+// else
4194
+// {
4195
+// objEditor.SetMaterial(group); // .GetMaterial());
4196
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4197
+// System.err.println("info : " + group.GetPath());
4198
+// }
40404199
40414200 objEditor.SetText(); // jan 2014
40424201
4043
- 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))
40444203 CameraPane.flash = true;
40454204
40464205 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
40474206 // a camera
40484207 {
40494208 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;
4209
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4210
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4211
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
40534212 }
40544213
40554214 refreshContents();
....@@ -4304,7 +4463,7 @@
43044463 refreshContents();
43054464 }
43064465
4307
- void pasteInto(boolean copyit)
4466
+ void pasteInto(boolean copyit, boolean clone)
43084467 {
43094468 // if (GrafreeD.clipboard == null)
43104469 // return;
....@@ -4333,7 +4492,14 @@
43334492 if (copyit)
43344493 {
43354494 // paste(false);
4336
- CloneClipboard(false); // sept 2014
4495
+ if (clone)
4496
+ {
4497
+ CloneClipboard(false); // sept 2014
4498
+ }
4499
+ else
4500
+ {
4501
+ paste(false);
4502
+ }
43374503 }
43384504 else
43394505 {
....@@ -4877,10 +5043,12 @@
48775043 cButton flashSelectionButton;
48785044 cButton editButton;
48795045 cButton uneditButton;
5046
+ JCheckBox allParamsButton;
48805047 cButton clearpanelButton;
4881
- cButton allParamsButton;
48825048 cButton unselectButton;
48835049
5050
+ cButton oneStepButton;
5051
+
48845052 cButton screenfitButton;
48855053 cButton screenfitpointButton;
48865054 cButton snapobjectButton;
....@@ -4935,6 +5103,7 @@
49355103 private MenuItem mergeGeometriesItem;
49365104 private MenuItem copyItem;
49375105 private MenuItem pasteItem;
5106
+ private MenuItem pasteIntoItem;
49385107 private MenuItem pasteLinkItem;
49395108 private MenuItem pasteCloneItem;
49405109 private MenuItem pasteExpandItem;
....@@ -5007,6 +5176,7 @@
50075176
50085177 private MenuItem resetParentItem;
50095178 private MenuItem repairParentItem;
5179
+ private MenuItem repairShadowItem;
50105180 private MenuItem sortbysizeItem;
50115181 private MenuItem sortbynameItem;
50125182
....@@ -5031,7 +5201,7 @@
50315201 private MenuItem blobItem;
50325202 private MenuItem latheItem;
50335203 private MenuItem bezierItem;
5034
- private MenuItem checkerItem;
5204
+ private MenuItem overlayItem;
50355205 private MenuItem meshItem;
50365206 // private MenuItem meshGroupItem;
50375207 private MenuItem springItem;