mirror of
https://github.com/redstrate/Novus.git
synced 2025-05-07 18:17:45 +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.
38 lines
No EOL
812 B
C++
38 lines
No EOL
812 B
C++
// SPDX-FileCopyrightText: 2024 Joshua Goins <josh@redstrate.com>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QHBoxLayout>
|
|
#include <QLabel>
|
|
#include <QLineEdit>
|
|
#include <QWidget>
|
|
|
|
#include <QTabWidget>
|
|
#include <physis.hpp>
|
|
|
|
class MtrlPart : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit MtrlPart(GameData *data, QWidget *parent = nullptr);
|
|
|
|
void load(physis_Material file);
|
|
|
|
private:
|
|
void rebuild();
|
|
|
|
QVBoxLayout *m_itemsLayout = nullptr;
|
|
QLineEdit *m_shaderPackageName = nullptr;
|
|
|
|
QTabWidget *m_tabWidget = nullptr;
|
|
QVBoxLayout *m_propertiesLayout = nullptr;
|
|
QVBoxLayout *m_texturesLayout = nullptr;
|
|
QVBoxLayout *m_constantsLayout = nullptr;
|
|
|
|
physis_Material m_material = {};
|
|
physis_SHPK m_shpk = {};
|
|
|
|
GameData *m_data = nullptr;
|
|
}; |