Skip to main content

Defining Effects

Create Effect

Effects are defined in gcPluginInit() with the intf->functions->createEffect() function:

ParameterTypeDescription
initDataPluginInitData *The init data from gcPluginInit()
categoryconst 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.
nameconst 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.
displayNameconst char *A string of what will be displayed in the UI for the effect.
---------
ReturnsEffect *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:

ParameterTypeDescription
effectEffect *An effect definition
typePropertyTypeEnum of the type of the property. Types are:
  • PROPERTY_TYPE_INT
  • PROPERTY_TYPE_DOUBLE
  • PROPERTY_TYPE_COLOR
  • PROPERTY_TYPE_VECTOR2DINT
  • PROPERTY_TYPE_BOOL
  • PROPERTY_TYPE_BRUSH
nameconst char *The ID of the property in camelCase. The display name will automatically be created from the ID.
---------
ReturnsProperty *Returns a pointer to an object containing the property definition. .