Hello! My name is Blue and I am working on a plugin that adds vertex color support to BlockBench.
I have written about 100 lines of javascript in my life, and I just started learning how to use BlockBench yesterday. But I could not tolerate Blender for another second, so here we are.
I put together a checklist of items (not really in order) that need to be done for this plugin to start working:
- add vertex color & mix mode into vertex data
- mix mode indicates how the texture color and vertex color are mixed together to produce the final albedo color.
- Mix mode is a per-mesh value while the color is on every vertex.
- make sure it is saved into the bbmodel file.
- The properties API looks promising
- add "vertex color" and "texture + vertex color" preview display modes
- Or, possibly just make the current "textured" mode show the vertex colors as well.
- I have no idea how to do this
- add vertex color paint tool to the paint workspace
- I imagine it's simple enough to add a new tool that is basically just the weight paint tool, but painting colors instead of weights
- add export options that include the vertex color data
- I imagine just adding new codecs one by one, rather than rewriting the existing export options.
- add dropdown to change the mix mode for vertex colors on a mesh
My questions, to more experienced plugin devs, are:
- How do I do monkey patching in a plugin?
- is there a way to override the viewport rendering without monkey patching?
- Is it better to replace the built-in codecs, or create new ones that support vertex colors? For example for a gltf export, should the plugin replace the existing gltf codec implementation, or should there be a new "gltf with vertex colors" option in the menu?
- where should the mix mode dropdown / option be placed? Or does something like this already exist for multiple textures on a mesh?