Bugfix: Issue 547: Unsupported type exception importing model from Blender

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9997 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Kae..pl 12 years ago
parent d8213d15b6
commit 6573b87bf0
  1. 10
      engine/src/blender/com/jme3/scene/plugins/blender/curves/CurvesHelper.java

@ -53,6 +53,7 @@ import com.jme3.math.Vector3f;
import com.jme3.math.Vector4f;
import com.jme3.scene.Geometry;
import com.jme3.scene.Mesh;
import com.jme3.scene.Spatial;
import com.jme3.scene.VertexBuffer.Type;
import com.jme3.scene.mesh.IndexBuffer;
import com.jme3.scene.plugins.blender.AbstractBlenderHelper;
@ -239,10 +240,11 @@ public class CurvesHelper extends AbstractBlenderHelper {
}
//reading custom properties
Properties properties = this.loadProperties(curveStructure, blenderContext);
if(properties != null && properties.getValue() != null) {
for(Geometry geom : result) {
geom.setUserData("properties", properties);
if(blenderContext.getBlenderKey().isLoadObjectProperties()) {
Properties properties = this.loadProperties(curveStructure, blenderContext);
//the loaded property is a group property, so we need to get each value and set it to Spatial
if(result instanceof Spatial && properties != null && properties.getValue() != null) {
this.applyProperties((Spatial) result, properties);
}
}

Loading…
Cancel
Save