diff --git a/material_maker/tools/library_manager/library.gd b/material_maker/tools/library_manager/library.gd index 3427c3ee9..88e98f5bb 100644 --- a/material_maker/tools/library_manager/library.gd +++ b/material_maker/tools/library_manager/library.gd @@ -108,7 +108,7 @@ func get_sections() -> Array: return Array(sections) func save_library() -> void: - DirAccess.open("res://").make_dir_recursive(library_path.get_base_dir()) + DirAccess.make_dir_recursive_absolute(library_path.get_base_dir()) var file : FileAccess = FileAccess.open(library_path, FileAccess.WRITE) if file != null: file.store_string(JSON.stringify({name=library_name, lib=library_items}, "\t", true)) diff --git a/material_maker/tools/library_manager/library_manager.gd b/material_maker/tools/library_manager/library_manager.gd index 8591c16e8..da3c24a70 100644 --- a/material_maker/tools/library_manager/library_manager.gd +++ b/material_maker/tools/library_manager/library_manager.gd @@ -40,7 +40,7 @@ func _ready(): func _exit_tree(): if item_usage_file == "": return - DirAccess.open("res://").make_dir_recursive(item_usage_file.get_base_dir()) + DirAccess.make_dir_recursive_absolute(item_usage_file.get_base_dir()) var file = FileAccess.open(item_usage_file, FileAccess.WRITE) if file != null: file.store_string(JSON.stringify(item_usage, "\t", true)) @@ -55,6 +55,7 @@ func init_libraries() -> void: add_child(library) library.generate_node_sections(node_sections) library = LIBRARY.new() + DirAccess.make_dir_recursive_absolute(user_lib.get_base_dir()) if library.load_library(user_lib): if library.library_name == "": library.library_name = user_lib_name