index-of-nearest-104619 #2

Merged
Iliya Katushenock merged 62 commits from HooglyBoogly/blender:index-of-nearest-104619 into index_of_nearest 2023-04-20 21:19:53 +02:00
Showing only changes of commit 2f4a8ecf18 - Show all commits

View File

@ -509,21 +509,17 @@ GeometrySet spreadsheet_get_display_geometry_set(const SpaceSpreadsheet *sspread
curve_component.replace(&const_cast<Curves &>(curves_id), GeometryOwnershipType::ReadOnly);
}
}
else {
if (object_eval->mode == OB_MODE_EDIT && object_eval->type == OB_MESH) {
Mesh *mesh = BKE_modifier_get_evaluated_mesh_from_evaluated_object(object_eval);
if (mesh == nullptr) {
return geometry_set;
}
BKE_mesh_wrapper_ensure_mdata(mesh);
MeshComponent &mesh_component = geometry_set.get_component_for_write<MeshComponent>();
mesh_component.replace(mesh, GeometryOwnershipType::ReadOnly);
}
else {
if (BLI_listbase_count(&sspreadsheet->viewer_path.path) == 1) {
/* Use final evaluated object. */
if (object_eval->runtime.geometry_set_eval != nullptr) {
geometry_set = *object_eval->runtime.geometry_set_eval;
if (const GeometrySet *geometry_eval = object_eval->runtime.geometry_set_eval) {
geometry_set = *geometry_eval;
}
if (object_eval->mode == OB_MODE_EDIT && object_eval->type == OB_MESH) {
if (Mesh *mesh = BKE_modifier_get_evaluated_mesh_from_evaluated_object(object_eval)) {
BKE_mesh_wrapper_ensure_mdata(mesh);
geometry_set.replace_mesh(mesh, GeometryOwnershipType::ReadOnly);
}
}
}
else {
@ -534,7 +530,6 @@ GeometrySet spreadsheet_get_display_geometry_set(const SpaceSpreadsheet *sspread
}
}
}
}
return geometry_set;
}