Eyeon:Script/Reference/Applications/Fusion/Classes/Fusion/SetPrefs

From VFXPedia

Jump to: navigation, search

Contents

Fusion : SetPrefs

Arguments

SetPrefs( prefs_table )
SetPrefs( prefname, value )

  • prefs_table (required, table)

A table where the index for each record is the name of the preference to be set, and the value of the record is the value that the preference will be set to.

  • prefname (required, string)

A string naming the preference setting to be changed. Use dots to indicate subtables.

  • value (required, any type)

This can be a bool, number, string or table, but must be appropriate to the type of the preference being set.

Returns

This function does not return a value.

Remarks

The SetPrefs function can be used to specify the values of virtually all preferences in Fusion. Its can take a table of values, identified by name, or a single name and value.

The table provided as an argument should have the format [prefs_name] = value. Subtables are allowed.

Preference storage in Fusion 5 now follows the a standard LuaTable format, as opposed to the attribute format that was previously present in DF4. To see the style with which the preferences are stored, do the following in the console:

dump(fusion:GetPrefs())

Requirements

  • eyeonScript 5.0
  • Fusion 5.0

Examples

fusion:SetPrefs({ ["Network.Mail.OnJobFailure"]=true, ["Network.Mail.Recipients"]="admin@studio.com" })
fusion:SetPref("Global.Controls.AutoClose", false)

See Also

GetPrefs(), Composition:SetPrefs()


Tips for SetPrefs (edit)

Setting the preferences for PathMaps can be a pain. The syntax for SetPref makes it nearly impossible to access these directly. Instead, try the following.

  map = fusion:GetPrefs("Global.Paths.Map")
  map["Fonts:"] = [[C:\Windows\Fonts\]]
  fusion:SetPrefs("Global.Paths.Map", map)