Skip to main content
Inspiring
July 11, 2025
Question

Reset parameter using the SDK

  • July 11, 2025
  • 1 reply
  • 132 views

Is it possible to reset a specific parameter, like PF_Param_FLOAT_SLIDER or PF_Param_POINT_3D, using the SDK, just as if the user have done it through the UI?

 

I'm currently doing a workaround by copying the default value to the normal value like this:

paramDef->u.fs_d.value = paramDef->u.fs_d.dephault;

But this approach doesn't work for PF_Param_ARBITRARY_DATA, nor for the special case with PF_Param_POINT_3D initialized in the center with (50, 50, 0).

 

Is there any other way?

1 reply

James Whiffin
Legend
July 20, 2025

For the PF_Param_POINT_3D, you can spoof it by getting the composition dims and setting it to 50,50, or whichever the % based defaults were. Resetting an arb, I set it to the specific struct it gets initialised to in param setup. 

octaviosaAuthor
Inspiring
July 21, 2025

This is exactly what I ended up doing. I created a templated function for the arb data, and everything else copied from the dephault. I had to check for the 50, 50 for the 3d point. Also I used streams to reset the values because of a bug AE has, where hidden values do not change when using the ParamDef .