From da39ed066ca392abfbc2c1021952ce94ac965d55 Mon Sep 17 00:00:00 2001 From: Oliver Kahrmann Date: Mon, 1 Sep 2014 22:43:53 +0200 Subject: [PATCH] Modify WavefrontObject to allow '.' in group object names Blender names objects with .001 ir .002 when separating vertices or duplicating objects and the importer would crash on them. This fixes the regex to allow dots in the name. --- .../net/minecraftforge/client/model/obj/WavefrontObject.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/minecraftforge/client/model/obj/WavefrontObject.java b/src/main/java/net/minecraftforge/client/model/obj/WavefrontObject.java index 6c31381bf..530fdfd9e 100644 --- a/src/main/java/net/minecraftforge/client/model/obj/WavefrontObject.java +++ b/src/main/java/net/minecraftforge/client/model/obj/WavefrontObject.java @@ -33,7 +33,7 @@ public class WavefrontObject implements IModelCustom private static Pattern face_V_VT_Pattern = Pattern.compile("(f( \\d+/\\d+){3,4} *\\n)|(f( \\d+/\\d+){3,4} *$)"); private static Pattern face_V_VN_Pattern = Pattern.compile("(f( \\d+//\\d+){3,4} *\\n)|(f( \\d+//\\d+){3,4} *$)"); private static Pattern face_V_Pattern = Pattern.compile("(f( \\d+){3,4} *\\n)|(f( \\d+){3,4} *$)"); - private static Pattern groupObjectPattern = Pattern.compile("([go]( [\\w\\d]+) *\\n)|([go]( [\\w\\d]+) *$)"); + private static Pattern groupObjectPattern = Pattern.compile("([go]( [\\w\\d\\.]+) *\\n)|([go]( [\\w\\d\\.]+) *$)"); private static Matcher vertexMatcher, vertexNormalMatcher, textureCoordinateMatcher; private static Matcher face_V_VT_VN_Matcher, face_V_VT_Matcher, face_V_VN_Matcher, face_V_Matcher;