diff options
author | Julian Eisel <julian@blender.org> | 2022-11-10 15:17:42 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-11-10 15:17:42 +0300 |
commit | 7246c387435769a169ac24c91434c615df6434b4 (patch) | |
tree | 61842e3e0ce85e80720fdd7476d44d2e629f59fd /source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc | |
parent | c5f55d17096d373791363e46004176e3f7f7ae52 (diff) | |
parent | 0b4bd3ddc016298e868169a541cf6c132b10c587 (diff) |
Merge branch 'master' into asset-browser-grid-viewasset-browser-grid-view
Diffstat (limited to 'source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc')
-rw-r--r-- | source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc | 10 |
1 files changed, 5 insertions, 5 deletions
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 f8c7da75a70..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"); /** @@ -153,7 +153,7 @@ static std::string get_image_filepath(const bNode *tex_node) if (tex_image->source == IMA_SRC_SEQUENCE) { char head[FILE_MAX], tail[FILE_MAX]; - unsigned short numlen; + ushort numlen; int framenr = static_cast<NodeTexImage *>(tex_node->storage)->iuser.framenr; BLI_path_sequence_decode(path, head, tail, &numlen); BLI_path_sequence_encode(path, head, tail, numlen, framenr); @@ -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}); |