Fix: Transform geometry node doesn't translate volumes correctly
Fixes a bug introduced in b0b9e746fa.
The volume transformation matrix is multiplied in the wrong order
which means the grid scale is applied on the translation.
This commit is contained in:
@@ -132,7 +132,7 @@ static void transform_volume(GeoNodeExecParams ¶ms,
|
||||
VolumeGrid *volume_grid = BKE_volume_grid_get_for_write(&volume, i);
|
||||
float4x4 grid_matrix;
|
||||
BKE_volume_grid_transform_matrix(volume_grid, grid_matrix.ptr());
|
||||
grid_matrix *= transform;
|
||||
grid_matrix = transform * grid_matrix;
|
||||
const float determinant = math::determinant(grid_matrix);
|
||||
if (!BKE_volume_grid_determinant_valid(determinant)) {
|
||||
found_too_small_scale = true;
|
||||
|
||||
Reference in New Issue
Block a user