mirror of
https://github.com/johndoe6345789/SDL3CPlusPlus.git
synced 2026-04-24 13:44:58 +00:00
feat(assets): add support for syncing MaterialX asset directories
This commit is contained in:
@@ -415,6 +415,10 @@ def _sync_assets(build_dir: str, dry_run: bool) -> None:
|
||||
("scripts/models", ["*.stl", "*.obj", "*.fbx"]),
|
||||
("config", ["*.json"]),
|
||||
]
|
||||
asset_trees = [
|
||||
"MaterialX/libraries",
|
||||
"MaterialX/resources",
|
||||
]
|
||||
|
||||
print("\n=== Syncing Assets ===")
|
||||
|
||||
@@ -438,6 +442,15 @@ def _sync_assets(build_dir: str, dry_run: bool) -> None:
|
||||
if not dry_run:
|
||||
shutil.copy2(src_file, dst_file)
|
||||
|
||||
for src_dir in asset_trees:
|
||||
src_path = project_root / src_dir
|
||||
dst_path = build_path / src_dir
|
||||
if not src_path.exists():
|
||||
continue
|
||||
print(f" {src_path} -> {dst_path}")
|
||||
if not dry_run:
|
||||
shutil.copytree(src_path, dst_path, dirs_exist_ok=True)
|
||||
|
||||
print("=== Assets Synced ===\n")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user