your assumptions are correct.
you can't change add an effect to to a layer while your effect is in
mid-call.
it doesn't have to the effect o with javascript. it's just, as you said,
changing the scene while is operating on it.
the way to work around this:
have two plug-ins. an effect and an aegp.
have the effect call the aegp via a special suite (see "checkout" and
"sweetie" samples to see how that works), and set some data there.
don't have the aegp execute the changes just yet! store that data only!
let the effect finish it's execution and return.
now.
during idle_hook call, the AEGP checks for any messages left by the effect.
is new data present? god. execute it now that the effect is not in mid call.
TADA!
as for getPlatformData,
there are platform specific commands to get such data as the path to self
.dll, but you can just have the effect pass the desired data to the AEGP
when it sends it the message.