| 
 
| 赞 | 0 |  
| VIP | 289 |  
| 好人卡 | 7 |  
| 积分 | 1 |  
| 经验 | 7622 |  
| 最后登录 | 2024-2-4 |  
| 在线时间 | 400 小时 |  
 Lv1.梦旅人 
	梦石0 星屑65 在线时间400 小时注册时间2005-10-24帖子634 | 
| 
本帖最后由 叶子 于 2009-12-9 13:19 编辑
x
加入我们,或者,欢迎回来。您需要 登录 才可以下载或查看,没有帐号?注册会员  
 研究SAI材质的副产品,用途不大,就是在导入材质的时候省了一点麻烦
 
 用途:
 自动将SAI程序文件夹下blotmap, brushtex, elemap, papertex四个文件夹内的bmp文件信息加入到相应的.conf文件中,不再需要手动设置conf
 
 使用方法:
 在SAI程序文件夹下运行即可。如果你有装ruby,可以直接运行下面的ruby脚本;否则可以使用我上传的压好的exe。(其实贴到RM的脚本编辑器中运行也行囧)
 在Windows Vista下测试通过,虽然文件名中数字的排列有点诡异,不过那是小问题,小问题哈哈..
 exe压缩包下载:复制代码=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
  autoconfig.rar
(1.41 MB, 下载次数: 127) | 
 |