OpenToonz - An open-source full-featured 2D animation creation software
C
Rename fill Option from Selective to Empty Only and store as env variable
Abel You9627c0906243
diff --git a/toonz/sources/include/tools/tooloptions.h b/toonz/sources/include/tools/tooloptions.hindex 2faf0f24e..80a0b18df 100644--- a/toonz/sources/include/tools/tooloptions.h+++ b/toonz/sources/include/tools/tooloptions.h@@ -518,7 +518,7 @@ class FillToolOptionsBox final : public ToolOptionsBox {int m_targetType;QLabel *m_fillDepthLabel;ToolOptionCombo *m_colorMode, *m_toolType;- ToolOptionCheckbox *m_selectiveMode, *m_segmentMode, *m_onionMode,+ ToolOptionCheckbox *m_emptyOnly, *m_segmentMode, *m_onionMode,*m_multiFrameMode, *m_autopaintMode, *m_closeGap, *m_referFill;ToolOptionPairSlider *m_fillDepthField;ToolOptionIntSlider* m_gapCloseDistance;diff --git a/toonz/sources/tnztools/filltool.cpp b/toonz/sources/tnztools/filltool.cppindex f9fe1140c..72d92c324 100644--- a/toonz/sources/tnztools/filltool.cpp+++ b/toonz/sources/tnztools/filltool.cpp@@ -1977,7 +1977,7 @@ FillTool::FillTool(int targetType): TTool("T_Fill"), m_frameRange("Frame Range", false) // W_ToolOptions_FrameRange, m_fillType("Type:")- , m_selective("Selective", false)+ , m_emptyOnly("Empty Only", false), m_colorType("Mode:"), m_onion("Onion Skin", false), m_fillDepth("Fill Depth", 0, 15, 0, 15)@@ -2006,7 +2006,7 @@ FillTool::FillTool(int targetType)m_colorType.addValue(AREAS);m_colorType.addValue(ALL);- m_prop.bind(m_selective);+ m_prop.bind(m_emptyOnly);if (targetType == TTool::ToonzImage) {m_prop.bind(m_fillDepth);m_prop.bind(m_segment);@@ -2020,7 +2020,7 @@ FillTool::FillTool(int targetType)m_maxGapDistance.setId("MaxGapDistance");}if (targetType == TTool::ToonzImage) m_prop.bind(m_autopaintLines);- m_selective.setId("Selective");+ m_emptyOnly.setId("EmptyOnly");m_onion.setId("OnionSkin");m_frameRange.setId("FrameRange");m_segment.setId("SegmentInk");@@ -2187,7 +2187,7 @@ void FillTool::updateTranslation() {m_fillType.setItemUIName(POLYLINEFILL, tr("Polyline"));m_fillType.setItemUIName(FREEPICKFILL, tr("Pick+Freehand"));- m_selective.setQStringName(tr("Selective"));+ m_emptyOnly.setQStringName(tr("Empty Only"));m_colorType.setQStringName(tr("Mode:"));m_colorType.setItemUIName(LINES, tr("Lines"));@@ -2212,7 +2212,7 @@ FillParameters FillTool::getFillParameters() const {params.m_styleId = styleId;/*---紛らわしいことに、colorTypeをfillTypeに名前を変えて保存している。間違いではない。---*/params.m_fillType = m_colorType.getValue();- params.m_emptyOnly = m_selective.getValue();+ params.m_emptyOnly = m_emptyOnly.getValue();params.m_segment = m_segment.getValue();// RefFill is not controlled paramsparams.m_minFillDepth = (int)m_fillDepth.getValue().first;@@ -2446,8 +2446,9 @@ bool FillTool::onPropertyChanged(std::string propertyName, bool addToUndo) {resetMulti();rectPropChangedflag = true;}- // Selective- else if (propertyName == m_selective.getName()) {+ // Empty Only+ else if (propertyName == m_emptyOnly.getName()) {+ FillSelective = (int)m_emptyOnly.getValue();rectPropChangedflag = true;}// Fill Depth@@ -2532,7 +2533,7 @@ bool FillTool::onPropertyChanged(std::string propertyName, bool addToUndo) {assert(false);m_areaFillTool->onPropertyChanged(- m_frameRange.getValue(), m_selective.getValue(), m_onion.getValue(),+ m_frameRange.getValue(), m_emptyOnly.getValue(), m_onion.getValue(),type, m_colorType.getValue(), m_autopaintLines.getValue());}@@ -2719,7 +2720,7 @@ void FillTool::onActivate() {TDoublePairProperty::Value(MinFillDepth, MaxFillDepth));m_fillType.setValue(::to_wstring(FillType.getValue()));m_colorType.setValue(::to_wstring(FillColorType.getValue()));- // m_onlyEmpty.setValue(FillSelective ? 1 :0);+ m_emptyOnly.setValue(FillSelective ? 1 : 0);m_onion.setValue(FillOnion ? 1 : 0);m_segment.setValue(FillSegment ? 1 : 0);m_closeGap.setValue(FillCloseGap ? 1 : 0);@@ -2747,7 +2748,7 @@ void FillTool::onActivate() {assert(false);m_areaFillTool->onPropertyChanged(- m_frameRange.getValue(), m_selective.getValue(), m_onion.getValue(),+ m_frameRange.getValue(), m_emptyOnly.getValue(), m_onion.getValue(),type, m_colorType.getValue(), m_autopaintLines.getValue());}}diff --git a/toonz/sources/tnztools/filltool.h b/toonz/sources/tnztools/filltool.hindex c83b9e461..1ec19dd0b 100644--- a/toonz/sources/tnztools/filltool.h+++ b/toonz/sources/tnztools/filltool.h@@ -97,7 +97,7 @@ class FillTool final : public QObject, public TTool {TEnumProperty m_fillType; // Rect, Polyline etc.TBoolProperty m_onion;TBoolProperty m_frameRange;- TBoolProperty m_selective;+ TBoolProperty m_emptyOnly;TDoublePairProperty m_fillDepth;TBoolProperty m_segment;TBoolProperty m_closeGap;diff --git a/toonz/sources/tnztools/tooloptions.cpp b/toonz/sources/tnztools/tooloptions.cppindex 4947cdaf0..4e6737d15 100644--- a/toonz/sources/tnztools/tooloptions.cpp+++ b/toonz/sources/tnztools/tooloptions.cpp@@ -1763,8 +1763,8 @@ FillToolOptionsBox::FillToolOptionsBox(QWidget *parent, TTool *tool,m_toolType = dynamic_cast<ToolOptionCombo *>(m_controls.value("Type:"));m_colorMode = dynamic_cast<ToolOptionCombo *>(m_controls.value("Mode:"));- m_selectiveMode =- dynamic_cast<ToolOptionCheckbox *>(m_controls.value("Selective"));+ m_emptyOnly =+ dynamic_cast<ToolOptionCheckbox *>(m_controls.value("Empty Only"));m_fillDepthField =dynamic_cast<ToolOptionPairSlider *>(m_controls.value("Fill Depth"));if (m_fillDepthField)@@ -1814,7 +1814,7 @@ void FillToolOptionsBox::updateStatus() {void FillToolOptionsBox::onColorModeChanged(int index) {const TEnumProperty::Range &range = m_colorMode->getProperty()->getRange();bool enabled = range[index] != L"Lines";- m_selectiveMode->setEnabled(enabled);+ m_emptyOnly->setEnabled(enabled);if (m_autopaintMode) m_autopaintMode->setEnabled(enabled);if (m_fillDepthLabel && m_fillDepthField) {m_fillDepthLabel->setEnabled(enabled);