Mercurial > games > semicongine
changeset 849:c241b9e9a976
add: import-helpers for nimscripts
author | Sam <sam@basx.dev> |
---|---|
date | Sun, 03 Dec 2023 22:26:58 +0700 |
parents | 42c680897aab |
children | 013ed7a37709 |
files | semicongine/build.nim |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/semicongine/build.nim Sun Dec 03 01:48:55 2023 +0700 +++ b/semicongine/build.nim Sun Dec 03 22:26:58 2023 +0700 @@ -1,6 +1,8 @@ import std/strformat import std/os +import ./core/audiotypes + proc semicongine_build*(buildname: string, bundleType: string, resourceRoot: string, builddir="./build"): string = switch("experimental", "strictEffects") switch("experimental", "strictFuncs") @@ -40,3 +42,11 @@ exec &"powershell Compress-Archive * {outputfile}" cd(oldcwd) return outdir + +proc semicongine_import_mesh*(blender_file: string, output_file: string) = + assert blender_file.fileExists + let converter_script = currentSourcePath.parentDir().parentDir().joinPath("scripts/blender_gltf_converter.py") + exec &"blender --background --python {converter_script} -- {blender_file} {output_file}" + +proc semicongine_import_audio*(in_file: string, output_file: string) = + exec &"ffmpeg -i {in_file} -ar {AUDIO_SAMPLE_RATE} {output_file}"