Fix MeshLibrary editor not properly handling read-only libs

(cherry picked from commit b9c1a90efae7b1643da1450f44e86f4fffdba34e)
This commit is contained in:
Michael Alexsander authored and Thaddeus Crews committed 2026-06-30 09:28:40 -05:00
1 parent 8efa5c1930
commit fa145a756a
1 file changed
+6
@@ -168,6 +168,12 @@ void MeshLibraryEditor::edit(const Ref<MeshLibrary> &p_mesh_library) {
// Avoid updating multiple times at once.
mesh_library->connect_changed(callable_mp(update_items_delay, &Timer::start).bind(UPDATE_ITEMS_DELAY_TIMEOUT));
_update_mesh_items();
bool read_only = EditorNode::get_singleton()->is_resource_read_only(mesh_library);
add_item->set_disabled(read_only);
remove_item->set_disabled(read_only);
import_scene->set_disabled(read_only);
inspector->set_read_only(read_only);
}
}