From my standpoint, the need for generating a smart material file is more about recovering past work than it is looking towards the future. My company would like to extract previously made materials from potentially thousands of Painter files, but it appears for now at least that there is no good solution through scripting. I'd be interested if anyone out there has been faced with a similar task, and how they might have approached it. Through the current API, I see that I can get a full listing of layers/folders present in a file, as well as blending modes. Using the two in combination I can sort of roughly determine separate materials. The main challenge now is finding a way to separate them into individual units as we attempt to populate an internal library with previously created materials.