Blender addon - settings preferences

This commit is contained in:
Trevor SANDY 2023-05-21 15:53:59 +02:00
parent 6e721d76c4
commit ccddcbf7c7
3 changed files with 97 additions and 63 deletions

View file

@ -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 (*.*)"));

View file

@ -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();

View file

@ -333,10 +333,17 @@
<item>
<widget class="QWidget" name="widget" native="true">
<layout class="QGridLayout" name="gridLayout">
<item row="13" column="2">
<widget class="QToolButton" name="HighContrastButton">
<item row="12" column="0">
<widget class="QCheckBox" name="MeshLOD">
<property name="text">
<string>Contrast Settings...</string>
<string>Mesh LOD</string>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QToolButton" name="FadeStepsColor">
<property name="text">
<string/>
</property>
</widget>
</item>
@ -359,6 +366,64 @@
</item>
</widget>
</item>
<item row="10" column="0">
<widget class="QCheckBox" name="FadeSteps">
<property name="text">
<string>Fade Previous Steps</string>
</property>
</widget>
</item>
<item row="12" column="1">
<widget class="QSlider" name="MeshLODSlider">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::NoTicks</enum>
</property>
</widget>
</item>
<item row="12" column="2">
<widget class="QLabel" name="MeshLODLabel">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="antiAliasing">
<property name="text">
<string>Anti-aliasing</string>
</property>
</widget>
</item>
<item row="13" column="0">
<widget class="QLabel" name="label_24">
<property name="text">
<string>Stud Style</string>
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QCheckBox" name="HighlightNewParts">
<property name="text">
<string>Highlight New Parts</string>
</property>
</widget>
</item>
<item row="14" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Shading Mode:</string>
</property>
</widget>
</item>
<item row="13" column="1">
<widget class="QComboBox" name="studStyleCombo">
<item>
@ -403,10 +468,10 @@
</item>
</widget>
</item>
<item row="14" column="0">
<widget class="QLabel" name="label_3">
<item row="13" column="2">
<widget class="QToolButton" name="HighContrastButton">
<property name="text">
<string>Shading Mode:</string>
<string>Contrast Settings...</string>
</property>
</widget>
</item>
@ -423,20 +488,6 @@
</property>
</spacer>
</item>
<item row="13" column="0">
<widget class="QLabel" name="label_24">
<property name="text">
<string>Stud Style</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="antiAliasing">
<property name="text">
<string>Anti-aliasing</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="antiAliasingSamples">
<item>
@ -463,54 +514,17 @@
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QCheckBox" name="HighlightNewParts">
<item row="15" column="0">
<widget class="QLabel" name="label_39">
<property name="text">
<string>Highlight New Parts</string>
<string>Blender LDraw Render:</string>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QCheckBox" name="MeshLOD">
<item row="15" column="1">
<widget class="QToolButton" name="BlenderAddonSettingsButton">
<property name="text">
<string>Mesh LOD</string>
</property>
</widget>
</item>
<item row="12" column="1">
<widget class="QSlider" name="MeshLODSlider">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::NoTicks</enum>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QToolButton" name="FadeStepsColor">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QCheckBox" name="FadeSteps">
<property name="text">
<string>Fade Previous Steps</string>
</property>
</widget>
</item>
<item row="12" column="2">
<widget class="QLabel" name="MeshLODLabel">
<property name="text">
<string/>
<string>Addon Settings...</string>
</property>
</widget>
</item>
@ -2007,6 +2021,7 @@
<tabstop>studStyleCombo</tabstop>
<tabstop>HighContrastButton</tabstop>
<tabstop>ShadingMode</tabstop>
<tabstop>BlenderAddonSettingsButton</tabstop>
<tabstop>edgeLines</tabstop>
<tabstop>ConditionalLinesCheckBox</tabstop>
<tabstop>AutomateEdgeColor</tabstop>