Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Render Button added to Output Settings (#875)

Jeremy Bullock4a76fd864fcb
diff --git a/toonz/sources/toonz/outputsettingspopup.cpp b/toonz/sources/toonz/outputsettingspopup.cpp
index 705cc8729..f664f4c50 100644
--- a/toonz/sources/toonz/outputsettingspopup.cpp
+++ b/toonz/sources/toonz/outputsettingspopup.cpp
@@ -165,7 +165,7 @@ OutputSettingsPopup::OutputSettingsPopup(bool isPreview)
showOtherSettingsButton = new QPushButton("", this);
otherSettingsLabel = new QLabel(tr("Other Settings"), this);
otherSettingsFrame = new QFrame(this);
-
+ m_renderButton = new QPushButton(tr("Render"), this);
// Gamma
m_gammaFld = new DVGui::DoubleLineEdit();
// Dominant Field
@@ -503,7 +503,9 @@ OutputSettingsPopup::OutputSettingsPopup(bool isPreview)
}
fileSettingsBox->setLayout(fileSetBoxLay);
m_topLayout->addWidget(fileSettingsBox, 0);
-
+ if (!isPreview) {
+ m_topLayout->addWidget(m_renderButton);
+ }
m_topLayout->addStretch(1);
}
@@ -520,6 +522,8 @@ OutputSettingsPopup::OutputSettingsPopup(bool isPreview)
SLOT(onFormatChanged(const QString &)));
ret = ret && connect(m_fileFormatButton, SIGNAL(pressed()), this,
SLOT(openSettingsPopup()));
+ ret = ret && connect(m_renderButton, SIGNAL(pressed()), this,
+ SLOT(onRenderClicked()));
}
ret = ret &&
connect(m_outputCameraOm, SIGNAL(currentIndexChanged(const QString &)),
@@ -654,6 +658,12 @@ void OutputSettingsPopup::onSubcameraChecked(int state) {
//-----------------------------------------------------------------------------
+void OutputSettingsPopup::onRenderClicked() {
+ CommandManager::instance()->execute("MI_Render");
+}
+
+//-----------------------------------------------------------------------------
+
/*! Update all field value take care current scene output properties.
*/
void OutputSettingsPopup::updateField() {
diff --git a/toonz/sources/toonz/outputsettingspopup.h b/toonz/sources/toonz/outputsettingspopup.h
index e737da564..21668d338 100644
--- a/toonz/sources/toonz/outputsettingspopup.h
+++ b/toonz/sources/toonz/outputsettingspopup.h
@@ -49,6 +49,7 @@ class OutputSettingsPopup : public DVGui::Dialog {
DVGui::DoubleLineEdit *m_frameRateFld;
QPushButton *m_fileFormatButton;
+ QPushButton *m_renderButton;
CameraSettingsPopup *m_cameraSettings;
QComboBox *m_presetCombo;
@@ -86,6 +87,7 @@ protected slots:
void onRasterGranularityChanged(int type);
void onStereoChecked(int);
void onStereoChanged();
+ void onRenderClicked();
/*-- OutputSettingsのPreset登録/削除/選択 --*/
void onAddPresetButtonPressed();