数据处理相关记录

图像处理:ImageMagick
批量压缩纹理图片

 
 for root, dirs, files in os.walk(dir_path):
        for file in files:
            if re.search('\.JPG|\.jpg|\.png', file) is not None:
                cmd = "convert.exe  -quality 10% {0} {0}".format(os.path.join(root, file))
                os.system(cmd)
                print(cmd)

模型处理:OpenSceneGraphic
批量将osg模型转为obj格式

 
    for root, dirs, files in os.walk(dir_path):
        for file in files:
            if 'osg' in file:
                cmd = r'osgconv {0}.osg {0}.obj'.format(os.path.join(root, file[:-4]))
                os.system(cmd)
                # print(cmd)

留下评论

您的邮箱地址不会被公开。 必填项已用 * 标注