Skip to content

Commit

Permalink
Removed tex1 related code from BSDF to F3D converter (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurethedead authored Jan 22, 2024
1 parent b8b458b commit 5d8c835
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions fast64_internal/f3d_material_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ def convertBSDFtoF3D(obj, index, material, materialDict):

elif "Principled BSDF" in material.node_tree.nodes:
tex0Node = material.node_tree.nodes["Principled BSDF"].inputs["Base Color"]
tex1Node = material.node_tree.nodes["Principled BSDF"].inputs["Subsurface Color"]
if len(tex0Node.links) == 0:
newMaterial = createF3DMat(obj, preset=getDefaultMaterialPreset("Shaded Solid"), index=index)
f3dMat = newMaterial.f3d_mat if newMaterial.mat_ver > 3 else newMaterial
Expand All @@ -226,8 +225,6 @@ def convertBSDFtoF3D(obj, index, material, materialDict):
newMaterial = createF3DMat(obj, preset=presetName, index=index)
f3dMat = newMaterial.f3d_mat if newMaterial.mat_ver > 3 else newMaterial
f3dMat.tex0.tex = tex0Node.links[0].from_node.image
if len(tex1Node.links) > 0 and isinstance(tex1Node.links[0].from_node, bpy.types.ShaderNodeTexImage):
f3dMat.tex1.tex = tex1Node.links[0].from_node.image
updateMatWithName(newMaterial, material, materialDict)
else:
print("Principled BSDF material does not have an Image Node attached to its Base Color.")
Expand Down

0 comments on commit 5d8c835

Please sign in to comment.