summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/bind/core_bind.cpp6
-rw-r--r--core/bind/core_bind.h1
-rw-r--r--core/error_macros.h5
-rw-r--r--core/global_constants.cpp1
-rw-r--r--core/register_core_types.cpp3
5 files changed, 15 insertions, 1 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 229640ba11..aff047177c 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -55,11 +55,17 @@ bool _ResourceLoader::has(const String &p_path) {
return ResourceCache::has(local_path);
};
+Ref<ResourceImportMetadata> _ResourceLoader::load_import_metadata(const String& p_path) {
+
+ return ResourceLoader::load_import_metadata(p_path);
+}
+
void _ResourceLoader::_bind_methods() {
ObjectTypeDB::bind_method(_MD("load_interactive:ResourceInteractiveLoader","path","type_hint"),&_ResourceLoader::load_interactive,DEFVAL(""));
ObjectTypeDB::bind_method(_MD("load:Resource","path","type_hint", "p_no_cache"),&_ResourceLoader::load,DEFVAL(""), DEFVAL(false));
+ ObjectTypeDB::bind_method(_MD("load_import_metadata:ResourceImportMetadata","path"),&_ResourceLoader::load_import_metadata);
ObjectTypeDB::bind_method(_MD("get_recognized_extensions_for_type","type"),&_ResourceLoader::get_recognized_extensions_for_type);
ObjectTypeDB::bind_method(_MD("set_abort_on_missing_resources","abort"),&_ResourceLoader::set_abort_on_missing_resources);
ObjectTypeDB::bind_method(_MD("get_dependencies","path"),&_ResourceLoader::get_dependencies);
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 4a9bb2a961..2c43390d3c 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -26,6 +26,7 @@ public:
void set_abort_on_missing_resources(bool p_abort);
StringArray get_dependencies(const String& p_path);
bool has(const String& p_path);
+ Ref<ResourceImportMetadata> load_import_metadata(const String& p_path);
_ResourceLoader();
};
diff --git a/core/error_macros.h b/core/error_macros.h
index cafbf0c16e..47b1de5df3 100644
--- a/core/error_macros.h
+++ b/core/error_macros.h
@@ -223,5 +223,10 @@ extern bool _err_error_exists;
} \
+#define WARN_PRINTS(m_string) \
+ { \
+ _err_print_error(FUNCTION_STR,__FILE__,__LINE__,String(m_string).utf8().get_data(),ERR_HANDLER_WARNING); \
+ _err_error_exists=false;\
+ } \
#endif
diff --git a/core/global_constants.cpp b/core/global_constants.cpp
index a183255b06..130fca1b2a 100644
--- a/core/global_constants.cpp
+++ b/core/global_constants.cpp
@@ -432,6 +432,7 @@ static _GlobalConstant _global_constants[]={
BIND_GLOBAL_CONSTANT( ERR_FILE_EOF ),
BIND_GLOBAL_CONSTANT( ERR_CANT_OPEN ), ///< Can't open a resource/socket/file
BIND_GLOBAL_CONSTANT( ERR_CANT_CREATE ),
+ BIND_GLOBAL_CONSTANT( ERR_PARSE_ERROR ),
BIND_GLOBAL_CONSTANT( ERROR_QUERY_FAILED ),
BIND_GLOBAL_CONSTANT( ERR_ALREADY_IN_USE ),
BIND_GLOBAL_CONSTANT( ERR_LOCKED ), ///< resource is locked
diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp
index d977ea3e18..54431cf381 100644
--- a/core/register_core_types.cpp
+++ b/core/register_core_types.cpp
@@ -51,6 +51,7 @@
#include "packed_data_container.h"
#include "func_ref.h"
#include "input_map.h"
+#include "undo_redo.h"
#ifdef XML_ENABLED
static ResourceFormatSaverXML *resource_saver_xml=NULL;
@@ -128,7 +129,7 @@ void register_core_types() {
// ObjectTypeDB::register_type<OptimizedSaver>();
ObjectTypeDB::register_type<Translation>();
ObjectTypeDB::register_type<PHashTranslation>();
-
+ ObjectTypeDB::register_type<UndoRedo>();
ObjectTypeDB::register_type<HTTPClient>();
ObjectTypeDB::register_virtual_type<ResourceInteractiveLoader>();