Upgrade Ground Zero vegetation assets
This commit is contained in:
@@ -6,6 +6,7 @@ import unreal
|
||||
MAP_PATH = "/Game/Agrarian/Maps/L_GroundZeroTerrain_Test"
|
||||
PROJECT_ROOT = Path(unreal.Paths.convert_relative_path_to_full(unreal.Paths.project_dir()))
|
||||
PLACEHOLDER_MESH_FOLDER = "/Game/Agrarian/Environment/PlaceholderMeshes"
|
||||
VEGETATION_MESH_FOLDER = "/Game/Agrarian/Environment/Vegetation"
|
||||
PLACEHOLDER_MESHES = {
|
||||
"SM_AGR_Placeholder_Cube",
|
||||
"SM_AGR_Placeholder_ChamferCube",
|
||||
@@ -47,6 +48,13 @@ def assert_native_mesh(path, failures):
|
||||
failures.append(f"template mesh reference remains: {path}")
|
||||
|
||||
|
||||
def assert_agrarian_environment_mesh(path, failures):
|
||||
if not path.startswith((PLACEHOLDER_MESH_FOLDER, VEGETATION_MESH_FOLDER)):
|
||||
failures.append(f"expected native Agrarian environment mesh, got {path}")
|
||||
if "LevelPrototyping" in path or path.startswith("/Engine/BasicShapes/"):
|
||||
failures.append(f"template/basic mesh reference remains: {path}")
|
||||
|
||||
|
||||
def main():
|
||||
failures = []
|
||||
|
||||
@@ -79,7 +87,7 @@ def main():
|
||||
else:
|
||||
for property_name in ("tree_instances", "shrub_instances", "grass_instances"):
|
||||
component = foliage_actors[0].get_editor_property(property_name)
|
||||
assert_native_mesh(asset_path(component.get_editor_property("static_mesh")), failures)
|
||||
assert_agrarian_environment_mesh(asset_path(component.get_editor_property("static_mesh")), failures)
|
||||
|
||||
for actor in actors:
|
||||
label = get_actor_label(actor)
|
||||
@@ -90,7 +98,7 @@ def main():
|
||||
if not mesh_components:
|
||||
failures.append(f"{label} has no static mesh component")
|
||||
continue
|
||||
assert_native_mesh(asset_path(mesh_components[0].get_editor_property("static_mesh")), failures)
|
||||
assert_agrarian_environment_mesh(asset_path(mesh_components[0].get_editor_property("static_mesh")), failures)
|
||||
|
||||
for path, snippet in DOC_SNIPPETS:
|
||||
text = path.read_text(encoding="utf-8")
|
||||
|
||||
Reference in New Issue
Block a user