diff options
Diffstat (limited to 'source/blender/io/wavefront_obj/exporter')
-rw-r--r-- | source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc | 6 | ||||
-rw-r--r-- | source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc b/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc index f2547e6fc14..95be927589e 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc +++ b/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc @@ -503,7 +503,7 @@ static const char *tex_map_type_to_string[] = { "map_d", "map_Bump", }; -BLI_STATIC_ASSERT(ARRAY_SIZE(tex_map_type_to_string) == (int)MTLTexMapType::Count, +BLI_STATIC_ASSERT(ARRAY_SIZE(tex_map_type_to_string) == int(MTLTexMapType::Count), "array size mismatch"); /** @@ -641,7 +641,7 @@ void MTLWriter::write_texture_map(const MTLMaterial &mtl_material, /* Always emit forward slashes for cross-platform compatibility. */ std::replace(path.begin(), path.end(), '\\', '/'); - fmt_handler_.write_mtl_map(tex_map_type_to_string[(int)texture_key], options, path); + fmt_handler_.write_mtl_map(tex_map_type_to_string[int(texture_key)], options, path); } static bool is_pbr_map(MTLTexMapType type) @@ -677,7 +677,7 @@ void MTLWriter::write_materials(const char *blen_filepath, fmt_handler_.write_string(""); fmt_handler_.write_mtl_newmtl(mtlmat.name); write_bsdf_properties(mtlmat, write_pbr); - for (int key = 0; key < (int)MTLTexMapType::Count; key++) { + for (int key = 0; key < int(MTLTexMapType::Count); key++) { const MTLTexMap &tex = mtlmat.texture_maps[key]; if (!tex.is_valid()) { continue; diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc b/source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc index 851358f8762..0231bc79b89 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc +++ b/source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc @@ -33,7 +33,7 @@ const char *tex_map_type_to_socket_id[] = { "Alpha", "Normal", }; -BLI_STATIC_ASSERT(ARRAY_SIZE(tex_map_type_to_socket_id) == (int)MTLTexMapType::Count, +BLI_STATIC_ASSERT(ARRAY_SIZE(tex_map_type_to_socket_id) == int(MTLTexMapType::Count), "array size mismatch"); /** @@ -312,12 +312,12 @@ static void store_image_textures(const bNode *bsdf_node, * - finding "Strength" property of the node for `-bm` option. */ - for (int key = 0; key < (int)MTLTexMapType::Count; ++key) { + for (int key = 0; key < int(MTLTexMapType::Count); ++key) { MTLTexMap &value = r_mtl_mat.texture_maps[key]; Vector<const bNodeSocket *> linked_sockets; const bNode *normal_map_node{nullptr}; - if (key == (int)MTLTexMapType::Normal) { + if (key == int(MTLTexMapType::Normal)) { /* Find sockets linked to destination "Normal" socket in P-BSDF node. */ linked_sockets_to_dest_id(bsdf_node, *node_tree, "Normal", linked_sockets); /* Among the linked sockets, find Normal Map shader node. */ @@ -328,7 +328,7 @@ static void store_image_textures(const bNode *bsdf_node, } else { /* Skip emission map if emission strength is zero. */ - if (key == (int)MTLTexMapType::Emission) { + if (key == int(MTLTexMapType::Emission)) { float emission_strength = 0.0f; copy_property_from_node( SOCK_FLOAT, bsdf_node, "Emission Strength", {&emission_strength, 1}); |