PrismaticFlower / SWBF-msh-Blender-IO

.msh (SWBF toolchain version) exporter for Blender
Apache License 2.0
19 stars 6 forks source link

Unable to import vertex colors #9

Closed LeovanGit closed 11 months ago

LeovanGit commented 12 months ago

It does not import vertex colors? As I understand: VLTB, CLRB, VLTL and CLRL blocks in .msh file

PrismaticFlower commented 12 months ago

The good news is the colors are read in from the .msh files. They're just not added to the Blender mesh itself yet. I'm focused on other things right now but I might try get to this at some point.

Unless someone else beats me to it of course, the file that needs updating is this one https://github.com/PrismaticFlower/SWBF-msh-Blender-IO/blob/master/addons/io_scene_swbf_msh/msh_mesh_to_blend.py and it shouldn't be the most complex thing. I expect the most time consuming thing would be reading Blender's docs to learn how to add vertex the colors.

LeovanGit commented 11 months ago

Fixed here: https://github.com/PrismaticFlower/SWBF-msh-Blender-IO/pull/10

LeovanGit commented 11 months ago

One more problem which I missed: we should use color_attributes instead of vertex_colors in msh_model_gather.py.

https://docs.blender.org/api/current/bpy.types.Mesh.html "Legacy vertex color layers. Deprecated, use color attributes instead"

Because for now Export works wrong for colors

PrismaticFlower commented 11 months ago

Ah good to know. I've made a new issue to track that (#11) so it doesn't get forgotten about (hopefully).