188 posts
  • Australia
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 50 and 99 users
  • Sold between 10 000 and 50 000 dollars
WebRa says

Thank you so much felt! :)

205 posts
  • Most Wanted Bounty Winner
  • Sold between 10 000 and 50 000 dollars
  • Referred between 100 and 199 users
  • Bought between 10 and 49 items
  • Europe
  • Exclusive Author
  • Has been a member for 2-3 years
Leupsi says

Hi, i want to make the width of a rectangular shape easily editable with an expression.
Therefore i have unlinked the size of the rectangle path and now i want to link the size to a slider expression control. My problem is that i don’t know how to change the width only, cause if i move the slider effect now the high gets scaled as well as the width…

I would really appreciate your help, thank’s in advance! :)

2045 posts aspire to create - create to inspire
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Author had a File in an Envato Bundle
  • Beta Tester
  • Referred between 10 and 49 users
  • Bought between 50 and 99 items
  • Germany
+2 more
Creattive says

Hi, i want to make the width of a rectangular shape easily editable with an expression.
Therefore i have unlinked the size of the rectangle path and now i want to link the size to a slider expression control. My problem is that i don’t know how to change the width only, cause if i move the slider effect now the high gets scaled as well as the width… I would really appreciate your help, thank’s in advance! :)

add this to your layer scale property:

x = *pickwhip with slider ;(dont forget the semicolon at the end)
y = transform.scale[1];
[x,y]
205 posts
  • Most Wanted Bounty Winner
  • Sold between 10 000 and 50 000 dollars
  • Referred between 100 and 199 users
  • Bought between 10 and 49 items
  • Europe
  • Exclusive Author
  • Has been a member for 2-3 years
Leupsi says

Thank’s alot Creattive so simple but so useful! :)

2045 posts aspire to create - create to inspire
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Author had a File in an Envato Bundle
  • Beta Tester
  • Referred between 10 and 49 users
  • Bought between 50 and 99 items
  • Germany
+2 more
Creattive says

Thank’s alot Creattive so simple but so useful! :)

kein Problem, immer wieder gern :)

599 posts
  • Author had a Free File of the Month
  • Sold between 10 000 and 50 000 dollars
  • Envato Studio (Microlancer) Beta Tester
  • Bought between 1 and 9 items
  • Referred between 10 and 49 users
  • Exclusive Author
  • Has been a member for 2-3 years
addeystock says

Here is something from a while ago. Helped me a lot. Used it again today. I’ll post it here for anyone with similar request:

Q: What if you want to link together effects in different compositions.. cc sphere for example, and you want to match ALL of their properties. Should I go one by one and link them all individually or is there a smart way that just makes two effects alike with one line of code.

Answer:

http://videohive.net/forums/thread/simple-expressions-question/51908?page=1#476987

Just what I wanted :) Thanks Inlife

5030 posts
  • Community Superstar
  • Elite Author
  • Community Moderator
  • Sold between 100 000 and 250 000 dollars
  • Author had a File in an Envato Bundle
  • Beta Tester
  • Has been a member for 5-6 years
+6 more
felt_tips Volunteer moderator says

How to attach a camera to a null using only expressions.

From my answer to Dsign on another thread…..

Dsign was having trouble in CS4. When he parented his camera to a null, CC Particle World was no longer picking up the position of the camera correctly (it works in CS6, btw). I suggested he try attaching an unparented camera to the null using expressions only….

On an unparented camera’s position:

L = thisComp.layer("Null");
L.toWorld(L.anchorPoint);

The orientation’s a bit more difficult. You need to know your way around matrix math and trigonometry if you want to get to the bottom of how this one works… Or you can just paste the following on to the Camera’s Orientation. :-)

L = thisComp.layer("Null 1");
[Math.atan2(-L.toWorldVec([0,0,1])[1],L.toWorldVec([0,0,1])[2]),Math.asin(L.toWorldVec([0,0,1])[0]),Math.atan2(-L.toWorldVec([0,1,0])[0],L.toWorldVec([1,0,0])[0])]*180/Math.PI;

If Rotation and POI are neutral, it’ll take the same orientation as the null… then you can offset it using POI or Rotation.

You can’t scale a camera, so no need for an expression on the scale.

It can also be written for a parented camera. In other words, to position and orientate the camera to the position and orientation of Null 1, when it’s actually the child of Null 2, but the expression gets a little bit more complicated. Let me know if you’re interested.

218 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Interviewed on the Envato Notes blog
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Author had a File in an Envato Bundle
  • Has been a member for 6-7 years
  • Brazil
+5 more
yocreative says

Historic thread Felt! Thanks a lot for share it!

145 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
didgi says

How to wiggle a layer at a certain angle

 angle = 45;
 w = wiggle(3,100) - value;
 a = degreesToRadians(angle);
 x = w[0] * Math.cos(a);
 y = w[0] * Math.sin(a);
 value + [x,y]

Edit: Nice. Thanks, Didgi… I’ll link it to the first post.

Or how about the same using a vector instead of an angle?

vec = [1,1];
w = wiggle(3,100) - value;
value + w[0] * vec;

-f.

5030 posts
  • Community Superstar
  • Elite Author
  • Community Moderator
  • Sold between 100 000 and 250 000 dollars
  • Author had a File in an Envato Bundle
  • Beta Tester
  • Has been a member for 5-6 years
+6 more
felt_tips Volunteer moderator says

Wiggle position in a certain angle angle = 45; w = wiggle(3,100) – value; a = degreesToRadians(angle); x = w0 * Math.cos(a); y = w0 * Math.sin(a); value + [x,y]

Nice. Thanks, Didgi…

Or how about the same using a vector instead of an angle?

vec = [1,1];
w = wiggle(3,100) - value;
value + w[0] * vec;
by
by
by
by
by
by