Normand Briere
2019-06-24 c67da2e5d8655704601d6d06e8bc60aabe212253
GroupEditor.java
....@@ -154,6 +154,12 @@
154154 oe.menuBar.add(menu = new Menu("Edit"));
155155 //editItem = menu.add(new MenuItem("Edit"));
156156 //editItem.addActionListener(this);
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("-");
157163 duplicateItem = menu.add(new MenuItem("Duplicate"));
158164 duplicateItem.addActionListener(this);
159165 cloneItem = menu.add(new MenuItem("Clone"));
....@@ -170,7 +176,6 @@
170176 copyItem.addActionListener(this);
171177 pasteItem = menu.add(new MenuItem("Paste"));
172178 pasteItem.addActionListener(this);
173
- menu.add("-");
174179
175180 menu.add("-");
176181 pasteIntoItem = menu.add(new MenuItem("Paste into"));
....@@ -197,7 +202,7 @@
197202 //zBufferItem.addActionListener(this);
198203 //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
199204 //normalLensItem.addActionListener(this);
200
- cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera"));
205
+ cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint"));
201206 revertCameraItem.addActionListener(this);
202207
203208 cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
....@@ -240,7 +245,7 @@
240245
241246 cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
242247 toggleDebugItem.addItemListener(this);
243
- toggleDebugItem.setState(CameraPane.DEBUG);
248
+ toggleDebugItem.setState(Globals.DEBUG);
244249
245250 cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
246251 toggleFrustumItem.addItemListener(this);
....@@ -261,7 +266,7 @@
261266 // animationItem.addItemListener(this);
262267 // animationItem.setState(CameraPane.ANIMATION);
263268 cameraMenu.add("-");
264
- cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera"));
269
+ cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint"));
265270 editCameraItem.addActionListener(this);
266271
267272 if (Globals.ADVANCED)
....@@ -363,11 +368,11 @@
363368 billboardItem.addActionListener(this);
364369 csgItem = menu.add(new MenuItem("CSG"));
365370 csgItem.addActionListener(this);
366
- shadowXItem = menu.add(new MenuItem("Shadow X"));
371
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
367372 shadowXItem.addActionListener(this);
368
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
373
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
369374 shadowYItem.addActionListener(this);
370
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
375
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
371376 shadowZItem.addActionListener(this);
372377 if (Globals.ADVANCED)
373378 {
....@@ -464,6 +469,14 @@
464469 markleavesItem.addActionListener(this);
465470 unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
466471 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);
467480 menu.add("-");
468481 flipVItem = menu.add(new MenuItem("Flip V"));
469482 flipVItem.addActionListener(this);
....@@ -521,6 +534,18 @@
521534
522535 void SetupUI2(ObjEditor oe)
523536 {
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
+
524549 //new Exception().printStackTrace();
525550
526551 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -551,11 +576,35 @@
551576 */
552577 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
553578
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
+
554603 oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
555604 liveCB.setToolTipText("Enable animation");
556605 liveCB.addItemListener(this);
557606
558
- oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
607
+ oe.toolbarPanel.add(oneStepButton = new cButton("\u29f4", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
559608 oneStepButton.setToolTipText("Animate one step forward");
560609 oneStepButton.addActionListener(this);
561610
....@@ -563,7 +612,7 @@
563612 fastCB.setToolTipText("Fast mode");
564613 fastCB.addItemListener(this);
565614
566
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
615
+ oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK)); //, oe.aConstraints);
567616 trackCB.setToolTipText("Enable tracking");
568617 trackCB.addItemListener(this);
569618
....@@ -587,19 +636,19 @@
587636
588637 oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
589638
590
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
639
+ oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
591640 twoButton.setToolTipText("Show center view only");
592641 twoButton.addActionListener(this);
593
- oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
642
+ oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
594643 fourButton.addActionListener(this);
595644 fourButton.setToolTipText("Show left panel only");
596
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
645
+ oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
597646 sixButton.setToolTipText("2-column layout left");
598647 sixButton.addActionListener(this);
599
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
648
+ oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
600649 threeButton.setToolTipText("2-column layout right");
601650 threeButton.addActionListener(this);
602
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
651
+ oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
603652 sevenButton.setToolTipText("3-column layout");
604653 sevenButton.addActionListener(this);
605654 //
....@@ -614,32 +663,30 @@
614663 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
615664 //clearButton.addActionListener(this);
616665
617
- cGridBag commandsPanel = new cGridBag();
618
-
619
- commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
666
+ editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
620667 editButton.setToolTipText("Edit selection");
621668 editButton.addActionListener(this);
622669
623
- commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
670
+ editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
624671 uneditButton.setToolTipText("Unedit selection");
625672 uneditButton.addActionListener(this);
626673
627
- commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
674
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
628675 allParamsButton.setToolTipText("Edit all params");
629676 allParamsButton.addActionListener(this);
630677
631
- commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
678
+ editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
632679 clearPanelButton.setToolTipText("Clear edit panel");
633680 clearPanelButton.addActionListener(this);
634681
635
- commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
682
+ editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
636683 unselectButton.setToolTipText("Unselect");
637684 unselectButton.addActionListener(this);
638685
639
- commandsPanel.preferredHeight = 1;
686
+ editCommandsPanel.preferredHeight = 1;
640687
641
- oe.treePanel.add(commandsPanel);
642
- oe.treePanel.Return();
688
+// oe.treePanel.add(commandsPanel);
689
+// oe.treePanel.Return();
643690
644691 // oe.aConstraints.gridx += 1;
645692 // oe.aConstraints.weighty = 0;
....@@ -761,11 +808,19 @@
761808 // debugCB.addItemListener(this);
762809
763810 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
811
+ oeilCB.setToolTipText("Move camera when tracking target");
764812 oeilCB.addItemListener(this);
765813
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
+ {
766820 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
767821 lookAtCB.setToolTipText("Look-at target");
768822 lookAtCB.addItemListener(this);
823
+ }
769824
770825 }
771826
....@@ -780,6 +835,14 @@
780835 void EditObject(Object3D obj)
781836 {
782837 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
+
783846 radioButton.SetObject(obj);
784847 radioButton.layout = sevenButton;
785848 radioButton.SetCamera(cameraView.renderCamera, false);
....@@ -791,6 +854,8 @@
791854
792855 void SetupViews(ObjEditor oe)
793856 {
857
+ theFrame = this;
858
+
794859 oe.SetupViews();
795860
796861 System.out.println("SetupViews");
....@@ -814,7 +879,9 @@
814879 JCheckBox speakerCameraCB;
815880 JCheckBox speakerFocusCB;
816881 JCheckBox debugCB;
882
+
817883 JCheckBox oeilCB;
884
+ JCheckBox shadowCB;
818885 JCheckBox lookAtCB;
819886
820887 // static int COLOR = 1;
....@@ -853,6 +920,7 @@
853920 } else if(e.getSource() == liveCB)
854921 {
855922 cameraView.ToggleLive();
923
+ refreshContents(false);
856924 }
857925 else if(e.getSource() == supportCB)
858926 {
....@@ -916,6 +984,10 @@
916984 else if(e.getSource() == oeilCB)
917985 {
918986 cameraView.ToggleOeil();
987
+ }
988
+ else if(e.getSource() == shadowCB)
989
+ {
990
+ Globals.COMPUTESHADOWWHENLIVE ^= true;
919991 }
920992 else if(e.getSource() == lookAtCB)
921993 {
....@@ -1260,7 +1332,7 @@
12601332 memoryItem.addActionListener(this);
12611333 menu.add(analyzeItem = new MenuItem("Analyze"));
12621334 analyzeItem.addActionListener(this);
1263
- menu.add(dumpItem = new MenuItem("Dump"));
1335
+ menu.add(dumpItem = new MenuItem("Print"));
12641336 dumpItem.addActionListener(this);
12651337 // menu.add(pathItem = new MenuItem("From-to path"));
12661338 // pathItem.addActionListener(this);
....@@ -1401,6 +1473,7 @@
14011473 shadow.material = new cMaterial(obj.material);
14021474 shadow.material.diffuse = 0.0001f;
14031475 shadow.material.specular = 0.0001f;
1476
+ //shadow.projectedVertices[1].x = 300;
14041477
14051478 makeSomething(shadow);
14061479 }
....@@ -1951,6 +2024,30 @@
19512024 {
19522025 DumpObject();
19532026 } 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();
2038
+ } else
2039
+ if (source == undoButton)
2040
+ {
2041
+ Undo();
2042
+ } else
2043
+ if (source == redoButton)
2044
+ {
2045
+ Redo();
2046
+ } else
2047
+ if (source == saveButton)
2048
+ {
2049
+ Save();
2050
+ } else
19542051 if (source == oneStepButton)
19552052 {
19562053 Globals.ONESTEP = true;
....@@ -2004,6 +2101,14 @@
20042101 if (source == cutItem || source == clearButton)
20052102 {
20062103 loadClipboard(true);
2104
+ } else
2105
+ if (source == undoItem)
2106
+ {
2107
+ Undo();
2108
+ } else
2109
+ if (source == redoItem)
2110
+ {
2111
+ Redo();
20072112 } else
20082113 if (source == duplicateItem)
20092114 {
....@@ -2504,7 +2609,7 @@
25042609 } else
25052610 if (source == genNormalsMESHItem)
25062611 {
2507
- GenNormals(true); // TODO
2612
+ GenNormalsMESH();
25082613 } else
25092614 if (source == genNormalsORGANItem)
25102615 {
....@@ -2569,6 +2674,22 @@
25692674 if (source == unmarkleavesItem)
25702675 {
25712676 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);
25722693 } else
25732694 if (source == flipVItem)
25742695 {
....@@ -2836,6 +2957,24 @@
28362957 bigThree.ClearUI();
28372958 bigThree.add(centralPanel);
28382959 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
+
28392978 } else
28402979 if (source == threeButton)
28412980 {
....@@ -2872,6 +3011,8 @@
28723011 bigThree.add(centralPanel);
28733012 bigThree.add(XYZPanel);
28743013 bigThree.FlushUI();
3014
+
3015
+ cameraView.requestFocusInWindow();
28753016 } else
28763017 if (source == fourButton)
28773018 {
....@@ -2907,6 +3048,8 @@
29073048 bigThree.ClearUI();
29083049 bigThree.add(scenePanel);
29093050 bigThree.FlushUI();
3051
+
3052
+ cameraView.requestFocusInWindow();
29103053 } else
29113054 if (source == sixButton)
29123055 {
....@@ -2943,6 +3086,8 @@
29433086 bigThree.add(scenePanel);
29443087 bigThree.add(centralPanel);
29453088 bigThree.FlushUI();
3089
+
3090
+ cameraView.requestFocusInWindow();
29463091 } else
29473092 if (source == sevenButton)
29483093 {
....@@ -2980,6 +3125,8 @@
29803125 bigThree.add(centralPanel);
29813126 bigThree.add(XYZPanel);
29823127 bigThree.FlushUI();
3128
+
3129
+ cameraView.requestFocusInWindow();
29833130 } else
29843131 if (source == rootButton)
29853132 {
....@@ -2991,6 +3138,7 @@
29913138 EditObject(obj);
29923139 }
29933140
3141
+ cameraView.requestFocusInWindow();
29943142 refreshContents(true);
29953143 } else
29963144 if (source == closeButton)
....@@ -3000,8 +3148,14 @@
30003148 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
30013149 {
30023150 ab = (cRadio)e.nextElement();
3003
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3151
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
30043152 {
3153
+ // Patch to avoid bug with transparency.
3154
+ if (!ab.hadMaterial)
3155
+ {
3156
+ ab.object.material = null;
3157
+ }
3158
+
30053159 buttonGroup.remove(ab);
30063160 radioPanel.remove(ab);
30073161
....@@ -3012,6 +3166,8 @@
30123166 break;
30133167 }
30143168 }
3169
+
3170
+ cameraView.requestFocusInWindow();
30153171 refreshContents(true);
30163172 } else
30173173 if (source == editItem || source == editButton)
....@@ -3028,7 +3184,7 @@
30283184 child.CloseUI();
30293185 listUI.remove(child);
30303186
3031
- child.editWindow = null; // ???????????
3187
+ //child.editWindow = null; // ???????????
30323188 }
30333189 objEditor.ctrlPanel.FlushUI();
30343190 //objEditor.jTree.clearSelection();
....@@ -3115,7 +3271,8 @@
31153271 sideView.object = group;
31163272 }
31173273
3118
-// fix "+" issue group.editWindow = this;
3274
+// fix "+" issue
3275
+ //group.editWindow = this;
31193276
31203277 /*
31213278 currentLayout = radio.layout;
....@@ -3128,6 +3285,8 @@
31283285 //group.parent = null; // ROOT
31293286 //group.attributes = -1;
31303287 ResetModel();
3288
+
3289
+ cameraView.requestFocusInWindow();
31313290 refreshContents(true);
31323291 } else if (event.getSource() == editCameraItem)
31333292 {
....@@ -3151,7 +3310,6 @@
31513310 }
31523311
31533312 boolean useclient = false;
3154
- cRadio radio;
31553313
31563314 void ToggleRoot()
31573315 {
....@@ -3390,7 +3548,8 @@
33903548
33913549 int size = obj.MemorySize();
33923550
3393
- System.err.println((size/1024) + " KB is the size of " + obj);
3551
+ //System.err.println((size/1024) + " KB is the size of " + obj);
3552
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
33943553 }
33953554 }
33963555 catch (Exception e)
....@@ -3471,6 +3630,13 @@
34713630 void GenNormals(boolean crease)
34723631 {
34733632 group.GenNormalsS(crease);
3633
+
3634
+ refreshContents();
3635
+ }
3636
+
3637
+ void GenNormalsMESH()
3638
+ {
3639
+ group.GenNormalsMeshS();
34743640
34753641 refreshContents();
34763642 }
....@@ -4098,6 +4264,18 @@
40984264 refreshContents();
40994265 }
41004266
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
+
41014279 void SetTexRes(int tr)
41024280 {
41034281 group.selection.SetTexRes(tr);
....@@ -4273,7 +4451,6 @@
42734451 //case 702: // Event.LIST_DESELECT
42744452 group.deselectAll();
42754453 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4276
- objEditor.ClearInfo(); // .GetMaterial());
42774454 if (tps != null)
42784455 {
42794456 for (int i=0; i < tps.length; i++)
....@@ -4282,10 +4459,8 @@
42824459
42834460 //if (child.parent != null)
42844461 //child.parent.addSelectee(child);
4462
+ objEditor.SetMaterial(child);
42854463 group.addSelectee(child);
4286
- objEditor.SetMaterial(child); // .GetMaterial());
4287
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4288
- System.err.println("info : " + child.GetPath());
42894464 }
42904465 }
42914466 // else
....@@ -4295,16 +4470,17 @@
42954470 // System.err.println("info : " + group.GetPath());
42964471 // }
42974472
4298
- objEditor.SetText(); // jan 2014
4299
-
4300
- if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4473
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
43014474 CameraPane.flash = true;
43024475
4303
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4476
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
43044477 // a camera
43054478 {
4306
- CameraPane.camerachangeframe = 0; // don't refuse it
4307
- Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4479
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
4480
+ {
4481
+ CameraPane.camerachangeframe = 0; // don't refuse it
4482
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4483
+ }
43084484 // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
43094485 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
43104486 }
....@@ -4317,6 +4493,26 @@
43174493
43184494 freezemodel = false;
43194495 }
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
+ }
43204516
43214517 void linkSomething(Object3D thing)
43224518 {
....@@ -4388,6 +4584,7 @@
43884584 {
43894585 if (group.selection.isEmpty())
43904586 return;
4587
+
43914588 Grafreed.clipboardIsTempGroup = false;
43924589 Composite tGroup = null;
43934590 if (group.selection.size() > 0) // 1)
....@@ -4398,6 +4595,7 @@
43984595
43994596 if (cut)
44004597 {
4598
+ Save();
44014599 //int indices[] = jList.getSelectedIndices();
44024600 //for (int i = indices.length - 1; i >= 0; i--)
44034601 //jList.remove(indices[i]);
....@@ -4487,8 +4685,10 @@
44874685 }
44884686
44894687 }
4688
+
44904689 if (Grafreed.clipboardIsTempGroup)
44914690 Grafreed.clipboard = tGroup;
4691
+
44924692 if (cut)
44934693 {
44944694 ResetModel();
....@@ -5113,6 +5313,12 @@
51135313 cButton clearpanelButton;
51145314 cButton unselectButton;
51155315
5316
+ cButton minButton;
5317
+ cButton maxButton;
5318
+ cButton fullButton;
5319
+ cButton undoButton;
5320
+ cButton redoButton;
5321
+ cButton saveButton;
51165322 cButton oneStepButton;
51175323
51185324 cButton screenfitButton;
....@@ -5126,14 +5332,6 @@
51265332
51275333 cButton setsupportButton;
51285334
5129
- cButton twoButton;
5130
- cButton sixButton;
5131
- cButton threeButton;
5132
- cButton sevenButton;
5133
- cButton fourButton; // full panel
5134
- cButton oneButton; // full XYZ
5135
- //cButton currentLayout;
5136
-
51375335 //
51385336 //Composite
51395337 Object3D // to do !!
....@@ -5145,6 +5343,8 @@
51455343 private MenuItem lookFromItem;
51465344 private MenuItem switchItem;
51475345 private MenuItem cutItem;
5346
+ private MenuItem undoItem;
5347
+ private MenuItem redoItem;
51485348 private MenuItem duplicateItem;
51495349 private MenuItem cloneItem;
51505350 private MenuItem cloneSupportItem;
....@@ -5208,6 +5408,10 @@
52085408 private MenuItem showleavesItem;
52095409 private MenuItem markleavesItem;
52105410 private MenuItem unmarkleavesItem;
5411
+ private MenuItem rewindleavesItem;
5412
+ private MenuItem unrewindleavesItem;
5413
+ private MenuItem randomleavesItem;
5414
+ private MenuItem unrandomleavesItem;
52115415
52125416 private MenuItem flipVItem;
52135417 private MenuItem unflipVItem;