Merge pull request #35 from Calinou/add-more-image-formats

Add support for loading additional image formats
This commit is contained in:
Rodz Labs 2019-10-20 23:01:31 +02:00 committed by GitHub
commit 1eeb3113cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -196,7 +196,7 @@ func load_material():
dialog.rect_min_size = Vector2(500, 500)
dialog.access = FileDialog.ACCESS_FILESYSTEM
dialog.mode = FileDialog.MODE_OPEN_FILES
dialog.add_filter("*.ptex;Procedural textures file")
dialog.add_filter("*.ptex;Procedural Textures File")
dialog.connect("files_selected", self, "do_load_materials")
dialog.popup_centered()
@ -235,7 +235,7 @@ func save_material_as():
dialog.rect_min_size = Vector2(500, 500)
dialog.access = FileDialog.ACCESS_FILESYSTEM
dialog.mode = FileDialog.MODE_SAVE_FILE
dialog.add_filter("*.ptex;Procedural textures file")
dialog.add_filter("*.ptex;Procedural Textures File")
dialog.connect("file_selected", graph_edit, "save_file")
dialog.popup_centered()

View File

@ -24,7 +24,11 @@ func _on_TextureButton_pressed():
dialog.rect_min_size = Vector2(500, 500)
dialog.access = FileDialog.ACCESS_FILESYSTEM
dialog.mode = FileDialog.MODE_OPEN_FILE
dialog.add_filter("*.png;PNG image")
dialog.add_filter("*.jpg;JPG image")
dialog.add_filter("*.bmp;BMP Image")
dialog.add_filter("*.hdr;Radiance HDR Image")
dialog.add_filter("*.jpg,*.jpeg;JPEG Image")
dialog.add_filter("*.png;PNG Image")
dialog.add_filter("*.tga;TGA Image")
dialog.add_filter("*.webp;WebP Image")
dialog.connect("file_selected", self, "set_texture")
dialog.popup_centered()