Skip to main content
Participant
Mar 28, 2024 4:40 PM UTC
Open for Voting

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

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.

 

 

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

nishu_kush
Legend
Jun 11, 2024 8:20 PM UTC

A ticket has been filed for further investigation. Thanks for reporting it.

 

Best,

Nishu

Translate
Inspiring
Apr 15, 2024 3:38 PM UTC

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

Translate
Legend
Mar 28, 2024 7:15 PM UTC

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)

 

 

Translate