.. | .. |
---|
176 | 176 | copyItem.addActionListener(this); |
---|
177 | 177 | pasteItem = menu.add(new MenuItem("Paste")); |
---|
178 | 178 | pasteItem.addActionListener(this); |
---|
179 | | - menu.add("-"); |
---|
180 | 179 | |
---|
181 | 180 | menu.add("-"); |
---|
182 | 181 | pasteIntoItem = menu.add(new MenuItem("Paste into")); |
---|
.. | .. |
---|
246 | 245 | |
---|
247 | 246 | cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
248 | 247 | toggleDebugItem.addItemListener(this); |
---|
249 | | - toggleDebugItem.setState(CameraPane.DEBUG); |
---|
| 248 | + toggleDebugItem.setState(Globals.DEBUG); |
---|
250 | 249 | |
---|
251 | 250 | cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
252 | 251 | toggleFrustumItem.addItemListener(this); |
---|
.. | .. |
---|
369 | 368 | billboardItem.addActionListener(this); |
---|
370 | 369 | csgItem = menu.add(new MenuItem("CSG")); |
---|
371 | 370 | csgItem.addActionListener(this); |
---|
372 | | - shadowXItem = menu.add(new MenuItem("Shadow X")); |
---|
| 371 | + shadowXItem = menu.add(new MenuItem("Shadow Red")); |
---|
373 | 372 | shadowXItem.addActionListener(this); |
---|
374 | | - shadowYItem = menu.add(new MenuItem("Shadow Y")); |
---|
| 373 | + shadowYItem = menu.add(new MenuItem("Shadow Green")); |
---|
375 | 374 | shadowYItem.addActionListener(this); |
---|
376 | | - shadowZItem = menu.add(new MenuItem("Shadow Z")); |
---|
| 375 | + shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
377 | 376 | shadowZItem.addActionListener(this); |
---|
378 | 377 | if (Globals.ADVANCED) |
---|
379 | 378 | { |
---|
.. | .. |
---|
470 | 469 | markleavesItem.addActionListener(this); |
---|
471 | 470 | unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves")); |
---|
472 | 471 | unmarkleavesItem.addActionListener(this); |
---|
| 472 | + rewindleavesItem = menu.add(new MenuItem("Rewind Leaves")); |
---|
| 473 | + rewindleavesItem.addActionListener(this); |
---|
| 474 | + unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves")); |
---|
| 475 | + unrewindleavesItem.addActionListener(this); |
---|
| 476 | + randomleavesItem = menu.add(new MenuItem("Random Leaves")); |
---|
| 477 | + randomleavesItem.addActionListener(this); |
---|
| 478 | + unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves")); |
---|
| 479 | + unrandomleavesItem.addActionListener(this); |
---|
473 | 480 | menu.add("-"); |
---|
474 | 481 | flipVItem = menu.add(new MenuItem("Flip V")); |
---|
475 | 482 | flipVItem.addActionListener(this); |
---|
.. | .. |
---|
527 | 534 | |
---|
528 | 535 | void SetupUI2(ObjEditor oe) |
---|
529 | 536 | { |
---|
| 537 | + // June 2019 |
---|
| 538 | + if (oe == null) |
---|
| 539 | + { |
---|
| 540 | + //super.SetupUI2(this); |
---|
| 541 | + //return; |
---|
| 542 | + } |
---|
| 543 | + |
---|
| 544 | + if (copy != group) |
---|
| 545 | + { |
---|
| 546 | + //super.SetupUI2(this); |
---|
| 547 | + } |
---|
| 548 | + |
---|
530 | 549 | //new Exception().printStackTrace(); |
---|
531 | 550 | |
---|
532 | 551 | oe.radioPanel = new JPanel(new GridBagLayout()); |
---|
.. | .. |
---|
557 | 576 | */ |
---|
558 | 577 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
559 | 578 | |
---|
560 | | - oe.toolbarPanel.add(undoButton = new cButton("Undo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 579 | + //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 580 | + //minButton.setToolTipText("Minimize window"); |
---|
| 581 | + //minButton.addActionListener(this); |
---|
| 582 | + |
---|
| 583 | + oe.toolbarPanel.add(maxButton = new cButton("\u271A", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 584 | + maxButton.setToolTipText("Maximize window"); |
---|
| 585 | + maxButton.addActionListener(this); |
---|
| 586 | + |
---|
| 587 | + oe.toolbarPanel.add(fullButton = new cButton("\u2b1c", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 588 | + fullButton.setToolTipText("Full-screen window"); |
---|
| 589 | + fullButton.addActionListener(this); |
---|
| 590 | + |
---|
| 591 | + oe.toolbarPanel.add(undoButton = new cButton("\u21a9", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
561 | 592 | undoButton.setToolTipText("Undo changes"); |
---|
562 | 593 | undoButton.addActionListener(this); |
---|
563 | 594 | |
---|
564 | | - oe.toolbarPanel.add(redoButton = new cButton("Redo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 595 | + oe.toolbarPanel.add(redoButton = new cButton("\u21aa", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
565 | 596 | redoButton.setToolTipText("Redo changes"); |
---|
566 | 597 | redoButton.addActionListener(this); |
---|
567 | 598 | |
---|
568 | | - oe.toolbarPanel.add(saveButton = new cButton("Save", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 599 | + oe.toolbarPanel.add(saveButton = new cButton("\u21e3", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
569 | 600 | saveButton.setToolTipText("Save changes"); |
---|
570 | 601 | saveButton.addActionListener(this); |
---|
571 | 602 | |
---|
.. | .. |
---|
573 | 604 | liveCB.setToolTipText("Enable animation"); |
---|
574 | 605 | liveCB.addItemListener(this); |
---|
575 | 606 | |
---|
576 | | - oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 607 | + oe.toolbarPanel.add(oneStepButton = new cButton("\u29f4", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
577 | 608 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
578 | 609 | oneStepButton.addActionListener(this); |
---|
579 | 610 | |
---|
.. | .. |
---|
581 | 612 | fastCB.setToolTipText("Fast mode"); |
---|
582 | 613 | fastCB.addItemListener(this); |
---|
583 | 614 | |
---|
584 | | - oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 615 | + oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK)); //, oe.aConstraints); |
---|
585 | 616 | trackCB.setToolTipText("Enable tracking"); |
---|
586 | 617 | trackCB.addItemListener(this); |
---|
587 | 618 | |
---|
.. | .. |
---|
605 | 636 | |
---|
606 | 637 | oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
607 | 638 | |
---|
608 | | - oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 639 | + oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
609 | 640 | twoButton.setToolTipText("Show center view only"); |
---|
610 | 641 | twoButton.addActionListener(this); |
---|
611 | | - oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 642 | + oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
612 | 643 | fourButton.addActionListener(this); |
---|
613 | 644 | fourButton.setToolTipText("Show left panel only"); |
---|
614 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 645 | + oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
615 | 646 | sixButton.setToolTipText("2-column layout left"); |
---|
616 | 647 | sixButton.addActionListener(this); |
---|
617 | | - oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 648 | + oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
618 | 649 | threeButton.setToolTipText("2-column layout right"); |
---|
619 | 650 | threeButton.addActionListener(this); |
---|
620 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 651 | + oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
621 | 652 | sevenButton.setToolTipText("3-column layout"); |
---|
622 | 653 | sevenButton.addActionListener(this); |
---|
623 | 654 | // |
---|
.. | .. |
---|
632 | 663 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
633 | 664 | //clearButton.addActionListener(this); |
---|
634 | 665 | |
---|
635 | | - cGridBag commandsPanel = new cGridBag(); |
---|
636 | | - |
---|
637 | | - commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 666 | + editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
638 | 667 | editButton.setToolTipText("Edit selection"); |
---|
639 | 668 | editButton.addActionListener(this); |
---|
640 | 669 | |
---|
641 | | - commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 670 | + editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
642 | 671 | uneditButton.setToolTipText("Unedit selection"); |
---|
643 | 672 | uneditButton.addActionListener(this); |
---|
644 | 673 | |
---|
645 | | - commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 674 | + editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
646 | 675 | allParamsButton.setToolTipText("Edit all params"); |
---|
647 | 676 | allParamsButton.addActionListener(this); |
---|
648 | 677 | |
---|
649 | | - commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 678 | + editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
650 | 679 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
651 | 680 | clearPanelButton.addActionListener(this); |
---|
652 | 681 | |
---|
653 | | - commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 682 | + editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
654 | 683 | unselectButton.setToolTipText("Unselect"); |
---|
655 | 684 | unselectButton.addActionListener(this); |
---|
656 | 685 | |
---|
657 | | - commandsPanel.preferredHeight = 1; |
---|
| 686 | + editCommandsPanel.preferredHeight = 1; |
---|
658 | 687 | |
---|
659 | | - oe.treePanel.add(commandsPanel); |
---|
660 | | - oe.treePanel.Return(); |
---|
| 688 | +// oe.treePanel.add(commandsPanel); |
---|
| 689 | +// oe.treePanel.Return(); |
---|
661 | 690 | |
---|
662 | 691 | // oe.aConstraints.gridx += 1; |
---|
663 | 692 | // oe.aConstraints.weighty = 0; |
---|
.. | .. |
---|
779 | 808 | // debugCB.addItemListener(this); |
---|
780 | 809 | |
---|
781 | 810 | panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
| 811 | + oeilCB.setToolTipText("Move camera when tracking target"); |
---|
782 | 812 | oeilCB.addItemListener(this); |
---|
783 | 813 | |
---|
| 814 | + panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
| 815 | + shadowCB.setToolTipText("Compute shadows when live"); |
---|
| 816 | + shadowCB.addItemListener(this); |
---|
| 817 | + |
---|
| 818 | + if (Globals.ADVANCED) |
---|
| 819 | + { |
---|
784 | 820 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
785 | 821 | lookAtCB.setToolTipText("Look-at target"); |
---|
786 | 822 | lookAtCB.addItemListener(this); |
---|
| 823 | + } |
---|
787 | 824 | |
---|
788 | 825 | } |
---|
789 | 826 | |
---|
.. | .. |
---|
798 | 835 | void EditObject(Object3D obj) |
---|
799 | 836 | { |
---|
800 | 837 | cRadio radioButton = new cRadio(obj.name); |
---|
| 838 | + |
---|
| 839 | + // Patch to avoid bug with transparency. |
---|
| 840 | + radioButton.hadMaterial = obj.material != null; |
---|
| 841 | + if (!radioButton.hadMaterial) |
---|
| 842 | + { |
---|
| 843 | + obj.material = new cMaterial(); |
---|
| 844 | + } |
---|
| 845 | + |
---|
801 | 846 | radioButton.SetObject(obj); |
---|
802 | 847 | radioButton.layout = sevenButton; |
---|
803 | 848 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
.. | .. |
---|
809 | 854 | |
---|
810 | 855 | void SetupViews(ObjEditor oe) |
---|
811 | 856 | { |
---|
| 857 | + theFrame = this; |
---|
| 858 | + |
---|
812 | 859 | oe.SetupViews(); |
---|
813 | 860 | |
---|
814 | 861 | System.out.println("SetupViews"); |
---|
.. | .. |
---|
832 | 879 | JCheckBox speakerCameraCB; |
---|
833 | 880 | JCheckBox speakerFocusCB; |
---|
834 | 881 | JCheckBox debugCB; |
---|
| 882 | + |
---|
835 | 883 | JCheckBox oeilCB; |
---|
| 884 | + JCheckBox shadowCB; |
---|
836 | 885 | JCheckBox lookAtCB; |
---|
837 | 886 | |
---|
838 | 887 | // static int COLOR = 1; |
---|
.. | .. |
---|
871 | 920 | } else if(e.getSource() == liveCB) |
---|
872 | 921 | { |
---|
873 | 922 | cameraView.ToggleLive(); |
---|
| 923 | + refreshContents(false); |
---|
874 | 924 | } |
---|
875 | 925 | else if(e.getSource() == supportCB) |
---|
876 | 926 | { |
---|
.. | .. |
---|
934 | 984 | else if(e.getSource() == oeilCB) |
---|
935 | 985 | { |
---|
936 | 986 | cameraView.ToggleOeil(); |
---|
| 987 | + } |
---|
| 988 | + else if(e.getSource() == shadowCB) |
---|
| 989 | + { |
---|
| 990 | + Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
937 | 991 | } |
---|
938 | 992 | else if(e.getSource() == lookAtCB) |
---|
939 | 993 | { |
---|
.. | .. |
---|
1278 | 1332 | memoryItem.addActionListener(this); |
---|
1279 | 1333 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1280 | 1334 | analyzeItem.addActionListener(this); |
---|
1281 | | - menu.add(dumpItem = new MenuItem("Dump")); |
---|
| 1335 | + menu.add(dumpItem = new MenuItem("Print")); |
---|
1282 | 1336 | dumpItem.addActionListener(this); |
---|
1283 | 1337 | // menu.add(pathItem = new MenuItem("From-to path")); |
---|
1284 | 1338 | // pathItem.addActionListener(this); |
---|
.. | .. |
---|
1419 | 1473 | shadow.material = new cMaterial(obj.material); |
---|
1420 | 1474 | shadow.material.diffuse = 0.0001f; |
---|
1421 | 1475 | shadow.material.specular = 0.0001f; |
---|
| 1476 | + //shadow.projectedVertices[1].x = 300; |
---|
1422 | 1477 | |
---|
1423 | 1478 | makeSomething(shadow); |
---|
1424 | 1479 | } |
---|
.. | .. |
---|
1968 | 2023 | if (source == dumpItem) |
---|
1969 | 2024 | { |
---|
1970 | 2025 | DumpObject(); |
---|
| 2026 | + } else |
---|
| 2027 | + if (source == minButton) |
---|
| 2028 | + { |
---|
| 2029 | + Minimize(); |
---|
| 2030 | + } else |
---|
| 2031 | + if (source == maxButton) |
---|
| 2032 | + { |
---|
| 2033 | + Maximize(); |
---|
| 2034 | + } else |
---|
| 2035 | + if (source == fullButton) |
---|
| 2036 | + { |
---|
| 2037 | + ToggleFullScreen(); |
---|
1971 | 2038 | } else |
---|
1972 | 2039 | if (source == undoButton) |
---|
1973 | 2040 | { |
---|
.. | .. |
---|
2542 | 2609 | } else |
---|
2543 | 2610 | if (source == genNormalsMESHItem) |
---|
2544 | 2611 | { |
---|
2545 | | - GenNormals(true); // TODO |
---|
| 2612 | + GenNormalsMESH(); |
---|
2546 | 2613 | } else |
---|
2547 | 2614 | if (source == genNormalsORGANItem) |
---|
2548 | 2615 | { |
---|
.. | .. |
---|
2607 | 2674 | if (source == unmarkleavesItem) |
---|
2608 | 2675 | { |
---|
2609 | 2676 | MarkLeaves(false); |
---|
| 2677 | + } else |
---|
| 2678 | + if (source == rewindleavesItem) |
---|
| 2679 | + { |
---|
| 2680 | + RewindLeaves(true); |
---|
| 2681 | + } else |
---|
| 2682 | + if (source == unrewindleavesItem) |
---|
| 2683 | + { |
---|
| 2684 | + RewindLeaves(false); |
---|
| 2685 | + } else |
---|
| 2686 | + if (source == randomleavesItem) |
---|
| 2687 | + { |
---|
| 2688 | + RandomLeaves(true); |
---|
| 2689 | + } else |
---|
| 2690 | + if (source == unrandomleavesItem) |
---|
| 2691 | + { |
---|
| 2692 | + RandomLeaves(false); |
---|
2610 | 2693 | } else |
---|
2611 | 2694 | if (source == flipVItem) |
---|
2612 | 2695 | { |
---|
.. | .. |
---|
2874 | 2957 | bigThree.ClearUI(); |
---|
2875 | 2958 | bigThree.add(centralPanel); |
---|
2876 | 2959 | bigThree.FlushUI(); |
---|
| 2960 | + |
---|
| 2961 | + cameraView.requestFocusInWindow(); |
---|
| 2962 | + |
---|
| 2963 | +// refreshContents(true); |
---|
| 2964 | +// |
---|
| 2965 | +// try |
---|
| 2966 | +// { |
---|
| 2967 | +// java.awt.Robot bot = new java.awt.Robot(); |
---|
| 2968 | +// int mask = InputEvent.BUTTON1_MASK; |
---|
| 2969 | +// bot.mouseMove(100, 100); |
---|
| 2970 | +// bot.mousePress(mask); |
---|
| 2971 | +// bot.mouseRelease(mask); |
---|
| 2972 | +// } |
---|
| 2973 | +// catch (Exception e) |
---|
| 2974 | +// { |
---|
| 2975 | +// |
---|
| 2976 | +// } |
---|
| 2977 | + |
---|
2877 | 2978 | } else |
---|
2878 | 2979 | if (source == threeButton) |
---|
2879 | 2980 | { |
---|
.. | .. |
---|
2910 | 3011 | bigThree.add(centralPanel); |
---|
2911 | 3012 | bigThree.add(XYZPanel); |
---|
2912 | 3013 | bigThree.FlushUI(); |
---|
| 3014 | + |
---|
| 3015 | + cameraView.requestFocusInWindow(); |
---|
2913 | 3016 | } else |
---|
2914 | 3017 | if (source == fourButton) |
---|
2915 | 3018 | { |
---|
.. | .. |
---|
2945 | 3048 | bigThree.ClearUI(); |
---|
2946 | 3049 | bigThree.add(scenePanel); |
---|
2947 | 3050 | bigThree.FlushUI(); |
---|
| 3051 | + |
---|
| 3052 | + cameraView.requestFocusInWindow(); |
---|
2948 | 3053 | } else |
---|
2949 | 3054 | if (source == sixButton) |
---|
2950 | 3055 | { |
---|
.. | .. |
---|
2981 | 3086 | bigThree.add(scenePanel); |
---|
2982 | 3087 | bigThree.add(centralPanel); |
---|
2983 | 3088 | bigThree.FlushUI(); |
---|
| 3089 | + |
---|
| 3090 | + cameraView.requestFocusInWindow(); |
---|
2984 | 3091 | } else |
---|
2985 | 3092 | if (source == sevenButton) |
---|
2986 | 3093 | { |
---|
.. | .. |
---|
3018 | 3125 | bigThree.add(centralPanel); |
---|
3019 | 3126 | bigThree.add(XYZPanel); |
---|
3020 | 3127 | bigThree.FlushUI(); |
---|
| 3128 | + |
---|
| 3129 | + cameraView.requestFocusInWindow(); |
---|
3021 | 3130 | } else |
---|
3022 | 3131 | if (source == rootButton) |
---|
3023 | 3132 | { |
---|
.. | .. |
---|
3029 | 3138 | EditObject(obj); |
---|
3030 | 3139 | } |
---|
3031 | 3140 | |
---|
| 3141 | + cameraView.requestFocusInWindow(); |
---|
3032 | 3142 | refreshContents(true); |
---|
3033 | 3143 | } else |
---|
3034 | 3144 | if (source == closeButton) |
---|
.. | .. |
---|
3038 | 3148 | for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
3039 | 3149 | { |
---|
3040 | 3150 | ab = (cRadio)e.nextElement(); |
---|
3041 | | - if(ab.getModel().isSelected() && ab.GetObject() != client) |
---|
| 3151 | + if (ab.getModel().isSelected() && ab.GetObject() != client) |
---|
3042 | 3152 | { |
---|
| 3153 | + // Patch to avoid bug with transparency. |
---|
| 3154 | + if (!ab.hadMaterial) |
---|
| 3155 | + { |
---|
| 3156 | + ab.object.material = null; |
---|
| 3157 | + } |
---|
| 3158 | + |
---|
3043 | 3159 | buttonGroup.remove(ab); |
---|
3044 | 3160 | radioPanel.remove(ab); |
---|
3045 | 3161 | |
---|
.. | .. |
---|
3050 | 3166 | break; |
---|
3051 | 3167 | } |
---|
3052 | 3168 | } |
---|
| 3169 | + |
---|
| 3170 | + cameraView.requestFocusInWindow(); |
---|
3053 | 3171 | refreshContents(true); |
---|
3054 | 3172 | } else |
---|
3055 | 3173 | if (source == editItem || source == editButton) |
---|
.. | .. |
---|
3154 | 3272 | } |
---|
3155 | 3273 | |
---|
3156 | 3274 | // fix "+" issue |
---|
3157 | | - group.editWindow = this; |
---|
| 3275 | + //group.editWindow = this; |
---|
3158 | 3276 | |
---|
3159 | 3277 | /* |
---|
3160 | 3278 | currentLayout = radio.layout; |
---|
.. | .. |
---|
3167 | 3285 | //group.parent = null; // ROOT |
---|
3168 | 3286 | //group.attributes = -1; |
---|
3169 | 3287 | ResetModel(); |
---|
| 3288 | + |
---|
| 3289 | + cameraView.requestFocusInWindow(); |
---|
3170 | 3290 | refreshContents(true); |
---|
3171 | 3291 | } else if (event.getSource() == editCameraItem) |
---|
3172 | 3292 | { |
---|
.. | .. |
---|
3190 | 3310 | } |
---|
3191 | 3311 | |
---|
3192 | 3312 | boolean useclient = false; |
---|
3193 | | - cRadio radio; |
---|
3194 | 3313 | |
---|
3195 | 3314 | void ToggleRoot() |
---|
3196 | 3315 | { |
---|
.. | .. |
---|
3511 | 3630 | void GenNormals(boolean crease) |
---|
3512 | 3631 | { |
---|
3513 | 3632 | group.GenNormalsS(crease); |
---|
| 3633 | + |
---|
| 3634 | + refreshContents(); |
---|
| 3635 | + } |
---|
| 3636 | + |
---|
| 3637 | + void GenNormalsMESH() |
---|
| 3638 | + { |
---|
| 3639 | + group.GenNormalsMeshS(); |
---|
3514 | 3640 | |
---|
3515 | 3641 | refreshContents(); |
---|
3516 | 3642 | } |
---|
.. | .. |
---|
4138 | 4264 | refreshContents(); |
---|
4139 | 4265 | } |
---|
4140 | 4266 | |
---|
| 4267 | + void RewindLeaves(boolean hide) |
---|
| 4268 | + { |
---|
| 4269 | + group.selection.RewindLeaves(hide); |
---|
| 4270 | + refreshContents(); |
---|
| 4271 | + } |
---|
| 4272 | + |
---|
| 4273 | + void RandomLeaves(boolean hide) |
---|
| 4274 | + { |
---|
| 4275 | + group.selection.RandomLeaves(hide); |
---|
| 4276 | + refreshContents(); |
---|
| 4277 | + } |
---|
| 4278 | + |
---|
4141 | 4279 | void SetTexRes(int tr) |
---|
4142 | 4280 | { |
---|
4143 | 4281 | group.selection.SetTexRes(tr); |
---|
.. | .. |
---|
4313 | 4451 | //case 702: // Event.LIST_DESELECT |
---|
4314 | 4452 | group.deselectAll(); |
---|
4315 | 4453 | TreePath tps[] = objEditor.jTree.getSelectionPaths(); |
---|
4316 | | - objEditor.ClearInfo(); // .GetMaterial()); |
---|
4317 | 4454 | if (tps != null) |
---|
4318 | 4455 | { |
---|
4319 | 4456 | for (int i=0; i < tps.length; i++) |
---|
.. | .. |
---|
4322 | 4459 | |
---|
4323 | 4460 | //if (child.parent != null) |
---|
4324 | 4461 | //child.parent.addSelectee(child); |
---|
| 4462 | + objEditor.SetMaterial(child); |
---|
4325 | 4463 | group.addSelectee(child); |
---|
4326 | | - objEditor.SetMaterial(child); // .GetMaterial()); |
---|
4327 | | - objEditor.AddInfo(child, this, true); // .GetMaterial()); |
---|
4328 | | - System.err.println("info : " + child.GetPath()); |
---|
4329 | 4464 | } |
---|
4330 | 4465 | } |
---|
4331 | 4466 | // else |
---|
.. | .. |
---|
4335 | 4470 | // System.err.println("info : " + group.GetPath()); |
---|
4336 | 4471 | // } |
---|
4337 | 4472 | |
---|
4338 | | - objEditor.SetText(); // jan 2014 |
---|
4339 | | - |
---|
4340 | 4473 | if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera)) |
---|
4341 | 4474 | CameraPane.flash = true; |
---|
4342 | 4475 | |
---|
.. | .. |
---|
4360 | 4493 | |
---|
4361 | 4494 | freezemodel = false; |
---|
4362 | 4495 | } |
---|
| 4496 | + |
---|
| 4497 | + void refreshContents(boolean cp) |
---|
| 4498 | + { |
---|
| 4499 | + if (!Globals.MOUSEDRAGGED) |
---|
| 4500 | + { |
---|
| 4501 | + objEditor.ClearInfo(); // .GetMaterial()); |
---|
| 4502 | + |
---|
| 4503 | + for (int i=0; i < group.selection.Size(); i++) |
---|
| 4504 | + { |
---|
| 4505 | + Object3D child = (Object3D) group.selection.get(i); |
---|
| 4506 | + |
---|
| 4507 | + objEditor.AddInfo(child, this, true); |
---|
| 4508 | + System.err.println("info : " + child.GetPath()); |
---|
| 4509 | + } |
---|
| 4510 | + |
---|
| 4511 | + objEditor.SetText(); // jan 2014 |
---|
| 4512 | + } |
---|
| 4513 | + |
---|
| 4514 | + super.refreshContents(cp); |
---|
| 4515 | + } |
---|
4363 | 4516 | |
---|
4364 | 4517 | void linkSomething(Object3D thing) |
---|
4365 | 4518 | { |
---|
.. | .. |
---|
5160 | 5313 | cButton clearpanelButton; |
---|
5161 | 5314 | cButton unselectButton; |
---|
5162 | 5315 | |
---|
5163 | | - cButton saveButton; |
---|
| 5316 | + cButton minButton; |
---|
| 5317 | + cButton maxButton; |
---|
| 5318 | + cButton fullButton; |
---|
5164 | 5319 | cButton undoButton; |
---|
5165 | 5320 | cButton redoButton; |
---|
| 5321 | + cButton saveButton; |
---|
5166 | 5322 | cButton oneStepButton; |
---|
5167 | 5323 | |
---|
5168 | 5324 | cButton screenfitButton; |
---|
.. | .. |
---|
5175 | 5331 | cButton closeButton; |
---|
5176 | 5332 | |
---|
5177 | 5333 | cButton setsupportButton; |
---|
5178 | | - |
---|
5179 | | - cButton twoButton; |
---|
5180 | | - cButton sixButton; |
---|
5181 | | - cButton threeButton; |
---|
5182 | | - cButton sevenButton; |
---|
5183 | | - cButton fourButton; // full panel |
---|
5184 | | - cButton oneButton; // full XYZ |
---|
5185 | | - //cButton currentLayout; |
---|
5186 | 5334 | |
---|
5187 | 5335 | // |
---|
5188 | 5336 | //Composite |
---|
.. | .. |
---|
5260 | 5408 | private MenuItem showleavesItem; |
---|
5261 | 5409 | private MenuItem markleavesItem; |
---|
5262 | 5410 | private MenuItem unmarkleavesItem; |
---|
| 5411 | + private MenuItem rewindleavesItem; |
---|
| 5412 | + private MenuItem unrewindleavesItem; |
---|
| 5413 | + private MenuItem randomleavesItem; |
---|
| 5414 | + private MenuItem unrandomleavesItem; |
---|
5263 | 5415 | |
---|
5264 | 5416 | private MenuItem flipVItem; |
---|
5265 | 5417 | private MenuItem unflipVItem; |
---|