Summary: | Brushes works wrong, after selecting another pattern and reselecting the original one, they works like the should | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | anno2300 |
Component: | Brush engines | Assignee: | Dmitry Kazakov <dimula73> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dimula73, halla, hgmestre, raincolee, ss93078, tamtamy.tymona, tomtomtomreportingin, uenvironments |
Priority: | NOR | Keywords: | regression, release_blocker |
Version: | 5.0.0-beta2 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | macOS | ||
Latest Commit: | https://invent.kde.org/graphics/krita/commit/5b6b0401d634cb3307e10c6791d681f0cd02e31a | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: |
Image to see the diffenece how the brushes works afer installation and after reselect the pattern
attachment-20155-0.html |
*** Bug 441437 has been marked as a duplicate of this bug. *** Looks like there's something weird with determining whather a brush is has a masking brush. Okay, preliminary conclusions: * There are two brush tips with the same md5sum, cf1bc7415af3103afcd82f58a2e6fe18. * But they have two different filenames: square_rough.png (krita4 bundle) and 3_texture.png (krita 3 bundle). * At some point, because we select the first resource with the correct md5sum, 3_texture.png gets added to the thread local resource snapshot. However, the paintop option still only selects by filename, and so looks for square_rough.png, which isn't in there. Two options: * return all resources with the right type and filename in KisAllResourceModel::resourceByName/FileName/MD5, and add them to the local snapshot * change the paintop options to add the relevant keys for md5sum to the option's settings object, and select from the local resource shapshot by md5sum. About your Comment 3, is it not related to https://bugs.kde.org/show_bug.cgi?id=441347 ? Or is there the same problem? Cause in the bug 441347 i tell which bugs are deactivated in Krita 4 Bundle cause it is in Krita 3, but this are also deactivated and not avaiable in the library. There are a bunch of overlapping brushes in Krita 4 and 3 Resources and all from the Krita 4 Bundle are deactivated cause the md5sum checks the Krita 3 bundle first, right? I'm sorry, i mean "which brushes are deactivated in Krita 4 Bundle", and not "bugs". Don't know how to edit a comment ;-) When looking for dependent resources -- i.e. brush tips that paintop preset needs -- we don't care whether the resource we find is active or not. Inactive resources aren't shown in the resource selectors, but they can be loaded and used. When loading a bundle, we load all resources, even if there is already a resource with the same md5sum in the database, because resources are considered for md5sum + storage. So, the query for resource by md5sum can return either resource, but returns the first one in the database. The problem is that we're still in places are looking for resources by filename as well. In any case, I think I'm making progress, and I'm just documenting my ongoing progress :-) Created attachment 141106 [details] attachment-20155-0.html That's quite interesting. I really love to read about the progress :-) Halla Rempt <bugzilla_noreply@kde.org> schrieb am Sa., 28. Aug. 2021, 15:08: > https://bugs.kde.org/show_bug.cgi?id=441350 > > --- Comment #6 from Halla Rempt <halla@valdyas.org> --- > When looking for dependent resources -- i.e. brush tips that paintop preset > needs -- we don't care whether the resource we find is active or not. > Inactive > resources aren't shown in the resource selectors, but they can be loaded > and > used. > > When loading a bundle, we load all resources, even if there is already a > resource with the same md5sum in the database, because resources are > considered > for md5sum + storage. > > So, the query for resource by md5sum can return either resource, but > returns > the first one in the database. The problem is that we're still in places > are > looking for resources by filename as well. > > In any case, I think I'm making progress, and I'm just documenting my > ongoing > progress :-) > > -- > You are receiving this mail because: > You are on the CC list for the bug. Git commit 91bbbd5ffd64c918cb882815f71c097c8c220bf9 by Halla Rempt. Committed on 02/09/2021 at 13:59. Pushed by rempt into branch 'master'. Fix loading legacy brush masks If there are two resources in two storages that have the same md5sum (square_rough.png and texture_3.png), we need to make sure that the one with the filename stored in the preset can be found, so now resources(md5, filename, name) returns all matching resources. Related: bug 441347 M +17 -6 libs/brush/kis_predefined_brush_factory.cpp M +25 -22 libs/image/brushengine/kis_paintop_preset.cpp M +3 -0 libs/image/brushengine/kis_paintop_settings.cpp M +1 -1 libs/image/kis_properties_configuration.cc M +3 -3 libs/psdutils/psd.h M +7 -6 libs/resources/KisGlobalResourcesInterface.cpp M +3 -4 libs/resources/KisLinkedResourceWrapper.h M +36 -32 libs/resources/KisLocalStrokeResources.cpp M +1 -0 libs/resources/KisRequiredResourcesOperators.h M +33 -13 libs/resources/KisResourceModel.cpp M +3 -3 libs/resources/KisResourceModel.h M +63 -23 libs/resources/KisResourcesInterface.h M +19 -5 libs/resources/KoResourceServer.h M +0 -1 libs/resourcewidgets/dbexplorer/DlgDbExplorer.cpp M +4 -1 libs/ui/utils/KisDitherUtil.cpp M +12 -4 libs/ui/widgets/KisDitherWidget.cpp M +0 -1 libs/ui/widgets/kis_preset_chooser.cpp M +12 -3 libs/ui/widgets/kis_workspace_chooser.cpp M +11 -2 plugins/filters/gradientmap/KisGradientMapFilterConfiguration.cpp M +9 -1 plugins/filters/palettize/palettize.cpp M +7 -2 plugins/generators/pattern/kis_wdg_pattern.cpp M +5 -1 plugins/generators/pattern/patterngenerator.cpp M +1 -0 plugins/paintops/libpaintop/KisMaskingBrushOption.cpp M +2 -3 plugins/paintops/libpaintop/KisTextureMaskInfo.cpp M +0 -2 plugins/paintops/libpaintop/kis_brush_option.cpp M +15 -4 plugins/paintops/libpaintop/kis_linked_pattern_manager.cpp M +9 -6 plugins/paintops/libpaintop/kis_texture_option.cpp https://invent.kde.org/graphics/krita/commit/91bbbd5ffd64c918cb882815f71c097c8c220bf9 Git commit 8628fd22c755584ef3606732bf3dbe6af8e2b904 by Halla Rempt. Committed on 07/09/2021 at 09:02. Pushed by rempt into branch 'krita/5.0'. Fix loading legacy brush masks If there are two resources in two storages that have the same md5sum (square_rough.png and texture_3.png), we need to make sure that the one with the filename stored in the preset can be found, so now resources(md5, filename, name) returns all matching resources. Related: bug 441347 (cherry picked from commit 91bbbd5ffd64c918cb882815f71c097c8c220bf9) M +17 -6 libs/brush/kis_predefined_brush_factory.cpp M +25 -22 libs/image/brushengine/kis_paintop_preset.cpp M +3 -0 libs/image/brushengine/kis_paintop_settings.cpp M +1 -1 libs/image/kis_properties_configuration.cc M +3 -3 libs/psd/psd.h M +7 -6 libs/resources/KisGlobalResourcesInterface.cpp M +3 -4 libs/resources/KisLinkedResourceWrapper.h M +36 -33 libs/resources/KisLocalStrokeResources.cpp M +1 -0 libs/resources/KisRequiredResourcesOperators.h M +33 -13 libs/resources/KisResourceModel.cpp M +3 -3 libs/resources/KisResourceModel.h M +63 -23 libs/resources/KisResourcesInterface.h M +19 -5 libs/resources/KoResourceServer.h M +0 -1 libs/resourcewidgets/dbexplorer/DlgDbExplorer.cpp M +4 -1 libs/ui/utils/KisDitherUtil.cpp M +12 -4 libs/ui/widgets/KisDitherWidget.cpp M +0 -1 libs/ui/widgets/kis_preset_chooser.cpp M +12 -3 libs/ui/widgets/kis_workspace_chooser.cpp M +11 -2 plugins/filters/gradientmap/KisGradientMapFilterConfiguration.cpp M +9 -1 plugins/filters/palettize/palettize.cpp M +7 -2 plugins/generators/pattern/kis_wdg_pattern.cpp M +5 -1 plugins/generators/pattern/patterngenerator.cpp M +1 -0 plugins/paintops/libpaintop/KisMaskingBrushOption.cpp M +2 -3 plugins/paintops/libpaintop/KisTextureMaskInfo.cpp M +0 -2 plugins/paintops/libpaintop/kis_brush_option.cpp M +15 -4 plugins/paintops/libpaintop/kis_linked_pattern_manager.cpp M +9 -6 plugins/paintops/libpaintop/kis_texture_option.cpp https://invent.kde.org/graphics/krita/commit/8628fd22c755584ef3606732bf3dbe6af8e2b904 I'm sorry, but patterns are still buggy in some way with at least some included brushes and with certain bundled resources. Some of these buggy behaviors could probably pertain to at least three different currently closed bug reports, but I'm reopening just this one as it's probably the most general one. Here's the situation: 5.0 beta 2: h) Chalk Details - No pattern until changing any setting. g) Dry Brushing - No pattern until changing any setting. i) Wet Textured Soft - No pattern until changing any setting. k) Blender Textured Soft - No pattern until changing any setting, but wrongly loads 01_canvas after. y) Texture Wood Fiber - No pattern until changing any setting, but wrongly loads 01_canvas after. Moo Zip brushes (download the Moo Ink bundle from https://saeger.art/mojo-moo/bundles by clicking the orange BUNDLE button): Fine until changing settings, then wrongly loads 01_canvas after. master 45ea106: h) Chalk Details - No pattern until changing any setting, but wrongly loads 01_canvas after. g) Dry Brushing - No pattern until changing any setting, but wrongly loads 01_canvas after. i) Wet Textured Soft - No pattern until changing any setting, but wrongly loads 01_canvas after. k) Blender Textured Soft - No pattern until changing any setting, but wrongly loads 01_canvas after. y) Texture Wood Fiber - No pattern until changing any setting, but wrongly loads 01_canvas after. Moo Zip brushes: Fine until changing settings, then wrongly loads 01_canvas after. This is the same for me, many brushes are broken now. It looks like embeeded patterns in brushtips still aren't loaded correctly for the beta2? To add some other brushes that are broken and don't have a pattern now: g) Dry Textured Creases g) Dry Brushing g) Dry Roller and more... If you reselect the pattern in the Library, the pattern works. Buggy for me too. 5.0.0-beta2 (git a642eb0). Video demo for the bug: https://krita-artists.org/t/color-smudge-brushs-ratio-setting-bug-with-video-evidence/32580/4 *** Bug 446470 has been marked as a duplicate of this bug. *** As far as I can tell the following happens: 1) The pattern itself is loaded into the brush correctly 2) But the pattern selector doesn't see this resource (probably because it is marked as temporary) A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1202 Git commit 783e051031e4ddac279960d2332225a57ac7a408 by Dmitry Kazakov. Committed on 06/12/2021 at 13:48. Pushed by dkazakov into branch 'krita/5.0'. Fix embedded resources to appear in the resource model All the code that manipuilates resources in Krita is expected to do that via KisResourceModel. It guarantees that the internal model indexes are valid and up-to-date. Though we have one notable exception, that is, embedded resources. They are loaded by KisResourceLocator internally, when some uncached resource is loaded. In such a case the model should be notified to update its query. M +3 -0 libs/resources/KisResourceLocator.cpp M +6 -0 libs/resources/KisResourceLocator.h M +18 -0 libs/resources/KisResourceModel.cpp M +17 -0 libs/resources/KisResourceModel.h https://invent.kde.org/graphics/krita/commit/783e051031e4ddac279960d2332225a57ac7a408 Git commit d1d9e8f54f874316709497e20a7f56994f20c9d5 by Dmitry Kazakov. Committed on 06/12/2021 at 15:16. Pushed by dkazakov into branch 'master'. Fix embedded resources to appear in the resource model All the code that manipuilates resources in Krita is expected to do that via KisResourceModel. It guarantees that the internal model indexes are valid and up-to-date. Though we have one notable exception, that is, embedded resources. They are loaded by KisResourceLocator internally, when some uncached resource is loaded. In such a case the model should be notified to update its query. M +3 -0 libs/resources/KisResourceLocator.cpp M +6 -0 libs/resources/KisResourceLocator.h M +18 -0 libs/resources/KisResourceModel.cpp M +17 -0 libs/resources/KisResourceModel.h https://invent.kde.org/graphics/krita/commit/d1d9e8f54f874316709497e20a7f56994f20c9d5 Hi, just tested 5.0.0-beta5-783e051031 on win10, and looked up the bugged brushes listed here, now their pattern can be found correctly. However some brushes still not apply their pattern until changing any setting. f) Dry Roller g) Dry Brushing g) Dry Textured Creases h) Chalk Details i) Wet Textured Soft i)Wet Paint A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1206 Git commit 156f614b4d1f40b56dad3ff62a127483f2aa4c0c by Dmitry Kazakov. Committed on 07/12/2021 at 09:05. Pushed by dkazakov into branch 'master'. Fix loading texture patterns in presets with empty PatternMD5 field Some old Deevad's presets have empty PatternMD5 field set, we shouldn't skip them from loading, because they still have both, the filename and the (embedded) pattern itself. M +3 -1 plugins/paintops/libpaintop/kis_texture_option.cpp https://invent.kde.org/graphics/krita/commit/156f614b4d1f40b56dad3ff62a127483f2aa4c0c Git commit 5b6b0401d634cb3307e10c6791d681f0cd02e31a by Dmitry Kazakov. Committed on 07/12/2021 at 09:19. Pushed by dkazakov into branch 'krita/5.0'. Fix loading texture patterns in presets with empty PatternMD5 field Some old Deevad's presets have empty PatternMD5 field set, we shouldn't skip them from loading, because they still have both, the filename and the (embedded) pattern itself. (cherry picked from commit 156f614b4d1f40b56dad3ff62a127483f2aa4c0c) M +3 -1 plugins/paintops/libpaintop/kis_texture_option.cpp https://invent.kde.org/graphics/krita/commit/5b6b0401d634cb3307e10c6791d681f0cd02e31a Hi, Protoniv! This build (when it completes) will contain the fix for the latest bug you reported: https://binary-factory.kde.org/job/Krita_Nightly_Windows_Build/1559/ Please test it when the build is ready :) Hi, Dmitry! Just tested the patched build with these default brushes and it works great! Thank you very much! You are welcome! :) |
Created attachment 140932 [details] Image to see the diffenece how the brushes works afer installation and after reselect the pattern Some brush presets don't work correct like they should for the default resources and also in some other bundles. To make it work, you have to select another pattern in the brush editor and then go back to the right pattern before. This changes the behavior of the whole brush: j) WaterC Spread (for this brush this is very weird, cause it uses no pattern! you have to enable a pattern, select one, deactivate it, and it is fixed) j) WaterC Spread pattern j) Waterpaint Hard Edges Presets from external bundles: Crayons_V1: h) Crayon 10 Blend-Smear Charcoal_KA: h) Charcoal 10 Willow BlockGrainy There are many people in the Forum that has the same problem for exactly the same brushes. I attach some images with before/after brushstrokes. In addition in the default resources: y) Texture Reptile: doesn’t work, the pattern is not selected: 22_texture_reptile.png. But it is available in Krita 5. Easy to fix, but better it works from installation for all people. In the Impression_v3: v) Texture Impressionism Wet Blend-Big: looks weird, maybe cause in the smudge engine it set to „Color Image“ activated by default now, and this was not in Krita 4. Maybe for the same effect in Krita 4 „Alpha Mask“ is required? If brushes from Krita 4 that uses the smudge engine and a capable brush tip for RGBA now have all RGBA activated in Krita 5 as standard, tis might be a bitter problem for other bundle creators. I hope you understand what i mean. Software: macOS Big Sur 11.5.1