diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-07-06 09:35:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-06 09:35:40 +0200 |
commit | cf194847468e00de682074a14b2cf4ccf7b69188 (patch) | |
tree | 4ebf367bf5fe4db50db3342707cfae7c2c5e91d6 /core/core_bind.cpp | |
parent | 398ab31a6bcf1a80a6fc13a56e2f7f8558303d51 (diff) | |
parent | 5ac42cf5766cd60a9c41bdd6045c8ccfd35d62c1 (diff) | |
download | redot-engine-cf194847468e00de682074a14b2cf4ccf7b69188.tar.gz |
Merge pull request #62374 from reduz/implement-bitfield-hint
Implement a BitField hint
Diffstat (limited to 'core/core_bind.cpp')
-rw-r--r-- | core/core_bind.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/core_bind.cpp b/core/core_bind.cpp index 24b27d2692..26ecd41353 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -147,7 +147,7 @@ void ResourceLoader::_bind_methods() { ////// ResourceSaver ////// -Error ResourceSaver::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) { +Error ResourceSaver::save(const String &p_path, const Ref<Resource> &p_resource, BitField<SaverFlags> p_flags) { ERR_FAIL_COND_V_MSG(p_resource.is_null(), ERR_INVALID_PARAMETER, "Can't save empty resource to path '" + String(p_path) + "'."); return ::ResourceSaver::save(p_path, p_resource, p_flags); } @@ -179,14 +179,14 @@ void ResourceSaver::_bind_methods() { ClassDB::bind_method(D_METHOD("add_resource_format_saver", "format_saver", "at_front"), &ResourceSaver::add_resource_format_saver, DEFVAL(false)); ClassDB::bind_method(D_METHOD("remove_resource_format_saver", "format_saver"), &ResourceSaver::remove_resource_format_saver); - BIND_ENUM_CONSTANT(FLAG_NONE); - BIND_ENUM_CONSTANT(FLAG_RELATIVE_PATHS); - BIND_ENUM_CONSTANT(FLAG_BUNDLE_RESOURCES); - BIND_ENUM_CONSTANT(FLAG_CHANGE_PATH); - BIND_ENUM_CONSTANT(FLAG_OMIT_EDITOR_PROPERTIES); - BIND_ENUM_CONSTANT(FLAG_SAVE_BIG_ENDIAN); - BIND_ENUM_CONSTANT(FLAG_COMPRESS); - BIND_ENUM_CONSTANT(FLAG_REPLACE_SUBRESOURCE_PATHS); + BIND_BITFIELD_FLAG(FLAG_NONE); + BIND_BITFIELD_FLAG(FLAG_RELATIVE_PATHS); + BIND_BITFIELD_FLAG(FLAG_BUNDLE_RESOURCES); + BIND_BITFIELD_FLAG(FLAG_CHANGE_PATH); + BIND_BITFIELD_FLAG(FLAG_OMIT_EDITOR_PROPERTIES); + BIND_BITFIELD_FLAG(FLAG_SAVE_BIG_ENDIAN); + BIND_BITFIELD_FLAG(FLAG_COMPRESS); + BIND_BITFIELD_FLAG(FLAG_REPLACE_SUBRESOURCE_PATHS); } ////// OS ////// |