diff options
Diffstat (limited to 'source/blender/io/alembic')
9 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/io/alembic/exporter/abc_archive.cc b/source/blender/io/alembic/exporter/abc_archive.cc index c4a4f129ecf..55e172db241 100644 --- a/source/blender/io/alembic/exporter/abc_archive.cc +++ b/source/blender/io/alembic/exporter/abc_archive.cc @@ -130,7 +130,7 @@ static TimeSamplingPtr create_time_sampling(double scene_fps, get_shutter_samples(scene_fps, params, nr_of_samples, true, samples); - TimeSamplingType ts(static_cast<uint32_t>(samples.size()), 1.0 / scene_fps); + TimeSamplingType ts(uint32_t(samples.size()), 1.0 / scene_fps); return TimeSamplingPtr(new TimeSampling(ts, samples)); // NOLINT: modernize-make-shared } diff --git a/source/blender/io/alembic/exporter/abc_export_capi.cc b/source/blender/io/alembic/exporter/abc_export_capi.cc index dfca89e2c6d..546bc9d49cc 100644 --- a/source/blender/io/alembic/exporter/abc_export_capi.cc +++ b/source/blender/io/alembic/exporter/abc_export_capi.cc @@ -144,8 +144,8 @@ static void export_startjob(void *customdata, } /* Update the scene for the next frame to render. */ - scene->r.cfra = static_cast<int>(frame); - scene->r.subframe = static_cast<float>(frame - scene->r.cfra); + scene->r.cfra = int(frame); + scene->r.subframe = float(frame - scene->r.cfra); BKE_scene_graph_update_for_newframe(data->depsgraph); CLOG_INFO(&LOG, 2, "Exporting frame %.2f", frame); diff --git a/source/blender/io/alembic/exporter/abc_writer_curves.cc b/source/blender/io/alembic/exporter/abc_writer_curves.cc index 4717d3ec26e..e5e8053d7d3 100644 --- a/source/blender/io/alembic/exporter/abc_writer_curves.cc +++ b/source/blender/io/alembic/exporter/abc_writer_curves.cc @@ -142,7 +142,7 @@ void ABCCurveWriter::do_write(HierarchyContext &context) } } - orders.push_back(static_cast<uint8_t>(nurbs->orderu)); + orders.push_back(uint8_t(nurbs->orderu)); vert_counts.push_back(verts.size() - current_point_count); } diff --git a/source/blender/io/alembic/intern/abc_reader_camera.cc b/source/blender/io/alembic/intern/abc_reader_camera.cc index 830526a11ac..e7a319730b6 100644 --- a/source/blender/io/alembic/intern/abc_reader_camera.cc +++ b/source/blender/io/alembic/intern/abc_reader_camera.cc @@ -77,11 +77,11 @@ void AbcCameraReader::readObjectData(Main *bmain, const ISampleSelector &sample_ bcam->stereo.convergence_distance = convergence_plane.getValue(sample_sel); } - const float lens = static_cast<float>(cam_sample.getFocalLength()); - const float apperture_x = static_cast<float>(cam_sample.getHorizontalAperture()); - const float apperture_y = static_cast<float>(cam_sample.getVerticalAperture()); - const float h_film_offset = static_cast<float>(cam_sample.getHorizontalFilmOffset()); - const float v_film_offset = static_cast<float>(cam_sample.getVerticalFilmOffset()); + const float lens = float(cam_sample.getFocalLength()); + const float apperture_x = float(cam_sample.getHorizontalAperture()); + const float apperture_y = float(cam_sample.getVerticalAperture()); + const float h_film_offset = float(cam_sample.getHorizontalFilmOffset()); + const float v_film_offset = float(cam_sample.getVerticalFilmOffset()); const float film_aspect = apperture_x / apperture_y; bcam->lens = lens; @@ -89,10 +89,10 @@ void AbcCameraReader::readObjectData(Main *bmain, const ISampleSelector &sample_ bcam->sensor_y = apperture_y * 10; bcam->shiftx = h_film_offset / apperture_x; bcam->shifty = v_film_offset / apperture_y / film_aspect; - bcam->clip_start = max_ff(0.1f, static_cast<float>(cam_sample.getNearClippingPlane())); - bcam->clip_end = static_cast<float>(cam_sample.getFarClippingPlane()); - bcam->dof.focus_distance = static_cast<float>(cam_sample.getFocusDistance()); - bcam->dof.aperture_fstop = static_cast<float>(cam_sample.getFStop()); + bcam->clip_start = max_ff(0.1f, float(cam_sample.getNearClippingPlane())); + bcam->clip_end = float(cam_sample.getFarClippingPlane()); + bcam->dof.focus_distance = float(cam_sample.getFocusDistance()); + bcam->dof.aperture_fstop = float(cam_sample.getFStop()); m_object = BKE_object_add_only_object(bmain, OB_CAMERA, m_object_name.c_str()); m_object->data = bcam; diff --git a/source/blender/io/alembic/intern/abc_reader_curves.cc b/source/blender/io/alembic/intern/abc_reader_curves.cc index d8859acdf5f..24bdae3ac50 100644 --- a/source/blender/io/alembic/intern/abc_reader_curves.cc +++ b/source/blender/io/alembic/intern/abc_reader_curves.cc @@ -152,7 +152,7 @@ void AbcCurveReader::read_curve_sample(Curve *cu, break; case Alembic::AbcGeom::kVariableOrder: if (orders && orders->size() > i) { - nu->orderu = static_cast<short>((*orders)[i]); + nu->orderu = short((*orders)[i]); break; } ATTR_FALLTHROUGH; diff --git a/source/blender/io/alembic/intern/abc_reader_mesh.cc b/source/blender/io/alembic/intern/abc_reader_mesh.cc index 6ddf55109ab..f08514dc45c 100644 --- a/source/blender/io/alembic/intern/abc_reader_mesh.cc +++ b/source/blender/io/alembic/intern/abc_reader_mesh.cc @@ -133,7 +133,7 @@ static void read_mverts_interp(MVert *mverts, const Imath::V3f &floor_pos = (*positions)[i]; const Imath::V3f &ceil_pos = (*ceil_positions)[i]; - interp_v3_v3v3(tmp, floor_pos.getValue(), ceil_pos.getValue(), static_cast<float>(weight)); + interp_v3_v3v3(tmp, floor_pos.getValue(), ceil_pos.getValue(), float(weight)); copy_zup_from_yup(mvert.co, tmp); } } @@ -448,7 +448,7 @@ static void read_velocity(const V3fArraySamplePtr &velocities, const CDStreamConfig &config, const float velocity_scale) { - const int num_velocity_vectors = static_cast<int>(velocities->size()); + const int num_velocity_vectors = int(velocities->size()); if (num_velocity_vectors != config.mesh->totvert) { /* Files containing videogrammetry data may be malformed and export velocity data on missing * frames (most likely by copying the last valid data). */ diff --git a/source/blender/io/alembic/intern/abc_reader_object.cc b/source/blender/io/alembic/intern/abc_reader_object.cc index db056c0eef6..5cf1fda0db2 100644 --- a/source/blender/io/alembic/intern/abc_reader_object.cc +++ b/source/blender/io/alembic/intern/abc_reader_object.cc @@ -110,7 +110,7 @@ static Imath::M44d blend_matrices(const Imath::M44d &m0, convert_matrix_datatype(m0, mat0); convert_matrix_datatype(m1, mat1); - interp_m4_m4m4(ret, mat0, mat1, static_cast<float>(weight)); + interp_m4_m4m4(ret, mat0, mat1, float(weight)); return convert_matrix_datatype(ret); } diff --git a/source/blender/io/alembic/intern/abc_util.cc b/source/blender/io/alembic/intern/abc_util.cc index 90f73d25c22..846a3622d62 100644 --- a/source/blender/io/alembic/intern/abc_util.cc +++ b/source/blender/io/alembic/intern/abc_util.cc @@ -73,7 +73,7 @@ Imath::M44d convert_matrix_datatype(float mat[4][4]) for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { - m[i][j] = static_cast<double>(mat[i][j]); + m[i][j] = double(mat[i][j]); } } @@ -84,7 +84,7 @@ void convert_matrix_datatype(const Imath::M44d &xform, float r_mat[4][4]) { for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { - r_mat[i][j] = static_cast<float>(xform[i][j]); + r_mat[i][j] = float(xform[i][j]); } } } diff --git a/source/blender/io/alembic/intern/alembic_capi.cc b/source/blender/io/alembic/intern/alembic_capi.cc index 11c26fd2f72..39595089109 100644 --- a/source/blender/io/alembic/intern/alembic_capi.cc +++ b/source/blender/io/alembic/intern/alembic_capi.cc @@ -502,7 +502,7 @@ static void import_startjob(void *user_data, short *stop, short *do_update, floa /* Create objects and set scene frame range. */ - const float size = static_cast<float>(data->readers.size()); + const float size = float(data->readers.size()); size_t i = 0; chrono_t min_time = std::numeric_limits<chrono_t>::max(); @@ -542,8 +542,8 @@ static void import_startjob(void *user_data, short *stop, short *do_update, floa scene->r.cfra = scene->r.sfra; } else if (min_time < max_time) { - scene->r.sfra = static_cast<int>(round(min_time * FPS)); - scene->r.efra = static_cast<int>(round(max_time * FPS)); + scene->r.sfra = int(round(min_time * FPS)); + scene->r.efra = int(round(max_time * FPS)); scene->r.cfra = scene->r.sfra; } } |