Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_mesh_to_volume.cc
| Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | #ifdef WITH_OPENVDB | ||||
| using namespace blender; | using namespace blender; | ||||
| MeshToVolumeModifierData *mvmd = reinterpret_cast<MeshToVolumeModifierData *>(md); | MeshToVolumeModifierData *mvmd = reinterpret_cast<MeshToVolumeModifierData *>(md); | ||||
| Object *object_to_convert = mvmd->object; | Object *object_to_convert = mvmd->object; | ||||
| if (object_to_convert == nullptr) { | if (object_to_convert == nullptr) { | ||||
| return input_volume; | return input_volume; | ||||
| } | } | ||||
| Mesh *mesh = BKE_modifier_get_evaluated_mesh_from_evaluated_object(object_to_convert, false); | Mesh *mesh = BKE_modifier_get_evaluated_mesh_from_evaluated_object(object_to_convert); | ||||
| if (mesh == nullptr) { | if (mesh == nullptr) { | ||||
| return input_volume; | return input_volume; | ||||
| } | } | ||||
| BKE_mesh_wrapper_ensure_mdata(mesh); | BKE_mesh_wrapper_ensure_mdata(mesh); | ||||
| const float4x4 mesh_to_own_object_space_transform = float4x4(ctx->object->imat) * | const float4x4 mesh_to_own_object_space_transform = float4x4(ctx->object->imat) * | ||||
| float4x4(object_to_convert->obmat); | float4x4(object_to_convert->obmat); | ||||
| geometry::MeshToVolumeResolution resolution; | geometry::MeshToVolumeResolution resolution; | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||