Bug 429089 - MyPaint brushes don't load properly when in a subfolder.
Summary: MyPaint brushes don't load properly when in a subfolder.
Status: RESOLVED WORKSFORME
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Tiar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-14 12:37 UTC by wolthera
Modified: 2021-07-25 04:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wolthera 2020-11-14 12:37:46 UTC
SUMMARY
When you have mypaint brush pack, these are inside zip files and themselves in folders. If you copy paste this folder into the preset folder, Krita will be able to find the brushes, but not able to load them properly

STEPS TO REPRODUCE
1. Get a mypaint brush pack.
2. Unzip it into the presets folder.
3. Load up Krita

OBSERVED RESULT
Krita will recognize the brushes, but load them with a red thumbnail and not load the brushes when selected.

EXPECTED RESULT
Krita will try to load these brushes from the subfolder they're in.

ADDITIONAL NOTES
- Krita will behave the same way with removed database.
- We should check if Krita loads other resources inside subfolders properly.

Krita
-----

 Version: 5.0.0-prealpha (git 971929f)
 Languages: en_US, en, en_GB, en, nl, en_US, en
 Hidpi: true

Qt

  Version (compiled): 5.15.0
  Version (loaded): 5.15.0

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 5.4.0-52-generic
  Pretty Productname: KDE neon User Edition 5.20
  Product Type: neon
  Product Version: 20.04
  Desktop: KDE

OpenGL Info
 
  Vendor:  "Intel" 
  Renderer:  "Mesa Intel(R) UHD Graphics 620 (KBL GT2)" 
  Version:  "4.6 (Compatibility Profile) Mesa 20.0.8" 
  Shading language:  "4.60" 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
  Current format:    QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
     Version: 4.6
     Supports deprecated functions true 
     is OpenGL ES: false 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsOpenGLES: true 
  isQtPreferOpenGLES: false 

Hardware Information

  GPU Acceleration: auto
  Memory: 7710 Mb
  Number of Cores: 8
  Swap Location: /tmp

Current Settings

  Current Swap Location: /tmp
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 30
  Use OpenGL: true
  Use OpenGL Texture Buffer: true
  Use AMD Vectorization Workaround: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 900
  Use Backup Files: true
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Backup Location writable: false
  Use Win8 Pointer Input: false
  Use RightMiddleTabletButton Workaround: false
  Levels of Detail Enabled: false
  Use Zip64: false


Display Information
Number of screens: 1
	Screen: 0
		Name: eDP-1
		Depth: 24
		Scale: 1
		Resolution in pixels: 1920x1080
		Manufacturer: AU Optronics
		Model: 
		Refresh Rate: 120.016
Comment 1 Halla Rempt 2020-11-14 12:54:03 UTC
That's kind of unavoidable since the icons and the brushes are in two separate files, and our whole resource system goes crazy when that happens. It's also the reason why we cannot handle myb files in bundles, since the resource itself has no way of figuring out where the partner file is.

The only solution I can imagine is making a kmyb file format that combines the myb and the png in one file, or puts the myb in the png, and convert my files when krita first encounters them.
Comment 2 wolthera 2020-11-14 13:14:01 UTC
I would first worry about the fact that the presets themselves don't load properly (I guess I wasn't clear enough, but selecting these presets leads to the default mypaint preset being selected), before worrying about the thumbnails.

I am also not sure if we should worry too much about the thumbnails, when all that's necessary is for them to be stuck into the image section in the database.
Comment 3 Halla Rempt 2020-11-14 14:29:45 UTC
I'm pretty sure that no resources put in a subfolder will load correctly at the moment.
Comment 4 Tiar 2021-06-25 12:14:45 UTC
Can you please check? I believe I fixed it in a6077decd3abd23f and cfac35715743edcb . I haven't checked with MyPaint presets in particular, but with other resources that didn't work before either.
Comment 5 Bug Janitor Service 2021-07-10 04:33:40 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Bug Janitor Service 2021-07-25 04:33:25 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!