diff --git a/source/blender/modifiers/intern/MOD_volume_displace.cc b/source/blender/modifiers/intern/MOD_volume_displace.cc index 6d1ec283f5f..11007234f54 100644 --- a/source/blender/modifiers/intern/MOD_volume_displace.cc +++ b/source/blender/modifiers/intern/MOD_volume_displace.cc @@ -119,12 +119,12 @@ static void panel_register(ARegionType *region_type) #ifdef WITH_OPENVDB -static openvdb::Mat4s matrix_to_openvdb(const float m[4][4]) +static openvdb::Mat4s matrix_to_openvdb(const blender::float4x4 &m) { /* OpenVDB matrices are transposed Blender matrices, i.e. the translation is in the last row * instead of in the last column. However, the layout in memory is the same, because OpenVDB * matrices are row major (compared to Blender's column major matrices). */ - openvdb::Mat4s new_matrix{reinterpret_cast(m)}; + openvdb::Mat4s new_matrix{m.base_ptr()}; return new_matrix; } @@ -250,18 +250,16 @@ struct DisplaceGridOp { return index_to_object; } case MOD_VOLUME_DISPLACE_MAP_GLOBAL: { - const openvdb::Mat4s object_to_world = matrix_to_openvdb( - ctx.object->object_to_world().ptr()); + const openvdb::Mat4s object_to_world = matrix_to_openvdb(ctx.object->object_to_world()); return index_to_object * object_to_world; } case MOD_VOLUME_DISPLACE_MAP_OBJECT: { if (vdmd.texture_map_object == nullptr) { return index_to_object; } - const openvdb::Mat4s object_to_world = matrix_to_openvdb( - ctx.object->object_to_world().ptr()); + const openvdb::Mat4s object_to_world = matrix_to_openvdb(ctx.object->object_to_world()); const openvdb::Mat4s world_to_texture = matrix_to_openvdb( - vdmd.texture_map_object->world_to_object().ptr()); + vdmd.texture_map_object->world_to_object()); return index_to_object * object_to_world * world_to_texture; } }