From df5fc5f68d35b6cb79f4461775233118dd33b1ae Mon Sep 17 00:00:00 2001 From: "nola.donato@samsung.com" Date: Mon, 30 Jan 2017 20:27:35 -0800 Subject: [PATCH] OBJParser: Support spaces in texture file names This patch allows embedded spaces in texture filenames found in MTL files. It only affects the OBJ parser. Submitted by: Nola Donato nola.donato@samsung.com --- code/ObjTools.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/ObjTools.h b/code/ObjTools.h index 26c9256ce..8dee62f18 100644 --- a/code/ObjTools.h +++ b/code/ObjTools.h @@ -140,15 +140,13 @@ inline char_t getName( char_t it, char_t end, std::string &name ) } char *pStart = &( *it ); - while( !isEndOfBuffer( it, end ) && !IsLineEnd( *it ) && !IsSpaceOrNewLine( *it ) ) { + while( !isEndOfBuffer( it, end ) && !IsLineEnd( *it )) { ++it; } - /*while( isEndOfBuffer( it, end ) || IsLineEnd( *it ) || IsSpaceOrNewLine( *it ) ) { + while(IsSpace( *it ) ) { --it; } - ++it; - */ // Get name // if there is no name, and the previous char is a separator, come back to start while (&(*it) < pStart) {