199 posts
  • Has been part of the Envato Community for over 3 years
  • Has referred 100+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+2 more
WebRa says

Thank you so much felt! :)

206 posts
  • Has referred 200+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Won a Most Wanted contest
+2 more
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! :)

2650 posts aspire to create - create to inspire
  • Elite Author: Sold more than $75,000 on Envato Market
  • Helped several times protecting Envato Market against copyright violations
  • Has sold $125,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
+10 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]
206 posts
  • Has referred 200+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Won a Most Wanted contest
+2 more
Leupsi says

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

2650 posts aspire to create - create to inspire
  • Elite Author: Sold more than $75,000 on Envato Market
  • Helped several times protecting Envato Market against copyright violations
  • Has sold $125,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
+10 more
Creattive says

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

kein Problem, immer wieder gern :)

622 posts
  • Had an item featured on Envato Market
  • Made it to the Authors' Hall of Fame
  • Contributed a free file of the month
  • Has sold $40,000+ on Envato Market
+6 more
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

5257 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
+11 more
felt_tips 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.

219 posts
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 100+ items on Envato Market
+10 more
yocreative says

Historic thread Felt! Thanks a lot for share it!

152 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+3 more
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.

5257 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
+11 more
felt_tips 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;

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by