Project1
标题:
SAI材质自动导入程序
[打印本页]
作者:
叶子
时间:
2009-12-9 13:13
标题:
SAI材质自动导入程序
本帖最后由 叶子 于 2009-12-9 13:19 编辑
研究SAI材质的副产品,用途不大,就是在导入材质的时候省了一点麻烦
用途:
自动将SAI程序文件夹下blotmap, brushtex, elemap, papertex四个文件夹内的bmp文件信息加入到相应的.conf文件中,不再需要手动设置conf
使用方法:
在SAI程序文件夹下运行即可。如果你有装ruby,可以直接运行下面的ruby脚本;否则可以使用我上传的压好的exe。(其实贴到RM的脚本编辑器中运行也行囧)
在Windows Vista下测试通过,虽然文件名中数字的排列有点诡异,不过那是小问题,小问题哈哈..
=begin
AutoConfig for SAI
Usage:
Must have ruby installed or obtain the compiled exe version.
Place this script into the SAI program folder and run it.
It will populate the SAI .conf files with the textures in
blotmap, brushtex, elemap and papertex.
Disclaimer:
Save your original .conf files before you use the script.
Don't blame me for destroying ur precious SAI lol.
=end
# hash map to store info about how to populate the .conf files
# key = folder name, value = [config file name, id]
folders = {}
folders['blotmap'] = ['brushform.conf', 1]
folders['elemap'] = ['brushform.conf', 2]
folders['brushtex'] = ['brushtex.conf', 1]
folders['papertex'] = ['papertex.conf', 1]
# clear the files
for config_pair in folders.values
File.open(config_pair[0], 'w'){}
end
# do the job
for folder in folders.keys
config_file = File.open(folders[folder][0], 'a')
Dir.chdir(folder)
begin
for texture in Dir.glob("*.bmp").sort
config_file.write("#{folders[folder][1]},#{folder}\\#{texture}\n")
end
ensure
Dir.chdir('..')
config_file.close
end
end
复制代码
exe压缩包下载:
autoconfig.rar
(1.41 MB, 下载次数: 127)
2009-12-9 13:13 上传
点击文件名下载附件
作者:
dukesward
时间:
2009-12-9 14:05
叶子前辈开始进军美工了啊...虽然咱不用SAI,还是支持你一下
作者:
y2443
时间:
2010-9-10 17:39
好东西 正烦怎么写个批处理 来搞这个呢
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1