FilterInterface Class Reference

#include <filter.h>

Inheritance diagram for FilterInterface:

Detailed Description

FilterInterface allows interfacing with the render filter.

Public Member Functions

MAXON_METHOD Result< void > Set (const InternedId &parameter, const Data &data)
 
MAXON_METHOD Result< void > Execute (const FilterImageRef &input, FilterImageRef output)
 
MAXON_METHOD Result< void > SetProgressMonitor (const FilterProgressMonitorFunction progressMonitor, void *userPtr)
 

Private Member Functions

 MAXON_INTERFACE (FilterInterface, MAXON_REFERENCE_NORMAL, "net.maxon.renderfilter.filter.interface")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( FilterInterface  ,
MAXON_REFERENCE_NORMAL  ,
"net.maxon.renderfilter.filter.interface"   
)
private

◆ Set()

MAXON_METHOD Result<void> Set ( const InternedId parameter,
const Data data 
)

Sets a filter parameter.

Parameters
[in]parameterThe id of the parameter to set
[in]dataThe data for the parameter

◆ Execute()

MAXON_METHOD Result<void> Execute ( const FilterImageRef &  input,
FilterImageRef  output 
)

Executes the filter standalone.

Parameters
[in]inputThe input Filter Image
[in]outputThe target Filter Image

◆ SetProgressMonitor()

MAXON_METHOD Result<void> SetProgressMonitor ( const FilterProgressMonitorFunction  progressMonitor,
void *  userPtr 
)

Sets a progress monitor function pointer that gets invoked during the filter execution. There can only be one callback attached at a time. Multiple calls to SetProgressMonitor() will replace the previously attached callback. The callback function is being called with the provided userPtr and a progress in the range [0, 1]. Returning false within the monitor will cancel further execution of the filter.

Parameters
[in]progressMonitorThe progress monitor function
[in]userPtrA custom user ptr that gets passed to the function pointer.