-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spline's type can only be deserialized as CatmullRom #2366
Comments
Good catch! |
On closer inspection, the However, the mismatch of names ("pathSplineType" versus "type") is clearly a bug. |
Testing uncovered another issue with spline serialization: in the case of an NURBS spline, the knot list is a non-null
causes a |
I submitted PR #2368 to solve the bugs, which apparently date back to at least 2014: In other words, they aren't recent regressions. It appears they were missed due to inadequate test coverage. |
Oh, that was my mistake, it's now clear that this is entirely due to the mismatch of names causing type to only be loaded as CatmullRom when deserializing, thanks for that! |
Now I totally think “Spline's type can only be deserialized as CatmullRom” is the correct title for this issue. |
I changed the title as @xiaojiao-zsw suggested. Possibly related: I'm puzzled as to why |
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
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
The text was updated successfully, but these errors were encountered: