VolumeObject Manual


A VolumeObject represents a volume (maxon::VolumeInterface) inside a Cinema 4D scene. Typically a VolumeObject is found in the cache of a generator like the VolumeBuilder. The VolumeObject class is defined in the lib_volumeobject.h header file.

A VolumeObject object is an instance of Ovolume.

// This example checks if the given object is a volume builder.
// If so, it accesses the cache to get the VolumeObject.
// check if VolumeBuilder
return maxon::OK;
VolumeBuilder* const volumeBuilder = static_cast<VolumeBuilder*>(object);
// get cache
BaseObject* const cache = volumeBuilder->GetCache(nullptr);
if (cache == nullptr)
return maxon::IllegalStateError(MAXON_SOURCE_LOCATION);
// check for volume object
if (cache->IsInstanceOf(Ovolume))
const VolumeObject* const volumeObject = static_cast<VolumeObject*>(cache);
const maxon::VolumeRef volume = volumeObject->GetVolume();
const maxon::String gridName = volume.GetGridName();
DiagnosticOutput("Grid Name: @", gridName);


A VolumeObject can be created with these functions:

The volume represented by the object is accessed with:

Further Reading