浏览代码

- fbx: extend list of supported property data types.

Alexander Gessler 13 年之前
父节点
当前提交
1bdf39448a
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      code/FBXProperties.cpp

+ 6 - 2
code/FBXProperties.cpp

@@ -82,7 +82,7 @@ Property* ReadTypedProperty(const Element& element)
 	if (!strcmp(cs,"KString")) {
 		return new TypedProperty<std::string>(ParseTokenAsString(*tok[4]));
 	}
-	else if (!strcmp(cs,"bool")) {
+	else if (!strcmp(cs,"bool") || !strcmp(cs,"Bool")) {
 		return new TypedProperty<bool>(ParseTokenAsInt(*tok[4]) != 0);
 	}
 	else if (!strcmp(cs,"int") || !strcmp(cs,"enum")) {
@@ -105,12 +105,13 @@ Property* ReadTypedProperty(const Element& element)
 			ParseTokenAsFloat(*tok[6]))
 		);
 	}
-	else if (!strcmp(cs,"double") || !strcmp(cs,"Number") || !strcmp(cs,"KTime")) {
+	else if (!strcmp(cs,"double") || !strcmp(cs,"Number") || !strcmp(cs,"KTime") || !strcmp(cs,"Float")) {
 		return new TypedProperty<float>(ParseTokenAsFloat(*tok[4]));
 	}
 	return NULL;
 }
 
+
 // ------------------------------------------------------------------------------------------------
 // peek into an element and check if it contains a FBX property, if so return its name.
 std::string PeekPropertyName(const Element& element)
@@ -134,6 +135,7 @@ PropertyTable::PropertyTable()
 {
 }
 
+
 // ------------------------------------------------------------------------------------------------
 PropertyTable::PropertyTable(const Element& element, boost::shared_ptr<const PropertyTable> templateProps)
 : templateProps(templateProps)
@@ -162,6 +164,7 @@ PropertyTable::PropertyTable(const Element& element, boost::shared_ptr<const Pro
 	}
 }
 
+
 // ------------------------------------------------------------------------------------------------
 PropertyTable::~PropertyTable()
 {
@@ -170,6 +173,7 @@ PropertyTable::~PropertyTable()
 	}
 }
 
+
 // ------------------------------------------------------------------------------------------------
 const Property* PropertyTable::Get(const std::string& name) const
 {