.. | .. |
---|
12 | 12 | import com.jme.math.Vector3f; |
---|
13 | 13 | import com.jme.renderer.ColorRGBA; |
---|
14 | 14 | |
---|
| 15 | +import grafeme.ui.*; |
---|
15 | 16 | //import buoy.widget.BFileChooser; |
---|
16 | 17 | |
---|
17 | 18 | class GroupEditor extends ObjEditor implements //iParse, //iCallBack, |
---|
.. | .. |
---|
219 | 220 | resetsupportItem.addActionListener(this); |
---|
220 | 221 | linkverticesItem = menu.add(new MenuItem("Link to Support")); |
---|
221 | 222 | linkverticesItem.addActionListener(this); |
---|
| 223 | + relinkverticesItem = menu.add(new MenuItem("Re-link to Support")); |
---|
| 224 | + relinkverticesItem.addActionListener(this); |
---|
222 | 225 | setMasterItem = menu.add(new MenuItem("Set Master Mesh")); |
---|
223 | 226 | setMasterItem.addActionListener(this); |
---|
224 | 227 | |
---|
.. | .. |
---|
231 | 234 | frontItem.addActionListener(this); |
---|
232 | 235 | compositeItem = menu.add(new MenuItem("Composite")); |
---|
233 | 236 | compositeItem.addActionListener(this); |
---|
| 237 | + hideItem = menu.add(new MenuItem("Hide")); |
---|
| 238 | + hideItem.addActionListener(this); |
---|
| 239 | + ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
| 240 | + ungroupItem.addActionListener(this); |
---|
234 | 241 | menu.add("-"); |
---|
235 | 242 | randomItem = menu.add(new MenuItem("Random")); |
---|
236 | 243 | randomItem.addActionListener(this); |
---|
.. | .. |
---|
252 | 259 | oe.menuBar.add(menu = new Menu("Object")); |
---|
253 | 260 | textureItem = menu.add(new MenuItem("Texture")); |
---|
254 | 261 | textureItem.addActionListener(this); |
---|
| 262 | + billboardItem = menu.add(new MenuItem("Billboard")); |
---|
| 263 | + billboardItem.addActionListener(this); |
---|
255 | 264 | csgItem = menu.add(new MenuItem("CSG")); |
---|
256 | 265 | csgItem.addActionListener(this); |
---|
257 | 266 | shadowXItem = menu.add(new MenuItem("Shadow X")); |
---|
.. | .. |
---|
269 | 278 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
270 | 279 | pointflowItem.addActionListener(this); |
---|
271 | 280 | menu.add("-"); |
---|
272 | | - transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
273 | | - transformgeometryItem.addActionListener(this); |
---|
274 | 281 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
275 | 282 | resetTransformItem.addActionListener(this); |
---|
276 | 283 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
277 | 284 | resetCentroidItem.addActionListener(this); |
---|
278 | | - ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
279 | | - ungroupItem.addActionListener(this); |
---|
| 285 | + transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
| 286 | + transformgeometryItem.addActionListener(this); |
---|
280 | 287 | |
---|
281 | 288 | oe.menuBar.add(menu = new Menu("Geometry")); |
---|
282 | 289 | genUVItem = menu.add(new MenuItem("Generate UV")); |
---|
.. | .. |
---|
287 | 294 | genNormalsCADItem.addActionListener(this); |
---|
288 | 295 | genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals")); |
---|
289 | 296 | genNormalsMESHItem.addActionListener(this); |
---|
| 297 | + genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
| 298 | + genNormalsMINEItem.addActionListener(this); |
---|
290 | 299 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
291 | 300 | stripifyItem.addActionListener(this); |
---|
292 | 301 | unstripifyItem = menu.add(new MenuItem("Unstripify")); |
---|
.. | .. |
---|
425 | 434 | oe.radioPanel.add(dummyButton); |
---|
426 | 435 | oe.buttonGroup.add(dummyButton); |
---|
427 | 436 | */ |
---|
428 | | - aConstraints.gridy += 1; |
---|
429 | | - oe.aConstraints.gridwidth = 1; |
---|
430 | | - oe.aConstraints.gridx = 0; |
---|
| 437 | + //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
431 | 438 | |
---|
432 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints); |
---|
| 439 | + oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 440 | + liveCB.setToolTipText("Enabled animation"); |
---|
433 | 441 | liveCB.addItemListener(this); |
---|
434 | 442 | |
---|
435 | | - oe.aConstraints.gridx += 1; |
---|
436 | | - oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints); |
---|
437 | | - supportCB.addItemListener(this); |
---|
438 | | - |
---|
439 | | - // oe.aConstraints.gridx += 1; |
---|
440 | | - // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints); |
---|
441 | | - // localCB.addItemListener(this); |
---|
442 | | - |
---|
443 | | - oe.aConstraints.gridx += 1; |
---|
444 | | - oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints); |
---|
445 | | - crowdCB.addItemListener(this); |
---|
446 | | - |
---|
447 | | - oe.aConstraints.gridx += 1; |
---|
448 | | - oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints); |
---|
449 | | - smoothCB.addItemListener(this); |
---|
450 | | - |
---|
451 | | - oe.aConstraints.gridx += 1; |
---|
452 | | - oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints); |
---|
| 443 | + oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
| 444 | + fastCB.setToolTipText("Fast mode"); |
---|
453 | 445 | fastCB.addItemListener(this); |
---|
454 | | - oe.aConstraints.gridx += 1; |
---|
455 | | - oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints); |
---|
456 | | - slowCB.addItemListener(this); |
---|
457 | | - oe.aConstraints.gridx += 1; |
---|
458 | | - oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints); |
---|
459 | | - boxCB.addItemListener(this); |
---|
460 | | - |
---|
461 | | -// oe.aConstraints.gridx += 1; |
---|
462 | | -// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints); |
---|
463 | | -// speakerMocapCB.addItemListener(this); |
---|
464 | | - |
---|
465 | | - if (false) |
---|
466 | | - { |
---|
467 | | - // handled in scripts |
---|
468 | | - oe.aConstraints.gridx += 1; |
---|
469 | | - oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints); |
---|
470 | | - speakerCameraCB.addItemListener(this); |
---|
471 | | - |
---|
472 | | - oe.aConstraints.gridx += 1; |
---|
473 | | - oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints); |
---|
474 | | - speakerFocusCB.addItemListener(this); |
---|
475 | | - |
---|
476 | | - oe.aConstraints.gridx += 1; |
---|
477 | | - oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints); |
---|
478 | | - smoothfocusCB.addItemListener(this); |
---|
479 | | - } |
---|
480 | | - |
---|
481 | | -//oe.aConstraints.gridx += 1; |
---|
482 | | -//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints); |
---|
483 | | -// debugCB.addItemListener(this); |
---|
484 | | - |
---|
485 | | - oe.aConstraints.gridx += 1; |
---|
486 | | - oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints); |
---|
487 | | - oeilCB.addItemListener(this); |
---|
488 | | - |
---|
489 | | - oe.aConstraints.gridx += 1; |
---|
490 | | - oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints); |
---|
491 | | - lookAtCB.addItemListener(this); |
---|
492 | | - |
---|
493 | | - oe.aConstraints.gridx += 1; |
---|
494 | | - oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints); |
---|
| 446 | + |
---|
| 447 | + oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 448 | + trackCB.setToolTipText("Enable tracking"); |
---|
495 | 449 | trackCB.addItemListener(this); |
---|
496 | 450 | |
---|
497 | | - oe.aConstraints.gridx += 1; |
---|
498 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints); |
---|
| 451 | + oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 452 | + screenfitButton.setToolTipText("Screen fit"); |
---|
499 | 453 | screenfitButton.addActionListener(this); |
---|
500 | | - oe.aConstraints.gridx += 1; |
---|
| 454 | + |
---|
501 | 455 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
502 | 456 | // screenfitpointButton.addActionListener(this); |
---|
503 | 457 | // oe.aConstraints.gridx += 1; |
---|
504 | | - oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints); |
---|
| 458 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
505 | 459 | snapobjectButton.addActionListener(this); |
---|
| 460 | + snapobjectButton.setToolTipText("Snap Object"); |
---|
506 | 461 | oe.aConstraints.gridx += 1; |
---|
507 | 462 | |
---|
508 | 463 | //aConstraints.gridx = 0; |
---|
.. | .. |
---|
510 | 465 | oe.aConstraints.weighty = 0; |
---|
511 | 466 | oe.aConstraints.gridwidth = 1; |
---|
512 | 467 | |
---|
513 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints); |
---|
| 468 | + oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 469 | + flashSelectionButton.setToolTipText("Show selection"); |
---|
514 | 470 | flashSelectionButton.addActionListener(this); |
---|
515 | | - oe.aConstraints.gridx += 1; |
---|
516 | | - oe.aConstraints.weighty = 0; |
---|
517 | | - oe.aConstraints.gridwidth = 1; |
---|
518 | 471 | |
---|
519 | | - // |
---|
520 | | - oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints); |
---|
| 472 | + oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
| 473 | + |
---|
| 474 | + oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 475 | + twoButton.setToolTipText("Show center view only"); |
---|
521 | 476 | twoButton.addActionListener(this); |
---|
522 | | - oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints); |
---|
| 477 | + oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
523 | 478 | fourButton.addActionListener(this); |
---|
524 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints); |
---|
| 479 | + fourButton.setToolTipText("Show left panel only"); |
---|
| 480 | + oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 481 | + sixButton.setToolTipText("2-column layout left"); |
---|
525 | 482 | sixButton.addActionListener(this); |
---|
526 | | - oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints); |
---|
| 483 | + oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 484 | + threeButton.setToolTipText("2-column layout right"); |
---|
527 | 485 | threeButton.addActionListener(this); |
---|
528 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints); |
---|
| 486 | + oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 487 | + sevenButton.setToolTipText("3-column layout"); |
---|
529 | 488 | sevenButton.addActionListener(this); |
---|
530 | 489 | // |
---|
531 | 490 | |
---|
532 | | - oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints); |
---|
| 491 | + oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 492 | + rootButton.setToolTipText("Edit selection in new tab"); |
---|
533 | 493 | rootButton.addActionListener(this); |
---|
534 | | - oe.aConstraints.gridx += 1; |
---|
535 | | - oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints); |
---|
| 494 | + |
---|
| 495 | + oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 496 | + closeButton.setToolTipText("Close tab"); |
---|
536 | 497 | closeButton.addActionListener(this); |
---|
537 | 498 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
538 | 499 | //clearButton.addActionListener(this); |
---|
539 | | - oe.aConstraints.gridx += 1; |
---|
540 | 500 | |
---|
541 | | - oe.aConstraints.gridx = 1; // |
---|
542 | | - oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints); |
---|
| 501 | + cGridBag commandsPanel = new cGridBag(); |
---|
| 502 | + |
---|
| 503 | + commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 504 | + editButton.setToolTipText("Edit selection"); |
---|
543 | 505 | editButton.addActionListener(this); |
---|
544 | | - oe.aConstraints.gridx += 1; |
---|
545 | | - oe.aConstraints.weighty = 0; |
---|
546 | | - oe.aConstraints.gridwidth = 1; |
---|
547 | 506 | |
---|
548 | | - oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints); |
---|
| 507 | + commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 508 | + uneditButton.setToolTipText("Unedit selection"); |
---|
549 | 509 | uneditButton.addActionListener(this); |
---|
550 | 510 | |
---|
551 | | - oe.aConstraints.gridx += 1; |
---|
552 | | - oe.aConstraints.weighty = 0; |
---|
553 | | - oe.aConstraints.gridwidth = 1; |
---|
554 | | - |
---|
555 | | - oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints); |
---|
| 511 | + commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 512 | + clearPanelButton.setToolTipText("Clear edit panel"); |
---|
556 | 513 | clearPanelButton.addActionListener(this); |
---|
557 | 514 | |
---|
558 | | - oe.aConstraints.gridx += 1; |
---|
559 | | - oe.aConstraints.weighty = 0; |
---|
560 | | - oe.aConstraints.gridwidth = 1; |
---|
561 | | - |
---|
562 | | - oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints); |
---|
| 515 | + commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 516 | + allParamsButton.setToolTipText("All params??"); |
---|
563 | 517 | allParamsButton.addActionListener(this); |
---|
564 | 518 | |
---|
565 | | - oe.aConstraints.gridx += 1; |
---|
566 | | - oe.aConstraints.weighty = 0; |
---|
567 | | - oe.aConstraints.gridwidth = 1; |
---|
568 | | - |
---|
569 | | - oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints); |
---|
| 519 | + commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 520 | + unselectButton.setToolTipText("Unselect"); |
---|
570 | 521 | unselectButton.addActionListener(this); |
---|
571 | 522 | |
---|
| 523 | + commandsPanel.preferredHeight = 1; |
---|
| 524 | + |
---|
| 525 | + oe.treePanel.add(commandsPanel); |
---|
| 526 | + oe.treePanel.Return(); |
---|
| 527 | + |
---|
572 | 528 | // oe.aConstraints.gridx += 1; |
---|
573 | 529 | // oe.aConstraints.weighty = 0; |
---|
574 | 530 | // oe.aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
580 | 536 | // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints); |
---|
581 | 537 | // gcButton.addActionListener(this); |
---|
582 | 538 | |
---|
583 | | - oe.aConstraints.gridx = 0; |
---|
584 | | - oe.aConstraints.gridy += 1; |
---|
585 | | - |
---|
586 | | - //ctrlPanel.add(objList = new List(5, true)); |
---|
587 | | - oe.aConstraints.gridwidth = 100; |
---|
588 | | - // oe.aConstraints.gridheight = 100; |
---|
589 | | - oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL; |
---|
590 | | - oe.aConstraints.gridheight = 1; |
---|
591 | | - oe.aConstraints.weighty = 0.5; |
---|
592 | | - oe.aConstraints.gridx = 0; |
---|
593 | | - JScrollPane jSP; |
---|
| 539 | + cGridBag jSPPanel = new cGridBag(); |
---|
| 540 | + |
---|
| 541 | + JScrollPane jSP; |
---|
594 | 542 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
595 | | - oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints); |
---|
| 543 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
596 | 544 | ResetModel(); |
---|
597 | | - oe.aConstraints.weighty = 0.5; |
---|
598 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
599 | | - oe.aConstraints.gridy += 1; |
---|
600 | | - oe.aConstraints.gridwidth = 1; |
---|
| 545 | + |
---|
| 546 | + oe.treePanel.add(jSPPanel); |
---|
| 547 | + oe.treePanel.Return(); |
---|
601 | 548 | |
---|
602 | | - oe.aConstraints.weighty = 0; |
---|
603 | | - oe.aConstraints.gridwidth = 2; |
---|
604 | | - |
---|
605 | | - oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints); |
---|
| 549 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 550 | + |
---|
| 551 | + copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 552 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
606 | 553 | colorCB.addItemListener(this); |
---|
607 | | - oe.aConstraints.gridx += 2; |
---|
608 | | - oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints); |
---|
| 554 | + |
---|
| 555 | + copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 556 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
609 | 557 | materialCB.addItemListener(this); |
---|
610 | | - oe.aConstraints.gridx += 2; |
---|
611 | | - oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints); |
---|
| 558 | + |
---|
| 559 | + copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 560 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
612 | 561 | textureCB.addItemListener(this); |
---|
613 | 562 | |
---|
614 | | - oe.aConstraints.gridx = 0; |
---|
615 | | - oe.aConstraints.gridy += 1; |
---|
| 563 | + copyOptionsPanel.preferredHeight = 1; |
---|
| 564 | + oe.treePanel.add(copyOptionsPanel); |
---|
| 565 | + oe.treePanel.Return(); |
---|
616 | 566 | |
---|
| 567 | +// mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 568 | +// mainPanel.setResizeWeight(0.5); |
---|
| 569 | + |
---|
617 | 570 | //jList.addListSelectionListener(this); |
---|
618 | 571 | oe.jTree.addTreeSelectionListener(this); |
---|
619 | 572 | //jTree.setRootVisible(false); |
---|
.. | .. |
---|
635 | 588 | radio.layout = sevenButton; |
---|
636 | 589 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
637 | 590 | } |
---|
| 591 | + |
---|
| 592 | + void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
| 593 | + { |
---|
| 594 | + panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 595 | + supportCB.setToolTipText("Enabled rigging"); |
---|
| 596 | + supportCB.addItemListener(this); |
---|
| 597 | + |
---|
| 598 | + // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
| 599 | + // localCB.addItemListener(this); |
---|
| 600 | + |
---|
| 601 | + panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
| 602 | + crowdCB.setToolTipText("Used for crowds"); |
---|
| 603 | + crowdCB.addItemListener(this); |
---|
| 604 | + |
---|
| 605 | + panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
| 606 | + smoothCB.setToolTipText("Snapping delay"); |
---|
| 607 | + smoothCB.addItemListener(this); |
---|
| 608 | + |
---|
| 609 | + panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
| 610 | + slowCB.setToolTipText("Smooth interpolation"); |
---|
| 611 | + slowCB.addItemListener(this); |
---|
| 612 | + |
---|
| 613 | + panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
| 614 | + boxCB.setToolTipText("Display bounding boxes"); |
---|
| 615 | + boxCB.addItemListener(this); |
---|
| 616 | + |
---|
| 617 | + panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
| 618 | + zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 619 | + zoomBoxCB.addItemListener(this); |
---|
| 620 | + |
---|
| 621 | +// constraints.gridy += 1; |
---|
| 622 | +// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
| 623 | +// speakerMocapCB.addItemListener(this); |
---|
| 624 | + |
---|
| 625 | + if (false) |
---|
| 626 | + { |
---|
| 627 | + // handled in scripts |
---|
| 628 | + //constraints.gridy += 1; |
---|
| 629 | + panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints); |
---|
| 630 | + speakerCameraCB.addItemListener(this); |
---|
| 631 | + |
---|
| 632 | + //constraints.gridy += 1; |
---|
| 633 | + panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints); |
---|
| 634 | + speakerFocusCB.addItemListener(this); |
---|
| 635 | + |
---|
| 636 | + //constraints.gridy += 1; |
---|
| 637 | + panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
| 638 | + smoothfocusCB.addItemListener(this); |
---|
| 639 | + } |
---|
| 640 | + |
---|
| 641 | +//constraints.gridx += 1; |
---|
| 642 | +//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
| 643 | +// debugCB.addItemListener(this); |
---|
| 644 | + |
---|
| 645 | + panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
| 646 | + oeilCB.addItemListener(this); |
---|
| 647 | + |
---|
| 648 | + panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
| 649 | + lookAtCB.setToolTipText("Look-at target"); |
---|
| 650 | + lookAtCB.addItemListener(this); |
---|
| 651 | + |
---|
| 652 | + cGridBag fill = new cGridBag(); |
---|
| 653 | + |
---|
| 654 | + fill.preferredHeight = 200; |
---|
| 655 | + |
---|
| 656 | + panel.add(fill); |
---|
| 657 | + |
---|
| 658 | + } |
---|
638 | 659 | |
---|
639 | 660 | void EditObject(Object3D obj) |
---|
640 | 661 | { |
---|
641 | | - cRadio dummyButton = new cRadio(obj.name); |
---|
642 | | - dummyButton.SetObject(obj); |
---|
643 | | - dummyButton.layout = sevenButton; |
---|
644 | | - dummyButton.SetCamera(cameraView.renderCamera, false); |
---|
645 | | - dummyButton.addActionListener(this); |
---|
646 | | - radioPanel.add(dummyButton); |
---|
647 | | - buttonGroup.add(dummyButton); |
---|
648 | | - dummyButton.doClick(); |
---|
| 662 | + cRadio radioButton = new cRadio(obj.name); |
---|
| 663 | + radioButton.SetObject(obj); |
---|
| 664 | + radioButton.layout = sevenButton; |
---|
| 665 | + radioButton.SetCamera(cameraView.renderCamera, false); |
---|
| 666 | + radioButton.addActionListener(this); |
---|
| 667 | + radioPanel.add(radioButton); |
---|
| 668 | + buttonGroup.add(radioButton); |
---|
| 669 | + radioButton.doClick(); |
---|
649 | 670 | } |
---|
650 | 671 | void SetupViews(ObjEditor oe) |
---|
651 | 672 | { |
---|
.. | .. |
---|
665 | 686 | JCheckBox fastCB; |
---|
666 | 687 | JCheckBox slowCB; |
---|
667 | 688 | JCheckBox boxCB; |
---|
| 689 | + JCheckBox zoomBoxCB; |
---|
668 | 690 | JCheckBox trackCB; |
---|
669 | 691 | JCheckBox smoothfocusCB; |
---|
670 | 692 | // JCheckBox speakerMocapCB; |
---|
.. | .. |
---|
707 | 729 | dropAttributes |= Object3D.TEXTURE; |
---|
708 | 730 | else |
---|
709 | 731 | dropAttributes &= ~Object3D.TEXTURE; |
---|
710 | | - } |
---|
711 | | - else if(e.getSource() == liveCB) |
---|
| 732 | + } else if(e.getSource() == liveCB) |
---|
712 | 733 | { |
---|
713 | 734 | cameraView.ToggleLive(); |
---|
714 | 735 | } |
---|
.. | .. |
---|
745 | 766 | Recompile(); |
---|
746 | 767 | cameraView.repaint(); |
---|
747 | 768 | // refreshContents(); |
---|
| 769 | + } |
---|
| 770 | + else if(e.getSource() == zoomBoxCB) |
---|
| 771 | + { |
---|
| 772 | + cameraView.ToggleZoomBoxMode(); |
---|
748 | 773 | } |
---|
749 | 774 | else if(e.getSource() == smoothfocusCB) |
---|
750 | 775 | { |
---|
.. | .. |
---|
1035 | 1060 | torusItem.addActionListener(this); |
---|
1036 | 1061 | superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1037 | 1062 | superItem.addActionListener(this); |
---|
| 1063 | + kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
| 1064 | + kleinItem.addActionListener(this); |
---|
1038 | 1065 | particleItem = menu.add(new MenuItem("Particle system")); |
---|
1039 | 1066 | particleItem.addActionListener(this); |
---|
1040 | 1067 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
.. | .. |
---|
1075 | 1102 | { |
---|
1076 | 1103 | menu.add(animationItem = new CheckboxMenuItem("Animation...")); |
---|
1077 | 1104 | animationItem.addItemListener(this); |
---|
1078 | | - animationItem.setState(CameraPane.ANIMATION); |
---|
| 1105 | + animationItem.setState(Globals.ANIMATION); |
---|
1079 | 1106 | |
---|
1080 | 1107 | menu.add("-"); |
---|
1081 | 1108 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
.. | .. |
---|
1108 | 1135 | resetParentItem.addActionListener(this); |
---|
1109 | 1136 | repairParentItem = menu.add(new MenuItem("Repair Parent")); |
---|
1110 | 1137 | repairParentItem.addActionListener(this); |
---|
| 1138 | + repairShadowItem = menu.add(new MenuItem("Repair Shadow")); |
---|
| 1139 | + repairShadowItem.addActionListener(this); |
---|
1111 | 1140 | menu.add(invariantsItem = new MenuItem("Invariants")); |
---|
1112 | 1141 | invariantsItem.addActionListener(this); |
---|
1113 | 1142 | menu.add(recompileItem = new MenuItem("Recompile")); |
---|
.. | .. |
---|
1468 | 1497 | // |
---|
1469 | 1498 | public void actionPerformed(ActionEvent event) // , Object arg) |
---|
1470 | 1499 | { |
---|
| 1500 | + Object source = event.getSource(); |
---|
1471 | 1501 | /* |
---|
1472 | 1502 | if (event.getSource() == nameField) |
---|
1473 | 1503 | { |
---|
.. | .. |
---|
1479 | 1509 | } |
---|
1480 | 1510 | else |
---|
1481 | 1511 | */ |
---|
1482 | | - if (event.getSource() == lookAtItem || event.getSource() == lookFromItem) |
---|
| 1512 | + if (source == lookAtItem || source == lookFromItem) |
---|
1483 | 1513 | { |
---|
1484 | 1514 | ScreenFit(); |
---|
1485 | 1515 | } else |
---|
1486 | | - if (event.getSource() == switchItem) |
---|
| 1516 | + if (source == switchItem) |
---|
1487 | 1517 | { |
---|
1488 | 1518 | cVector v1 = new cVector(); |
---|
1489 | 1519 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1492 | 1522 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1493 | 1523 | objEditor.cameraView.repaint(); |
---|
1494 | 1524 | } else |
---|
1495 | | - if (event.getSource() == rectoidItem) |
---|
| 1525 | + if (source == rectoidItem) |
---|
1496 | 1526 | { |
---|
1497 | 1527 | makeSomething(new Box()); |
---|
1498 | 1528 | } else |
---|
1499 | | - if (event.getSource() == particleItem) |
---|
| 1529 | + if (source == particleItem) |
---|
1500 | 1530 | { |
---|
1501 | 1531 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1502 | 1532 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1517 | 1547 | applyExample(particleGeom, "SMOKE"); |
---|
1518 | 1548 | makeSomething(particleGeom); |
---|
1519 | 1549 | } else |
---|
1520 | | - if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item) |
---|
| 1550 | + if (source == ragdollItem || source == ragdoll2Item) |
---|
1521 | 1551 | { |
---|
1522 | | - GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem); |
---|
| 1552 | + GenericJoint ragdoll = new GenericJoint(source == ragdollItem); |
---|
1523 | 1553 | |
---|
1524 | 1554 | ragdoll.toParent = LA.newMatrix(); |
---|
1525 | 1555 | ragdoll.fromParent = LA.newMatrix(); |
---|
.. | .. |
---|
1537 | 1567 | } else |
---|
1538 | 1568 | /* |
---|
1539 | 1569 | */ |
---|
1540 | | - if (event.getSource() == heightFieldItem) |
---|
| 1570 | + if (source == heightFieldItem) |
---|
1541 | 1571 | { |
---|
1542 | 1572 | Object3D obj = new Object3D(); |
---|
1543 | 1573 | |
---|
.. | .. |
---|
1575 | 1605 | |
---|
1576 | 1606 | makeSomething(obj); |
---|
1577 | 1607 | } else |
---|
1578 | | - if (event.getSource() == gridItem) |
---|
| 1608 | + if (source == gridItem) |
---|
1579 | 1609 | { |
---|
1580 | 1610 | makeSomething(new Grid()); |
---|
1581 | 1611 | } else |
---|
1582 | | - if (event.getSource() == ellipsoidItem) |
---|
| 1612 | + if (source == ellipsoidItem) |
---|
1583 | 1613 | { |
---|
1584 | 1614 | makeSomething(new Sphere()); |
---|
1585 | 1615 | } else |
---|
1586 | | - if (event.getSource() == coneItem) |
---|
| 1616 | + if (source == coneItem) |
---|
1587 | 1617 | { |
---|
1588 | 1618 | makeSomething(new Cone()); |
---|
1589 | 1619 | } else |
---|
1590 | | - if (event.getSource() == torusItem) |
---|
| 1620 | + if (source == torusItem) |
---|
1591 | 1621 | { |
---|
1592 | 1622 | makeSomething(new Torus()); |
---|
1593 | 1623 | } else |
---|
1594 | | - if (event.getSource() == superItem) |
---|
| 1624 | + if (source == superItem) |
---|
1595 | 1625 | { |
---|
1596 | 1626 | makeSomething(new Superellipsoid()); |
---|
1597 | 1627 | } else |
---|
1598 | | - if (event.getSource() == blobItem) |
---|
| 1628 | + if (source == kleinItem) |
---|
| 1629 | + { |
---|
| 1630 | + makeSomething(new Klein()); |
---|
| 1631 | + } else |
---|
| 1632 | + if (source == blobItem) |
---|
1599 | 1633 | { |
---|
1600 | 1634 | Blob blob = new Blob(); |
---|
1601 | 1635 | BlobComponent comp = new BlobComponent(); |
---|
.. | .. |
---|
1603 | 1637 | //blob.retile(); |
---|
1604 | 1638 | makeSomething(blob); |
---|
1605 | 1639 | } else |
---|
1606 | | - if (event.getSource() == latheItem) |
---|
| 1640 | + if (source == latheItem) |
---|
1607 | 1641 | { |
---|
1608 | 1642 | makeSomething(new Lathe()); |
---|
1609 | 1643 | } else |
---|
1610 | | - if (event.getSource() == bezierItem) |
---|
| 1644 | + if (source == bezierItem) |
---|
1611 | 1645 | { |
---|
1612 | 1646 | makeSomething(new BezierSurface()); |
---|
1613 | 1647 | } else |
---|
1614 | | - if (event.getSource() == checkerItem) |
---|
| 1648 | + if (source == checkerItem) |
---|
1615 | 1649 | { |
---|
1616 | 1650 | /* |
---|
1617 | 1651 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1626 | 1660 | */ |
---|
1627 | 1661 | makeSomething(new Checker()); |
---|
1628 | 1662 | } else |
---|
1629 | | - if (event.getSource() == meshItem) |
---|
| 1663 | + if (source == meshItem) |
---|
1630 | 1664 | { |
---|
1631 | 1665 | Object3D itemtomake = new Object3D(); |
---|
1632 | 1666 | Object3D child; |
---|
.. | .. |
---|
1647 | 1681 | makeSomething(child); |
---|
1648 | 1682 | } |
---|
1649 | 1683 | } else |
---|
1650 | | - if (event.getSource() == springItem) |
---|
| 1684 | + if (source == springItem) |
---|
1651 | 1685 | { |
---|
1652 | 1686 | cSpring s = new cSpring(); |
---|
1653 | 1687 | s.setup(); |
---|
1654 | 1688 | makeSomething(s); |
---|
1655 | 1689 | } else |
---|
1656 | | - if (event.getSource() == flagItem) |
---|
| 1690 | + if (source == flagItem) |
---|
1657 | 1691 | { |
---|
1658 | 1692 | cSpring s = new cFlag(); |
---|
1659 | 1693 | s.setup(); |
---|
1660 | 1694 | makeSomething(s); |
---|
1661 | 1695 | } else |
---|
1662 | | - if (event.getSource() == lightItem) |
---|
| 1696 | + if (source == lightItem) |
---|
1663 | 1697 | { |
---|
1664 | 1698 | makeSomething(new Light()); |
---|
1665 | 1699 | } else |
---|
1666 | | - if (event.getSource() == csgItem) |
---|
| 1700 | + if (source == csgItem) |
---|
1667 | 1701 | { |
---|
1668 | 1702 | group(new CSG()); |
---|
1669 | 1703 | } else |
---|
1670 | | - if (event.getSource() == templateItem) |
---|
| 1704 | + if (source == templateItem) |
---|
1671 | 1705 | { |
---|
1672 | 1706 | group(new cTemplate()); |
---|
1673 | 1707 | } else |
---|
1674 | | - if (event.getSource() == attributeItem) |
---|
| 1708 | + if (source == attributeItem) |
---|
1675 | 1709 | { |
---|
1676 | 1710 | makeSomething(new Attribute()); |
---|
1677 | 1711 | } else |
---|
1678 | | - if (event.getSource() == pointflowItem) |
---|
| 1712 | + if (source == pointflowItem) |
---|
1679 | 1713 | { |
---|
1680 | 1714 | makeSomething(new PointFlow()); |
---|
1681 | 1715 | } else |
---|
.. | .. |
---|
1687 | 1721 | } else |
---|
1688 | 1722 | */ |
---|
1689 | 1723 | |
---|
1690 | | - if (event.getSource() == superLoopItem) |
---|
| 1724 | + if (source == superLoopItem) |
---|
1691 | 1725 | { |
---|
1692 | 1726 | Composite g = new cGroup(); |
---|
1693 | 1727 | for (int i=0; i<15; i++) |
---|
.. | .. |
---|
1709 | 1743 | |
---|
1710 | 1744 | group(g); |
---|
1711 | 1745 | } else |
---|
1712 | | - if (event.getSource() == loopItem) |
---|
| 1746 | + if (source == loopItem) |
---|
1713 | 1747 | { |
---|
1714 | 1748 | Composite csg = new GroupLeaf(); |
---|
1715 | 1749 | csg.count = 5; |
---|
.. | .. |
---|
1718 | 1752 | csg.addChild(child); |
---|
1719 | 1753 | child.addChild(csg); |
---|
1720 | 1754 | } else |
---|
1721 | | - if (event.getSource() == doubleItem) |
---|
| 1755 | + if (source == doubleItem) |
---|
1722 | 1756 | { |
---|
1723 | 1757 | Composite csg = new GroupLeaf(); |
---|
1724 | 1758 | csg.count = 5; |
---|
.. | .. |
---|
1730 | 1764 | csg.addChild(child); |
---|
1731 | 1765 | child.addChild(csg); |
---|
1732 | 1766 | } else |
---|
1733 | | - if (event.getSource() == tripleItem) |
---|
| 1767 | + if (source == tripleItem) |
---|
1734 | 1768 | { |
---|
1735 | 1769 | Composite csg = new GroupLeaf(); |
---|
1736 | 1770 | csg.count = 4; |
---|
.. | .. |
---|
1746 | 1780 | child.addChild(csg); |
---|
1747 | 1781 | } else |
---|
1748 | 1782 | |
---|
1749 | | - if (event.getSource() == importGFDItem) |
---|
| 1783 | + if (source == importGFDItem) |
---|
1750 | 1784 | { |
---|
1751 | 1785 | ImportGFD(); |
---|
1752 | 1786 | } else |
---|
1753 | | - if (event.getSource() == importVRMLX3DItem) |
---|
| 1787 | + if (source == importVRMLX3DItem) |
---|
1754 | 1788 | { |
---|
1755 | 1789 | ImportVRMLX3D(); |
---|
1756 | 1790 | } else |
---|
1757 | | - if (event.getSource() == import3DSItem) |
---|
| 1791 | + if (source == import3DSItem) |
---|
1758 | 1792 | { |
---|
1759 | 1793 | objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
1760 | 1794 | } else |
---|
1761 | | - if (event.getSource() == importOBJItem) |
---|
| 1795 | + if (source == importOBJItem) |
---|
1762 | 1796 | { |
---|
1763 | 1797 | objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
1764 | 1798 | } else |
---|
1765 | | - if (event.getSource() == computeAOItem) |
---|
| 1799 | + if (source == computeAOItem) |
---|
1766 | 1800 | { |
---|
1767 | | - CameraPane.drawMode = CameraPane.OCCLUSION; |
---|
1768 | | - CameraPane.theRenderer.repaint(); |
---|
| 1801 | + Globals.drawMode = CameraPane.OCCLUSION; |
---|
| 1802 | + Globals.theRenderer.repaint(); |
---|
1769 | 1803 | } else |
---|
1770 | | - if (event.getSource() == recompileItem) |
---|
| 1804 | + if (source == recompileItem) |
---|
1771 | 1805 | { |
---|
1772 | 1806 | Recompile(); |
---|
1773 | 1807 | refreshContents(); |
---|
1774 | 1808 | } else |
---|
1775 | | - if (event.getSource() == editScriptItem) |
---|
| 1809 | + if (source == editScriptItem) |
---|
1776 | 1810 | { |
---|
1777 | 1811 | OpenDialog(); |
---|
1778 | 1812 | refreshContents(); |
---|
1779 | 1813 | } else |
---|
1780 | | - if (event.getSource() == invariantsItem) |
---|
| 1814 | + if (source == invariantsItem) |
---|
1781 | 1815 | { |
---|
1782 | 1816 | System.out.println("Invariants:"); |
---|
1783 | | - GrafreeD.theApplet3D.universe.invariants(); |
---|
| 1817 | + GrafreeD.grafreeD.universe.invariants(); |
---|
1784 | 1818 | } else |
---|
1785 | | - if (event.getSource() == memoryItem) |
---|
| 1819 | + if (source == memoryItem) |
---|
1786 | 1820 | { |
---|
1787 | 1821 | //System.out.println("Invariants:"); |
---|
1788 | 1822 | PrintMemory(); |
---|
1789 | 1823 | } else |
---|
1790 | | - if (event.getSource() == pathItem) |
---|
| 1824 | + if (source == pathItem) |
---|
1791 | 1825 | { |
---|
1792 | 1826 | PrintPath(); |
---|
1793 | 1827 | } else |
---|
1794 | | - if (event.getSource() == analyzeItem) |
---|
| 1828 | + if (source == analyzeItem) |
---|
1795 | 1829 | { |
---|
1796 | 1830 | AnalyzeObject(); |
---|
1797 | 1831 | } else |
---|
1798 | | - if (event.getSource() == dumpItem) |
---|
| 1832 | + if (source == dumpItem) |
---|
1799 | 1833 | { |
---|
1800 | 1834 | DumpObject(); |
---|
1801 | 1835 | } else |
---|
1802 | | - if (event.getSource() == screenfitButton) |
---|
| 1836 | + if (source == screenfitButton) |
---|
1803 | 1837 | { |
---|
1804 | 1838 | //Reload(lastConverter, lastFilename, true); |
---|
1805 | 1839 | ScreenFit(); |
---|
1806 | 1840 | } else |
---|
1807 | | - if (event.getSource() == screenfitpointButton) |
---|
| 1841 | + if (source == screenfitpointButton) |
---|
1808 | 1842 | { |
---|
1809 | 1843 | //Reload(lastConverter, lastFilename, true); |
---|
1810 | 1844 | ScreenFitPoint(); |
---|
1811 | 1845 | } else |
---|
1812 | | - if (event.getSource() == snapobjectButton) |
---|
| 1846 | + if (source == snapobjectButton) |
---|
1813 | 1847 | { |
---|
1814 | 1848 | //Reload(lastConverter, lastFilename, true); |
---|
1815 | 1849 | SnapObject(); |
---|
.. | .. |
---|
1820 | 1854 | // Recompile(); |
---|
1821 | 1855 | // refreshContents(); |
---|
1822 | 1856 | // } else |
---|
1823 | | - if (event.getSource() == gcButton) |
---|
| 1857 | + if (source == gcButton) |
---|
1824 | 1858 | { |
---|
1825 | 1859 | System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1826 | 1860 | System.gc(); |
---|
1827 | 1861 | System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1828 | 1862 | } else |
---|
1829 | | - if (event.getSource() == editLeafItem) |
---|
| 1863 | + if (source == editLeafItem) |
---|
1830 | 1864 | { |
---|
1831 | 1865 | Object3D obj; |
---|
1832 | 1866 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
1840 | 1874 | } |
---|
1841 | 1875 | refreshContents(true); |
---|
1842 | 1876 | } else |
---|
1843 | | - if (event.getSource() == openWindowItem) |
---|
| 1877 | + if (source == openWindowItem) |
---|
1844 | 1878 | { |
---|
1845 | 1879 | EditSelection(true); |
---|
1846 | 1880 | } else |
---|
1847 | | - if (event.getSource() == cutItem || event.getSource() == clearButton) |
---|
| 1881 | + if (source == cutItem || source == clearButton) |
---|
1848 | 1882 | { |
---|
1849 | 1883 | loadClipboard(true); |
---|
1850 | 1884 | } else |
---|
1851 | | - if (event.getSource() == duplicateItem) |
---|
| 1885 | + if (source == duplicateItem) |
---|
1852 | 1886 | { |
---|
1853 | 1887 | Object3D keep = GrafreeD.clipboard; |
---|
1854 | 1888 | loadClipboard(false); |
---|
1855 | 1889 | paste(false); |
---|
1856 | 1890 | GrafreeD.clipboard = keep; |
---|
1857 | 1891 | } else |
---|
1858 | | - if (event.getSource() == cloneItem) |
---|
| 1892 | + if (source == cloneItem) |
---|
1859 | 1893 | { |
---|
1860 | 1894 | CloneSelection(false); |
---|
1861 | 1895 | } else |
---|
1862 | | - if (event.getSource() == cloneSupportItem) |
---|
| 1896 | + if (source == cloneSupportItem) |
---|
1863 | 1897 | { |
---|
1864 | 1898 | CloneSelection(true); |
---|
1865 | 1899 | } else |
---|
1866 | | - if (event.getSource() == copyItem) |
---|
| 1900 | + if (source == copyItem) |
---|
1867 | 1901 | { |
---|
1868 | 1902 | loadClipboard(false); |
---|
1869 | 1903 | } else |
---|
1870 | | - if (event.getSource() == pasteItem) |
---|
| 1904 | + if (source == pasteItem) |
---|
1871 | 1905 | { |
---|
1872 | 1906 | paste(false); |
---|
1873 | 1907 | } else |
---|
1874 | | - if (event.getSource() == pasteLinkItem) |
---|
| 1908 | + if (source == pasteLinkItem) |
---|
1875 | 1909 | { |
---|
1876 | 1910 | pasteInto(false); |
---|
1877 | 1911 | } else |
---|
1878 | | - if (event.getSource() == pasteCloneItem) |
---|
| 1912 | + if (source == pasteCloneItem) |
---|
1879 | 1913 | { |
---|
1880 | 1914 | pasteInto(true); |
---|
1881 | 1915 | } else |
---|
1882 | | - if (event.getSource() == pasteExpandItem) |
---|
| 1916 | + if (source == pasteExpandItem) |
---|
1883 | 1917 | { |
---|
1884 | 1918 | paste(true); |
---|
1885 | 1919 | } else |
---|
1886 | | - if (event.getSource() == synchronizeItem) |
---|
| 1920 | + if (source == synchronizeItem) |
---|
1887 | 1921 | { |
---|
1888 | 1922 | Overwrite(Object3D.TRANSFORM); |
---|
1889 | 1923 | } else |
---|
1890 | | - if (event.getSource() == overwriteNameItem) |
---|
| 1924 | + if (source == overwriteNameItem) |
---|
1891 | 1925 | { |
---|
1892 | 1926 | Overwrite(Object3D.NAME); |
---|
1893 | 1927 | } else |
---|
1894 | | - if (event.getSource() == overwriteUVItem) |
---|
| 1928 | + if (source == overwriteUVItem) |
---|
1895 | 1929 | { |
---|
1896 | 1930 | Overwrite(Object3D.UV); |
---|
1897 | 1931 | } else |
---|
1898 | | - if (event.getSource() == overwriteMatItem) |
---|
| 1932 | + if (source == overwriteMatItem) |
---|
1899 | 1933 | { |
---|
1900 | 1934 | /* july 2015 |
---|
1901 | 1935 | if ((dropAttributes & Object3D.TEXTURE) == 0) |
---|
.. | .. |
---|
1915 | 1949 | |
---|
1916 | 1950 | Overwrite(dropAttributes); |
---|
1917 | 1951 | } |
---|
1918 | | - if (event.getSource() == overwriteGeoItem) |
---|
| 1952 | + if (source == overwriteGeoItem) |
---|
1919 | 1953 | { |
---|
1920 | 1954 | Overwrite(Object3D.GEOMETRY); |
---|
1921 | 1955 | // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
.. | .. |
---|
1932 | 1966 | // refreshContents(); |
---|
1933 | 1967 | // } |
---|
1934 | 1968 | } else |
---|
1935 | | - if (event.getSource() == generateMeshItem) |
---|
| 1969 | + if (source == generateMeshItem) |
---|
1936 | 1970 | { |
---|
1937 | 1971 | //if (group.selection.size() == 1) |
---|
1938 | 1972 | // for (int i=0; i<group.selection.size(); i++) |
---|
.. | .. |
---|
1943 | 1977 | ResetModel(); |
---|
1944 | 1978 | refreshContents(); |
---|
1945 | 1979 | } else |
---|
1946 | | - if (event.getSource() == extractGeometriesItem) |
---|
| 1980 | + if (source == extractGeometriesItem) |
---|
1947 | 1981 | { |
---|
1948 | 1982 | boolean one = false; |
---|
1949 | 1983 | |
---|
.. | .. |
---|
1970 | 2004 | ResetModel(); |
---|
1971 | 2005 | refreshContents(); |
---|
1972 | 2006 | } else |
---|
1973 | | - if (event.getSource() == cloneGeometriesItem) |
---|
| 2007 | + if (source == cloneGeometriesItem) |
---|
1974 | 2008 | { |
---|
1975 | 2009 | boolean one = false; |
---|
1976 | 2010 | |
---|
.. | .. |
---|
1996 | 2030 | ResetModel(); |
---|
1997 | 2031 | refreshContents(); |
---|
1998 | 2032 | } else |
---|
1999 | | - if (event.getSource() == shareGeometriesItem) |
---|
| 2033 | + if (source == shareGeometriesItem) |
---|
2000 | 2034 | { |
---|
2001 | 2035 | boolean one = false; |
---|
2002 | 2036 | |
---|
2003 | 2037 | if (group.selection.size() == 1) |
---|
2004 | 2038 | one = true; |
---|
2005 | 2039 | |
---|
| 2040 | + Object3D merge = null; |
---|
| 2041 | + |
---|
2006 | 2042 | Object3D content = new cGroup(); |
---|
2007 | 2043 | |
---|
2008 | 2044 | for (int i=0; i<group.selection.size(); i++) |
---|
2009 | 2045 | { |
---|
2010 | | - Object3D sel = new Merge(group.selection.get(i)); |
---|
| 2046 | + merge = new Merge(group.selection.get(i)); |
---|
2011 | 2047 | |
---|
2012 | 2048 | if (one) |
---|
2013 | | - makeSomething(sel, false); |
---|
| 2049 | + makeSomething(merge, false); |
---|
2014 | 2050 | else |
---|
2015 | | - content.addChild(sel); |
---|
| 2051 | + content.addChild(merge); |
---|
2016 | 2052 | } |
---|
2017 | 2053 | |
---|
2018 | 2054 | if (!one) |
---|
2019 | | - makeSomething(content, false); |
---|
2020 | | - |
---|
2021 | | - ResetModel(); |
---|
2022 | | - refreshContents(); |
---|
| 2055 | + makeSomething(content, true); |
---|
| 2056 | + else |
---|
| 2057 | + { |
---|
| 2058 | + ResetModel(); |
---|
| 2059 | + Select(merge.GetTreePath(), true, false); // unselect... false); |
---|
| 2060 | + refreshContents(); |
---|
| 2061 | + } |
---|
2023 | 2062 | } else |
---|
2024 | | - if (event.getSource() == mergeGeometriesItem) |
---|
| 2063 | + if (source == mergeGeometriesItem) |
---|
2025 | 2064 | { |
---|
2026 | 2065 | boolean one = false; |
---|
2027 | 2066 | |
---|
.. | .. |
---|
2051 | 2090 | ResetModel(); |
---|
2052 | 2091 | refreshContents(); |
---|
2053 | 2092 | } else |
---|
2054 | | - if (event.getSource() == linkverticesItem) |
---|
| 2093 | + if (source == linkverticesItem) |
---|
2055 | 2094 | { |
---|
2056 | 2095 | // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2057 | 2096 | // { |
---|
.. | .. |
---|
2071 | 2110 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2072 | 2111 | content = ((cGroup)content).get(0); |
---|
2073 | 2112 | |
---|
2074 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
| 2113 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2075 | 2114 | for (int i=0; i<group.selection.size(); i++) |
---|
2076 | 2115 | { |
---|
2077 | 2116 | boolean random = CameraPane.RANDOM; |
---|
.. | .. |
---|
2080 | 2119 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2081 | 2120 | CameraPane.RANDOM = random; |
---|
2082 | 2121 | } |
---|
2083 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 2122 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2084 | 2123 | refreshContents(); |
---|
2085 | 2124 | } |
---|
2086 | 2125 | } else |
---|
2087 | | - if (event.getSource() == resetsupportItem) |
---|
| 2126 | + if (source == resetsupportItem) |
---|
2088 | 2127 | { |
---|
2089 | 2128 | for (int i=0; i<group.selection.size(); i++) |
---|
2090 | 2129 | { |
---|
.. | .. |
---|
2096 | 2135 | |
---|
2097 | 2136 | refreshContents(); |
---|
2098 | 2137 | } else |
---|
2099 | | - if (event.getSource() == resetreferencesItem) |
---|
| 2138 | + if (source == relinkverticesItem) |
---|
| 2139 | + { |
---|
| 2140 | + boolean random = CameraPane.RANDOM; |
---|
| 2141 | + CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2142 | + group.selection.RelinkToSupport(); |
---|
| 2143 | + CameraPane.RANDOM = random; |
---|
| 2144 | + |
---|
| 2145 | + refreshContents(); |
---|
| 2146 | + } else |
---|
| 2147 | + if (source == resetreferencesItem) |
---|
2100 | 2148 | { |
---|
2101 | 2149 | for (int i=0; i<group.selection.size(); i++) |
---|
2102 | 2150 | { |
---|
.. | .. |
---|
2105 | 2153 | |
---|
2106 | 2154 | refreshContents(); |
---|
2107 | 2155 | } else |
---|
2108 | | - if (event.getSource() == setMasterItem) |
---|
| 2156 | + if (source == setMasterItem) |
---|
2109 | 2157 | { |
---|
2110 | 2158 | if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2111 | 2159 | { |
---|
.. | .. |
---|
2118 | 2166 | refreshContents(); |
---|
2119 | 2167 | } |
---|
2120 | 2168 | } else |
---|
2121 | | - if (event.getSource() == poseMeshItem) |
---|
| 2169 | + if (source == poseMeshItem) |
---|
2122 | 2170 | { |
---|
2123 | 2171 | if (group.selection.size() == 1) |
---|
2124 | 2172 | { |
---|
.. | .. |
---|
2137 | 2185 | } |
---|
2138 | 2186 | |
---|
2139 | 2187 | } else |
---|
2140 | | - if (event.getSource() == revertMeshItem) |
---|
| 2188 | + if (source == revertMeshItem) |
---|
2141 | 2189 | { |
---|
2142 | 2190 | RevertMeshes(); |
---|
2143 | 2191 | } else |
---|
2144 | | - if (event.getSource() == resetMeshItem) |
---|
| 2192 | + if (source == resetMeshItem) |
---|
2145 | 2193 | { |
---|
2146 | 2194 | ResetAll(); |
---|
2147 | 2195 | } else |
---|
2148 | | - if (event.getSource() == stepAllItem) |
---|
| 2196 | + if (source == stepAllItem) |
---|
2149 | 2197 | { |
---|
2150 | 2198 | StepAll(); |
---|
2151 | 2199 | } else |
---|
2152 | | - if (event.getSource() == clearItem) // || event.getSource() == clearButton) |
---|
| 2200 | + if (source == clearItem) // || event.getSource() == clearButton) |
---|
2153 | 2201 | { |
---|
2154 | 2202 | //int indices[] = jList.getSelectedIndices(); |
---|
2155 | 2203 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
2157 | 2205 | |
---|
2158 | 2206 | ClearSelection(false); |
---|
2159 | 2207 | } else |
---|
2160 | | - if (event.getSource() == clearAllItem) |
---|
| 2208 | + if (source == clearAllItem) |
---|
2161 | 2209 | { |
---|
2162 | 2210 | ClearSelection(true); |
---|
2163 | 2211 | } else |
---|
2164 | | - if (event.getSource() == grabItem) |
---|
| 2212 | + if (source == grabItem) |
---|
2165 | 2213 | { |
---|
2166 | 2214 | group(new cGroup(), true); |
---|
2167 | 2215 | } else |
---|
2168 | | - if (event.getSource() == frontItem) |
---|
| 2216 | + if (source == hideItem) |
---|
| 2217 | + { |
---|
| 2218 | + group(new HiddenObject()); |
---|
| 2219 | + } else |
---|
| 2220 | + if (source == frontItem) |
---|
2169 | 2221 | { |
---|
2170 | 2222 | front(); |
---|
2171 | 2223 | } else |
---|
2172 | | - if (event.getSource() == backItem) |
---|
| 2224 | + if (source == backItem) |
---|
2173 | 2225 | { |
---|
2174 | 2226 | back(); |
---|
2175 | 2227 | } else |
---|
2176 | | - if (event.getSource() == cameraItem) |
---|
| 2228 | + if (source == cameraItem) |
---|
2177 | 2229 | { |
---|
2178 | 2230 | makeSomething(new Camera()); |
---|
2179 | 2231 | } else |
---|
2180 | | - if (event.getSource() == compositeItem) |
---|
| 2232 | + if (source == compositeItem) |
---|
2181 | 2233 | { |
---|
2182 | 2234 | group(new Composite()); |
---|
2183 | 2235 | } else |
---|
2184 | | - if (event.getSource() == randomItem) |
---|
| 2236 | + if (source == randomItem) |
---|
2185 | 2237 | { |
---|
2186 | 2238 | RandomNode random = new RandomNode(); |
---|
2187 | 2239 | group(random); |
---|
2188 | 2240 | if (random.size() > 0) |
---|
2189 | 2241 | random.name = random.get(0).name + "Rnd"; |
---|
2190 | 2242 | } else |
---|
2191 | | - if (event.getSource() == physicsItem) |
---|
| 2243 | + if (source == physicsItem) |
---|
2192 | 2244 | { |
---|
2193 | 2245 | group(new PhysicsNode()); |
---|
2194 | 2246 | } else |
---|
2195 | | - if (event.getSource() == frameselectorItem) |
---|
| 2247 | + if (source == frameselectorItem) |
---|
2196 | 2248 | { |
---|
2197 | 2249 | for (int i=0; i<group.selection.size(); i++) |
---|
2198 | 2250 | { |
---|
.. | .. |
---|
2204 | 2256 | ResetModel(); |
---|
2205 | 2257 | refreshContents(); |
---|
2206 | 2258 | } else |
---|
2207 | | - if (event.getSource() == switchGeoItem) |
---|
| 2259 | + if (source == switchGeoItem) |
---|
2208 | 2260 | { |
---|
2209 | 2261 | for (int i=0; i<group.selection.size(); i++) |
---|
2210 | 2262 | { |
---|
.. | .. |
---|
2216 | 2268 | ResetModel(); |
---|
2217 | 2269 | refreshContents(); |
---|
2218 | 2270 | } else |
---|
2219 | | - if (event.getSource() == switchTransfoItem) |
---|
| 2271 | + if (source == switchTransfoItem) |
---|
2220 | 2272 | { |
---|
2221 | 2273 | for (int i=0; i<group.selection.size(); i++) |
---|
2222 | 2274 | { |
---|
.. | .. |
---|
2228 | 2280 | ResetModel(); |
---|
2229 | 2281 | refreshContents(); |
---|
2230 | 2282 | } else |
---|
2231 | | - if (event.getSource() == morphItem) |
---|
| 2283 | + if (source == morphItem) |
---|
2232 | 2284 | { |
---|
2233 | 2285 | for (int i=0; i<group.selection.size(); i++) |
---|
2234 | 2286 | { |
---|
.. | .. |
---|
2240 | 2292 | ResetModel(); |
---|
2241 | 2293 | refreshContents(); |
---|
2242 | 2294 | } else |
---|
2243 | | - if (event.getSource() == scriptNodeItem) |
---|
| 2295 | + if (source == scriptNodeItem) |
---|
2244 | 2296 | { |
---|
2245 | 2297 | boolean atleastone = false; |
---|
2246 | 2298 | |
---|
.. | .. |
---|
2279 | 2331 | } |
---|
2280 | 2332 | } |
---|
2281 | 2333 | } else |
---|
2282 | | - if (event.getSource() == linkerItem) |
---|
| 2334 | + if (source == linkerItem) |
---|
2283 | 2335 | { |
---|
2284 | 2336 | group(new cLinker()); |
---|
2285 | 2337 | } else |
---|
2286 | | - if (event.getSource() == textureItem) |
---|
| 2338 | + if (source == textureItem) |
---|
2287 | 2339 | { |
---|
2288 | 2340 | group(new TextureNode()); |
---|
2289 | 2341 | } else |
---|
2290 | | - if (event.getSource() == shadowXItem) |
---|
| 2342 | + if (source == billboardItem) |
---|
| 2343 | + { |
---|
| 2344 | + group(new BillboardNode()); |
---|
| 2345 | + } else |
---|
| 2346 | + if (source == shadowXItem) |
---|
2291 | 2347 | { |
---|
2292 | 2348 | CastShadow(0); |
---|
2293 | 2349 | } else |
---|
2294 | | - if (event.getSource() == shadowYItem) |
---|
| 2350 | + if (source == shadowYItem) |
---|
2295 | 2351 | { |
---|
2296 | 2352 | CastShadow(1); |
---|
2297 | 2353 | } else |
---|
2298 | | - if (event.getSource() == shadowZItem) |
---|
| 2354 | + if (source == shadowZItem) |
---|
2299 | 2355 | { |
---|
2300 | 2356 | CastShadow(2); |
---|
2301 | 2357 | } else |
---|
2302 | | - if (event.getSource() == ungroupItem) |
---|
| 2358 | + if (source == ungroupItem) |
---|
2303 | 2359 | { |
---|
2304 | | - ungroup(); |
---|
| 2360 | + //ungroup(); |
---|
| 2361 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 2362 | + { |
---|
| 2363 | + Ungroup(group.selection.get(i)); |
---|
| 2364 | + } |
---|
| 2365 | + |
---|
| 2366 | + ClearSelection(false); |
---|
| 2367 | + |
---|
| 2368 | + refreshContents(); |
---|
2305 | 2369 | } else |
---|
2306 | | - if (event.getSource() == genUVItem) |
---|
| 2370 | + if (source == genUVItem) |
---|
2307 | 2371 | { |
---|
2308 | 2372 | GenUV(); |
---|
2309 | 2373 | } else |
---|
2310 | | - if (event.getSource() == genNormalsCADItem) |
---|
| 2374 | + if (source == genNormalsCADItem) |
---|
2311 | 2375 | { |
---|
2312 | 2376 | GenNormals(true); |
---|
2313 | 2377 | } else |
---|
2314 | | - if (event.getSource() == genNormalsMESHItem) |
---|
| 2378 | + if (source == genNormalsMESHItem) |
---|
2315 | 2379 | { |
---|
2316 | 2380 | GenNormals(true); // TODO |
---|
2317 | 2381 | } else |
---|
2318 | | - if (event.getSource() == genNormalsORGANItem) |
---|
| 2382 | + if (source == genNormalsORGANItem) |
---|
2319 | 2383 | { |
---|
2320 | 2384 | GenNormals(false); |
---|
2321 | 2385 | } else |
---|
2322 | | - if (event.getSource() == stripifyItem) |
---|
| 2386 | + if (source == genNormalsMINEItem) |
---|
| 2387 | + { |
---|
| 2388 | + GenNormalsMINE(); |
---|
| 2389 | + } else |
---|
| 2390 | + if (source == stripifyItem) |
---|
2323 | 2391 | { |
---|
2324 | 2392 | Stripify(); |
---|
2325 | 2393 | } else |
---|
2326 | | - if (event.getSource() == unstripifyItem) |
---|
| 2394 | + if (source == unstripifyItem) |
---|
2327 | 2395 | { |
---|
2328 | 2396 | Unstripify(); |
---|
2329 | 2397 | } else |
---|
2330 | | - if (event.getSource() == trimItem) |
---|
| 2398 | + if (source == trimItem) |
---|
2331 | 2399 | { |
---|
2332 | 2400 | Trim(); |
---|
2333 | 2401 | } else |
---|
2334 | | - if (event.getSource() == untrimItem) |
---|
| 2402 | + if (source == untrimItem) |
---|
2335 | 2403 | { |
---|
2336 | 2404 | Untrim(); |
---|
2337 | 2405 | } else |
---|
2338 | | - if (event.getSource() == clearColorsItem) |
---|
| 2406 | + if (source == clearColorsItem) |
---|
2339 | 2407 | { |
---|
2340 | 2408 | ClearColors(); |
---|
2341 | 2409 | } else |
---|
2342 | | - if (event.getSource() == clearMaterialsItem) |
---|
| 2410 | + if (source == clearMaterialsItem) |
---|
2343 | 2411 | { |
---|
2344 | 2412 | ClearMaterials(); |
---|
2345 | 2413 | } else |
---|
2346 | | - if (event.getSource() == liveleavesItem) |
---|
| 2414 | + if (source == liveleavesItem) |
---|
2347 | 2415 | { |
---|
2348 | 2416 | LiveLeaves(true); |
---|
2349 | 2417 | } else |
---|
2350 | | - if (event.getSource() == unliveleavesItem) |
---|
| 2418 | + if (source == unliveleavesItem) |
---|
2351 | 2419 | { |
---|
2352 | 2420 | LiveLeaves(false); |
---|
2353 | 2421 | } else |
---|
2354 | | - if (event.getSource() == supportleavesItem) |
---|
| 2422 | + if (source == supportleavesItem) |
---|
2355 | 2423 | { |
---|
2356 | 2424 | SupportLeaves(true); |
---|
2357 | 2425 | } else |
---|
2358 | | - if (event.getSource() == unsupportleavesItem) |
---|
| 2426 | + if (source == unsupportleavesItem) |
---|
2359 | 2427 | { |
---|
2360 | 2428 | SupportLeaves(false); |
---|
2361 | 2429 | } else |
---|
2362 | | - if (event.getSource() == hideleavesItem) |
---|
| 2430 | + if (source == hideleavesItem) |
---|
2363 | 2431 | { |
---|
2364 | 2432 | HideLeaves(true); |
---|
2365 | 2433 | } else |
---|
2366 | | - if (event.getSource() == showleavesItem) |
---|
| 2434 | + if (source == showleavesItem) |
---|
2367 | 2435 | { |
---|
2368 | 2436 | HideLeaves(false); |
---|
2369 | 2437 | } else |
---|
2370 | | - if (event.getSource() == markleavesItem) |
---|
| 2438 | + if (source == markleavesItem) |
---|
2371 | 2439 | { |
---|
2372 | 2440 | MarkLeaves(true); |
---|
2373 | 2441 | } else |
---|
2374 | | - if (event.getSource() == unmarkleavesItem) |
---|
| 2442 | + if (source == unmarkleavesItem) |
---|
2375 | 2443 | { |
---|
2376 | 2444 | MarkLeaves(false); |
---|
2377 | 2445 | } else |
---|
2378 | | - if (event.getSource() == flipVItem) |
---|
| 2446 | + if (source == flipVItem) |
---|
2379 | 2447 | { |
---|
2380 | 2448 | FlipV(true); |
---|
2381 | 2449 | } else |
---|
2382 | | - if (event.getSource() == unflipVItem) |
---|
| 2450 | + if (source == unflipVItem) |
---|
2383 | 2451 | { |
---|
2384 | 2452 | FlipV(false); |
---|
2385 | 2453 | } else |
---|
2386 | | - if (event.getSource() == lowTexturesItem) |
---|
| 2454 | + if (source == lowTexturesItem) |
---|
2387 | 2455 | { |
---|
2388 | 2456 | SetTexRes(0); |
---|
2389 | 2457 | } else |
---|
2390 | | - if (event.getSource() == normalTexturesItem) |
---|
| 2458 | + if (source == normalTexturesItem) |
---|
2391 | 2459 | { |
---|
2392 | 2460 | SetTexRes(1); |
---|
2393 | 2461 | } else |
---|
2394 | | - if (event.getSource() == highTexturesItem) |
---|
| 2462 | + if (source == highTexturesItem) |
---|
2395 | 2463 | { |
---|
2396 | 2464 | SetTexRes(2); |
---|
2397 | 2465 | } else |
---|
2398 | | - if (event.getSource() == veryhighTexturesItem) |
---|
| 2466 | + if (source == veryhighTexturesItem) |
---|
2399 | 2467 | { |
---|
2400 | 2468 | SetTexRes(3); |
---|
2401 | 2469 | } else |
---|
2402 | | - if (event.getSource() == maxTexturesItem) |
---|
| 2470 | + if (source == maxTexturesItem) |
---|
2403 | 2471 | { |
---|
2404 | 2472 | SetTexRes(4); |
---|
2405 | 2473 | } else |
---|
2406 | | - if (event.getSource() == panoTexturesItem) |
---|
| 2474 | + if (source == panoTexturesItem) |
---|
2407 | 2475 | { |
---|
2408 | 2476 | SetTexRes(5); |
---|
2409 | 2477 | } else |
---|
2410 | | - if (event.getSource() == reverseNormalsItem) |
---|
| 2478 | + if (source == reverseNormalsItem) |
---|
2411 | 2479 | { |
---|
2412 | 2480 | ReverseNormals(); |
---|
2413 | 2481 | } else |
---|
2414 | | - if (event.getSource() == parseverticesItem) |
---|
| 2482 | + if (source == parseverticesItem) |
---|
2415 | 2483 | { |
---|
2416 | 2484 | ParseVertices(); |
---|
2417 | 2485 | } else |
---|
2418 | | - if (event.getSource() == textureFieldItem) |
---|
| 2486 | + if (source == textureFieldItem) |
---|
2419 | 2487 | { |
---|
2420 | 2488 | TextureVertices(); |
---|
2421 | 2489 | } else |
---|
2422 | | - if (event.getSource() == alignItem) |
---|
| 2490 | + if (source == alignItem) |
---|
2423 | 2491 | { |
---|
2424 | 2492 | Align(); |
---|
2425 | 2493 | } else |
---|
2426 | | - if (event.getSource() == mirrorItem) |
---|
| 2494 | + if (source == mirrorItem) |
---|
2427 | 2495 | { |
---|
2428 | 2496 | MirrorPoses(); |
---|
2429 | 2497 | } else |
---|
2430 | | - if (event.getSource() == reduceMorphItem) |
---|
| 2498 | + if (source == reduceMorphItem) |
---|
2431 | 2499 | { |
---|
2432 | 2500 | MeshReduction(false); |
---|
2433 | 2501 | } else |
---|
2434 | | - if (event.getSource() == reduce34MorphItem) |
---|
| 2502 | + if (source == reduce34MorphItem) |
---|
2435 | 2503 | { |
---|
2436 | 2504 | MeshReduction(true); |
---|
2437 | 2505 | } else |
---|
2438 | | - if (event.getSource() == reverseTrianglesItem) |
---|
| 2506 | + if (source == reverseTrianglesItem) |
---|
2439 | 2507 | { |
---|
2440 | 2508 | ReverseTriangles(); |
---|
2441 | 2509 | } else |
---|
2442 | | - if (event.getSource() == reduceMeshItem) |
---|
| 2510 | + if (source == reduceMeshItem) |
---|
2443 | 2511 | { |
---|
2444 | 2512 | ReduceMesh(false); |
---|
2445 | 2513 | } else |
---|
2446 | | - if (event.getSource() == reduce34MeshItem) |
---|
| 2514 | + if (source == reduce34MeshItem) |
---|
2447 | 2515 | { |
---|
2448 | 2516 | ReduceMesh(true); |
---|
2449 | 2517 | } else |
---|
2450 | | - if (event.getSource() == increaseMeshItem) |
---|
| 2518 | + if (source == increaseMeshItem) |
---|
2451 | 2519 | { |
---|
2452 | 2520 | IncreaseMesh(); |
---|
2453 | 2521 | } else |
---|
2454 | | - if (event.getSource() == clipMeshItem) |
---|
| 2522 | + if (source == clipMeshItem) |
---|
2455 | 2523 | { |
---|
2456 | 2524 | ClipMesh(); |
---|
2457 | 2525 | } else |
---|
2458 | | - if (event.getSource() == smoothMeshItem) |
---|
| 2526 | + if (source == smoothMeshItem) |
---|
2459 | 2527 | { |
---|
2460 | 2528 | SmoothMesh(); |
---|
2461 | 2529 | } else |
---|
2462 | | - if (event.getSource() == transformgeometryItem) |
---|
| 2530 | + if (source == transformgeometryItem) |
---|
2463 | 2531 | { |
---|
2464 | 2532 | TransformGeometry(); |
---|
2465 | 2533 | } else |
---|
2466 | | - if (event.getSource() == resetTransformItem) |
---|
| 2534 | + if (source == resetTransformItem) |
---|
2467 | 2535 | { |
---|
2468 | 2536 | ResetTransform(); |
---|
2469 | 2537 | } else |
---|
2470 | | - if (event.getSource() == resetCentroidItem) |
---|
| 2538 | + if (source == resetCentroidItem) |
---|
2471 | 2539 | { |
---|
2472 | 2540 | ResetCentroid(); |
---|
2473 | 2541 | } else |
---|
2474 | | - if (event.getSource() == resetParentItem) |
---|
| 2542 | + if (source == resetParentItem) |
---|
2475 | 2543 | { |
---|
2476 | 2544 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2477 | 2545 | { |
---|
.. | .. |
---|
2481 | 2549 | |
---|
2482 | 2550 | refreshContents(); |
---|
2483 | 2551 | } else |
---|
2484 | | - if (event.getSource() == repairParentItem) |
---|
| 2552 | + if (source == repairParentItem) |
---|
2485 | 2553 | { |
---|
2486 | 2554 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2487 | 2555 | { |
---|
.. | .. |
---|
2495 | 2563 | |
---|
2496 | 2564 | refreshContents(); |
---|
2497 | 2565 | } else |
---|
2498 | | - if (event.getSource() == sortbysizeItem) |
---|
| 2566 | + if (source == repairShadowItem) |
---|
| 2567 | + { |
---|
| 2568 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 2569 | + { |
---|
| 2570 | + Object3D obj = (Object3D)e.nextElement(); |
---|
| 2571 | + obj.RepairShadow(); |
---|
| 2572 | +// for (int i=0; i<obj.size(); i++) |
---|
| 2573 | +// { |
---|
| 2574 | +// obj.get(i).parent = obj; |
---|
| 2575 | +// } |
---|
| 2576 | + } |
---|
| 2577 | + |
---|
| 2578 | + refreshContents(); |
---|
| 2579 | + } else |
---|
| 2580 | + if (source == sortbysizeItem) |
---|
2499 | 2581 | { |
---|
2500 | 2582 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2501 | 2583 | { |
---|
.. | .. |
---|
2507 | 2589 | ResetModel(); |
---|
2508 | 2590 | refreshContents(); |
---|
2509 | 2591 | } else |
---|
2510 | | - if (event.getSource() == sortbynameItem) |
---|
| 2592 | + if (source == sortbynameItem) |
---|
2511 | 2593 | { |
---|
2512 | 2594 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2513 | 2595 | { |
---|
.. | .. |
---|
2519 | 2601 | ResetModel(); |
---|
2520 | 2602 | refreshContents(); |
---|
2521 | 2603 | } else |
---|
2522 | | - if (event.getSource() == attachPigmentItem) |
---|
| 2604 | + if (source == attachPigmentItem) |
---|
2523 | 2605 | { |
---|
2524 | 2606 | String texture = GetFile("Attach pigment"); |
---|
2525 | 2607 | Object3D obj; |
---|
.. | .. |
---|
2531 | 2613 | |
---|
2532 | 2614 | refreshContents(); |
---|
2533 | 2615 | } else |
---|
2534 | | - if (event.getSource() == detachPigmentItem) |
---|
| 2616 | + if (source == detachPigmentItem) |
---|
2535 | 2617 | { |
---|
2536 | 2618 | Object3D obj; |
---|
2537 | 2619 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2542 | 2624 | |
---|
2543 | 2625 | refreshContents(); |
---|
2544 | 2626 | } else |
---|
2545 | | - if (event.getSource() == attachBumpItem) |
---|
| 2627 | + if (source == attachBumpItem) |
---|
2546 | 2628 | { |
---|
2547 | 2629 | String texture = GetFile("Attach bump"); |
---|
2548 | 2630 | Object3D obj; |
---|
.. | .. |
---|
2554 | 2636 | |
---|
2555 | 2637 | refreshContents(); |
---|
2556 | 2638 | } else |
---|
2557 | | - if (event.getSource() == detachBumpItem) |
---|
| 2639 | + if (source == detachBumpItem) |
---|
2558 | 2640 | { |
---|
2559 | 2641 | Object3D obj; |
---|
2560 | 2642 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2565 | 2647 | |
---|
2566 | 2648 | refreshContents(); |
---|
2567 | 2649 | } else |
---|
2568 | | - if (event.getSource() == pigmentBumpItem) |
---|
| 2650 | + if (source == pigmentBumpItem) |
---|
2569 | 2651 | { |
---|
2570 | 2652 | Object3D obj; |
---|
2571 | 2653 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2576 | 2658 | |
---|
2577 | 2659 | refreshContents(); |
---|
2578 | 2660 | } else |
---|
2579 | | - if (event.getSource() == flashSelectionButton) |
---|
| 2661 | + if (source == flashSelectionButton) |
---|
2580 | 2662 | { |
---|
2581 | 2663 | CameraPane.flash = true; |
---|
2582 | 2664 | refreshContents(); |
---|
2583 | 2665 | } else |
---|
2584 | | - if (event.getSource() == oneButton) |
---|
| 2666 | + if (source == oneButton) |
---|
2585 | 2667 | { |
---|
2586 | 2668 | } else |
---|
2587 | | - if (event.getSource() == twoButton) |
---|
| 2669 | + if (source == twoButton) |
---|
2588 | 2670 | { |
---|
2589 | 2671 | radio.layout = twoButton; |
---|
2590 | 2672 | // bug |
---|
2591 | 2673 | //gridPanel.setDividerLocation(1.0); |
---|
2592 | 2674 | //bigPanel.setDividerLocation(0.0); |
---|
2593 | | - bigThree.remove(jtp); |
---|
2594 | | - bigThree.remove(cameraPanel); |
---|
2595 | | - bigThree.remove(XYZPanel); |
---|
2596 | | - aWindowConstraints.gridx = 0; |
---|
2597 | | - aWindowConstraints.gridy = 0; |
---|
2598 | | - aWindowConstraints.gridwidth = 1; |
---|
2599 | | - // aConstraints.gridheight = 3; |
---|
2600 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2601 | | - aWindowConstraints.weightx = 0; |
---|
2602 | | - aWindowConstraints.weighty = 1; |
---|
2603 | | - //bigThree.add(jtp, aWindowConstraints); |
---|
2604 | | - aWindowConstraints.weightx = 1; |
---|
2605 | | - aWindowConstraints.gridwidth = 3; |
---|
2606 | | - // aConstraints.gridheight = 3; |
---|
2607 | | - aWindowConstraints.gridx = 1; |
---|
2608 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2609 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2610 | | - aWindowConstraints.weightx = 0; |
---|
2611 | | - aWindowConstraints.gridx = 4; |
---|
2612 | | - aWindowConstraints.gridwidth = 1; |
---|
2613 | | - // aConstraints.gridheight = 3; |
---|
2614 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2615 | | - //bigThree.add(XYZPanel, aWindowConstraints); |
---|
2616 | | - bigThree.revalidate(); |
---|
| 2675 | +// bigThree.remove(scenePanel); |
---|
| 2676 | +// bigThree.remove(centralPanel); |
---|
| 2677 | +// bigThree.remove(XYZPanel); |
---|
| 2678 | +// aWindowConstraints.gridx = 0; |
---|
| 2679 | +// aWindowConstraints.gridy = 0; |
---|
| 2680 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2681 | +// // aConstraints.gridheight = 3; |
---|
| 2682 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2683 | +// aWindowConstraints.weightx = 0; |
---|
| 2684 | +// aWindowConstraints.weighty = 1; |
---|
| 2685 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 2686 | +// aWindowConstraints.weightx = 1; |
---|
| 2687 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2688 | +// // aConstraints.gridheight = 3; |
---|
| 2689 | +// aWindowConstraints.gridx = 1; |
---|
| 2690 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2691 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2692 | +// aWindowConstraints.weightx = 0; |
---|
| 2693 | +// aWindowConstraints.gridx = 4; |
---|
| 2694 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2695 | +// // aConstraints.gridheight = 3; |
---|
| 2696 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2697 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2698 | +// scenePanel.setVisible(false); |
---|
| 2699 | +// centralPanel.setVisible(true); |
---|
| 2700 | +// XYZPanel.setVisible(false); |
---|
| 2701 | + bigThree.ClearUI(); |
---|
| 2702 | + bigThree.add(centralPanel); |
---|
| 2703 | + bigThree.FlushUI(); |
---|
2617 | 2704 | } else |
---|
2618 | | - if (event.getSource() == threeButton) |
---|
| 2705 | + if (source == threeButton) |
---|
2619 | 2706 | { |
---|
2620 | 2707 | radio.layout = threeButton; |
---|
2621 | | - bigThree.remove(jtp); |
---|
2622 | | - bigThree.remove(cameraPanel); |
---|
2623 | | - bigThree.remove(XYZPanel); |
---|
2624 | | - aWindowConstraints.gridx = 0; |
---|
2625 | | - aWindowConstraints.gridy = 0; |
---|
2626 | | - aWindowConstraints.gridwidth = 1; |
---|
2627 | | - // aConstraints.gridheight = 3; |
---|
2628 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2629 | | - aWindowConstraints.weightx = 0; |
---|
2630 | | - aWindowConstraints.weighty = 1; |
---|
2631 | | - //bigThree.add(jtp, aWindowConstraints); |
---|
2632 | | - aWindowConstraints.weightx = 1; |
---|
2633 | | - aWindowConstraints.gridwidth = 3; |
---|
2634 | | - // aConstraints.gridheight = 3; |
---|
2635 | | - aWindowConstraints.gridx = 1; |
---|
2636 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2637 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2638 | | - aWindowConstraints.weightx = 0; |
---|
2639 | | - aWindowConstraints.gridx = 4; |
---|
2640 | | - aWindowConstraints.gridwidth = 1; |
---|
2641 | | - // aConstraints.gridheight = 3; |
---|
2642 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2643 | | - bigThree.add(XYZPanel, aWindowConstraints); |
---|
2644 | | - bigThree.revalidate(); |
---|
| 2708 | + |
---|
| 2709 | +// bigThree.remove(scenePanel); |
---|
| 2710 | +// bigThree.remove(centralPanel); |
---|
| 2711 | +// bigThree.remove(XYZPanel); |
---|
| 2712 | +// aWindowConstraints.gridx = 0; |
---|
| 2713 | +// aWindowConstraints.gridy = 0; |
---|
| 2714 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2715 | +// // aConstraints.gridheight = 3; |
---|
| 2716 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2717 | +// aWindowConstraints.weightx = 0; |
---|
| 2718 | +// aWindowConstraints.weighty = 1; |
---|
| 2719 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 2720 | +// aWindowConstraints.weightx = 1; |
---|
| 2721 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2722 | +// // aConstraints.gridheight = 3; |
---|
| 2723 | +// aWindowConstraints.gridx = 1; |
---|
| 2724 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2725 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2726 | +// aWindowConstraints.weightx = 0; |
---|
| 2727 | +// aWindowConstraints.gridx = 4; |
---|
| 2728 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2729 | +// // aConstraints.gridheight = 3; |
---|
| 2730 | +// aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2731 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2732 | +// bigThree.validate(); |
---|
| 2733 | +// scenePanel.setVisible(false); |
---|
| 2734 | +// centralPanel.setVisible(true); |
---|
| 2735 | +// XYZPanel.setVisible(true); |
---|
| 2736 | + bigThree.ClearUI(); |
---|
| 2737 | + bigThree.add(centralPanel); |
---|
| 2738 | + bigThree.add(XYZPanel); |
---|
| 2739 | + bigThree.FlushUI(); |
---|
2645 | 2740 | } else |
---|
2646 | | - if (event.getSource() == fourButton) |
---|
| 2741 | + if (source == fourButton) |
---|
2647 | 2742 | { |
---|
2648 | 2743 | radio.layout = fourButton; |
---|
2649 | | - bigThree.remove(jtp); |
---|
2650 | | - bigThree.remove(cameraPanel); |
---|
2651 | | - bigThree.remove(XYZPanel); |
---|
2652 | | - aWindowConstraints.gridx = 0; |
---|
2653 | | - aWindowConstraints.gridy = 0; |
---|
2654 | | - aWindowConstraints.gridwidth = 1; |
---|
2655 | | - // aWindowConstraints.gridheight = 3; |
---|
2656 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2657 | | - aWindowConstraints.weightx = 1; |
---|
2658 | | - aWindowConstraints.weighty = 1; |
---|
2659 | | - bigThree.add(jtp, aWindowConstraints); |
---|
2660 | | - aWindowConstraints.weightx = 1; |
---|
2661 | | - aWindowConstraints.gridwidth = 3; |
---|
2662 | | - // aConstraints.gridheight = 3; |
---|
2663 | | - aWindowConstraints.gridx = 1; |
---|
2664 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2665 | | - //bigThree.add(cameraPanel, aWindowConstraints); |
---|
2666 | | - aWindowConstraints.weightx = 0; |
---|
2667 | | - aWindowConstraints.gridx = 4; |
---|
2668 | | - aWindowConstraints.gridwidth = 1; |
---|
2669 | | - // aWindowConstraints.gridheight = 3; |
---|
2670 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2671 | | - //bigThree.add(XYZPanel, aWindowConstraints); |
---|
2672 | | - bigThree.revalidate(); |
---|
| 2744 | + |
---|
| 2745 | +// bigThree.remove(scenePanel); |
---|
| 2746 | +// bigThree.remove(centralPanel); |
---|
| 2747 | +// bigThree.remove(XYZPanel); |
---|
| 2748 | +// aWindowConstraints.gridx = 0; |
---|
| 2749 | +// aWindowConstraints.gridy = 0; |
---|
| 2750 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2751 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2752 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2753 | +// aWindowConstraints.weightx = 1; |
---|
| 2754 | +// aWindowConstraints.weighty = 1; |
---|
| 2755 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2756 | +// aWindowConstraints.weightx = 1; |
---|
| 2757 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2758 | +// // aConstraints.gridheight = 3; |
---|
| 2759 | +// aWindowConstraints.gridx = 1; |
---|
| 2760 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2761 | +// //bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 2762 | +// aWindowConstraints.weightx = 0; |
---|
| 2763 | +// aWindowConstraints.gridx = 4; |
---|
| 2764 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2765 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2766 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2767 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2768 | +// bigThree.validate(); |
---|
| 2769 | +// scenePanel.setVisible(true); |
---|
| 2770 | +// centralPanel.setVisible(false); |
---|
| 2771 | +// XYZPanel.setVisible(false); |
---|
| 2772 | + bigThree.ClearUI(); |
---|
| 2773 | + bigThree.add(scenePanel); |
---|
| 2774 | + bigThree.FlushUI(); |
---|
2673 | 2775 | } else |
---|
2674 | | - if (event.getSource() == sixButton) |
---|
| 2776 | + if (source == sixButton) |
---|
2675 | 2777 | { |
---|
2676 | 2778 | radio.layout = sixButton; |
---|
2677 | | - bigThree.remove(jtp); |
---|
2678 | | - bigThree.remove(cameraPanel); |
---|
2679 | | - bigThree.remove(XYZPanel); |
---|
2680 | | - aWindowConstraints.gridx = 0; |
---|
2681 | | - aWindowConstraints.gridy = 0; |
---|
2682 | | - aWindowConstraints.gridwidth = 1; |
---|
2683 | | - // aConstraints.gridheight = 3; |
---|
2684 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2685 | | - aWindowConstraints.weightx = 0; |
---|
2686 | | - aWindowConstraints.weighty = 1; |
---|
2687 | | - bigThree.add(jtp, aWindowConstraints); |
---|
2688 | | - aWindowConstraints.weightx = 1; |
---|
2689 | | - aWindowConstraints.gridwidth = 3; |
---|
2690 | | - // aWindowConstraints.gridheight = 3; |
---|
2691 | | - aWindowConstraints.gridx = 1; |
---|
2692 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2693 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2694 | | - aWindowConstraints.weightx = 0; |
---|
2695 | | - aWindowConstraints.gridx = 4; |
---|
2696 | | - aWindowConstraints.gridwidth = 1; |
---|
2697 | | - // aWindowConstraints.gridheight = 3; |
---|
2698 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2699 | | - //bigThree.add(XYZPanel, aConstraints); |
---|
2700 | | - bigThree.revalidate(); |
---|
| 2779 | + |
---|
| 2780 | +// bigThree.remove(scenePanel); |
---|
| 2781 | +// bigThree.remove(centralPanel); |
---|
| 2782 | +// bigThree.remove(XYZPanel); |
---|
| 2783 | +// aWindowConstraints.gridx = 0; |
---|
| 2784 | +// aWindowConstraints.gridy = 0; |
---|
| 2785 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2786 | +// // aConstraints.gridheight = 3; |
---|
| 2787 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2788 | +// aWindowConstraints.weightx = 0; |
---|
| 2789 | +// aWindowConstraints.weighty = 1; |
---|
| 2790 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2791 | +// aWindowConstraints.weightx = 1; |
---|
| 2792 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2793 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2794 | +// aWindowConstraints.gridx = 1; |
---|
| 2795 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2796 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2797 | +// aWindowConstraints.weightx = 0; |
---|
| 2798 | +// aWindowConstraints.gridx = 4; |
---|
| 2799 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2800 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2801 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2802 | +// //bigThree.add(XYZPanel, aConstraints); |
---|
| 2803 | +// bigThree.validate(); |
---|
| 2804 | +// scenePanel.setVisible(true); |
---|
| 2805 | +// centralPanel.setVisible(true); |
---|
| 2806 | +// XYZPanel.setVisible(false); |
---|
| 2807 | + bigThree.ClearUI(); |
---|
| 2808 | + bigThree.add(scenePanel); |
---|
| 2809 | + bigThree.add(centralPanel); |
---|
| 2810 | + bigThree.FlushUI(); |
---|
2701 | 2811 | } else |
---|
2702 | | - if (event.getSource() == sevenButton) |
---|
| 2812 | + if (source == sevenButton) |
---|
2703 | 2813 | { |
---|
2704 | 2814 | radio.layout = sevenButton; |
---|
2705 | | - bigThree.remove(jtp); |
---|
2706 | | - bigThree.remove(cameraPanel); |
---|
2707 | | - bigThree.remove(XYZPanel); |
---|
2708 | | - aWindowConstraints.gridx = 0; |
---|
2709 | | - aWindowConstraints.gridy = 0; |
---|
2710 | | - aWindowConstraints.gridwidth = 1; |
---|
2711 | | - // aWindowConstraints.gridheight = 3; |
---|
2712 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2713 | | - aWindowConstraints.weightx = 0; |
---|
2714 | | - aWindowConstraints.weighty = 1; |
---|
2715 | | - bigThree.add(jtp, aWindowConstraints); |
---|
2716 | | - aWindowConstraints.weightx = 1; |
---|
2717 | | - aWindowConstraints.gridwidth = 3; |
---|
2718 | | - // aWindowConstraints.gridheight = 3; |
---|
2719 | | - aWindowConstraints.gridx = 1; |
---|
2720 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2721 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2722 | | - aWindowConstraints.weightx = 0; |
---|
2723 | | - aWindowConstraints.gridx = 4; |
---|
2724 | | - aWindowConstraints.gridwidth = 1; |
---|
2725 | | - // aConstraints.gridheight = 3; |
---|
2726 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2727 | | - bigThree.add(XYZPanel, aWindowConstraints); |
---|
2728 | | - bigThree.revalidate(); |
---|
| 2815 | + |
---|
| 2816 | +// bigThree.remove(scenePanel); |
---|
| 2817 | +// bigThree.remove(centralPanel); |
---|
| 2818 | +// bigThree.remove(XYZPanel); |
---|
| 2819 | +// aWindowConstraints.gridx = 0; |
---|
| 2820 | +// aWindowConstraints.gridy = 0; |
---|
| 2821 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2822 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2823 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2824 | +// aWindowConstraints.weightx = 0; |
---|
| 2825 | +// aWindowConstraints.weighty = 1; |
---|
| 2826 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2827 | +// aWindowConstraints.weightx = 1; |
---|
| 2828 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2829 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2830 | +// aWindowConstraints.gridx = 1; |
---|
| 2831 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2832 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2833 | +// aWindowConstraints.weightx = 0; |
---|
| 2834 | +// aWindowConstraints.gridx = 4; |
---|
| 2835 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2836 | +// // aConstraints.gridheight = 3; |
---|
| 2837 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2838 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2839 | +// bigThree.validate(); |
---|
| 2840 | +// scenePanel.setVisible(true); |
---|
| 2841 | +// centralPanel.setVisible(true); |
---|
| 2842 | +// XYZPanel.setVisible(true); |
---|
| 2843 | + bigThree.ClearUI(); |
---|
| 2844 | + bigThree.add(scenePanel); |
---|
| 2845 | + bigThree.add(centralPanel); |
---|
| 2846 | + bigThree.add(XYZPanel); |
---|
| 2847 | + bigThree.FlushUI(); |
---|
2729 | 2848 | } else |
---|
2730 | | - if (event.getSource() == rootButton) |
---|
| 2849 | + if (source == rootButton) |
---|
2731 | 2850 | { |
---|
2732 | 2851 | Object3D obj; |
---|
2733 | 2852 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2739 | 2858 | |
---|
2740 | 2859 | refreshContents(true); |
---|
2741 | 2860 | } else |
---|
2742 | | - if (event.getSource() == closeButton) |
---|
| 2861 | + if (source == closeButton) |
---|
2743 | 2862 | { |
---|
2744 | 2863 | //System.out.println("CLOSE: " + buttonGroup.getSelection()); |
---|
2745 | 2864 | cRadio ab; |
---|
.. | .. |
---|
2760 | 2879 | } |
---|
2761 | 2880 | refreshContents(true); |
---|
2762 | 2881 | } else |
---|
2763 | | - if (event.getSource() == editItem || event.getSource() == editButton) |
---|
| 2882 | + if (source == editItem || source == editButton) |
---|
2764 | 2883 | { |
---|
2765 | 2884 | EditSelection(false); |
---|
2766 | 2885 | } else |
---|
2767 | | - if (event.getSource() == uneditButton) |
---|
| 2886 | + if (source == uneditButton) |
---|
2768 | 2887 | { |
---|
2769 | 2888 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2770 | 2889 | { |
---|
.. | .. |
---|
2776 | 2895 | |
---|
2777 | 2896 | child.editWindow = null; // ??????????? |
---|
2778 | 2897 | } |
---|
2779 | | - objEditor.ctrlPanel.revalidate(); |
---|
| 2898 | + objEditor.ctrlPanel.validate(); |
---|
2780 | 2899 | //objEditor.jTree.clearSelection(); |
---|
2781 | 2900 | //objEditor.ResetSliders(); |
---|
2782 | 2901 | refreshContents(true); |
---|
2783 | 2902 | } else |
---|
2784 | | - if (event.getSource() == clearPanelButton) |
---|
| 2903 | + if (source == clearPanelButton) |
---|
2785 | 2904 | { |
---|
2786 | 2905 | assert(copy == group); |
---|
2787 | 2906 | //copy.ClearUI(); |
---|
.. | .. |
---|
2792 | 2911 | listUI.clear(); |
---|
2793 | 2912 | refreshContents(true); |
---|
2794 | 2913 | } else |
---|
2795 | | - if (event.getSource() == allParamsButton) |
---|
| 2914 | + if (source == allParamsButton) |
---|
2796 | 2915 | { |
---|
2797 | 2916 | assert(copy == group); |
---|
2798 | 2917 | |
---|
.. | .. |
---|
2813 | 2932 | |
---|
2814 | 2933 | refreshContents(true); |
---|
2815 | 2934 | } else |
---|
2816 | | - if (event.getSource() == unselectButton) |
---|
| 2935 | + if (source == unselectButton) |
---|
2817 | 2936 | { |
---|
2818 | 2937 | objEditor.jTree.clearSelection(); |
---|
2819 | 2938 | // ?? oct 2012 GrafreeD.clipboard.clear(); |
---|
2820 | 2939 | objEditor.ResetSliders(); |
---|
2821 | 2940 | refreshContents(true); |
---|
2822 | 2941 | } else |
---|
2823 | | - if(event.getSource() instanceof cRadio) |
---|
| 2942 | + if(source instanceof cRadio) |
---|
2824 | 2943 | { |
---|
2825 | 2944 | group.parent = keepparent; |
---|
2826 | 2945 | group.attributes = 0; |
---|
2827 | 2946 | //group.editWindow = null; |
---|
2828 | | - /*cRadio*/ radio = (cRadio)event.getSource(); |
---|
| 2947 | + /*cRadio*/ radio = (cRadio)source; |
---|
2829 | 2948 | Object3D obj = radio.GetObject(); |
---|
2830 | 2949 | System.out.println("Edit " + obj); |
---|
2831 | 2950 | if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite) |
---|
.. | .. |
---|
2845 | 2964 | } |
---|
2846 | 2965 | |
---|
2847 | 2966 | copy = group; |
---|
2848 | | - //CameraPane.theRenderer.object = group; |
---|
| 2967 | + //Globals.theRenderer.object = group; |
---|
2849 | 2968 | if(!useclient) |
---|
2850 | 2969 | { |
---|
2851 | 2970 | cameraView.renderCamera = radio.camera; |
---|
.. | .. |
---|
2854 | 2973 | cameraView.cameras[cameraView.cameracount] = radio.camera; |
---|
2855 | 2974 | cameraView.targetLookAt.set(radio.camera.lookAt); |
---|
2856 | 2975 | cameraView.object = group; |
---|
2857 | | - cameraView.lighttouched = true; |
---|
| 2976 | + //cameraView.lighttouched = true; |
---|
| 2977 | + Globals.lighttouched = true; |
---|
2858 | 2978 | topView.object = group; |
---|
2859 | 2979 | frontView.object = group; |
---|
2860 | 2980 | sideView.object = group; |
---|
.. | .. |
---|
2890 | 3010 | if (useclient) |
---|
2891 | 3011 | { |
---|
2892 | 3012 | cameraView.object = client; |
---|
2893 | | - cameraView.lighttouched = true; |
---|
| 3013 | + Globals.lighttouched = true; |
---|
2894 | 3014 | //topView.object = client; |
---|
2895 | 3015 | //frontView.object = client; |
---|
2896 | 3016 | //sideView.object = client; |
---|
.. | .. |
---|
2898 | 3018 | else |
---|
2899 | 3019 | { |
---|
2900 | 3020 | cameraView.object = group; |
---|
2901 | | - cameraView.lighttouched = true; |
---|
| 3021 | + Globals.lighttouched = true; |
---|
2902 | 3022 | //topView.object = group; |
---|
2903 | 3023 | //frontView.object = group; |
---|
2904 | 3024 | //sideView.object = group; |
---|
.. | .. |
---|
3179 | 3299 | refreshContents(); |
---|
3180 | 3300 | } |
---|
3181 | 3301 | |
---|
| 3302 | + void GenNormalsMINE() |
---|
| 3303 | + { |
---|
| 3304 | + group.selection.GenNormalsMINE(); |
---|
| 3305 | + |
---|
| 3306 | + refreshContents(); |
---|
| 3307 | + } |
---|
| 3308 | + |
---|
3182 | 3309 | void Stripify() |
---|
3183 | 3310 | { |
---|
3184 | 3311 | group.StripifyS(); |
---|
.. | .. |
---|
3399 | 3526 | String pigment = Object3D.GetPigment(tex); |
---|
3400 | 3527 | //String bump = Object3D.GetBump(tex); |
---|
3401 | 3528 | |
---|
3402 | | - com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3529 | + com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
3403 | 3530 | |
---|
3404 | 3531 | double s = v.s; |
---|
3405 | 3532 | |
---|
.. | .. |
---|
3447 | 3574 | |
---|
3448 | 3575 | void Align() |
---|
3449 | 3576 | { |
---|
| 3577 | + if (group.selection.size() == 0) |
---|
| 3578 | + return; |
---|
| 3579 | + |
---|
| 3580 | + cVector bbmin = new cVector(); |
---|
| 3581 | + cVector bbmax = new cVector(); |
---|
| 3582 | + |
---|
| 3583 | + group.selection.get(0).getBounds(bbmin, bbmax, true); |
---|
| 3584 | + |
---|
| 3585 | + double dx = bbmax.x - bbmin.x; |
---|
| 3586 | + double dy = bbmax.y - bbmin.y; |
---|
| 3587 | + double dz = bbmax.z - bbmin.z; |
---|
| 3588 | + |
---|
| 3589 | + double scale = Math.sqrt(dx*dx + dy*dy + dz*dz); |
---|
| 3590 | + |
---|
3450 | 3591 | for (int i=0; i<group.selection.size(); i++) |
---|
3451 | 3592 | { |
---|
3452 | 3593 | Object3D obj = group.selection.get(i); |
---|
3453 | 3594 | |
---|
3454 | | - LA.matTranslate(obj.toParent, i/2f, 0, 0); |
---|
3455 | | - LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0); |
---|
| 3595 | + LA.matTranslate(obj.toParent, i * scale, 0, 0); |
---|
| 3596 | + LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0); |
---|
3456 | 3597 | } |
---|
3457 | 3598 | |
---|
3458 | 3599 | refreshContents(); |
---|
.. | .. |
---|
3686 | 3827 | group.selection.RelinkToSupport(); // july 2014 |
---|
3687 | 3828 | System.out.println("DONE."); |
---|
3688 | 3829 | refreshContents(); |
---|
3689 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 3830 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
3690 | 3831 | } |
---|
3691 | 3832 | |
---|
3692 | 3833 | void ReduceMesh(boolean reduction34) |
---|
.. | .. |
---|
3962 | 4103 | System.err.println("info : " + child.GetPath()); |
---|
3963 | 4104 | } |
---|
3964 | 4105 | } |
---|
3965 | | - else |
---|
3966 | | - { |
---|
3967 | | - objEditor.SetMaterial(group); // .GetMaterial()); |
---|
3968 | | - objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
3969 | | - System.err.println("info : " + group.GetPath()); |
---|
3970 | | - } |
---|
| 4106 | +// else |
---|
| 4107 | +// { |
---|
| 4108 | +// objEditor.SetMaterial(group); // .GetMaterial()); |
---|
| 4109 | +// objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
| 4110 | +// System.err.println("info : " + group.GetPath()); |
---|
| 4111 | +// } |
---|
3971 | 4112 | |
---|
3972 | 4113 | objEditor.SetText(); // jan 2014 |
---|
3973 | 4114 | |
---|
3974 | | - if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
| 4115 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
3975 | 4116 | CameraPane.flash = true; |
---|
3976 | 4117 | |
---|
3977 | 4118 | if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera) |
---|
3978 | 4119 | // a camera |
---|
3979 | 4120 | { |
---|
3980 | 4121 | CameraPane.camerachangeframe = 0; // don't refuse it |
---|
3981 | | - CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
3982 | | - // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera; |
---|
3983 | | - // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera; |
---|
| 4122 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4123 | + // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
| 4124 | + // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
3984 | 4125 | } |
---|
3985 | 4126 | |
---|
3986 | 4127 | refreshContents(); |
---|
.. | .. |
---|
4474 | 4615 | makeSomething(csg); |
---|
4475 | 4616 | } |
---|
4476 | 4617 | |
---|
| 4618 | + void Ungroup(Object3D g) |
---|
| 4619 | + { |
---|
| 4620 | + if (g instanceof HiddenObject) |
---|
| 4621 | + { |
---|
| 4622 | + HiddenObject h = (HiddenObject) g; |
---|
| 4623 | + |
---|
| 4624 | + for (int i=0; i<h.ActualSize(); i++) |
---|
| 4625 | + { |
---|
| 4626 | + objEditor.makeSomething(h.get(i), false); |
---|
| 4627 | + } |
---|
| 4628 | + } |
---|
| 4629 | + else |
---|
| 4630 | + { |
---|
| 4631 | + for (int i=0; i<g.Size(); i++) |
---|
| 4632 | + { |
---|
| 4633 | + objEditor.makeSomething(g.get(i), false); |
---|
| 4634 | + } |
---|
| 4635 | + } |
---|
| 4636 | + } |
---|
| 4637 | + |
---|
4477 | 4638 | void ungroup() |
---|
4478 | 4639 | { |
---|
4479 | 4640 | /* |
---|
.. | .. |
---|
4833 | 4994 | private MenuItem resetsupportItem; |
---|
4834 | 4995 | private MenuItem resetreferencesItem; |
---|
4835 | 4996 | private MenuItem linkverticesItem; |
---|
| 4997 | + private MenuItem relinkverticesItem; |
---|
4836 | 4998 | private MenuItem setMasterItem; |
---|
4837 | 4999 | private MenuItem resetMeshItem; |
---|
4838 | 5000 | private MenuItem stepAllItem; |
---|
.. | .. |
---|
4854 | 5016 | private MenuItem genNormalsMESHItem; |
---|
4855 | 5017 | private MenuItem genNormalsCADItem; |
---|
4856 | 5018 | private MenuItem genNormalsORGANItem; |
---|
| 5019 | + private MenuItem genNormalsMINEItem; |
---|
4857 | 5020 | private MenuItem stripifyItem; |
---|
4858 | 5021 | private MenuItem unstripifyItem; |
---|
4859 | 5022 | private MenuItem trimItem; |
---|
.. | .. |
---|
4895 | 5058 | private MenuItem resetCentroidItem; |
---|
4896 | 5059 | private MenuItem transformgeometryItem; |
---|
4897 | 5060 | private MenuItem resetTransformItem; |
---|
| 5061 | + private MenuItem hideItem; |
---|
4898 | 5062 | private MenuItem grabItem; |
---|
4899 | 5063 | private MenuItem backItem; |
---|
4900 | 5064 | private MenuItem frontItem; |
---|
.. | .. |
---|
4915 | 5079 | |
---|
4916 | 5080 | private MenuItem resetParentItem; |
---|
4917 | 5081 | private MenuItem repairParentItem; |
---|
| 5082 | + private MenuItem repairShadowItem; |
---|
4918 | 5083 | private MenuItem sortbysizeItem; |
---|
4919 | 5084 | private MenuItem sortbynameItem; |
---|
4920 | 5085 | |
---|
.. | .. |
---|
4935 | 5100 | private MenuItem coneItem; |
---|
4936 | 5101 | private MenuItem torusItem; |
---|
4937 | 5102 | private MenuItem superItem; |
---|
| 5103 | + private MenuItem kleinItem; |
---|
4938 | 5104 | private MenuItem blobItem; |
---|
4939 | 5105 | private MenuItem latheItem; |
---|
4940 | 5106 | private MenuItem bezierItem; |
---|
.. | .. |
---|
4947 | 5113 | private MenuItem csgItem; |
---|
4948 | 5114 | private MenuItem templateItem; |
---|
4949 | 5115 | private MenuItem textureItem; |
---|
| 5116 | + private MenuItem billboardItem; |
---|
4950 | 5117 | private MenuItem shadowXItem; |
---|
4951 | 5118 | private MenuItem shadowYItem; |
---|
4952 | 5119 | private MenuItem shadowZItem; |
---|