Normand Briere
2018-12-21 dcda2c5fa15e63daad67f5720a2f726e34f8cd71
ObjEditor.java
....@@ -160,12 +160,16 @@
160160 objEditor.ctrlPanel.remove(slowerButton);
161161 objEditor.ctrlPanel.remove(fasterButton);
162162 objEditor.ctrlPanel.remove(remarkButton);
163
+
164
+ Remove(normalpushField);
163165 }
164166
165167 public ObjEditor GetEditor()
166168 {
167169 return objEditor; //.GetEditor();
168170 }
171
+
172
+ // Sometimes myself, sometimes my callee's.
169173 ObjEditor objEditor;
170174
171175 /*
....@@ -814,7 +818,7 @@
814818
815819 aConstraints.fill = GridBagConstraints.VERTICAL;
816820 jlabel.setHorizontalAlignment(SwingConstants.TRAILING);
817
- aConstraints.gridwidth = 2;
821
+ aConstraints.gridwidth = 1;
818822 ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
819823 aConstraints.gridx += 1;
820824 aConstraints.fill = GridBagConstraints.HORIZONTAL;
....@@ -983,6 +987,9 @@
983987
984988 Return();
985989
990
+ normalpushField = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, -1);
991
+ Return();
992
+
986993 // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
987994 // ObjEditor.aConstraints.gridx += 1;
988995
....@@ -1182,6 +1189,13 @@
11821189 timelinePanel = new JPanel(new BorderLayout());
11831190 timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel);
11841191
1192
+ cameraPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, cameraView, timelinePanel);
1193
+ cameraPanel.setContinuousLayout(true);
1194
+ cameraPanel.setOneTouchExpandable(true);
1195
+// cameraPanel.setDividerLocation(0.9);
1196
+// cameraPanel.setDividerSize(9);
1197
+ cameraPanel.setResizeWeight(1.0);
1198
+
11851199 centralPanel.add(cameraView);
11861200 //frame.setJMenuBar(timelineMenubar);
11871201 //centralPanel.add(timelinePanel);
....@@ -1446,7 +1460,7 @@
14461460 aConstraints.gridx += 1;
14471461 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
14481462 //aConstraints.weightx = 0;
1449
- ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1463
+ ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.5), aConstraints);
14501464 aConstraints.gridx = 0;
14511465 aConstraints.gridy += 1;
14521466 aConstraints.gridwidth = 1;
....@@ -1456,7 +1470,7 @@
14561470 aConstraints.fill = GridBagConstraints.HORIZONTAL;
14571471 aConstraints.gridx += 1;
14581472 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1459
- ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1473
+ ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.5), aConstraints);
14601474 aConstraints.gridx = 0;
14611475 aConstraints.gridy += 1;
14621476 aConstraints.gridwidth = 1;
....@@ -1466,7 +1480,7 @@
14661480 aConstraints.fill = GridBagConstraints.HORIZONTAL;
14671481 aConstraints.gridx += 1;
14681482 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1469
- ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1483
+ ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.5), aConstraints);
14701484 aConstraints.gridx = 0;
14711485 aConstraints.gridy += 1;
14721486 aConstraints.gridwidth = 1;
....@@ -1476,7 +1490,7 @@
14761490 aConstraints.fill = GridBagConstraints.HORIZONTAL;
14771491 aConstraints.gridx += 1;
14781492 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1479
- ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1493
+ ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.5), aConstraints);
14801494 aConstraints.gridx = 0;
14811495 aConstraints.gridy += 1;
14821496 aConstraints.gridwidth = 1;
....@@ -1486,7 +1500,7 @@
14861500 aConstraints.fill = GridBagConstraints.HORIZONTAL;
14871501 aConstraints.gridx += 1;
14881502 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1489
- ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1503
+ ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.5), aConstraints);
14901504 aConstraints.gridx = 0;
14911505 aConstraints.gridy += 1;
14921506 aConstraints.gridwidth = 1;
....@@ -1555,7 +1569,7 @@
15551569 aConstraints.fill = GridBagConstraints.HORIZONTAL;
15561570 aConstraints.gridx += 1;
15571571 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1558
- ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1572
+ ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.5), aConstraints);
15591573 aConstraints.gridx = 0;
15601574 aConstraints.gridy += 1;
15611575 aConstraints.gridwidth = 1;
....@@ -1624,7 +1638,7 @@
16241638 aConstraints.fill = GridBagConstraints.HORIZONTAL;
16251639 aConstraints.gridx += 1;
16261640 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1627
- ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1641
+ ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.5), aConstraints);
16281642 aConstraints.gridx = 0;
16291643 aConstraints.gridy += 1;
16301644 aConstraints.gridwidth = 1;
....@@ -1695,7 +1709,7 @@
16951709 aConstraints.fill = GridBagConstraints.HORIZONTAL;
16961710 aConstraints.gridx += 1;
16971711 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1698
- ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1712
+ ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.5), aConstraints);
16991713 aConstraints.gridx = 0;
17001714 aConstraints.gridy += 1;
17011715 aConstraints.gridwidth = 1;
....@@ -2989,7 +3003,8 @@
29893003 if (timeline)
29903004 {
29913005 centralPanel.remove(cameraView);
2992
- centralPanel.add(timelinePanel);
3006
+ cameraPanel.add(cameraView);
3007
+ centralPanel.add(cameraPanel);
29933008 frame.setJMenuBar(timelineMenubar);
29943009 wasFullScreen = CameraPane.FULLSCREEN;
29953010 if (!CameraPane.FULLSCREEN)
....@@ -2998,7 +3013,7 @@
29983013 }
29993014 else
30003015 {
3001
- centralPanel.remove(timelinePanel);
3016
+ centralPanel.remove(cameraPanel);
30023017 centralPanel.add(cameraView);
30033018 frame.setJMenuBar(null);
30043019 if (!wasFullScreen)
....@@ -3549,7 +3564,13 @@
35493564 //System.out.println("PARENT = " + parent);
35503565 //if (parent != null)
35513566 // parent.applySelf();
3552
- refreshContents();
3567
+ if (e.getSource() == normalpushField)
3568
+ {
3569
+ objEditor.refreshContents();
3570
+ //Refresh();
3571
+ }
3572
+ else
3573
+ refreshContents();
35533574 // ??? client.refreshEditWindow();
35543575 }
35553576 //else
....@@ -3561,7 +3582,7 @@
35613582 //group.name = nameField.getText();
35623583 //objEditor.applySelf();
35633584
3564
- assert (objEditor == this);
3585
+ // OCT2018: assert (objEditor == this);
35653586 if (copy.selection == null || copy.selection.size() == 0)
35663587 //super.applySelf()
35673588 ; else
....@@ -3585,6 +3606,9 @@
35853606 objEditor.copy = keep;
35863607 }
35873608 }
3609
+
3610
+ if (normalpushField != null)
3611
+ copy.NORMALPUSH = (float)normalpushField.getFloat()/1000;
35883612 }
35893613
35903614 void SnapObject()
....@@ -4517,6 +4541,7 @@
45174541 JPanel bigThree;
45184542 JTabbedPane scenePanel;
45194543 JPanel centralPanel;
4544
+ JSplitPane cameraPanel;
45204545 JPanel timelinePanel;
45214546 JMenuBar timelineMenubar;
45224547 JSplitPane framePanel;
....@@ -4629,4 +4654,6 @@
46294654 NumberSlider opacityPowerField;
46304655 JTree jTree;
46314656 //ObjectUI parent;
4657
+
4658
+ NumberSlider normalpushField;
46324659 }