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

Pushing Array of position

Community Beginner ,
Jan 24, 2020 Jan 24, 2020

Hi! 

Trying to get the position of the first X layers in comp and create an array of arrays with it.

dosn't work.

thanks!

 var positionArray = [];

for(var p = 3; p>=1; p-=1 )
            
                var myComp = app.project.activeItem;
                //alert(myComp.layer(p).name);
                positionArray.push(myComp.layer(p).position);
            alert("Finished")
        }
TOPICS
Scripting
879
Translate
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

correct answers 1 Correct answer

Advocate , Jan 24, 2020 Jan 24, 2020

Try this instead:

positionArray.push(myComp.layer(p).position.value);
Translate
Advocate ,
Jan 24, 2020 Jan 24, 2020

Try this instead:

positionArray.push(myComp.layer(p).position.value);
Translate
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 Beginner ,
Jan 31, 2020 Jan 31, 2020
LATEST

Thanks! it worked 🙂

Translate
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