mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-27 14:17:45 +00:00
Make armoury's bone editor a general-purpose part, add it to sagasu
This commit is contained in:
parent
6caedba0d9
commit
b0ccfbaf15
15 changed files with 182 additions and 154 deletions
|
@ -10,9 +10,7 @@ target_sources(novus-armoury PRIVATE
|
||||||
include/gearlistwidget.h
|
include/gearlistwidget.h
|
||||||
include/gearview.h
|
include/gearview.h
|
||||||
include/mainwindow.h
|
include/mainwindow.h
|
||||||
include/quaternionedit.h
|
|
||||||
include/singlegearview.h
|
include/singlegearview.h
|
||||||
include/vec3edit.h
|
|
||||||
|
|
||||||
src/boneeditor.cpp
|
src/boneeditor.cpp
|
||||||
src/cmpeditor.cpp
|
src/cmpeditor.cpp
|
||||||
|
@ -22,9 +20,7 @@ target_sources(novus-armoury PRIVATE
|
||||||
src/gearview.cpp
|
src/gearview.cpp
|
||||||
src/main.cpp
|
src/main.cpp
|
||||||
src/mainwindow.cpp
|
src/mainwindow.cpp
|
||||||
src/quaternionedit.cpp
|
src/singlegearview.cpp)
|
||||||
src/singlegearview.cpp
|
|
||||||
src/vec3edit.cpp)
|
|
||||||
|
|
||||||
target_include_directories(novus-armoury
|
target_include_directories(novus-armoury
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
@ -40,6 +36,7 @@ target_link_libraries(novus-armoury PUBLIC
|
||||||
physis-logger
|
physis-logger
|
||||||
mdlpart
|
mdlpart
|
||||||
cmppart
|
cmppart
|
||||||
|
sklbpart
|
||||||
imgui
|
imgui
|
||||||
novus-common)
|
novus-common)
|
||||||
|
|
||||||
|
|
|
@ -3,19 +3,11 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QSpinBox>
|
#include "sklbpart.h"
|
||||||
#include <QTreeWidgetItem>
|
|
||||||
#include <QWidget>
|
|
||||||
#include <glm/detail/type_quat.hpp>
|
|
||||||
#include <glm/glm.hpp>
|
|
||||||
#include <physis.hpp>
|
|
||||||
|
|
||||||
#include "quaternionedit.h"
|
|
||||||
#include "vec3edit.h"
|
|
||||||
|
|
||||||
class GearView;
|
class GearView;
|
||||||
|
|
||||||
class BoneEditor : public QWidget
|
class BoneEditor : public SklbPart
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@ -23,25 +15,5 @@ public:
|
||||||
explicit BoneEditor(GearView *gearView, QWidget *parent = nullptr);
|
explicit BoneEditor(GearView *gearView, QWidget *parent = nullptr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void treeItemClicked(QTreeWidgetItem *item, int column);
|
|
||||||
|
|
||||||
GearView *gearView;
|
GearView *gearView;
|
||||||
|
|
||||||
glm::vec3 currentPosition;
|
|
||||||
glm::quat currentRotation;
|
|
||||||
glm::vec3 currentScale;
|
|
||||||
|
|
||||||
glm::vec3 currentRacePosition;
|
|
||||||
glm::quat currentRaceRotation;
|
|
||||||
glm::vec3 currentRaceScale;
|
|
||||||
|
|
||||||
physis_Bone *currentEditedBone = nullptr;
|
|
||||||
|
|
||||||
Vector3Edit *posEdit = nullptr;
|
|
||||||
QuaternionEdit *rotationEdit = nullptr;
|
|
||||||
Vector3Edit *scaleEdit = nullptr;
|
|
||||||
|
|
||||||
Vector3Edit *raceDeformPosEdit = nullptr;
|
|
||||||
QuaternionEdit *raceDeformRotationEdit = nullptr;
|
|
||||||
Vector3Edit *raceDeformScaleEdit = nullptr;
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,132 +3,22 @@
|
||||||
|
|
||||||
#include "boneeditor.h"
|
#include "boneeditor.h"
|
||||||
|
|
||||||
#include <QFormLayout>
|
|
||||||
#include <QGroupBox>
|
|
||||||
#include <QHBoxLayout>
|
|
||||||
#include <QTreeWidget>
|
|
||||||
#include <glm/gtc/type_ptr.hpp>
|
|
||||||
#include <glm/gtx/matrix_decompose.hpp>
|
|
||||||
|
|
||||||
#include "gearview.h"
|
#include "gearview.h"
|
||||||
#include "quaternionedit.h"
|
|
||||||
#include "vec3edit.h"
|
|
||||||
|
|
||||||
void addItem(physis_Skeleton &skeleton, physis_Bone &bone, QTreeWidget *widget, QTreeWidgetItem *parent_item = nullptr)
|
|
||||||
{
|
|
||||||
auto item = new QTreeWidgetItem();
|
|
||||||
item->setText(0, QLatin1String(bone.name));
|
|
||||||
|
|
||||||
if (parent_item == nullptr) {
|
|
||||||
widget->addTopLevelItem(item);
|
|
||||||
} else {
|
|
||||||
parent_item->addChild(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < skeleton.num_bones; i++) {
|
|
||||||
if (skeleton.bones[i].parent_bone != nullptr && strcmp(skeleton.bones[i].parent_bone->name, bone.name) == 0)
|
|
||||||
addItem(skeleton, skeleton.bones[i], widget, item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
BoneEditor::BoneEditor(GearView *gearView, QWidget *parent)
|
BoneEditor::BoneEditor(GearView *gearView, QWidget *parent)
|
||||||
: gearView(gearView)
|
: SklbPart()
|
||||||
|
, gearView(gearView)
|
||||||
{
|
{
|
||||||
auto layout = new QHBoxLayout();
|
connect(&gearView->part(), &MDLPart::skeletonChanged, this, [this, gearView] {
|
||||||
setLayout(layout);
|
load(*gearView->part().skeleton);
|
||||||
|
|
||||||
auto boneListWidget = new QTreeWidget();
|
|
||||||
boneListWidget->setHeaderLabel(QStringLiteral("Name"));
|
|
||||||
|
|
||||||
connect(&gearView->part(), &MDLPart::skeletonChanged, this, [this, boneListWidget, gearView] {
|
|
||||||
boneListWidget->clear();
|
|
||||||
addItem(*gearView->part().skeleton, *gearView->part().skeleton->root_bone, boneListWidget);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
boneListWidget->setMaximumWidth(200);
|
connect(this, &SklbPart::valueChanged, this, [gearView] {
|
||||||
|
|
||||||
layout->addWidget(boneListWidget);
|
|
||||||
|
|
||||||
auto transformLayout = new QVBoxLayout();
|
|
||||||
layout->addLayout(transformLayout);
|
|
||||||
|
|
||||||
auto transformGroup = new QGroupBox(QStringLiteral("Bone Transform"));
|
|
||||||
transformLayout->addWidget(transformGroup);
|
|
||||||
auto transformGroupLayout = new QFormLayout();
|
|
||||||
transformGroup->setLayout(transformGroupLayout);
|
|
||||||
|
|
||||||
posEdit = new Vector3Edit(currentPosition);
|
|
||||||
connect(posEdit, &Vector3Edit::onValueChanged, [this, gearView] {
|
|
||||||
memcpy(currentEditedBone->position, glm::value_ptr(currentPosition), sizeof(float) * 3);
|
|
||||||
gearView->part().reloadRenderer();
|
gearView->part().reloadRenderer();
|
||||||
});
|
});
|
||||||
transformGroupLayout->addRow(QStringLiteral("Position"), posEdit);
|
|
||||||
|
|
||||||
rotationEdit = new QuaternionEdit(currentRotation);
|
|
||||||
connect(rotationEdit, &QuaternionEdit::onValueChanged, [this, gearView] {
|
|
||||||
memcpy(currentEditedBone->rotation, glm::value_ptr(currentRotation), sizeof(float) * 4);
|
|
||||||
gearView->part().reloadRenderer();
|
|
||||||
});
|
|
||||||
transformGroupLayout->addRow(QStringLiteral("Rotation"), rotationEdit);
|
|
||||||
|
|
||||||
scaleEdit = new Vector3Edit(currentScale);
|
|
||||||
connect(scaleEdit, &Vector3Edit::onValueChanged, [this, gearView] {
|
|
||||||
memcpy(currentEditedBone->scale, glm::value_ptr(currentScale), sizeof(float) * 3);
|
|
||||||
gearView->part().reloadRenderer();
|
|
||||||
});
|
|
||||||
transformGroupLayout->addRow(QStringLiteral("Scale"), scaleEdit);
|
|
||||||
|
|
||||||
connect(boneListWidget, &QTreeWidget::itemClicked, this, &BoneEditor::treeItemClicked);
|
|
||||||
|
|
||||||
auto raceDeformGroup = new QGroupBox(QStringLiteral("Race Deform"));
|
|
||||||
transformLayout->addWidget(raceDeformGroup);
|
|
||||||
auto raceDeformGroupLayout = new QFormLayout();
|
|
||||||
raceDeformGroup->setLayout(raceDeformGroupLayout);
|
|
||||||
|
|
||||||
raceDeformPosEdit = new Vector3Edit(currentRacePosition);
|
|
||||||
raceDeformGroupLayout->addRow(QStringLiteral("Position"), raceDeformPosEdit);
|
|
||||||
|
|
||||||
raceDeformRotationEdit = new QuaternionEdit(currentRaceRotation);
|
|
||||||
raceDeformGroupLayout->addRow(QStringLiteral("Rotation"), raceDeformRotationEdit);
|
|
||||||
|
|
||||||
raceDeformScaleEdit = new Vector3Edit(currentRaceScale);
|
|
||||||
raceDeformGroupLayout->addRow(QStringLiteral("Scale"), raceDeformScaleEdit);
|
|
||||||
|
|
||||||
if (gearView->part().skeleton) {
|
if (gearView->part().skeleton) {
|
||||||
addItem(*gearView->part().skeleton, *gearView->part().skeleton->root_bone, boneListWidget);
|
load(*gearView->part().skeleton);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void BoneEditor::treeItemClicked(QTreeWidgetItem *item, int column)
|
|
||||||
{
|
|
||||||
auto &skeleton = *gearView->part().skeleton;
|
|
||||||
for (int i = 0; i < skeleton.num_bones; i++) {
|
|
||||||
if (strcmp(skeleton.bones[i].name, item->text(column).toStdString().c_str()) == 0) {
|
|
||||||
currentPosition = glm::make_vec3(skeleton.bones[i].position);
|
|
||||||
currentRotation = glm::make_quat(skeleton.bones[i].rotation);
|
|
||||||
currentScale = glm::make_vec3(skeleton.bones[i].scale);
|
|
||||||
currentEditedBone = &skeleton.bones[i];
|
|
||||||
|
|
||||||
posEdit->setVector(currentPosition);
|
|
||||||
rotationEdit->setQuat(currentRotation);
|
|
||||||
scaleEdit->setVector(currentScale);
|
|
||||||
|
|
||||||
glm::mat4 transformation; // your transformation matrix.
|
|
||||||
glm::vec3 scale;
|
|
||||||
glm::quat rotation;
|
|
||||||
glm::vec3 translation;
|
|
||||||
glm::vec3 skew;
|
|
||||||
glm::vec4 perspective;
|
|
||||||
/*glm::decompose(gearView->part().boneData[i].deformRaceMatrix, scale, rotation, translation, skew, perspective);
|
|
||||||
|
|
||||||
currentRacePosition = translation;
|
|
||||||
currentRaceRotation = rotation;
|
|
||||||
currentRaceScale = scale;
|
|
||||||
|
|
||||||
raceDeformPosEdit->setVector(currentRacePosition);
|
|
||||||
raceDeformRotationEdit->setQuat(currentRaceRotation);
|
|
||||||
raceDeformScaleEdit->setVector(currentRaceScale);*/
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,13 +6,17 @@ target_sources(novus-common PRIVATE
|
||||||
include/aboutdata.h
|
include/aboutdata.h
|
||||||
include/filecache.h
|
include/filecache.h
|
||||||
include/novusmainwindow.h
|
include/novusmainwindow.h
|
||||||
|
include/quaternionedit.h
|
||||||
include/settings.h
|
include/settings.h
|
||||||
include/utility.h
|
include/utility.h
|
||||||
|
include/vec3edit.h
|
||||||
src/aboutdata.cpp
|
src/aboutdata.cpp
|
||||||
src/filecache.cpp
|
src/filecache.cpp
|
||||||
src/novusmainwindow.cpp
|
src/novusmainwindow.cpp
|
||||||
|
src/quaternionedit.cpp
|
||||||
src/settings.cpp
|
src/settings.cpp
|
||||||
src/utility.cpp)
|
src/utility.cpp
|
||||||
|
src/vec3edit.cpp)
|
||||||
target_include_directories(novus-common PUBLIC
|
target_include_directories(novus-common PUBLIC
|
||||||
include
|
include
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
|
|
@ -7,4 +7,5 @@ add_subdirectory(exl)
|
||||||
add_subdirectory(hex)
|
add_subdirectory(hex)
|
||||||
add_subdirectory(mdl)
|
add_subdirectory(mdl)
|
||||||
add_subdirectory(shpk)
|
add_subdirectory(shpk)
|
||||||
|
add_subdirectory(sklb)
|
||||||
add_subdirectory(tex)
|
add_subdirectory(tex)
|
9
parts/sklb/CMakeLists.txt
Normal file
9
parts/sklb/CMakeLists.txt
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
add_library(sklbpart STATIC)
|
||||||
|
target_sources(sklbpart PRIVATE
|
||||||
|
sklbpart.cpp
|
||||||
|
sklbpart.h)
|
||||||
|
target_link_libraries(sklbpart PUBLIC novus-common physis z Qt6::Core Qt6::Widgets)
|
||||||
|
target_include_directories(sklbpart PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
103
parts/sklb/sklbpart.cpp
Normal file
103
parts/sklb/sklbpart.cpp
Normal file
|
@ -0,0 +1,103 @@
|
||||||
|
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
#include "sklbpart.h"
|
||||||
|
|
||||||
|
#include <QFormLayout>
|
||||||
|
#include <QGroupBox>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <glm/gtc/type_ptr.hpp>
|
||||||
|
#include <glm/gtx/matrix_decompose.hpp>
|
||||||
|
|
||||||
|
#include "quaternionedit.h"
|
||||||
|
#include "vec3edit.h"
|
||||||
|
|
||||||
|
void addItem(physis_Skeleton &skeleton, physis_Bone &bone, QTreeWidget *widget, QTreeWidgetItem *parent_item = nullptr)
|
||||||
|
{
|
||||||
|
auto item = new QTreeWidgetItem();
|
||||||
|
item->setText(0, QLatin1String(bone.name));
|
||||||
|
|
||||||
|
if (parent_item == nullptr) {
|
||||||
|
widget->addTopLevelItem(item);
|
||||||
|
} else {
|
||||||
|
parent_item->addChild(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < skeleton.num_bones; i++) {
|
||||||
|
if (skeleton.bones[i].parent_bone != nullptr && strcmp(skeleton.bones[i].parent_bone->name, bone.name) == 0)
|
||||||
|
addItem(skeleton, skeleton.bones[i], widget, item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SklbPart::SklbPart()
|
||||||
|
{
|
||||||
|
auto layout = new QHBoxLayout();
|
||||||
|
setLayout(layout);
|
||||||
|
|
||||||
|
boneListWidget = new QTreeWidget();
|
||||||
|
boneListWidget->setHeaderLabel(QStringLiteral("Name"));
|
||||||
|
boneListWidget->setMaximumWidth(200);
|
||||||
|
|
||||||
|
layout->addWidget(boneListWidget);
|
||||||
|
|
||||||
|
auto transformLayout = new QVBoxLayout();
|
||||||
|
layout->addLayout(transformLayout);
|
||||||
|
|
||||||
|
auto transformGroup = new QGroupBox(QStringLiteral("Bone Transform"));
|
||||||
|
transformLayout->addWidget(transformGroup);
|
||||||
|
auto transformGroupLayout = new QFormLayout();
|
||||||
|
transformGroup->setLayout(transformGroupLayout);
|
||||||
|
|
||||||
|
posEdit = new Vector3Edit(currentPosition);
|
||||||
|
connect(posEdit, &Vector3Edit::onValueChanged, [this] {
|
||||||
|
memcpy(currentEditedBone->position, glm::value_ptr(currentPosition), sizeof(float) * 3);
|
||||||
|
Q_EMIT valueChanged();
|
||||||
|
});
|
||||||
|
transformGroupLayout->addRow(QStringLiteral("Position"), posEdit);
|
||||||
|
|
||||||
|
rotationEdit = new QuaternionEdit(currentRotation);
|
||||||
|
connect(rotationEdit, &QuaternionEdit::onValueChanged, [this] {
|
||||||
|
memcpy(currentEditedBone->rotation, glm::value_ptr(currentRotation), sizeof(float) * 4);
|
||||||
|
Q_EMIT valueChanged();
|
||||||
|
});
|
||||||
|
transformGroupLayout->addRow(QStringLiteral("Rotation"), rotationEdit);
|
||||||
|
|
||||||
|
scaleEdit = new Vector3Edit(currentScale);
|
||||||
|
connect(scaleEdit, &Vector3Edit::onValueChanged, [this] {
|
||||||
|
memcpy(currentEditedBone->scale, glm::value_ptr(currentScale), sizeof(float) * 3);
|
||||||
|
Q_EMIT valueChanged();
|
||||||
|
});
|
||||||
|
transformGroupLayout->addRow(QStringLiteral("Scale"), scaleEdit);
|
||||||
|
|
||||||
|
connect(boneListWidget, &QTreeWidget::itemClicked, this, &SklbPart::treeItemClicked);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SklbPart::treeItemClicked(QTreeWidgetItem *item, int column)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < skeleton.num_bones; i++) {
|
||||||
|
if (strcmp(skeleton.bones[i].name, item->text(column).toStdString().c_str()) == 0) {
|
||||||
|
currentPosition = glm::make_vec3(skeleton.bones[i].position);
|
||||||
|
currentRotation = glm::make_quat(skeleton.bones[i].rotation);
|
||||||
|
currentScale = glm::make_vec3(skeleton.bones[i].scale);
|
||||||
|
currentEditedBone = &skeleton.bones[i];
|
||||||
|
|
||||||
|
posEdit->setVector(currentPosition);
|
||||||
|
rotationEdit->setQuat(currentRotation);
|
||||||
|
scaleEdit->setVector(currentScale);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SklbPart::clear()
|
||||||
|
{
|
||||||
|
boneListWidget->clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SklbPart::load(physis_Skeleton file)
|
||||||
|
{
|
||||||
|
clear();
|
||||||
|
addItem(file, *file.root_bone, boneListWidget);
|
||||||
|
skeleton = file;
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "moc_sklbpart.cpp"
|
45
parts/sklb/sklbpart.h
Normal file
45
parts/sklb/sklbpart.h
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <QSpinBox>
|
||||||
|
#include <QTreeWidget>
|
||||||
|
#include <QTreeWidgetItem>
|
||||||
|
#include <QWidget>
|
||||||
|
#include <glm/detail/type_quat.hpp>
|
||||||
|
#include <glm/glm.hpp>
|
||||||
|
#include <physis.hpp>
|
||||||
|
|
||||||
|
#include "quaternionedit.h"
|
||||||
|
#include "vec3edit.h"
|
||||||
|
|
||||||
|
class SklbPart : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit SklbPart();
|
||||||
|
|
||||||
|
void clear();
|
||||||
|
void load(physis_Skeleton file);
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
void valueChanged();
|
||||||
|
|
||||||
|
private:
|
||||||
|
void treeItemClicked(QTreeWidgetItem *item, int column);
|
||||||
|
|
||||||
|
QTreeWidget *boneListWidget = nullptr;
|
||||||
|
|
||||||
|
glm::vec3 currentPosition;
|
||||||
|
glm::quat currentRotation;
|
||||||
|
glm::vec3 currentScale;
|
||||||
|
|
||||||
|
physis_Bone *currentEditedBone = nullptr;
|
||||||
|
|
||||||
|
Vector3Edit *posEdit = nullptr;
|
||||||
|
QuaternionEdit *rotationEdit = nullptr;
|
||||||
|
Vector3Edit *scaleEdit = nullptr;
|
||||||
|
physis_Skeleton skeleton;
|
||||||
|
};
|
|
@ -22,6 +22,6 @@ target_sources(novus-sagasu PRIVATE
|
||||||
src/filepropertieswindow.cpp
|
src/filepropertieswindow.cpp
|
||||||
src/filetreemodel.cpp)
|
src/filetreemodel.cpp)
|
||||||
target_include_directories(novus-sagasu PRIVATE include)
|
target_include_directories(novus-sagasu PRIVATE include)
|
||||||
target_link_libraries(novus-sagasu PRIVATE Qt6::Concurrent cmppart shpkpart hexpart exlpart mdlpart exdpart texpart novus-sagasu-static)
|
target_link_libraries(novus-sagasu PRIVATE Qt6::Concurrent sklbpart cmppart shpkpart hexpart exlpart mdlpart exdpart texpart novus-sagasu-static)
|
||||||
|
|
||||||
install(TARGETS novus-sagasu ${KF${QT_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS})
|
install(TARGETS novus-sagasu ${KF${QT_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||||
|
|
|
@ -15,7 +15,8 @@ const std::array known_folders{"common",
|
||||||
"chara/human/c0101/obj/face/f0001/model",
|
"chara/human/c0101/obj/face/f0001/model",
|
||||||
"shader/sm5/shpk",
|
"shader/sm5/shpk",
|
||||||
"chara/xls/bonedeformer",
|
"chara/xls/bonedeformer",
|
||||||
"chara/xls/charamake"};
|
"chara/xls/charamake",
|
||||||
|
"chara/human/c0101/skeleton/base/b0001"};
|
||||||
|
|
||||||
const std::array common_font{"common/VulgarWordsFilter.dic",
|
const std::array common_font{"common/VulgarWordsFilter.dic",
|
||||||
"common/VulgarWordsFilter_party.dic",
|
"common/VulgarWordsFilter_party.dic",
|
||||||
|
@ -167,6 +168,7 @@ int main(int argc, char *argv[])
|
||||||
database.addFile(QStringLiteral("shader/sm5/shpk/character.shpk"));
|
database.addFile(QStringLiteral("shader/sm5/shpk/character.shpk"));
|
||||||
database.addFile(QStringLiteral("chara/xls/bonedeformer/human.pbd"));
|
database.addFile(QStringLiteral("chara/xls/bonedeformer/human.pbd"));
|
||||||
database.addFile(QStringLiteral("chara/xls/charamake/human.cmp"));
|
database.addFile(QStringLiteral("chara/xls/charamake/human.cmp"));
|
||||||
|
database.addFile(QStringLiteral("chara/human/c0101/skeleton/base/b0001/skl_c0101b0001.sklb"));
|
||||||
|
|
||||||
/*const QString gameDir{getGameDirectory()};
|
/*const QString gameDir{getGameDirectory()};
|
||||||
const std::string gameDirStd{gameDir.toStdString()};
|
const std::string gameDirStd{gameDir.toStdString()};
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "hexpart.h"
|
#include "hexpart.h"
|
||||||
#include "mdlpart.h"
|
#include "mdlpart.h"
|
||||||
#include "shpkpart.h"
|
#include "shpkpart.h"
|
||||||
|
#include "sklbpart.h"
|
||||||
#include "texpart.h"
|
#include "texpart.h"
|
||||||
|
|
||||||
MainWindow::MainWindow(QString gamePath, GameData *data)
|
MainWindow::MainWindow(QString gamePath, GameData *data)
|
||||||
|
@ -102,6 +103,10 @@ void MainWindow::refreshParts(QString path)
|
||||||
auto cmpWidget = new CmpPart(data);
|
auto cmpWidget = new CmpPart(data);
|
||||||
cmpWidget->load(file);
|
cmpWidget->load(file);
|
||||||
partHolder->addTab(cmpWidget, QStringLiteral("Chara Make Params"));
|
partHolder->addTab(cmpWidget, QStringLiteral("Chara Make Params"));
|
||||||
|
} else if (info.completeSuffix() == QStringLiteral("sklb")) {
|
||||||
|
auto sklbWidget = new SklbPart();
|
||||||
|
sklbWidget->load(physis_parse_skeleton(file));
|
||||||
|
partHolder->addTab(sklbWidget, QStringLiteral("Skeleton"));
|
||||||
}
|
}
|
||||||
|
|
||||||
auto hexWidget = new HexPart();
|
auto hexWidget = new HexPart();
|
||||||
|
|
Loading…
Add table
Reference in a new issue