Add textures to NSBTX support and update a bunch of stuff.

This commit is contained in:
TheGameratorT 2019-11-23 12:41:56 +00:00 committed by BuildTools
parent d96a093486
commit 4efa211c39
11 changed files with 547 additions and 157 deletions

View File

@ -32,18 +32,21 @@ SOURCES += \
mainwindow.cpp \ mainwindow.cpp \
modeltonsbmd.cpp \ modeltonsbmd.cpp \
texturednsbmdtonsbtx.cpp \ texturednsbmdtonsbtx.cpp \
textureentry.cpp \
texturetonsbtx.cpp texturetonsbtx.cpp
HEADERS += \ HEADERS += \
mainwindow.h \ mainwindow.h \
modeltonsbmd.h \ modeltonsbmd.h \
texturednsbmdtonsbtx.h \ texturednsbmdtonsbtx.h \
textureentry.h \
texturetonsbtx.h texturetonsbtx.h
FORMS += \ FORMS += \
mainwindow.ui \ mainwindow.ui \
modeltonsbmd.ui \ modeltonsbmd.ui \
texturednsbmdtonsbtx.ui \ texturednsbmdtonsbtx.ui \
textureentry.ui \
texturetonsbtx.ui texturetonsbtx.ui
# Default rules for deployment. # Default rules for deployment.

View File

@ -15,9 +15,9 @@ MainWindow::MainWindow(QWidget *parent) :
ui->ModelToNSBMD_mdiArea->addSubWindow(ModelToNSBMD_Window, Qt::FramelessWindowHint | Qt::MSWindowsFixedSizeDialogHint); ui->ModelToNSBMD_mdiArea->addSubWindow(ModelToNSBMD_Window, Qt::FramelessWindowHint | Qt::MSWindowsFixedSizeDialogHint);
ModelToNSBMD_Window->showMaximized(); ModelToNSBMD_Window->showMaximized();
/*TextureToNSBTX *TextureToNSBTX_Window = new TextureToNSBTX; TextureToNSBTX *TextureToNSBTX_Window = new TextureToNSBTX;
ui->TextureToNSBTX_mdiArea->addSubWindow(TextureToNSBTX_Window, Qt::FramelessWindowHint | Qt::MSWindowsFixedSizeDialogHint); ui->TextureToNSBTX_mdiArea->addSubWindow(TextureToNSBTX_Window, Qt::FramelessWindowHint | Qt::MSWindowsFixedSizeDialogHint);
TextureToNSBTX_Window->showMaximized();*/ TextureToNSBTX_Window->showMaximized();
TexturedNSBMDToNSBTX *TexturedNSBMDToNSBTX_Window = new TexturedNSBMDToNSBTX; TexturedNSBMDToNSBTX *TexturedNSBMDToNSBTX_Window = new TexturedNSBMDToNSBTX;
ui->TexturedNSBMDToNSBTX_mdiArea->addSubWindow(TexturedNSBMDToNSBTX_Window, Qt::FramelessWindowHint | Qt::MSWindowsFixedSizeDialogHint); ui->TexturedNSBMDToNSBTX_mdiArea->addSubWindow(TexturedNSBMDToNSBTX_Window, Qt::FramelessWindowHint | Qt::MSWindowsFixedSizeDialogHint);

View File

@ -7,13 +7,13 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>600</width> <width>600</width>
<height>430</height> <height>500</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>470</width> <width>470</width>
<height>430</height> <height>500</height>
</size> </size>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -24,7 +24,7 @@
<item> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>1</number>
</property> </property>
<widget class="QWidget" name="tab"> <widget class="QWidget" name="tab">
<attribute name="title"> <attribute name="title">
@ -38,7 +38,7 @@
</widget> </widget>
<widget class="QWidget" name="tab_2"> <widget class="QWidget" name="tab_2">
<attribute name="title"> <attribute name="title">
<string>Texture to NSBTX</string> <string>Textures to NSBTX</string>
</attribute> </attribute>
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<item> <item>

View File

@ -55,6 +55,8 @@ void ModelToNSBMD::printToConsole(const QString &text)
ui->console_tb->setTextColor(QColor("yellow")); ui->console_tb->setTextColor(QColor("yellow"));
ui->console_tb->append(text); ui->console_tb->append(text);
QApplication::processEvents(); //Force UI update
} }
void ModelToNSBMD::printAppOutputToConsole(QProcess* process) void ModelToNSBMD::printAppOutputToConsole(QProcess* process)
@ -63,13 +65,9 @@ void ModelToNSBMD::printAppOutputToConsole(QProcess* process)
do do
{ {
line = process->readLine(); line = process->readLine();
if (line.toLower().contains("error:") || line.toLower().contains("warning:")) { if (line.toLower().contains("error:") || line.toLower().contains("warning:"))
if(!(line.endsWith('.') or line.endsWith('!'))) { {
printToConsole(line.trimmed() + '!'); printToConsole(line.trimmed());
}
else {
printToConsole(line.trimmed());
}
} }
} }
while (!line.isNull()); while (!line.isNull());
@ -82,18 +80,11 @@ void ModelToNSBMD::on_convert_pb_clicked()
QString sourcePath = ui->path1_le->text(); QString sourcePath = ui->path1_le->text();
QString destinationPath = ui->path2_le->text(); QString destinationPath = ui->path2_le->text();
bool AtLeast1PathWasNotSpecified = false;
if(sourcePath == "") if(sourcePath == "")
{
AtLeast1PathWasNotSpecified = true;
printToConsole("Error: No source model file was specified!"); printToConsole("Error: No source model file was specified!");
}
if(destinationPath == "") if(destinationPath == "")
{
AtLeast1PathWasNotSpecified = true;
printToConsole("Error: No destination NSBMD path was specified!"); printToConsole("Error: No destination NSBMD path was specified!");
} if(sourcePath == "" || destinationPath == "")
if(AtLeast1PathWasNotSpecified)
return; return;
bool IsSourceFileIMD = false; bool IsSourceFileIMD = false;
@ -122,6 +113,8 @@ void ModelToNSBMD::on_convert_pb_clicked()
} }
connect(ass2imd, &QProcess::readyRead, [=](){ printAppOutputToConsole(ass2imd); }); connect(ass2imd, &QProcess::readyRead, [=](){ printAppOutputToConsole(ass2imd); });
ass2imd->waitForFinished(-1); ass2imd->waitForFinished(-1);
delete ass2imd;
ass2imd = nullptr;
if(QFile::exists(tempDir.path() + "/temp.imd")) if(QFile::exists(tempDir.path() + "/temp.imd"))
printToConsole("Success: IMD generated successfully!"); printToConsole("Success: IMD generated successfully!");
@ -139,16 +132,18 @@ void ModelToNSBMD::on_convert_pb_clicked()
printToConsole("Starting conversion to NSBMD..."); printToConsole("Starting conversion to NSBMD...");
QProcess* imd2nsbmd = new QProcess(); QProcess* imd2nsbmd = new QProcess();
imd2nsbmd->setProgram(exeDir + "/bin/imd2nsbmd/imd2nsbmd"); imd2nsbmd->setProgram(exeDir + "/bin/imd2bin/imd2bin");
imd2nsbmd->setArguments({sourcePath2, "-o", destinationPath}); imd2nsbmd->setArguments({sourcePath2, "-o", destinationPath});
imd2nsbmd->start(); imd2nsbmd->start();
if(imd2nsbmd->state() == QProcess::NotRunning) if(imd2nsbmd->state() == QProcess::NotRunning)
{ {
printToConsole("Error: imd2nsbmd failed to start or could not be found!"); printToConsole("Error: imd2bin failed to start or could not be found!");
return; return;
} }
connect(imd2nsbmd, &QProcess::readyRead, [=](){ printAppOutputToConsole(imd2nsbmd); }); connect(imd2nsbmd, &QProcess::readyRead, [=](){ printAppOutputToConsole(imd2nsbmd); });
imd2nsbmd->waitForFinished(-1); imd2nsbmd->waitForFinished(-1);
delete imd2nsbmd;
imd2nsbmd = nullptr;
if(QFile::exists(destinationPath)) if(QFile::exists(destinationPath))
{ {

View File

@ -52,6 +52,8 @@ void TexturedNSBMDToNSBTX::printToConsole(const QString &text)
ui->console_tb->setTextColor(QColor("yellow")); ui->console_tb->setTextColor(QColor("yellow"));
ui->console_tb->append(text); ui->console_tb->append(text);
QApplication::processEvents(); //Force UI update
} }
void TexturedNSBMDToNSBTX::on_convert_pb_clicked() void TexturedNSBMDToNSBTX::on_convert_pb_clicked()

67
textureentry.cpp Normal file
View File

@ -0,0 +1,67 @@
#include "textureentry.h"
#include "ui_textureentry.h"
#include <QFileDialog>
TextureEntry::TextureEntry(QWidget *parent) :
QWidget(parent),
ui(new Ui::TextureEntry)
{
ui->setupUi(this);
}
TextureEntry::~TextureEntry()
{
delete ui;
}
void TextureEntry::SetID(int ID) { ui->id_le->setText(QString::number(ID)); }
QString TextureEntry::GetName() { return ui->name_le->text(); }
QString TextureEntry::GetPath() { return ui->path_le->text(); }
QFileInfo TextureEntry::GetFileInfo()
{
QFileInfo fileInfo(ui->path_le->text());
return fileInfo;
}
QString TextureEntry::GetNewFileNameWithExtension()
{
if(ui->name_le->text() == "")
ui->name_le->setText(GetFileInfo().completeBaseName());
return ui->name_le->text() + "." + GetFileInfo().suffix();
}
void TextureEntry::on_search_pb_clicked()
{
static QString lastDirSelected = QDir::homePath();
QString fileName = QFileDialog::getOpenFileName(this, tr("Open Texture File"), lastDirSelected, tr("Image Files (*.png *.tga);;"
"PNG Files (*.png);;"
"Nitro TGA Files (*.tga)"));
if(fileName == "")
return;
lastDirSelected = fileName;
ui->path_le->setText(fileName);
ui->name_le->setText(GetFileInfo().completeBaseName());
}
void TextureEntry::on_name_le_textChanged()
{
QLineEdit* sender = qobject_cast<QLineEdit*>(QObject::sender());
int cursorPos = sender->cursorPosition();
QString newText;
for(QChar character : sender->text())
{
if(!((character >= 'A' && character <= 'Z') ||
(character >= 'a' && character <= 'z') ||
(character >= '0' && character <= '9')))
{
character = '_';
}
newText.append(character);
}
sender->setText(newText);
sender->setCursorPosition(cursorPos);
}

34
textureentry.h Normal file
View File

@ -0,0 +1,34 @@
#ifndef TEXTUREENTRY_H
#define TEXTUREENTRY_H
#include <QWidget>
#include <QFileInfo>
namespace Ui {
class TextureEntry;
}
class TextureEntry : public QWidget
{
Q_OBJECT
public:
explicit TextureEntry(QWidget *parent = nullptr);
~TextureEntry();
void SetID(int ID);
QString GetName();
QString GetPath();
QFileInfo GetFileInfo();
QString GetNewFileNameWithExtension();
private slots:
void on_search_pb_clicked();
void on_name_le_textChanged();
private:
Ui::TextureEntry *ui;
};
#endif // TEXTUREENTRY_H

108
textureentry.ui Normal file
View File

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TextureEntry</class>
<widget class="QWidget" name="TextureEntry">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>464</width>
<height>54</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLineEdit" name="id_le">
<property name="maximumSize">
<size>
<width>32</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>1</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="name_label">
<property name="text">
<string>Name:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="name_le">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maxLength">
<number>13</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="path_label">
<property name="text">
<string>Path:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="path_le"/>
</item>
<item>
<widget class="QPushButton" name="search_pb">
<property name="text">
<string>Search</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -1,13 +1,43 @@
#include "texturetonsbtx.h" #include "texturetonsbtx.h"
#include "ui_texturetonsbtx.h" #include "ui_texturetonsbtx.h"
#include "textureentry.h"
#include <QTextStream>
#include <QFileDialog> #include <QFileDialog>
static QString exeDir;
static QVector<TextureEntry*> texEntries;
TextureToNSBTX::TextureToNSBTX(QWidget *parent) : TextureToNSBTX::TextureToNSBTX(QWidget *parent) :
QMainWindow(parent), QMainWindow(parent),
ui(new Ui::TextureToNSBTX) ui(new Ui::TextureToNSBTX)
{ {
ui->setupUi(this); ui->setupUi(this);
exeDir = QApplication::applicationDirPath();
QVBoxLayout* scrollarea_layout = new QVBoxLayout();
scrollarea_layout->setMargin(0);
scrollarea_layout->setSpacing(0);
TextureEntry* texEntry = new TextureEntry();
texEntries.append(texEntry);
scrollarea_layout->addWidget(texEntry);
ui->textures_sa_widget->setLayout(scrollarea_layout);
}
void TextureToNSBTX::on_selectNsbtxPath_pb_clicked()
{
static QString lastDirSelected = QDir::homePath();
if(lastDirSelected == QDir::homePath() && ui->nsbtxPath_le->text() != "")
lastDirSelected = ui->nsbtxPath_le->text().split('.')[0];
QString fileName = QFileDialog::getSaveFileName(this, tr("Save NSBTX File"), lastDirSelected, tr("NSBTX File (*.nsbtx)"));
if(fileName == "")
return;
lastDirSelected = fileName;
ui->nsbtxPath_le->setText(fileName);
} }
TextureToNSBTX::~TextureToNSBTX() TextureToNSBTX::~TextureToNSBTX()
@ -15,28 +45,30 @@ TextureToNSBTX::~TextureToNSBTX()
delete ui; delete ui;
} }
void TextureToNSBTX::on_searchPath1_pb_clicked() void TextureToNSBTX::on_addTexture_pb_clicked()
{ {
static QString lastDirSelected = QDir::homePath(); TextureEntry* texEntry = new TextureEntry();
texEntries.append(texEntry);
texEntry->SetID(texEntries.size());
QString fileName = QFileDialog::getOpenFileName(this, tr("Open Texture File"), lastDirSelected, ""/*tr("Model Files (*.png *.jpg *.bmp)")*/); ui->textures_sa_widget->layout()->addWidget(texEntry);
if(fileName == "")
return;
lastDirSelected = fileName;
ui->path1_le->setText(fileName);
} }
void TextureToNSBTX::on_seachPath2_pb_clicked() void TextureToNSBTX::on_removeTexture_pb_clicked()
{ {
static QString lastDirSelected = QDir::homePath(); TextureEntry* texEntry = texEntries.last();
if(lastDirSelected == QDir::homePath() && ui->path1_le->text() != "") ui->textures_sa_widget->layout()->removeWidget(texEntry);
lastDirSelected = ui->path1_le->text().split('.')[0];
QString fileName = QFileDialog::getSaveFileName(this, tr("Save NSBTX File"), lastDirSelected, tr("NSBTX File (*.nsbtx)")); delete texEntry;
if(fileName == "") texEntry = nullptr;
return;
lastDirSelected = fileName; texEntries.removeLast();
ui->path2_le->setText(fileName);
//If all got removed add 1 back
if(texEntries.size() == 0)
{
on_addTexture_pb_clicked();
}
} }
//CONVERSION STUFF AHEAD //CONVERSION STUFF AHEAD
@ -52,6 +84,8 @@ void TextureToNSBTX::printToConsole(const QString &text)
ui->console_tb->setTextColor(QColor("yellow")); ui->console_tb->setTextColor(QColor("yellow"));
ui->console_tb->append(text); ui->console_tb->append(text);
QApplication::processEvents(); //Force UI update
} }
void TextureToNSBTX::printAppOutputToConsole(QProcess* process) void TextureToNSBTX::printAppOutputToConsole(QProcess* process)
@ -60,21 +94,159 @@ void TextureToNSBTX::printAppOutputToConsole(QProcess* process)
do do
{ {
line = process->readLine(); line = process->readLine();
if (line.toLower().contains("error:") || line.toLower().contains("warning:")) { if (line.toLower().contains("error:") || line.toLower().contains("warning:"))
if(!(line.endsWith('.') or line.endsWith('!'))) { {
printToConsole(line.trimmed() + '!'); printToConsole(line.trimmed());
}
else {
printToConsole(line.trimmed());
}
} }
} }
while (!line.isNull()); while (!line.isNull());
} }
void TextureToNSBTX::WriteOBJFile(QFile* file)
{
QTextStream stream(file);
stream << R"(mtllib temp.mtl
o MaterialArray
v -1.000000 0.000000 1.000000
v 1.000000 0.000000 1.000000
v -1.000000 0.000000 -1.000000
v 1.000000 0.000000 -1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vn 0.0000 1.0000 0.0000
)";
for(int i = 0; i < texEntries.size(); i++)
{
stream << "usemtl Material" << i+1 << "\n";
stream << "f 1/1/1 2/2/1 4/3/1 3/4/1" << "\n";
}
}
void TextureToNSBTX::WriteMTLFile(QFile* file)
{
QTextStream stream(file);
QDir tempDir(exeDir + "/temp");
for(int i = 0; i < texEntries.size(); i++)
{
QString tempTexPath = tempDir.path() + "/" + texEntries[i]->GetNewFileNameWithExtension();
QFile::copy(texEntries[i]->GetPath(), tempTexPath);
stream << "newmtl Material" << i+1 << "\n";
stream << "map_Kd " << tempTexPath << "\n";
}
}
void TextureToNSBTX::on_convert_pb_clicked() void TextureToNSBTX::on_convert_pb_clicked()
{ {
ui->console_tb->clear(); ui->console_tb->clear();
QString destinationPath = ui->nsbtxPath_le->text();
if(destinationPath == "")
{
printToConsole("Error: No destination NSBTX path was specified!");
return;
}
// CHECK ALL PATHS -----------------------------------------------------------
for(int i = 0; i < texEntries.size(); i++)
{
if(texEntries[i]->GetPath() == "")
{
printToConsole("Error: At least one of the texture paths specified was empty!");
return;
}
}
// TEMP CLEANUP --------------------------------------------------------------
QDir tempDir(exeDir + "/temp");
printToConsole("Cleaning temp folder...");
tempDir.removeRecursively(); //Remove temp folder
while(tempDir.exists()) {} //Wait for temp folder to be deleted
QDir().mkdir(tempDir.path()); //Add temp folder back but empty
// OBJ GENERATION ------------------------------------------------------------
printToConsole("Generating temporary OBJ file...");
QFile tempObjFile(tempDir.path() + "/temp.obj");
if(!tempObjFile.open(QIODevice::WriteOnly | QIODevice::Text))
return;
WriteOBJFile(&tempObjFile);
tempObjFile.close();
// MTL GENERATION ------------------------------------------------------------
printToConsole("Generating temporary MTL file...");
QFile tempMtlFile(tempDir.path() + "/temp.mtl");
if(!tempMtlFile.open(QIODevice::WriteOnly | QIODevice::Text))
return;
WriteMTLFile(&tempMtlFile);
tempMtlFile.close();
// IMD CONVERSION ------------------------------------------------------------
printToConsole("Starting conversion to IMD...");
QProcess* ass2imd = new QProcess();
ass2imd->setProgram(exeDir + "/bin/ass2imd/AssToImd");
ass2imd->setArguments({tempDir.path() + "/temp.obj", "-o", tempDir.path() + "/temp.imd"});
ass2imd->start();
if(ass2imd->state() == QProcess::NotRunning)
{
printToConsole("Error: AssToImd failed to start or could not be found!");
return;
}
connect(ass2imd, &QProcess::readyRead, [=](){ printAppOutputToConsole(ass2imd); });
ass2imd->waitForFinished(-1);
delete ass2imd;
ass2imd = nullptr;
if(QFile::exists(tempDir.path() + "/temp.imd"))
printToConsole("Success: IMD generated successfully!");
else
{
printToConsole("Error: IMD failed to generate!");
return;
}
// NSBTX CONVERSION ----------------------------------------------------------
printToConsole("Starting conversion to NSBTX...");
if(QFile::exists(destinationPath))
{
printToConsole("Deleting existing destination NSBTX...");
QFile::remove(destinationPath);
}
while(QFile::exists(destinationPath)) {} //Wait for removal
QProcess* imd2nsbmd = new QProcess();
imd2nsbmd->setProgram(exeDir + "/bin/imd2bin/imd2bin");
imd2nsbmd->setArguments({tempDir.path() + "/temp.imd", "-etex", "-o", destinationPath});
imd2nsbmd->start();
if(imd2nsbmd->state() == QProcess::NotRunning)
{
printToConsole("Error: imd2bin failed to start or could not be found!");
return;
}
connect(imd2nsbmd, &QProcess::readyRead, [=](){ printAppOutputToConsole(imd2nsbmd); });
imd2nsbmd->waitForFinished(-1);
delete imd2nsbmd;
imd2nsbmd = nullptr;
if(QFile::exists(destinationPath))
{
printToConsole("Success: NSBTX generated successfully!");
}
else
{
printToConsole("Error: NSBTX failed to generate!");
return;
}
} }

View File

@ -3,6 +3,7 @@
#include <QMainWindow> #include <QMainWindow>
#include <QProcess> #include <QProcess>
#include <QFile>
namespace Ui { namespace Ui {
class TextureToNSBTX; class TextureToNSBTX;
@ -17,9 +18,11 @@ public:
~TextureToNSBTX(); ~TextureToNSBTX();
private slots: private slots:
void on_searchPath1_pb_clicked(); void on_addTexture_pb_clicked();
void on_seachPath2_pb_clicked(); void on_removeTexture_pb_clicked();
void on_selectNsbtxPath_pb_clicked();
void on_convert_pb_clicked(); void on_convert_pb_clicked();
@ -28,6 +31,9 @@ private:
void printToConsole(const QString &text); void printToConsole(const QString &text);
void printAppOutputToConsole(QProcess* process); void printAppOutputToConsole(QProcess* process);
void WriteOBJFile(QFile* file);
void WriteMTLFile(QFile* file);
}; };
#endif // TEXTURETONSBTX_H #endif // TEXTURETONSBTX_H

View File

@ -21,133 +21,136 @@ background-color: rgb(255, 255, 255);
<widget class="QWidget" name="centralwidget"> <widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QWidget" name="widget" native="true"> <widget class="QSplitter" name="splitter">
<property name="sizePolicy"> <property name="orientation">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <enum>Qt::Vertical</enum>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="minimumSize"> <widget class="QWidget" name="verticalLayoutWidget">
<size> <layout class="QVBoxLayout" name="scrollarea_verticalLayout">
<width>0</width> <item>
<height>63</height> <widget class="QWidget" name="widget" native="true">
</size> <property name="minimumSize">
</property> <size>
<property name="maximumSize"> <width>0</width>
<size> <height>32</height>
<width>16777215</width> </size>
<height>63</height> </property>
</size> <widget class="QPushButton" name="addTexture_pb">
</property> <property name="geometry">
<layout class="QHBoxLayout" name="horizontalLayout"> <rect>
<property name="leftMargin"> <x>0</x>
<number>0</number> <y>0</y>
</property> <width>32</width>
<property name="topMargin"> <height>32</height>
<number>0</number> </rect>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="1">
<widget class="QLineEdit" name="path1_le">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
</widget> <property name="styleSheet">
</item> <string notr="true">padding-top:-4px;
<item row="2" column="0"> color: rgb(0, 192, 0);
<widget class="QLabel" name="text1_label"> font: 16pt &quot;MS Shell Dlg 2&quot;;</string>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Source Texture File:</string> <string>+</string>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property> </property>
</widget> </widget>
</item> <widget class="QPushButton" name="removeTexture_pb">
<item row="3" column="1"> <property name="geometry">
<widget class="QLineEdit" name="path2_le"> <rect>
<property name="sizePolicy"> <x>40</x>
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <y>0</y>
<horstretch>0</horstretch> <width>32</width>
<verstretch>0</verstretch> <height>32</height>
</sizepolicy> </rect>
</property> </property>
</widget> <property name="styleSheet">
</item> <string notr="true">padding-top:-4px;
<item row="3" column="0"> color: rgb(255, 0, 0);
<widget class="QLabel" name="text2_label"> font: 16pt &quot;MS Shell Dlg 2&quot;;</string>
<property name="text">
<string>Destination NSBTX File:</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="seachPath2_pb">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Search</string> <string>-</string>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property> </property>
</widget> </widget>
</item> </widget>
<item row="2" column="2"> </item>
<widget class="QPushButton" name="searchPath1_pb"> <item>
<property name="text"> <widget class="QScrollArea" name="textures_sa">
<string>Search</string> <property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="textures_sa_widget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>579</width>
<height>85</height>
</rect>
</property> </property>
</widget> </widget>
</item> </widget>
</layout> </item>
</item> </layout>
</layout> </widget>
</widget> <widget class="QWidget" name="verticalLayoutWidget_2">
</item> <layout class="QVBoxLayout" name="console_verticalLayout">
<item> <item>
<widget class="QTextEdit" name="console_tb"> <layout class="QGridLayout" name="gridLayout">
<property name="styleSheet"> <item row="0" column="1">
<string notr="true">background-color: rgb(0, 0, 0);</string> <widget class="QLineEdit" name="nsbtxPath_le"/>
</property> </item>
<property name="readOnly"> <item row="0" column="2">
<bool>true</bool> <widget class="QPushButton" name="selectNsbtxPath_pb">
</property> <property name="text">
</widget> <string>Select</string>
</item> </property>
<item> </widget>
<widget class="QPushButton" name="convert_pb"> </item>
<property name="text"> <item row="0" column="0">
<string>Convert And Save</string> <widget class="QLabel" name="label">
</property> <property name="text">
<string>Destination NSBTX File:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QTextEdit" name="console_tb">
<property name="styleSheet">
<string notr="true">background-color: rgb(0, 0, 0);</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="convert_pb">
<property name="text">
<string>Convert And Save</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
<tabstops>
<tabstop>path1_le</tabstop>
<tabstop>searchPath1_pb</tabstop>
<tabstop>path2_le</tabstop>
<tabstop>seachPath2_pb</tabstop>
<tabstop>console_tb</tabstop>
<tabstop>convert_pb</tabstop>
</tabstops>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>