OpenToonz - An open-source full-featured 2D animation creation software
C
Stop motion play sound on capture and deciseconds resolution
justburnerd63640c33b0c
diff --git a/toonz/sources/stopmotion/stopmotion.cpp b/toonz/sources/stopmotion/stopmotion.cppindex ed204f036..5aa1cc5f5 100644--- a/toonz/sources/stopmotion/stopmotion.cpp+++ b/toonz/sources/stopmotion/stopmotion.cpp@@ -44,9 +44,11 @@TEnv::IntVar StopMotionOpacity("StopMotionOpacity", 100);TEnv::IntVar StopMotionAlwaysLiveView("StopMotionAlwaysLiveView", 0);TEnv::IntVar StopMotionPlaceOnXSheet("StopMotionPlaceOnXSheet", 1);-TEnv::IntVar StopMotionReviewTime("StopMotionReviewTime", 1);+TEnv::IntVar StopMotionReviewDSec("StopMotionReviewDSec", 10);+TEnv::IntVar StopMotionIntervalDSec("StopMotionIntervalDSec", 100);TEnv::IntVar StopMotionUseNumpad("StopMotionUseNumpad", 0);TEnv::IntVar StopMotionDrawBeneathLevels("StopMotionDrawBeneathLevels", 1);+TEnv::IntVar StopMotionPlayCaptureSound("StopMotionPlayCaptureSound", 0);// Connected cameraTEnv::StringVar StopMotionCameraName("CamCapCameraName", "");@@ -213,9 +215,11 @@ StopMotion::StopMotion() {m_alwaysLiveView = StopMotionAlwaysLiveView;m_placeOnXSheet = StopMotionPlaceOnXSheet;- m_reviewTime = StopMotionReviewTime;+ m_reviewTimeDSec = StopMotionReviewDSec;+ m_intervalDSec = StopMotionIntervalDSec;m_useNumpadShortcuts = StopMotionUseNumpad;m_drawBeneathLevels = StopMotionDrawBeneathLevels;+ m_playCaptureSound = StopMotionPlayCaptureSound;m_numpadForStyleSwitching =Preferences::instance()->isUseNumpadForSwitchingStylesEnabled();setUseNumpadShortcuts(m_useNumpadShortcuts);@@ -226,6 +230,7 @@ StopMotion::StopMotion() {m_intervalTimer = new QTimer(this);m_countdownTimer = new QTimer(this);m_webcamOverlayTimer = new QTimer(this);+ m_camSnapSound = new QSound(":Resources/camera_snap.wav");// Make the interval timer single-shot. When the capture finished, restart// timer for next frame.@@ -473,10 +478,10 @@ void StopMotion::setPlaceOnXSheet(bool on) {//------------------------------------------------------------------void StopMotion::setReviewTime(int time) {- m_reviewTime = time;- StopMotionReviewTime = time;- emit(reviewTimeChangedSignal(time));+void StopMotion::setReviewTimeDSec(int timeDSec) {+ m_reviewTimeDSec = timeDSec;+ StopMotionReviewDSec = timeDSec;+ emit(reviewTimeChangedSignal(timeDSec));}//-----------------------------------------------------------------@@ -575,8 +580,8 @@ void StopMotion::toggleInterval(bool on) {void StopMotion::startInterval() {if (m_liveViewStatus > 1) {- m_intervalTimer->start(m_intervalTime * 1000);- if (m_intervalTime != 0) m_countdownTimer->start(100);+ m_intervalTimer->start(m_intervalDSec * 100);+ if (m_intervalDSec != 0) m_countdownTimer->start(100);m_intervalStarted = true;emit(intervalStarted());} else {@@ -597,8 +602,9 @@ void StopMotion::stopInterval() {//------------------------------------------------------------------void StopMotion::setIntervalAmount(int value) {- m_intervalTime = value;+void StopMotion::setIntervalDSec(int value) {+ m_intervalDSec = value;+ StopMotionIntervalDSec = value;emit(intervalAmountChanged(value));}@@ -619,10 +625,10 @@ void StopMotion::onIntervalCaptureTimerTimeout() {void StopMotion::restartInterval() {// restart interval timer for capturing next frame (it is single shot)if (m_isTimeLapse && m_intervalStarted) {- m_intervalTimer->start(m_intervalTime * 1000);+ m_intervalTimer->start(m_intervalDSec * 100);// restart the count down as well (for aligning the timing. It is not// single shot)- if (m_intervalTime != 0) m_countdownTimer->start(100);+ if (m_intervalDSec != 0) m_countdownTimer->start(100);}}@@ -1263,6 +1269,14 @@ void StopMotion::getSubsampling() {//-----------------------------------------------------------------------------+void StopMotion::setPlayCaptureSound(bool on) {+ m_playCaptureSound = on;+ StopMotionPlayCaptureSound = on;+ emit(playCaptureSignal(on));+}++//-----------------------------------------------------------------------------+void StopMotion::update() { getSubsampling(); }//-----------------------------------------------------------------------------@@ -1661,9 +1675,9 @@ bool StopMotion::importImage() {// for now always save. This can be tweaked latersl->save();m_sl = sl;- if (getReviewTime() > 0 && !m_isTimeLapse) {+ if (getReviewTimeDSec() > 0 && !m_isTimeLapse) {m_liveViewStatus = LiveViewPaused;- m_reviewTimer->start(getReviewTime() * 1000);+ m_reviewTimer->start(getReviewTimeDSec() * 100);}/* placement in xsheet */@@ -1683,7 +1697,7 @@ bool StopMotion::importImage() {xsh->insertCells(row, col);xsh->setCell(row, col, TXshCell(sl, fid));app->getCurrentColumn()->setColumnIndex(col);- if (getReviewTime() == 0 || m_isTimeLapse)+ if (getReviewTimeDSec() == 0 || m_isTimeLapse)app->getCurrentFrame()->setFrame(row + 1);m_xSheetFrameNumber = row + 2;emit(xSheetFrameNumberChanged(m_xSheetFrameNumber));@@ -1732,7 +1746,7 @@ bool StopMotion::importImage() {xsh->insertCells(row, foundCol);xsh->setCell(row, foundCol, TXshCell(sl, fid));app->getCurrentColumn()->setColumnIndex(foundCol);- if (getReviewTime() == 0 || m_isTimeLapse)+ if (getReviewTimeDSec() == 0 || m_isTimeLapse)app->getCurrentFrame()->setFrame(row + 1);m_xSheetFrameNumber = row + 2;emit(xSheetFrameNumberChanged(m_xSheetFrameNumber));@@ -1746,7 +1760,7 @@ bool StopMotion::importImage() {}xsh->setCell(row, col, TXshCell(sl, fid));app->getCurrentColumn()->setColumnIndex(col);- if (getReviewTime() == 0 || m_isTimeLapse)+ if (getReviewTimeDSec() == 0 || m_isTimeLapse)app->getCurrentFrame()->setFrame(row + 1);m_xSheetFrameNumber = row + 2;emit(xSheetFrameNumberChanged(m_xSheetFrameNumber));@@ -1758,6 +1772,9 @@ bool StopMotion::importImage() {//-----------------------------------------------------------------void StopMotion::captureImage() {+ if (m_playCaptureSound) {+ m_camSnapSound->play();+ }if (m_isTimeLapse && !m_intervalStarted) {startInterval();return;@@ -1794,7 +1811,7 @@ void StopMotion::captureWebcamImage() {m_light->showOverlays();m_webcamOverlayTimer->start(500);} else {- if (getReviewTime() > 0 && !m_isTimeLapse) {+ if (getReviewTimeDSec() > 0 && !m_isTimeLapse) {m_timer->stop();if (m_liveViewStatus > LiveViewClosed) {// m_liveViewStatus = LiveViewPaused;@@ -1810,7 +1827,7 @@ void StopMotion::captureWebcamImage() {//-----------------------------------------------------------------------------void StopMotion::captureWebcamOnTimeout() {- if (getReviewTime() > 0 && !m_isTimeLapse) {+ if (getReviewTimeDSec() > 0 && !m_isTimeLapse) {m_timer->stop();if (m_liveViewStatus > LiveViewClosed) {// m_liveViewStatus = LiveViewPaused;@@ -1828,7 +1845,7 @@ void StopMotion::captureWebcamOnTimeout() {void StopMotion::captureDslrImage() {m_light->showOverlays();- if (getReviewTime() > 0 && !m_isTimeLapse) {+ if (getReviewTimeDSec() > 0 && !m_isTimeLapse) {m_timer->stop();}diff --git a/toonz/sources/stopmotion/stopmotion.h b/toonz/sources/stopmotion/stopmotion.hindex 3a5bd6716..6c137853c 100644--- a/toonz/sources/stopmotion/stopmotion.h+++ b/toonz/sources/stopmotion/stopmotion.h@@ -29,6 +29,7 @@#include <QObject>#include <QThread>+#include <QSound>class QCamera;class QCameraInfo;@@ -70,6 +71,9 @@ private:std::map<std::string, QAction*> m_oldActionMap;std::map<int, TRaster32P> m_liveViewImageMap;+ bool m_playCaptureSound = false;+ QSound* m_camSnapSound = 0;+public:enum LiveViewStatus {LiveViewClosed = 0,@@ -89,13 +93,13 @@ public:bool m_userCalledPause = false;bool m_drawBeneathLevels = true;bool m_isTimeLapse = false;- int m_reviewTime = 2;+ int m_reviewTimeDSec = 20;QString m_tempFile;TXshSimpleLevel* m_sl;// timersQTimer* m_timer;- int m_intervalTime = 10;+ int m_intervalDSec = 100;bool m_intervalStarted = false;QTimer* m_reviewTimer;QTimer *m_intervalTimer, *m_countdownTimer, *m_webcamOverlayTimer;@@ -164,7 +168,8 @@ public:void toggleInterval(bool on);void startInterval();void stopInterval();- void setIntervalAmount(int value);+ void setIntervalDSec(int value);+ int getIntervalDSec() { return m_intervalDSec; };void restartInterval();// options@@ -181,12 +186,14 @@ public:void toggleNumpadShortcuts(bool on);void toggleNumpadForFocusCheck(bool on);void setDrawBeneathLevels(bool on);- void setReviewTime(int time);- int getReviewTime() { return m_reviewTime; }+ void setReviewTimeDSec(int timeDSec);+ int getReviewTimeDSec() { return m_reviewTimeDSec; }void getSubsampling();void setSubsampling();int getSubsamplingValue() { return m_subsampling; }void setSubsamplingValue(int subsampling);+ void setPlayCaptureSound(bool on);+ bool getPlayCaptureSound() { return m_playCaptureSound; }// saving and loadingvoid saveXmlFile();@@ -238,6 +245,7 @@ signals:void useNumpadSignal(bool);void drawBeneathLevelsSignal(bool);void reviewTimeChangedSignal(int);+ void playCaptureSignal(bool);// time lapsevoid intervalToggled(bool);diff --git a/toonz/sources/stopmotion/stopmotioncontroller.cpp b/toonz/sources/stopmotion/stopmotioncontroller.cppindex 4befa72bf..f8a0f972e 100644--- a/toonz/sources/stopmotion/stopmotioncontroller.cpp+++ b/toonz/sources/stopmotion/stopmotioncontroller.cpp@@ -28,6 +28,7 @@// TnzQt includes#include "toonzqt/filefield.h"#include "toonzqt/intfield.h"+#include "toonzqt/doublefield.h"#include "toonzqt/menubarcommand.h"// Qt includes@@ -682,33 +683,52 @@ StopMotionController::StopMotionController(QWidget *parent) : QWidget(parent) {// Make Options PageQGroupBox *webcamBox = new QGroupBox(tr("Webcam Options"), this);QGroupBox *dslrBox = new QGroupBox(tr("DSLR Options"), this);- QGroupBox *timerFrame = new QGroupBox(tr("Time Lapse"), this);- m_timerCB = new QCheckBox(tr("Use time lapse"), this);- m_timerIntervalFld = new DVGui::IntField(this);- timerFrame->setObjectName("CleanupSettingsFrame");+ m_timerCB = new QGroupBox(tr("Use Time Lapse"), this);+ m_timerIntervalFld = new DVGui::DoubleField(this, true, 1);+ m_timerCB->setCheckable(true);+ m_timerCB->setObjectName("CleanupSettingsFrame");m_timerCB->setChecked(false);- m_timerIntervalFld->setRange(0, 60);- m_timerIntervalFld->setValue(10);- m_timerIntervalFld->setDisabled(true);+ m_timerIntervalFld->setRange(0.0, 60.0);+ m_timerIntervalFld->setValue(0.0);- m_postCaptureReviewFld = new DVGui::IntField(this);- m_postCaptureReviewFld->setRange(0, 10);+ m_postCaptureReviewFld = new DVGui::DoubleField(this, true, 1);+ m_postCaptureReviewFld->setRange(0.0, 10.0);+ m_postCaptureReviewFld->setValue(0.0);m_subsamplingFld = new DVGui::IntField(this);m_subsamplingFld->setRange(1, 30);m_subsamplingFld->setDisabled(true);- m_placeOnXSheetCB = new QCheckBox(this);+ m_placeOnXSheetCB = new QCheckBox(tr("Place on XSheet"), this);m_placeOnXSheetCB->setToolTip(tr("Place the frame in the XSheet"));- m_useScaledFullSizeImages = new QCheckBox(this);- m_directShowLabel = new QLabel(tr("Use Direct Show Webcam Drivers"), this);- m_directShowCB = new QCheckBox(this);- m_useMjpgCB = new QCheckBox(this);- m_useNumpadCB = new QCheckBox(this);- m_drawBeneathCB = new QCheckBox(this);+ m_useScaledFullSizeImages =+ new QCheckBox(tr("Use Reduced Resolution Images"), this);+ m_directShowCB = new QCheckBox(tr("Use Direct Show Webcam Drivers"), this);+ m_useMjpgCB = new QCheckBox(tr("Use MJPG with Webcam"), this);+ m_useNumpadCB = new QCheckBox(tr("Use Numpad Shortcuts When Active"), this);+ m_useNumpadCB->setToolTip(+ tr("Requires restarting camera when toggled\n"+ "NP 1 = Previous Frame\n"+ "NP 2 = Next Frame\n"+ "NP 3 = Jump To Camera\n"+ "NP 5 = Toggle Live View\n"+ "NP 6 = Short Play\n"+ "NP 8 = Loop\n"+ "NP 0 = Play\n"+ "Period = Use Live View Images\n"+ "Plus = Raise Opacity\n"+ "Minus = Lower Opacity\n"+ "Enter = Capture\n"+ "BackSpace = Remove Frame\n"+ "Multiply = Toggle Zoom\n"+ "Divide = Focus Check"));+ m_drawBeneathCB = new QCheckBox(tr("Show Camera Below Other Levels"), this);+ m_liveViewOnAllFramesCB =+ new QCheckBox(tr("Show Live View on All Frames"), this);+ m_playSound = new QCheckBox(tr("Play Sound on Capture"), this);+ m_playSound->setToolTip(tr("Make a click sound on each capture"));- m_liveViewOnAllFramesCB = new QCheckBox(this);QVBoxLayout *optionsOutsideLayout = new QVBoxLayout;QGridLayout *optionsLayout = new QGridLayout;optionsLayout->setSpacing(3);@@ -717,20 +737,15 @@ StopMotionController::StopMotionController(QWidget *parent) : QWidget(parent) {QGridLayout *dslrLayout = new QGridLayout;QGridLayout *checkboxLayout = new QGridLayout;- dslrLayout->addWidget(m_useScaledFullSizeImages, 1, 0, Qt::AlignRight);- dslrLayout->addWidget(new QLabel(tr("Use Reduced Resolution Images")), 1, 1,- Qt::AlignLeft);+ dslrLayout->addWidget(m_useScaledFullSizeImages, 1, 0, 1, 2);dslrLayout->setColumnStretch(1, 30);dslrBox->setLayout(dslrLayout);dslrBox->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Maximum);optionsOutsideLayout->addWidget(dslrBox, Qt::AlignCenter);dslrBox->hide();- webcamLayout->addWidget(m_directShowCB, 0, 0, Qt::AlignRight);- webcamLayout->addWidget(m_directShowLabel, 0, 1, Qt::AlignLeft);- webcamLayout->addWidget(m_useMjpgCB, 1, 0, Qt::AlignRight);- webcamLayout->addWidget(new QLabel(tr("Use MJPG with Webcam")), 1, 1,- Qt::AlignLeft);+ webcamLayout->addWidget(m_directShowCB, 0, 0, 1, 2);+ webcamLayout->addWidget(m_useMjpgCB, 1, 0, 1, 2);webcamLayout->setColumnStretch(1, 30);webcamBox->setLayout(webcamLayout);webcamBox->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Maximum);@@ -742,36 +757,24 @@ StopMotionController::StopMotionController(QWidget *parent) : QWidget(parent) {timerLay->setHorizontalSpacing(3);timerLay->setVerticalSpacing(5);{- timerLay->addWidget(m_timerCB, 0, 0, 1, 2);-timerLay->addWidget(new QLabel(tr("Interval(sec):"), this), 1, 0,Qt::AlignRight);timerLay->addWidget(m_timerIntervalFld, 1, 1);}timerLay->setColumnStretch(0, 0);timerLay->setColumnStretch(1, 1);- timerFrame->setLayout(timerLay);- optionsOutsideLayout->addWidget(timerFrame);+ m_timerCB->setLayout(timerLay);+ optionsOutsideLayout->addWidget(m_timerCB);- checkboxLayout->addWidget(m_placeOnXSheetCB, 0, 0, 1, 1, Qt::AlignRight);- // checkboxLayout->addWidget(new QLabel(tr("Place on XSheet")), 0, 1,- // Qt::AlignLeft);+ checkboxLayout->addWidget(m_placeOnXSheetCB, 0, 0, 1, 2);m_placeOnXSheetCB->hide();- checkboxLayout->addWidget(m_drawBeneathCB, 1, 0, Qt::AlignRight);- // checkboxLayout->addWidget(new QLabel(tr("Show Camera Below Other- // Levels")),- // 1, 1, Qt::AlignLeft);+ checkboxLayout->addWidget(m_drawBeneathCB, 1, 0, 1, 2);m_drawBeneathCB->hide();- checkboxLayout->addWidget(m_useNumpadCB, 2, 0, Qt::AlignRight);- checkboxLayout->addWidget(- new QLabel(tr("Use Numpad Shortcuts When Active")), 2, 1,- Qt::AlignLeft);- checkboxLayout->addWidget(m_liveViewOnAllFramesCB, 3, 0, Qt::AlignRight);+ checkboxLayout->addWidget(m_useNumpadCB, 2, 0, 1, 2);+ checkboxLayout->addWidget(m_liveViewOnAllFramesCB, 3, 0, 1, 2);m_liveViewOnAllFramesCB->hide();- // checkboxLayout->addWidget(new QLabel(tr("Show Live View on All Frames")),- // 3,- // 1, Qt::AlignLeft);+ checkboxLayout->addWidget(m_playSound, 4, 0, 1, 2);checkboxLayout->setColumnStretch(1, 30);optionsOutsideLayout->addLayout(checkboxLayout, Qt::AlignLeft);@@ -1019,7 +1022,8 @@ StopMotionController::StopMotionController(QWidget *parent) : QWidget(parent) {this, SLOT(onScaleFullSizeImagesChanged(int)));ret = ret && connect(m_liveViewOnAllFramesCB, SIGNAL(stateChanged(int)), this,SLOT(onLiveViewOnAllFramesChanged(int)));-+ ret = ret && connect(m_playSound, SIGNAL(toggled(bool)), this,+ SLOT(onPlaySoundToggled(bool)));ret = ret && connect(m_placeOnXSheetCB, SIGNAL(stateChanged(int)), this,SLOT(onPlaceOnXSheetChanged(int)));ret = ret && connect(m_directShowCB, SIGNAL(stateChanged(int)), this,@@ -1058,6 +1062,8 @@ StopMotionController::StopMotionController(QWidget *parent) : QWidget(parent) {this, SLOT(onDrawBeneathSignal(bool)));ret = ret && connect(m_stopMotion, SIGNAL(reviewTimeChangedSignal(int)), this,SLOT(onReviewTimeChangedSignal(int)));+ ret = ret && connect(m_stopMotion, SIGNAL(playCaptureSignal(bool)), this,+ SLOT(onPlayCaptureSignal(bool)));// From Stop Motion Mainret = ret && connect(m_stopMotion, SIGNAL(newDimensions()), this,@@ -1252,6 +1258,7 @@ StopMotionController::StopMotionController(QWidget *parent) : QWidget(parent) {m_useNumpadCB->setChecked(m_stopMotion->getUseNumpadShortcuts());m_drawBeneathCB->setChecked(m_stopMotion->m_drawBeneathLevels);m_liveViewOnAllFramesCB->setChecked(m_stopMotion->getAlwaysLiveView());+ m_playSound->setChecked(m_stopMotion->getPlayCaptureSound());m_blackScreenForCapture->setChecked(m_stopMotion->m_light->getBlackCapture() == true ? true : false);if (m_stopMotion->m_light->getBlackCapture()) {@@ -1259,7 +1266,8 @@ StopMotionController::StopMotionController(QWidget *parent) : QWidget(parent) {m_screen2Box->setDisabled(true);m_screen3Box->setDisabled(true);}- m_postCaptureReviewFld->setValue(m_stopMotion->getReviewTime());+ m_postCaptureReviewFld->setValue(m_stopMotion->getReviewTimeDSec() / 10.0);+ m_timerIntervalFld->setValue(m_stopMotion->getIntervalDSec() / 10.0);refreshCameraList(QString(""));onSceneSwitched();@@ -1491,19 +1499,25 @@ void StopMotionController::onDrawBeneathSignal(bool on) {//-----------------------------------------------------------------------------void StopMotionController::onCaptureReviewFldEdited() {- m_stopMotion->setReviewTime(m_postCaptureReviewFld->getValue());+ m_stopMotion->setReviewTimeDSec(m_postCaptureReviewFld->getValue() * 10.0);}//-----------------------------------------------------------------------------void StopMotionController::onCaptureReviewSliderChanged(bool ignore) {- m_stopMotion->setReviewTime(m_postCaptureReviewFld->getValue());+ m_stopMotion->setReviewTimeDSec(m_postCaptureReviewFld->getValue() * 10.0);}//-----------------------------------------------------------------------------void StopMotionController::onReviewTimeChangedSignal(int time) {- m_postCaptureReviewFld->setValue(time);+ m_postCaptureReviewFld->setValue(time / 10.0);+}++//-----------------------------------------------------------------------------++void StopMotionController::onPlayCaptureSignal(bool on) {+ m_playSound->setChecked(on);}//-----------------------------------------------------------------------------@@ -2657,7 +2671,7 @@ void StopMotionController::onIntervalTimerCBToggled(bool on) {//-----------------------------------------------------------------------------void StopMotionController::onIntervalSliderValueChanged(bool on) {- m_stopMotion->setIntervalAmount(m_timerIntervalFld->getValue());+ m_stopMotion->setIntervalDSec(m_timerIntervalFld->getValue() * 10.0);}//-----------------------------------------------------------------------------@@ -2680,14 +2694,13 @@ void StopMotionController::onIntervalCountDownTimeout() {//-----------------------------------------------------------------------------void StopMotionController::onIntervalAmountChanged(int value) {m_timerIntervalFld->blockSignals(true);- m_timerIntervalFld->setValue(value);+ m_timerIntervalFld->setValue(value / 10.0);m_timerIntervalFld->blockSignals(false);}//-----------------------------------------------------------------------------void StopMotionController::onIntervalToggled(bool on) {m_timerCB->blockSignals(true);- m_timerIntervalFld->setEnabled(on);m_captureButton->setCheckable(on);if (on)m_captureButton->setText(tr("Start Capturing"));@@ -2718,6 +2731,12 @@ void StopMotionController::onIntervalStopped() {//-----------------------------------------------------------------------------+void StopMotionController::onPlaySoundToggled(bool on) {+ m_stopMotion->setPlayCaptureSound(on);+}++//-----------------------------------------------------------------------------+void StopMotionController::openSaveInFolderPopup() {if (m_saveInFolderPopup->exec()) {QString oldPath = m_saveInFileFld->getPath();diff --git a/toonz/sources/stopmotion/stopmotioncontroller.h b/toonz/sources/stopmotion/stopmotioncontroller.hindex dda7ceaca..394ca9893 100644--- a/toonz/sources/stopmotion/stopmotioncontroller.h+++ b/toonz/sources/stopmotion/stopmotioncontroller.h@@ -11,6 +11,7 @@#include "toonzqt/tabbar.h"#include "toonzqt/gutil.h"#include "toonzqt/colorfield.h"+#include "toonzqt/doublefield.h"// Qt includes#include <QWidget>@@ -97,19 +98,20 @@ class StopMotionController final : public QWidget {LevelNameLineEdit *m_levelNameEdit;QCheckBox *m_blackScreenForCapture, *m_useScaledFullSizeImages,*m_placeOnXSheetCB, *m_directShowCB, *m_liveViewOnAllFramesCB,- *m_useMjpgCB, *m_useNumpadCB, *m_drawBeneathCB, *m_timerCB;+ *m_useMjpgCB, *m_useNumpadCB, *m_drawBeneathCB, *m_playSound;DVGui::FileField *m_saveInFileFld;DVGui::IntLineEdit *m_xSheetFrameNumberEdit;FrameNumberLineEdit *m_frameNumberEdit;- DVGui::IntField *m_onionOpacityFld, *m_postCaptureReviewFld,- *m_subsamplingFld;+ DVGui::IntField *m_onionOpacityFld, *m_subsamplingFld;+ DVGui::DoubleField *m_postCaptureReviewFld;PencilTestSaveInFolderPopup *m_saveInFolderPopup;- DVGui::IntField *m_timerIntervalFld;+ DVGui::DoubleField *m_timerIntervalFld;DVGui::ColorField *m_screen1ColorFld, *m_screen2ColorFld, *m_screen3ColorFld;QGroupBox *m_screen1Box;QGroupBox *m_screen2Box;QGroupBox *m_screen3Box;QGroupBox *m_webcamAutoFocusGB;+ QGroupBox *m_timerCB;QTimer *m_lightTestTimer;public:@@ -177,6 +179,9 @@ protected slots:void onIntervalStarted();void onIntervalStopped();+ // sound+ void onPlaySoundToggled(bool);+// lights and screensvoid setScreen1Color(const TPixel32 &value, bool isDragging);void setScreen2Color(const TPixel32 &value, bool isDragging);@@ -251,6 +256,7 @@ protected slots:void onUseMjpgSignal(bool);void onUseDirectShowSignal(bool);void onReviewTimeChangedSignal(int);+ void onPlayCaptureSignal(bool);void onUseNumpadSignal(bool);void onDrawBeneathSignal(bool);void onLiveViewChanged(bool);diff --git a/toonz/sources/toonz/Resources/camera_snap.wav b/toonz/sources/toonz/Resources/camera_snap.wavnew file mode 100644index 000000000..1e7a1acecBinary files /dev/null and b/toonz/sources/toonz/Resources/camera_snap.wav differdiff --git a/toonz/sources/toonz/toonz.qrc b/toonz/sources/toonz/toonz.qrcindex 69514d372..9832d7cb8 100644--- a/toonz/sources/toonz/toonz.qrc+++ b/toonz/sources/toonz/toonz.qrc@@ -563,6 +563,7 @@<file>Resources/brush.png</file><file>Resources/camera.svg</file><file>Resources/camera_small.svg</file>+ <file>Resources/camera_snap.wav</file><file>Resources/center.png</file><file>Resources/clapboard.png</file><file>Resources/curve.svg</file>