1 person found this helpful
Not specifically sure what might be causing the issue, but have you tried using a try/catch to debug it? This usually works for me in narrowing down the specific error in addition to the line it happened at. It may reveal the deeper problem causing the issue.
/// Your code here
alert("Error at line: " + err.line.toString() + "\n\n"+err.toString());
Thank you David - that indeed did reveal that for some reason the next time the list box tried to populate, there was "invalid image data". I can only assume that on first load, the relative path that the script is using toget the images is valid, but afterwards it forgets where it is, and the path is no longer valid. The images themselves are in the "ScriptUI Panels" folder and are small PNG files. I guess I'll have to put an absolute path to the images (this works).
My images were in my ScriptUIPanels folder, and I was using a relative path to access them, e.g.
myRow.image = File("myIcon.png");
Upon initialisation of the script, After Effects assumes relative paths like this are the folder from which the script is being run, in this case ScriptUI Panels. However after initialisation, this changes to the Support Files folder, hence the reason why it couldn't find my images.
If I declare a variable
AE_SCRIPTS_FOLDER_PATH = Folder.current.fsName;
upon script initialisation, I can use this as an absolute path to access my images from wherever I like in the script.
Thanks for the assistance!