diff --git a/toonz/sources/tnztools/toonzrasterbrushtool.cpp b/toonz/sources/tnztools/toonzrasterbrushtool.cpp index f199b1a..39b295c 100644 --- a/toonz/sources/tnztools/toonzrasterbrushtool.cpp +++ b/toonz/sources/tnztools/toonzrasterbrushtool.cpp @@ -1264,7 +1264,6 @@ void ToonzRasterBrushTool::leftButtonDown(const TPointD &pos, TPointD centeredPos = getCenteredCursorPos(pos); - m_currentColor = TPixel32::Black; m_active = !!getImage(true); if (!m_active) { m_active = !!touchImage(); @@ -1274,16 +1273,13 @@ void ToonzRasterBrushTool::leftButtonDown(const TPointD &pos, if (m_active) { // nel caso che il colore corrente sia un cleanup/studiopalette color // oppure il colore di un colorfield - m_styleId = app->getCurrentLevelStyleIndex(); + m_styleId = app->getCurrentLevelStyleIndex(); TColorStyle *cs = app->getCurrentLevelStyle(); if (cs) { TRasterStyleFx *rfx = cs ? cs->getRasterStyleFx() : 0; m_active = cs != 0 && (cs->isStrokeStyle() || (rfx && rfx->isInkStyle())); - m_currentColor = cs->getAverageColor(); - m_currentColor.m = 255; } else { - m_styleId = 1; - m_currentColor = TPixel32::Black; + m_styleId = 1; } } @@ -2045,10 +2041,6 @@ void ToonzRasterBrushTool::onEnter() { if (cs) { TRasterStyleFx *rfx = cs->getRasterStyleFx(); m_active = cs->isStrokeStyle() || (rfx && rfx->isInkStyle()); - m_currentColor = cs->getAverageColor(); - m_currentColor.m = 255; - } else { - m_currentColor = TPixel32::Black; } m_active = img; } diff --git a/toonz/sources/tnztools/toonzrasterbrushtool.h b/toonz/sources/tnztools/toonzrasterbrushtool.h index 3ac8fae..a749012 100644 --- a/toonz/sources/tnztools/toonzrasterbrushtool.h +++ b/toonz/sources/tnztools/toonzrasterbrushtool.h @@ -188,7 +188,6 @@ protected: RasterStrokeGenerator *m_rasterTrack; TTileSetCM32 *m_tileSet; TTileSaverCM32 *m_tileSaver; - TPixel32 m_currentColor; int m_styleId; double m_minThick, m_maxThick;