Anybody here know how to access the volume grids in a VolumeLoader?
a volume loader is just an ordinary generator. This means the stuff it creates is in its cache. You can access the volumes stored in its cache as usual:
if (baseObject->IsInstanceOf(Ovolumeloader) == false) return maxon::IllegalArgumentError(MAXON_SOURCE_LOCATION); BaseObject* const cache = baseObject->GetCache(); if (cache == nullptr) return maxon::IllegalArgumentError(MAXON_SOURCE_LOCATION); if (cache->IsInstanceOf(Ovolume) == false) return maxon::UnexpectedError(MAXON_SOURCE_LOCATION); const VolumeObject* const volumeObject = static_cast<VolumeObject*>(cache); ApplicationOutput("Volume Object: " + volumeObject->GetName());
See also VolumeObject Manual.
Thanks Sebastian. I did not realize it was a generator. Couldn't find it mentioned in the docs. However I was searching for VolumeLoader in the docs and on here, and I think the official docs searching system doesn't always return the results.
Anyway, all good now. Thanks again.