-
Expression to keep object scaling from a specific point
I’m trying to get the right side black bar to stay attached to the right side of the white bar even after the text within the bar has been adjusted.
Currently this black bar is scaling in size depending on the text and I need it to continue doing so but in a way that it dosn’t mess with the animation of the black bar appearing from the right to left.
I have little to no knowledge of expressions in after effects but I can try and provide more information if needed.
Example: The Scaling with the default text used

Example: The Scaling with other text used

As you can see from the example above the Black bar has scaled correctly but is moving from the edge of the white bar. All anchor points are also at the top left of the white bar.
L=thisComp.layer("Names");
X=L.sourceRectAtTime().width;
Y=L.sourceRectAtTime().height;
P=thisComp.layer("Control").effect("Slider Control")("Slider");
[X,Y]+[P,P]