From ccddcbf7c70354792ebe5fcd7a37ce5cbec58a63 Mon Sep 17 00:00:00 2001 From: Trevor SANDY Date: Sun, 21 May 2023 15:53:59 +0200 Subject: [PATCH] Blender addon - settings preferences --- qt/lc_qpreferencesdialog.cpp | 18 +++++ qt/lc_qpreferencesdialog.h | 1 + qt/lc_qpreferencesdialog.ui | 141 +++++++++++++++++++---------------- 3 files changed, 97 insertions(+), 63 deletions(-) diff --git a/qt/lc_qpreferencesdialog.cpp b/qt/lc_qpreferencesdialog.cpp index 78220a26..be33cac2 100644 --- a/qt/lc_qpreferencesdialog.cpp +++ b/qt/lc_qpreferencesdialog.cpp @@ -9,6 +9,7 @@ #include "lc_glextensions.h" #include "pieceinf.h" #include "lc_edgecolordialog.h" +#include "lc_blenderpreferences.h" static const char* gLanguageLocales[] = { @@ -365,6 +366,23 @@ void lcQPreferencesDialog::on_partsArchiveBrowse_clicked() ui->partsLibrary->setText(QDir::toNativeSeparators(result)); } +void lcQPreferencesDialog::on_BlenderAddonSettingsButton_clicked() +{ + int Width = 1280; + int Height = 720; + double Scale = 1.0f; + + lcBlenderPreferencesDialog::GetBlenderPreferences( + Width, + Height, + Scale, + this); + + Q_UNUSED(Width) + Q_UNUSED(Height) + Q_UNUSED(Scale) +} + void lcQPreferencesDialog::on_ColorConfigBrowseButton_clicked() { QString Result = QFileDialog::getOpenFileName(this, tr("Select Color Configuration File"), ui->ColorConfigEdit->text(), tr("Settings Files (*.ldr);;All Files (*.*)")); diff --git a/qt/lc_qpreferencesdialog.h b/qt/lc_qpreferencesdialog.h index c0cf6dfd..c7f23ce2 100644 --- a/qt/lc_qpreferencesdialog.h +++ b/qt/lc_qpreferencesdialog.h @@ -67,6 +67,7 @@ public slots: void ColorButtonClicked(); void AutomateEdgeColor(); void on_AutomateEdgeColor_toggled(); + void on_BlenderAddonSettingsButton_clicked(); void on_studStyleCombo_currentIndexChanged(int index); void on_antiAliasing_toggled(); void on_edgeLines_toggled(); diff --git a/qt/lc_qpreferencesdialog.ui b/qt/lc_qpreferencesdialog.ui index 2c53c1ff..99e2e13e 100644 --- a/qt/lc_qpreferencesdialog.ui +++ b/qt/lc_qpreferencesdialog.ui @@ -333,10 +333,17 @@ - - + + - Contrast Settings... + Mesh LOD + + + + + + + @@ -359,6 +366,64 @@ + + + + Fade Previous Steps + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + QSlider::NoTicks + + + + + + + + + + + + + + Anti-aliasing + + + + + + + Stud Style + + + + + + + Highlight New Parts + + + + + + + Shading Mode: + + + @@ -403,10 +468,10 @@ - - + + - Shading Mode: + Contrast Settings... @@ -423,20 +488,6 @@ - - - - Stud Style - - - - - - - Anti-aliasing - - - @@ -463,54 +514,17 @@ - - + + - Highlight New Parts + Blender LDraw Render: - - + + - Mesh LOD - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::NoTicks - - - - - - - - - - - - - - Fade Previous Steps - - - - - - - + Addon Settings... @@ -2007,6 +2021,7 @@ studStyleCombo HighContrastButton ShadingMode + BlenderAddonSettingsButton edgeLines ConditionalLinesCheckBox AutomateEdgeColor