mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-24 13:07:44 +00:00
Rename mdlviewer to Armoury Editor
This commit is contained in:
parent
085f26a719
commit
589598b34c
23 changed files with 19 additions and 33 deletions
|
@ -38,7 +38,7 @@ endif()
|
||||||
|
|
||||||
add_subdirectory(renderer)
|
add_subdirectory(renderer)
|
||||||
add_subdirectory(exdviewer)
|
add_subdirectory(exdviewer)
|
||||||
add_subdirectory(mdlviewer)
|
add_subdirectory(armoury)
|
||||||
add_subdirectory(argcracker)
|
add_subdirectory(argcracker)
|
||||||
add_subdirectory(explorer)
|
add_subdirectory(explorer)
|
||||||
add_subdirectory(bonedecomp)
|
add_subdirectory(bonedecomp)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
find_package(assimp REQUIRED)
|
find_package(assimp REQUIRED)
|
||||||
set_target_properties(assimp::assimp PROPERTIES MAP_IMPORTED_CONFIG_DEBUG Release)
|
set_target_properties(assimp::assimp PROPERTIES MAP_IMPORTED_CONFIG_DEBUG Release)
|
||||||
|
|
||||||
add_executable(mdlviewer
|
add_executable(armoury
|
||||||
src/main.cpp
|
src/main.cpp
|
||||||
src/mainwindow.cpp
|
src/mainwindow.cpp
|
||||||
src/vec3edit.cpp
|
src/vec3edit.cpp
|
||||||
|
@ -14,12 +14,12 @@ add_executable(mdlviewer
|
||||||
src/cmpeditor.cpp
|
src/cmpeditor.cpp
|
||||||
src/gearlistwidget.cpp
|
src/gearlistwidget.cpp
|
||||||
src/gearlistmodel.cpp)
|
src/gearlistmodel.cpp)
|
||||||
target_include_directories(mdlviewer
|
target_include_directories(armoury
|
||||||
PUBLIC
|
PUBLIC
|
||||||
include
|
include
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_BINARY_DIR})
|
${CMAKE_BINARY_DIR})
|
||||||
target_link_libraries(mdlviewer PUBLIC
|
target_link_libraries(armoury PUBLIC
|
||||||
${LIBRARIES}
|
${LIBRARIES}
|
||||||
Qt5::Core
|
Qt5::Core
|
||||||
Qt5::Widgets
|
Qt5::Widgets
|
||||||
|
@ -31,7 +31,7 @@ target_link_libraries(mdlviewer PUBLIC
|
||||||
mdlpart
|
mdlpart
|
||||||
NovusCommon)
|
NovusCommon)
|
||||||
|
|
||||||
install(TARGETS mdlviewer
|
install(TARGETS armoury
|
||||||
DESTINATION "${INSTALL_BIN_PATH}")
|
DESTINATION "${INSTALL_BIN_PATH}")
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
@ -42,8 +42,8 @@ if(WIN32)
|
||||||
find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${QT_BIN_DIR}")
|
find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${QT_BIN_DIR}")
|
||||||
|
|
||||||
# Run windeployqt immediately after build
|
# Run windeployqt immediately after build
|
||||||
add_custom_command(TARGET mdlviewer
|
add_custom_command(TARGET armoury
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND "${WINDEPLOYQT_ENV_SETUP}" && "${WINDEPLOYQT_EXECUTABLE}" \"$<TARGET_FILE:mdlviewer>\"
|
COMMAND "${WINDEPLOYQT_ENV_SETUP}" && "${WINDEPLOYQT_EXECUTABLE}" \"$<TARGET_FILE:armoury>\"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QMainWindow>
|
||||||
#include <QGroupBox>
|
#include <QGroupBox>
|
||||||
|
|
||||||
#include "gearview.h"
|
#include "gearview.h"
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
struct GameData;
|
struct GameData;
|
||||||
class FileCache;
|
class FileCache;
|
||||||
|
|
||||||
class FullModelViewer : public QWidget {
|
class FullModelViewer : public QMainWindow {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit FullModelViewer(GameData* data, FileCache& cache);
|
explicit FullModelViewer(GameData* data, FileCache& cache);
|
|
@ -36,6 +36,7 @@ BoneEditor::BoneEditor(GearView* gearView, QWidget* parent) : gearView(gearView)
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
|
|
||||||
auto boneListWidget = new QTreeWidget();
|
auto boneListWidget = new QTreeWidget();
|
||||||
|
boneListWidget->setHeaderLabel("Name");
|
||||||
|
|
||||||
connect(gearView, &GearView::modelReloaded, this, [this, boneListWidget, gearView] {
|
connect(gearView, &GearView::modelReloaded, this, [this, boneListWidget, gearView] {
|
||||||
boneListWidget->clear();
|
boneListWidget->clear();
|
|
@ -24,6 +24,8 @@ std::vector<RaceTree> raceTree = {
|
||||||
{Race::Viera, {Subrace::Rava, Subrace::Veena}}};
|
{Race::Viera, {Subrace::Rava, Subrace::Veena}}};
|
||||||
|
|
||||||
CmpEditor::CmpEditor(GameData* data) : data(data) {
|
CmpEditor::CmpEditor(GameData* data) : data(data) {
|
||||||
|
setWindowTitle("CMP Editor");
|
||||||
|
|
||||||
auto layout = new QHBoxLayout();
|
auto layout = new QHBoxLayout();
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
|
|
|
@ -14,13 +14,13 @@ FullModelViewer::FullModelViewer(GameData* data, FileCache& cache) : data(data)
|
||||||
setMinimumWidth(1280);
|
setMinimumWidth(1280);
|
||||||
setMinimumHeight(720);
|
setMinimumHeight(720);
|
||||||
|
|
||||||
|
auto dummyWidget = new QWidget();
|
||||||
|
setCentralWidget(dummyWidget);
|
||||||
|
|
||||||
auto layout = new QVBoxLayout();
|
auto layout = new QVBoxLayout();
|
||||||
setLayout(layout);
|
dummyWidget->setLayout(layout);
|
||||||
|
|
||||||
auto menuBar = new QMenuBar();
|
auto fileMenu = menuBar()->addMenu("File");
|
||||||
layout->addWidget(menuBar);
|
|
||||||
|
|
||||||
auto fileMenu = menuBar->addMenu("File");
|
|
||||||
|
|
||||||
auto datOpenAction = fileMenu->addAction("Load character DAT...");
|
auto datOpenAction = fileMenu->addAction("Load character DAT...");
|
||||||
connect(datOpenAction, &QAction::triggered, [=] {
|
connect(datOpenAction, &QAction::triggered, [=] {
|
|
@ -23,26 +23,9 @@
|
||||||
#include "filecache.h"
|
#include "filecache.h"
|
||||||
|
|
||||||
MainWindow::MainWindow(GameData* in_data) : data(*in_data), cache(FileCache{*in_data}) {
|
MainWindow::MainWindow(GameData* in_data) : data(*in_data), cache(FileCache{*in_data}) {
|
||||||
setWindowTitle("mdlviewer");
|
setWindowTitle("Armoury Editor");
|
||||||
setMinimumSize(QSize(800, 600));
|
setMinimumSize(QSize(800, 600));
|
||||||
|
|
||||||
auto fileMenu = menuBar()->addMenu("File");
|
|
||||||
|
|
||||||
// TODO: move to a dedicated mdlview?
|
|
||||||
/*auto openMDLFile = fileMenu->addAction("Open MDL...");
|
|
||||||
connect(openMDLFile, &QAction::triggered, [=] {
|
|
||||||
auto fileName = QFileDialog::getOpenFileName(nullptr,
|
|
||||||
"Open MDL File",
|
|
||||||
"~",
|
|
||||||
"FFXIV Model File (*.mdl)");
|
|
||||||
|
|
||||||
auto buffer = physis_read_file(fileName.toStdString().c_str());
|
|
||||||
|
|
||||||
loadedGear.model = physis_mdl_parse(buffer.size, buffer.data);
|
|
||||||
|
|
||||||
reloadGearAppearance();
|
|
||||||
});*/
|
|
||||||
|
|
||||||
auto toolsMenu = menuBar()->addMenu("Tools");
|
auto toolsMenu = menuBar()->addMenu("Tools");
|
||||||
|
|
||||||
auto cmpEditorMenu = toolsMenu->addAction("CMP Editor");
|
auto cmpEditorMenu = toolsMenu->addAction("CMP Editor");
|
||||||
|
@ -61,7 +44,7 @@ MainWindow::MainWindow(GameData* in_data) : data(*in_data), cache(FileCache{*in_
|
||||||
|
|
||||||
helpMenu->addSeparator();
|
helpMenu->addSeparator();
|
||||||
|
|
||||||
auto aboutNovusAction = helpMenu->addAction("About mdlviewer");
|
auto aboutNovusAction = helpMenu->addAction("About Armoury Editor");
|
||||||
aboutNovusAction->setIcon(QIcon::fromTheme("help-about"));
|
aboutNovusAction->setIcon(QIcon::fromTheme("help-about"));
|
||||||
connect(aboutNovusAction, &QAction::triggered, this, [this] {
|
connect(aboutNovusAction, &QAction::triggered, this, [this] {
|
||||||
auto window = new AboutWindow(this);
|
auto window = new AboutWindow(this);
|
Loading…
Add table
Reference in a new issue