Understanding PF_ADD_POINT related macros e.g. INT2FIX
I have no issues settings values when I declare a param in ParamSetup(). The problem is that I get odd behaviour when I try to set the point value in UserChangedParam().
I wish to use x and y in the same manner as the default params to PF_ADD_POINT () (i.e. a percentage of the comp). I do not wish to use the new x,y params to pass absolute x,y co-ordinates.
params[aeid]->u.td.x_value = (x << 16);- same as x, INT2FIX
params[aeid]->u.td.x_value = FIX2INT(x);Always 0
params[aeid]->u.td.x_value = (PF_Fixed)(x);Always 0
params[aeid]->u.td.x_value = asdkP->params[aeid]->u.td.y_value;- This works, so clearly I am setting the right flags.
asdkP->params[aeid]->u.td.y_value = INT2FIX (y);- Here y transforms to absolute y value.
Also, when I print
u.td.x_valuethat Adobe uses, it is nothing like the value passed in. For, reference the PF_ADD_POINT does this -
def.u.td.x_value = def.u.td.x_dephault = (X_DFLT << 16);
