Skip to content

CCEffectParameters

SilicDev edited this page Feb 21, 2024 · 1 revision

CCEffectParameters

Class: CCEffectParameters

An effect that has parameters

Description

Parameter effects allow users to select additional options to modify the behaviour of the effect. While several functions to edit the parameters for an effect are provided it's highly discouraged to edit these at runtime. However plugins may elect to use this for automated setup of effects in the editor.

Properties

type name default
int parameter_count 0

Methods

type signature
void add_item_parameter(id: String, options: PackedStringArray)
void add_range_parameter(id: String, min: int, max: int)
void clear()
PackedStringArray get_item_parameter_options(idx: int) const
String get_parameter_id(idx: int) const
int get_parameter_idx(id: String) const
ParameterEntryKind get_parameter_kind(idx: int) const
String get_parameter_name(idx: int) const
Texture2D get_parameter_icon(idx: int) const
Color get_parameter_tint(idx: int) const
int get_range_parameter_max(idx: int) const
int get_range_parameter_min(idx: int) const
void remove_parameter(idx: int)
void set_item_parameter_options(idx: int, options: PackedStringArray)
void set_parameter_id(idx: int, id: String)
void set_parameter_kind(idx: int, kind: ParameterEntryKind)
void set_parameter_name(idx: int, name: String)
void set_parameter_icon(idx: int, icon: Texture2D)
void set_parameter_tint(idx: int, tint: Color)
void set_range_parameter_max(idx: int, max: int)
void set_range_parameter_min(idx: int, min: int)

Enumerations

ParameterEntryKind

  • ITEM = 0
  • RANGE = 1

Property Descriptions

int parameter_count [default: 0] : The amount of parameters for this effect.

Method Descriptions

void add_item_parameter(id: String, options: PackedStringArray) : Adds a new parameter id with the user being able to select any of the options.

void add_range_parameter(id: String, min: int, max: int) : Adds a id parameter with range min to max.

void clear() : Removes all parameters from this effect.

PackedStringArray get_item_parameter_options(idx: int) const : Returns the possible options for the item parameter at idx. : Note: If the underlying parameter is not an ParameterEntryKind.ITEM parameter this function throws an error.

String get_parameter_id(idx: int) const : Returns the internal id of the parameter idx.

int get_parameter_idx(idx: String) const : Returns the internal idx of the parameter from its internal id.

ParameterEntryKind get_parameter_kind(idx: int) const : Returns what kind of parameter the parameter at idx is.

String get_parameter_name(idx: int) const : Returns the name of the parameter idx.

Texture2D get_parameter_icon(idx: int) const : Returns the icon of the parameter idx.

Color get_parameter_tint(idx: int) const : Returns the color tint of the parameter idx.

int get_range_parameter_max(idx: int) const : Returns the maximum value allowed for the parameter idx. : Note: If the underlying parameter is not an ParameterEntryKind.RANGE parameter this function throws an error.

int get_range_parameter_min(idx: int) const : Returns the minimum value allowed for the parameter idx. : Note: If the underlying parameter is not an ParameterEntryKind.RANGE parameter this function throws an error.

void remove_parameter(idx: int) : Removes the parameter at idx from the parameter list of this effect.

void set_item_parameter_options(idx: int, options: PackedStringArray) : Sets the names for the options of the item parameter idx. : Note: If the underlying parameter is not an ParameterEntryKind.ITEM parameter this function throws an error.

void set_parameter_id(idx: int, id: String) : Sets the id of the parameter idx.

void set_parameter_kind(idx: int, kind: ParameterEntryKind) : Sets the kind of the parameter idx.

void set_parameter_name(idx: int, name: String) : Sets the name of the parameter idx.

void set_parameter_icon(idx: int, icon: Texture2D) : Sets the icon of the parameter idx.

void set_parameter_tint(idx: int, tint: Color) : Sets the color tint of the parameter idx.

void set_range_parameter_max(idx: int, max: int) : Sets the maximum value allowed for the parameter idx : Note: If the underlying parameter is not an ParameterEntryKind.RANGE parameter this function throws an error.

void set_range_parameter_min(idx: int, min: int) : Sets the minimum value allowed for the parameter idx : Note: If the underlying parameter is not an ParameterEntryKind.RANGE parameter this function throws an error.

Clone this wiki locally