You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to export few materials that were created by the kotorblender plugin and some of those use the emission node in place of the Principled BSDF shader. Every time i hit translate material it throws the following errors:
Python: Traceback (most recent call last):
File "C:\Users\luke\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\TransMat.py", line 614, in execute
to_socket = str(f"'{socket_translate[ID][socket]}'")
KeyError: 'ShaderNodeEmission'
Unfortunately, I'm not sure what support to offer in this case, it has been a few years since I worked on this addon, and I have since stopped working on Epic/Unreal related projects.
I agree with your assessment that there is an issue with translating the Emission node, and I can tell you that the whole addon works via strings in dictionaries, so if there was a change made to one of the strings (e.g. it used to be 'Emission Strength' and now it's just 'Strength') it could cause the errors you are encountering.
I know that's not much help, but there is also an alternative implementation, one that actually inspired this project to begin with, but has been updated more recently: https://github.com/angjminer/blueman
If you want to try and get the code working I can try and help with error codes or explanations, but no longer being an Unreal user that might be the best I can do.
I wanted to export few materials that were created by the kotorblender plugin and some of those use the emission node in place of the Principled BSDF shader. Every time i hit translate material it throws the following errors:
Python: Traceback (most recent call last):
File "C:\Users\luke\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\TransMat.py", line 614, in execute
to_socket = str(f"'{socket_translate[ID][socket]}'")
KeyError: 'ShaderNodeEmission'
location: :-1
and
Python: Traceback (most recent call last):
File "C:\Users\luke\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\TransMat.py", line 485, in execute
nodedata['pln_create'].append( str(f"{nodename}{socket_translate[ID][input.name]} = create_expression({material.name}, unreal.MaterialExpressionConstant, {nodedata['pln_location']}") )
KeyError: 'Emission Strength'
location: :-1 .
here is also the node layout of 2 of the materials if needed

The text was updated successfully, but these errors were encountered: