typed()
method.
it hinders reusability of grids
Can you explain this some more? The code comment says it's just a wrapper around grid metadata to avoid a string copy. It's only used for logging and when…
Oh sorry, i was getting confused by the cast direction. Moved this to the constructor.
Maybe the constructor should also be private so that one is forced to call typed()? Yes the constructor…
typed()
method.
Not sure what you mean, the snippet above is in the constructor.
if (*this) {
this->get()->add_user();
}
return VolumeGridPtr<T>(*this);
Should be fixed now. The BKE_volume_grid_get_for_write
function makes sure the data is mutable and otherwise creates a copy. Accessing OpenVDB grids asserts that the data is mutable before…
That would be the case for getting a VolumeGrid
from Volume
, but not for accessing the openvdb::GridBase
from VolumeGrid
. I know of other cases of implicit sharing data changing their data…
void
instead of a generic MaskTree to indicate that string attributes are unsupported.