Merge pull request #263 from Jason0214/fix_default_uv

Use UV for image texture with no tex coord input
This commit is contained in:
Lu Jiacheng
2019-08-18 22:54:17 -06:00
committed by GitHub

View File

@@ -760,9 +760,7 @@ class ImageTextureNodeConverter(NodeConverterBase):
tex_coord_socket = self.bl_node.inputs[0]
tex_coord = self.in_sockets_map[tex_coord_socket]
if not tex_coord_socket.is_linked:
# default to use generated texture coordinates
self.flags.aabb_tex_coord_used = True
self.local_code.append("%s = %s" % (tex_coord, self.AABB_UVW))
self.local_code.append("%s = vec3UV, 0.0" % tex_coord)
tex_var = self.generate_tmp_texture_id(self.bl_node.name)
if self.bl_node.image is not None: