Host#

Available in header <OpenMfx/Sdk/Cpp/Host/Host>.

class OpenMfx::Host#

C++ extension of core OfxHost To use this in you own program, it is advised to subclass it and implement BeforeMeshGet(), BeforeMeshRelease() and optionnaly InitInput

Public Functions

Host()#
~Host()#
bool LoadPlugin(OfxPlugin *plugin)#

Load the plugin before using it, and unload it afterwards

void UnloadPlugin(OfxPlugin *plugin)#
bool GetDescriptor(OfxPlugin *plugin, OfxMeshEffectHandle &effectDescriptor)#

The descriptor may be retrieved for different contexts of application

void ReleaseDescriptor(OfxMeshEffectHandle effectDescriptor)#
bool CreateInstance(OfxMeshEffectHandle effectDescriptor, OfxMeshEffectHandle &effectInstance)#

An instance of an effect is basically a node of the scene’s DAG/depsgraph It is created from a descriptor

void DestroyInstance(OfxMeshEffectHandle effectInstance)#
bool IsIdentity(OfxMeshEffectHandle effectInstance, bool *isIdentity, char **inputToPassThrough)#

Cooking and querying whether the instance has an effect produces different results depending on the value that has been assigned to the effect’s parameters for this particular instance. If isIdentity is turned true, there is no need to cook the effect, its input inputToPassThrough must simply be considered as the output.

bool Cook(OfxMeshEffectHandle effectInstance)#

Public Members

const OfxPropertySuiteV1 *propertySuite#
const OfxParameterSuiteV1 *parameterSuite#
const OfxMessageSuiteV2 *messageSuite#
const OfxMeshEffectSuiteV1 *meshEffectSuite#

Public Static Functions

Host *FromOfxHost(OfxHost *ofxHost)#

Retrieve the Host pointer stored in ofxHost’s properties.

Protected Functions

OfxStatus BeforeMeshGet(OfxMeshHandle)#

Callback responsible for converting from and back to host’s internal representation. They are callbacks so that they are ran only if and when the plugin needs so. To be overriden in subclasses.

OfxStatus BeforeMeshRelease(OfxMeshHandle)#
OfxStatus BeforeMeshAllocate(OfxMeshHandle)#
void InitInput(OfxMeshInputStruct&)#

Initialize inputs after creating an instance (mostly fills kOfxMeshPropInternalData)

OfxHost *RawHost()#

Give access to the raw OfxHost