Stabilize investor frontend entry
This commit is contained in:
@@ -52,16 +52,19 @@ ENVIRONMENT_MATERIALS = {
|
||||
"path": f"{MATERIAL_FOLDER}/M_AGR_GZ_Tree_CoastalOak",
|
||||
"color": unreal.LinearColor(0.18, 0.31, 0.16, 1.0),
|
||||
"roughness": 0.88,
|
||||
"used_with_instanced_static_meshes": True,
|
||||
},
|
||||
"shrub": {
|
||||
"path": f"{MATERIAL_FOLDER}/M_AGR_GZ_Shrub_CoyoteBrush",
|
||||
"color": unreal.LinearColor(0.31, 0.39, 0.20, 1.0),
|
||||
"roughness": 0.9,
|
||||
"used_with_instanced_static_meshes": True,
|
||||
},
|
||||
"grass": {
|
||||
"path": f"{MATERIAL_FOLDER}/M_AGR_GZ_Grass_DryCoastal",
|
||||
"color": unreal.LinearColor(0.47, 0.42, 0.23, 1.0),
|
||||
"roughness": 0.95,
|
||||
"used_with_instanced_static_meshes": True,
|
||||
},
|
||||
"wood_resource": {
|
||||
"path": f"{MATERIAL_FOLDER}/M_AGR_GZ_Wood_Resource",
|
||||
@@ -807,6 +810,10 @@ def ensure_environment_materials():
|
||||
unreal.MaterialEditingLibrary.recompile_material(material)
|
||||
unreal.EditorAssetLibrary.save_asset(spec["path"])
|
||||
unreal.log(f"Created Ground Zero environment material: {spec['path']}")
|
||||
if spec.get("used_with_instanced_static_meshes"):
|
||||
material.set_editor_property("used_with_instanced_static_meshes", True)
|
||||
unreal.MaterialEditingLibrary.recompile_material(material)
|
||||
unreal.EditorAssetLibrary.save_asset(spec["path"], only_if_is_dirty=False)
|
||||
created_or_loaded[key] = material
|
||||
|
||||
return created_or_loaded
|
||||
|
||||
Reference in New Issue
Block a user