Expand description
Blender files can have meshes such as circles, cubes, cylinders, a dragon or any other 3D shape.
A mesh can be represented as a group of vertices and data about those vertices, such as their normals or UV coordinates.
Meshes can also have metadata, such as the name of it’s parent armature (useful for vertex skinning).
blender-mesh-to-json seeks to be a well tested, well documented exporter for blender mesh metadata.
You can write data to stdout or to a file. At the onset it will be geared towards @chinedufn’s needs - but if you have needs that aren’t met feel very free to open an issue.
@see https://docs.blender.org/manual/en/dev/modeling/meshes/introduction.html - Mesh Introduction @see https://github.com/chinedufn/blender-actions-to-json - Exporting blender armatures / actions
Structs§
- Blender
Mesh - All of the data about a mesh
- Bone
Influence - The index of a bone that influences the vertex along with the weighting of that influence
- Bounding
Box - The bounding box that encompasses a mesh. This will usually come from Blender as a z_up coordinate system bounding box that you’ll later convert to be y_up.
- Create
Single Index Config - Configuration for combining multiple indices into a single index
- Multi
Indexed Vertex Attributes - Vertex data with multiple indices - not suited for OpenGL and other single index rendering pipelines, but good for on disk storage as their is less data duplicated when there are multiple indices.
- PrincipledBSDF
- Material data for a mesh
- Single
Indexed Vertex Attributes - Most 3D model file formats export vertex data with multiple indices.
- Vertex
- A vertex within a mesh.
- Vertex
Attribute - Data for an individual vertex attribute such as positions, normals or uvs.
Enums§
- Blender
Error - Something went wrong in the Blender child process that was trying to parse your mesh data.
- Channel
- An individual channel within an image. Red, Green, or Blue.
- Flatten
Mesh Error - An error when trying to flatten your exported data across multiple files into one HashMap of mesh name to mesh data.
- Material
Input - An input to a material property.
Functions§
- flatten_
exported_ meshes - Convert MesheshByFilename into a HashMap<MeshName, &BlenderMesh> that flattens all of the meshes across all of the files into one HashMap.
- flatten_
exported_ meshes_ owned - Convert MesheshByFilename into a HashMap<MeshName, BlenderMesh> that flattens all of the meshes across all of the files into one HashMap.
- parse_
meshes_ from_ blender_ stdout - Given a buffer of standard output from Blender we parse all of the mesh JSON that was
written to stdout by
blender-mesh-to-json.py
.