Normand Briere
2019-05-01 d1e1417edc8a6ccf195b6da3270f22234dda61e4
Fix random/switch node.
5 files modified
50 ■■■■ changed files
Globals.java 2 ●●●●● patch | view | raw | blame | history
GroupEditor.java 29 ●●●●● patch | view | raw | blame | history
ObjEditor.java 7 ●●●● patch | view | raw | blame | history
RandomNode.java 4 ●●●● patch | view | raw | blame | history
ScriptNode.java 8 ●●●● patch | view | raw | blame | history
Globals.java
....@@ -1,6 +1,8 @@
11
22 public class Globals
33 {
4
+ public static boolean ADVANCED = false;
5
+
46 static iCameraPane theRenderer;
57
68 private static boolean LIVE = false;
GroupEditor.java
....@@ -239,16 +239,16 @@
239239 ungroupItem = menu.add(new MenuItem("Ungroup"));
240240 ungroupItem.addActionListener(this);
241241 menu.add("-");
242
- randomItem = menu.add(new MenuItem("Random"));
242
+ randomItem = menu.add(new MenuItem("Switch node"));
243243 randomItem.addActionListener(this);
244
- physicsItem = menu.add(new MenuItem("Physics"));
245
- physicsItem.addActionListener(this);
246
- frameselectorItem = menu.add(new MenuItem("Frame Selector"));
247
- frameselectorItem.addActionListener(this);
248244 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
249245 switchGeoItem.addActionListener(this);
250246 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
251247 switchTransfoItem.addActionListener(this);
248
+ physicsItem = menu.add(new MenuItem("Physics"));
249
+ physicsItem.addActionListener(this);
250
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
251
+ frameselectorItem.addActionListener(this);
252252 morphItem = menu.add(new MenuItem("Morph"));
253253 morphItem.addActionListener(this);
254254 scriptNodeItem = menu.add(new MenuItem("Script Node"));
....@@ -454,17 +454,14 @@
454454
455455 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
456456 // screenfitpointButton.addActionListener(this);
457
-// oe.aConstraints.gridx += 1;
458
- oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
459
- snapobjectButton.addActionListener(this);
460
- snapobjectButton.setToolTipText("Snap Object");
461
- oe.aConstraints.gridx += 1;
462457
463
- //aConstraints.gridx = 0;
464
- //aConstraints.gridy += 1;
465
- oe.aConstraints.weighty = 0;
466
- oe.aConstraints.gridwidth = 1;
467
-
458
+ if (Globals.ADVANCED)
459
+ {
460
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
461
+ snapobjectButton.addActionListener(this);
462
+ snapobjectButton.setToolTipText("Snap Object");
463
+ }
464
+
468465 oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
469466 flashSelectionButton.setToolTipText("Show selection");
470467 flashSelectionButton.addActionListener(this);
....@@ -2238,7 +2235,7 @@
22382235 RandomNode random = new RandomNode();
22392236 group(random);
22402237 if (random.size() > 0)
2241
- random.name = random.get(0).name + "Rnd";
2238
+ random.name = random.get(0).name + "Switch";
22422239 } else
22432240 if (source == physicsItem)
22442241 {
ObjEditor.java
....@@ -951,10 +951,6 @@
951951
952952 void SetupUI2(ObjEditor oe)
953953 {
954
-// oe.aConstraints.weightx = 0;
955
-// oe.aConstraints.weighty = 0;
956
-// oe.aConstraints.gridx = 0;
957
-// oe.aConstraints.gridy = 0;
958954 //SetupName(oe);
959955
960956 namePanel = new cGridBag();
....@@ -971,7 +967,8 @@
971967 setupPanel = new cGridBag().setVertical(false);
972968
973969 liveCB = AddCheckBox(setupPanel, "Live", copy.live);
974
- link2masterCB = AddCheckBox(setupPanel, "Supp", copy.link2master);
970
+ if (Globals.ADVANCED)
971
+ link2masterCB = AddCheckBox(setupPanel, "Supp", copy.link2master);
975972 hideCB = AddCheckBox(setupPanel, "Hide", copy.hide);
976973 // Return();
977974 markCB = AddCheckBox(setupPanel, "Mark", copy.marked);
RandomNode.java
....@@ -66,7 +66,7 @@
6666 // if (!link2master && rnd != -1)
6767 // new Exception().printStackTrace();
6868
69
- if (link2master && rnd != -1) // freeze current value
69
+ if (!random && rnd != -1) // freeze current value
7070 return super.reserve(rnd);
7171
7272 if (firstchoice == 0)
....@@ -142,7 +142,7 @@
142142 super.get(rnd).count++;
143143 //assert (child.count >= 0);
144144
145
- if (!link2master) // volatile value
145
+ if (random) // volatile value
146146 rnd = -1;
147147 }
148148
ScriptNode.java
....@@ -1182,14 +1182,14 @@
11821182 if (CameraPane.SPEAKERMOCAP)
11831183 {
11841184 // switch to talk mocap
1185
- String talkmocap = //aliases.get(
1186
- speakername + "talk"//)
1185
+ String talkmocap = aliases.get(
1186
+ speakername + "talk")
11871187 ;
11881188 // while (aliases.get(talkmocap) != null)
11891189 // talkmocap = aliases.get(talkmocap);
11901190
1191
- String speakermocap = //aliases.get(
1192
- speakername + "mocap"//)
1191
+ String speakermocap = aliases.get(
1192
+ speakername + "mocap")
11931193 ;
11941194
11951195 String beginmocap = speakername + "talkbegin";