.. | .. |
---|
501 | 501 | //SendInfo("Name:", "bold"); |
---|
502 | 502 | if (sel.GetTextures() != null || debug) |
---|
503 | 503 | { |
---|
504 | | - si.SendInfo(sel.toString(), "bold"); |
---|
| 504 | + si.SendInfo(sel.toString() + (Globals.ADVANCED?"":" " + System.identityHashCode(sel)), "bold"); |
---|
505 | 505 | //SendInfo("#children virtual = " + sel.size() + "; real = " + sel.Size() + newline, "regular"); |
---|
506 | 506 | if (sel.Size() > 0) |
---|
507 | 507 | { |
---|
508 | 508 | si.SendInfo("#children = " + sel.Size(), "regular"); |
---|
509 | 509 | } |
---|
510 | | - si.SendInfo((debug ? " Parent: " : " ") + sel.parent, "regular"); |
---|
| 510 | + si.SendInfo((debug ? " Parent: " : " ") + sel.parent + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.parent)), "regular"); |
---|
511 | 511 | if (debug) |
---|
512 | 512 | { |
---|
513 | 513 | try |
---|
.. | .. |
---|
549 | 549 | } |
---|
550 | 550 | if (sel.support != null) |
---|
551 | 551 | { |
---|
552 | | - si.SendInfo(" support: " + sel.support, "regular"); |
---|
| 552 | + si.SendInfo(" support: " + sel.support + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.support)), "regular"); |
---|
553 | 553 | } |
---|
554 | 554 | if (sel.scriptnode != null) |
---|
555 | 555 | { |
---|
.. | .. |
---|
752 | 752 | protected static ImageIcon createImageIcon(String path, |
---|
753 | 753 | String description) |
---|
754 | 754 | { |
---|
755 | | - java.net.URL imgURL = GrafreeD.class.getResource(path); |
---|
| 755 | + java.net.URL imgURL = Grafreed.class.getResource(path); |
---|
756 | 756 | if (imgURL != null) |
---|
757 | 757 | { |
---|
758 | 758 | return new ImageIcon(imgURL, description); |
---|
.. | .. |
---|
784 | 784 | // NumberSlider vDivsField; |
---|
785 | 785 | // JCheckBox endcaps; |
---|
786 | 786 | JCheckBox liveCB; |
---|
| 787 | + JCheckBox selectCB; |
---|
787 | 788 | JCheckBox hideCB; |
---|
788 | 789 | JCheckBox link2masterCB; |
---|
789 | 790 | JCheckBox markCB; |
---|
.. | .. |
---|
986 | 987 | |
---|
987 | 988 | liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
988 | 989 | liveCB.setToolTipText("Animate object"); |
---|
| 990 | + selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
| 991 | + selectCB.setToolTipText("Make object selectable"); |
---|
| 992 | +// Return(); |
---|
989 | 993 | hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
990 | 994 | hideCB.setToolTipText("Hide object"); |
---|
991 | | -// Return(); |
---|
992 | 995 | markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
993 | 996 | markCB.setToolTipText("Set the animation target transform"); |
---|
994 | 997 | |
---|
.. | .. |
---|
1028 | 1031 | oe.ctrlPanel.add(commandsPanel); |
---|
1029 | 1032 | oe.ctrlPanel.Return(); |
---|
1030 | 1033 | |
---|
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 |
---|
1032 | 1035 | normalpushField = (cNumberSlider)pushPanel.getComponent(1); |
---|
1033 | 1036 | //Return(); |
---|
1034 | 1037 | |
---|
.. | .. |
---|
1476 | 1479 | |
---|
1477 | 1480 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
1478 | 1481 | |
---|
1479 | | - editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1482 | + editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
1480 | 1483 | createMaterialButton.setToolTipText("Create material"); |
---|
1481 | 1484 | |
---|
1482 | 1485 | /* |
---|
1483 | 1486 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
---|
1484 | 1487 | */ |
---|
1485 | 1488 | |
---|
1486 | | - editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1489 | + editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
1487 | 1490 | clearMaterialButton.setToolTipText("Clear material"); |
---|
1488 | 1491 | |
---|
1489 | 1492 | if (Globals.ADVANCED) |
---|
1490 | 1493 | { |
---|
1491 | | - editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1494 | + editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
1492 | 1495 | editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
1493 | 1496 | editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
1494 | 1497 | } |
---|
.. | .. |
---|
1939 | 1942 | |
---|
1940 | 1943 | //? flashIt = false; |
---|
1941 | 1944 | CameraPane pane = (CameraPane) cameraView; |
---|
1942 | | - pane.clickStart(location.x, location.y, 0); |
---|
| 1945 | + pane.clickStart(location.x, location.y, 0, 0); |
---|
1943 | 1946 | pane.clickEnd(location.x, location.y, 0, true); |
---|
1944 | 1947 | |
---|
1945 | 1948 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
2396 | 2399 | |
---|
2397 | 2400 | void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName) |
---|
2398 | 2401 | { |
---|
2399 | | - if (GrafreeD.standAlone) |
---|
| 2402 | + if (Grafreed.standAlone) |
---|
2400 | 2403 | { |
---|
2401 | 2404 | /**/ |
---|
2402 | 2405 | FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD); |
---|
2403 | | - browser.show(); |
---|
| 2406 | + browser.setVisible(true); |
---|
2404 | 2407 | String filename = browser.getFile(); |
---|
2405 | 2408 | if (filename != null && filename.length() > 0) |
---|
2406 | 2409 | { |
---|
.. | .. |
---|
3007 | 3010 | { |
---|
3008 | 3011 | copy.live ^= true; |
---|
3009 | 3012 | return; |
---|
| 3013 | + } else if (event.getSource() == selectCB) |
---|
| 3014 | + { |
---|
| 3015 | + copy.dontselect ^= true; |
---|
| 3016 | + return; |
---|
3010 | 3017 | } else if (event.getSource() == hideCB) |
---|
3011 | 3018 | { |
---|
3012 | 3019 | copy.hide ^= true; |
---|
.. | .. |
---|
3255 | 3262 | |
---|
3256 | 3263 | Globals.ANIMATION ^= true; |
---|
3257 | 3264 | |
---|
3258 | | - GrafreeD.wav.cursor = 0; |
---|
3259 | | - GrafreeD.wav.loop = 0; |
---|
| 3265 | + Grafreed.wav.cursor = 0; |
---|
| 3266 | + Grafreed.wav.loop = 0; |
---|
3260 | 3267 | } |
---|
3261 | 3268 | } else |
---|
3262 | 3269 | { |
---|
.. | .. |
---|
3443 | 3450 | { |
---|
3444 | 3451 | //System.out.println("Propagate = " + propagate); |
---|
3445 | 3452 | 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 | + |
---|
3446 | 3483 | if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null) |
---|
3447 | 3484 | { |
---|
3448 | 3485 | copy.projectedVertices[0].x = (int) (bumpField.getFloat() * 1000); |
---|
.. | .. |
---|
3558 | 3595 | } |
---|
3559 | 3596 | |
---|
3560 | 3597 | if (normalpushField != null) |
---|
3561 | | - copy.NORMALPUSH = (float)normalpushField.getFloat()/1000; |
---|
| 3598 | + copy.NORMALPUSH = (float)normalpushField.getFloat()/100; |
---|
3562 | 3599 | } |
---|
3563 | 3600 | |
---|
3564 | 3601 | void SnapObject() |
---|
.. | .. |
---|
4170 | 4207 | |
---|
4171 | 4208 | void load() // throws ClassNotFoundException |
---|
4172 | 4209 | { |
---|
4173 | | - if (GrafreeD.standAlone) |
---|
| 4210 | + if (Grafreed.standAlone) |
---|
4174 | 4211 | { |
---|
4175 | 4212 | FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); |
---|
4176 | 4213 | browser.show(); |
---|
.. | .. |
---|
4275 | 4312 | |
---|
4276 | 4313 | void saveAs() |
---|
4277 | 4314 | { |
---|
4278 | | - if (GrafreeD.standAlone) |
---|
| 4315 | + if (Grafreed.standAlone) |
---|
4279 | 4316 | { |
---|
4280 | 4317 | FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE); |
---|
4281 | 4318 | browser.setVisible(true); |
---|
.. | .. |
---|
4386 | 4423 | Object3D objectparent = obj.parent; |
---|
4387 | 4424 | obj.parent = null; |
---|
4388 | 4425 | |
---|
4389 | | - Object3D object = (Object3D) GrafreeD.clone(obj); |
---|
| 4426 | + Object3D object = (Object3D) Grafreed.clone(obj); |
---|
4390 | 4427 | |
---|
4391 | 4428 | obj.parent = objectparent; |
---|
4392 | 4429 | |
---|
.. | .. |
---|
4420 | 4457 | buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n"); |
---|
4421 | 4458 | cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height); |
---|
4422 | 4459 | copy.generatePOV(buffer); |
---|
4423 | | - if (GrafreeD.standAlone) |
---|
| 4460 | + if (Grafreed.standAlone) |
---|
4424 | 4461 | { |
---|
4425 | 4462 | FileDialog browser = new FileDialog(frame, "Export POV", 1); |
---|
4426 | 4463 | browser.show(); |
---|