fix: filename

This commit is contained in:
Edwin Wong
2023-09-26 18:11:19 +08:00
parent 94874357cd
commit 6ce009d984
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -221,15 +221,15 @@ def export_gltf(output_dir, bpy_objects, filename, model_type, write_mode, metad
return ".ava"
ext = get_file_extension(model_type)
filepath = output_dir + "/" + filename + '.' + ext
filepath = output_dir + "/" + filename + ext
if write_mode == "Increment":
count = 0
# while file exists, increment count
while os.path.exists(output_dir + "/" + filename + '_' + str(count) + '.' + ext):
while os.path.exists(output_dir + "/" + filename + '_' + str(count) + ext):
count += 1
filepath = output_dir + "/" + filename + '_' + str(count) + '.' + ext
filepath = output_dir + "/" + filename + '_' + str(count) + ext
with bpy.context.temp_override(**override):
bpy.ops.export_scene.gltf(filepath=filepath, export_format="GLB" if model_type == "AVA" else model_type, use_selection=True, export_extras=True)
+1 -1
View File
@@ -10,7 +10,7 @@ export function AvatarEditor() {
button(
{
class: () =>
"btn btn-circle flex flex-row btn-ghost normal-case absolute p-0 rounded-md left-0 top-0 z-[200] w-fit pointer-events-auto bg-black " +
"btn btn-circle flex flex-row btn-ghost normal-case absolute px-2 rounded-md left-0 top-0 z-[200] w-fit pointer-events-auto bg-black " +
(showEditor.val ? "" : "hidden"),
onclick: () => {
console.log("close");
+1 -1
View File
File diff suppressed because one or more lines are too long