From 4a1032b67eb9f64eaffffd782b3f7157026cde6c Mon Sep 17 00:00:00 2001 From: Augs Date: Fri, 18 May 2018 17:04:18 +0100 Subject: [PATCH] Fixed unknown4 duplicate materials --- BlenderCOL.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BlenderCOL.py b/BlenderCOL.py index bd76365..bef838b 100644 --- a/BlenderCOL.py +++ b/BlenderCOL.py @@ -216,7 +216,7 @@ class ImportCOL(Operator, ExportHelper): #Operator that exports the collision mo for i in range(0,len(obj.data.materials)): #Scan materials to find match mat = obj.data.materials[i] if f.unknown0 == mat.ColEditor.U0 and f.unknown1 == mat.ColEditor.U1 and f.unknown2 == mat.ColEditor.U2 and f.unknown3 == mat.ColEditor.U3:#Equate unknowns - Unknown4AreEqual = f.unknown4 is mat.ColEditor.U4 + Unknown4AreEqual = (f.unknown4 == mat.ColEditor.U4) Unknown4DontExist = f.unknown4 is None and mat.ColEditor.HasU4 is False #If the unknown4 doesn't exist we need to check for that case if Unknown4AreEqual or Unknown4DontExist: MyFace.material_index = i