This commit is contained in:
Yusarina
2024-07-24 00:52:04 +01:00
parent 76046f7c6d
commit a8d7cd3032
3 changed files with 14 additions and 14 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
import bpy
import re
from typing import List, Tuple, Optional
from typing import List, Tuple, Optional, Set
from bpy.types import Material, Operator, Context, Object
from ..core.common import clean_material_names, get_selected_armature, is_valid_armature, get_all_meshes
from ..core.register import register_wrap
@@ -68,7 +68,7 @@ class CombineMaterials(Operator):
armature = get_selected_armature(context)
return armature is not None and is_valid_armature(armature)
def execute(self, context: Context) -> set:
def execute(self, context: Context) -> Set[str]:
armature = get_selected_armature(context)
if not armature:
self.report({'WARNING'}, "No armature selected")
@@ -90,7 +90,7 @@ class CombineMaterials(Operator):
return {'FINISHED'}
def consolidate_materials(self, meshes: List[Object]) -> None:
mat_mapping: dict = {}
mat_mapping: Dict[str, Material] = {}
num_combined: int = 0
for mesh in meshes:
for slot in mesh.material_slots: