From 623dc0fa8cbd9473830a1786f6d49fa808a09439 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Sun, 05 May 2019 14:06:12 -0400 Subject: [PATCH] Rename Grafreed --- ObjEditor.java | 56 +++++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 43 insertions(+), 13 deletions(-) diff --git a/ObjEditor.java b/ObjEditor.java index 2f289ea..a6194b1 100644 --- a/ObjEditor.java +++ b/ObjEditor.java @@ -752,7 +752,7 @@ protected static ImageIcon createImageIcon(String path, String description) { - java.net.URL imgURL = GrafreeD.class.getResource(path); + java.net.URL imgURL = Grafreed.class.getResource(path); if (imgURL != null) { return new ImageIcon(imgURL, description); @@ -1476,19 +1476,19 @@ cGridBag editBar = new cGridBag().setVertical(false); - editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints); + editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints); createMaterialButton.setToolTipText("Create material"); /* ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); */ - editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints); + editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints); clearMaterialButton.setToolTipText("Clear material"); if (Globals.ADVANCED) { - editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints); + editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints); editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); } @@ -1939,7 +1939,7 @@ //? flashIt = false; CameraPane pane = (CameraPane) cameraView; - pane.clickStart(location.x, location.y, 0); + pane.clickStart(location.x, location.y, 0, 0); pane.clickEnd(location.x, location.y, 0, true); if (group.selection.size() == 1) @@ -2396,11 +2396,11 @@ void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName) { - if (GrafreeD.standAlone) + if (Grafreed.standAlone) { /**/ FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD); - browser.show(); + browser.setVisible(true); String filename = browser.getFile(); if (filename != null && filename.length() > 0) { @@ -3255,8 +3255,8 @@ Globals.ANIMATION ^= true; - GrafreeD.wav.cursor = 0; - GrafreeD.wav.loop = 0; + Grafreed.wav.cursor = 0; + Grafreed.wav.loop = 0; } } else { @@ -3443,6 +3443,36 @@ { //System.out.println("Propagate = " + propagate); copy.UpdateMaterial(anchor, current, propagate); + + if (copy.material != null) + { + cMaterial mat = copy.material; + + colorField.SetToolTipValue((mat.color)); + modulationField.SetToolTipValue((mat.modulation)); + metalnessField.SetToolTipValue((mat.metalness)); + diffuseField.SetToolTipValue((mat.diffuse)); + specularField.SetToolTipValue((mat.specular)); + shininessField.SetToolTipValue((mat.shininess)); + shiftField.SetToolTipValue((mat.shift)); + ambientField.SetToolTipValue((mat.ambient)); + lightareaField.SetToolTipValue((mat.lightarea)); + diffusenessField.SetToolTipValue((mat.factor)); + velvetField.SetToolTipValue((mat.velvet)); + sheenField.SetToolTipValue((mat.sheen)); + subsurfaceField.SetToolTipValue((mat.subsurface)); + backlitField.SetToolTipValue((mat.bump)); + anisoField.SetToolTipValue((mat.aniso)); + anisoVField.SetToolTipValue((mat.anisoV)); + cameraField.SetToolTipValue((mat.cameralight)); + selfshadowField.SetToolTipValue((mat.diffuseness)); + shadowField.SetToolTipValue((mat.shadow)); + textureField.SetToolTipValue((mat.texture)); + opacityField.SetToolTipValue((mat.opacity)); + fakedepthField.SetToolTipValue((mat.fakedepth)); + shadowbiasField.SetToolTipValue((mat.shadowbias)); + } + if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null) { copy.projectedVertices[0].x = (int) (bumpField.getFloat() * 1000); @@ -4170,7 +4200,7 @@ void load() // throws ClassNotFoundException { - if (GrafreeD.standAlone) + if (Grafreed.standAlone) { FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); browser.show(); @@ -4275,7 +4305,7 @@ void saveAs() { - if (GrafreeD.standAlone) + if (Grafreed.standAlone) { FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE); browser.setVisible(true); @@ -4386,7 +4416,7 @@ Object3D objectparent = obj.parent; obj.parent = null; - Object3D object = (Object3D) GrafreeD.clone(obj); + Object3D object = (Object3D) Grafreed.clone(obj); obj.parent = objectparent; @@ -4420,7 +4450,7 @@ buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n"); cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height); copy.generatePOV(buffer); - if (GrafreeD.standAlone) + if (Grafreed.standAlone) { FileDialog browser = new FileDialog(frame, "Export POV", 1); browser.show(); -- Gitblit v1.6.2