193 posts
  • Has been part of the Envato Community for over 3 years
  • Has referred 50+ members
  • Located in Australia
  • Has sold $10,000+ on Envato Market
+2 more
WebRa says

Thank you so much felt! :)

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

2301 posts aspire to create - create to inspire
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
  • Had an item featured on Envato Market
+9 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
  • Has referred 200+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Won a Most Wanted contest
+3 more
Leupsi says

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

2301 posts aspire to create - create to inspire
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
  • Had an item featured on Envato Market
+9 more
Creattive says

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

kein Problem, immer wieder gern :)

599 posts
  • Has referred 10+ members
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 1+ items on Envato Market
+5 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

5180 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Helps us moderate the forums
  • Provided great contribution to our forums
+12 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 100+ 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!

147 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
+1 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.

5180 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Helps us moderate the forums
  • Provided great contribution to our forums
+12 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