PKAMRM55 BlenderBatchExporter/__init__.py"""Batch process blend files""" __version__ = '0.1' PKAMm&BlenderBatchExporter/batchExportObj.py#!/usr/local/bin/python3 import os, subprocess, argparse parser = argparse.ArgumentParser() optional = parser._action_groups.pop() required = parser.add_argument_group('required arguments') required.add_argument('--input', '-i', help = "path to a folder containing .blend files", required = True, type = str) required.add_argument('--output', '-o', help = "path to the folder to output converted files to.", required = True, type = str) optional.add_argument('--scale', help = "amount to scale the geometry by", type = float, default = 1) parser._action_groups.append(optional) args = parser.parse_args() for file in os.listdir(args.input): nameExt = os.path.splitext(file) if nameExt[1] == ".blend": sourcePath = os.path.join(args.input, file) outputPath = os.path.join(args.output, nameExt[0] + ".obj") bashCommand = f'/Applications/Blender/blender.app/Contents/MacOS/blender --background {sourcePath} --python exportObj.py -- {outputPath} {args.scale}' subprocess.check_call(bashCommand.split()) PKAM/Hm!BlenderBatchExporter/exportObj.pyimport bpy, sys argv = sys.argv argv = argv[argv.index("--") + 1:] bpy.ops.export_scene.obj(filepath = argv[0], use_selection = True, use_triangles = True, global_scale = float(argv[1])) PKAM V55*BlenderBatchExporter-0.1.dist-info/LICENSEThe MIT License (MIT) Copyright (c) 2018 Oliver Dew Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. PK!HJVSa(BlenderBatchExporter-0.1.dist-info/WHEEL HM K-*ϳR03rOK-J,/RH,rzd&Y)r$[)T&UD"PK!Hs+BlenderBatchExporter-0.1.dist-info/METADATAmn0 y @)1(MkZKI9.loD8;T$hubdahH(Oޣf0%K.(uTEoPu:LY|}ĂK_Ҙr|6ScA,_InQEY;%Y9L/Luׁ͂1{6PK!H ``)BlenderBatchExporter-0.1.dist-info/RECORD9sPz/@ WWYaP0 &'L4tɪ4kP <˚EU$"@AZBoɴT`ن)첋H95,gh=^x?L-MW tlZ nE45g2Lѝ=#FY;qUS,y0ŕ# M$yZYVz6\*og{j8 #ގ$j/5Af 3,N"0^-:I+lى! :x׻*☛J1T/%m53N阫QeK8X0 fPKAMRM55 BlenderBatchExporter/__init__.pyPKAMm&sBlenderBatchExporter/batchExportObj.pyPKAM/Hm!BlenderBatchExporter/exportObj.pyPKAM V55*BlenderBatchExporter-0.1.dist-info/LICENSEPK!HJVSa(A BlenderBatchExporter-0.1.dist-info/WHEELPK!Hs+ BlenderBatchExporter-0.1.dist-info/METADATAPK!H ``) BlenderBatchExporter-0.1.dist-info/RECORDPKO