Normand Briere
2019-07-07 46dbce888e7c3eff8969f1ddbe22e144410b67f4
GroupEditor.java
....@@ -220,7 +220,7 @@
220220 // toggleSwitchItem.addItemListener(this);
221221 // toggleSwitchItem.setState(CameraPane.SWITCH);
222222
223
- cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
223
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles"));
224224 toggleHandleItem.addItemListener(this);
225225 toggleHandleItem.setState(CameraPane.HANDLES);
226226
....@@ -380,6 +380,7 @@
380380 shadowYItem.addActionListener(this);
381381 shadowZItem = menu.add(new MenuItem("Shadow Blue"));
382382 shadowZItem.addActionListener(this);
383
+
383384 if (Globals.ADVANCED)
384385 {
385386 menu.add("-");
....@@ -582,7 +583,7 @@
582583 */
583584 cGridBag copyOptionsPanel = new cGridBag();
584585
585
- copyOptionsPanel.preferredHeight = 2;
586
+ copyOptionsPanel.preferredHeight = 1;
586587
587588 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
588589
....@@ -590,14 +591,21 @@
590591 //minButton.setToolTipText("Minimize window");
591592 //minButton.addActionListener(this);
592593
593
- oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
594
- maxButton.setToolTipText("Maximize window");
595
- maxButton.addActionListener(this);
594
+ if (Globals.ADVANCED)
595
+ {
596
+ oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
597
+ maxButton.setToolTipText("Maximize window");
598
+ maxButton.addActionListener(this);
599
+ }
596600
597601 oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
598602 fullButton.setToolTipText("Full-screen window");
599603 fullButton.addActionListener(this);
600604
605
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
606
+ screenfitButton.setToolTipText("Screen fit");
607
+ screenfitButton.addActionListener(this);
608
+
601609 oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
602610 restoreCameraButton.setToolTipText("Restore viewpoint");
603611 restoreCameraButton.addActionListener(this);
....@@ -630,10 +638,6 @@
630638
631639 //oe.toolboxPanel.Return();
632640
633
- copyOptionsPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
634
- screenfitButton.setToolTipText("Screen fit");
635
- screenfitButton.addActionListener(this);
636
-
637641 // copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
638642 // trackCB.setToolTipText("Enable tracking");
639643 // trackCB.addItemListener(this);
....@@ -726,7 +730,7 @@
726730 compositeButton.addActionListener(this);
727731
728732 oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
729
- switchButton.setToolTipText("Create switch");
733
+ switchButton.setToolTipText("Create item switcher");
730734 switchButton.addActionListener(this);
731735
732736 oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
....@@ -863,9 +867,13 @@
863867
864868 if (true) // Globals.ADVANCED)
865869 {
866
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
867
- supportCB.setToolTipText("Enable rigging");
868
- supportCB.addItemListener(this);
870
+// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
871
+// supportCB.setToolTipText("Enable rigging");
872
+// supportCB.addItemListener(this);
873
+
874
+ panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints);
875
+ freezeCB.setToolTipText("Fast moving camera");
876
+ freezeCB.addItemListener(this);
869877
870878 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
871879 // localCB.addItemListener(this);
....@@ -929,7 +937,7 @@
929937 toggleTextureCB.addItemListener(this);
930938
931939 panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints);
932
- toggleSwitchCB.setToolTipText("Use switch");
940
+ toggleSwitchCB.setToolTipText("Choose a single item");
933941 toggleSwitchCB.addItemListener(this);
934942
935943 panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints);
....@@ -1000,6 +1008,7 @@
10001008 cCheckBox slowCB;
10011009 cCheckBox boxCB;
10021010 cCheckBox zoomBoxCB;
1011
+ cCheckBox freezeCB;
10031012 //cToggleButton trackCB;
10041013 cCheckBox trackCB;
10051014 cCheckBox smoothfocusCB;
....@@ -1118,6 +1127,10 @@
11181127 {
11191128 Globals.COMPUTESHADOWWHENLIVE ^= true;
11201129 }
1130
+ else if(e.getSource() == freezeCB)
1131
+ {
1132
+ Globals.FREEZEONMOVE ^= true;
1133
+ }
11211134 else if(e.getSource() == autosaveCB)
11221135 {
11231136 Globals.SAVEONMAKE ^= true;
....@@ -1202,8 +1215,6 @@
12021215 }
12031216 }
12041217
1205
- String string = (String) object;
1206
-
12071218 System.out.println("Transfer = " + object + "; drop : " + target);
12081219 // if( object instanceof java.io.File[])
12091220 // {
....@@ -1211,6 +1222,8 @@
12111222 // objEditor.DropFile((java.io.File[]) object, true);
12121223 // return;
12131224 // }
1225
+
1226
+ String string = (String) object;
12141227
12151228 // File path for Mac and Windows
12161229 if (string.charAt(0) == '/' || string.charAt(1) == ':')
....@@ -1459,6 +1472,9 @@
14591472 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
14601473 animationItem.addItemListener(this);
14611474 animationItem.setState(Globals.ANIMATION);
1475
+
1476
+ menu.add(archiveItem = new MenuItem("Archive3D..."));
1477
+ archiveItem.addActionListener(this);
14621478
14631479 menu.add("-");
14641480 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
....@@ -2122,25 +2138,25 @@
21222138 Composite csg = new GroupLeaf();
21232139 csg.count = 5;
21242140 group(csg);
2125
- Composite child = new cGroup();
2141
+ Composite child = new cGroup("Branch");
21262142 csg.addChild(child);
21272143 child.addChild(csg);
21282144 } else
21292145 if (source == doubleItem)
21302146 {
2131
- Composite csg = new GroupLeaf();
2147
+ Composite csg = new GroupLeaf("Fork");
21322148 csg.count = 5;
21332149 group(csg);
2134
- Composite child = new cGroup();
2150
+ Composite child = new cGroup("Branch A");
21352151 csg.addChild(child);
21362152 child.addChild(csg);
2137
- child = new cGroup();
2153
+ child = new cGroup("Branch B");
21382154 csg.addChild(child);
21392155 child.addChild(csg);
21402156 } else
21412157 if (source == tripleItem)
21422158 {
2143
- Composite csg = new GroupLeaf();
2159
+ Composite csg = new GroupLeaf("Trident");
21442160 csg.count = 4;
21452161 group(csg);
21462162 Composite child = new cGroup();
....@@ -2204,7 +2220,8 @@
22042220 } else
22052221 if (source == undoButton)
22062222 {
2207
- Undo();
2223
+ if (!Undo())
2224
+ java.awt.Toolkit.getDefaultToolkit().beep();
22082225 } else
22092226 if (source == redoButton)
22102227 {
....@@ -2212,7 +2229,8 @@
22122229 } else
22132230 if (source == saveButton)
22142231 {
2215
- Save();
2232
+ if (!Save(true))
2233
+ java.awt.Toolkit.getDefaultToolkit().beep();
22162234 } else
22172235 if (source == oneStepButton)
22182236 {
....@@ -2221,17 +2239,14 @@
22212239 } else
22222240 if (source == screenfitButton)
22232241 {
2224
- //Reload(lastConverter, lastFilename, true);
22252242 ScreenFit();
22262243 } else
22272244 if (source == screenfitpointButton)
22282245 {
2229
- //Reload(lastConverter, lastFilename, true);
22302246 ScreenFitPoint();
22312247 } else
22322248 if (source == snapobjectButton)
22332249 {
2234
- //Reload(lastConverter, lastFilename, true);
22352250 SnapObject();
22362251 } else
22372252 // if (event.getSource() == recompileButton)
....@@ -2755,15 +2770,28 @@
27552770 } else
27562771 if (source == ungroupItem || source == ungroupButton)
27572772 {
2758
- //ungroup();
2773
+ boolean hasRoot = false;
2774
+
27592775 for (int i=0; i<group.selection.size(); i++)
27602776 {
2761
- Ungroup(group.selection.get(i));
2777
+ if (group.selection.get(i) == group)
2778
+ {
2779
+ hasRoot = true;
2780
+ break;
2781
+ }
27622782 }
27632783
2764
- ClearSelection(false);
2765
-
2766
- refreshContents();
2784
+ if (!hasRoot)
2785
+ {
2786
+ for (int i=0; i<group.selection.size(); i++)
2787
+ {
2788
+ Ungroup(group.selection.get(i));
2789
+ }
2790
+
2791
+ ClearSelection(false);
2792
+
2793
+ refreshContents();
2794
+ }
27672795 } else
27682796 if (source == genUVItem)
27692797 {
....@@ -4706,7 +4734,7 @@
47064734 void refreshContents(boolean cp)
47074735 {
47084736 if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info"))
4709
- if (!Globals.MOUSEDRAGGED) // && !Globals.TIMERRUNNING)
4737
+ if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
47104738 {
47114739 objEditor.ClearInfo(); // .GetMaterial());
47124740
....@@ -5526,9 +5554,6 @@
55265554
55275555 cButton restoreCameraButton;
55285556
5529
- cButton minButton;
5530
- cButton maxButton;
5531
- cButton fullButton;
55325557 cButton saveButton;
55335558 cButton oneStepButton;
55345559