Skip to main content
New Participant
March 28, 2024

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

  • March 28, 2024
  • 3 replies
  • 308 views

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 has been closed for replies.

3 replies

nishu_kush
Community Manager
Community Manager
June 11, 2024

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

 

Best,

Nishu

Inspiring
April 15, 2024

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

Brainiac
March 28, 2024

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)