Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/object.cc
| Show First 20 Lines • Show All 5,509 Lines • ▼ Show 20 Lines | |||||
| /** \name Object Conversion | /** \name Object Conversion | ||||
| * \{ */ | * \{ */ | ||||
| Mesh *BKE_object_to_mesh(Depsgraph *depsgraph, Object *object, bool preserve_all_data_layers) | Mesh *BKE_object_to_mesh(Depsgraph *depsgraph, Object *object, bool preserve_all_data_layers) | ||||
| { | { | ||||
| BKE_object_to_mesh_clear(object); | BKE_object_to_mesh_clear(object); | ||||
| Mesh *mesh = BKE_mesh_new_from_object(depsgraph, object, preserve_all_data_layers, false); | Mesh *mesh = BKE_mesh_new_from_object(depsgraph, object, preserve_all_data_layers, false); | ||||
| if (object->type == OB_MESH) { | |||||
| mesh = BKE_mesh_wrapper_ensure_subdivision(object, mesh); | |||||
| } | |||||
| object->runtime.object_as_temp_mesh = mesh; | object->runtime.object_as_temp_mesh = mesh; | ||||
| return mesh; | return mesh; | ||||
| } | } | ||||
| void BKE_object_to_mesh_clear(Object *object) | void BKE_object_to_mesh_clear(Object *object) | ||||
| { | { | ||||
| if (object->runtime.object_as_temp_mesh == nullptr) { | if (object->runtime.object_as_temp_mesh == nullptr) { | ||||
| return; | return; | ||||
| ▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines | |||||