diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-11-13 16:48:48 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-11-13 16:48:48 +0300 |
commit | 1cb6cea71c10c0d22ba9cdd3eee5111d0734c193 (patch) | |
tree | 1cbd74c668006be134692e883ceef7286db3a368 /source/blender/python/bmesh/bmesh_py_types_meshdata.c | |
parent | f30a2a786214c4ef08612486c227add0bb6bf35b (diff) | |
parent | 8a03e4d409ec71beab612facf432eb57f3bc5f34 (diff) |
Merge remote-tracking branch 'origin/master' into blender2.8
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_types_meshdata.c')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types_meshdata.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c index 574aef3d54f..54b33e7b6b6 100644 --- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c @@ -280,12 +280,12 @@ PyObject *BPy_BMVertSkin_CreatePyObject(struct MVertSkin *mvertskin) static void mloopcol_to_float(const MLoopCol *mloopcol, float r_col[3]) { - rgb_uchar_to_float(r_col, (const unsigned char *)&mloopcol->r); + rgba_uchar_to_float(r_col, (const unsigned char *)&mloopcol->r); } static void mloopcol_from_float(MLoopCol *mloopcol, const float col[3]) { - rgb_float_to_uchar((unsigned char *)&mloopcol->r, col); + rgba_float_to_uchar((unsigned char *)&mloopcol->r, col); } static unsigned char mathutils_bmloopcol_cb_index = -1; @@ -346,8 +346,8 @@ static void bm_init_types_bmloopcol(void) int BPy_BMLoopColor_AssignPyObject(struct MLoopCol *mloopcol, PyObject *value) { - float tvec[3]; - if (mathutils_array_parse(tvec, 3, 3, value, "BMLoopCol") != -1) { + float tvec[4]; + if (mathutils_array_parse(tvec, 4, 4, value, "BMLoopCol") != -1) { mloopcol_from_float(mloopcol, tvec); return 0; } @@ -360,7 +360,7 @@ PyObject *BPy_BMLoopColor_CreatePyObject(struct MLoopCol *data) { PyObject *color_capsule; color_capsule = PyCapsule_New(data, NULL, NULL); - return Color_CreatePyObject_cb(color_capsule, mathutils_bmloopcol_cb_index, 0); + return Vector_CreatePyObject_cb(color_capsule, 4, mathutils_bmloopcol_cb_index, 0); } #undef MLOOPCOL_FROM_CAPSULE |