diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-07-20 20:43:48 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-07-20 20:43:48 -0700 |
| commit | 3ac1e5e5a9ebcb4beb2bfe149dd5095f2250f60d (patch) | |
| tree | d409eb8dfcca1b56dffe8c143a2c9028818d6d5d /build.rs | |
| parent | 365c2f8bdc217f33264e3aed394f67840a4c075d (diff) | |
yay Force-Push: yes Change-Id: Icb715692286c8560532ab73d32a49be8f485d790
Diffstat (limited to 'build.rs')
| -rw-r--r-- | build.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/build.rs b/build.rs index 7399346..ce74854 100644 --- a/build.rs +++ b/build.rs @@ -14,6 +14,7 @@ fn main() { fn process_all() -> std::io::Result<()> { process_shaders()?; process_textures()?; + process_models()?; Ok(()) } @@ -81,3 +82,24 @@ fn process_textures() -> std::io::Result<()> { Ok(()) } + +fn process_models() -> std::io::Result<()> { + for input in fs::read_dir("models")? { + let input_path = input?.path(); + if !input_path.is_file() { + continue; + } + + if let Some(Some(filename)) = input_path.file_name() + .map(|name| name.to_str()) + && filename.get(.. 1) == Some(".") + { + continue; + } + + println!("cargo::rerun-if-changed={}", input_path.display()); + } + + Ok(()) +} + |