diff options
Diffstat (limited to 'source/blender/makesdna/DNA_meshdata_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_meshdata_types.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index 6b526c6463e..2de89a31ab0 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -122,9 +122,30 @@ typedef struct MLoopUV { /* at the moment alpha is abused for vertex painting * and not used for transparency, note that red and blue are swapped */ typedef struct MLoopCol { - char a, r, g, b; + char r, g, b, a; } MLoopCol; +#define MESH_MLOOPCOL_FROM_MCOL(_mloopcol, _mcol) \ +{ \ + MLoopCol *mloopcol__tmp = _mloopcol; \ + const MCol *mcol__tmp = _mcol; \ + mloopcol__tmp->r = mcol__tmp->b; \ + mloopcol__tmp->g = mcol__tmp->g; \ + mloopcol__tmp->b = mcol__tmp->r; \ + mloopcol__tmp->a = mcol__tmp->a; \ +} (void)0 + + +#define MESH_MLOOPCOL_TO_MCOL(_mloopcol, _mcol) \ +{ \ + const MLoopCol *mloopcol__tmp = _mloopcol; \ + MCol *mcol__tmp = _mcol; \ + mcol__tmp->b = mloopcol__tmp->r; \ + mcol__tmp->g = mloopcol__tmp->g; \ + mcol__tmp->r = mloopcol__tmp->b; \ + mcol__tmp->a = mloopcol__tmp->a; \ +} (void)0 + typedef struct MSticky { float co[2]; } MSticky; |