Copy link to clipboard
Copied
So I have a composition with a single image that has this expression attached to its position:
[thisComp.width - 100, thisComp.height - 100]
All this expression does is makes my image to be located in the right bottom corner. That's it.
But when I try to use this composition in other composition, my children image is scaled together with the parent scale:
How do I make the image be located in right bottom corner, but do not scale with the parent?
Copy link to clipboard
Copied
Your workflow seems a bit odd, and all your screenshots are telling me is that you have a layer selected and put in the bottom left corner of one comp, then the comp has been placed in another comp and scaled-down unequally causing the graphic to be distorted. That's normal. I don't see any parenting. All I see is scaling. Collapsing transformations may reveal the rest of the arrow graphic but if you want to counteract the scale change in the nested comp you'll have to use an expression in the first comp, the one with the arrow to tie that layer's scale property to the scale property of the nested comp in the main comp. Did you follow that? You create an expression in the scale property of the arrow graphic that looks at the scale of the nested comp in the main comp and reverses the changes to keep things proportional. If you want the arrow to get bigger or smaller but remain undistorted, that's another calculation.
If your main comp is called Main Comp and the first comp, the one with the arrow graphic is called Graphic Comp, and you wanted the arrow to always be the same size that it is in the Graphic Comp your expression would look like this:
newScale = comp("Main Comp").layer("Graphic Comp").transform.scale;
nx = newScale[0];
ny = newScale[1];
x = value[0] * 100;
y = value[1] * 100;
[x / nx, y / ny]
Copy link to clipboard
Copied
Thank you. This is exactly what I wanted! I also created a Slider Control "Index" in my "Graphic Comp" and made "layer" method use this "Index", so that I could use assign different indexes through Essential Graphics and because of that be able to use multiple "Graphic Comp" comps in my main composition
Find more inspiration, events, and resources on the new Adobe Community
Explore Now