Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed tex1 related code from BSDF to F3D converter #296

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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