Atlas Materials UI Update

- Separated things out so it looks better.
- Done small changes to make the ui look a bit better.
- UI auto refreshes after a successful atlas.
This commit is contained in:
Yusarina
2025-03-31 13:48:52 +01:00
parent af5b79e314
commit c0943e0d20
5 changed files with 202 additions and 45 deletions
+11
View File
@@ -280,6 +280,17 @@ class AvatarToolKit_OT_AtlasMaterials(Operator):
mesh.materials[i] = atlased_mat.material
progress.step(f"Updated materials for {obj.name}")
MaterialListBool.old_list.pop(context.scene.name, None)
was_open = context.scene.avatar_toolkit.texture_atlas_Has_Mat_List_Shown
context.scene.avatar_toolkit.texture_atlas_Has_Mat_List_Shown = False
if was_open:
bpy.ops.avatar_toolkit.expand_section_materials()
for area in context.screen.areas:
if area.type == 'VIEW_3D':
area.tag_redraw()
logger.info("Material atlas creation completed successfully")
self.report({'INFO'}, t("TextureAtlas.atlas_completed"))
return {"FINISHED"}