About
A RenderData object represents a set of render settings of a BaseDocument . The render settings include:
Various parameters like resolution, image format, save path etc.
A list of MultipassObject elements that represent multipasses.
A list of BaseVideoPost elements that represent post filters or render engines.
RenderData objects are an instance of Rbase
.
Access
RenderData elements can be accessed from the BaseDocument :
Allocation/Deallocation
RenderData objects can be created with the usual tools:
The RenderData object can be handed over to a BaseDocument using:
if (renderData == nullptr )
renderData->
SetName (
"Preview Render Settings" _s);
Navigation
RenderData is based on GeListNode and the render settings are organized in a tree. This tree can be navigated with:
while (parentRenderData->
GetUp ())
{
parentRenderData = parentRenderData->
GetUp ();
}
Properties
The RenderData object gives access to render settings, Multipasses and post effects.
Data
RenderData is based on BaseList2D so the data can be accessed with
The container IDs are defined in drendersettings.h
.
Changing the RDATA_RENDERENGINE parameter to change the render engine will not automatically create the needed video post for that render engine. The video post has to be created manually.
if (renderData == nullptr )
renderData->
SetName (
"Hardware Rendering" _s);
if (videoPost == nullptr )
If a given RenderData element is active can be checked with a bit. To set a given RenderData object as the active one, use BaseDocument::SetActiveRenderData() .
while (renderData != nullptr )
{
renderData = renderData->
GetNext ();
}
The image format settings are defined in a maxon::DataDictionary that is saved within the BaseContainer . These functions are used to access the image format settings:
if (renderData == nullptr )
if (renderDataBaseContainer == nullptr )
maxon::DataDictionary exportSettings;
exportSettings.Set(maxon::MEDIASESSION::OPENEXR::EXPORT::HALFFLOAT,
true )
iferr_return ;
exportSettings.Set(maxon::MEDIASESSION::OPENEXR::EXPORT::LAYERNUMBERING,
true )
iferr_return ;
exportSettings.Set(maxon::MEDIASESSION::OPENEXR::EXPORT::COMPRESSIONMETHOD, maxon::MEDIASESSION::OPENEXR::EXPORT::COMPRESSIONMETHOD.ENUM_NONE)
iferr_return ;
if (renderData == nullptr )
if (renderDataBaseContainer == nullptr )
maxon::Id method = data.GetOrDefault(maxon::MEDIASESSION::OPENEXR::EXPORT::COMPRESSIONMETHOD);
Multipasses
A render multipass contains different elements of the render result. What multipasses should be created is stored in a list of MultipassObject elements.
See also MultipassObject Manual .
while (multipass != nullptr )
{
{
{
}
}
}
Post Effects
Post effects are executed during the rendering process to apply filters like color correction to the final image. BaseVideoPost objects can also represent a render engine. These BaseVideoPost elements are stored in a list.
See also BaseVideoPost Manual .
while (videoPost != nullptr )
{
if (videoPost->
GetType () == 1025462)
{
break ;
}
}
Further Reading
Bool GetBit(Int32 mask) const
Definition: c4d_baselist.h:2156
maxon::Int Int
Definition: ge_sys_math.h:49
RenderData * GetFirstRenderData(void)
#define FILTER_EXR
EXR.
Definition: ge_prepass.h:190
const BaseContainer * GetDataInstance() const
Definition: c4d_baselist.h:2224
Definition: lib_description.h:315
void SetInt32(Int32 id, Int32 l)
Definition: c4d_basecontainer.h:501
Definition: drendersettings.h:395
return OK
Definition: apibase.h:2462
BaseVideoPost * GetFirstVideoPost()
Definition: apibaseid.h:273
#define iferr_return
Definition: resultbase.h:1419
Definition: vpwatermark.h:68
#define BIT_ACTIVERENDERDATA
Active render data.
Definition: ge_prepass.h:874
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:66
Definition: drendersettings.h:152
void SetActiveRenderData(RenderData *rd)
void SetBool(Int32 id, Bool b)
Definition: c4d_basecontainer.h:494
static BaseVideoPost * Alloc(Int32 type)
#define DiagnosticOutput(formatString,...)
Definition: debugdiagnostics.h:168
RenderData * GetNext(void)
Definition: c4d_basedocument.h:141
Definition: drendersettings.h:69
maxon::Result< void > SetImageSettingsDictionary(const maxon::DataDictionary &settings, BaseContainer *data, Int32 filterId)
static RenderData * Alloc(void)
static String IntToString(Int32 v)
Definition: c4d_string.h:493
Bool SetParameter(const DescID &id, const GeData &t_data, DESCFLAGS_SET flags)
RenderData * GetUp(void)
Definition: c4d_basedocument.h:153
Int32 GetInt32(void) const
Definition: c4d_gedata.h:411
BaseContainer GetContainer(Int32 id) const
Definition: c4d_basecontainer.h:414
const BaseContainer & GetDataInstanceRef() const
Definition: c4d_baselist.h:2240
Definition: c4d_videopost.h:19
MultipassObject * GetNext(void)
Definition: c4d_basedocument.h:93
Definition: c4d_gedata.h:77
void SetName(const maxon::String &name)
Definition: c4d_baselist.h:2265
maxon::Int32 Int32
Definition: ge_sys_math.h:45
Definition: drendersettings.h:39
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:209
maxon::Result< maxon::DataDictionary > GetImageSettingsDictionary(const BaseContainer *data, Int32 filterId)
#define VPBUFFER_OBJECTBUFFER
Object buffer multipass channel.
Definition: c4d_videopostdata.h:136
MultipassObject * GetFirstMultipass()
BaseVideoPost * GetNext(void)
Definition: c4d_videopost.h:52
void InsertRenderDataLast(RenderData *rd)
RenderData * GetActiveRenderData(void)
Definition: drendersettings.h:153
Definition: drendersettings.h:71
void SetContainer(Int32 id, const BaseContainer &s)
Definition: c4d_basecontainer.h:593
Definition: drendersettings.h:41
Definition: c4d_basedocument.h:109
Definition: zmultipass.h:8
Definition: c4d_basedocument.h:78
String GetName() const
Definition: c4d_baselist.h:2259
void InsertVideoPost(BaseVideoPost *pvp, BaseVideoPost *pred=nullptr)
Int32 GetType() const
Definition: c4d_baselist.h:1304
Int32 GetInt32(Int32 id, Int32 preset=0) const
Definition: c4d_basecontainer.h:299
Bool GetParameter(const DescID &id, GeData &t_data, DESCFLAGS_GET flags)
Definition: c4d_basecontainer.h:42
Definition: zmultipass.h:6