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!
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
...Copy link to clipboard
Copied
errr... i'm not entirely sure. perhaps PF_ValueDisplayFlag_PIXEL would do
the trick?
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.
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...
Copy link to clipboard
Copied
Thanks for detailed answer!
I'll try methods you described.