• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Absolute coordinates

New Here ,
Oct 05, 2018 Oct 05, 2018

Copy link to clipboard

Copied

Hi,

My question is about PF_Param_POINT_3D and PF_Param_POINT. Parameters of these types change values in case of layer resizing. Is it possible to use them as constant 2-dimentional and 3-dimentional values (invariant under layer size changes)?

Thanks!

TOPICS
SDK

Views

540

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 14, 2018 Oct 14, 2018

yes, according to documentation it should apply only to the said param

types, however, sometimes there's undocumented behavior, and i thought it's

worth checking because it's an easy test to set up.

i can't think of a ready made solution for the problem you describe. here

are a couple of workarounds:

1. create a custom param, with a custom comp UI. this way you can have it

do whatever you want.

2. add an expression to your point param (you can do the programatically),

divide the current position by the

...

Votes

Translate

Translate
Community Expert ,
Oct 05, 2018 Oct 05, 2018

Copy link to clipboard

Copied

errr... i'm not entirely sure. perhaps PF_ValueDisplayFlag_PIXEL would do

the trick?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 14, 2018 Oct 14, 2018

Copy link to clipboard

Copied

Thanks, Shachar,

Previously I thought that PF_ValueDisplayFlag_PIXEL flag is applicable only to PF_FloatSliderDef and PF_FixedSliderDef parameter types. Am I wrong in this statement? If it's applicable to PF_Param_POINT, could you please share the correct way to do this?

To be clear, I need PF_Param_POINT (or PF_Param_POINT_3D) parameter which I set to some value (x1, y1) and this value stays the same in case of any layer resizing. Currently if I resize layer in two times (w -> 2w, h -> 2h), point value will change to (2*x1, 2*y1). In other words I need 2d and 3d values in parameters which are independent from the layer dimentions.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 14, 2018 Oct 14, 2018

Copy link to clipboard

Copied

yes, according to documentation it should apply only to the said param

types, however, sometimes there's undocumented behavior, and i thought it's

worth checking because it's an easy test to set up.

i can't think of a ready made solution for the problem you describe. here

are a couple of workarounds:

1. create a custom param, with a custom comp UI. this way you can have it

do whatever you want.

2. add an expression to your point param (you can do the programatically),

divide the current position by the layer dimensions and multiply by some

factor. this way you'll get the same absolute coordinates even when

changing layer dimensions.

3. try the flag i suggested. maybe it will unexpectedly save the day...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 14, 2018 Oct 14, 2018

Copy link to clipboard

Copied

LATEST

Thanks for detailed answer!

I'll try methods you described.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines