well... i don't know how these components work together, but i have a few thoughts in regards to all you've written here.
since in AE there are separate threads for rendering, and one thread for ui, each of these separate threads is independent of the others. render threads are, of course, forbidden from changing the project, and are only good for rendering puposes (or sending analytics over to the ui thread).
the only thread allowed to change the project is the UI thead.
having said that, what are the concurrent scripts you're running? if they're render scripts, then there shouldn't be a problem operating in parallel. if they're "project manipulation" scripts, why are they concurrent?
having asked that, i'll continue assuming you have your good reasons.
as for having multiple python instances per process. if i understand you correctly, you mean by "process" you mean "ae program instance"? meaning, you're talking about 1 ae process talking to multiple python processes, right? and not, say, multiple instances of ae are open with the same project and you wish to use data from one as valid on the other...
i'll assume you're not INSANE and go with the former assumption...
so, i see no problem transfering ae stuff like an AEGP_ItemH between python processes, as all of these objects are references to some opaque data struct ae owns, so the reference remains valid and there no memory owned by one process travelling to the other.
the thing to consider, though, is the lifespan of each of these items. officially, you shouldn't trust these objects beyond the scope of a single AE call. (i.e, from the beginnig of an idle_hook or render call, until that call returns to ae)
some of these items invalide immediatly, some seem to stick around. i've used an AEGP_ItemH over the span of a whole AE session, and it remained valid. AEGP_LayerH seems persistant over the session as well. AEGP_EffectRefH on the other hand, explodes as soon as the call is done...
i'm not saying some items are guaranteed to stay valid throughout a session, as the docs don't mention it, but that's my experience with them.
so how does that concerns your development? i don't know the life span of your scripts. which means:
1. if a script is born and dies within the same AE call, all items aquired by it are valid thoughout it's lifespan. if it sticks around across AE calls, some item types may invalide in between.
2. if one script passes an item to another, and the other script lives beyond the scope of the first script's launching AE call, some of the passed items will have invalidated between AE calls.
3. items need to be disposed of. meaning, if a script passede an item onto another, then the first script exits and disposes of the checkout items it had, the passed ones will become invalid. again, these items are references to some internal AE data. it's not a copy of the data itself.
4. scripts may do contradictory things, so one script may try to act on an item already invalidated by another. for example, one script may try to access some layer it has a handle to, after a concurrent script had deleted it.
so i didn't answer your original question, but i hope my thoughts here can help.
and oh, BTW, are you familiar with ExtendScript external objects?
take a peek at "C:\Program Files (x86)\Adobe\Adobe Utilities - CS6\ExtendScript Toolkit CS6\SDK\Samples\cpp".
you can create a c++ plug-in that adds capabilities to AE's javascript. when your functions are called, it invokes the c++ plugin along with the call data, the plugin does on the c++ side whatever it wants, and returns the result back to javascript.
i don't know how that plays into your work scheme, but maybe it will spark your imagination... say, run python code from within a regualr AE script 🙂
... View more