mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 22:30:42 +02:00
- add jointIndexes to new
- attempt to fix OSX / linux build - ability to actually load a recent project (previously was only able to load the top recent project)
This commit is contained in:
parent
2f32458f72
commit
1a38abe230
6 changed files with 21 additions and 19 deletions
|
@ -84,6 +84,11 @@ Windows.ScrollingWindow {
|
|||
|
||||
property alias showModalOverlay: modalOverlay.visible
|
||||
|
||||
function openProject(path) {
|
||||
AvatarPackagerCore.openAvatarProject(path);
|
||||
avatarPackager.state = "project";
|
||||
}
|
||||
|
||||
AvatarPackagerHeader {
|
||||
id: avatarPackagerHeader
|
||||
onBackButtonClicked: {
|
||||
|
@ -175,7 +180,6 @@ Windows.ScrollingWindow {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
Flow {
|
||||
visible: AvatarPackagerCore.recentProjects.length === 0
|
||||
anchors {
|
||||
|
@ -194,8 +198,6 @@ Windows.ScrollingWindow {
|
|||
color: "white"
|
||||
text: qsTr("To learn more about using this tool, visit our docs")
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Column {
|
||||
|
@ -213,6 +215,7 @@ Windows.ScrollingWindow {
|
|||
AvatarProjectCard {
|
||||
title: modelData.name
|
||||
path: modelData.path
|
||||
onOpen: avatarPackager.openProject(modelData.path)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@ Item {
|
|||
property color hoverBackgroundColor: "#E3E3E3"
|
||||
property color pressedBackgroundColor: "#6A6A6A"
|
||||
|
||||
signal open;
|
||||
|
||||
state: mouseArea.pressed ? "pressed" : (mouseArea.containsMouse ? "hover" : "normal")
|
||||
states: [
|
||||
State {
|
||||
|
@ -77,8 +79,7 @@ Item {
|
|||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
AvatarPackagerCore.openAvatarProject(path.text);
|
||||
avatarPackager.state = "project";
|
||||
open();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,9 +23,8 @@
|
|||
|
||||
class RecentAvatarProject {
|
||||
public:
|
||||
RecentAvatarProject() {
|
||||
|
||||
}
|
||||
RecentAvatarProject() = default;
|
||||
|
||||
|
||||
RecentAvatarProject(QString projectName, QString projectFSTPath) {
|
||||
_projectName = projectName;
|
||||
|
@ -36,6 +35,8 @@ public:
|
|||
_projectFSTPath = other._projectFSTPath;
|
||||
}
|
||||
|
||||
~RecentAvatarProject() = default;
|
||||
|
||||
QString getProjectName() const { return _projectName; }
|
||||
|
||||
QString getProjectFSTPath() const { return _projectFSTPath; }
|
||||
|
@ -50,15 +51,6 @@ private:
|
|||
|
||||
};
|
||||
|
||||
inline QDebug operator<<(QDebug debug, const RecentAvatarProject& recentAvatarProject) {
|
||||
debug << "[recentAvatarProject:" << recentAvatarProject.getProjectFSTPath() << "]";
|
||||
return debug;
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(RecentAvatarProject);
|
||||
|
||||
Q_DECLARE_METATYPE(QVector<RecentAvatarProject>);
|
||||
|
||||
class AvatarPackager : public QObject, public Dependency {
|
||||
Q_OBJECT
|
||||
SINGLETON_DEPENDENCY
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
class AvatarProject : public QObject {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(FST* fst READ getFST)
|
||||
Q_PROPERTY(FST* fst READ getFST CONSTANT)
|
||||
|
||||
Q_PROPERTY(QStringList projectFiles READ getProjectFiles NOTIFY projectFilesChanged)
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ MarketplaceItemUploader::MarketplaceItemUploader(QString title,
|
|||
QUuid marketplaceID,
|
||||
QStringList filePaths) :
|
||||
_title(title),
|
||||
_description(description), _rootFilename(rootFilename), _filePaths(filePaths), _marketplaceID(marketplaceID) {
|
||||
_description(description), _rootFilename(rootFilename), _marketplaceID(marketplaceID), _filePaths(filePaths) {
|
||||
qWarning() << "File paths: " << _filePaths.join(", ");
|
||||
//_marketplaceID = QUuid::fromString(QLatin1String("{50dbd62f-cb6b-4be4-afb8-1ef8bd2dffa8}"));
|
||||
}
|
||||
|
|
|
@ -74,6 +74,12 @@ FST* FST::createFSTFromModel(QString fstPath, QString modelFilePath, const hfm::
|
|||
|
||||
mapping.insert(JOINT_FIELD, joints);
|
||||
|
||||
QVariantHash jointIndices;
|
||||
for (int i = 0; i < hfmModel.joints.size(); i++) {
|
||||
jointIndices.insert(hfmModel.joints.at(i).name, QString::number(i));
|
||||
}
|
||||
mapping.insert(JOINT_INDEX_FIELD, jointIndices);
|
||||
|
||||
mapping.insertMulti(FREE_JOINT_FIELD, "LeftArm");
|
||||
mapping.insertMulti(FREE_JOINT_FIELD, "LeftForeArm");
|
||||
mapping.insertMulti(FREE_JOINT_FIELD, "RightArm");
|
||||
|
|
Loading…
Reference in a new issue