.. | .. |
---|
154 | 154 | oe.menuBar.add(menu = new Menu("Edit")); |
---|
155 | 155 | //editItem = menu.add(new MenuItem("Edit")); |
---|
156 | 156 | //editItem.addActionListener(this); |
---|
157 | | - undoItem = menu.add(new MenuItem("Undo")); |
---|
158 | | - undoItem.addActionListener(this); |
---|
159 | | - redoItem = menu.add(new MenuItem("Redo")); |
---|
160 | | - redoItem.addActionListener(this); |
---|
161 | | - menu.add("-"); |
---|
| 157 | + |
---|
| 158 | +// undoItem = menu.add(new MenuItem("Undo")); |
---|
| 159 | +// undoItem.addActionListener(this); |
---|
| 160 | +// redoItem = menu.add(new MenuItem("Redo")); |
---|
| 161 | +// redoItem.addActionListener(this); |
---|
| 162 | +// menu.add("-"); |
---|
162 | 163 | duplicateItem = menu.add(new MenuItem("Duplicate")); |
---|
163 | 164 | duplicateItem.addActionListener(this); |
---|
164 | 165 | cloneItem = menu.add(new MenuItem("Clone")); |
---|
.. | .. |
---|
175 | 176 | copyItem.addActionListener(this); |
---|
176 | 177 | pasteItem = menu.add(new MenuItem("Paste")); |
---|
177 | 178 | pasteItem.addActionListener(this); |
---|
178 | | - menu.add("-"); |
---|
179 | 179 | |
---|
180 | 180 | menu.add("-"); |
---|
181 | 181 | pasteIntoItem = menu.add(new MenuItem("Paste into")); |
---|
.. | .. |
---|
202 | 202 | //zBufferItem.addActionListener(this); |
---|
203 | 203 | //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
204 | 204 | //normalLensItem.addActionListener(this); |
---|
205 | | - cameraMenu.add(revertCameraItem = new MenuItem("Restore Camera")); |
---|
| 205 | + cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint")); |
---|
206 | 206 | revertCameraItem.addActionListener(this); |
---|
207 | 207 | |
---|
208 | 208 | cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
.. | .. |
---|
245 | 245 | |
---|
246 | 246 | cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
247 | 247 | toggleDebugItem.addItemListener(this); |
---|
248 | | - toggleDebugItem.setState(CameraPane.DEBUG); |
---|
| 248 | + toggleDebugItem.setState(Globals.DEBUG); |
---|
249 | 249 | |
---|
250 | 250 | cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
251 | 251 | toggleFrustumItem.addItemListener(this); |
---|
.. | .. |
---|
266 | 266 | // animationItem.addItemListener(this); |
---|
267 | 267 | // animationItem.setState(CameraPane.ANIMATION); |
---|
268 | 268 | cameraMenu.add("-"); |
---|
269 | | - cameraMenu.add(editCameraItem = new MenuItem("Save Camera")); |
---|
| 269 | + cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint")); |
---|
270 | 270 | editCameraItem.addActionListener(this); |
---|
271 | 271 | |
---|
272 | 272 | if (Globals.ADVANCED) |
---|
.. | .. |
---|
368 | 368 | billboardItem.addActionListener(this); |
---|
369 | 369 | csgItem = menu.add(new MenuItem("CSG")); |
---|
370 | 370 | csgItem.addActionListener(this); |
---|
371 | | - shadowXItem = menu.add(new MenuItem("Shadow X")); |
---|
| 371 | + shadowXItem = menu.add(new MenuItem("Shadow Red")); |
---|
372 | 372 | shadowXItem.addActionListener(this); |
---|
373 | | - shadowYItem = menu.add(new MenuItem("Shadow Y")); |
---|
| 373 | + shadowYItem = menu.add(new MenuItem("Shadow Green")); |
---|
374 | 374 | shadowYItem.addActionListener(this); |
---|
375 | | - shadowZItem = menu.add(new MenuItem("Shadow Z")); |
---|
| 375 | + shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
376 | 376 | shadowZItem.addActionListener(this); |
---|
377 | 377 | if (Globals.ADVANCED) |
---|
378 | 378 | { |
---|
.. | .. |
---|
469 | 469 | markleavesItem.addActionListener(this); |
---|
470 | 470 | unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves")); |
---|
471 | 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); |
---|
472 | 480 | menu.add("-"); |
---|
473 | 481 | flipVItem = menu.add(new MenuItem("Flip V")); |
---|
474 | 482 | flipVItem.addActionListener(this); |
---|
.. | .. |
---|
526 | 534 | |
---|
527 | 535 | void SetupUI2(ObjEditor oe) |
---|
528 | 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 | + |
---|
529 | 549 | //new Exception().printStackTrace(); |
---|
530 | 550 | |
---|
531 | 551 | oe.radioPanel = new JPanel(new GridBagLayout()); |
---|
.. | .. |
---|
556 | 576 | */ |
---|
557 | 577 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
558 | 578 | |
---|
| 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); |
---|
| 592 | + undoButton.setToolTipText("Undo changes"); |
---|
| 593 | + undoButton.addActionListener(this); |
---|
| 594 | + |
---|
| 595 | + oe.toolbarPanel.add(redoButton = new cButton("\u21aa", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 596 | + redoButton.setToolTipText("Redo changes"); |
---|
| 597 | + redoButton.addActionListener(this); |
---|
| 598 | + |
---|
| 599 | + oe.toolbarPanel.add(saveButton = new cButton("\u21e3", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 600 | + saveButton.setToolTipText("Save changes"); |
---|
| 601 | + saveButton.addActionListener(this); |
---|
| 602 | + |
---|
559 | 603 | oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
560 | 604 | liveCB.setToolTipText("Enable animation"); |
---|
561 | 605 | liveCB.addItemListener(this); |
---|
562 | 606 | |
---|
563 | | - oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 607 | + oe.toolbarPanel.add(oneStepButton = new cButton("\u29f4", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
564 | 608 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
565 | 609 | oneStepButton.addActionListener(this); |
---|
566 | 610 | |
---|
.. | .. |
---|
568 | 612 | fastCB.setToolTipText("Fast mode"); |
---|
569 | 613 | fastCB.addItemListener(this); |
---|
570 | 614 | |
---|
571 | | - oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 615 | + oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK)); //, oe.aConstraints); |
---|
572 | 616 | trackCB.setToolTipText("Enable tracking"); |
---|
573 | 617 | trackCB.addItemListener(this); |
---|
574 | 618 | |
---|
.. | .. |
---|
592 | 636 | |
---|
593 | 637 | oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
594 | 638 | |
---|
595 | | - oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 639 | + oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
596 | 640 | twoButton.setToolTipText("Show center view only"); |
---|
597 | 641 | twoButton.addActionListener(this); |
---|
598 | | - oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 642 | + oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
599 | 643 | fourButton.addActionListener(this); |
---|
600 | 644 | fourButton.setToolTipText("Show left panel only"); |
---|
601 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 645 | + oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
602 | 646 | sixButton.setToolTipText("2-column layout left"); |
---|
603 | 647 | sixButton.addActionListener(this); |
---|
604 | | - oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 648 | + oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
605 | 649 | threeButton.setToolTipText("2-column layout right"); |
---|
606 | 650 | threeButton.addActionListener(this); |
---|
607 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 651 | + oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
608 | 652 | sevenButton.setToolTipText("3-column layout"); |
---|
609 | 653 | sevenButton.addActionListener(this); |
---|
610 | 654 | // |
---|
.. | .. |
---|
619 | 663 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
620 | 664 | //clearButton.addActionListener(this); |
---|
621 | 665 | |
---|
622 | | - cGridBag commandsPanel = new cGridBag(); |
---|
623 | | - |
---|
624 | | - commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 666 | + editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
625 | 667 | editButton.setToolTipText("Edit selection"); |
---|
626 | 668 | editButton.addActionListener(this); |
---|
627 | 669 | |
---|
628 | | - commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 670 | + editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
629 | 671 | uneditButton.setToolTipText("Unedit selection"); |
---|
630 | 672 | uneditButton.addActionListener(this); |
---|
631 | 673 | |
---|
632 | | - commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
| 674 | + editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
633 | 675 | allParamsButton.setToolTipText("Edit all params"); |
---|
634 | 676 | allParamsButton.addActionListener(this); |
---|
635 | 677 | |
---|
636 | | - commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 678 | + editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
637 | 679 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
638 | 680 | clearPanelButton.addActionListener(this); |
---|
639 | 681 | |
---|
640 | | - commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 682 | + editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
641 | 683 | unselectButton.setToolTipText("Unselect"); |
---|
642 | 684 | unselectButton.addActionListener(this); |
---|
643 | 685 | |
---|
644 | | - commandsPanel.preferredHeight = 1; |
---|
| 686 | + editCommandsPanel.preferredHeight = 1; |
---|
645 | 687 | |
---|
646 | | - oe.treePanel.add(commandsPanel); |
---|
647 | | - oe.treePanel.Return(); |
---|
| 688 | +// oe.treePanel.add(commandsPanel); |
---|
| 689 | +// oe.treePanel.Return(); |
---|
648 | 690 | |
---|
649 | 691 | // oe.aConstraints.gridx += 1; |
---|
650 | 692 | // oe.aConstraints.weighty = 0; |
---|
.. | .. |
---|
796 | 838 | |
---|
797 | 839 | void SetupViews(ObjEditor oe) |
---|
798 | 840 | { |
---|
| 841 | + theFrame = this; |
---|
| 842 | + |
---|
799 | 843 | oe.SetupViews(); |
---|
800 | 844 | |
---|
801 | 845 | System.out.println("SetupViews"); |
---|
.. | .. |
---|
858 | 902 | } else if(e.getSource() == liveCB) |
---|
859 | 903 | { |
---|
860 | 904 | cameraView.ToggleLive(); |
---|
| 905 | + refreshContents(false); |
---|
861 | 906 | } |
---|
862 | 907 | else if(e.getSource() == supportCB) |
---|
863 | 908 | { |
---|
.. | .. |
---|
1265 | 1310 | memoryItem.addActionListener(this); |
---|
1266 | 1311 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1267 | 1312 | analyzeItem.addActionListener(this); |
---|
1268 | | - menu.add(dumpItem = new MenuItem("Dump")); |
---|
| 1313 | + menu.add(dumpItem = new MenuItem("Print")); |
---|
1269 | 1314 | dumpItem.addActionListener(this); |
---|
1270 | 1315 | // menu.add(pathItem = new MenuItem("From-to path")); |
---|
1271 | 1316 | // pathItem.addActionListener(this); |
---|
.. | .. |
---|
1406 | 1451 | shadow.material = new cMaterial(obj.material); |
---|
1407 | 1452 | shadow.material.diffuse = 0.0001f; |
---|
1408 | 1453 | shadow.material.specular = 0.0001f; |
---|
| 1454 | + //shadow.projectedVertices[1].x = 300; |
---|
1409 | 1455 | |
---|
1410 | 1456 | makeSomething(shadow); |
---|
1411 | 1457 | } |
---|
.. | .. |
---|
1955 | 2001 | if (source == dumpItem) |
---|
1956 | 2002 | { |
---|
1957 | 2003 | DumpObject(); |
---|
| 2004 | + } else |
---|
| 2005 | + if (source == minButton) |
---|
| 2006 | + { |
---|
| 2007 | + Minimize(); |
---|
| 2008 | + } else |
---|
| 2009 | + if (source == maxButton) |
---|
| 2010 | + { |
---|
| 2011 | + Maximize(); |
---|
| 2012 | + } else |
---|
| 2013 | + if (source == fullButton) |
---|
| 2014 | + { |
---|
| 2015 | + ToggleFullScreen(); |
---|
| 2016 | + } else |
---|
| 2017 | + if (source == undoButton) |
---|
| 2018 | + { |
---|
| 2019 | + Undo(); |
---|
| 2020 | + } else |
---|
| 2021 | + if (source == redoButton) |
---|
| 2022 | + { |
---|
| 2023 | + Redo(); |
---|
| 2024 | + } else |
---|
| 2025 | + if (source == saveButton) |
---|
| 2026 | + { |
---|
| 2027 | + Save(); |
---|
1958 | 2028 | } else |
---|
1959 | 2029 | if (source == oneStepButton) |
---|
1960 | 2030 | { |
---|
.. | .. |
---|
2517 | 2587 | } else |
---|
2518 | 2588 | if (source == genNormalsMESHItem) |
---|
2519 | 2589 | { |
---|
2520 | | - GenNormals(true); // TODO |
---|
| 2590 | + GenNormalsMESH(); |
---|
2521 | 2591 | } else |
---|
2522 | 2592 | if (source == genNormalsORGANItem) |
---|
2523 | 2593 | { |
---|
.. | .. |
---|
2582 | 2652 | if (source == unmarkleavesItem) |
---|
2583 | 2653 | { |
---|
2584 | 2654 | MarkLeaves(false); |
---|
| 2655 | + } else |
---|
| 2656 | + if (source == rewindleavesItem) |
---|
| 2657 | + { |
---|
| 2658 | + RewindLeaves(true); |
---|
| 2659 | + } else |
---|
| 2660 | + if (source == unrewindleavesItem) |
---|
| 2661 | + { |
---|
| 2662 | + RewindLeaves(false); |
---|
| 2663 | + } else |
---|
| 2664 | + if (source == randomleavesItem) |
---|
| 2665 | + { |
---|
| 2666 | + RandomLeaves(true); |
---|
| 2667 | + } else |
---|
| 2668 | + if (source == unrandomleavesItem) |
---|
| 2669 | + { |
---|
| 2670 | + RandomLeaves(false); |
---|
2585 | 2671 | } else |
---|
2586 | 2672 | if (source == flipVItem) |
---|
2587 | 2673 | { |
---|
.. | .. |
---|
2849 | 2935 | bigThree.ClearUI(); |
---|
2850 | 2936 | bigThree.add(centralPanel); |
---|
2851 | 2937 | bigThree.FlushUI(); |
---|
| 2938 | + |
---|
| 2939 | + cameraView.requestFocusInWindow(); |
---|
| 2940 | + |
---|
| 2941 | +// refreshContents(true); |
---|
| 2942 | +// |
---|
| 2943 | +// try |
---|
| 2944 | +// { |
---|
| 2945 | +// java.awt.Robot bot = new java.awt.Robot(); |
---|
| 2946 | +// int mask = InputEvent.BUTTON1_MASK; |
---|
| 2947 | +// bot.mouseMove(100, 100); |
---|
| 2948 | +// bot.mousePress(mask); |
---|
| 2949 | +// bot.mouseRelease(mask); |
---|
| 2950 | +// } |
---|
| 2951 | +// catch (Exception e) |
---|
| 2952 | +// { |
---|
| 2953 | +// |
---|
| 2954 | +// } |
---|
| 2955 | + |
---|
2852 | 2956 | } else |
---|
2853 | 2957 | if (source == threeButton) |
---|
2854 | 2958 | { |
---|
.. | .. |
---|
2885 | 2989 | bigThree.add(centralPanel); |
---|
2886 | 2990 | bigThree.add(XYZPanel); |
---|
2887 | 2991 | bigThree.FlushUI(); |
---|
| 2992 | + |
---|
| 2993 | + cameraView.requestFocusInWindow(); |
---|
2888 | 2994 | } else |
---|
2889 | 2995 | if (source == fourButton) |
---|
2890 | 2996 | { |
---|
.. | .. |
---|
2920 | 3026 | bigThree.ClearUI(); |
---|
2921 | 3027 | bigThree.add(scenePanel); |
---|
2922 | 3028 | bigThree.FlushUI(); |
---|
| 3029 | + |
---|
| 3030 | + cameraView.requestFocusInWindow(); |
---|
2923 | 3031 | } else |
---|
2924 | 3032 | if (source == sixButton) |
---|
2925 | 3033 | { |
---|
.. | .. |
---|
2956 | 3064 | bigThree.add(scenePanel); |
---|
2957 | 3065 | bigThree.add(centralPanel); |
---|
2958 | 3066 | bigThree.FlushUI(); |
---|
| 3067 | + |
---|
| 3068 | + cameraView.requestFocusInWindow(); |
---|
2959 | 3069 | } else |
---|
2960 | 3070 | if (source == sevenButton) |
---|
2961 | 3071 | { |
---|
.. | .. |
---|
2993 | 3103 | bigThree.add(centralPanel); |
---|
2994 | 3104 | bigThree.add(XYZPanel); |
---|
2995 | 3105 | bigThree.FlushUI(); |
---|
| 3106 | + |
---|
| 3107 | + cameraView.requestFocusInWindow(); |
---|
2996 | 3108 | } else |
---|
2997 | 3109 | if (source == rootButton) |
---|
2998 | 3110 | { |
---|
.. | .. |
---|
3004 | 3116 | EditObject(obj); |
---|
3005 | 3117 | } |
---|
3006 | 3118 | |
---|
| 3119 | + cameraView.requestFocusInWindow(); |
---|
3007 | 3120 | refreshContents(true); |
---|
3008 | 3121 | } else |
---|
3009 | 3122 | if (source == closeButton) |
---|
.. | .. |
---|
3025 | 3138 | break; |
---|
3026 | 3139 | } |
---|
3027 | 3140 | } |
---|
| 3141 | + |
---|
| 3142 | + cameraView.requestFocusInWindow(); |
---|
3028 | 3143 | refreshContents(true); |
---|
3029 | 3144 | } else |
---|
3030 | 3145 | if (source == editItem || source == editButton) |
---|
.. | .. |
---|
3128 | 3243 | sideView.object = group; |
---|
3129 | 3244 | } |
---|
3130 | 3245 | |
---|
3131 | | -// fix "+" issue group.editWindow = this; |
---|
| 3246 | +// fix "+" issue |
---|
| 3247 | + //group.editWindow = this; |
---|
3132 | 3248 | |
---|
3133 | 3249 | /* |
---|
3134 | 3250 | currentLayout = radio.layout; |
---|
.. | .. |
---|
3141 | 3257 | //group.parent = null; // ROOT |
---|
3142 | 3258 | //group.attributes = -1; |
---|
3143 | 3259 | ResetModel(); |
---|
| 3260 | + |
---|
| 3261 | + cameraView.requestFocusInWindow(); |
---|
3144 | 3262 | refreshContents(true); |
---|
3145 | 3263 | } else if (event.getSource() == editCameraItem) |
---|
3146 | 3264 | { |
---|
.. | .. |
---|
3164 | 3282 | } |
---|
3165 | 3283 | |
---|
3166 | 3284 | boolean useclient = false; |
---|
3167 | | - cRadio radio; |
---|
3168 | 3285 | |
---|
3169 | 3286 | void ToggleRoot() |
---|
3170 | 3287 | { |
---|
.. | .. |
---|
3403 | 3520 | |
---|
3404 | 3521 | int size = obj.MemorySize(); |
---|
3405 | 3522 | |
---|
3406 | | - System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3523 | + //System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3524 | + System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)"); |
---|
3407 | 3525 | } |
---|
3408 | 3526 | } |
---|
3409 | 3527 | catch (Exception e) |
---|
.. | .. |
---|
3484 | 3602 | void GenNormals(boolean crease) |
---|
3485 | 3603 | { |
---|
3486 | 3604 | group.GenNormalsS(crease); |
---|
| 3605 | + |
---|
| 3606 | + refreshContents(); |
---|
| 3607 | + } |
---|
| 3608 | + |
---|
| 3609 | + void GenNormalsMESH() |
---|
| 3610 | + { |
---|
| 3611 | + group.GenNormalsMeshS(); |
---|
3487 | 3612 | |
---|
3488 | 3613 | refreshContents(); |
---|
3489 | 3614 | } |
---|
.. | .. |
---|
4111 | 4236 | refreshContents(); |
---|
4112 | 4237 | } |
---|
4113 | 4238 | |
---|
| 4239 | + void RewindLeaves(boolean hide) |
---|
| 4240 | + { |
---|
| 4241 | + group.selection.RewindLeaves(hide); |
---|
| 4242 | + refreshContents(); |
---|
| 4243 | + } |
---|
| 4244 | + |
---|
| 4245 | + void RandomLeaves(boolean hide) |
---|
| 4246 | + { |
---|
| 4247 | + group.selection.RandomLeaves(hide); |
---|
| 4248 | + refreshContents(); |
---|
| 4249 | + } |
---|
| 4250 | + |
---|
4114 | 4251 | void SetTexRes(int tr) |
---|
4115 | 4252 | { |
---|
4116 | 4253 | group.selection.SetTexRes(tr); |
---|
.. | .. |
---|
4286 | 4423 | //case 702: // Event.LIST_DESELECT |
---|
4287 | 4424 | group.deselectAll(); |
---|
4288 | 4425 | TreePath tps[] = objEditor.jTree.getSelectionPaths(); |
---|
4289 | | - objEditor.ClearInfo(); // .GetMaterial()); |
---|
4290 | 4426 | if (tps != null) |
---|
4291 | 4427 | { |
---|
4292 | 4428 | for (int i=0; i < tps.length; i++) |
---|
.. | .. |
---|
4295 | 4431 | |
---|
4296 | 4432 | //if (child.parent != null) |
---|
4297 | 4433 | //child.parent.addSelectee(child); |
---|
| 4434 | + objEditor.SetMaterial(child); |
---|
4298 | 4435 | group.addSelectee(child); |
---|
4299 | | - objEditor.SetMaterial(child); // .GetMaterial()); |
---|
4300 | | - objEditor.AddInfo(child, this, true); // .GetMaterial()); |
---|
4301 | | - System.err.println("info : " + child.GetPath()); |
---|
4302 | 4436 | } |
---|
4303 | 4437 | } |
---|
4304 | 4438 | // else |
---|
.. | .. |
---|
4308 | 4442 | // System.err.println("info : " + group.GetPath()); |
---|
4309 | 4443 | // } |
---|
4310 | 4444 | |
---|
4311 | | - objEditor.SetText(); // jan 2014 |
---|
4312 | | - |
---|
4313 | 4445 | if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera)) |
---|
4314 | 4446 | CameraPane.flash = true; |
---|
4315 | 4447 | |
---|
.. | .. |
---|
4333 | 4465 | |
---|
4334 | 4466 | freezemodel = false; |
---|
4335 | 4467 | } |
---|
| 4468 | + |
---|
| 4469 | + void refreshContents(boolean cp) |
---|
| 4470 | + { |
---|
| 4471 | + if (!Globals.MOUSEDRAGGED) |
---|
| 4472 | + { |
---|
| 4473 | + objEditor.ClearInfo(); // .GetMaterial()); |
---|
| 4474 | + |
---|
| 4475 | + for (int i=0; i < group.selection.Size(); i++) |
---|
| 4476 | + { |
---|
| 4477 | + Object3D child = (Object3D) group.selection.get(i); |
---|
| 4478 | + |
---|
| 4479 | + objEditor.AddInfo(child, this, true); |
---|
| 4480 | + System.err.println("info : " + child.GetPath()); |
---|
| 4481 | + } |
---|
| 4482 | + |
---|
| 4483 | + objEditor.SetText(); // jan 2014 |
---|
| 4484 | + } |
---|
| 4485 | + |
---|
| 4486 | + super.refreshContents(cp); |
---|
| 4487 | + } |
---|
4336 | 4488 | |
---|
4337 | 4489 | void linkSomething(Object3D thing) |
---|
4338 | 4490 | { |
---|
.. | .. |
---|
4404 | 4556 | { |
---|
4405 | 4557 | if (group.selection.isEmpty()) |
---|
4406 | 4558 | return; |
---|
| 4559 | + |
---|
4407 | 4560 | Grafreed.clipboardIsTempGroup = false; |
---|
4408 | 4561 | Composite tGroup = null; |
---|
4409 | 4562 | if (group.selection.size() > 0) // 1) |
---|
.. | .. |
---|
4414 | 4567 | |
---|
4415 | 4568 | if (cut) |
---|
4416 | 4569 | { |
---|
| 4570 | + Save(); |
---|
4417 | 4571 | //int indices[] = jList.getSelectedIndices(); |
---|
4418 | 4572 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4419 | 4573 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4503 | 4657 | } |
---|
4504 | 4658 | |
---|
4505 | 4659 | } |
---|
| 4660 | + |
---|
4506 | 4661 | if (Grafreed.clipboardIsTempGroup) |
---|
4507 | 4662 | Grafreed.clipboard = tGroup; |
---|
| 4663 | + |
---|
4508 | 4664 | if (cut) |
---|
4509 | 4665 | { |
---|
4510 | 4666 | ResetModel(); |
---|
.. | .. |
---|
5129 | 5285 | cButton clearpanelButton; |
---|
5130 | 5286 | cButton unselectButton; |
---|
5131 | 5287 | |
---|
| 5288 | + cButton minButton; |
---|
| 5289 | + cButton maxButton; |
---|
| 5290 | + cButton fullButton; |
---|
| 5291 | + cButton undoButton; |
---|
| 5292 | + cButton redoButton; |
---|
| 5293 | + cButton saveButton; |
---|
5132 | 5294 | cButton oneStepButton; |
---|
5133 | 5295 | |
---|
5134 | 5296 | cButton screenfitButton; |
---|
.. | .. |
---|
5141 | 5303 | cButton closeButton; |
---|
5142 | 5304 | |
---|
5143 | 5305 | cButton setsupportButton; |
---|
5144 | | - |
---|
5145 | | - cButton twoButton; |
---|
5146 | | - cButton sixButton; |
---|
5147 | | - cButton threeButton; |
---|
5148 | | - cButton sevenButton; |
---|
5149 | | - cButton fourButton; // full panel |
---|
5150 | | - cButton oneButton; // full XYZ |
---|
5151 | | - //cButton currentLayout; |
---|
5152 | 5306 | |
---|
5153 | 5307 | // |
---|
5154 | 5308 | //Composite |
---|
.. | .. |
---|
5226 | 5380 | private MenuItem showleavesItem; |
---|
5227 | 5381 | private MenuItem markleavesItem; |
---|
5228 | 5382 | private MenuItem unmarkleavesItem; |
---|
| 5383 | + private MenuItem rewindleavesItem; |
---|
| 5384 | + private MenuItem unrewindleavesItem; |
---|
| 5385 | + private MenuItem randomleavesItem; |
---|
| 5386 | + private MenuItem unrandomleavesItem; |
---|
5229 | 5387 | |
---|
5230 | 5388 | private MenuItem flipVItem; |
---|
5231 | 5389 | private MenuItem unflipVItem; |
---|