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

transmat crashing on the emission settings and when the emission node is in the material #2

Open
darthron1975 opened this issue Oct 25, 2023 · 1 comment

Comments

@darthron1975
Copy link

darthron1975 commented Oct 25, 2023

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
Screenshot (10)

Screenshot (11)

@SpectralVectors
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants