const Int32 height = 720;
AutoAlloc<BaseBitmap> bitmap;
if (bitmap == nullptr)
RenderData* const renderData = renderDocument->GetActiveRenderData();
if (renderData == nullptr)
BaseContainer renderSettings = renderData->GetDataInstanceRef();
const Filename savePath = renderSettings.GetFilename(
RDATA_PATH);
if (savePath.IsPopulated() == false)
const RenderPathData rpd = RenderPathData(renderDocument, renderData, &renderSettings,
nullptr, 1, String(), String(),
NOTOK);
finalFilename.SetSuffix("png"_s);
NONE
Definition: asset_browser.h:1
Py_UCS4 * res
Definition: unicodeobject.h:1113
OK
User has selected a font.
Definition: customgui_fontchooser.h:0
@ RDATA_PATH
Definition: drendersettings.h:66
@ RDATA_XRES
Definition: drendersettings.h:152
@ RDATA_YRES
Definition: drendersettings.h:153
NODOCUMENTCLONE
Set to avoid an automatic clone of the scene sent to RenderDocument().
Definition: ge_prepass.h:2
#define NOTOK
Definition: ge_sys_math.h:258
return OK
Definition: apibase.h:2740
#define FILTER_PNG
PNG.
Definition: ge_prepass.h:202
RENDERRESULT
Definition: ge_prepass.h:426
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:69
Filename FilenameConvertTokens(const Filename &path, const RenderPathData *rpData)
maxon::Int32 Int32
Definition: ge_sys_math.h:51
RENDERRESULT RenderDocument(BaseDocument *doc, const BaseContainer &rdata, ProgressHook *prog, void *private_data, BaseBitmap *bmp, RENDERFLAGS renderflags, BaseThread *th, WriteProgressHook *wprog=nullptr, void *data=nullptr)
unsigned long Py_ssize_t width
Definition: pycore_traceback.h:88
There are a bunch of functions to dissect a path containing Tokens. In the following an exemplary path /myprojects/topnotchproject/$take/beautiful.tif
is assumed.
static String ExampleTakeTokenHook(void* data)
{
RenderPathData* const rDataPath = (RenderPathData*)data;
if (rDataPath == nullptr)
return String();
const BaseTake* const take = rDataPath->_cTake;
if (take != nullptr)
return take->GetName();
return String();
}
{
String("example.take"),
String("Current Take Name"),
String("MyTake"),
ExampleTakeTokenHook);
if (success == false)
}
Bool RegisterToken(const String &key, const String &help, const String &example, TOKENHOOK *hook)
maxon::Bool Bool
Definition: ge_sys_math.h:46