Thanks - the first-listed script was basically what I was trying to do.
In case anyone else is looking to do the same, it needed a bit of hacking: most of the for loops needed me to add `pairs()`. E.g.
- Code: Select all
for i, input in tool:GetInputList(inpType) do
became:
- Code: Select all
for i, input in pairs(tool:GetInputList(inpType)) do
I also changed:
- Code: Select all
return strText:gsub("(%W)","_")
to:
- Code: Select all
return strText:gsub("%s+","_")
and in AddTrailingSlash() I changed the default to be "/", as I'm on Linux.
(The regex change was due to trying unicode. The Linux filesystem copes fine if everything is in UTF-8; being as the data is coming from csv there is no LF/CR, so I think I could've dropped the gsub() completely, but decided to replace whitespace with underline just in case.)
In my save node I set it to PNG, and set the filename to "/tmp/afusion_test/0000.png", and checked "Create folder during render". The script created these three directories:
/tmp/afusion_test/01_Hello_World!/
/tmp/afusion_test/02_日本語だ!/
/tmp/afusion_test/03_ABC/
(I've only tried a single column csv file, so far.)