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

Blender 4.0 support #347

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions phobos/blender/io/blender2phobos.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def deriveMaterial(mat, logging=False, errors=None):
transparency = mat.node_tree.nodes["Specular BSDF"].inputs["Transparency"].default_value
elif "Principled BSDF" in mat.node_tree.nodes.keys():
diffuse_color = mat.node_tree.nodes["Principled BSDF"].inputs["Base Color"].default_value
specular_color = np.array(diffuse_color) * mat.node_tree.nodes["Principled BSDF"].inputs["Specular"].default_value
emissive = np.array(mat.node_tree.nodes["Principled BSDF"].inputs["Emission"].default_value)
specular_color = np.array(diffuse_color) * mat.node_tree.nodes["Principled BSDF"].inputs["Specular Tint"].default_value
emissive = np.array(mat.node_tree.nodes["Principled BSDF"].inputs["Emission Color"].default_value)
shininess = 1-mat.node_tree.nodes["Principled BSDF"].inputs["Roughness"].default_value
transparency = 1-mat.node_tree.nodes["Principled BSDF"].inputs["Alpha"].default_value
if diffuse_color is None:
Expand Down