Bug fixing and updated road painter import process

The import process now loads a .json file for applying decals to the road. Several bug fixes related to the generation of multiple map textures and dynamic materials. New update to the road painter preset on the art repository.
This commit is contained in:
Roel Algaba Brizuela 2021-04-09 17:02:41 +02:00 committed by bernat
parent 6f7ba077cb
commit 6aa5898854
1 changed files with 16 additions and 1 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!python
# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de # Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB). # Barcelona (UAB).
@ -320,7 +320,22 @@ def generate_package_file(package_name, props, maps):
with open(os.path.join(package_config_path, package_name + ".Package.json"), "w+") as fh: with open(os.path.join(package_config_path, package_name + ".Package.json"), "w+") as fh:
json.dump(output_json, fh, indent=4) json.dump(output_json, fh, indent=4)
def copy_roadpainter_config_files(package_name):
"""Copies roadpainter configuration files into Unreal content folder"""
two_directories_up = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
final_path = os.path.join(two_directories_up, "Import", "roadpainter_decals.json")
package_config_path = os.path.join(CARLA_ROOT_PATH, "Unreal", "CarlaUE4", "Content", package_name, "Config")
if not os.path.exists(package_config_path):
try:
os.makedirs(package_config_path)
except OSError as exc:
if exc.errno != errno.EEXIST:
raise
shutil.copy(final_path, package_config_path)
def copy_roadpainter_config_files(package_name): def copy_roadpainter_config_files(package_name):
"""Copies roadpainter configuration files into Unreal content folder""" """Copies roadpainter configuration files into Unreal content folder"""