2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 13:44:56 +00:00

Support for diffuse texture identification in IR

This commit is contained in:
Jack Andersen
2019-02-23 21:14:43 -10:00
parent d13bd28281
commit 470182de06
14 changed files with 88 additions and 26 deletions

View File

@@ -130,14 +130,18 @@ def recursive_color_trace(mat_obj, mesh_obj, tex_list, node, socket=None):
else:
raise RuntimeError("Only the 'UV', 'Normal' and 'View' sockets may be used from 'Geometry' nodes")
call_name = 'Texture'
if node.label.startswith('Diffuse'):
call_name = 'TextureD'
if socket.name == 'Value':
if matrix_str:
uvsource_str = matrix_str % uvsource_str
return 'Texture(%d, %s).aaa' % (get_texmap_idx(tex_list, node.texture.name), uvsource_str)
return '%s(%d, %s).aaa' % (call_name, get_texmap_idx(tex_list, node.texture.name), uvsource_str)
if socket.name == 'Color':
if matrix_str:
uvsource_str = matrix_str % uvsource_str
return 'Texture(%d, %s)' % (get_texmap_idx(tex_list, node.texture.name), uvsource_str)
return '%s(%d, %s)' % (call_name, get_texmap_idx(tex_list, node.texture.name), uvsource_str)
else:
raise RuntimeError("Only the 'Value' or 'Color' output sockets may be used from Texture nodes")