main sync #3

Merged
Patrick Busch merged 318 commits from blender/blender:main into main 2023-03-17 15:52:21 +01:00
2 changed files with 3 additions and 0 deletions
Showing only changes of commit 0fe006eec5 - Show all commits

View File

@ -671,6 +671,7 @@ class ShaderImageTextureWrapper():
tree.links.new(node_image.outputs["Alpha" if self.use_alpha else "Color"], self.socket_dst) tree.links.new(node_image.outputs["Alpha" if self.use_alpha else "Color"], self.socket_dst)
if self.use_alpha: if self.use_alpha:
self.owner_shader.material.blend_method = 'BLEND' self.owner_shader.material.blend_method = 'BLEND'
self.owner_shader.material.show_transparent_back = False
self._node_image = node_image self._node_image = node_image
return self._node_image return self._node_image

View File

@ -315,6 +315,7 @@ static void set_bsdf_socket_values(bNode *bsdf, Material *mat, const MTLMaterial
} }
if (do_tranparency || (alpha >= 0.0f && alpha < 1.0f)) { if (do_tranparency || (alpha >= 0.0f && alpha < 1.0f)) {
mat->blend_method = MA_BM_BLEND; mat->blend_method = MA_BM_BLEND;
mat->blend_flag |= MA_BL_HIDE_BACKFACE;
} }
if (mtl_mat.sheen >= 0) { if (mtl_mat.sheen >= 0) {
@ -393,6 +394,7 @@ static void add_image_textures(Main *bmain,
else if (key == int(MTLTexMapType::Alpha)) { else if (key == int(MTLTexMapType::Alpha)) {
link_sockets(ntree, image_node, "Alpha", bsdf, tex_map_type_to_socket_id[key]); link_sockets(ntree, image_node, "Alpha", bsdf, tex_map_type_to_socket_id[key]);
mat->blend_method = MA_BM_BLEND; mat->blend_method = MA_BM_BLEND;
mat->blend_flag |= MA_BL_HIDE_BACKFACE;
} }
else { else {
link_sockets(ntree, image_node, "Color", bsdf, tex_map_type_to_socket_id[key]); link_sockets(ntree, image_node, "Color", bsdf, tex_map_type_to_socket_id[key]);