diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-07 19:02:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-07 19:02:48 +0300 |
commit | b49184b608df297195c5f0e81da4d8d9ddfb9213 (patch) | |
tree | c2624887be563319a7138516d2fcc6100acdb2c6 /source/blender/alembic | |
parent | f62b826533422e5de3b08601e5511c233deda529 (diff) | |
parent | f74d85ffc8232a859b1419f5dc25b244ae04375f (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/alembic')
-rw-r--r-- | source/blender/alembic/intern/abc_customdata.cc | 14 | ||||
-rw-r--r-- | source/blender/alembic/intern/abc_mesh.cc | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/alembic/intern/abc_customdata.cc b/source/blender/alembic/intern/abc_customdata.cc index 3b6c87ea1a0..b98d82f0c7d 100644 --- a/source/blender/alembic/intern/abc_customdata.cc +++ b/source/blender/alembic/intern/abc_customdata.cc @@ -362,9 +362,9 @@ static void read_custom_data_mcols(const std::string & iobject_full_name, bounds_warning_given); const Imath::C3f &color = (*c3f_ptr)[color_index]; - cface->a = FTOCHAR(color[0]); - cface->r = FTOCHAR(color[1]); - cface->g = FTOCHAR(color[2]); + cface->a = unit_float_to_uchar_clamp(color[0]); + cface->r = unit_float_to_uchar_clamp(color[1]); + cface->g = unit_float_to_uchar_clamp(color[2]); cface->b = 255; } else { @@ -375,10 +375,10 @@ static void read_custom_data_mcols(const std::string & iobject_full_name, bounds_warning_given); const Imath::C4f &color = (*c4f_ptr)[color_index]; - cface->a = FTOCHAR(color[0]); - cface->r = FTOCHAR(color[1]); - cface->g = FTOCHAR(color[2]); - cface->b = FTOCHAR(color[3]); + cface->a = unit_float_to_uchar_clamp(color[0]); + cface->r = unit_float_to_uchar_clamp(color[1]); + cface->g = unit_float_to_uchar_clamp(color[2]); + cface->b = unit_float_to_uchar_clamp(color[3]); } } } diff --git a/source/blender/alembic/intern/abc_mesh.cc b/source/blender/alembic/intern/abc_mesh.cc index 52d14f84728..56fa0a93532 100644 --- a/source/blender/alembic/intern/abc_mesh.cc +++ b/source/blender/alembic/intern/abc_mesh.cc @@ -1325,7 +1325,7 @@ void AbcSubDReader::readObjectData(Main *bmain, const Alembic::Abc::ISampleSelec MEdge *edge = find_edge(edges, mesh->totedge, (*indices)[i], (*indices)[i + 1]); if (edge) { - edge->crease = FTOCHAR((*sharpnesses)[s]); + edge->crease = unit_float_to_uchar_clamp((*sharpnesses)[s]); } } |