fixed the problem with saving/loading light probes.

empirephoenix-patch-1
javasabr 7 years ago committed by Rémy Bouquet
parent 47a46a8250
commit 839ffdd4f2
  1. 7
      jme3-core/src/main/java/com/jme3/light/LightProbe.java

@ -127,15 +127,13 @@ public class LightProbe extends Light implements Savable {
public void read(JmeImporter im) throws IOException { public void read(JmeImporter im) throws IOException {
super.read(im); super.read(im);
InputCapsule ic = im.getCapsule(this); InputCapsule ic = im.getCapsule(this);
prefilteredEnvMap = (TextureCubeMap) ic.readSavable("prefilteredEnvMap", null); prefilteredEnvMap = (TextureCubeMap) ic.readSavable("prefilteredEnvMap", null);
position = (Vector3f) ic.readSavable("position", this); position = (Vector3f) ic.readSavable("position", null);
bounds = (BoundingVolume) ic.readSavable("bounds", new BoundingSphere(1.0f, Vector3f.ZERO)); bounds = (BoundingVolume) ic.readSavable("bounds", new BoundingSphere(1.0f, Vector3f.ZERO));
nbMipMaps = ic.readInt("nbMipMaps", 0); nbMipMaps = ic.readInt("nbMipMaps", 0);
ready = ic.readBoolean("ready", false); ready = ic.readBoolean("ready", false);
Savable[] coeffs = ic.readSavableArray("shCoeffs", null); Savable[] coeffs = ic.readSavableArray("shCoeffs", null);
if (coeffs == null) { if (coeffs == null) {
ready = false; ready = false;
@ -145,7 +143,6 @@ public class LightProbe extends Light implements Savable {
for (int i = 0; i < coeffs.length; i++) { for (int i = 0; i < coeffs.length; i++) {
shCoeffs[i] = (Vector3f) coeffs[i]; shCoeffs[i] = (Vector3f) coeffs[i];
} }
} }
} }

Loading…
Cancel
Save