Commit 2459d14e authored by Boudewijn Rempt's avatar Boudewijn Rempt

CCBUG:375720 Disable the gradient map filter for filter layers

This doesn't work currently because the gradient is stored in a
problematic way in the filter config:

With an absolute path, which makes the file non-portable

Could not find gradient "C:/Users/GC/AppData/Roaming/krita/gradients/kC5644.svg"

With a plain name

Could not find gradient "skin1"

Or apparently without any name, I guess for the autogenerated gradients

Could not find gradient "C:/Users/GC/AppData/Roaming/krita/gradients\\.svg"

To fix this properly, we will need to sit down and fix the resource system.
parent d436c8ea
......@@ -41,7 +41,7 @@ KritaFilterGradientMap::KritaFilterGradientMap() : KisFilter(id(), categoryMap()
setShowConfigurationWidget(true);
setSupportsLevelOfDetail(true);
setSupportsPainting(true);
setSupportsAdjustmentLayers(true);
setSupportsAdjustmentLayers(false);
setSupportsThreading(true);
}
......@@ -57,6 +57,10 @@ void KritaFilterGradientMap::processImpl(KisPaintDeviceSP device,
}
KoAbstractGradient *gradient = KoResourceServerProvider::instance()->gradientServer(false)->resourceByName(config->getString("gradientName"));
if (!gradient) {
qDebug() << "Could not find gradient" << config->getString("gradientName");
return;
}
KoColorSet *gradientCache = new KoColorSet();
for (int i=0; i<256; i++) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment