PKmBMAUVV BlenderBatchExporter/__init__.py"""Batch process blend files""" from .batchExportObj import main __version__ = '0.4' PKmBMuN&BlenderBatchExporter/batchExportObj.py#!/usr/local/bin/python3 import os, subprocess, argparse, inspect, pkg_resources def main(): pathToPythonScript = pkg_resources.resource_filename(__name__, "/exportObj.py") 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('--blender', '-b', help="path to the Blender command line tool. Defaults to /Applications/Blender/blender.app/Contents/MacOS/blender", type=str, default='/Applications/Blender/blender.app/Contents/MacOS/blender') 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'{args.blender} --background {sourcePath} --python {pathToPythonScript} -- {outputPath} {args.scale}' subprocess.check_call(bashCommand.split()) if __name__ == '__main__': main()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])) PK!H7|&+6<3BlenderBatchExporter-0.4.dist-info/entry_points.txtN+I/N.,()JJ,Ip(/*OʲuIKI-rBY&fqqPKAM V55*BlenderBatchExporter-0.4.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!HSmPO(BlenderBatchExporter-0.4.dist-info/WHEEL HM K-*ϳR03rOK-J,/RH,rzd&Y)r$[)T&UrPK!Ha&+BlenderBatchExporter-0.4.dist-info/METADATATn0 }Wkmw lXX@eɖ&K|I/[Isy,;ܢB1ؒWTbrVơaǺ=4UMKQZ vBeUiGQ!\٤a(qVi.2-},.WߖlҸRVRBW1()r*| lA[#?\+Q.ض\D վf[+vr1oa_xq/>YU^U.`뢡^?]0v2Ln`\%[ thg:-f7f\"l.'=c0n"lL/O!M.]ugFsQ{s W'#+qħh!&VYȘ֏W](st[=A ]VAN9L:KVh*,ESi|i4oIqߕs4 lj3: ?J5}֋,Ki!mmsvHF'ax%V}RQJպg9PK!HU)BlenderBatchExporter-0.4.dist-info/RECORD9@|>Krr( "P- pڭ-7Wi.P$ܵ=AgԸ&I0Tېõ3?FU'WrN*.GNVvJٖӓށ'YOX 8})Mo:D=)7 옷ïPKmBMAUVV BlenderBatchExporter/__init__.pyPKmBMuN&큔BlenderBatchExporter/batchExportObj.pyPKAM/Hm!큱BlenderBatchExporter/exportObj.pyPK!H7|&+6<3BlenderBatchExporter-0.4.dist-info/entry_points.txtPKAM V55*3BlenderBatchExporter-0.4.dist-info/LICENSEPK!HSmPO( BlenderBatchExporter-0.4.dist-info/WHEELPK!Ha&+F BlenderBatchExporter-0.4.dist-info/METADATAPK!HU)BlenderBatchExporter-0.4.dist-info/RECORDPK