Copy link to clipboard
Copied
Hello!
I want to perform a time consuming operation on a button click and not block the whole application. Usually SDKs have for that onProgress methods or something, that shows progress bar. I tried PF_PROGRESS but this worked only in response to PF_Cmd_RENDER, this didn't work during PF_Cmd_USER_CHANGED_PARAM. The first question is, was I doing something wrong or it was a correct behaviour?
Then I created my own scheduler using AEGP API for idle hook. But I need to know a unique effect instance id. And I can't keep it in sequence data because sequence data can be copied and then id becomes not so unique. So, the second question is - does SDK have such unique identifier, I didn't find. I would like SDK provided such. Basically I want to keep non-serializable objects for effect instance, it's ok that won't be saved to disk. Is there a way to do this?
Copy link to clipboard
Copied
I don't think so. What you describe is exactly the scenario why most computationally intense effects use their own custom editors and indeed lock the whole application (or at least visually block it).
Mylenium
Copy link to clipboard
Copied
well... that's a bit of a thing...
on previous AE versions, you'd want to store the comp's item ID, layer's ID, and effect index on that layer. when your long process is done, scan the project for these id's to locate the desired effect. HOWEVER, if the effect has changed index in the mean time, you might confuse it with another instance. hence, enter some additional identifiers you might want to use, like some UID stored in the effect. (eaisest way is to create some invisible param you who's name you can change on the fly. the name change does't save with the project, and is set to the default for every now instace. i'm not sure about copy/pasting though...)
in the latest AE version, sequence data has changed because of the new multi-processing infrastructure, so sequence data is uniqe for each render thread. i didn't dive to the full depth of it yet, but perhaps some of the new callbacks in the sequence data suite can help pinpoint a specific instance. same goes to the new AEGP_ComputeCacheSuite1, which i hope can help identify a specific instance.