Fix T48236: OpenVDB smoke cache glitches out with smokeless flames.

Issue was that before writing to disk grids are clipped against the
density field's tree to optimize for memory/disk space, which in the
case of simulations with no density field results in all grids having
empty trees.

For now avoid clipping against empty grids, but perhaps in the future it
can be interresting to have some UI parameters to let the user choose
the grid used for clipping.
This commit is contained in:
Kévin Dietrich 2016-04-22 11:46:02 +02:00
parent 87dcee0c0c
commit a9729e6d75
2 changed files with 4 additions and 2 deletions

@ -115,7 +115,8 @@ openvdb::GridBase *OpenVDB_export_vector_grid(
vecgrid->setTransform(transform);
if (mask) {
/* Avoid clipping against an empty grid. */
if (mask && !mask->tree().empty()) {
vecgrid = tools::clip(*vecgrid, *mask);
}

@ -64,7 +64,8 @@ GridType *OpenVDB_export_grid(
grid->setTransform(transform);
if (mask) {
/* Avoid clipping against an empty grid. */
if (mask && !mask->tree().empty()) {
grid = tools::clip(*grid, *mask);
}