Normand Briere
2018-12-15 6ed65dcb597fb2153cef75bf1845978f1115658c
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
....@@ -1446,7 +1453,7 @@
14461453 aConstraints.gridx += 1;
14471454 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
14481455 //aConstraints.weightx = 0;
1449
- ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1456
+ ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.5), aConstraints);
14501457 aConstraints.gridx = 0;
14511458 aConstraints.gridy += 1;
14521459 aConstraints.gridwidth = 1;
....@@ -1456,7 +1463,7 @@
14561463 aConstraints.fill = GridBagConstraints.HORIZONTAL;
14571464 aConstraints.gridx += 1;
14581465 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1459
- ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1466
+ ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.5), aConstraints);
14601467 aConstraints.gridx = 0;
14611468 aConstraints.gridy += 1;
14621469 aConstraints.gridwidth = 1;
....@@ -1466,7 +1473,7 @@
14661473 aConstraints.fill = GridBagConstraints.HORIZONTAL;
14671474 aConstraints.gridx += 1;
14681475 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1469
- ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1476
+ ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.5), aConstraints);
14701477 aConstraints.gridx = 0;
14711478 aConstraints.gridy += 1;
14721479 aConstraints.gridwidth = 1;
....@@ -1476,7 +1483,7 @@
14761483 aConstraints.fill = GridBagConstraints.HORIZONTAL;
14771484 aConstraints.gridx += 1;
14781485 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1479
- ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1486
+ ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.5), aConstraints);
14801487 aConstraints.gridx = 0;
14811488 aConstraints.gridy += 1;
14821489 aConstraints.gridwidth = 1;
....@@ -1486,7 +1493,7 @@
14861493 aConstraints.fill = GridBagConstraints.HORIZONTAL;
14871494 aConstraints.gridx += 1;
14881495 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1489
- ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1496
+ ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.5), aConstraints);
14901497 aConstraints.gridx = 0;
14911498 aConstraints.gridy += 1;
14921499 aConstraints.gridwidth = 1;
....@@ -1555,7 +1562,7 @@
15551562 aConstraints.fill = GridBagConstraints.HORIZONTAL;
15561563 aConstraints.gridx += 1;
15571564 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1558
- ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1565
+ ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.5), aConstraints);
15591566 aConstraints.gridx = 0;
15601567 aConstraints.gridy += 1;
15611568 aConstraints.gridwidth = 1;
....@@ -1624,7 +1631,7 @@
16241631 aConstraints.fill = GridBagConstraints.HORIZONTAL;
16251632 aConstraints.gridx += 1;
16261633 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1627
- ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1634
+ ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.5), aConstraints);
16281635 aConstraints.gridx = 0;
16291636 aConstraints.gridy += 1;
16301637 aConstraints.gridwidth = 1;
....@@ -1695,7 +1702,7 @@
16951702 aConstraints.fill = GridBagConstraints.HORIZONTAL;
16961703 aConstraints.gridx += 1;
16971704 aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1698
- ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1705
+ ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.5), aConstraints);
16991706 aConstraints.gridx = 0;
17001707 aConstraints.gridy += 1;
17011708 aConstraints.gridwidth = 1;
....@@ -3549,7 +3556,13 @@
35493556 //System.out.println("PARENT = " + parent);
35503557 //if (parent != null)
35513558 // parent.applySelf();
3552
- refreshContents();
3559
+ if (e.getSource() == normalpushField)
3560
+ {
3561
+ objEditor.refreshContents();
3562
+ //Refresh();
3563
+ }
3564
+ else
3565
+ refreshContents();
35533566 // ??? client.refreshEditWindow();
35543567 }
35553568 //else
....@@ -3561,7 +3574,7 @@
35613574 //group.name = nameField.getText();
35623575 //objEditor.applySelf();
35633576
3564
- assert (objEditor == this);
3577
+ // OCT2018: assert (objEditor == this);
35653578 if (copy.selection == null || copy.selection.size() == 0)
35663579 //super.applySelf()
35673580 ; else
....@@ -3585,6 +3598,9 @@
35853598 objEditor.copy = keep;
35863599 }
35873600 }
3601
+
3602
+ if (normalpushField != null)
3603
+ copy.NORMALPUSH = (float)normalpushField.getFloat()/1000;
35883604 }
35893605
35903606 void SnapObject()
....@@ -4629,4 +4645,6 @@
46294645 NumberSlider opacityPowerField;
46304646 JTree jTree;
46314647 //ObjectUI parent;
4648
+
4649
+ NumberSlider normalpushField;
46324650 }