Skip to main content
Inspiring
Jul 11, 2025 11:17 AM UTC
Question

Reset parameter using the SDK

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?

2 replies

James Whiffin
Legend
Jul 20, 2025 5:47 AM UTC

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. 

Translate
octaviosaAuthor
Inspiring
Jul 21, 2025 7:12 PM UTC

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 .

Translate