Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/object.cc
| Show First 20 Lines • Show All 3,912 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| bool BKE_object_boundbox_calc_from_evaluated_geometry(Object *ob) | bool BKE_object_boundbox_calc_from_evaluated_geometry(Object *ob) | ||||
| { | { | ||||
| blender::float3 min, max; | blender::float3 min, max; | ||||
| INIT_MINMAX(min, max); | INIT_MINMAX(min, max); | ||||
| if (ob->runtime.geometry_set_eval) { | if (ob->runtime.geometry_set_eval) { | ||||
| ob->runtime.geometry_set_eval->compute_boundbox_without_instances(&min, &max); | if (!ob->runtime.geometry_set_eval->compute_boundbox_without_instances(&min, &max)) { | ||||
| zero_v3(min); | |||||
| zero_v3(max); | |||||
| } | |||||
| } | } | ||||
| else if (const Mesh *mesh_eval = BKE_object_get_evaluated_mesh(ob)) { | else if (const Mesh *mesh_eval = BKE_object_get_evaluated_mesh(ob)) { | ||||
| if (!BKE_mesh_wrapper_minmax(mesh_eval, min, max)) { | if (!BKE_mesh_wrapper_minmax(mesh_eval, min, max)) { | ||||
| return false; | zero_v3(min); | ||||
| zero_v3(max); | |||||
| } | } | ||||
| } | } | ||||
| else if (ob->runtime.curve_cache) { | else if (ob->runtime.curve_cache) { | ||||
| BKE_displist_minmax(&ob->runtime.curve_cache->disp, min, max); | BKE_displist_minmax(&ob->runtime.curve_cache->disp, min, max); | ||||
| } | } | ||||
| else { | else { | ||||
| return false; | return false; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,891 Lines • Show Last 20 Lines | |||||