diff --git a/ci-scripts/osx/travis-build.sh b/ci-scripts/osx/travis-build.sh index 2180945..f8bab6b 100644 --- a/ci-scripts/osx/travis-build.sh +++ b/ci-scripts/osx/travis-build.sh @@ -1,4 +1,8 @@ #!/bin/bash +pushd toonz/sources +clang-format --version +git ls-files | egrep \\.\(c\|cpp\|h\|hpp\)$ | xargs clang-format -i && git diff --exit-code || exit 1 +popd pushd thirdparty/tiff-4.0.3 ./configure && make popd diff --git a/ci-scripts/osx/travis-install.sh b/ci-scripts/osx/travis-install.sh index 9f84239..5a2358d 100644 --- a/ci-scripts/osx/travis-install.sh +++ b/ci-scripts/osx/travis-install.sh @@ -1,3 +1,5 @@ #!/bin/bash brew update brew install qt55 glew lz4 lzo libusb +brew tap tcr/tcr +brew install clang-format diff --git a/stuff/projects/cleanupreslist.txt b/stuff/projects/cleanupreslist.txt index e59a3a2..8326b0c 100644 --- a/stuff/projects/cleanupreslist.txt +++ b/stuff/projects/cleanupreslist.txt @@ -1,3 +1,11 @@ +UHD 4K, 3840x2160, 16/9 + +HD 1080, 1920x1080, 16/9 + +HD 720, 1280x720, 16/9 + +HD 480, 853x480, 16/9 + PAL analog, 768x576, 4/3 PAL digital, 720x576, 4/3 @@ -10,12 +18,6 @@ NTSC analog, 648x486, 4/3 NTSC 16/9, 864x486, 16/9 -HD 1080, 1920x1080, 16/9 - -HD 720, 1280x720, 16/9 - -HD 480, 853x480, 16/9 - Academy Full Frame1 1K, 914x666, 1.37 Academy Full Frame2 1K, 1024x746, 1.37 @@ -88,4 +90,6 @@ Anamorphic Un-squeezed 2K, 1828x778, 2.35 Anamorphic Un-squeezed 4K, 3656x1556, 2.35 +DCI 2K, 2048x1080, 256/135 +DCI 4K, 4096x2160, 256/135 diff --git a/stuff/projects/reslist.txt b/stuff/projects/reslist.txt index 79c5b48..8326b0c 100644 --- a/stuff/projects/reslist.txt +++ b/stuff/projects/reslist.txt @@ -1,3 +1,11 @@ +UHD 4K, 3840x2160, 16/9 + +HD 1080, 1920x1080, 16/9 + +HD 720, 1280x720, 16/9 + +HD 480, 853x480, 16/9 + PAL analog, 768x576, 4/3 PAL digital, 720x576, 4/3 @@ -10,12 +18,6 @@ NTSC analog, 648x486, 4/3 NTSC 16/9, 864x486, 16/9 -HD 1080, 1920x1080, 16/9 - -HD 720, 1280x720, 16/9 - -HD 480, 853x480, 16/9 - Academy Full Frame1 1K, 914x666, 1.37 Academy Full Frame2 1K, 1024x746, 1.37 diff --git a/toonz/sources/beautification.bat b/toonz/sources/beautification.bat deleted file mode 100644 index 46134aa..0000000 --- a/toonz/sources/beautification.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off - -for /R %%F in (*.cpp;*.hpp;*.c;*.h) do ( - clang-format -i "%%F" -) diff --git a/toonz/sources/beautification.sh b/toonz/sources/beautification.sh old mode 100644 new mode 100755 index 1d6939b..b689385 --- a/toonz/sources/beautification.sh +++ b/toonz/sources/beautification.sh @@ -1,2 +1,2 @@ #!/bin/sh -git ls-files | egrep \\.\(c\|cpp\|h\|hpp\)$ | xargs clang-format -i +git diff master --name-only | egrep \\.\(c\|cpp\|h\|hpp\)$ | xargs clang-format -i diff --git a/toonz/sources/common/trop/tblur.cpp b/toonz/sources/common/trop/tblur.cpp index 3361194..d3a21c9 100644 --- a/toonz/sources/common/trop/tblur.cpp +++ b/toonz/sources/common/trop/tblur.cpp @@ -799,7 +799,7 @@ void doBlurRgb(TRasterPT &dstRas, TRasterPT &srcRas, double blur, int dx, r1->lock(); fbuffer = (BlurPixel

*)r1->getRawData(); // new CASM_FPIXEL [llx *ly]; row1 = new T[llx + 2 * brad]; - col1 = new BlurPixel

[lly + 2 * brad]; + col1 = new BlurPixel

[ lly + 2 * brad ]; col2 = new T[lly]; } diff --git a/toonz/sources/common/twain/twain.h b/toonz/sources/common/twain/twain.h index fc05afc..c7dee17 100644 --- a/toonz/sources/common/twain/twain.h +++ b/toonz/sources/common/twain/twain.h @@ -1483,23 +1483,15 @@ typedef struct { 0x0203 /* TW_UINT32 handle to WAV, (AIFF Mac) Added 1.8 */ /* misplaced */ -#define DAT_ICCPROFILE \ - 0x0401 /* TW_MEMORY Added 1.91 This Data Argument is misplaced but \ \ \ \ - \ \ - belongs to the DG_IMAGE Data Group */ -#define DAT_IMAGEMEMFILEXFER \ - 0x0402 /* TW_IMAGEMEMXFER Added 1.91 This Data Argument is misplaced but \ - \ \ - \ \ \ - \ \ \ \ - \ \ \ \ \ - belongs to the DG_IMAGE Data Group */ -#define DAT_ENTRYPOINT \ - 0x0403 /* TW_ENTRYPOINT Added 2.0 This Data Argument is misplaced but \ \ - \ \ - \ \ \ - \ \ \ \ - belongs to the DG_CONTROL Data Group */ +/* TW_MEMORY Added 1.91 This Data Argument is misplaced but belongs to the + * DG_IMAGE Data Group */ +#define DAT_ICCPROFILE 0x0401 +/* TW_IMAGEMEMXFER Added 1.91 This Data Argument is misplaced but belongs to + * the DG_IMAGE Data Group */ +#define DAT_IMAGEMEMFILEXFER 0x0402 +/* TW_ENTRYPOINT Added 2.0 This Data Argument is misplaced but belongs to + * the DG_CONTROL Data Group */ +#define DAT_ENTRYPOINT 0x0403 /**************************************************************************** * Messages * diff --git a/toonz/sources/include/tfx.h b/toonz/sources/include/tfx.h index fe2b81b..c26028b 100644 --- a/toonz/sources/include/tfx.h +++ b/toonz/sources/include/tfx.h @@ -539,7 +539,6 @@ inline std::string TFx::getFxType() const { return getDeclaration()->getId(); } //------------------------------------------------------------------- #define FX_DECLARATION(T) \ - \ public: \ const TPersistDeclaration *getDeclaration() const override; diff --git a/toonz/sources/include/toonz/preferences.h b/toonz/sources/include/toonz/preferences.h index 4a1c251..968fe06 100644 --- a/toonz/sources/include/toonz/preferences.h +++ b/toonz/sources/include/toonz/preferences.h @@ -360,7 +360,8 @@ public: frontOnionColor = m_frontOnionColor, backOnionColor = m_backOnionColor, inksOnly = m_inksOnly; } - + bool getOnionSkinDuringPlayback() { return m_onionSkinDuringPlayback; } + void setOnionSkinDuringPlayback(bool on); // Transparency Check tab void setTranspCheckData(const TPixel &bg, const TPixel &ink, @@ -457,7 +458,7 @@ private: m_levelsBackupEnabled, m_minimizeSaveboxAfterEditing, m_sceneNumberingEnabled, m_animationSheetEnabled, m_inksOnly; bool m_fillOnlySavebox, m_show0ThickLines, m_regionAntialias; - + bool m_onionSkinDuringPlayback; TPixel32 m_viewerBGColor, m_previewBGColor, m_chessboardColor1, m_chessboardColor2; bool m_showRasterImagesDarkenBlendedInViewer, diff --git a/toonz/sources/include/toonzqt/lineedit.h b/toonz/sources/include/toonzqt/lineedit.h index 7351702..88fde3b 100644 --- a/toonz/sources/include/toonzqt/lineedit.h +++ b/toonz/sources/include/toonzqt/lineedit.h @@ -49,6 +49,7 @@ protected: signals: void focusIn(); + void returnPressedNow(); }; //----------------------------------------------------------------------------- diff --git a/toonz/sources/include/tpersist.h b/toonz/sources/include/tpersist.h index c5b15b8..769c31c 100644 --- a/toonz/sources/include/tpersist.h +++ b/toonz/sources/include/tpersist.h @@ -142,10 +142,9 @@ public: class TPersistDeclarationT */ #define PERSIST_DECLARATION(T) \ - \ private: \ static TPersistDeclarationT m_declaration; \ - \ + \ public: \ const TPersistDeclaration *getDeclaration() const override { \ return &m_declaration; \ diff --git a/toonz/sources/include/trenderresourcemanager.h b/toonz/sources/include/trenderresourcemanager.h index 559274a..cbb6da7 100644 --- a/toonz/sources/include/trenderresourcemanager.h +++ b/toonz/sources/include/trenderresourcemanager.h @@ -132,11 +132,10 @@ static TRenderResourceManagerGenerator* gen(); */ #define T_RENDER_RESOURCE_MANAGER \ - \ public: \ static TRenderResourceManagerGenerator *gen(); \ static TRenderResourceManagerGenerator *deps(); \ - \ + \ private: //-------------------------------------------------------------------------------- diff --git a/toonz/sources/include/tsmartpointer.h b/toonz/sources/include/tsmartpointer.h index 2cebef1..7f14e23 100644 --- a/toonz/sources/include/tsmartpointer.h +++ b/toonz/sources/include/tsmartpointer.h @@ -87,10 +87,9 @@ private: }; #define DECLARE_CLASS_CODE \ - \ private: \ static const TSmartObject::ClassCode m_classCode; \ - \ + \ public: \ inline static TINT32 getInstanceCount() { \ return TSmartObject::getInstanceCount(m_classCode); \ diff --git a/toonz/sources/stdfx/stdfx.h b/toonz/sources/stdfx/stdfx.h index bd0cb0a..d32644d 100644 --- a/toonz/sources/stdfx/stdfx.h +++ b/toonz/sources/stdfx/stdfx.h @@ -15,7 +15,6 @@ class PaletteFilterFxRenderData; static const std::string PLUGIN_PREFIX("STD"); #define FX_PLUGIN_DECLARATION(T) \ - \ public: \ const TPersistDeclaration *getDeclaration() const override; diff --git a/toonz/sources/toonz/comboviewerpane.cpp b/toonz/sources/toonz/comboviewerpane.cpp index 65668d0..6a10ad9 100644 --- a/toonz/sources/toonz/comboviewerpane.cpp +++ b/toonz/sources/toonz/comboviewerpane.cpp @@ -180,6 +180,8 @@ ComboViewerPanel::ComboViewerPanel(QWidget *parent, Qt::WFlags flags) ret = ret && connect(m_flipConsole, SIGNAL(playStateChanged(bool)), TApp::instance()->getCurrentFrame(), SLOT(setPlaying(bool))); + ret = ret && connect(m_flipConsole, SIGNAL(playStateChanged(bool)), this, + SLOT(onPlayingStatusChanged(bool))); ret = ret && connect(m_flipConsole, SIGNAL(buttonPressed(FlipConsole::EGadget)), m_sceneViewer, SLOT(onButtonPressed(FlipConsole::EGadget))); @@ -574,6 +576,28 @@ void ComboViewerPanel::onXshLevelSwitched(TXshLevel *) { //----------------------------------------------------------------------------- +void ComboViewerPanel::onPlayingStatusChanged(bool playing) { + if (Preferences::instance()->getOnionSkinDuringPlayback()) return; + OnionSkinMask osm = + TApp::instance()->getCurrentOnionSkin()->getOnionSkinMask(); + if (playing) { + m_onionSkinActive = osm.isEnabled(); + if (m_onionSkinActive) { + osm.enable(false); + TApp::instance()->getCurrentOnionSkin()->setOnionSkinMask(osm); + TApp::instance()->getCurrentOnionSkin()->notifyOnionSkinMaskChanged(); + } + } else { + if (m_onionSkinActive) { + osm.enable(true); + TApp::instance()->getCurrentOnionSkin()->setOnionSkinMask(osm); + TApp::instance()->getCurrentOnionSkin()->notifyOnionSkinMaskChanged(); + } + } +} + +//----------------------------------------------------------------------------- + void ComboViewerPanel::changeWindowTitle() { TApp *app = TApp::instance(); ToonzScene *scene = app->getCurrentScene()->getScene(); diff --git a/toonz/sources/toonz/comboviewerpane.h b/toonz/sources/toonz/comboviewerpane.h index c49f00e..8f935ca 100644 --- a/toonz/sources/toonz/comboviewerpane.h +++ b/toonz/sources/toonz/comboviewerpane.h @@ -50,6 +50,7 @@ class ComboViewerPanel final : public TPanel, public FlipConsoleOwner { Ruler *m_vRuler; Ruler *m_hRuler; bool m_visibleFlag[CVPARTS_COUNT]; + bool m_onionSkinActive = false; TPanelTitleBarButton *m_previewButton; TPanelTitleBarButton *m_subcameraPreviewButton; @@ -103,7 +104,7 @@ public slots: void changeWindowTitle(); void updateFrameRange(); void onXshLevelSwitched(TXshLevel *); - + void onPlayingStatusChanged(bool playing); // for showing/hiding the parts void onShowHideActionTriggered(QAction *); void enableFlipConsoleForCamerastand(bool on); diff --git a/toonz/sources/toonz/filebrowserpopup.cpp b/toonz/sources/toonz/filebrowserpopup.cpp index 4064a89..8bbda39 100644 --- a/toonz/sources/toonz/filebrowserpopup.cpp +++ b/toonz/sources/toonz/filebrowserpopup.cpp @@ -407,7 +407,10 @@ TFilePath GenericLoadFilePopup::getPath() { //*********************************************************************************** GenericSaveFilePopup::GenericSaveFilePopup(const QString &title) - : FileBrowserPopup(title) {} + : FileBrowserPopup(title) { + connect(m_nameField, SIGNAL(returnPressedNow()), m_okButton, + SLOT(animateClick())); +} //----------------------------------------------------------------------------- @@ -546,6 +549,8 @@ void LoadSubScenePopup::showEvent(QShowEvent *e) { SaveSceneAsPopup::SaveSceneAsPopup() : FileBrowserPopup(tr("Save Scene")) { setOkText(tr("Save")); addFilterType("tnz"); + connect(m_nameField, SIGNAL(returnPressedNow()), m_okButton, + SLOT(animateClick())); } bool SaveSceneAsPopup::execute() { @@ -575,6 +580,8 @@ void SaveSceneAsPopup::initFolder() { SaveSubSceneAsPopup::SaveSubSceneAsPopup() : FileBrowserPopup(tr("Sub-xsheet")) { setOkText(tr("Save")); + connect(m_nameField, SIGNAL(returnPressedNow()), m_okButton, + SLOT(animateClick())); } bool SaveSubSceneAsPopup::execute() { @@ -1323,6 +1330,8 @@ void LoadLevelPopup::onSelectionChanged(TSelection *selection) { SaveLevelAsPopup::SaveLevelAsPopup() : FileBrowserPopup(tr("Save Level")) { setOkText(tr("Save")); + connect(m_nameField, SIGNAL(returnPressedNow()), m_okButton, + SLOT(animateClick())); } bool SaveLevelAsPopup::execute() { @@ -1603,6 +1612,8 @@ SavePaletteAsPopup::SavePaletteAsPopup() : FileBrowserPopup(tr("Save Palette")) { setOkText(tr("Save")); addFilterType("tpl"); + connect(m_nameField, SIGNAL(returnPressedNow()), m_okButton, + SLOT(animateClick())); } bool SavePaletteAsPopup::execute() { diff --git a/toonz/sources/toonz/levelsettingspopup.cpp b/toonz/sources/toonz/levelsettingspopup.cpp index 993b58b..d973c61 100644 --- a/toonz/sources/toonz/levelsettingspopup.cpp +++ b/toonz/sources/toonz/levelsettingspopup.cpp @@ -661,12 +661,13 @@ void LevelSettingsPopup::onNameChanged() { error("The name " + text + " you entered for the level is not valid.\n Please enter a different " "name."); + m_nameFld->setFocus(); return; } /*-- Level名に変更がない場合 --*/ if (level->getName() == text.toStdWString()) { - warning("Level name unchanged."); + // warning("Level name unchanged."); return; } @@ -677,6 +678,7 @@ void LevelSettingsPopup::onNameChanged() { error("The name " + text + " you entered for the level is already used.\nPlease enter a " "different name."); + m_nameFld->setFocus(); return; } diff --git a/toonz/sources/toonz/preferencespopup.cpp b/toonz/sources/toonz/preferencespopup.cpp index c9c96c9..f61fbc3 100644 --- a/toonz/sources/toonz/preferencespopup.cpp +++ b/toonz/sources/toonz/preferencespopup.cpp @@ -625,6 +625,12 @@ void PreferencesPopup::onOnionSkinVisibilityChanged(int index) { //----------------------------------------------------------------------------- +void PreferencesPopup::onOnionSkinDuringPlaybackChanged(int index) { + m_pref->setOnionSkinDuringPlayback(index == Qt::Checked); +} + +//----------------------------------------------------------------------------- + void PreferencesPopup::onActualPixelOnSceneModeChanged(int index) { m_pref->enableActualPixelViewOnSceneEditingMode(index == Qt::Checked); } @@ -1058,9 +1064,11 @@ PreferencesPopup::PreferencesPopup() bool onlyInks; m_pref->getOnionData(frontColor, backColor, onlyInks); m_onionSkinVisibility = new CheckBox(tr("Onion Skin ON")); - m_frontOnionColor = new ColorField(this, false, frontColor); - m_backOnionColor = new ColorField(this, false, backColor); - m_inksOnly = new DVGui::CheckBox(tr("Display Lines Only ")); + m_onionSkinDuringPlayback = + new CheckBox(tr("Show Onion Skin During Playback")); + m_frontOnionColor = new ColorField(this, false, frontColor); + m_backOnionColor = new ColorField(this, false, backColor); + m_inksOnly = new DVGui::CheckBox(tr("Display Lines Only ")); m_inksOnly->setChecked(onlyInks); int thickness = m_pref->getOnionPaperThickness(); @@ -1288,6 +1296,7 @@ PreferencesPopup::PreferencesPopup() //--- Onion Skin ------------------------------ m_onionSkinVisibility->setChecked(m_pref->isOnionSkinEnabled()); + m_onionSkinDuringPlayback->setChecked(m_pref->getOnionSkinDuringPlayback()); m_frontOnionColor->setEnabled(m_pref->isOnionSkinEnabled()); m_backOnionColor->setEnabled(m_pref->isOnionSkinEnabled()); m_inksOnly->setEnabled(m_pref->isOnionSkinEnabled()); @@ -1756,6 +1765,8 @@ PreferencesPopup::PreferencesPopup() onionLay->addLayout(onionColorLay, 0); onionLay->addWidget(m_inksOnly, 0, Qt::AlignLeft | Qt::AlignVCenter); + onionLay->addWidget(m_onionSkinDuringPlayback, 0, + Qt::AlignLeft | Qt::AlignVCenter); onionLay->addStretch(1); } @@ -2004,6 +2015,8 @@ PreferencesPopup::PreferencesPopup() SLOT(onOnionDataChanged(int))); ret = ret && connect(m_onionSkinVisibility, SIGNAL(stateChanged(int)), SLOT(onOnionSkinVisibilityChanged(int))); + ret = ret && connect(m_onionSkinDuringPlayback, SIGNAL(stateChanged(int)), + SLOT(onOnionSkinDuringPlaybackChanged(int))); ret = ret && connect(m_onionPaperThickness, SIGNAL(editingFinished()), SLOT(onOnionPaperThicknessChanged())); diff --git a/toonz/sources/toonz/preferencespopup.h b/toonz/sources/toonz/preferencespopup.h index db994eb..7677d22 100644 --- a/toonz/sources/toonz/preferencespopup.h +++ b/toonz/sources/toonz/preferencespopup.h @@ -68,7 +68,7 @@ private: QPushButton *m_addLevelFormat, *m_removeLevelFormat, *m_editLevelFormat; DVGui::CheckBox *m_inksOnly, *m_enableVersionControl, *m_levelsBackup, - *m_onionSkinVisibility, *m_pixelsOnlyCB; + *m_onionSkinVisibility, *m_pixelsOnlyCB, *m_onionSkinDuringPlayback; DVGui::FileField *m_ffmpegPathFileFld; @@ -142,6 +142,7 @@ private slots: void onColumnIconChange(const QString &); void onReplaceAfterSaveLevelAsChanged(int index); void onOnionSkinVisibilityChanged(int); + void onOnionSkinDuringPlaybackChanged(int); void onActualPixelOnSceneModeChanged(int); void onMultiLayerStylePickerChanged(int); void onLevelNameOnEachMarkerChanged(int); diff --git a/toonz/sources/toonz/projectpopup.cpp b/toonz/sources/toonz/projectpopup.cpp index e947e1c..6c96c3b 100644 --- a/toonz/sources/toonz/projectpopup.cpp +++ b/toonz/sources/toonz/projectpopup.cpp @@ -345,7 +345,8 @@ void ProjectPopup::updateChooseProjectCombo() { m_projectPaths.clear(); m_chooseProjectCombo->clear(); - TFilePath sandboxFp = TProjectManager::instance()->getSandboxProjectFolder(); + TFilePath sandboxFp = TProjectManager::instance()->getSandboxProjectFolder() + + "sandbox_otprj.xml"; m_projectPaths.push_back(sandboxFp); m_chooseProjectCombo->addItem("sandbox"); diff --git a/toonz/sources/toonz/viewerpane.cpp b/toonz/sources/toonz/viewerpane.cpp index aba4bed..4dd7bcb 100644 --- a/toonz/sources/toonz/viewerpane.cpp +++ b/toonz/sources/toonz/viewerpane.cpp @@ -27,6 +27,7 @@ #include "toonz/tpalettehandle.h" #include "toonz/tonionskinmaskhandle.h" #include "toutputproperties.h" +#include "toonz/preferences.h" // TnzQt includes #include "toonzqt/menubarcommand.h" @@ -143,6 +144,8 @@ SceneViewerPanel::SceneViewerPanel(QWidget *parent, Qt::WFlags flags) ret = ret && connect(m_flipConsole, SIGNAL(playStateChanged(bool)), TApp::instance()->getCurrentFrame(), SLOT(setPlaying(bool))); + ret = ret && connect(m_flipConsole, SIGNAL(playStateChanged(bool)), this, + SLOT(onPlayingStatusChanged(bool))); ret = ret && connect(m_flipConsole, SIGNAL(buttonPressed(FlipConsole::EGadget)), m_sceneViewer, SLOT(onButtonPressed(FlipConsole::EGadget))); @@ -433,6 +436,28 @@ void SceneViewerPanel::onXshLevelSwitched(TXshLevel *) { changeWindowTitle(); } //----------------------------------------------------------------------------- +void SceneViewerPanel::onPlayingStatusChanged(bool playing) { + if (Preferences::instance()->getOnionSkinDuringPlayback()) return; + OnionSkinMask osm = + TApp::instance()->getCurrentOnionSkin()->getOnionSkinMask(); + if (playing) { + m_onionSkinActive = osm.isEnabled(); + if (m_onionSkinActive) { + osm.enable(false); + TApp::instance()->getCurrentOnionSkin()->setOnionSkinMask(osm); + TApp::instance()->getCurrentOnionSkin()->notifyOnionSkinMaskChanged(); + } + } else { + if (m_onionSkinActive) { + osm.enable(true); + TApp::instance()->getCurrentOnionSkin()->setOnionSkinMask(osm); + TApp::instance()->getCurrentOnionSkin()->notifyOnionSkinMaskChanged(); + } + } +} + +//----------------------------------------------------------------------------- + void SceneViewerPanel::changeWindowTitle() { TApp *app = TApp::instance(); // zoom = sqrt(m_sceneViewer->getViewMatrix().det()); diff --git a/toonz/sources/toonz/viewerpane.h b/toonz/sources/toonz/viewerpane.h index 5ed1a30..d308604 100644 --- a/toonz/sources/toonz/viewerpane.h +++ b/toonz/sources/toonz/viewerpane.h @@ -36,6 +36,7 @@ class SceneViewerPanel final : public TPanel, public FlipConsoleOwner { TPanelTitleBarButtonSet *m_referenceModeBs; TPanelTitleBarButton *m_previewButton; TPanelTitleBarButton *m_subcameraPreviewButton; + bool m_onionSkinActive = false; public: #if QT_VERSION >= 0x050500 @@ -71,7 +72,7 @@ protected slots: void onFrameSwitched(); void onSceneSwitched(); void onFrameTypeChanged(); - + void onPlayingStatusChanged(bool playing); void enableFullPreview(bool enabled); void enableSubCameraPreview(bool enabled); }; diff --git a/toonz/sources/toonzlib/preferences.cpp b/toonz/sources/toonzlib/preferences.cpp index 294170f..886e841 100644 --- a/toonz/sources/toonzlib/preferences.cpp +++ b/toonz/sources/toonzlib/preferences.cpp @@ -283,6 +283,7 @@ Preferences::Preferences() , m_columnIconLoadingPolicy((int)LoadAtOnce) , m_moveCurrentFrameByClickCellArea(true) , m_onionSkinEnabled(true) + , m_onionSkinDuringPlayback(false) , m_multiLayerStylePickerEnabled(false) , m_paletteTypeOnLoadRasterImageAsColorModel(0) , m_showKeyframesOnXsheetCellArea(true) @@ -535,6 +536,7 @@ Preferences::Preferences() getValue(*m_settings, "moveCurrentFrameByClickCellArea", m_moveCurrentFrameByClickCellArea); getValue(*m_settings, "onionSkinEnabled", m_onionSkinEnabled); + getValue(*m_settings, "onionSkinDuringPlayback", m_onionSkinDuringPlayback); getValue(*m_settings, "multiLayerStylePickerEnabled", m_multiLayerStylePickerEnabled); getValue(*m_settings, "paletteTypeOnLoadRasterImageAsColorModel", @@ -898,6 +900,13 @@ void Preferences::enableOnionSkin(bool on) { //----------------------------------------------------------------- +void Preferences::setOnionSkinDuringPlayback(bool on) { + m_onionSkinDuringPlayback = on; + m_settings->setValue("onionSkinDuringPlayback", on ? "1" : "0"); +} + +//----------------------------------------------------------------- + void Preferences::setShow0ThickLines(bool on) { m_show0ThickLines = on; m_settings->setValue(s_show0ThickLines, s_bool[on]); diff --git a/toonz/sources/toonzqt/lineedit.cpp b/toonz/sources/toonzqt/lineedit.cpp index fb82a36..743fddb 100644 --- a/toonz/sources/toonzqt/lineedit.cpp +++ b/toonz/sources/toonzqt/lineedit.cpp @@ -34,6 +34,7 @@ void LineEdit::focusInEvent(QFocusEvent *event) { void LineEdit::keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) { m_isReturnPressed = true; + emit returnPressedNow(); clearFocus(); return; } else {