Commit 4a031c3e authored by Eric Duminil's avatar Eric Duminil
Browse files

FIXME

parent f9bcbc05
...@@ -46,20 +46,20 @@ lib_node.text = str(custom_library_path) ...@@ -46,20 +46,20 @@ lib_node.text = str(custom_library_path)
tree.write(physics_processor_params) tree.write(physics_processor_params)
########################################################## ##########################################################
with open(custom_library_path) as library_file:
content = library_file.read()
for window_ratio in WINDOW_RATIOS: for window_ratio in WINDOW_RATIOS:
#################### Update lib with custom values ############################ #################### Update lib with custom values ############################
with open(custom_library_path) as library_file:
content = library_file.read()
new_content = re.sub(r"<name>[\w ]+</name>", new_content = re.sub(r"<name>[\w ]+</name>",
f"<name>Custom Physics Library with Window Ratio : {window_ratio}</name>", f"<name>Custom Physics Library with Window Ratio : {window_ratio}</name>",
content, content, 1)
1) # FIXME: Use et.parse instead. Because groundSurfaces shouldn't have any WindowRatio
new_content = re.sub(r"<windowRatio>[\d\.]+</windowRatio>", new_content = re.sub(r"<windowRatio>[\d\.]+</windowRatio>",
f"<windowRatio>{window_ratio}</windowRatio>", f"<windowRatio>{window_ratio}</windowRatio>",
content) new_content)
with open(custom_library_path, 'w') as library_file: with open(custom_library_path, 'w') as library_file:
library_file.write(new_content) library_file.write(new_content)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment