Copy link to clipboard
Copied
Can I get size (on image x and y) of arbitrary shape?
right click on the scale property, change the unit to pixels, and you will see the pixel measurements
Copy link to clipboard
Copied
right click on the scale property, change the unit to pixels, and you will see the pixel measurements
Copy link to clipboard
Copied
And how use this value in expressions?
Copy link to clipboard
Copied
fenevAlex wrote
And how use this value in expressions?
It depends entirely on what you are trying to do. We need a lot more of a workflow and design goal description,
Copy link to clipboard
Copied
I want to draw this image.
I have just size of background and number of copies in row.
Copy link to clipboard
Copied
I would use 2 instances of repeater shape operator and set the numbers until I have a fit.
Copy link to clipboard
Copied
No. User must have possibility change number of copies in row.
And there should be no distance between the stars like on my image.
Copy link to clipboard
Copied
Roei has already answered your question.
Explain in detail what you need to do to be able to give you a solution with expressions or not.
Copy link to clipboard
Copied
Easy way to make that work. Draw your star shape layer, press UU to reveal all modified properties and you'll get this:
I can see the inner and outer radius. Those dimensions don't matter yet. I can also see that the position is not at the default position so it needs to be reset. Do that and you get this:
The anchor point is exactly in the center of the star.
Now decide the number of columns you want in your project. Your example shows 8 so we'll go with that. What is the comp size? Unless you are an expert in video compression and frame rates you have no business making custom composition settings so let's say the comp is standard HDTV at 29.97 fps:
The next step is to divide 1920 by 8 and that is 240. Half of 240 is 120. The boundary of the star is a square so the anchor point of this layer needs to be at 120, 120. Set the position to that, or if you are going to need to keep the Anchor Point in the center to keep things lined up with other layers in the comp you can adjust the Transform Polystar 1> Position or Anchor Point to put the center of the star at 120, 120 in the comp. Do that by subtracting half the comp width and half the comp height from the X and Y value and then adding 120 to each. If you are using Transform Polystar1>position the values will be -840, -420. If you want to use Transform Polystar 1>Anchor Point the value is 840, 420. You'll end up with something like this:
We are still not worried about the size of the star. The next step is to add a Shape Layer Repeater, then duplicate it so you end up with something like this:
Only two steps to go. First set the bottom Transform Repeater 1 to 0, 240, then set the top repeater to 240 (remember 1920 / 8 = 240) and 0, then set the number of copies to 8 for the top and 5 for the bottom. If you want the stars to be precisely 240 pixels wide set the outer radius so 120 and the inner radius to something like 50 and you'll get this.
The last step is to fine-tune the size and shape of the stars. You can't get 5 rows to fit in a standard HD comp because 8 X 5 is not equal to 16 X 9, so if you need the stars to be in a specific aspect ratio you'll have to do the math. You can see all off the stars on this shape layer by scaling it down a bit or by making it 3D and moving the layer or the camera around in 3D space.
I hope this helps. You could eyeball this in about a minute, or do the math and make it perfect in about 3.
Copy link to clipboard
Copied
Thank you. Will use math.
Copy link to clipboard
Copied
I can't believe this is so hard. When I go to edit the shape, I am unable to view the width & height in pixels. If I right-click on the scale property as Roei recommended, I am unable to change the unit to pixels. Also, if I go to Window to open the Properties palette, it does not exist. Any ideas?
Copy link to clipboard
Copied
Better shot of the missing dialog missing pixels.