From 97e1761ecd75117ca5675a792b1e8df11d46f049 Mon Sep 17 00:00:00 2001 From: acgessler Date: Mon, 2 Jul 2012 17:00:56 +0200 Subject: [PATCH] - fbx: support more property data types (there are way more, though - don't know yet how to handle them, fbx files don't seem to have overly strong semantics for properties). --- code/FBXProperties.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/FBXProperties.cpp b/code/FBXProperties.cpp index 0d08882f1..da637b534 100644 --- a/code/FBXProperties.cpp +++ b/code/FBXProperties.cpp @@ -85,16 +85,22 @@ Property* ReadTypedProperty(const Element& element) else if (!strcmp(cs,"bool")) { return new TypedProperty(ParseTokenAsInt(*tok[4]) != 0); } - else if (!strcmp(cs,"int")) { + else if (!strcmp(cs,"int") || !strcmp(cs,"enum")) { return new TypedProperty(ParseTokenAsInt(*tok[4])); } - else if (!strcmp(cs,"Vector3D")) { + else if (!strcmp(cs,"ULongLong")) { + return new TypedProperty(ParseTokenAsID(*tok[4])); + } + else if (!strcmp(cs,"Vector3D") || !strcmp(cs,"ColorRGB") || !strcmp(cs,"Vector") || !strcmp(cs,"Color")) { return new TypedProperty(aiVector3D( ParseTokenAsFloat(*tok[4]), ParseTokenAsFloat(*tok[5]), ParseTokenAsFloat(*tok[6])) ); } + else if (!strcmp(cs,"double") || !strcmp(cs,"Number") || !strcmp(cs,"KTime")) { + return new TypedProperty(ParseTokenAsFloat(*tok[4])); + } return NULL; }