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

Bug fixes for new panda version and for nodeTree none. #1

Merged
merged 1 commit into from Jul 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 1 addition & 7 deletions yabee_libs/egg_writer.py
Expand Up @@ -1233,7 +1233,7 @@ def get_egg_materials_str(object_names=None):
elif nodeTree.links[0].to_node.name == 'Material Output':
print("INFO: {} is using for!".format(nodeTree.links[0].to_node.name)),
objects = bpy.context.selected_objects
for node in bpy.data.materials[0].node_tree.nodes:
for node in nodeTree.nodes:
if node.name == "Principled BSDF":
principled_bsdf = node
basecol = list(principled_bsdf.inputs["Base Color"].default_value)
Expand Down Expand Up @@ -1278,12 +1278,6 @@ def get_egg_materials_str(object_names=None):
mat_str += ' <Scalar> roughness { %s }\n' % STRF(mat.roughness)
mat_str += ' <Scalar> metallic { %s }\n' % STRF(mat.metallic)
mat_str += ' <Scalar> local { %s }\n' % STRF(0.0)

if TEXTURE_PROCESSOR == 'BAKE' and mat.use_nodes:
mat_str += ' <Scalar> diffr { 1.0 }\n'
mat_str += ' <Scalar> diffg { 1.0 }\n'
mat_str += ' <Scalar> diffb { 1.0 }\n'

mat_str += '}\n\n'

used_textures = {}
Expand Down