Skip to content

Blender Exporter - Geometry Export Options Lead to Invalid JSON #8974

@carlosanunes

Description

@carlosanunes
Description of the problem

I wanted to export just the scene information (lights) using the three.js exporter, so I turned off the geometry options (Vertices, Faces, Normals, UVs). Still, the exporter parsed the geometry, and actually generated a json with some object (mesh) information, but it is not valid. The ObjectLoader can actually load the information and fill some geometry information but it is not valid.

Checked the code, and these options are actually not considered when starting the scene parsing.

My proposed solution would be to consider these options and not parse the geometry when they are not selected and exclude any meshes. I failed to come up with a scenario where there is a point in generating a scene description with mesh objects (json file) that do not have the vertices information.

In sum, I am not seeing the exporter (as it is) generate a valid json file (or at least one that makes sense) if you uncheck the vertices option, and specially not if you uncheck Faces, Normals and UVs as well.

I can submit a PR for this, but still wanted to confirm proposed solution.

Three.js version
  • Dev
  • r77
  • ...
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • Linux
  • Android
  • IOS
Hardware Requirements (graphics card, VR Device, ...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions