mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-11 01:01:05 +00:00
readded custom axis mapping button and updated documentation
This commit is contained in:
committed by
Baldur Karlsson
parent
5ed073f395
commit
a2978dc33d
@@ -64,4 +64,7 @@ Mesh View
|
||||
.. autoclass:: CameraType
|
||||
:members:
|
||||
|
||||
.. autoclass:: AxisMapping
|
||||
:members:
|
||||
|
||||
.. autofunction:: renderdoc.InitCamera
|
||||
@@ -4107,28 +4107,47 @@ void BufferViewer::on_axisMappingCombo_currentIndexChanged(int index)
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
ui->axisMappingButton->setEnabled(false);
|
||||
previousAxisMappingIndex = index;
|
||||
on_resetCamera_clicked();
|
||||
INVOKE_MEMFN(RT_UpdateAndDisplay);
|
||||
}
|
||||
else if(previousAxisMappingIndex != 4)
|
||||
else
|
||||
{
|
||||
AxisMappingDialog dialog(m_Ctx, m_Config, this);
|
||||
RDDialog::show(&dialog);
|
||||
ui->axisMappingButton->setEnabled(true);
|
||||
if(previousAxisMappingIndex != 4)
|
||||
{
|
||||
bool validConfig = showAxisMappingDialog();
|
||||
|
||||
if(dialog.result() == QDialog::Accepted)
|
||||
{
|
||||
m_Config.axisMapping = dialog.getAxisMapping();
|
||||
on_resetCamera_clicked();
|
||||
INVOKE_MEMFN(RT_UpdateAndDisplay);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->axisMappingCombo->setCurrentIndex(previousAxisMappingIndex);
|
||||
if(!validConfig)
|
||||
{
|
||||
ui->axisMappingCombo->setCurrentIndex(previousAxisMappingIndex);
|
||||
ui->axisMappingButton->setEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool BufferViewer::showAxisMappingDialog()
|
||||
{
|
||||
AxisMappingDialog dialog(m_Ctx, m_Config, this);
|
||||
RDDialog::show(&dialog);
|
||||
|
||||
if(dialog.result() == QDialog::Accepted)
|
||||
{
|
||||
m_Config.axisMapping = dialog.getAxisMapping();
|
||||
on_resetCamera_clicked();
|
||||
INVOKE_MEMFN(RT_UpdateAndDisplay);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void BufferViewer::on_axisMappingButton_clicked()
|
||||
{
|
||||
showAxisMappingDialog();
|
||||
}
|
||||
|
||||
void BufferViewer::processFormat(const QString &format)
|
||||
{
|
||||
QString errors;
|
||||
@@ -4613,6 +4632,8 @@ void BufferViewer::on_outputTabs_currentChanged(int index)
|
||||
ui->autofitCamera->setEnabled(!isCurrentRasterOut());
|
||||
|
||||
EnableCameraGuessControls();
|
||||
ui->axisMappingCombo->setEnabled(index != 1);
|
||||
ui->axisMappingButton->setEnabled(index != 1 && ui->axisMappingCombo->currentIndex() == 4);
|
||||
|
||||
UpdateCurrentMeshConfig();
|
||||
|
||||
|
||||
@@ -119,6 +119,7 @@ private slots:
|
||||
void on_byteRangeStart_valueChanged(double value);
|
||||
void on_byteRangeLength_valueChanged(double value);
|
||||
void on_axisMappingCombo_currentIndexChanged(int index);
|
||||
void on_axisMappingButton_clicked();
|
||||
|
||||
// manual slots
|
||||
void render_mouseMove(QMouseEvent *e);
|
||||
@@ -264,4 +265,6 @@ private:
|
||||
void UpdateHighlightVerts();
|
||||
void ScrollToRow(RDTableView *view, int row);
|
||||
void ScrollToColumn(RDTableView *view, int column);
|
||||
|
||||
bool showAxisMappingDialog();
|
||||
};
|
||||
|
||||
@@ -495,7 +495,7 @@ Enter 0.0 to use automatic/guessed value derived from data.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="2">
|
||||
<item row="9" column="0" colspan="2">
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@@ -560,7 +560,7 @@ Enter 0.0 to use automatic/guessed value derived from data.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<item row="10" column="1">
|
||||
<widget class="QLabel" name="minBoundsLabel">
|
||||
<property name="text">
|
||||
<string/>
|
||||
@@ -584,7 +584,7 @@ Enter 0.0 to use automatic/guessed value derived from data.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<item row="12" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@@ -597,14 +597,14 @@ Enter 0.0 to use automatic/guessed value derived from data.</string>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<item row="11" column="1">
|
||||
<widget class="QLabel" name="maxBoundsLabel">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Bounding Box:</string>
|
||||
@@ -618,6 +618,16 @@ Enter 0.0 to use automatic/guessed value derived from data.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QPushButton" name="axisMappingButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Edit Custom Mapping</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QComboBox" name="axisMappingCombo"/>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user