Fix material duplication clean comparing with non-GP mats

1.8.11

- fixed: cleaning materials duplication checked against name without checking material GP type
main
pullusb 2024-11-27 14:33:20 +01:00
parent 772af8cb3f
commit 19c43e6268
3 changed files with 8 additions and 1 deletions

View File

@ -14,6 +14,10 @@ Activate / deactivate layer opacity according to prefix
Activate / deactivate all masks using MA layers
-->
1.8.11
- fixed: cleaning materials duplication checked against name without checking material GP type
1.8.10
- fixed: node not deleted after a merge using (compo scene not referenced correctly to point node_trees)

View File

@ -2,7 +2,7 @@ bl_info = {
"name": "GP Render",
"description": "Organise export of gp layers through compositor output",
"author": "Samuel Bernou",
"version": (1, 8, 10),
"version": (1, 8, 11),
"blender": (3, 0, 0),
"location": "View3D",
"warning": "",

3
fn.py
View File

@ -1855,6 +1855,9 @@ def clean_mats_duplication(ob, skip_different_materials=True):
basemat = bpy.data.materials.get(match.group(1))
if not basemat:
continue
if not basemat.is_grease_pencil:
## Skip material with matching "stem" but not being GP material
continue
diff = different_gp_mat(mat, basemat)
if diff:
print(f'! {ob.name} : {diff}')