summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/editor_file_system.cpp12
-rw-r--r--editor/editor_file_system.h2
-rw-r--r--editor/filesystem_dock.cpp4
-rw-r--r--modules/csg/csg_shape.cpp2
4 files changed, 16 insertions, 4 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index 59d3b09678..495bdd42f7 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -68,6 +68,11 @@ int EditorFileSystemDirectory::find_dir_index(const String &p_dir) const {
return -1;
}
+void EditorFileSystemDirectory::force_update() {
+ // We set modified_time to 0 to force `EditorFileSystem::_scan_fs_changes` to search changes in the directory
+ modified_time = 0;
+}
+
int EditorFileSystemDirectory::get_subdir_count() const {
return subdirs.size();
}
@@ -854,9 +859,11 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const
//then scan files and directories and check what's different
- DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
+ DirAccessRef da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
+
+ Error ret = da->change_dir(cd);
+ ERR_FAIL_COND_MSG(ret != OK, "Cannot change to '" + cd + "' folder.");
- da->change_dir(cd);
da->list_dir_begin();
while (true) {
String f = da->get_next();
@@ -944,7 +951,6 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const
}
da->list_dir_end();
- memdelete(da);
}
for (int i = 0; i < p_dir->files.size(); i++) {
diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h
index 9c9076106c..855c320856 100644
--- a/editor/editor_file_system.h
+++ b/editor/editor_file_system.h
@@ -102,6 +102,8 @@ public:
int find_file_index(const String &p_file) const;
int find_dir_index(const String &p_dir) const;
+ void force_update();
+
EditorFileSystemDirectory();
~EditorFileSystemDirectory();
};
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 899070f036..09424647fe 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -1465,6 +1465,10 @@ void FileSystemDock::_folder_removed(String p_folder) {
}
current_path->set_text(path);
+ EditorFileSystemDirectory *efd = EditorFileSystem::get_singleton()->get_filesystem_path(path);
+ if (efd) {
+ efd->force_update();
+ }
}
void FileSystemDock::_rename_operation_confirm() {
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp
index e448891eb6..541b7036ac 100644
--- a/modules/csg/csg_shape.cpp
+++ b/modules/csg/csg_shape.cpp
@@ -2229,7 +2229,7 @@ void CSGPolygon3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_depth", "get_depth");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spin_degrees", PROPERTY_HINT_RANGE, "1,360,0.1"), "set_spin_degrees", "get_spin_degrees");
ADD_PROPERTY(PropertyInfo(Variant::INT, "spin_sides", PROPERTY_HINT_RANGE, "3,64,1"), "set_spin_sides", "get_spin_sides");
- ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "path_node", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "Path"), "set_path_node", "get_path_node");
+ ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "path_node", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "Path3D"), "set_path_node", "get_path_node");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "path_interval", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_path_interval", "get_path_interval");
ADD_PROPERTY(PropertyInfo(Variant::INT, "path_rotation", PROPERTY_HINT_ENUM, "Polygon,Path,PathFollow"), "set_path_rotation", "get_path_rotation");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "path_local"), "set_path_local", "is_path_local");