Summary: | Filter layer "Halftone" broken when working with pattern | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | grum999 |
Component: | Resource Management | Assignee: | Halla Rempt <halla> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | halla |
Priority: | NOR | ||
Version: | nightly build (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/graphics/krita/commit/72c3f42e1580dd7a0af41815e587c2edfa0c15cc | Version Fixed In: | |
Attachments: |
step 01
step 02b step 02a step 04 step 05 |
Created attachment 138077 [details]
step 02b
Created attachment 138078 [details]
step 02a
Created attachment 138079 [details]
step 04
Created attachment 138080 [details]
step 05
urgh... I can't edit initial description model_pattern_ko01.png=step 01 model_pattern_ko02a.png=step 02a model_pattern_ko02b.png=step 02b model_pattern_ko04.png=step 04 model_pattern_ko05.png=step 05 :-) Grum999 Git commit 72c3f42e1580dd7a0af41815e587c2edfa0c15cc by Halla Rempt, on behalf of Deif Lou. Committed on 03/05/2021 at 08:50. Pushed by dkazakov into branch 'master'. Fix handling of resources in halftone filter M +31 -19 plugins/filters/halftone/KisHalftoneFilterConfiguration.cpp M +0 -3 plugins/filters/halftone/KisHalftoneFilterConfiguration.h https://invent.kde.org/graphics/krita/commit/72c3f42e1580dd7a0af41815e587c2edfa0c15cc |
Created attachment 138076 [details] step 01 SUMMARY In Krita 5.0.0-prealpha (git d2806ec), "Halftone" filter layer/filter mask doesn't work properly with patterns. STEPS TO REPRODUCE METHOD 1 ======== 1) create a document, set a content (here a gradient) [screen shot model_pattern_ko01.png] 2) Add a Filter layer (or a Filter mask, problem is the same) [screen shot model_pattern_ko02a.png] - Filter type: Halftone - Mode: Intensity (but problem occurs whatever the mode is) - Screen generator: pattern - Choose a pattern different than default pattern: DITH 0404 WAVE - Apply Result is [screen shot model_pattern_ko02b.png] 3) Save document 4) Open document Pattern is not applied [screen shot model_pattern_ko04.png] Terminal output: ``` PatternGeneratorConfiguration::pattern "DITH 0404 WAVE" LocalResourceSource::resourceForName "DITH 0404 WAVE" ``` 5) Open filter layer properties Everything seems OK [screen shot model_pattern_ko04.png] Terminal output: ``` KisWdgPattern::setConfiguration(); "DITH 0404 WAVE" ``` 6) Change pattern (example "DITH 0404 WAV2") New pattern is applied Reapply previous pattern, it's applied Terminal output: ``` KisWdgPattern::configuration() [RESOURCE] Name: "DITH 0404 WAV2" Version: 0 Filename: "DITH_0404_WAV2.pat" Valid: true Storage: "/home/grum/.local/share/krita/" PatternGeneratorConfiguration::pattern "DITH 0404 WAV2" PatternGeneratorConfiguration::pattern "DITH 0404 WAV2" PatternGeneratorConfiguration::pattern "DITH 0404 WAV2" LocalResourceSource::resourceForName "DITH 0404 WAV2" KisWdgPattern::configuration() [RESOURCE] Name: "DITH 0404 WAVE" Version: 0 Filename: "DITH_0404_WAVE.pat" Valid: true Storage: "/home/grum/.local/share/krita/" PatternGeneratorConfiguration::pattern "DITH 0404 WAVE" PatternGeneratorConfiguration::pattern "DITH 0404 WAVE" PatternGeneratorConfiguration::pattern "DITH 0404 WAVE" LocalResourceSource::resourceForName "DITH 0404 WAVE" ``` Krita 4.4.3: everything is fine when opening document, filter is applied as expected Krita 5.0.0: do not work, when opening document filter is not properly applied with pattern Note: on a fill layer using pattern, there's no problem METHOD 2 ======== 1) create a document, set a content (here a gradient) [screen shot model_pattern_ko01.png] 2) in scripter, execute following code: ``` from krita import * doc=Krita.instance().activeDocument() filterConfig=InfoObject() filterConfig.setProperties({ 'intensity_generator': 'pattern', 'intensity_generator_pattern_pattern': 'DITH 0404 WAVE', 'mode': 'intensity' }) filter=Filter() filter.setName('halftone') filter.setConfiguration(filterConfig) selection=Selection() selection.select(0,0,doc.width(), doc.height(),255) filterLayer=doc.createFilterLayer("Testing filter", filter, selection) doc.rootNode().addChildNode(filterLayer, None) doc.refreshProjection() ``` Do not work, same result than in method 1 after opening document [screen shot model_pattern_ko04.png] Terminal output: ``` PatternGeneratorConfiguration::pattern "DITH 0404 WAVE" LocalResourceSource::resourceForName "DITH 0404 WAVE" PatternGeneratorConfiguration::pattern "DITH 0404 WAVE" LocalResourceSource::resourceForName "DITH 0404 WAVE" ``` Additionaly, if the following statement is added, it doesn't change anything to final result and terminal output is ``` PatternGeneratorConfiguration::pattern "DITH 0404 WAVE" LocalResourceSource::resourceForName "DITH 0404 WAVE" SAFE ASSERT (krita): "filterConfig" in file /home/appimage/workspace/Krita_Nightly_Appimage_Build/krita/plugins/filters/halftone/KisHalftoneFilter.cpp, line 57 PatternGeneratorConfiguration::pattern "DITH 0404 WAVE" LocalResourceSource::resourceForName "DITH 0404 WAVE" PatternGeneratorConfiguration::pattern "DITH 0404 WAVE" LocalResourceSource::resourceForName "DITH 0404 WAVE" ``` Note: Krita 4.4.3: everything is fine, filter layer is properly and immediately applied as expected OBSERVED RESULT -> Detailled in STEPS TO REPRODUCE EXPECTED RESULT - When opening a document, filter layer should be applied properly - When using scripting, filter layer should be applied properly SOFTWARE/OS VERSIONS Krita Version: 5.0.0-prealpha (git d2806ec) Languages: en_GB, en, fr, fr_FR, fr Hidpi: false Qt Version (compiled): 5.12.9 Version (loaded): 5.12.9 OS Information Build ABI: x86_64-little_endian-lp64 Build CPU: x86_64 CPU: x86_64 Kernel Type: linux Kernel Version: 4.19.0-16-amd64 Pretty Productname: Debian GNU/Linux 10 (buster) Product Type: debian Product Version: 10 Desktop: KDE