diff options
Diffstat (limited to 'source/blender/io/usd')
6 files changed, 10 insertions, 11 deletions
diff --git a/source/blender/io/usd/intern/usd_capi_export.cc b/source/blender/io/usd/intern/usd_capi_export.cc index 1033f85181c..3977daaca4a 100644 --- a/source/blender/io/usd/intern/usd_capi_export.cc +++ b/source/blender/io/usd/intern/usd_capi_export.cc @@ -96,8 +96,7 @@ static void export_startjob(void *customdata, } usd_stage->SetMetadata(pxr::UsdGeomTokens->upAxis, pxr::VtValue(pxr::UsdGeomTokens->z)); - usd_stage->SetMetadata(pxr::UsdGeomTokens->metersPerUnit, - static_cast<double>(scene->unit.scale_length)); + usd_stage->SetMetadata(pxr::UsdGeomTokens->metersPerUnit, double(scene->unit.scale_length)); usd_stage->GetRootLayer()->SetDocumentation(std::string("Blender v") + BKE_blender_version_string()); @@ -120,7 +119,7 @@ static void export_startjob(void *customdata, } /* Update the scene for the next frame to render. */ - scene->r.cfra = static_cast<int>(frame); + scene->r.cfra = int(frame); scene->r.subframe = frame - scene->r.cfra; BKE_scene_graph_update_for_newframe(data->depsgraph); diff --git a/source/blender/io/usd/intern/usd_capi_import.cc b/source/blender/io/usd/intern/usd_capi_import.cc index 54ad7ef5410..5808c6bc77a 100644 --- a/source/blender/io/usd/intern/usd_capi_import.cc +++ b/source/blender/io/usd/intern/usd_capi_import.cc @@ -230,7 +230,7 @@ static void import_startjob(void *customdata, short *stop, short *do_update, flo *data->do_update = true; *data->progress = 0.2f; - const float size = static_cast<float>(archive->readers().size()); + const float size = float(archive->readers().size()); size_t i = 0; /* Sort readers by name: when creating a lot of objects in Blender, diff --git a/source/blender/io/usd/intern/usd_reader_camera.cc b/source/blender/io/usd/intern/usd_reader_camera.cc index 7f1e9fef89d..da51787e437 100644 --- a/source/blender/io/usd/intern/usd_reader_camera.cc +++ b/source/blender/io/usd/intern/usd_reader_camera.cc @@ -71,7 +71,7 @@ void USDCameraReader::read_object_data(Main *bmain, const double motionSampleTim bcam->clip_end = clippingRangeVal.UncheckedGet<pxr::GfVec2f>()[1]; bcam->dof.focus_distance = focalDistanceVal.Get<float>(); - bcam->dof.aperture_fstop = static_cast<float>(fstopVal.Get<float>()); + bcam->dof.aperture_fstop = float(fstopVal.Get<float>()); if (bcam->type == CAM_ORTHO) { bcam->ortho_scale = max_ff(verAp.Get<float>(), horAp.Get<float>()); diff --git a/source/blender/io/usd/intern/usd_reader_mesh.cc b/source/blender/io/usd/intern/usd_reader_mesh.cc index e76b9d3283b..ea433bec139 100644 --- a/source/blender/io/usd/intern/usd_reader_mesh.cc +++ b/source/blender/io/usd/intern/usd_reader_mesh.cc @@ -275,7 +275,7 @@ void USDMeshReader::read_object_data(Main *bmain, const double motionSampleTime) bool USDMeshReader::valid() const { - return static_cast<bool>(mesh_prim_); + return bool(mesh_prim_); } bool USDMeshReader::topology_changed(const Mesh *existing_mesh, const double motionSampleTime) @@ -601,7 +601,7 @@ void USDMeshReader::process_normals_vertex_varying(Mesh *mesh) MutableSpan vert_normals{(float3 *)BKE_mesh_vertex_normals_for_write(mesh), mesh->totvert}; BLI_STATIC_ASSERT(sizeof(normals_[0]) == sizeof(float3), "Expected float3 normals size"); - vert_normals.copy_from({(float3 *)normals_.data(), static_cast<int64_t>(normals_.size())}); + vert_normals.copy_from({(float3 *)normals_.data(), int64_t(normals_.size())}); BKE_mesh_vertex_normals_clear_dirty(mesh); } diff --git a/source/blender/io/usd/intern/usd_reader_nurbs.cc b/source/blender/io/usd/intern/usd_reader_nurbs.cc index d0a5dc1c4b4..a838450a4c0 100644 --- a/source/blender/io/usd/intern/usd_reader_nurbs.cc +++ b/source/blender/io/usd/intern/usd_reader_nurbs.cc @@ -117,7 +117,7 @@ void USDNurbsReader::read_curve_sample(Curve *cu, const double motionSampleTime) nu->pntsv = 1; if (i < orders.size()) { - nu->orderu = static_cast<short>(orders[i]); + nu->orderu = short(orders[i]); } else { nu->orderu = 4; diff --git a/source/blender/io/usd/intern/usd_reader_volume.cc b/source/blender/io/usd/intern/usd_reader_volume.cc index 13044de5002..fc25dda53b9 100644 --- a/source/blender/io/usd/intern/usd_reader_volume.cc +++ b/source/blender/io/usd/intern/usd_reader_volume.cc @@ -65,10 +65,10 @@ void USDVolumeReader::read_object_data(Main *bmain, const double motionSampleTim filepathAttr.GetTimeSamples(&filePathTimes); if (!filePathTimes.empty()) { - int start = static_cast<int>(filePathTimes.front()); - int end = static_cast<int>(filePathTimes.back()); + int start = int(filePathTimes.front()); + int end = int(filePathTimes.back()); - volume->is_sequence = static_cast<char>(true); + volume->is_sequence = char(true); volume->frame_start = start; volume->frame_duration = (end - start) + 1; } |