I am trying to animate a specific stacked progress bar animation and I'm unable resize rectangles without resizing from the center, which will mess up the animation. Additionally, if I use a transform node to pivot the resizing, the rounded corners of my rectangle don't scale as intended. I have linked a small image sequence (I wasnt allowed to post videos) of what I'm trying to animate and showcasing the problem, because I find it difficult to describe with text: The video can be found on my reddit thread of the same issue.
Does anyone know how I can stretch the shape as intended or have any other ideas of how I can go about doing this animation?
My first suggestion would be to do this with three seperate shapes: two circles for the ends of the shape and then a rectangular polygon mask instead of a rectangle mask. Connect the x-position of the right hand points to the x-position of the right circle so that if you move the right circle, the polygon will grow with it to fill the bar.
Otherwise you will need to make the rectangle mask center and its size react to each other, because there is no way (currently) to scale from another position than the center. Or make a negative mask for the left side of the slider and then put the center of the rectangle on the center of the left circle and just grow it from there and cut out the left part.
Or you can make some sort of calculation where the center of the rectangle moves depending on the width of the shape. This sometimes looks a bit glitchy when making it interactive, but it should be doable. Maybe even add a seperate new width slider that influences both the position and the width of the rectangle mask.
Those are the first three options from the top of my head.
A 4th alternative is to use the new shape system, since it has x/y off-sets by default which are easier to manipulate with expressions. Just copy/paste the following in your comp and you should be good to go.
While taking a break from the computer I actually thought of the first solution (2 circles and one rectangle) but imagined it would be difficult to keyframe. But wow! I didn't expect this amount of help from you! The 4th solution was super easy to use and pretty much works perfectly for what I need. And the best thing is its shortcomings were able to be dealt with within the fusion page. I have been playing around with it in fusion for 30+ minutes creating different kinds of cool looking progress bars and the best thing is that it works just like a regular old fusion mask. I can't express my gratitude enough towards to you. Davinci Resolve is a really cool tool!