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

invalid reference to effect after creating another one

New Here ,
Oct 28, 2023 Oct 28, 2023

Copy link to clipboard

Copied

Im just wondering, how it works?

var sliderX = myLayer.Effects.addProperty("ADBE Slider Control");
sliderX.name = "Size_X";
var sliderY = myLayer.Effects.addProperty("ADBE Slider Control");
sliderY.name = "Size_Y";

 

sliderX.name = "tmp"; // ERROR here, ReferenceError: Object is invalid

TOPICS
Error or problem , Scripting , User interface or workspaces

Views

169

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
Community Expert ,
Oct 28, 2023 Oct 28, 2023

Copy link to clipboard

Copied

LATEST

Yes, that's the way it works. If you add a new property to an indexed group, it invalidates all existing references to properties in that group. If you replace your last line with this, it should work:

sliderX = myLayer.Effects.property("Size_X");
sliderX.name = "tmp";

Votes

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