Normand Briere
2019-04-29 c0c300a9dbd4c0fc127e003e9481d3f9246bbe7a
ObjEditor.java
....@@ -19,6 +19,8 @@
1919 import //weka.core.
2020 matrix.Matrix;
2121
22
+import grafeme.ui.*;
23
+
2224 class ObjEditor /*extends JFrame*/ implements iCallBack, ObjectUI,
2325 ActionListener, ChangeListener,
2426 InputMethodListener,
....@@ -28,7 +30,12 @@
2830 iSendInfo
2931 //KeyListener
3032 {
33
+ boolean timeline;
34
+ boolean wasFullScreen;
3135
36
+ GroupEditor callee;
37
+ JFrame frame;
38
+
3239 // SCRIPT
3340
3441 transient JFrame textpanel = null;
....@@ -119,14 +126,13 @@
119126 void keyPressed(int key, int modifiers)
120127 {
121128 System.out.println("KEY PRESSED");
122
- CameraPane.theRenderer.keyPressed(key, modifiers);
129
+ Globals.theRenderer.keyPressed(key, modifiers);
123130 }
124131 */
125132
126133 static GridBagConstraints aConstraints;
127134 static GridBagConstraints aWindowConstraints;
128
- GroupEditor callee;
129
- JFrame frame;
135
+
130136 static int GRIDWIDTH = 100; // 4;
131137
132138 public void closeUI()
....@@ -158,12 +164,16 @@
158164 objEditor.ctrlPanel.remove(slowerButton);
159165 objEditor.ctrlPanel.remove(fasterButton);
160166 objEditor.ctrlPanel.remove(remarkButton);
167
+
168
+ Remove(normalpushField);
161169 }
162170
163171 public ObjEditor GetEditor()
164172 {
165173 return objEditor; //.GetEditor();
166174 }
175
+
176
+ // Sometimes myself, sometimes my callee's.
167177 ObjEditor objEditor;
168178
169179 /*
....@@ -238,7 +248,7 @@
238248 //if (!isDisplayable())
239249 //setUndecorated(true);
240250
241
- System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow());
251
+ //System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow());
242252 client = inClient;
243253 copy = localCopy;
244254 copy.editWindow = this;
....@@ -292,16 +302,18 @@
292302 //normalLensItem.addActionListener(this);
293303 cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera"));
294304 revertCameraItem.addActionListener(this);
295
- cameraMenu.add(toggleFullItem = new CheckboxMenuItem("Full Screen"));
296
- toggleFullItem.addItemListener(this);
297
- toggleFullItem.setState(CameraPane.FULLSCREEN);
305
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
306
+ toggleTimelineItem.addItemListener(this);
307
+ cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
308
+ toggleFullScreenItem.addItemListener(this);
309
+ toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
298310 cameraMenu.add("-");
299311 cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
300312 toggleTextureItem.addItemListener(this);
301313 toggleTextureItem.setState(CameraPane.textureon);
302314 cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
303315 toggleLiveItem.addItemListener(this);
304
- toggleLiveItem.setState(CameraPane.isLIVE());
316
+ toggleLiveItem.setState(Globals.isLIVE());
305317 cameraMenu.add(stepItem = new MenuItem("Step"));
306318 stepItem.addActionListener(this);
307319 // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
....@@ -522,18 +534,18 @@
522534 maxima.y = sel.toParent[3][1];
523535 maxima.z = sel.toParent[3][2];
524536 si.SendInfo(" Orig: " + maxima, "regular");
525
- maxima.x = sel.globalTransform[3][0];
526
- maxima.y = sel.globalTransform[3][1];
527
- maxima.z = sel.globalTransform[3][2];
528
- if (full)
529
- si.SendInfo(" Global Orig: " + maxima, "regular");
530537 maxima.x = sel.toParent[0][0];
531538 maxima.y = sel.toParent[1][1];
532539 maxima.z = sel.toParent[2][2];
533540 si.SendInfo(" Scale: " + maxima, "regular");
534
- maxima.x = sel.globalTransform[0][0];
535
- maxima.y = sel.globalTransform[1][1];
536
- maxima.z = sel.globalTransform[2][2];
541
+ maxima.x = sel.globalTransform[3][0];
542
+ maxima.y = sel.globalTransform[3][1];
543
+ maxima.z = sel.globalTransform[3][2];
544
+ if (full)
545
+ si.SendInfo(" Global Orig: " + maxima, "regular");
546
+ maxima.x = sel.globalTransform[0][0];
547
+ maxima.y = sel.globalTransform[1][1];
548
+ maxima.z = sel.globalTransform[2][2];
537549 if (full)
538550 si.SendInfo(" Global Scale: " + maxima, "regular");
539551 }
....@@ -593,6 +605,22 @@
593605 System.err.println("Couldn't insert initial text into text pane.");
594606 }
595607 }
608
+
609
+ void ToggleFullScreen()
610
+ {
611
+ if (CameraPane.FULLSCREEN)
612
+ {
613
+ frame.getContentPane().remove(/*"Center",*/bigThree);
614
+ framePanel.add(bigThree);
615
+ frame.getContentPane().add(/*"Center",*/framePanel);
616
+ } else
617
+ {
618
+ frame.getContentPane().remove(/*"Center",*/framePanel);
619
+ framePanel.remove(bigThree);
620
+ frame.getContentPane().add(/*"Center",*/bigThree);
621
+ }
622
+ cameraView.ToggleFullScreen();
623
+ }
596624
597625 private JTextArea createTextPane()
598626 {
....@@ -794,7 +822,7 @@
794822
795823 aConstraints.fill = GridBagConstraints.VERTICAL;
796824 jlabel.setHorizontalAlignment(SwingConstants.TRAILING);
797
- aConstraints.gridwidth = 2;
825
+ aConstraints.gridwidth = 1;
798826 ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
799827 aConstraints.gridx += 1;
800828 aConstraints.fill = GridBagConstraints.HORIZONTAL;
....@@ -963,6 +991,9 @@
963991
964992 Return();
965993
994
+ normalpushField = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, -1);
995
+ Return();
996
+
966997 // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
967998 // ObjEditor.aConstraints.gridx += 1;
968999
....@@ -1158,10 +1189,22 @@
11581189 //JPanel worldPanel =
11591190 // new gov.nasa.worldwind.examples.ApplicationTemplate.AppPanel(null, true);
11601191 //worldPanel.setName("World");
1161
- /*JPanel*/ cameraPanel =
1162
- new JPanel(new BorderLayout());
1163
- cameraPanel.add(cameraView);
1192
+ centralPanel = new cGridBag();
1193
+ centralPanel.preferredWidth = 20;
1194
+ timelinePanel = new JPanel(new BorderLayout());
1195
+ timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel);
11641196
1197
+ cameraPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, cameraView, timelinePanel);
1198
+ cameraPanel.setContinuousLayout(true);
1199
+ cameraPanel.setOneTouchExpandable(true);
1200
+// cameraPanel.setDividerLocation(0.9);
1201
+// cameraPanel.setDividerSize(9);
1202
+ cameraPanel.setResizeWeight(1.0);
1203
+
1204
+ centralPanel.add(cameraView);
1205
+ //frame.setJMenuBar(timelineMenubar);
1206
+ //centralPanel.add(timelinePanel);
1207
+
11651208 //topView.camera = ;
11661209 //frontView.camera = new Camera(2);
11671210 //sideView.camera = new Camera(3);
....@@ -1177,12 +1220,13 @@
11771220 //frontView.object = copy;
11781221 //sideView.object = copy;
11791222
1180
- XYZPanel = new JPanel();
1181
- XYZPanel.setLayout(new GridLayout(3, 1, 5, 5));
1223
+ XYZPanel = new cGridBag().setVertical(true);
1224
+ //XYZPanel.setLayout(new GridLayout(3, 1, 5, 5));
11821225
1183
- XYZPanel.add(/*BorderLayout.SOUTH,*/sideView); // Scroll);
1184
- XYZPanel.add(/*BorderLayout.CENTER,*/frontView); // Scroll);
1185
- XYZPanel.add(/*BorderLayout.NORTH,*/topView); // Scroll);
1226
+ XYZPanel.preferredWidth = 5;
1227
+ XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll);
1228
+ XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll);
1229
+ XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll);
11861230
11871231 /*
11881232 gridPanel = new JPanel(); //new BorderLayout());
....@@ -1191,7 +1235,7 @@
11911235 gridPanel.add(cameraView);
11921236 gridPanel.add(XYZPanel);
11931237 */
1194
- gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, cameraPanel, XYZPanel); //new BorderLayout());
1238
+ gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, centralPanel, XYZPanel); //new BorderLayout());
11951239 gridPanel.setContinuousLayout(true);
11961240 gridPanel.setOneTouchExpandable(true);
11971241 gridPanel.setDividerLocation(1.0);
....@@ -1244,16 +1288,23 @@
12441288 scrollpane.setWheelScrollingEnabled(true);
12451289 scrollpane.addMouseWheelListener(this); // Default not fast enough
12461290
1247
- /*JTabbedPane*/ jtp = new JTabbedPane();
1248
- jtp.add(scrollpane);
1291
+ /*JTabbedPane*/ scenePanel = new cGridBag();
1292
+ scenePanel.preferredWidth = 7;
1293
+
1294
+ JTabbedPane tabbedPane = new JTabbedPane();
1295
+ tabbedPane.add(scrollpane);
12491296
1250
- jtp.add(FSPane = new cFileSystemPane(this));
1297
+ tabbedPane.add(FSPane = new cFileSystemPane(this));
12511298
12521299 optionsPanel = new JPanel(new GridBagLayout());
12531300
12541301 optionsPanel.setName("Options");
1255
- jtp.add(optionsPanel);
1256
-
1302
+
1303
+ AddOptions(optionsPanel, aConstraints);
1304
+
1305
+ tabbedPane.add(optionsPanel);
1306
+
1307
+ scenePanel.add(tabbedPane);
12571308
12581309 /*
12591310 cTree jTree = new cTree(null);
....@@ -1275,7 +1326,7 @@
12751326 jtp.add(tree);
12761327 */
12771328
1278
- bigPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, jtp, gridPanel);
1329
+ bigPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, scenePanel, gridPanel);
12791330 bigPanel.setContinuousLayout(true);
12801331 bigPanel.setOneTouchExpandable(true);
12811332 bigPanel.setDividerLocation(0.8);
....@@ -1287,6 +1338,7 @@
12871338 //bigPanel.setSize(new Dimension(10,10));
12881339 //bigPanel.add(ctrlPanel);
12891340 //bigPanel.add(gridPanel);
1341
+ /**
12901342 bigThree = new JPanel();
12911343 //big.setLayout(new FlowLayout(FlowLayout.LEFT));
12921344 bigThree.setLayout(new GridBagLayout()); //1,3,5,5));
....@@ -1297,20 +1349,26 @@
12971349 aWindowConstraints.fill = GridBagConstraints.VERTICAL;
12981350 aWindowConstraints.weightx = 0;
12991351 aWindowConstraints.weighty = 1;
1300
- bigThree.add(jtp, aWindowConstraints);
1352
+ bigThree.add(scenePanel, aWindowConstraints);
13011353 aWindowConstraints.weightx = 1;
13021354 aWindowConstraints.gridwidth = 3;
13031355 // aConstraints.gridheight = 3;
13041356 aWindowConstraints.gridx = 1;
13051357 aWindowConstraints.fill = GridBagConstraints.BOTH;
1306
- bigThree.add(cameraPanel, aWindowConstraints);
1358
+ bigThree.add(centralPanel, aWindowConstraints);
13071359 aWindowConstraints.weightx = 0;
13081360 aWindowConstraints.gridx = 4;
13091361 aWindowConstraints.gridwidth = 1;
13101362 // aConstraints.gridheight = 3;
13111363 aWindowConstraints.fill = GridBagConstraints.VERTICAL;
13121364 bigThree.add(XYZPanel, aWindowConstraints);
1365
+ /**/
13131366
1367
+ bigThree = new cGridBag();
1368
+ bigThree.addComponent(scenePanel);
1369
+ bigThree.addComponent(centralPanel);
1370
+ bigThree.addComponent(XYZPanel);
1371
+
13141372 // // SIDE EFFECT!!!
13151373 // aConstraints.gridx = 0;
13161374 // aConstraints.gridy = 0;
....@@ -1331,7 +1389,8 @@
13311389 //worldPane.add(bigPanel);
13321390 //worldPane.add(worldPanel);
13331391 /**/
1334
- frame.getContentPane().add(/*"Center",*/framePanel);
1392
+ //frame.getContentPane().add(/*"Center",*/framePanel);
1393
+ frame.add(/*"Center",*/framePanel);
13351394 //frame.getContentPane().add(/*"Center",*/ worldPane);
13361395
13371396 // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc);
....@@ -1352,6 +1411,10 @@
13521411 });
13531412 }
13541413
1414
+ void AddOptions(JPanel panel, GridBagConstraints constraints)
1415
+ {
1416
+ }
1417
+
13551418 JTree GetTree()
13561419 {
13571420 return objEditor.jTree;
....@@ -1422,7 +1485,7 @@
14221485 aConstraints.gridx += 1;
14231486 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
14241487 //aConstraints.weightx = 0;
1425
- ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1488
+ ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.5), aConstraints);
14261489 aConstraints.gridx = 0;
14271490 aConstraints.gridy += 1;
14281491 aConstraints.gridwidth = 1;
....@@ -1432,7 +1495,7 @@
14321495 aConstraints.fill = GridBagConstraints.HORIZONTAL;
14331496 aConstraints.gridx += 1;
14341497 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1435
- ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1498
+ ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.5), aConstraints);
14361499 aConstraints.gridx = 0;
14371500 aConstraints.gridy += 1;
14381501 aConstraints.gridwidth = 1;
....@@ -1442,7 +1505,7 @@
14421505 aConstraints.fill = GridBagConstraints.HORIZONTAL;
14431506 aConstraints.gridx += 1;
14441507 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1445
- ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1508
+ ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.5), aConstraints);
14461509 aConstraints.gridx = 0;
14471510 aConstraints.gridy += 1;
14481511 aConstraints.gridwidth = 1;
....@@ -1452,7 +1515,7 @@
14521515 aConstraints.fill = GridBagConstraints.HORIZONTAL;
14531516 aConstraints.gridx += 1;
14541517 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1455
- ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1518
+ ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.5), aConstraints);
14561519 aConstraints.gridx = 0;
14571520 aConstraints.gridy += 1;
14581521 aConstraints.gridwidth = 1;
....@@ -1462,7 +1525,7 @@
14621525 aConstraints.fill = GridBagConstraints.HORIZONTAL;
14631526 aConstraints.gridx += 1;
14641527 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1465
- ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1528
+ ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.5), aConstraints);
14661529 aConstraints.gridx = 0;
14671530 aConstraints.gridy += 1;
14681531 aConstraints.gridwidth = 1;
....@@ -1531,7 +1594,7 @@
15311594 aConstraints.fill = GridBagConstraints.HORIZONTAL;
15321595 aConstraints.gridx += 1;
15331596 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1534
- ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1597
+ ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.5), aConstraints);
15351598 aConstraints.gridx = 0;
15361599 aConstraints.gridy += 1;
15371600 aConstraints.gridwidth = 1;
....@@ -1600,7 +1663,7 @@
16001663 aConstraints.fill = GridBagConstraints.HORIZONTAL;
16011664 aConstraints.gridx += 1;
16021665 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1603
- ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1666
+ ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.5), aConstraints);
16041667 aConstraints.gridx = 0;
16051668 aConstraints.gridy += 1;
16061669 aConstraints.gridwidth = 1;
....@@ -1671,7 +1734,7 @@
16711734 aConstraints.fill = GridBagConstraints.HORIZONTAL;
16721735 aConstraints.gridx += 1;
16731736 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1674
- ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1737
+ ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.5), aConstraints);
16751738 aConstraints.gridx = 0;
16761739 aConstraints.gridy += 1;
16771740 aConstraints.gridwidth = 1;
....@@ -2194,6 +2257,8 @@
21942257 {
21952258 Mocap sel = (Mocap) copy.selection.get(0);
21962259
2260
+ sel.SetCurrentBones(sel.frame);
2261
+
21972262 sel.fullname = fullname;
21982263
21992264 if (changename)
....@@ -2207,14 +2272,18 @@
22072272 sel.smoothed = false;
22082273
22092274 // if (!changename)
2210
- sel.SetPositionDelta(false, true, true, true/*?*/); // false
2275
+ //sel.SetPositionDelta(false, true, true, true/*?*/); // false
2276
+ sel.SetGlobalTransform();
2277
+ sel.LoadData();
2278
+ sel.Rewind();
2279
+ sel.Fade();
22112280 // sel.setPose(0);
22122281 refreshContents();
22132282 } else
22142283 {
22152284 mocap.Reset();
22162285 // new skeleton
2217
- makeSomething(mocap, false); // true);
2286
+ makeSomething(mocap, true); // true);
22182287 }
22192288 } catch (Exception e)
22202289 {
....@@ -2241,6 +2310,8 @@
22412310 {
22422311 Mocap sel = (Mocap) select;
22432312
2313
+ sel.SetCurrentBones(sel.frame);
2314
+
22442315 File file = new File(fullname);
22452316
22462317 // Mocap mocap = new Mocap("Mocap" + file.getName());
....@@ -2307,7 +2378,11 @@
23072378
23082379 if (!changename)
23092380 {
2310
- sel.SetPositionDelta(false, true, true, true/*?*/);
2381
+ //sel.SetPositionDelta(false, true, true, true/*?*/);
2382
+ sel.SetGlobalTransform();
2383
+ sel.LoadData();
2384
+ sel.Rewind();
2385
+ sel.Fade();
23112386 }
23122387
23132388 // sel.setPose(0);
....@@ -2946,20 +3021,37 @@
29463021 // june 2013 copy.HardTouch();
29473022 cameraView.repaint();
29483023 return;
2949
- } else if (event.getSource() == toggleFullItem)
3024
+ } else if (event.getSource() == toggleTimelineItem)
29503025 {
2951
- if (CameraPane.FULLSCREEN)
3026
+ timeline ^= true;
3027
+
3028
+ if (timeline)
29523029 {
2953
- frame.getContentPane().remove(/*"Center",*/bigThree);
2954
- framePanel.add(bigThree);
2955
- frame.getContentPane().add(/*"Center",*/framePanel);
2956
- } else
2957
- {
2958
- frame.getContentPane().remove(/*"Center",*/framePanel);
2959
- frame.getContentPane().add(/*"Center",*/bigThree);
3030
+ centralPanel.remove(cameraView);
3031
+ cameraPanel.add(cameraView);
3032
+ centralPanel.add(cameraPanel);
3033
+ frame.setJMenuBar(timelineMenubar);
3034
+ wasFullScreen = CameraPane.FULLSCREEN;
3035
+ if (!CameraPane.FULLSCREEN)
3036
+ ToggleFullScreen();
3037
+ toggleFullScreenItem.setEnabled(false);
29603038 }
3039
+ else
3040
+ {
3041
+ centralPanel.remove(cameraPanel);
3042
+ centralPanel.add(cameraView);
3043
+ frame.setJMenuBar(null);
3044
+ if (!wasFullScreen)
3045
+ ToggleFullScreen();
3046
+ toggleFullScreenItem.setEnabled(true);
3047
+ }
3048
+
29613049 frame.validate();
2962
- cameraView.ToggleFullScreen();
3050
+ return;
3051
+ } else if (event.getSource() == toggleFullScreenItem)
3052
+ {
3053
+ ToggleFullScreen();
3054
+ frame.validate();
29633055
29643056 return;
29653057 } else if (event.getSource() == toggleRandomItem)
....@@ -3069,7 +3161,8 @@
30693161 objEditor.refreshContents();
30703162 } else if (event.getSource() == stepItem)
30713163 {
3072
- cameraView.ONESTEP = true;
3164
+ //cameraView.ONESTEP = true;
3165
+ Globals.ONESTEP = true;
30733166 cameraView.repaint();
30743167 return;
30753168 } else if (event.getSource() == stepButton)
....@@ -3208,9 +3301,9 @@
32083301 cameraView.RevertCamera();
32093302 cameraView.repaint();
32103303 return;
3211
- } else if (event.getSource() == textureButton)
3212
- {
3213
- return; // true;
3304
+// } else if (event.getSource() == textureButton)
3305
+// {
3306
+// return; // true;
32143307 } else // combos...
32153308 if (event.getSource() == texresMenu)
32163309 {
....@@ -3226,25 +3319,25 @@
32263319
32273320 void ToggleAnimation()
32283321 {
3229
- if (!CameraPane.ANIMATION)
3322
+ if (!Globals.ANIMATION)
32303323 {
32313324 FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE);
32323325 browser.show();
32333326 String filename = browser.getFile();
32343327 if (filename != null && filename.length() > 0)
32353328 {
3236
- CameraPane.filename = browser.getDirectory() + filename;
3329
+ Globals.filename = browser.getDirectory() + filename;
32373330 //CameraPane.framecount = 0;
3238
- CameraPane.imagecount = 0;
3331
+ Globals.imagecount = 0;
32393332
3240
- CameraPane.ANIMATION ^= true;
3333
+ Globals.ANIMATION ^= true;
32413334
32423335 GrafreeD.wav.cursor = 0;
32433336 GrafreeD.wav.loop = 0;
32443337 }
32453338 } else
32463339 {
3247
- CameraPane.ANIMATION ^= true;
3340
+ Globals.ANIMATION ^= true;
32483341 }
32493342 }
32503343
....@@ -3497,7 +3590,13 @@
34973590 //System.out.println("PARENT = " + parent);
34983591 //if (parent != null)
34993592 // parent.applySelf();
3500
- refreshContents();
3593
+ if (e.getSource() == normalpushField)
3594
+ {
3595
+ objEditor.refreshContents();
3596
+ //Refresh();
3597
+ }
3598
+ else
3599
+ refreshContents();
35013600 // ??? client.refreshEditWindow();
35023601 }
35033602 //else
....@@ -3509,7 +3608,7 @@
35093608 //group.name = nameField.getText();
35103609 //objEditor.applySelf();
35113610
3512
- assert (objEditor == this);
3611
+ // OCT2018: assert (objEditor == this);
35133612 if (copy.selection == null || copy.selection.size() == 0)
35143613 //super.applySelf()
35153614 ; else
....@@ -3533,12 +3632,18 @@
35333632 objEditor.copy = keep;
35343633 }
35353634 }
3635
+
3636
+ if (normalpushField != null)
3637
+ copy.NORMALPUSH = (float)normalpushField.getFloat()/1000;
35363638 }
35373639
35383640 void SnapObject()
35393641 {
3540
- Object3D obj = (Object3D)copy.selection.elementAt(0);
3541
- SnapObject(obj);
3642
+ if (copy.selection.size() > 0)
3643
+ {
3644
+ Object3D obj = (Object3D)copy.selection.elementAt(0);
3645
+ SnapObject(obj);
3646
+ }
35423647 }
35433648
35443649 void SnapObject(Object3D obj)
....@@ -3652,7 +3757,7 @@
36523757
36533758 if (obj.parent != null)
36543759 {
3655
- obj.parent.TransformToWorld(interest);
3760
+// obj.parent.TransformToWorld(interest);
36563761 }
36573762
36583763 if (!CameraPane.TRACK)
....@@ -4432,7 +4537,8 @@
44324537 MenuItem revertCameraItem;
44334538 CheckboxMenuItem toggleLiveItem;
44344539 MenuItem stepItem;
4435
- CheckboxMenuItem toggleFullItem;
4540
+ CheckboxMenuItem toggleFullScreenItem;
4541
+ CheckboxMenuItem toggleTimelineItem;
44364542 CheckboxMenuItem toggleRenderItem;
44374543 CheckboxMenuItem toggleDebugItem;
44384544 CheckboxMenuItem toggleFrustumItem;
....@@ -4455,15 +4561,18 @@
44554561 JScrollPane infoPanel;
44564562 JPanel optionsPanel;
44574563 JTabbedPane objectPanel;
4458
- JPanel XYZPanel;
4564
+ cGridBag XYZPanel;
44594565 JSplitPane gridPanel;
44604566 JSplitPane bigPanel;
4461
- JPanel bigThree;
4462
- JTabbedPane jtp;
4463
- JPanel cameraPanel;
4567
+ cGridBag bigThree;
4568
+ cGridBag scenePanel;
4569
+ cGridBag centralPanel;
4570
+ JSplitPane cameraPanel;
4571
+ JPanel timelinePanel;
4572
+ JMenuBar timelineMenubar;
44644573 JSplitPane framePanel;
44654574 JTextArea/*Field*/ nameField;
4466
- cButton textureButton;
4575
+ //cButton textureButton;
44674576 cButton okButton;
44684577 cButton applyButton;
44694578 cButton cancelButton;
....@@ -4571,4 +4680,6 @@
45714680 NumberSlider opacityPowerField;
45724681 JTree jTree;
45734682 //ObjectUI parent;
4683
+
4684
+ NumberSlider normalpushField;
45744685 }