浏览代码

Added a .gdignore check to ignore specific folders. Closes #8461

Juan Linietsky 8 年之前
父节点
当前提交
85945e4367
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      editor/editor_file_system.cpp

+ 4 - 0
editor/editor_file_system.cpp

@@ -512,6 +512,8 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess
 
 			if (FileAccess::exists(cd.plus_file(f).plus_file("project.godot"))) // skip if another project inside this
 				continue;
+			if (FileAccess::exists(cd.plus_file(f).plus_file(".gdignore"))) // skip if another project inside this
+				continue;
 
 			dirs.push_back(f);
 
@@ -691,6 +693,8 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const
 
 					if (FileAccess::exists(cd.plus_file(f).plus_file("project.godot"))) // skip if another project inside this
 						continue;
+					if (FileAccess::exists(cd.plus_file(f).plus_file(".gdignore"))) // skip if another project inside this
+						continue;
 
 					EditorFileSystemDirectory *efd = memnew(EditorFileSystemDirectory);