Skip to main content
Richard Rosenman
Inspiring
February 1, 2019
Question

Preview window zoom factor

  • February 1, 2019
  • 1 reply
  • 650 views

Hi all;

Is there a constant that holds the 'zoom' (scale) level of the preview window?

For instance, I'm drawing a line with a thickness value and if I set the zoom to 50%, it still holds the same thickness as that of 100%. A 'zoomFactor' constant would allow me to reduce the thickness (and other other features) according to the zoom level, as it should.

Or, is there an entirely different way to go about this?

Thanks,

-Richard

This topic has been closed for replies.

1 reply

Community Expert
February 1, 2019

we're talking custom UI in the comp window, right? because if we're talking

regular rendering, then i'd say adjusting your render to the view is a

mistake.

so, assuming we're talking UI:

there is no zoom param to read, however, you can deduce the zoom level.

lookup "source_to_frame". it converts UI coordinates to layer coordinates,

taking only zoom and offset into account. (as if it were the layer panel

instead of the comp window)

convert and , and from the distance between the two results

you can tell the zoom level.

On Fri, Feb 1, 2019 at 2:48 PM richardr69178942 <forums_noreply@adobe.com>

Richard Rosenman
Inspiring
February 1, 2019

Hi;

No, I'm talking about just the regular preview window - no custom UI. How do I scale my generated content according to the preview window zoom level if I don't have a scale factor constant?

The line thickness example I gave you is a good example.

Thanks,

-Richard

Community Expert
February 1, 2019

oh boy...

i'm not sure there is a way, but what is the goal here? you can't tell a

ram preview from a render, and in both cases the zoom level where a frame

was rendered is not the zoom level it might be presented in later. a view

can be scaled after a preview was rendered, and your effect won't be called

again because the cache is valid. in the case of plain old rendering, the

context in which the rendered image would be presented will most likely

differ in size then the AE comp window...

On Fri, Feb 1, 2019 at 3:04 PM richardr69178942 <forums_noreply@adobe.com>