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

It is not possible to set an effect name that is longer than 39 bytes via scripting

New Here ,
Mar 28, 2024 Mar 28, 2024

Copy link to clipboard

Copied

It is not possible to set an effect name that is longer than 39 bytes via scripting.

 

But, in some languages (e.g. german) the default effect names of the built-in animation presets using expressions are way longer than 39 characters. And therefore it's not possible to use scripts doing something with those long effect names.

6f22974a-6825-4131-9ec0-de5fb2926daf.jpg

 

Bug Unresolved
TOPICS
Scripting , Troubleshooting , Workflow

Views

62

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
2 Comments
Engaged ,
Mar 28, 2024 Mar 28, 2024

Copy link to clipboard

Copied

You can use the effect index instead of its name using a function like this:

 

function getEffectIndex(layer, effectName) {
  for (var i = 1; i <= layer.effect.numProperties; i++) {
    if (layer.effect(i).name == effectName) {
      return i
    }
  }
  return null
}

// usage
var proj = app.project;
var thisComp = proj.activeItem;
var layer = thisComp.layer(1);

layer.effect(getEffectIndex(layer, 'longEffectName'))(1).setValue(100)

 

 

Votes

Translate

Translate

Report

Report
Explorer ,
Apr 15, 2024 Apr 15, 2024

Copy link to clipboard

Copied

LATEST

The bug is that the effect name cannot be set via scripting if the name is more than 39 bytes. Adobe bug ID: DVAAE-4229694

Votes

Translate

Translate

Report

Report