multimaterial support, "preset"

each preset contains visibility, flags and material
This commit is contained in:
2023-05-16 18:18:26 +03:00
parent c275d006d5
commit 484a7f972f
11 changed files with 523 additions and 259 deletions

View File

@@ -46,6 +46,8 @@ void ViewEditor::assignQGLView(QGLView * v) {
view = v;
if (!view) return;
active = false;
connect(view->scene(), &Scene::presetChanged, this, [this](int p) { ui->labelPreset->setNum(p); });
ui->labelPreset->setNum(view->scene()->preset());
ui->spinFOV->setValue(view->FOV());
ui->spinDepthStart->setValue(view->depthStart());
ui->checkHoverHalo->setChecked(view->isHoverHaloEnabled());
@@ -213,6 +215,11 @@ void ViewEditor::on_buttonHDRSelect_clicked() {
}
void ViewEditor::on_buttonPresetSet_clicked() {
view->scene()->setPreset(ui->spinPreset->value());
}
void ViewEditor::on_colorFogBack_colorChanged(const QColor & color) {
if (!view || !active) return;
view->setFogColor(color);

View File

@@ -63,6 +63,7 @@ private slots:
void on_checkVSync_clicked(bool val);
void on_buttonHDRClear_clicked();
void on_buttonHDRSelect_clicked();
void on_buttonPresetSet_clicked();
void on_colorFogBack_colorChanged(const QColor & color);
void on_spinFogDensity_valueChanged(double arg1);
void on_spinFogDecay_valueChanged(double arg1);

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>479</width>
<height>737</height>
<height>897</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
@@ -36,8 +36,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>453</width>
<height>885</height>
<width>479</width>
<height>897</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@@ -205,6 +205,54 @@
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QWidget" name="widget_2" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<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="QLabel" name="label_11">
<property name="text">
<string>Preset:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinPreset"/>
</item>
<item>
<widget class="QPushButton" name="buttonPresetSet">
<property name="minimumSize">
<size>
<width>1</width>
<height>1</height>
</size>
</property>
<property name="text">
<string>Set</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelPreset">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>