فهرست منبع

- 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).

acgessler 13 سال پیش
والد
کامیت
97e1761ecd
1فایلهای تغییر یافته به همراه8 افزوده شده و 2 حذف شده
  1. 8 2
      code/FBXProperties.cpp

+ 8 - 2
code/FBXProperties.cpp

@@ -85,16 +85,22 @@ Property* ReadTypedProperty(const Element& element)
 	else if (!strcmp(cs,"bool")) {
 		return new TypedProperty<bool>(ParseTokenAsInt(*tok[4]) != 0);
 	}
-	else if (!strcmp(cs,"int")) {
+	else if (!strcmp(cs,"int") || !strcmp(cs,"enum")) {
 		return new TypedProperty<int>(ParseTokenAsInt(*tok[4]));
 	}
-	else if (!strcmp(cs,"Vector3D")) {
+	else if (!strcmp(cs,"ULongLong")) {
+		return new TypedProperty<uint64_t>(ParseTokenAsID(*tok[4]));
+	}
+	else if (!strcmp(cs,"Vector3D") || !strcmp(cs,"ColorRGB") || !strcmp(cs,"Vector") || !strcmp(cs,"Color")) {
 		return new TypedProperty<aiVector3D>(aiVector3D(
 			ParseTokenAsFloat(*tok[4]),
 			ParseTokenAsFloat(*tok[5]),
 			ParseTokenAsFloat(*tok[6]))
 		);
 	}
+	else if (!strcmp(cs,"double") || !strcmp(cs,"Number") || !strcmp(cs,"KTime")) {
+		return new TypedProperty<float>(ParseTokenAsFloat(*tok[4]));
+	}
 	return NULL;
 }