bdk-blender/source/blender/io
Gaia Clary d7901ed607 COLLADA: Support for alpha color in vertex data.
Many thanks to the original Author of this patch: Christian Aguilera

The COLLADA importer was silently ignoring the alpha component in the
vertex data.

The `stride` variable holds the component count (3 for RGB; 4 for RGBA),
and can be used for honouring the alpha channel in the vertex data.

Test plan:
- Open Blender.
- Clear the scene.
- Add a plane.
- Enter **Vertex Paint** mode.
- Switch to the **Erase Alpha** blending mode.
- Select a tone of gray.
- Turn strength down to less than 1
- Paint [some of] the vertices of the plane.
- Export project as a COLLADA file (`.dae`).
- Clear the scene.
- Re-import the COLLADA file again.
- Export the project again (with different name).

**Without** this patch, the second exported project will have lost the
alpha component in their vertex data:

```lang=xml, counterexample
<float_array id="Plane-mesh-colors-Col-array" count="24">1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1</float_array>
```

**With** the patch, the first and the second exported projects retain
the alpha values painted previously:

```lang=xml
<float_array id="Plane-mesh-colors-Col-array" count="24">1 1 1 1 1 1 1 0.5490196 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.5490196</float_array>
```

Reviewed By: cristian64, SonnyCampbell_Unity
Authored by: Christian Aguilera

Differential Revision: https://developer.blender.org/D14246
2022-07-02 22:30:38 +02:00
..
alembic Alembic export: evaluation mode option 2021-07-26 08:25:18 +02:00
avi Cleanup: use ELEM macro 2020-11-06 12:32:54 +11:00
collada COLLADA: Support for alpha color in vertex data. 2022-07-02 22:30:38 +02:00
common Fix T93066: Alembic export ignores Mantaflow particles 2021-11-22 16:47:55 +01:00
gpencil GPencil: Fix unreported error exporting to PDF/SVG with animated camera 2021-05-17 13:05:38 +02:00
usd Fix T86278: vertex color baking not working with modifiers 2021-05-17 19:41:11 +02:00
CMakeLists.txt GPencil: New modules for Import and Export 2021-03-24 15:28:58 +01:00