09th / YABEE

Export models from the Blender to Panda3D game engine
MIT License
107 stars 39 forks source link

Export alpha channel in vertex colours, and additional vertex-colour layers #39

Closed ArsThaumaturgis closed 5 years ago

ArsThaumaturgis commented 5 years ago

This commit includes two changes that I feel are somewhat similar, and somewhat connected.

The first change allows the user to export vertex colours with an alpha channel. Since Blender doesn't (as far as I'm aware) support vertex-colours with an alpha channel, this is done by adding a second layer of vertex-colours in Blender, with the "red" channel being interpreted as the "alpha" channel.

The second allows YABEE to export layers from the third onwards (as the second is used as described above) as "aux" layers.

(A quick note: I've used British English in naming the resultant shader-input. I imagine that it would make sense to change this to match the Panda's convention if the changes are accepted.)

ArsThaumaturgis commented 5 years ago

I seem to have missed that it included the code from the previous pull request. I'm closing this with the intention of opening a new one that only uses the code changed in the relevant commit...