wojtryb / Shortcut-Composer

Krita plugin for creating complex keyboard shortcuts
GNU General Public License v3.0
261 stars 9 forks source link

Pie menus does not support multiple presets with the same name stored in different locations #66

Closed manicpixelgirl closed 10 months ago

manicpixelgirl commented 11 months ago

Describe the issue you encounter.

wojtryb commented 11 months ago

I can't reproduce that - you have to be more specific what are the steps to get this issue.

Newly created brushes added to tags are visible in the pie settings. Brush icons are not updated before krita restart - if that is your issue, than I'm afraid I will not fix it - it drastically increases plugin performance.

manicpixelgirl commented 11 months ago

Heres a photo, I'm not too sure why I can't find my brush even after restarting the program

https://imgur.com/feUszsG [image: erasers.png]

On Fri, Oct 6, 2023 at 2:39 AM Wojciech Trybus @.***> wrote:

I can't reproduce that - you have to be more specific what are the steps to get this issue.

Newly created brushes added to tags are visible in the pie settings. Brush icons are not updated before krita restart - if that is your issue, than I'm afraid I will not fix it - it drastically increases plugin performance.

— Reply to this email directly, view it on GitHub https://github.com/wojtryb/Shortcut-Composer/issues/66#issuecomment-1750060966, or unsubscribe https://github.com/notifications/unsubscribe-auth/APVECSTNEHNJIQTKGFGUI6DX56RQPAVCNFSM6AAAAAA5VHRAASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJQGA3DAOJWGY . You are receiving this because you authored the thread.Message ID: @.***>

wojtryb commented 11 months ago

Copying image from imgur, in case it gets deleted there over time

feUszsG

Well, it's pretty weird, as it looks like some of the custom brushes are detected and some are not.

Is there some pattern behind those brushes that were not detected? What are their names? Do they use some special characters? Do they come from some specific brush pack? Were they created with some old version of krita long time ago? Do they use some specific brushtips?

There must be something behind those brushes that make them not load.

manicpixelgirl commented 11 months ago

It's the eraser circle from Krita 4 Default! I changed the icon, but even then, there's still only one original eraser circle in the pie

On Fri, Oct 6, 2023 at 4:01 AM Wojciech Trybus @.***> wrote:

Well, it's pretty weird, as it looks like some of the custom brushes are detected and some are not.

Is there some pattern behind those brushes that were not detected? What are their names? Do they use some special characters? Do they come from some specific brush pack? Were they created with some old version of krita long time ago? Do they use some specific brushtips?

There must be something behind those brushes that make them not load.

— Reply to this email directly, view it on GitHub https://github.com/wojtryb/Shortcut-Composer/issues/66#issuecomment-1750154351, or unsubscribe https://github.com/notifications/unsubscribe-auth/APVECSU535M36IWZICBFS23X563E5AVCNFSM6AAAAAA5VHRAASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJQGE2TIMZVGE . You are receiving this because you authored the thread.Message ID: @.***>

manicpixelgirl commented 11 months ago

Its been renamed previously and not under their original icons or their new ones, so probably something within krita then!

On Fri, Oct 6, 2023 at 4:41 AM Wojciech Trybus @.***> wrote:

Ok, so the problem is not missing brushes - they are available but under their original icons?

I can confirm that the preset from original Krita 4 library, after being overwritten is not properly displayed, but krita seems to be some problems in that situation.

To avoid that, you can save this brush under a different name and assign it to the "Erasers" tag. I think this is a bug in krita, which I won't be able to fix.

— Reply to this email directly, view it on GitHub https://github.com/wojtryb/Shortcut-Composer/issues/66#issuecomment-1750207752, or unsubscribe https://github.com/notifications/unsubscribe-auth/APVECSTASWAYRF5RWMGCMVDX5673DAVCNFSM6AAAAAA5VHRAASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJQGIYDONZVGI . You are receiving this because you authored the thread.Message ID: @.***>

wojtryb commented 11 months ago

All right, I think this is a bug in the plugin.

It looks like krita allows to save a preset under the same name multiple times - but only if you save it in different location - you can get that by saving default brush on your local machine. When there are two presets with the same name, my plugin will only store the second one.

I'll try to fix that, but you can consider using different names for your custom brushes to prevent things like that - overwriting custom brushes does not seem as the best practice.

manicpixelgirl commented 11 months ago

Alright good to know! Thanks for your help.

On Fri, Oct 6, 2023 at 4:50 AM Wojciech Trybus @.***> wrote:

All right, I think this is a bug in the plugin.

It looks like krita allows to save a preset under the same name multiple times - but only if you save it in different location - you can get that by saving default brush on your local machine. When there are two presets with the same name, my plugin will only store the second one.

I'll try to fix that, but you can consider using different names for your custom brushes to prevent things like that - overwriting custom brushes does not seem as the best practice.

— Reply to this email directly, view it on GitHub https://github.com/wojtryb/Shortcut-Composer/issues/66#issuecomment-1750221286, or unsubscribe https://github.com/notifications/unsubscribe-auth/APVECST7YQD5TMSSYJASDPLX57A65AVCNFSM6AAAAAA5VHRAASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJQGIZDCMRYGY . You are receiving this because you authored the thread.Message ID: @.***>

wojtryb commented 10 months ago

Hi, I made some research, and it looks like the problem is not fixable.

Krita has a rather serious design flaw here - it allows to have multiple presets of the same name, but in Python API returns them mapped to their names - as if they are guaranteed unique.

You simply cannot fetch more than one preset then.