Highlighted

I want to know about expressions

New Here ,
Sep 07, 2020

Copy link to clipboard

Copied

How can I change the position keyframe value and add a checkbox expression?

 

 

And I want to add a checkbox expression inside this expression

 

delay = .1;
myDelay = delay*textIndex;
t = (time - inPoint) - myDelay;
if (t >= 0){
freq =2;
amplitude = 100;
decay = 8.0;
s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);
[s,s]
}else{
value
}

 

 

 

TOPICS
Scripting

Views

46

Likes

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

I want to know about expressions

New Here ,
Sep 07, 2020

Copy link to clipboard

Copied

How can I change the position keyframe value and add a checkbox expression?

 

 

And I want to add a checkbox expression inside this expression

 

delay = .1;
myDelay = delay*textIndex;
t = (time - inPoint) - myDelay;
if (t >= 0){
freq =2;
amplitude = 100;
decay = 8.0;
s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);
[s,s]
}else{
value
}

 

 

 

TOPICS
Scripting

Views

47

Likes

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
Sep 07, 2020 0
Guide ,
Sep 11, 2020

Copy link to clipboard

Copied

You create a checkbox, add a variable to asign it to and use the pickwhip to add it to your code. The result looks similar to this: 

 

chk = thisLayer.effects("Checkbox Control")("Checkbox");

 

Now you can use chk for example like this:

 

if (chk == 1){   // 1 means checkbox is checked, 0 means checkbox is not checked)

// do something}

else {

// do something else

};

 

*Martin

Likes

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
Reply
Loading...
Sep 11, 2020 0
New Here ,
Sep 11, 2020

Copy link to clipboard

Copied

First of all, I'm sorry.
I don't have much understanding.


-------------bounce expansion------------------------
delay = .1;
myDelay = delay*textIndex;
t = (time - inpoint) - myDelay;
If (t >= 0){
freq =2;
amplitude = 100;
Decay = 8.0;
s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);
[s,s]
}else{
value
}

-------------bounce expansion------------------------


I don't know how to put this expression in.
I'd appreciate it if you could show me an example.

Likes

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
Reply
Loading...
Sep 11, 2020 0
Adobe Community Professional ,
Sep 11, 2020

Copy link to clipboard

Copied

Both expressions are poorly written, have type-o's, and throw errors. Here is a cleaned-up version of your expression that starts the movement on a 135º angle (because you are bouncing equally in X and Y) after a delay multiplied by the layer index. The bounce starts with a jump, but at least the expression works;

delay = .5;
myDelay = delay * index;
t = (time - inPoint) - myDelay;
freq = 2;
amplitude = 100;
decay = 1.5;
s = amplitude*Math.cos(freq * t * Math.PI)/Math.exp(decay * t);
if (t >= 0)
	value + [s, s];
else
	value;

If you want to add a checkbox so that the layer will not move at all unless the checkbox is changed you have to add Effects/Expression Controls/Checkbox Control to your layer and set up another if/else argument. It would look like this:

if (effect("Checkbox Control")("Checkbox") == 0)
	value;
else
	delay = .5;
	myDelay = delay * index;
	t = (time - inPoint) - myDelay;
	freq = 2;
	amplitude = 100;
	decay = 1.5;
	s = amplitude*Math.cos(freq * t * Math.PI)/Math.exp(decay * t);

if (t >= 0)
	value + [s, s];
else
	value;

It still doesn't produce a very pretty animation, but the checkbox will turn the bounce on or off.

 

I would change the expression so that it only bounced on one axis and have it either ease in from the current position or animate in from the edge or use two keyframes. 

 

I'm wondering where you got the expression. It was very poorly conceived. It would also help us help you if we knew exactly what your design goals are. Please let us know exactly what you want that layer to do.

Likes

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
Reply
Loading...
Sep 11, 2020 0
New Here ,
Sep 11, 2020

Copy link to clipboard

Copied

First, I started working at After Effect to create a template for the Premiere Pro program. Then I found out that it was a bounce extension, and I thought I could turn it on and off as a template.

Likes

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
Reply
Loading...
Sep 11, 2020 0
Adobe Community Professional ,
Sep 11, 2020

Copy link to clipboard

Copied

If you use the second expression and add a checkbox controller you can use Extended Graphis to create a MOGRT that can be used in Premiere Pro, but this expression isn't very pretty. I still would like to know what you are trying to achieve. All that a clean up of your original expression gives you is a layer that jumps to a new position after the delay and the bounces back and forth at a 135º angle kind of like this: \

 

 

Likes

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
Reply
Loading...
Sep 11, 2020 0