Skip to main content
mapm40622069
Participant
December 29, 2022
Question

ValueAtTime and transform.scale.value[0] in a content group

  • December 29, 2022
  • 1 reply
  • 182 views

Hi,

It's driving me crazy so, before jumping from the roof, I'd like to be sure it can't be done.

Here's my point :

What I've got : layer shape with a lot of content groups.

What I want : to move each of content group after the previous one with a delay.

For example, a square would follow a circle path with a delay of 1 second. A basic things with layer and that old ValueAtTime.

 

I get the previous content group name and my square move at the same time of my circle with :

 

groupIndex = thisProperty.propertyGroup(2).propertyIndex;
groupName = thisLayer("Contents")(groupIndex-1).name;

P = thisComp.layer(index).content(groupName).transform.scale;
x = P.value[0] ;
y = P.value[1] ;

[x,y]

 

But I can't find out how to add a delay to it, I've tried all kind of syntaxes, watched all kind of videos...

How could I get the "value at time" from previous content group ?

 

Luke, you're my only hope...

Thanks.

Best regards.

GP

 

 

This topic has been closed for replies.

1 reply

Dan Ebberts
Community Expert
Community Expert
December 29, 2022

Something like this maybe:

delay = .25;
groupIndex = thisProperty.propertyGroup(2).propertyIndex;
groupName = thisLayer("Contents")(groupIndex-1).name;

P = thisComp.layer(index).content(groupName).transform.scale.valueAtTime(time - delay);
x = P[0] ;
y = P[1] ;

[x,y]
mapm40622069
Participant
December 29, 2022

YES ! Thanks so much ! I was so close, even if I spent quite the whole afternoon to get so close...

We have an expression here "One who knows is better than two seeking...".

Thanks again ! Have a nice end of the year !

GP