Scale adjustment for Makehuman models.

This commit is contained in:
Andrzej Kapolka 2014-05-02 17:01:07 -07:00
parent 6f3b3acc86
commit 4c49d00683
3 changed files with 9 additions and 2 deletions

View file

@ -153,7 +153,7 @@ bool ModelUploader::zip() {
// mixamo/autodesk defaults
if (!mapping.contains(SCALE_FIELD)) {
mapping.insert(SCALE_FIELD, 15.0);
mapping.insert(SCALE_FIELD, geometry.author == "www.makehuman.org" ? 150.0 : 15.0);
}
QVariantHash joints = mapping.value(JOINT_FIELD).toHash();
if (!joints.contains("jointEyeLeft")) {

View file

@ -1020,7 +1020,13 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping)
foreach (const FBXNode& object, child.children) {
if (object.name == "SceneInfo") {
foreach (const FBXNode& subobject, object.children) {
if (subobject.name == "Properties70") {
if (subobject.name == "MetaData") {
foreach (const FBXNode& subsubobject, subobject.children) {
if (subsubobject.name == "Author") {
geometry.author = subsubobject.properties.at(0).toString();
}
}
} else if (subobject.name == "Properties70") {
foreach (const FBXNode& subsubobject, subobject.children) {
if (subsubobject.name == "P" && subsubobject.properties.size() >= 5 &&
subsubobject.properties.at(0) == "Original|ApplicationName") {

View file

@ -177,6 +177,7 @@ public:
class FBXGeometry {
public:
QString author;
QString applicationName; ///< the name of the application that generated the model
QVector<FBXJoint> joints;