Copy link to clipboard
Copied
Hello,
I have 2 questions regarding parameters. For the sake of simplicity i will use a circle area idea as a toy example. let's say i have a parameter "radius" and a paramter "area". if the user changes the radius, i can detect that in PF_Cmd_USER_CHANGED_PARAM , compute and set the area value. questions:
1/ where is the best place to detect that change in case radius was driven keyframes (aka timeline change) ?
in PF_Cmd_UPDATE_PARAMS_UI call?
2/is there a way to retrieve the raw param value before it is downscaled by
in_data->downsample_x (and _y) ?
3/in my circle area example, is there a way to use "area" keyframes (with whip tool for example) but preventing the user from editing it ?...namely, i wanna expose "area" param as a read only param but that can vary in time (keyframes will be added programmatically).
thank you,
let's start by defning that sync thing, and then we can address the issues at hand:
you'd like 2 params to interact at all times.
1. during user interaction.
2. during timeline scrubbing.
3. during rendering.
i'm afraid that's not etirely possilbe, but there could be some workarounds that are a comprimse...
let's define the problems:
1. the leat of your problems: if both params are keyframable, they might have contaraditory keyframe settings. meaning, linear/ease-in-out/hold settings that even
...Copy link to clipboard
Copied
let's start by defning that sync thing, and then we can address the issues at hand:
you'd like 2 params to interact at all times.
1. during user interaction.
2. during timeline scrubbing.
3. during rendering.
i'm afraid that's not etirely possilbe, but there could be some workarounds that are a comprimse...
let's define the problems:
1. the leat of your problems: if both params are keyframable, they might have contaraditory keyframe settings. meaning, linear/ease-in-out/hold settings that even though the keyframes might be synced, the in between might be off sync.
2. even if you wanted to have one param be keyframelss, you'd want to have the values synced to the current time. but wahat exactly IS the current time? the time set in the comp UI at the moment? but what it that comp is a source for multiple layers in other comps with different time offsets? then you would have multiple "current times" at any given frame of the master comp. and what about rendering (which we will get to in a moment)? AE render multiple frames simultaniously, so you get multiple render competing over the value of their redspective "current time".
3. and now the biggie. once upon a time (before AE2015), you could change the value of a param even during rendering. it was fugly. it messed up the render cache. but you could do it.
nowdays AE prevents changing anything in the project from the render thread, so changing a param "on the fly" during rendering is no longer possible.
so what CAN you do?
1. use an expression instead of keyframes on one of the params. you can set it programatically during UPDATE_PARAMS_UI using AEGP_SetExpression. if that's good enough for you, it satisifies all of the above.
2. experiment with PF_PUI_STD_CONTROL_ONLY. it would make the param not keyframable (but maybe it would also make it not connectable via expression... so... experiment.)
3. experiment with PF_PUI_DISABLED. i think it would still allow the user to connect an expression to is, but won't allow the user to change that param manually.
Copy link to clipboard
Copied
Awesome ! I have experiments to conduct 😄
What about my 2nd question...is there a way I can retrieve the original param value before it gets scaled by in_data->downsample_x (and _y) ? I am using a 3d point param and i need extreme double precision. the latter is garanteed when there is no params downsampling. as soon as the user interacts with the comp at half/third... resolution, the 3d point param looses precision. thx for everything !
Copy link to clipboard
Copied
ah yes. get the param value using AEGP_GetNewStreamValue instead of the plain old checkout.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now