mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 13:09:52 +02:00
Scale adjustment for Makehuman models.
This commit is contained in:
parent
6f3b3acc86
commit
4c49d00683
3 changed files with 9 additions and 2 deletions
|
@ -153,7 +153,7 @@ bool ModelUploader::zip() {
|
||||||
|
|
||||||
// mixamo/autodesk defaults
|
// mixamo/autodesk defaults
|
||||||
if (!mapping.contains(SCALE_FIELD)) {
|
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();
|
QVariantHash joints = mapping.value(JOINT_FIELD).toHash();
|
||||||
if (!joints.contains("jointEyeLeft")) {
|
if (!joints.contains("jointEyeLeft")) {
|
||||||
|
|
|
@ -1020,7 +1020,13 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping)
|
||||||
foreach (const FBXNode& object, child.children) {
|
foreach (const FBXNode& object, child.children) {
|
||||||
if (object.name == "SceneInfo") {
|
if (object.name == "SceneInfo") {
|
||||||
foreach (const FBXNode& subobject, object.children) {
|
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) {
|
foreach (const FBXNode& subsubobject, subobject.children) {
|
||||||
if (subsubobject.name == "P" && subsubobject.properties.size() >= 5 &&
|
if (subsubobject.name == "P" && subsubobject.properties.size() >= 5 &&
|
||||||
subsubobject.properties.at(0) == "Original|ApplicationName") {
|
subsubobject.properties.at(0) == "Original|ApplicationName") {
|
||||||
|
|
|
@ -177,6 +177,7 @@ public:
|
||||||
class FBXGeometry {
|
class FBXGeometry {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
QString author;
|
||||||
QString applicationName; ///< the name of the application that generated the model
|
QString applicationName; ///< the name of the application that generated the model
|
||||||
|
|
||||||
QVector<FBXJoint> joints;
|
QVector<FBXJoint> joints;
|
||||||
|
|
Loading…
Reference in a new issue