• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

getPrefAsBool seems to hooked up to computerSaysNo.exe

0 Votes
Engaged ,
Oct 11, 2022 Oct 11, 2022

Copy link to clipboard

Copied

The extendscript function

 

 

app.preferences.getPrefAsBool()

 

 

always returns false. Here's a demo, comparing it to getPrefAsLong, which seems to work:

 

 

app.preferences.getPrefAsLong("Main Pref Section v2", "Pref_SEQUENCE_ZEROS", PREFType.PREF_Type_MACHINE_SPECIFIC)
> 5
// returns 5 which should be truthy, but
app.preferences.getPrefAsBool("Main Pref Section v2", "Pref_SEQUENCE_ZEROS", PREFType.PREF_Type_MACHINE_SPECIFIC)
> false
//returns wrong answer

app.preferences.getPrefAsLong("Main Pref Section v2", "Pref_HIDE_LOCKED_MASKS", PREFType.PREF_Type_MACHINE_SPECIFIC)
> 0
// returns 0, should be falsy
app.preferences.getPrefAsBool("Main Pref Section v2", "Pref_HIDE_LOCKED_MASKS", PREFType.PREF_Type_MACHINE_SPECIFIC)
> false
//returns false, so it's not just inverting the answer

app.preferences.getPrefAsLong("Main Pref Section", "Pref_SCRIPTING_FILE_NETWORK_SECURITY")
> 1
//returns 1. Note, using "Main Pref Section" and no PREFTYPE enum
app.preferences.getPrefAsBool("Main Pref Section", "Pref_SCRIPTING_FILE_NETWORK_SECURITY")
> After Effects error: The section name and key (Main Pref Section, Pref_SCRIPTING_FILE_NETWORK_SECURITY) could not be found in the preferences.
// throws an error
app.preferences.getPrefAsBool("Main Pref Section", "Pref_SCRIPTING_FILE_NETWORK_SECURITY", PREFType.PREF_Type_MACHINE_SPECIFIC)
> After Effects error: The section name and key (Main Pref Section, Pref_SCRIPTING_FILE_NETWORK_SECURITY) could not be found in the preferences.
// tried with the preftype specified, still not found
app.preferences.getPrefAsBool("Main Pref Section v2", "Pref_SCRIPTING_FILE_NETWORK_SECURITY", PREFType.PREF_Type_MACHINE_SPECIFIC)
> false
// returns false, so it found the pref, but reported it wrong.

 

Bug Unresolved
TOPICS
Scripting , SDK

Views

17

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation