Closed jgernandt closed 5 months ago
Cool. (Woulda been cooler with a test.) I'll have a look.
Sorry for dropping this out of the blue, and without a test. For what it's worth, your current test will still pass (and still fail to catch this issue), as it only tests 0 and 1. I'll get back to you with an update.
That should do it, I hope.
Great, thanks. No way I can keep control of this without a good test suite.
Hello BadDog,
Thank you for sharing this tool. I only recently stumbled on it, and it has been a great help in my workflow.
Now to business. I've added an sRGB->linear colour conversion on export of vertex alpha.
Background: Blender internally stores colour attributes as sRGB, which doesn't make sense when used to represent non-colour data like alpha. Your exporter never converts the VERTEX_ALPHA colour to actual alpha values, so the NIF ends up with nonsensical sRGB vertex alphas. Moreover, since your importer does convert to sRGB, vertex alpha changes if you import a model and export it right back again. The colour conversion fixes these issues.