Fix #107882: Get evaluated mesh from curve object too #107885

Open
Iliya Katushenock wants to merge 4 commits from mod_moder/blender:tmp_fix_get_eval_mesh_from_curves_too into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 7 additions and 1 deletions

View File

@ -4479,7 +4479,13 @@ Mesh *BKE_object_get_evaluated_mesh(const Object *object)
return nullptr;
}
if (object->data && GS(((const ID *)object->data)->name) == ID_ME) {
const ID *object_data = static_cast<const ID *>(object->data);
if (object_data == nullptr) {
return mesh;
}
const ID_Type data_type = GS(object_data->name);
if (ELEM(data_type, ID_ME, ID_CV)) {
mesh = BKE_mesh_wrapper_ensure_subdivision(mesh);
}