mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Swap arguments of ResourceSaver.save()
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
#include "scene/resources/texture.h"
|
||||
#include "webp_common.h"
|
||||
|
||||
Error ResourceSaverWebP::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) {
|
||||
Error ResourceSaverWebP::save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags) {
|
||||
Ref<ImageTexture> texture = p_resource;
|
||||
|
||||
ERR_FAIL_COND_V_MSG(!texture.is_valid(), ERR_INVALID_PARAMETER, "Can't save invalid texture as WEBP.");
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
static Error save_image(const String &p_path, const Ref<Image> &p_img, const bool p_lossy = false, const float p_quality = 0.75f);
|
||||
static Vector<uint8_t> save_image_to_buffer(const Ref<Image> &p_img, const bool p_lossy = false, const float p_quality = 0.75f);
|
||||
|
||||
virtual Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0);
|
||||
virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0);
|
||||
virtual bool recognize(const Ref<Resource> &p_resource) const;
|
||||
virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user