OpenToonz - An open-source full-featured 2D animation creation software
C
Black Background on JPG and AVI export fix. (#438)
turtletoothb0c6a6c68fcc
diff --git a/toonz/sources/toonz/rendercommand.cpp b/toonz/sources/toonz/rendercommand.cppindex eaccb345e..66b848659 100644--- a/toonz/sources/toonz/rendercommand.cpp+++ b/toonz/sources/toonz/rendercommand.cpp@@ -183,14 +183,16 @@ public://=========================================================-class RenderCommand {- int m_r0, m_r1, m_step;- TFilePath m_fp;- int m_numFrames;- TPixel32 m_oldBgColor;- TDimension m_oldCameraRes;- double m_r, m_stepd;- double m_timeStretchFactor;+class RenderCommand+{+ int m_r0, m_r1, m_step;+ TFilePath m_fp;+ int m_numFrames;+ TPixel32 m_oldBgColor;+ static TPixel32 m_priorBgColor;+ TDimension m_oldCameraRes;+ double m_r, m_stepd;+ double m_timeStretchFactor;int m_multimediaRender;@@ -215,6 +217,7 @@ public:void multimediaRender();void onRender();void onPreview();+ static void resetBgColor();void doRender(bool isPreview);};@@ -441,6 +444,7 @@ public:Message(this, -1, "").send();OnRenderCompleted(fp, m_error).send();m_error = false;+ RenderCommand::resetBgColor();}void onCancel() {@@ -448,6 +452,7 @@ public:setLabelText("Aborting render...");reset();hide();+ RenderCommand::resetBgColor();}};@@ -483,6 +488,14 @@ void RenderCommand::rasterRender(bool isPreview) {}#endif+ TPixel32 currBgColor = scene->getProperties()->getBgColor();+ m_priorBgColor = currBgColor;+ if (ext == "jpg" || ext == "avi" || ext == "bmp")+ {+ currBgColor.m = 255;+ scene->getProperties()->setBgColor(currBgColor);+ }+// Extract output propertiesTOutputProperties *prop = isPreview? scene->getProperties()->getPreviewProperties()@@ -573,6 +586,15 @@ void RenderCommand::rasterRender(bool isPreview) {movieRenderer.start();}++TPixel32 RenderCommand::m_priorBgColor;++void RenderCommand::resetBgColor()+{+ ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene();+ scene->getProperties()->setBgColor(m_priorBgColor);+}+//===================================================================class MultimediaProgressBar : public DVGui::ProgressDialog,