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

From VFXPedia

< Eyeon:Script | Reference | Applications | Fusion | Classes | Composition
Revision as of 20:01, 19 January 2010 by Izyk (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Composition : 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 returns false if any of the arguments provided to it are invalid, and true otherwise. Note that the function will still return true if an attempt is made to set a preference to an invalid value. For example, attempting to setting the FPS to "Bob" will fail, but the function will still return true.

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())

It is possible to set a preference that does not exist. For example, setting fusion:SetPrefs({Comp.FrameFormat.Stuff = "Bob"}) will create a new preference which will be thereafter preserved in the Fusion preferences file.

Requirements

  • eyeonScript 5.0
  • Fusion 5.0

Examples

comp:SetPrefs({ ["Comp.Unsorted.GlobalStart"]=0, ["Comp.Unsorted.GlobalEnd"]=100 })
comp:SetPref("Comp.Interactive.BackgroundRender", true)

See Also

GetPrefs(), Fusion:SetPrefs()


Tips for SetPrefs (edit)

EyeonTips:Script/Reference/Applications/Fusion/Classes/Composition/SetPrefs