Store shader directory as working directory and use this as the root for relative uniform image imports via !load directive, drop Windows compatibility - solves #7

This commit is contained in:
ChaoticByte 2024-06-21 10:33:34 +02:00
parent b307635c09
commit 367dbe163c
No known key found for this signature in database
6 changed files with 18 additions and 67 deletions

View file

@ -14,6 +14,7 @@ func _on_open_image_button_pressed():
ui_control_fileopen.show()
func _on_open_image_dialog_file_selected(path):
print("Load ", path)
var img = Image.new()
var err = img.load(path)
if err == OK:
@ -30,6 +31,7 @@ func _on_save_image_button_pressed():
ui_control_filesave.show()
func _on_save_image_dialog_file_selected(path):
print("Export ", path)
var err = image_viewport.get_result().save_png(path)
if err != OK:
print("An error occured!")