mirror of
https://github.com/DarklightGames/io_scene_psk_psa.git
synced 2025-02-20 03:11:16 +01:00
Added progress indicator when exporting PSK files
This commit is contained in:
parent
68c7d93d6a
commit
d0fe7d9786
@ -146,7 +146,9 @@ def build_psk(context, options: PskBuildOptions) -> PskBuildResult:
|
|||||||
psk_material.texture_index = len(psk.materials)
|
psk_material.texture_index = len(psk.materials)
|
||||||
psk.materials.append(psk_material)
|
psk.materials.append(psk_material)
|
||||||
|
|
||||||
for input_mesh_object in input_objects.mesh_objects:
|
context.window_manager.progress_begin(0, len(input_objects.mesh_objects))
|
||||||
|
|
||||||
|
for object_index, input_mesh_object in enumerate(input_objects.mesh_objects):
|
||||||
|
|
||||||
# MATERIALS
|
# MATERIALS
|
||||||
material_indices = [material_names.index(material_slot.material.name) for material_slot in input_mesh_object.material_slots]
|
material_indices = [material_names.index(material_slot.material.name) for material_slot in input_mesh_object.material_slots]
|
||||||
@ -288,6 +290,10 @@ def build_psk(context, options: PskBuildOptions) -> PskBuildResult:
|
|||||||
bpy.data.meshes.remove(mesh_data)
|
bpy.data.meshes.remove(mesh_data)
|
||||||
del mesh_data
|
del mesh_data
|
||||||
|
|
||||||
|
context.window_manager.progress_update(object_index)
|
||||||
|
|
||||||
|
context.window_manager.progress_end()
|
||||||
|
|
||||||
result.psk = psk
|
result.psk = psk
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
Loading…
x
Reference in New Issue
Block a user