Skip to content

Commit

Permalink
bake without lbs installed
Browse files Browse the repository at this point in the history
  • Loading branch information
FlailingFog committed Jul 17, 2023
1 parent ecad6a1 commit cf9a8fd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions exporting/bakematerials.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,11 @@ def execute(self, context):
for mat in bpy.data.materials:
if mat.node_tree:
if mat.node_tree.nodes.get('Rim'):
if mat.node_tree.nodes['Rim'].node_tree == bpy.data.node_groups['LBS']:
mat.node_tree.nodes['Rim'].node_tree = bpy.data.node_groups['Rim: None']
links = mat.node_tree.links
links.new(mat.node_tree.nodes['Shader'].outputs[0], mat.node_tree.nodes['Rim'].inputs[0]) #connect color out to rim input
if bpy.data.node_groups.get('LBS'):
if mat.node_tree.nodes['Rim'].node_tree == bpy.data.node_groups['LBS']:
mat.node_tree.nodes['Rim'].node_tree = bpy.data.node_groups['Rim: None']
links = mat.node_tree.links
links.new(mat.node_tree.nodes['Shader'].outputs[0], mat.node_tree.nodes['Rim'].inputs[0]) #connect color out to rim input
print(self.directory)
folderpath = self.directory
scene = context.scene.kkbp
Expand Down

0 comments on commit cf9a8fd

Please sign in to comment.