Skip to content
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

ShaderNodeDefinition.write(): serialization error of the variable 'outputs' #2034

Closed
capdevon opened this issue Jun 6, 2023 · 1 comment · Fixed by #2035
Closed

ShaderNodeDefinition.write(): serialization error of the variable 'outputs' #2034

capdevon opened this issue Jun 6, 2023 · 1 comment · Fixed by #2035
Assignees
Labels
bug Something that is supposed to work, but doesn't. More severe than a "defect".
Milestone

Comments

@capdevon
Copy link
Contributor

capdevon commented Jun 6, 2023

https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/shader/ShaderNodeDefinition.java#L204

    /**
     * jme serialization (not used)
     *
     * @param ex the exporter
     * @throws IOException from the exporter
     */
    @Override
    public void write(JmeExporter ex) throws IOException {
        OutputCapsule oc = ex.getCapsule(this);
        oc.write(name, "name", "");
        String[] str = new String[shadersLanguage.size()];
        oc.write(shadersLanguage.toArray(str), "shadersLanguage", null);
        oc.write(shadersPath.toArray(str), "shadersPath", null);
        oc.write(type, "type", null);
        oc.writeSavableArrayList((ArrayList) inputs, "inputs", new ArrayList<ShaderNodeVariable>());
        oc.writeSavableArrayList((ArrayList) outputs, "inputs", new ArrayList<ShaderNodeVariable>()); // <-- error
        //oc.writeSavableArrayList((ArrayList) outputs, "outputs", new ArrayList<ShaderNodeVariable>()); // <-- correction
    }
@stephengold
Copy link
Member

Good catch! Thanks for bringing it to our attention.

@stephengold stephengold added this to the v3.6.1 milestone Jun 6, 2023
@stephengold stephengold added the bug Something that is supposed to work, but doesn't. More severe than a "defect". label Jun 6, 2023
@stephengold stephengold self-assigned this Jun 6, 2023
@stephengold stephengold linked a pull request Jun 6, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to work, but doesn't. More severe than a "defect".
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants