app.settings.getSetting not working

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
stib
Posts: 21
Joined: December 10th, 2006, 10:23 pm
Contact:

I'm trying to retrieve the label colours from the user's prefs. What I'm using is:

Code: Select all

var label1 = app.settings.getSetting("Label Preference Color Section 5", "Label Color ID 2 # 1", PREFType.PREF_Type_MACHINE_INDEPENDENT)
the section name and key for the preferences are copy-pasted out of the "Adobe After Effects 16.1 Prefs-indep-general.txt" file, so that's why the third parameter of getSettings is PREFType.PREF_Type_MACHINE_INDEPENDENT.

But every time I try I get the error "the section name and key (Label Preference Color Section 5, Label Color ID 2 # 1) could not be found in the preferences."

I tried some preferences from the main settings as well and even the settings used in the example in the docs, but same result every time. What am I doing wrong?
stib
Posts: 21
Joined: December 10th, 2006, 10:23 pm
Contact:

If I try saving a setting like "my test settings" I notice in the prefs.txt file that the setting gets called

Code: Select all

["settings_my test settings"]
. And when I retrieve it I only specify the name as

Code: Select all

app.settings.getSetting("my test settings")
Does this mean that the reason AE can't find the settings I'm looking for is because when I do

Code: Select all

app.settings.getSetting("Label Preference Color Section 5", "Label Color ID 2 # 1", PREFType.PREF_Type_MACHINE_INDEPENDENT)
it's actually looking for a setting called

Code: Select all

"setting_Label Preference Color Section 5"
?
Post Reply