Fix T77603: OSL parser fails when script ends with comment without newline
Reviewers: brecht Differential Revision: https://developer.blender.org/D7958
This commit is contained in:
parent
6f96dfabe5
commit
b5846ebce7
Notes:
blender-bot
2023-02-14 08:06:38 +01:00
Referenced by issue #77603, OSL files fail to compile when shader ends with a comment Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
|
@ -84,7 +84,7 @@ def update_script_node(node, report):
|
|||
if script.is_in_memory or script.is_dirty or script.is_modified or not os.path.exists(osl_path):
|
||||
# write text datablock contents to temporary file
|
||||
osl_file = tempfile.NamedTemporaryFile(mode='w', suffix=".osl", delete=False)
|
||||
osl_file.write(script.as_string())
|
||||
osl_file.write(script.as_string() + "\n")
|
||||
osl_file.close()
|
||||
|
||||
ok, oso_path = osl_compile(osl_file.name, report)
|
||||
|
|
Loading…
Reference in New Issue