Activity › Forums › Adobe After Effects Expressions › Expressions for shapes
-
Expressions for shapes
Posted by ayat fatima on November 21, 2020 at 9:01 amHHow can i add text into a shape and how can i add more than one shapes 8n a single shape layer at different positions?
ayat fatima replied 5 years, 5 months ago 2 Members · 3 Replies -
3 Replies
-
ayat fatima
November 22, 2020 at 4:14 amVar shapeGroup = shapeLayer.property(“Contents”).addProperty(“ABDE Vector Group”);
Var num=5;
Var s=200.0;
For(var i = num; i<=num; i++)
.{
CreateEllipse(shapeGroup, 100);
;
.}
Function CreateEllipse(shapeGroup, size)
{
Var ellipse=shapeGroup.Property(“Contents”).addPropertt(“ABDE Vector Shape – Ellipse”);
Var ellipseSize=ellipse.property(“size”).setValue([size, size]);
Var myProperty = shapeLayer.position;
MyProperty.setValue ([s, 450,0]);
S=s+200.0
}
I’m using this code to create 5 shapes in one layer using loop. But it is creating only one shape in the shape layer… Can anybody help me that why is it heppening?
-
Peter Robertson
November 22, 2020 at 6:48 amHi
Your expression
For(var i = num; i<=num; i++)
Is starting its count at 5 so it can’t loop any more.
You should have
For(var i = 0; i<=num; i++)
Peter
-
ayat fatima
November 22, 2020 at 11:37 amTThank You so much for your time…
I’ve corrected the mistake but still it is not working.
Reply to this Discussion! Login or Sign Up