Normand Briere
2019-06-24 914255f70cf047897212839cbf3a6722703f4457
GroupEditor.java
....@@ -176,7 +176,6 @@
176176 copyItem.addActionListener(this);
177177 pasteItem = menu.add(new MenuItem("Paste"));
178178 pasteItem.addActionListener(this);
179
- menu.add("-");
180179
181180 menu.add("-");
182181 pasteIntoItem = menu.add(new MenuItem("Paste into"));
....@@ -246,7 +245,7 @@
246245
247246 cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
248247 toggleDebugItem.addItemListener(this);
249
- toggleDebugItem.setState(CameraPane.DEBUG);
248
+ toggleDebugItem.setState(Globals.DEBUG);
250249
251250 cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
252251 toggleFrustumItem.addItemListener(this);
....@@ -369,11 +368,11 @@
369368 billboardItem.addActionListener(this);
370369 csgItem = menu.add(new MenuItem("CSG"));
371370 csgItem.addActionListener(this);
372
- shadowXItem = menu.add(new MenuItem("Shadow X"));
371
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
373372 shadowXItem.addActionListener(this);
374
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
373
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
375374 shadowYItem.addActionListener(this);
376
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
375
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
377376 shadowZItem.addActionListener(this);
378377 if (Globals.ADVANCED)
379378 {
....@@ -470,6 +469,14 @@
470469 markleavesItem.addActionListener(this);
471470 unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
472471 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);
473480 menu.add("-");
474481 flipVItem = menu.add(new MenuItem("Flip V"));
475482 flipVItem.addActionListener(this);
....@@ -527,6 +534,18 @@
527534
528535 void SetupUI2(ObjEditor oe)
529536 {
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
+
530549 //new Exception().printStackTrace();
531550
532551 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -557,35 +576,47 @@
557576 */
558577 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
559578
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 = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
584
+ maxButton.setToolTipText("Maximize window");
585
+ maxButton.addActionListener(this);
586
+
587
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
588
+ fullButton.setToolTipText("Full-screen window");
589
+ fullButton.addActionListener(this);
590
+
591
+ oe.toolbarPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
561592 undoButton.setToolTipText("Undo changes");
562593 undoButton.addActionListener(this);
563594
564
- oe.toolbarPanel.add(redoButton = new cButton("Redo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
595
+ oe.toolbarPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
565596 redoButton.setToolTipText("Redo changes");
566597 redoButton.addActionListener(this);
567598
568
- oe.toolbarPanel.add(saveButton = new cButton("Save", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
599
+ oe.toolbarPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
569600 saveButton.setToolTipText("Save changes");
570601 saveButton.addActionListener(this);
571602
572
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
603
+ oe.toolbarPanel.add(liveCB = GetCheckBox("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
573604 liveCB.setToolTipText("Enable animation");
574605 liveCB.addItemListener(this);
575606
576
- oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
577
- oneStepButton.setToolTipText("Animate one step forward");
578
- oneStepButton.addActionListener(this);
579
-
580
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
607
+ oe.toolbarPanel.add(fastCB = GetCheckBox("icons/runfast.png", CameraPane.FAST)); //, constraints);
581608 fastCB.setToolTipText("Fast mode");
582609 fastCB.addItemListener(this);
583610
584
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
611
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
612
+ oneStepButton.setToolTipText("Animate one step forward");
613
+ oneStepButton.addActionListener(this);
614
+
615
+ oe.toolbarPanel.add(trackCB = GetCheckBox("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
585616 trackCB.setToolTipText("Enable tracking");
586617 trackCB.addItemListener(this);
587618
588
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
619
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
589620 screenfitButton.setToolTipText("Screen fit");
590621 screenfitButton.addActionListener(this);
591622
....@@ -599,25 +630,25 @@
599630 snapobjectButton.setToolTipText("Snap Object");
600631 }
601632
602
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
603
- flashSelectionButton.setToolTipText("Show selection");
633
+ oe.toolbarPanel.add(flashSelectionButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
634
+ flashSelectionButton.setToolTipText("Highlight selection");
604635 flashSelectionButton.addActionListener(this);
605636
606637 oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
607638
608
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
639
+ oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
609640 twoButton.setToolTipText("Show center view only");
610641 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);
612643 fourButton.addActionListener(this);
613644 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);
615646 sixButton.setToolTipText("2-column layout left");
616647 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);
618649 threeButton.setToolTipText("2-column layout right");
619650 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);
621652 sevenButton.setToolTipText("3-column layout");
622653 sevenButton.addActionListener(this);
623654 //
....@@ -632,32 +663,30 @@
632663 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
633664 //clearButton.addActionListener(this);
634665
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);
638667 editButton.setToolTipText("Edit selection");
639668 editButton.addActionListener(this);
640669
641
- commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
670
+ editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
642671 uneditButton.setToolTipText("Unedit selection");
643672 uneditButton.addActionListener(this);
644673
645
- commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
674
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
646675 allParamsButton.setToolTipText("Edit all params");
647676 allParamsButton.addActionListener(this);
648677
649
- commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
678
+ editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
650679 clearPanelButton.setToolTipText("Clear edit panel");
651680 clearPanelButton.addActionListener(this);
652681
653
- commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
682
+ editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
654683 unselectButton.setToolTipText("Unselect");
655684 unselectButton.addActionListener(this);
656685
657
- commandsPanel.preferredHeight = 1;
686
+ editCommandsPanel.preferredHeight = 1;
658687
659
- oe.treePanel.add(commandsPanel);
660
- oe.treePanel.Return();
688
+// oe.treePanel.add(commandsPanel);
689
+// oe.treePanel.Return();
661690
662691 // oe.aConstraints.gridx += 1;
663692 // oe.aConstraints.weighty = 0;
....@@ -779,11 +808,23 @@
779808 // debugCB.addItemListener(this);
780809
781810 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
811
+ oeilCB.setToolTipText("Move camera when tracking target");
782812 oeilCB.addItemListener(this);
783813
814
+ panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
815
+ shadowCB.setToolTipText("Compute shadows when live");
816
+ shadowCB.addItemListener(this);
817
+
818
+ panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints);
819
+ autosaveCB.setToolTipText("Auto-save on structure change");
820
+ autosaveCB.addItemListener(this);
821
+
822
+ if (Globals.ADVANCED)
823
+ {
784824 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
785825 lookAtCB.setToolTipText("Look-at target");
786826 lookAtCB.addItemListener(this);
827
+ }
787828
788829 }
789830
....@@ -798,6 +839,14 @@
798839 void EditObject(Object3D obj)
799840 {
800841 cRadio radioButton = new cRadio(obj.name);
842
+
843
+ // Patch to avoid bug with transparency.
844
+ radioButton.hadMaterial = obj.material != null;
845
+ if (!radioButton.hadMaterial)
846
+ {
847
+ obj.material = new cMaterial();
848
+ }
849
+
801850 radioButton.SetObject(obj);
802851 radioButton.layout = sevenButton;
803852 radioButton.SetCamera(cameraView.renderCamera, false);
....@@ -809,6 +858,8 @@
809858
810859 void SetupViews(ObjEditor oe)
811860 {
861
+ theFrame = this;
862
+
812863 oe.SetupViews();
813864
814865 System.out.println("SetupViews");
....@@ -817,23 +868,26 @@
817868 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
818869 }
819870
820
- JCheckBox liveCB;
821
- JCheckBox supportCB;
822
- JCheckBox localCB;
823
- JCheckBox crowdCB;
824
- JCheckBox smoothCB;
825
- JCheckBox fastCB;
826
- JCheckBox slowCB;
827
- JCheckBox boxCB;
828
- JCheckBox zoomBoxCB;
829
- JCheckBox trackCB;
830
- JCheckBox smoothfocusCB;
871
+ cCheckBox liveCB;
872
+ cCheckBox supportCB;
873
+ cCheckBox localCB;
874
+ cCheckBox crowdCB;
875
+ cCheckBox smoothCB;
876
+ cCheckBox fastCB;
877
+ cCheckBox slowCB;
878
+ cCheckBox boxCB;
879
+ cCheckBox zoomBoxCB;
880
+ cCheckBox trackCB;
881
+ cCheckBox smoothfocusCB;
831882 // JCheckBox speakerMocapCB;
832
- JCheckBox speakerCameraCB;
833
- JCheckBox speakerFocusCB;
834
- JCheckBox debugCB;
835
- JCheckBox oeilCB;
836
- JCheckBox lookAtCB;
883
+ cCheckBox speakerCameraCB;
884
+ cCheckBox speakerFocusCB;
885
+ cCheckBox debugCB;
886
+
887
+ cCheckBox oeilCB;
888
+ cCheckBox shadowCB;
889
+ cCheckBox autosaveCB;
890
+ cCheckBox lookAtCB;
837891
838892 // static int COLOR = 1;
839893 // static int MATERIAL = 2;
....@@ -841,9 +895,9 @@
841895
842896 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
843897
844
- JCheckBox colorCB;
845
- JCheckBox materialCB;
846
- JCheckBox textureCB;
898
+ cCheckBox colorCB;
899
+ cCheckBox materialCB;
900
+ cCheckBox textureCB;
847901
848902 public void itemStateChanged(ItemEvent e)
849903 {
....@@ -871,6 +925,7 @@
871925 } else if(e.getSource() == liveCB)
872926 {
873927 cameraView.ToggleLive();
928
+ refreshContents(false);
874929 }
875930 else if(e.getSource() == supportCB)
876931 {
....@@ -934,6 +989,14 @@
934989 else if(e.getSource() == oeilCB)
935990 {
936991 cameraView.ToggleOeil();
992
+ }
993
+ else if(e.getSource() == shadowCB)
994
+ {
995
+ Globals.COMPUTESHADOWWHENLIVE ^= true;
996
+ }
997
+ else if(e.getSource() == autosaveCB)
998
+ {
999
+ Globals.SAVEONMAKE ^= true;
9371000 }
9381001 else if(e.getSource() == lookAtCB)
9391002 {
....@@ -1278,7 +1341,7 @@
12781341 memoryItem.addActionListener(this);
12791342 menu.add(analyzeItem = new MenuItem("Analyze"));
12801343 analyzeItem.addActionListener(this);
1281
- menu.add(dumpItem = new MenuItem("Dump"));
1344
+ menu.add(dumpItem = new MenuItem("Print"));
12821345 dumpItem.addActionListener(this);
12831346 // menu.add(pathItem = new MenuItem("From-to path"));
12841347 // pathItem.addActionListener(this);
....@@ -1419,6 +1482,7 @@
14191482 shadow.material = new cMaterial(obj.material);
14201483 shadow.material.diffuse = 0.0001f;
14211484 shadow.material.specular = 0.0001f;
1485
+ //shadow.projectedVertices[1].x = 300;
14221486
14231487 makeSomething(shadow);
14241488 }
....@@ -1968,6 +2032,18 @@
19682032 if (source == dumpItem)
19692033 {
19702034 DumpObject();
2035
+ } else
2036
+ if (source == minButton)
2037
+ {
2038
+ Minimize();
2039
+ } else
2040
+ if (source == maxButton)
2041
+ {
2042
+ Maximize();
2043
+ } else
2044
+ if (source == fullButton)
2045
+ {
2046
+ ToggleFullScreen();
19712047 } else
19722048 if (source == undoButton)
19732049 {
....@@ -2542,7 +2618,7 @@
25422618 } else
25432619 if (source == genNormalsMESHItem)
25442620 {
2545
- GenNormals(true); // TODO
2621
+ GenNormalsMESH();
25462622 } else
25472623 if (source == genNormalsORGANItem)
25482624 {
....@@ -2607,6 +2683,22 @@
26072683 if (source == unmarkleavesItem)
26082684 {
26092685 MarkLeaves(false);
2686
+ } else
2687
+ if (source == rewindleavesItem)
2688
+ {
2689
+ RewindLeaves(true);
2690
+ } else
2691
+ if (source == unrewindleavesItem)
2692
+ {
2693
+ RewindLeaves(false);
2694
+ } else
2695
+ if (source == randomleavesItem)
2696
+ {
2697
+ RandomLeaves(true);
2698
+ } else
2699
+ if (source == unrandomleavesItem)
2700
+ {
2701
+ RandomLeaves(false);
26102702 } else
26112703 if (source == flipVItem)
26122704 {
....@@ -2874,6 +2966,24 @@
28742966 bigThree.ClearUI();
28752967 bigThree.add(centralPanel);
28762968 bigThree.FlushUI();
2969
+
2970
+ cameraView.requestFocusInWindow();
2971
+
2972
+// refreshContents(true);
2973
+//
2974
+// try
2975
+// {
2976
+// java.awt.Robot bot = new java.awt.Robot();
2977
+// int mask = InputEvent.BUTTON1_MASK;
2978
+// bot.mouseMove(100, 100);
2979
+// bot.mousePress(mask);
2980
+// bot.mouseRelease(mask);
2981
+// }
2982
+// catch (Exception e)
2983
+// {
2984
+//
2985
+// }
2986
+
28772987 } else
28782988 if (source == threeButton)
28792989 {
....@@ -2910,6 +3020,8 @@
29103020 bigThree.add(centralPanel);
29113021 bigThree.add(XYZPanel);
29123022 bigThree.FlushUI();
3023
+
3024
+ cameraView.requestFocusInWindow();
29133025 } else
29143026 if (source == fourButton)
29153027 {
....@@ -2945,6 +3057,8 @@
29453057 bigThree.ClearUI();
29463058 bigThree.add(scenePanel);
29473059 bigThree.FlushUI();
3060
+
3061
+ cameraView.requestFocusInWindow();
29483062 } else
29493063 if (source == sixButton)
29503064 {
....@@ -2981,6 +3095,8 @@
29813095 bigThree.add(scenePanel);
29823096 bigThree.add(centralPanel);
29833097 bigThree.FlushUI();
3098
+
3099
+ cameraView.requestFocusInWindow();
29843100 } else
29853101 if (source == sevenButton)
29863102 {
....@@ -3018,6 +3134,8 @@
30183134 bigThree.add(centralPanel);
30193135 bigThree.add(XYZPanel);
30203136 bigThree.FlushUI();
3137
+
3138
+ cameraView.requestFocusInWindow();
30213139 } else
30223140 if (source == rootButton)
30233141 {
....@@ -3029,6 +3147,7 @@
30293147 EditObject(obj);
30303148 }
30313149
3150
+ cameraView.requestFocusInWindow();
30323151 refreshContents(true);
30333152 } else
30343153 if (source == closeButton)
....@@ -3038,18 +3157,27 @@
30383157 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
30393158 {
30403159 ab = (cRadio)e.nextElement();
3041
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3160
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
30423161 {
3162
+ // Patch to avoid bug with transparency.
3163
+ if (!ab.hadMaterial)
3164
+ {
3165
+ ab.object.material = null;
3166
+ }
3167
+
30433168 buttonGroup.remove(ab);
30443169 radioPanel.remove(ab);
30453170
3046
- ab.GetObject().editWindow = null;
3171
+ //ab.GetObject().editWindow = null;
3172
+ ab.GetObject().manipWindow = null;
30473173 // ab.GetObject().objectUI = null; // ?????????
30483174
30493175 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
30503176 break;
30513177 }
30523178 }
3179
+
3180
+ cameraView.requestFocusInWindow();
30533181 refreshContents(true);
30543182 } else
30553183 if (source == editItem || source == editButton)
....@@ -3154,7 +3282,8 @@
31543282 }
31553283
31563284 // fix "+" issue
3157
- group.editWindow = this;
3285
+ //group.editWindow = this;
3286
+ group.manipWindow = this;
31583287
31593288 /*
31603289 currentLayout = radio.layout;
....@@ -3167,6 +3296,8 @@
31673296 //group.parent = null; // ROOT
31683297 //group.attributes = -1;
31693298 ResetModel();
3299
+
3300
+ cameraView.requestFocusInWindow();
31703301 refreshContents(true);
31713302 } else if (event.getSource() == editCameraItem)
31723303 {
....@@ -3190,7 +3321,6 @@
31903321 }
31913322
31923323 boolean useclient = false;
3193
- cRadio radio;
31943324
31953325 void ToggleRoot()
31963326 {
....@@ -3429,7 +3559,8 @@
34293559
34303560 int size = obj.MemorySize();
34313561
3432
- System.err.println((size/1024) + " KB is the size of " + obj);
3562
+ //System.err.println((size/1024) + " KB is the size of " + obj);
3563
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
34333564 }
34343565 }
34353566 catch (Exception e)
....@@ -3510,6 +3641,13 @@
35103641 void GenNormals(boolean crease)
35113642 {
35123643 group.GenNormalsS(crease);
3644
+
3645
+ refreshContents();
3646
+ }
3647
+
3648
+ void GenNormalsMESH()
3649
+ {
3650
+ group.GenNormalsMeshS();
35133651
35143652 refreshContents();
35153653 }
....@@ -4137,6 +4275,18 @@
41374275 refreshContents();
41384276 }
41394277
4278
+ void RewindLeaves(boolean hide)
4279
+ {
4280
+ group.selection.RewindLeaves(hide);
4281
+ refreshContents();
4282
+ }
4283
+
4284
+ void RandomLeaves(boolean hide)
4285
+ {
4286
+ group.selection.RandomLeaves(hide);
4287
+ refreshContents();
4288
+ }
4289
+
41404290 void SetTexRes(int tr)
41414291 {
41424292 group.selection.SetTexRes(tr);
....@@ -4312,7 +4462,6 @@
43124462 //case 702: // Event.LIST_DESELECT
43134463 group.deselectAll();
43144464 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4315
- objEditor.ClearInfo(); // .GetMaterial());
43164465 if (tps != null)
43174466 {
43184467 for (int i=0; i < tps.length; i++)
....@@ -4321,10 +4470,8 @@
43214470
43224471 //if (child.parent != null)
43234472 //child.parent.addSelectee(child);
4473
+ objEditor.SetMaterial(child);
43244474 group.addSelectee(child);
4325
- objEditor.SetMaterial(child); // .GetMaterial());
4326
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4327
- System.err.println("info : " + child.GetPath());
43284475 }
43294476 }
43304477 // else
....@@ -4334,8 +4481,6 @@
43344481 // System.err.println("info : " + group.GetPath());
43354482 // }
43364483
4337
- objEditor.SetText(); // jan 2014
4338
-
43394484 if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
43404485 CameraPane.flash = true;
43414486
....@@ -4359,6 +4504,26 @@
43594504
43604505 freezemodel = false;
43614506 }
4507
+
4508
+ void refreshContents(boolean cp)
4509
+ {
4510
+ if (!Globals.MOUSEDRAGGED)
4511
+ {
4512
+ objEditor.ClearInfo(); // .GetMaterial());
4513
+
4514
+ for (int i=0; i < group.selection.Size(); i++)
4515
+ {
4516
+ Object3D child = (Object3D) group.selection.get(i);
4517
+
4518
+ objEditor.AddInfo(child, this, true);
4519
+ System.err.println("info : " + child.GetPath());
4520
+ }
4521
+
4522
+ objEditor.SetText(); // jan 2014
4523
+ }
4524
+
4525
+ super.refreshContents(cp);
4526
+ }
43624527
43634528 void linkSomething(Object3D thing)
43644529 {
....@@ -4441,6 +4606,7 @@
44414606
44424607 if (cut)
44434608 {
4609
+ if (Globals.SAVEONMAKE)
44444610 Save();
44454611 //int indices[] = jList.getSelectedIndices();
44464612 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -5159,9 +5325,12 @@
51595325 cButton clearpanelButton;
51605326 cButton unselectButton;
51615327
5162
- cButton saveButton;
5328
+ cButton minButton;
5329
+ cButton maxButton;
5330
+ cButton fullButton;
51635331 cButton undoButton;
51645332 cButton redoButton;
5333
+ cButton saveButton;
51655334 cButton oneStepButton;
51665335
51675336 cButton screenfitButton;
....@@ -5174,14 +5343,6 @@
51745343 cButton closeButton;
51755344
51765345 cButton setsupportButton;
5177
-
5178
- cButton twoButton;
5179
- cButton sixButton;
5180
- cButton threeButton;
5181
- cButton sevenButton;
5182
- cButton fourButton; // full panel
5183
- cButton oneButton; // full XYZ
5184
- //cButton currentLayout;
51855346
51865347 //
51875348 //Composite
....@@ -5259,6 +5420,10 @@
52595420 private MenuItem showleavesItem;
52605421 private MenuItem markleavesItem;
52615422 private MenuItem unmarkleavesItem;
5423
+ private MenuItem rewindleavesItem;
5424
+ private MenuItem unrewindleavesItem;
5425
+ private MenuItem randomleavesItem;
5426
+ private MenuItem unrandomleavesItem;
52625427
52635428 private MenuItem flipVItem;
52645429 private MenuItem unflipVItem;