diff options
Diffstat (limited to 'source/blender/io/usd')
4 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/io/usd/intern/usd_reader_curve.cc b/source/blender/io/usd/intern/usd_reader_curve.cc index 0d3c2feb8f3..ca48f3c2391 100644 --- a/source/blender/io/usd/intern/usd_reader_curve.cc +++ b/source/blender/io/usd/intern/usd_reader_curve.cc @@ -139,9 +139,9 @@ void USDCurvesReader::read_curve_sample(Curve *cu, const double motionSampleTime BPoint *bp = nu->bp; for (int j = 0; j < nu->pntsu; j++, bp++, idx++) { - bp->vec[0] = (float)usdPoints[idx][0]; - bp->vec[1] = (float)usdPoints[idx][1]; - bp->vec[2] = (float)usdPoints[idx][2]; + bp->vec[0] = float(usdPoints[idx][0]); + bp->vec[1] = float(usdPoints[idx][1]); + bp->vec[2] = float(usdPoints[idx][2]); bp->vec[3] = weight; bp->f1 = SELECT; bp->weight = weight; diff --git a/source/blender/io/usd/intern/usd_reader_light.cc b/source/blender/io/usd/intern/usd_reader_light.cc index 55b9557dfb5..7204ea91896 100644 --- a/source/blender/io/usd/intern/usd_reader_light.cc +++ b/source/blender/io/usd/intern/usd_reader_light.cc @@ -203,7 +203,7 @@ void USDLightReader::read_object_data(Main *bmain, const double motionSampleTime if (pxr::UsdAttribute cone_angle_attr = shaping_api.GetShapingConeAngleAttr()) { float cone_angle = 0.0f; if (cone_angle_attr.Get(&cone_angle, motionSampleTime)) { - blight->spotsize = cone_angle * ((float)M_PI / 180.0f) * 2.0f; + blight->spotsize = cone_angle * (float(M_PI) / 180.0f) * 2.0f; } } @@ -226,7 +226,7 @@ void USDLightReader::read_object_data(Main *bmain, const double motionSampleTime if (pxr::UsdAttribute angle_attr = distant_light.GetAngleAttr()) { float angle = 0.0f; if (angle_attr.Get(&angle, motionSampleTime)) { - blight->sun_angle = angle * (float)M_PI / 180.0f; + blight->sun_angle = angle * float(M_PI) / 180.0f; } } } diff --git a/source/blender/io/usd/intern/usd_reader_nurbs.cc b/source/blender/io/usd/intern/usd_reader_nurbs.cc index a838450a4c0..0a7058fb100 100644 --- a/source/blender/io/usd/intern/usd_reader_nurbs.cc +++ b/source/blender/io/usd/intern/usd_reader_nurbs.cc @@ -33,7 +33,7 @@ static bool set_knots(const pxr::VtDoubleArray &knots, float *&nu_knots) nu_knots = static_cast<float *>(MEM_callocN(num_knots * sizeof(float), __func__)); for (size_t i = 0; i < num_knots; i++) { - nu_knots[i] = (float)knots[i]; + nu_knots[i] = float(knots[i]); } return true; @@ -141,9 +141,9 @@ void USDNurbsReader::read_curve_sample(Curve *cu, const double motionSampleTime) BPoint *bp = nu->bp; for (int j = 0; j < nu->pntsu; j++, bp++, idx++) { - bp->vec[0] = (float)usdPoints[idx][0]; - bp->vec[1] = (float)usdPoints[idx][1]; - bp->vec[2] = (float)usdPoints[idx][2]; + bp->vec[0] = float(usdPoints[idx][0]); + bp->vec[1] = float(usdPoints[idx][1]); + bp->vec[2] = float(usdPoints[idx][2]); bp->vec[3] = weight; bp->f1 = SELECT; bp->weight = weight; diff --git a/source/blender/io/usd/intern/usd_writer_volume.cc b/source/blender/io/usd/intern/usd_writer_volume.cc index 12db6d73901..8cc3c65ee70 100644 --- a/source/blender/io/usd/intern/usd_writer_volume.cc +++ b/source/blender/io/usd/intern/usd_writer_volume.cc @@ -145,7 +145,7 @@ std::optional<std::string> USDVolumeWriter::construct_vdb_file_path(const Volume BLI_strncpy(vdb_file_name, volume->id.name + 2, FILE_MAXFILE); const pxr::UsdTimeCode timecode = get_export_time_code(); if (!timecode.IsDefault()) { - const int frame = (int)timecode.GetValue(); + const int frame = int(timecode.GetValue()); const int num_frame_digits = frame == 0 ? 1 : integer_digits_i(abs(frame)); BLI_path_frame(vdb_file_name, frame, num_frame_digits); } |