-
-
Couldn't load subscription status.
- Fork 1.2k
Labels
defectSomething that is supposed to work, but doesn't. Less severe than a "bug"Something that is supposed to work, but doesn't. Less severe than a "bug"
Milestone
Description
When Spline is serialized, type will be serialized to SplineType.CatmullRom by default, regardless of the current type value.
jmonkeyengine/jme3-core/src/main/java/com/jme3/math/Spline.java
Lines 465 to 468 in 1f31c14
| public void write(JmeExporter ex) throws IOException { | |
| OutputCapsule oc = ex.getCapsule(this); | |
| oc.writeSavableArrayList((ArrayList) controlPoints, "controlPoints", null); | |
| oc.write(type, "type", SplineType.CatmullRom); |
Also, when deserializing, type reads the key name as “pathSplineType” instead of “type”.
jmonkeyengine/jme3-core/src/main/java/com/jme3/math/Spline.java
Lines 497 to 509 in 1f31c14
| public void read(JmeImporter im) throws IOException { | |
| InputCapsule in = im.getCapsule(this); | |
| controlPoints = in.readSavableArrayList("controlPoints", new ArrayList<>()); | |
| /* Empty List as default, prevents null pointers */ | |
| float list[] = in.readFloatArray("segmentsLength", null); | |
| if (list != null) { | |
| segmentsLength = new ArrayList<>(list.length); | |
| for (int i = 0; i < list.length; i++) { | |
| segmentsLength.add(list[i]); | |
| } | |
| } | |
| type = in.readEnum("pathSplineType", SplineType.class, SplineType.CatmullRom); |
Metadata
Metadata
Assignees
Labels
defectSomething that is supposed to work, but doesn't. Less severe than a "bug"Something that is supposed to work, but doesn't. Less severe than a "bug"