Skip to content

Commit

Permalink
Update model_build.py
Browse files Browse the repository at this point in the history
  • Loading branch information
iCyP committed Jun 4, 2019
1 parent 2a8980b commit 244886d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion importer/model_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,12 @@ def connect_texture_node(self,material,tex_index,color_socket_to_connect = None,
sampler = self.vrm_pydata.json["samplers"][tex["sampler"]] if "samplers" in self.vrm_pydata.json else [{"wrapS":GL_CONSTANS.REPEAT,"magFilter":GL_CONSTANS.LINEAR}]
image_node = material.node_tree.nodes.new("ShaderNodeTexImage")
image_node.image = self.textures[tex["source"]].image
image_node.label = color_socket_to_connect.name
if color_socket_to_connect is not None:
image_node.label = color_socket_to_connect.name
elif alpha_socket_to_connect is not None:
image_node.label = alpha_socket_to_connect.name
else:
image_node.label = "what_is_this_node"
#blender is ('Linear', 'Closest', 'Cubic', 'Smart') gltf is Linear, Closest
filter_type = sampler["magFilter"] if "magFilter" in sampler else GL_CONSTANS.LINEAR
if filter_type == GL_CONSTANS.NEAREST:
Expand Down

0 comments on commit 244886d

Please sign in to comment.