Skip to content

Commit

Permalink
patcher OSC config clear
Browse files Browse the repository at this point in the history
Made it so that patcher now clears the OSC config
  • Loading branch information
HashEdits committed Sep 2, 2023
1 parent 6154f44 commit 605e9e0
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions PythonPatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,25 @@ def resource_path(relative_path):

return os.path.join(base_path, relative_path)

def delete_files_in_directory(directory_path):
try:
# Check if the directory exists
if os.path.exists(directory_path):
# Iterate over all files and subdirectories in the directory
for root, dirs, files in os.walk(directory_path, topdown=False):
for file_name in files:
file_path = os.path.join(root, file_name)
os.remove(file_path) # Delete the file
for dir_name in dirs:
dir_path = os.path.join(root, dir_name)
shutil.rmtree(dir_path) # Delete the subdirectory and its contents
print(f"OSC Config cleared.")
else:
print(f"no OSC config found")
except Exception as e:
print(f"An error occurred while clearing OSC conifg: {e}")


def patch_model(original_model_path, original_meta_file_path, diff_file_path, meta_diff_file_path, output_name):
script_directory = resource_path(os.path.dirname(os.path.abspath(__file__)))
original_model = resource_path(original_model_path)
Expand Down Expand Up @@ -83,6 +102,8 @@ def main():
meta_diff_file_path="data/DiffFiles/NameOfYourMetaDiffFile.hdiff", # Change the name to the name of the MetaHdiff file you generated
output_name = "MyCoolAvatar_FT" # Change this to your desired output name # Change this to your desired output name
)

delete_files_in_directory(os.path.join(os.path.expanduser("~"), "AppData", "LocalLow", "VRChat", "VRChat", "OSC"))

print("Patch complete! Please read the documentation and instructions.")
input("Press Enter to exit...")
Expand Down

0 comments on commit 605e9e0

Please sign in to comment.