Callbacks/Handlers

Detailed Description

Typedefs

typedef Int32 CDialogMessage(CDialog *cd, CUserArea *cu, BaseContainer *msg)
 
typedef void ListViewCallBack(Int32 &res_type, void *&result, void *userdata, void *secret, Int32 cmd, Int32 line, Int32 col, void *data1)
 
typedef void IlluminationModel(VolumeData *sd, RayLightCache *rlc, void *dat)
 
typedef void(* BrowserPopupCallback) (void *userdata, Int32 cmd, SDKBrowserURL &url, const maxon::Id &assetId)
 
typedef Bool(* BaseDrawMessageHook) (BaseDraw *pBaseDraw, BaseDocument *pDoc, BASEDRAW_HOOK_MESSAGE msg, void *pData)
 
typedef void ThreadMain(void *data)
 
typedef Bool ThreadTest(void *data)
 
typedef const CharThreadName(void *data)
 
typedef void ProgressHook(Float p, RENDERPROGRESSTYPE progress_type, void *context)
 
typedef void WriteProgressHook(WRITEMODE mode, BaseBitmap *bmp, const Filename &fn, Bool mainImage, Int32 frame, Int32 renderTime, Int32 streamnum, const maxon::String &streamname, void *context)
 
typedef void BakeProgressHook(BakeProgressInfo *info)
 
typedef void * HierarchyAlloc(void *main)
 
typedef void HierarchyFree(void *main, void *data)
 
typedef void HierarchyCopyTo(void *main, void *src, void *dst)
 
typedef Bool HierarchyDo(void *main, void *data, BaseObject *op, const Matrix &mg, Bool controlobject)
 
typedef void(* LASTCURSORINFOFUNC) ()
 
typedef Bool(* SaveCallbackImageFunc) (RDATA_SAVECALLBACK_CMD cmd, void *userdata, BaseDocument *doc, Int32 framenum, BaseBitmap *bmp, const Filename &fn)
 
typedef Bool BackgroundHandler(void *data, BACKGROUNDHANDLERCOMMAND command, BACKGROUNDHANDLERFLAGS parm)
 
typedef void(* C4D_CrashHandler) (Char *crashinfo)
 
typedef void(* C4D_CreateOpenGLContext) (void *context, void *root, UInt32 flags)
 
typedef void(* C4D_DeleteOpenGLContext) (void *context, UInt32 flags)
 
typedef GeData CodeEditorCallback(BaseList2D *obj, const BaseContainer &msg)
 

Typedef Documentation

◆ CDialogMessage

typedef Int32 CDialogMessage(CDialog *cd, CUserArea *cu, BaseContainer *msg)

Internal. dialog hook.

◆ ListViewCallBack

typedef void ListViewCallBack(Int32 &res_type, void *&result, void *userdata, void *secret, Int32 cmd, Int32 line, Int32 col, void *data1)

Internal. listview hook.

◆ IlluminationModel

typedef void IlluminationModel(VolumeData *sd, RayLightCache *rlc, void *dat)

Hook passed to IlluminanceSimple(). Called during illuminance calculations.

Parameters
[in]sdThe volume data for the point being calculated.
[in]rlcThe light data cache for the point being calculated.
[in]datThe private data sent to IlluminanceSimple().

◆ BrowserPopupCallback

typedef void(* BrowserPopupCallback) (void *userdata, Int32 cmd, SDKBrowserURL &url, const maxon::Id &assetId)

Callback for BrowserLibraryPopup().

Parameters
[in]userdataThe data sent to BrowserLibraryPopup().
[in]cmdThe browser command ID.
[in]urlThe URL of the preset.

◆ BaseDrawMessageHook

typedef Bool(* BaseDrawMessageHook) (BaseDraw *pBaseDraw, BaseDocument *pDoc, BASEDRAW_HOOK_MESSAGE msg, void *pData)

Private.

◆ ThreadMain

typedef void ThreadMain(void *data)

Internal. thread hook.

◆ ThreadTest

typedef Bool ThreadTest(void *data)

Internal. thread hook.

◆ ThreadName

typedef const Char* ThreadName(void *data)

Internal. thread hook.

◆ ProgressHook

typedef void ProgressHook(Float p, RENDERPROGRESSTYPE progress_type, void *context)

Callback for the progress of RenderDocument().

See also
RenderJob::GetProgressHook
NetRenderService::InitRendering
Parameters
[in]pThe progress, between 0.0 and 1.0.
[in]progress_typeThe render progress type: RENDERPROGRESSTYPE
[in]contextThe context passed to RenderDocument(). The caller owns the pointed context.

◆ WriteProgressHook

typedef void WriteProgressHook(WRITEMODE mode, BaseBitmap *bmp, const Filename &fn, Bool mainImage, Int32 frame, Int32 renderTime, Int32 streamnum, const maxon::String &streamname, void *context)

Callback for the write progress of RenderDocument().

See also
RenderJob::GetWriteProgressHook
NetRenderService::InitRendering
Parameters
[in]modeThe write mode.
[in]bmpThe bitmap written to.
[in]mainImagetrue for main image, otherwise false.
[in]frameThe frame number.
[in]renderTimeThe bitmap frame time.
[in]streamnumThe stream number.
[in]streamnameThe stream name.
[in]contextThe context data passed. The caller owns the pointed data.

◆ BakeProgressHook

typedef void BakeProgressHook(BakeProgressInfo *info)

Callback for the progress of texture baking.

Parameters
[in]infoThe bake progress information.

◆ HierarchyAlloc

typedef void* HierarchyAlloc(void *main)

Internal. hierarchy hook.

◆ HierarchyFree

typedef void HierarchyFree(void *main, void *data)

Internal. hierarchy hook.

◆ HierarchyCopyTo

typedef void HierarchyCopyTo(void *main, void *src, void *dst)

Internal. hierarchy hook.

◆ HierarchyDo

typedef Bool HierarchyDo(void *main, void *data, BaseObject *op, const Matrix &mg, Bool controlobject)

Internal. hierarchy hook.

◆ LASTCURSORINFOFUNC

typedef void(* LASTCURSORINFOFUNC) ()

Callback invoked when mouse cursor leaves a user area.

See also
RemoveLastCursorInfo()

◆ SaveCallbackImageFunc

typedef Bool(* SaveCallbackImageFunc) (RDATA_SAVECALLBACK_CMD cmd, void *userdata, BaseDocument *doc, Int32 framenum, BaseBitmap *bmp, const Filename &fn)

Private.

◆ BackgroundHandler

typedef Bool BackgroundHandler(void *data, BACKGROUNDHANDLERCOMMAND command, BACKGROUNDHANDLERFLAGS parm)

Callback for background handlers registered with GeAddBackgroundHandler()
Example from the active material rendering:

Bool Handler_ActiveMaterial(void *data, Int32 command, Int32 flags)
{
switch (command)
{
{
return world->materialpreview && world->materialpreview->IsRunning();
} break;
{
{
if (world->materialpreview)
world->materialpreview->End();
}
} break;
{
return CheckActiveMaterialPreview(world->GetActiveDocument());
} break;
}
return true;
}
PyCompilerFlags * flags
Definition: ast.h:14
maxon::Bool Bool
Definition: ge_sys_math.h:55
maxon::Int32 Int32
Definition: ge_sys_math.h:60
@ ISRUNNING
Return true if the handler is currently running, otherwise false.
@ STOP
Stop the current activity. Return true when the activity has stopped.
@ MATERIALPREVIEW
Material preview.
Parameters
[in]dataThe data passed to GeAddBackgroundHandler()
[in]commandThe callback command: BACKGROUNDHANDLERCOMMAND
[in]parmThe flags given to GeStopBackgroundThreads(): BACKGROUNDHANDLERFLAGS
Returns
Depends on the background handler command.

◆ C4D_CrashHandler

typedef void(* C4D_CrashHandler) (Char *crashinfo)

A custom crash handler.
See the SDK examples and main.cpp.

Parameters
[in]crashinfoThe crash information text.

◆ C4D_CreateOpenGLContext

typedef void(* C4D_CreateOpenGLContext) (void *context, void *root, UInt32 flags)

Create OpenGL context hook.

◆ C4D_DeleteOpenGLContext

typedef void(* C4D_DeleteOpenGLContext) (void *context, UInt32 flags)

Delete OpenGL context hook.

◆ CodeEditorCallback

typedef GeData CodeEditorCallback(BaseList2D *obj, const BaseContainer &msg)

Callback for CodeEditor_Open().

Parameters
[in]objThe object the source belongs to.
[in]msgThe message container.
Returns
A GeData depending on the message.