Skip to content

Commit f5d8d8a

Browse files
committed
add build shaders command
1 parent 6205052 commit f5d8d8a

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

pbpy/pbunreal.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,6 +1170,20 @@ def clear_cook_cache():
11701170
shutil.rmtree("Saved/Cooked", ignore_errors=True)
11711171

11721172

1173+
def build_shaders(platform: str = "PCD3D_SM6"):
1174+
uproject_path = get_uproject_path()
1175+
project_name = uproject_path.stem
1176+
project_path = uproject_path.parent
1177+
pbtools.run(
1178+
get_editor_path(),
1179+
"-run=ShaderPipelineCacheTools",
1180+
"expand",
1181+
f"{project_path}/Saved/StagedBuilds/Windows/{project_name}/Saved/CollectedPSOs/*.rec.upipelinecache"
1182+
f"{project_path}/Saved/Shaders/{platform}/*.shk",
1183+
f"{project_path}/Build/Windows/PipelineCaches/PSO_{project_name}_{platform}.spc",
1184+
)
1185+
1186+
11731187
def build_game(configuration="Shipping"):
11741188
uat_path = get_uat_path()
11751189
if uat_path is None:

pbsync/__main__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,8 @@ def sync_handler(sync_val: str, repository_val=None):
671671
"development": partial(pbunreal.build_game, "Development"),
672672
"internal": partial(pbunreal.build_game, "Test"),
673673
"game": pbunreal.build_game,
674+
"shaders": pbunreal.build_shaders,
675+
"shaders_vulkan": partial(pbunreal.build_shaders, "SF_VULKAN_SM6"),
674676
"installedbuild": pbunreal.build_installed_build,
675677
"package": pbunreal.package_binaries,
676678
"release": pbgh.generate_release,

0 commit comments

Comments
 (0)