Skip to content

Commit

Permalink
fix(material): disable export of diffuse color when a texture or emis…
Browse files Browse the repository at this point in the history
…sive map is selected

fix #173 close #174
  • Loading branch information
StjerneIdioten committed Sep 29, 2023
1 parent 9345343 commit 6c9f393
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions addon/i3dio/node_classes/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,11 @@ def _diffuse_from_nodes(self, node):
file_id = self.i3d.add_file_image(diffuse_image_path)
self.xml_elements['Texture'] = xml_i3d.SubElement(self.element, 'Texture')
self._write_attribute('fileId', file_id, 'Texture')
# Write the diffuse colors
self._write_diffuse(diffuse)
else:
# Write the diffuse colors
emission_socket = node.inputs['Emission']
if not emission_socket.is_linked:
self._write_diffuse(diffuse)

def _emissive_from_nodes(self, node):
emission_socket = node.inputs['Emission']
Expand Down

0 comments on commit 6c9f393

Please sign in to comment.