Defining Effects
Create Effect
Effects are defined in gcPluginInit() with the intf->functions->createEffect() function:
| Parameter | Type | Description |
|---|---|---|
initData | PluginInitData * | The init data from gcPluginInit() |
category | const char * | A string of the category display name to group effects in the effects menu. If multiple effects have the same category, they will be joined together. |
name | const char * | A string of the effect ID. This will be used for identifying the effect in project files. If you change this, then the old effect can no longer be opened. |
displayName | const char * | A string of what will be displayed in the UI for the effect. |
| --- | --- | --- |
| Returns | Effect * | A pointer to an object containing the effect definition. |
Example:
Effect *effect = intf->functions->createEffect(data, "Style", "texturize", "Texturize");
Properties
You can add properties to the effect with the intf->functions->addEffectProperty() function:
| Parameter | Type | Description |
|---|---|---|
effect | Effect * | An effect definition |
type | PropertyType | Enum of the type of the property. Types are:
|
name | const char * | The ID of the property in camelCase. The display name will automatically be created from the ID. |
| --- | --- | --- |
| Returns | Property * | Returns a pointer to an object containing the property definition. . |