Skip to content

Commit

Permalink
merge conflicts?
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilaa3 committed Oct 1, 2024
1 parent acacef7 commit 501232a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
12 changes: 6 additions & 6 deletions fast64_internal/f3d_material_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,16 @@ def convertAllBSDFtoF3D(objs, renameUV):
def convertBSDFtoF3D(obj, index, material, materialDict):
if not material.use_nodes:
newMaterial = createF3DMat(obj, preset="Shaded Solid", index=index)
with bpy.context.temp_override(material=newMaterial):
newMaterial.f3d_mat.default_light_color = material.diffuse_color
f3dMat = newMaterial.f3d_mat if newMaterial.mat_ver > 3 else newMaterial
f3dMat.default_light_color = material.diffuse_color
updateMatWithName(newMaterial, material, materialDict)

elif "Principled BSDF" in material.node_tree.nodes:
tex0Node = material.node_tree.nodes["Principled BSDF"].inputs["Base Color"]
if len(tex0Node.links) == 0:
newMaterial = createF3DMat(obj, preset=getDefaultMaterialPreset("Shaded Solid"), index=index)
with bpy.context.temp_override(material=newMaterial):
newMaterial.f3d_mat.default_light_color = tex0Node.default_value
f3dMat = newMaterial.f3d_mat if newMaterial.mat_ver > 3 else newMaterial
f3dMat.default_light_color = tex0Node.default_value
updateMatWithName(newMaterial, material, materialDict)
else:
if isinstance(tex0Node.links[0].from_node, bpy.types.ShaderNodeTexImage):
Expand All @@ -213,8 +213,8 @@ def convertBSDFtoF3D(obj, index, material, materialDict):
else:
presetName = getDefaultMaterialPreset("Shaded Texture")
newMaterial = createF3DMat(obj, preset=presetName, index=index)
with bpy.context.temp_override(material=newMaterial):
newMaterial.f3d_mat.tex0.tex = tex0Node.links[0].from_node.image
f3dMat = newMaterial.f3d_mat if newMaterial.mat_ver > 3 else newMaterial
f3dMat.tex0.tex = tex0Node.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
10 changes: 0 additions & 10 deletions fast64_internal/oot/oot_utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,16 +496,6 @@ def ootGetObjectHeaderPath(isCustomExport: bool, exportPath: str, folderName: st
return filepath


def ootGetObjectHeaderPath(isCustomExport: bool, exportPath: str, folderName: str) -> str:
if isCustomExport:
filepath = exportPath
else:
filepath = os.path.join(
ootGetPath(exportPath, isCustomExport, "assets/objects/", folderName, False, False), folderName + ".h"
)
return filepath


def ootGetPath(exportPath, isCustomExport, subPath, folderName, makeIfNotExists, useFolderForCustom):
if isCustomExport:
path = bpy.path.abspath(os.path.join(exportPath, (folderName if useFolderForCustom else "")))
Expand Down

0 comments on commit 501232a

Please sign in to comment.