About
maxon::ExecutionInterface is a template for a job that is executed on Cinema 4D startup.
- Note
- A maxon::ExecutionInterface is often used together with Configuration Variables to perform a task based on a given command line argument.
- Warning
- The jobs defined with the ExecutionInterface are started as soon as all components of the MAXON API are loaded. At this point Cinema 4D itself and the classic API may not yet be available. So it is not advised to use any component of the classic API in this context.
Usage
A new class is created based on the maxon::ExecutionInterface template. In this new class one must implement the function call operator "()" to define the code that should be executed.
{
public:
{
}
};
return OK
Definition: apibase.h:2690
#define DiagnosticOutput(formatString,...)
Definition: debugdiagnostics.h:176
#define iferr_scope
Definition: resultbase.h:1384
The new class must then be added to the maxon::ExecutionJobs registry:
{
return NewObj(RegisterHelloWorldExecution);
}
#define MAXON_DECLARATION_REGISTER(...)
Definition: module.h:933
#define NewObj(T,...)
Definition: newobj.h:108
The code defined in the function call operator will then be executed after Cinema 4D has started and loaded all resources.
- Note
- The jobs registered at ExecutionJobs are executed in alphanumerical order based on their IDs.
Further Reading