Normand Briere
2019-06-09 cd87df088b1850ba0c90beb6c866c443e4eaf3b9
ObjEditor.java
....@@ -501,13 +501,13 @@
501501 //SendInfo("Name:", "bold");
502502 if (sel.GetTextures() != null || debug)
503503 {
504
- si.SendInfo(sel.toString(), "bold");
504
+ si.SendInfo(sel.toString() + (Globals.ADVANCED?"":" " + System.identityHashCode(sel)), "bold");
505505 //SendInfo("#children virtual = " + sel.size() + "; real = " + sel.Size() + newline, "regular");
506506 if (sel.Size() > 0)
507507 {
508508 si.SendInfo("#children = " + sel.Size(), "regular");
509509 }
510
- si.SendInfo((debug ? " Parent: " : " ") + sel.parent, "regular");
510
+ si.SendInfo((debug ? " Parent: " : " ") + sel.parent + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.parent)), "regular");
511511 if (debug)
512512 {
513513 try
....@@ -549,7 +549,7 @@
549549 }
550550 if (sel.support != null)
551551 {
552
- si.SendInfo(" support: " + sel.support, "regular");
552
+ si.SendInfo(" support: " + sel.support + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.support)), "regular");
553553 }
554554 if (sel.scriptnode != null)
555555 {
....@@ -752,7 +752,7 @@
752752 protected static ImageIcon createImageIcon(String path,
753753 String description)
754754 {
755
- java.net.URL imgURL = GrafreeD.class.getResource(path);
755
+ java.net.URL imgURL = Grafreed.class.getResource(path);
756756 if (imgURL != null)
757757 {
758758 return new ImageIcon(imgURL, description);
....@@ -784,6 +784,7 @@
784784 // NumberSlider vDivsField;
785785 // JCheckBox endcaps;
786786 JCheckBox liveCB;
787
+ JCheckBox selectCB;
787788 JCheckBox hideCB;
788789 JCheckBox link2masterCB;
789790 JCheckBox markCB;
....@@ -986,9 +987,11 @@
986987
987988 liveCB = AddCheckBox(setupPanel, "Live", copy.live);
988989 liveCB.setToolTipText("Animate object");
990
+ selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect);
991
+ selectCB.setToolTipText("Make object selectable");
992
+// Return();
989993 hideCB = AddCheckBox(setupPanel, "Hide", copy.hide);
990994 hideCB.setToolTipText("Hide object");
991
-// Return();
992995 markCB = AddCheckBox(setupPanel, "Mark", copy.marked);
993996 markCB.setToolTipText("Set the animation target transform");
994997
....@@ -1028,7 +1031,7 @@
10281031 oe.ctrlPanel.add(commandsPanel);
10291032 oe.ctrlPanel.Return();
10301033
1031
- pushPanel = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, 1);
1034
+ pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons
10321035 normalpushField = (cNumberSlider)pushPanel.getComponent(1);
10331036 //Return();
10341037
....@@ -1476,19 +1479,19 @@
14761479
14771480 cGridBag editBar = new cGridBag().setVertical(false);
14781481
1479
- editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints);
1482
+ editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints);
14801483 createMaterialButton.setToolTipText("Create material");
14811484
14821485 /*
14831486 ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints);
14841487 */
14851488
1486
- editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints);
1489
+ editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints);
14871490 clearMaterialButton.setToolTipText("Clear material");
14881491
14891492 if (Globals.ADVANCED)
14901493 {
1491
- editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints);
1494
+ editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints);
14921495 editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints);
14931496 editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints);
14941497 }
....@@ -1939,7 +1942,7 @@
19391942
19401943 //? flashIt = false;
19411944 CameraPane pane = (CameraPane) cameraView;
1942
- pane.clickStart(location.x, location.y, 0);
1945
+ pane.clickStart(location.x, location.y, 0, 0);
19431946 pane.clickEnd(location.x, location.y, 0, true);
19441947
19451948 if (group.selection.size() == 1)
....@@ -2396,7 +2399,7 @@
23962399
23972400 void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName)
23982401 {
2399
- if (GrafreeD.standAlone)
2402
+ if (Grafreed.standAlone)
24002403 {
24012404 /**/
24022405 FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD);
....@@ -3007,6 +3010,10 @@
30073010 {
30083011 copy.live ^= true;
30093012 return;
3013
+ } else if (event.getSource() == selectCB)
3014
+ {
3015
+ copy.dontselect ^= true;
3016
+ return;
30103017 } else if (event.getSource() == hideCB)
30113018 {
30123019 copy.hide ^= true;
....@@ -3255,8 +3262,8 @@
32553262
32563263 Globals.ANIMATION ^= true;
32573264
3258
- GrafreeD.wav.cursor = 0;
3259
- GrafreeD.wav.loop = 0;
3265
+ Grafreed.wav.cursor = 0;
3266
+ Grafreed.wav.loop = 0;
32603267 }
32613268 } else
32623269 {
....@@ -3443,6 +3450,36 @@
34433450 {
34443451 //System.out.println("Propagate = " + propagate);
34453452 copy.UpdateMaterial(anchor, current, propagate);
3453
+
3454
+ if (copy.material != null)
3455
+ {
3456
+ cMaterial mat = copy.material;
3457
+
3458
+ colorField.SetToolTipValue((mat.color));
3459
+ modulationField.SetToolTipValue((mat.modulation));
3460
+ metalnessField.SetToolTipValue((mat.metalness));
3461
+ diffuseField.SetToolTipValue((mat.diffuse));
3462
+ specularField.SetToolTipValue((mat.specular));
3463
+ shininessField.SetToolTipValue((mat.shininess));
3464
+ shiftField.SetToolTipValue((mat.shift));
3465
+ ambientField.SetToolTipValue((mat.ambient));
3466
+ lightareaField.SetToolTipValue((mat.lightarea));
3467
+ diffusenessField.SetToolTipValue((mat.factor));
3468
+ velvetField.SetToolTipValue((mat.velvet));
3469
+ sheenField.SetToolTipValue((mat.sheen));
3470
+ subsurfaceField.SetToolTipValue((mat.subsurface));
3471
+ backlitField.SetToolTipValue((mat.bump));
3472
+ anisoField.SetToolTipValue((mat.aniso));
3473
+ anisoVField.SetToolTipValue((mat.anisoV));
3474
+ cameraField.SetToolTipValue((mat.cameralight));
3475
+ selfshadowField.SetToolTipValue((mat.diffuseness));
3476
+ shadowField.SetToolTipValue((mat.shadow));
3477
+ textureField.SetToolTipValue((mat.texture));
3478
+ opacityField.SetToolTipValue((mat.opacity));
3479
+ fakedepthField.SetToolTipValue((mat.fakedepth));
3480
+ shadowbiasField.SetToolTipValue((mat.shadowbias));
3481
+ }
3482
+
34463483 if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null)
34473484 {
34483485 copy.projectedVertices[0].x = (int) (bumpField.getFloat() * 1000);
....@@ -3558,7 +3595,7 @@
35583595 }
35593596
35603597 if (normalpushField != null)
3561
- copy.NORMALPUSH = (float)normalpushField.getFloat()/1000;
3598
+ copy.NORMALPUSH = (float)normalpushField.getFloat()/100;
35623599 }
35633600
35643601 void SnapObject()
....@@ -4170,7 +4207,7 @@
41704207
41714208 void load() // throws ClassNotFoundException
41724209 {
4173
- if (GrafreeD.standAlone)
4210
+ if (Grafreed.standAlone)
41744211 {
41754212 FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD);
41764213 browser.show();
....@@ -4275,7 +4312,7 @@
42754312
42764313 void saveAs()
42774314 {
4278
- if (GrafreeD.standAlone)
4315
+ if (Grafreed.standAlone)
42794316 {
42804317 FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE);
42814318 browser.setVisible(true);
....@@ -4386,7 +4423,7 @@
43864423 Object3D objectparent = obj.parent;
43874424 obj.parent = null;
43884425
4389
- Object3D object = (Object3D) GrafreeD.clone(obj);
4426
+ Object3D object = (Object3D) Grafreed.clone(obj);
43904427
43914428 obj.parent = objectparent;
43924429
....@@ -4420,7 +4457,7 @@
44204457 buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n");
44214458 cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height);
44224459 copy.generatePOV(buffer);
4423
- if (GrafreeD.standAlone)
4460
+ if (Grafreed.standAlone)
44244461 {
44254462 FileDialog browser = new FileDialog(frame, "Export POV", 1);
44264463 browser.show();