Author Topic: Export layers as .spsm  (Read 1805 times)

Is it possible through scripting to specify any number of layers from a painter document and export them as a ".spsm" file?

That's not possible at this point.

I'd prefer to generate my own json description of layers personally, in lieu of smart materials. That removes the redundancy of the embedded resource copies, and makes for more friendly pipeline building blocks. That would of course require a complete get / set of the document layers.

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.

"a smart material file is more about recovering past work"

That's an excellent point, and one that's probably often overlooked (I know I have). That tends to be what I don't like about smart materials since all my tools originate from designer.. but there's lots of valid use cases where smart material data is quite valuable.

Best of luck!