diff options
| author | Juan Linietsky | 2014-06-30 01:28:05 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2014-06-30 01:28:05 -0300 |
| commit | ff5a815523b3bb69674f7d678e9d03278ed5ec30 (patch) | |
| tree | 63ed95eaadde91d6040a9a7c8668df4828d9c2b9 /core/resource.cpp | |
| parent | 7bb5693094b0c624d761cf2044258ea5a21fff4d (diff) | |
| download | godot-ff5a815523b3bb69674f7d678e9d03278ed5ec30.tar.gz godot-ff5a815523b3bb69674f7d678e9d03278ed5ec30.tar.zst godot-ff5a815523b3bb69674f7d678e9d03278ed5ec30.zip | |
Diffstat (limited to 'core/resource.cpp')
| -rw-r--r-- | core/resource.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/core/resource.cpp b/core/resource.cpp index ccfeaa6bb..987bd772b 100644 --- a/core/resource.cpp +++ b/core/resource.cpp @@ -245,11 +245,23 @@ Ref<Resource> Resource::duplicate(bool p_subresources) { } +void Resource::_set_path(const String& p_path) { + + set_path(p_path,false); +} + +void Resource::_take_over_path(const String& p_path) { + + set_path(p_path,true); +} + + void Resource::_bind_methods() { - ObjectTypeDB::bind_method(_MD("set_path","path"),&Resource::set_path); + ObjectTypeDB::bind_method(_MD("set_path","path"),&Resource::_set_path); + ObjectTypeDB::bind_method(_MD("take_over_path","path"),&Resource::_take_over_path); ObjectTypeDB::bind_method(_MD("get_path"),&Resource::get_path); - ObjectTypeDB::bind_method(_MD("set_name","name","take_over"),&Resource::set_name,DEFVAL(false)); + ObjectTypeDB::bind_method(_MD("set_name","name"),&Resource::set_name); ObjectTypeDB::bind_method(_MD("get_name"),&Resource::get_name); ObjectTypeDB::bind_method(_MD("get_rid"),&Resource::get_rid); ObjectTypeDB::bind_method(_MD("set_import_metadata","metadata"),&Resource::set_import_metadata); |
