Using multiple sliders/controllers?
hey guys. sorry first question going such simple 1 i'm pulling hair after 2 days of trying understand , modify skeleton template.
obviously enjoy learning , i've learned lot looking @ , modifying examples , reading "the" ae sdk tutorial on @ mactech, , documentation. i'm @ standstill here; how use multiple sliders , pass values render function?
or formulating differently; is using 2 separate iterate() functions 2 sliders way go, or should calculations both sliders in same function?
right i'm running 2 iterate() functions in row, different refcons , functions last 1 gets caught. i'm assuming it's because both use ¶ms[skeleton_input]->u.ld src , output as, well, output - second function overwriting first one.
i read in documentation, page 96, use this;
lines_per_iteratel = in_data->extent_hint.top - in_data->extent_hint.bottom;
total_linesl = 3 * lines_per_iteratel;
lines_so_farl = 0;
suites.iterate8suite()>iterate(
lines_so_farl,
total_linesl,
input_worldp,
&output>extent_hint,
refcon,
whizbangpreprocessfun,
output_worldp);
lines_so_farl += lines_per_iteratel; err(pf_progress(lines_so_farl, total_linesl));
but tbh i'm not quite getting it.
any takers?
edit: well, i'm getting values both sliders - maybe did before - can use them if sum them under same refcon used in iterate() function. seems need 1 iterate() function each slider?
hi janzakswe!
welcome forum!
:-)
i'll try put sense madness...
the iterate() function simple:
it hand 2 correlating pixels 2 buffers.
everything else you.
you don't have treat in input pixel input , output pixel output. if wanted to, use them in reverse. (but why that???)
you're more read output pixel's value , include in calculation before overwriting it. such case when said second iterate function overwrote first. obviously, because wrote new data output pixels while ignoring old data in them.
now how pass data of 2 sliders iterate function?
using refcon.
the refcon nothing void pointer, points structure or class.
it's not holy or sacred. change it. add data it, hold many separate values like. write poem in there. it's structure.
now, need 2 iterations or one?
i have no idea. it's matter of whether algorithmically have finish 1 pass base next 1 upon.
if possible, try consolidate of processing single iteration call, instead of multiple ones.
you'd have less overhead (the iteration function eats cpu on it's own).
i hope made things more clear you.
More discussions in After Effects SDK
adobe
Comments
Post a Comment