-
Position layers in groups
I’m trying to setup a system for some bar graphs I need to animate. I have everything done but I’m looking to add another option to help streamline my setup, but I’m not sure how. Basically I have the following position expression on all my layers, which allows me to keep the number of bars I have centered on the screen and controls the spacing between each one. Ideally I would like to add 2 additional slider controls, one that allows me to choose the number of groups and another that allows me to adjust spacing of the bars in the group. So instead of having multiple single bars spaced evenly I can have something like 3 bars spaced closely together then a bigger space then 3 more bars and so on. Like this. And hopefully the same expression can go be used on each layer so I don’t have to modify the layers depending on the set up.
||| ||| ||| ||| or like |||| |||| |||| or || || || || ||
Thanks,
Brian Holzknecht
y = value[1];barNum = thisLayer.name.split("bar ")[1];
spacing = thisComp.layer("Layout").effect("Spacing")("Slider");
barTot= Math.floor(thisComp.layer("Layout").effect("number bars")("Slider"));
compCenter = thisComp.width/2+(barNum*spacing);[compCenter-(spacing*(barTot/2))-(spacing/2), y]