# HG changeset patch # User sam # Date 1711209431 -25200 # Node ID ea9270ed03eac5eaf05f4b35e0cff25798ba631f # Parent e267983f5edf772bc7cc07434069743b0112a002 and even more cleanup of the repo diff -r e267983f5edf -r ea9270ed03ea scripts/blender_gltf_converter.py --- a/scripts/blender_gltf_converter.py Fri Mar 22 11:42:27 2024 +0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -import os -import sys - -import bpy - - -def runner(): - script_args = sys.argv[sys.argv.index("--") + 1 :] - for i in range(0, len(script_args), 2): - inputfile = script_args[i] - outputfile = script_args[i + 1] - if not os.path.exists(inputfile): - print(f"Input file '{inputfile}' does not exists") - quit(1) - if not outputfile.endswith(".glb"): - print(f"Output file '{outputfile}' is not a *.glb file") - quit(1) - - bpy.ops.wm.open_mainfile(filepath=inputfile) - bpy.ops.export_scene.gltf(filepath=outputfile[:-4], export_apply=True) - - -if __name__ == "__main__": - runner() diff -r e267983f5edf -r ea9270ed03ea semicongine/build.nim --- a/semicongine/build.nim Fri Mar 22 11:42:27 2024 +0700 +++ b/semicongine/build.nim Sat Mar 23 22:57:11 2024 +0700 @@ -7,7 +7,7 @@ import ./core/audiotypes import ./core/constants -const BLENDER_CONVERT_SCRIPT = currentSourcePath().parentDir().parentDir().joinPath("scripts/blender_gltf_converter.py") +const BLENDER_CONVERT_SCRIPT = currentSourcePath().parentDir().parentDir().joinPath("tools/blender_gltf_converter.py") proc semicongine_builddir*(buildname: string, builddir = "./build"): string = var platformDir = "unkown" diff -r e267983f5edf -r ea9270ed03ea tools/blender_gltf_converter.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/blender_gltf_converter.py Sat Mar 23 22:57:11 2024 +0700 @@ -0,0 +1,24 @@ +import os +import sys + +import bpy + + +def runner(): + script_args = sys.argv[sys.argv.index("--") + 1 :] + for i in range(0, len(script_args), 2): + inputfile = script_args[i] + outputfile = script_args[i + 1] + if not os.path.exists(inputfile): + print(f"Input file '{inputfile}' does not exists") + quit(1) + if not outputfile.endswith(".glb"): + print(f"Output file '{outputfile}' is not a *.glb file") + quit(1) + + bpy.ops.wm.open_mainfile(filepath=inputfile) + bpy.ops.export_scene.gltf(filepath=outputfile[:-4], export_apply=True) + + +if __name__ == "__main__": + runner()