mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-26 13:47:46 +00:00
This takes the existing properties widget in the new material editor and makes it reusable across multiple applications. It's now added to the Armoury which shows the gear's used materials. It's also added to the Data Explorer which now supports viewing material files. I fixed the render viewport crashing when hiding it again, and made it even more resilient.
69 lines
No EOL
1.5 KiB
C++
69 lines
No EOL
1.5 KiB
C++
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include "filecache.h"
|
|
#include "gearview.h"
|
|
#include <QPushButton>
|
|
#include <QWidget>
|
|
|
|
struct GameData;
|
|
|
|
class SingleGearView : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit SingleGearView(GameData *data, FileCache &cache, QWidget *parent = nullptr);
|
|
|
|
QString getLoadedGearPath() const;
|
|
QList<physis_Material> getLoadedMaterials() const;
|
|
|
|
Q_SIGNALS:
|
|
void gearChanged();
|
|
void gotMDLPath();
|
|
|
|
void raceChanged();
|
|
void subraceChanged();
|
|
void genderChanged();
|
|
void levelOfDetailChanged();
|
|
|
|
void addToFullModelViewer(GearInfo &info);
|
|
void importedModel();
|
|
|
|
void doneLoadingModel();
|
|
|
|
public Q_SLOTS:
|
|
void clear();
|
|
void setGear(const GearInfo &info);
|
|
|
|
void setRace(Race race);
|
|
void setSubrace(Subrace subrace);
|
|
void setGender(Gender gender);
|
|
void setLevelOfDetail(int lod);
|
|
|
|
void setFMVAvailable(bool available);
|
|
|
|
private Q_SLOTS:
|
|
void reloadGear();
|
|
|
|
private:
|
|
void importModel(const QString &filename);
|
|
|
|
std::optional<GearInfo> currentGear;
|
|
|
|
Race currentRace = Race::Hyur;
|
|
Subrace currentSubrace = Subrace::Midlander;
|
|
Gender currentGender = Gender::Male;
|
|
int currentLod = 0;
|
|
|
|
GearView *gearView = nullptr;
|
|
QComboBox *raceCombo, *subraceCombo, *genderCombo, *lodCombo;
|
|
QPushButton *addToFMVButton, *editButton, *importButton, *exportButton;
|
|
|
|
bool loadingComboData = false;
|
|
bool fmvAvailable = false;
|
|
|
|
GameData *data = nullptr;
|
|
}; |