232 posts
  • 4 Years of Membership
  • Affiliate Level 5
  • Author Level 5
  • Collector Level 2
+2 more
WebRa
says

Thank you so much felt! :)

208 posts
  • Affiliate Level 5
  • Author Level 5
  • Collector Level 2
  • Most Wanted Winner
+3 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! :)

3022 posts aspire to create - create to inspire
  • Meetup Participant
  • Weekly Top Seller
  • Top Monthly Author
  • Trendsetter
+14 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]
208 posts
  • Affiliate Level 5
  • Author Level 5
  • Collector Level 2
  • Most Wanted Winner
+3 more
Leupsi
says

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

3022 posts aspire to create - create to inspire
  • Meetup Participant
  • Weekly Top Seller
  • Top Monthly Author
  • Trendsetter
+14 more
Creattive
says

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

kein Problem, immer wieder gern :)

666 posts
  • Weekly Top Seller
  • Trendsetter
  • Featured Author
  • Featured Item
+8 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

5327 posts
  • Elite Author
  • Moderator
  • Weekly Top Seller
  • Top Monthly Author
+13 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
  • Elite Author
  • Top Monthly Author
  • Author Level 9
  • Affiliate Level 5
+12 more
yocreative
says

Historic thread Felt! Thanks a lot for share it!

155 posts
  • 5 Years of Membership
  • Affiliate Level 1
  • Author Level 6
  • Collector Level 2
+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.

5327 posts
  • Elite Author
  • Moderator
  • Weekly Top Seller
  • Top Monthly Author
+13 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;
by
by
by
by
by
by