You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
withopen("! "+NameCustomScript+"Patcher.py", 'wb') asfile: # Open the file in binary write mode
150
+
encoded_content=script_content.encode('utf-8') # Encode the content as bytes
151
+
file.write(encoded_content)
115
152
116
153
print("Modified script and saved it as '! "+NameCustomScript+"Patcher.py'")
117
154
118
155
119
156
120
157
121
158
159
+
122
160
defmain():
161
+
os.environ['PYTHONIOENCODING'] ='utf-8'
123
162
124
163
print_ascii_art()
125
164
126
-
# Get the required info to proceed
127
165
166
+
# Get the required info to proceed
128
167
168
+
print("Please select the original FBX file")
129
169
OriginalFBX=get_file_path("Please select the original FBX file")
130
170
whilenotos.path.isfile(OriginalFBX):
171
+
print("Please select a valid original FBX file")
131
172
OriginalFBX=get_file_path("Please select a valid original FBX file")
132
173
174
+
print("Please select the Face tracked FBX file")
133
175
FaceTrackedFBX=get_file_path("Please select the Face tracked FBX file")
134
176
whilenotos.path.isfile(FaceTrackedFBX):
177
+
print("Please select a valid Face tracked FBX file")
135
178
FaceTrackedFBX=get_file_path("Please select a valid Face tracked FBX file")
136
179
137
180
@@ -150,7 +193,7 @@ def main():
150
193
151
194
152
195
153
-
196
+
print("Please select the directory with your descriptions and readme files (leave empty to skip) (window may not be focused, check your alt+tab to find the window)")
154
197
DescriptionDir=get_directory_path("Please select the directory with your descriptions and readme files (leave empty to skip)")
print("Error occurred during patching process for meta file.")
91
163
input("Press Enter to continue...")
164
+
ErrorFlag=True
92
165
return
166
+
returnErrorFlag
93
167
94
168
95
169
defmain():
96
170
print_ascii_art()
97
171
98
-
patch_model(
172
+
ErrorFlag=False
173
+
174
+
ErrorFlag=patch_model(
99
175
original_model_path="../../../ Location of your FBX relative to Assets", # Change this to the relative directory to your FBX
100
176
original_meta_file_path="../../../ Location of your FBX.meta relative to Assets", # Change this to the relative directory to your FBX's import settings
101
177
diff_file_path="data/DiffFiles/NameOfYourDiffFile.hdiff", # Change the name to the name of the Hdiff file you generated
0 commit comments