diff --git a/toonz/sources/tnztools/fullcolorbrushtool.cpp b/toonz/sources/tnztools/fullcolorbrushtool.cpp index a2f3c28..c89c0ad 100644 --- a/toonz/sources/tnztools/fullcolorbrushtool.cpp +++ b/toonz/sources/tnztools/fullcolorbrushtool.cpp @@ -55,7 +55,7 @@ TEnv::DoubleVar FullcolorModifierSize("FullcolorModifierSize", 0); TEnv::DoubleVar FullcolorModifierOpacity("FullcolorModifierOpacity", 100); TEnv::IntVar FullcolorModifierEraser("FullcolorModifierEraser", 0); TEnv::IntVar FullcolorModifierLockAlpha("FullcolorModifierLockAlpha", 0); -TEnv::IntVar FullcolorAssistants("FullcolorAssistants", 0); +TEnv::IntVar FullcolorAssistants("FullcolorAssistants", 1); TEnv::StringVar FullcolorBrushPreset("FullcolorBrushPreset", ""); //---------------------------------------------------------------------------------- @@ -305,7 +305,7 @@ bool FullColorBrushTool::askWrite(const TRect &rect) { //-------------------------------------------------------------------------------------------------- bool FullColorBrushTool::preLeftButtonDown() { - m_modifierAssistants->drawOnly = !FullcolorAssistants; + m_modifierAssistants->drawOnly = !m_assistants.getValue(); m_inputmanager.drawPreview = false; //!m_modifierAssistants->drawOnly; m_inputmanager.clearModifiers(); diff --git a/toonz/sources/tnztools/toonzrasterbrushtool.cpp b/toonz/sources/tnztools/toonzrasterbrushtool.cpp index 92f9dfc..9bfafd6 100644 --- a/toonz/sources/tnztools/toonzrasterbrushtool.cpp +++ b/toonz/sources/tnztools/toonzrasterbrushtool.cpp @@ -55,7 +55,7 @@ TEnv::DoubleVar RasterBrushHardness("RasterBrushHardness", 100); TEnv::DoubleVar RasterBrushModifierSize("RasterBrushModifierSize", 0); TEnv::StringVar RasterBrushPreset("RasterBrushPreset", ""); TEnv::IntVar BrushLockAlpha("InknpaintBrushLockAlpha", 0); -TEnv::IntVar RasterBrushAssistants("RasterBrushAssistants", 0); +TEnv::IntVar RasterBrushAssistants("RasterBrushAssistants", 1); //------------------------------------------------------------------- #define CUSTOM_WSTR L"" @@ -1040,7 +1040,7 @@ bool ToonzRasterBrushTool::askWrite(const TRect &rect) { bool ToonzRasterBrushTool::preLeftButtonDown() { int smoothRadius = (int)round(m_smooth.getValue()); - m_modifierAssistants->drawOnly = !RasterBrushAssistants; + m_modifierAssistants->drawOnly = !m_assistants.getValue(); m_inputmanager.drawPreview = false; //!m_modifierAssistants->drawOnly; m_inputmanager.clearModifiers(); diff --git a/toonz/sources/tnztools/toonzvectorbrushtool.cpp b/toonz/sources/tnztools/toonzvectorbrushtool.cpp index d443834..edd576d 100644 --- a/toonz/sources/tnztools/toonzvectorbrushtool.cpp +++ b/toonz/sources/tnztools/toonzvectorbrushtool.cpp @@ -58,6 +58,7 @@ TEnv::IntVar V_BrushPressureSensitivity("InknpaintBrushPressureSensitivity", 1); TEnv::IntVar V_VectorBrushFrameRange("VectorBrushFrameRange", 0); TEnv::IntVar V_VectorBrushSnap("VectorBrushSnap", 0); TEnv::IntVar V_VectorBrushSnapSensitivity("VectorBrushSnapSensitivity", 0); +TEnv::IntVar V_VectorBrushAssistants("VectorBrushAssistants", 1); TEnv::StringVar V_VectorBrushPreset("VectorBrushPreset", ""); //------------------------------------------------------------------- @@ -506,6 +507,7 @@ ToonzVectorBrushTool::ToonzVectorBrushTool(std::string name, int targetType) , m_capStyle("Cap") , m_joinStyle("Join") , m_miterJoinLimit("Miter:", 0, 100, 4) + , m_assistants("Assistants", true) , m_firstStroke() , m_styleId() , m_minThick() @@ -551,6 +553,8 @@ ToonzVectorBrushTool::ToonzVectorBrushTool(std::string name, int targetType) m_snapSensitivity.addValue(MEDIUM_WSTR); m_snapSensitivity.addValue(HIGH_WSTR); + m_prop[0].bind(m_assistants); + m_prop[0].bind(m_preset); m_preset.addValue(CUSTOM_WSTR); @@ -576,6 +580,7 @@ ToonzVectorBrushTool::ToonzVectorBrushTool(std::string name, int targetType) m_capStyle.setId("Cap"); m_joinStyle.setId("Join"); m_miterJoinLimit.setId("Miter"); + m_assistants.setId("Assistants"); m_inputmanager.setHandler(this); m_modifierLine = new TModifierLine(); @@ -619,6 +624,7 @@ void ToonzVectorBrushTool::updateTranslation() { m_frameRange.setQStringName(tr("Range:")); m_snap.setQStringName(tr("Snap")); m_snapSensitivity.setQStringName(""); + m_assistants.setQStringName(tr("Assistants")); m_frameRange.setItemUIName(L"Off", tr("Off")); m_frameRange.setItemUIName(LINEAR_WSTR, tr("Linear")); m_frameRange.setItemUIName(EASEIN_WSTR, tr("In")); @@ -991,7 +997,7 @@ bool ToonzVectorBrushTool::preLeftButtonDown() { if (getViewer() && getViewer()->getGuidedStrokePickerMode()) return false; int smoothRadius = (int)round(m_smooth.getValue()); - m_modifierAssistants->drawOnly = true; //bwtodo: !RasterBrushAssistants; + m_modifierAssistants->drawOnly = !m_assistants.getValue(); m_modifierSegmentation->setStep(TPointD(m_pixelSize, m_pixelSize)); m_modifierSmoothSegmentation->setStep(TPointD(2*m_pixelSize, 2*m_pixelSize)); m_modifierSimplify->setStep(2*m_pixelSize); @@ -1564,6 +1570,7 @@ bool ToonzVectorBrushTool::onPropertyChanged(std::string propertyName) { V_VectorBrushSnap = m_snap.getValue(); int snapSensitivityIndex = m_snapSensitivity.getIndex(); V_VectorBrushSnapSensitivity = snapSensitivityIndex; + V_VectorBrushAssistants = m_assistants.getValue(); // Recalculate/reset based on changed settings m_minThick = m_thickness.getValue().first; @@ -1702,8 +1709,9 @@ void ToonzVectorBrushTool::loadLastBrush() { // Properties not tracked with preset m_frameRange.setIndex(V_VectorBrushFrameRange); - m_snap.setValue(V_VectorBrushSnap); + m_snap.setValue(V_VectorBrushSnap ? 1 : 0); m_snapSensitivity.setIndex(V_VectorBrushSnapSensitivity); + m_assistants.setValue(V_VectorBrushAssistants ? 1 : 0); // Recalculate based on prior values m_minThick = m_thickness.getValue().first; diff --git a/toonz/sources/tnztools/toonzvectorbrushtool.h b/toonz/sources/tnztools/toonzvectorbrushtool.h index c2d35f5..1ae9926 100644 --- a/toonz/sources/tnztools/toonzvectorbrushtool.h +++ b/toonz/sources/tnztools/toonzvectorbrushtool.h @@ -179,6 +179,7 @@ protected: TEnumProperty m_capStyle; TEnumProperty m_joinStyle; TIntProperty m_miterJoinLimit; + TBoolProperty m_assistants; TInputManager m_inputmanager; TSmartPointerT m_modifierLine;