You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 19:31:35 +00:00
rename String.extension() -> String.get_extension() / String.basename() -> String.get_basename()
This commit is contained in:
@@ -421,7 +421,7 @@ void AnimationPlayerEditor::_animation_save_as(const Ref<Resource>& p_resource)
|
||||
if (p_resource->get_path() != "") {
|
||||
file->set_current_path(p_resource->get_path());
|
||||
if (extensions.size()) {
|
||||
String ext = p_resource->get_path().extension().to_lower();
|
||||
String ext = p_resource->get_path().get_extension().to_lower();
|
||||
if (extensions.find(ext) == NULL) {
|
||||
file->set_current_path(p_resource->get_path().replacen("." + ext, "." + extensions.front()->get()));
|
||||
}
|
||||
|
||||
@@ -3734,7 +3734,7 @@ bool CanvasItemEditorViewport::_cyclical_dependency_exists(const String& p_targe
|
||||
}
|
||||
|
||||
void CanvasItemEditorViewport::_create_nodes(Node* parent, Node* child, String& path, const Point2& p_point) {
|
||||
child->set_name(path.get_file().basename());
|
||||
child->set_name(path.get_file().get_basename());
|
||||
Ref<ImageTexture> texture=Ref<ImageTexture> ( ResourceCache::get(path)->cast_to<ImageTexture>() );
|
||||
Size2 texture_size = texture->get_size();
|
||||
|
||||
@@ -3875,7 +3875,7 @@ void CanvasItemEditorViewport::_perform_drop_data(){
|
||||
if (error_files.size()>0) {
|
||||
String files_str;
|
||||
for (int i=0;i<error_files.size();i++) {
|
||||
files_str += error_files[i].get_file().basename() + ",";
|
||||
files_str += error_files[i].get_file().get_basename() + ",";
|
||||
}
|
||||
files_str=files_str.substr(0,files_str.length()-1);
|
||||
accept->get_ok()->set_text(TTR("Ugh"));
|
||||
|
||||
@@ -79,7 +79,7 @@ void ResourcePreloaderEditor::_files_load_request(const Vector<String>& p_paths)
|
||||
}
|
||||
|
||||
|
||||
String basename = path.get_file().basename();
|
||||
String basename = path.get_file().get_basename();
|
||||
String name=basename;
|
||||
int counter=1;
|
||||
while(preloader->has_resource(name)) {
|
||||
@@ -347,7 +347,7 @@ void ResourcePreloaderEditor::drop_data_fw(const Point2& p_point,const Variant&
|
||||
if (r->get_name()!="") {
|
||||
basename=r->get_name();
|
||||
} else if (r->get_path().is_resource_file()) {
|
||||
basename = r->get_path().basename();
|
||||
basename = r->get_path().get_basename();
|
||||
} else {
|
||||
basename="Resource";
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ void SampleLibraryEditor::_file_load_request(const PoolVector<String>& p_path) {
|
||||
dialog->popup_centered_minsize();
|
||||
return; ///beh should show an error i guess
|
||||
}
|
||||
String basename = path.get_file().basename();
|
||||
String basename = path.get_file().get_basename();
|
||||
String name=basename;
|
||||
int counter=0;
|
||||
while(sample_library->has_sample(name)) {
|
||||
@@ -376,7 +376,7 @@ void SampleLibraryEditor::drop_data_fw(const Point2& p_point,const Variant& p_da
|
||||
if (sample->get_name()!="") {
|
||||
basename=sample->get_name();
|
||||
} else if (sample->get_path().is_resource_file()) {
|
||||
basename = sample->get_path().basename();
|
||||
basename = sample->get_path().get_basename();
|
||||
} else {
|
||||
basename="Sample";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user