UserParamHolder

Inherited by : Effect, PyModalDialog

Synopsis

This is an abstract class that serves as a base interface for all objects that can hold user parameters. See Detailed Description

Functions

Detailed Description

To create a new user parameter on the object, use one of the createXParam function. To remove a user parameter created, use the removeParam(param) function. Note that this function can only be used to remove user parameters and cannot be used to remove parameters that were defined by the OpenFX plug-in.

Once you have made modifications to the user parameters, you must call the refreshUserParamsGUI() function to notify the GUI, otherwise no change will appear on the GUI.

Member functions description

NatronEngine.UserParamHolder.createBooleanParam(name, label)
Parameters
  • namestr

  • labelstr

Return type

BooleanParam

Creates a new user parameter with the given name and label. See here for an explanation of the difference between the name and label. This function will return a new parameter of type boolean which will appear in the user interface as a checkbox.

Warning

After calling this function you should call refreshUserParamsGUI() to refresh the user interface. The refreshing is done in a separate function because it may be expensive and thus allows you to make multiple changes to user parameters at once while keeping the user interface responsive.

NatronEngine.UserParamHolder.createButtonParam(name, label)
Parameters
  • namestr

  • labelstr

Return type

ButtonParam

Creates a new user parameter with the given name and label. See here for an explanation of the difference between the name and label. This function will return a new parameter of type button which will appear as a push button. Use the onParamChanged callback of the Effect to handle user clicks.

Warning

After calling this function you should call refreshUserParamsGUI() to refresh the user interface. The refreshing is done in a separate function because it may be expensive and thus allows you to make multiple changes to user parameters at once while keeping the user interface responsive.

NatronEngine.UserParamHolder.createChoiceParam(name, label)
Parameters
  • namestr

  • labelstr

Return type

ChoiceParam

Creates a new user parameter with the given name and label. See here for an explanation of the difference between the name and label. This function will return a new parameter of type choice which will appear as a dropdown combobox.

Warning

After calling this function you should call refreshUserParamsGUI() to refresh the user interface. The refreshing is done in a separate function because it may be expensive and thus allows you to make multiple changes to user parameters at once while keeping the user interface responsive.

NatronEngine.UserParamHolder.createColorParam(name, label, useAlpha)
Parameters
  • namestr

  • labelstr

  • useAlphabool

Return type

ColorParam

Creates a new user parameter with the given name and label. See here for an explanation of the difference between the name and label. This function will return a new parameter of type color.

Warning

After calling this function you should call refreshUserParamsGUI() to refresh the user interface. The refreshing is done in a separate function because it may be expensive and thus allows you to make multiple changes to user parameters at once while keeping the user interface responsive.

NatronEngine.UserParamHolder.createDouble2DParam(name, label)
Parameters
  • namestr

  • labelstr

Return type

Double2DParam

Creates a new user parameter with the given name and label. See here for an explanation of the difference between the name and label. This function will return a new parameter of type double with 2 dimensions.

Warning

After calling this function you should call refreshUserParamsGUI() to refresh the user interface. The refreshing is done in a separate function because it may be expensive and thus allows you to make multiple changes to user parameters at once while keeping the user interface responsive.

NatronEngine.UserParamHolder.createDouble3DParam(name, label)
Parameters
  • namestr

  • labelstr

Return type

Double3DParam

Creates a new user parameter with the given name and label. See here for an explanation of the difference between the name and label. This function will return a new parameter of type double with 3 dimensions.

Warning

After calling this function you should call refreshUserParamsGUI() to refresh the user interface. The refreshing is done in a separate function because it may be expensive and thus allows you to make multiple changes to user parameters at once while keeping the user interface responsive.

NatronEngine.UserParamHolder.createDoubleParam(name, label)
Parameters
  • namestr

  • labelstr

Return type

DoubleParam

Creates a new user parameter with the given name and label. See here for an explanation of the difference between the name and label. This function will return a new parameter of type double with single dimension. A double is similar to a floating point value.

Warning

After calling this function you should call refreshUserParamsGUI() to refresh the user interface. The refreshing is done in a separate function because it may be expensive and thus allows you to make multiple changes to user parameters at once while keeping the user interface responsive.

NatronEngine.UserParamHolder.createFileParam(name, label)
Parameters
  • namestr

  • labelstr

Return type

FileParam

Creates a new user parameter with the given name and label. See here for an explanation of the difference between the name and label. This function will return a new parameter of type double with 2 dimensions.

Warning

After calling this function you should call refreshUserParamsGUI() to refresh the user interface. The refreshing is done in a separate function because it may be expensive and thus allows you to make multiple changes to user parameters at once while keeping the user interface responsive.

NatronEngine.UserParamHolder.createGroupParam(name, label)
Parameters
  • namestr

  • labelstr

Return type

GroupParam

Creates a new user parameter with the given name and label. See here for an explanation of the difference between the name and label. This function will return a new parameter of type group. It can contain other children parameters and can be expanded or folded.

Warning

After calling this function you should call refreshUserParamsGUI() to refresh the user interface. The refreshing is done in a separate function because it may be expensive and thus allows you to make multiple changes to user parameters at once while keeping the user interface responsive.

NatronEngine.UserParamHolder.createInt2DParam(name, label)
Parameters
  • namestr

  • labelstr

Return type

Int2DParam

Creates a new user parameter with the given name and label. See here for an explanation of the difference between the name and label. This function will return a new parameter of type integer with 2 dimensions.

Warning

After calling this function you should call refreshUserParamsGUI() to refresh the user interface. The refreshing is done in a separate function because it may be expensive and thus allows you to make multiple changes to user parameters at once while keeping the user interface responsive.

NatronEngine.UserParamHolder.createInt3DParam(name, label)
Parameters
  • namestr

  • labelstr

Return type

Int3DParam

Creates a new user parameter with the given name and label. See here for an explanation of the difference between the name and label. This function will return a new parameter of type integer with 3 dimensions.

Warning

After calling this function you should call refreshUserParamsGUI() to refresh the user interface. The refreshing is done in a separate function because it may be expensive and thus allows you to make multiple changes to user parameters at once while keeping the user interface responsive.

NatronEngine.UserParamHolder.createIntParam(name, label)
Parameters
  • namestr

  • labelstr

Return type

IntParam

Creates a new user parameter with the given name and label. See here for an explanation of the difference between the name and label. This function will return a new parameter of type integer with a single dimension.

Warning

After calling this function you should call refreshUserParamsGUI() to refresh the user interface. The refreshing is done in a separate function because it may be expensive and thus allows you to make multiple changes to user parameters at once while keeping the user interface responsive.

NatronEngine.UserParamHolder.createOutputFileParam(name, label)
Parameters
  • namestr

  • labelstr

Return type

OutputFileParam

Creates a new user parameter with the given name and label. See here for an explanation of the difference between the name and label. This function will return a new parameter of type string dedicated to specify paths to output files.

Warning

After calling this function you should call refreshUserParamsGUI() to refresh the user interface. The refreshing is done in a separate function because it may be expensive and thus allows you to make multiple changes to user parameters at once while keeping the user interface responsive.

NatronEngine.UserParamHolder.createPageParam(name, label)
Parameters
  • namestr

  • labelstr

Return type

PageParam

Creates a new user parameter with the given name and label. See here for an explanation of the difference between the name and label. This function will return a new parameter of type page. A page is a tab within the settings panel of the node.

Warning

After calling this function you should call refreshUserParamsGUI() to refresh the user interface. The refreshing is done in a separate function because it may be expensive and thus allows you to make multiple changes to user parameters at once while keeping the user interface responsive.

NatronEngine.UserParamHolder.createParametricParam(name, label, nbCurves)
Parameters
  • namestr

  • labelstr

  • nbCurvesint

Return type

ParametricParam

Creates a new user parameter with the given name and label. See here for an explanation of the difference between the name and label. This function will return a new parameter of type parametric. A parametric parameter is what can be found in the ColorLookup node or in the Ranges tab of the ColorCorrect node.

Warning

After calling this function you should call refreshUserParamsGUI() to refresh the user interface. The refreshing is done in a separate function because it may be expensive and thus allows you to make multiple changes to user parameters at once while keeping the user interface responsive.

NatronEngine.UserParamHolder.createPathParam(name, label)
Parameters
  • namestr

  • labelstr

Return type

PathParam

Creates a new user parameter with the given name and label. See here for an explanation of the difference between the name and label. This function will return a new parameter of type string. This parameter is dedicated to specify path to single or multiple directories.

Warning

After calling this function you should call refreshUserParamsGUI() to refresh the user interface. The refreshing is done in a separate function because it may be expensive and thus allows you to make multiple changes to user parameters at once while keeping the user interface responsive.

NatronEngine.UserParamHolder.createStringParam(name, label)
Parameters
  • namestr

  • labelstr

Return type

StringParam

Creates a new user parameter with the given name and label. See here for an explanation of the difference between the name and label. This function will return a new parameter of type string.

Warning

After calling this function you should call refreshUserParamsGUI() to refresh the user interface. The refreshing is done in a separate function because it may be expensive and thus allows you to make multiple changes to user parameters at once while keeping the user interface responsive.

NatronEngine.UserParamHolder.removeParam(param)
Parameters

paramParam

Return type

bool

Removes the given param from the parameters of this Effect. This function works only if param is a user parameter and does nothing otherwise. This function returns True upon success and False otherwise.

Warning

After calling this function you should call refreshUserParamsGUI() to refresh the user interface. The refreshing is done in a separate function because it may be expensive and thus allows you to make multiple changes to user parameters at once while keeping the user interface responsive.

NatronEngine.UserParamHolder.refreshUserParamsGUI()

This function must be called after new user parameter were created or removed. This will re-create the user interface for the parameters and can be expensive.