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

Solo Layer in Composition using Scripting

New Here ,
Jul 24, 2013 Jul 24, 2013

Hi all,

I'm looking for a way to cycle through layers using scripting.

The ultimate goal is to make a very quickly customizable slideshow.
In this project I have several boxes, in which I'd like to show a Composition. Each composition contains just a stack of layers (easily changeable with dragging and dropping) with a different photo on each layer.
Using a Slider Control I'd like to cycle through the photos of a composition. For example: when I select value 4 using the Slider, the fourth layer is made visible. In this way I could keyframe the slider to select a photo.

Any thoughts on how to accomplice this? I can't seem to find a good website about scripting time events. Most of them only contain motion scripting.

Thanks in advance!

TOPICS
Scripting
1.5K
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

Community Expert , Jul 24, 2013 Jul 24, 2013

I think you'd want an expression here, not a script. I'd use an opacity expression (on each of the photo layers) with an expression like this:

s = // link this variable to your slider;

(Math.round(s) == index) ? 100 : 0;

Dan

Translate
Community Expert ,
Jul 24, 2013 Jul 24, 2013

I think you'd want an expression here, not a script. I'd use an opacity expression (on each of the photo layers) with an expression like this:

s = // link this variable to your slider;

(Math.round(s) == index) ? 100 : 0;

Dan

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
New Here ,
Jul 25, 2013 Jul 25, 2013

Thanks a lot!
Not exactly as I pictured it, but it works perfectly!

And indeed, I was looking for an expression in stead of a script.

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 ,
May 23, 2014 May 23, 2014
LATEST

Awesome, thank you!

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