We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 74210c4 commit b4378e2Copy full SHA for b4378e2
mmd_tools/core/morph.py
@@ -684,9 +684,18 @@ def update_mmd_morph():
684
@staticmethod
685
def ensure_material_id_not_conflict():
686
mat_ids_set = set()
687
+
688
+ # The reference library properties cannot be modified and bypassed in advance.
689
+ need_update_mat = []
690
for mat in bpy.data.materials:
691
if mat.mmd_material.material_id < 0:
692
continue
693
+ if mat.library is not None:
694
+ mat_ids_set.add(mat.mmd_material.material_id)
695
+ else:
696
+ need_update_mat.append(mat)
697
698
+ for mat in need_update_mat:
699
if mat.mmd_material.material_id in mat_ids_set:
700
mat.mmd_material.material_id = max(mat_ids_set) + 1
701
mat_ids_set.add(mat.mmd_material.material_id)
0 commit comments