Fix #120721: Collada: Import with loose edges not immediately show them

Exposed by 1ea169d90e

Colladas `MeshImporter::mesh_add_edges` is a copy from `mesh_add_edges`
in `source/blender/editors/mesh/mesh_data.cc` (done in 2c05190374 --
there is a comment to deduplicate this into BKE, but this wont be done
in this patch).

However, as time passed there have been additions to the later, namely:

- 353fe610ed (clearing the mesh runtime caches)
- 12becbf0df (altering selection handling, guess this can be ignored
here since collada generally does not seem to select geometry)

So in order to resolve, now also clear the caches for collada as in
353fe610ed (even though just the subset of just `mesh->runtime-
>loose_edges_cache.tag_dirty()` would also be enough).

Pull Request: https://projects.blender.org/blender/blender/pulls/120737
This commit is contained in:
Philipp Oeser 2024-04-17 14:21:08 +02:00
parent 50e29a1522
commit 8e0032781b

View file

@ -23,6 +23,7 @@
#include "BKE_lib_id.h"
#include "BKE_material.h"
#include "BKE_mesh.hh"
#include "BKE_mesh_runtime.h"
#include "BKE_object.h"
#include "BLI_edgehash.h"
@ -560,6 +561,7 @@ void MeshImporter::mesh_add_edges(Mesh *mesh, int len)
CustomData_free(&mesh->edata, mesh->totedge);
mesh->edata = edata;
mesh->totedge = totedge;
BKE_mesh_runtime_clear_cache(mesh);
}
void MeshImporter::read_lines(COLLADAFW::Mesh *mesh, Mesh *me)