Skip to content

Commit 558dc0a

Browse files
authored
Merge pull request #618 from tonihele/feature/jme-3.7-stable
Feature/jme 3.7 stable
2 parents f38a13f + 7d4966c commit 558dc0a

File tree

2 files changed

+26
-10
lines changed

2 files changed

+26
-10
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ jmeVersion = 3.7.0
33
# Version used for application and settings folder, no spaces!
44
jmeMainVersion = 3.7
55
# Version addition pre-alpha-svn, Stable, Beta
6-
jmeVersionTag = beta1.2.2
6+
jmeVersionTag = stable
77
# Increment this each time jmeVersionTag changes but jmeVersion stays the same
88
#jmeVersionTagID = 0
99

jme3-blender/src/com/jme3/gde/blender/GltfExtrasLoader.java

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,15 @@
3636

3737
package com.jme3.gde.blender;
3838

39+
import com.jme3.plugins.json.JsonArray;
40+
import com.jme3.plugins.json.JsonElement;
41+
import com.jme3.plugins.json.JsonObject;
42+
import com.jme3.plugins.json.JsonPrimitive;
3943
import java.lang.reflect.Array;
4044
import java.util.*;
4145

4246
import org.slf4j.*;
4347

44-
import com.google.gson.*;
45-
4648
import com.jme3.scene.Spatial;
4749
import com.jme3.scene.plugins.gltf.*;
4850

@@ -77,11 +79,19 @@ public Object handleExtras( GltfLoader loader, String parentName,
7779
log.debug("handleExtras(" + loader + ", " + parentName + ", " + parent + ", " + extras + ", " + input + ")");
7880

7981
// Only interested in composite objects
80-
if( !extras.isJsonObject() ) {
82+
JsonObject jo = null;
83+
try {
84+
jo = extras.getAsJsonObject();
85+
}
86+
catch(Exception e) {
87+
log.warn("Skipping extras:" + extras, e);
88+
}
89+
90+
if(jo == null) {
8191
log.warn("Skipping extras:" + extras);
8292
return input;
8393
}
84-
JsonObject jo = extras.getAsJsonObject();
94+
8595
apply(input, jo);
8696
return input;
8797
}
@@ -120,15 +130,21 @@ protected void applyToSpatial( Spatial spatial, JsonObject extras ) {
120130
}
121131

122132
protected Object toAttribute( JsonElement el, boolean nested ) {
123-
if( el.isJsonObject() ) {
133+
try {
124134
return toAttribute(el.getAsJsonObject(), nested);
125-
} else if( el.isJsonArray() ) {
135+
} catch (Exception e) {
136+
}
137+
138+
try {
126139
return toAttribute(el.getAsJsonArray(), nested);
127-
} else if( el.isJsonPrimitive() ) {
140+
} catch (Exception e) {
141+
}
142+
143+
try {
128144
return toAttribute(el.getAsJsonPrimitive(), nested);
129-
} else if( el.isJsonNull() ) {
130-
return null;
145+
} catch (Exception e) {
131146
}
147+
132148
log.warn("Unhandled extras element:" + el);
133149
return null;
134150
}

0 commit comments

Comments
 (0)