Pigment.O plugin

Updated:

  • ON/OFF Switch - if you need to use the filter color to alpha you can deactivate pigment.o quickly to use the “color to alpha” filter color picker. This color picker from the filter still eludes me.
  • TIP button - now displays the values saved and it is located along side with the mini palette on the right side. Text is not editable, it only changes upon saving a new setting. The values are displayed in the following order: size, opacity, flow.

Preview:

2 Likes

I went to use the sliders a few months ago after watching a video explaining why they’re useful (think it was a Bobby Chiu video). Of course - I couldn’t find them and was a bit baffled as I was sure Krita had that functionality!

Now I understand why!.. :upside_down_face:

1 Like

Sorry! I felt a little embarrassed to say :sweat_smile: but after Installing the latest update of the plugin from a couple of days ago, I noticed that when I draw with a brush, the brush starts having a slight stutter/freeze every few seconds. I thought it was something wrong with my computer but when I disable the plugin the stuttering stops. I observed this happening in windows and linux.

I tried to record it happening but it’s hard to tell from video screenshots. I don’t remember this happening when I used the first/second version of this plugin. This is a great plugin but the stuttering is so noticeable for me I have to roll back to a older version despite all the new improvements.

1 Like

Just realised I’d bookmarked the video! (yay for me!) :nerd_face:

2 Likes

really? :frowning: and it is odd that you have less problems with the older versions. well it certainly had less going on so it was not even needed any threading.

Small Explanation:
There is no Krita events for me to read to when do the check (like a Krita mouse release or when the color changed) so I can’t really minimize that efficently without Krita allowing me to. That is why i do a periodical check but the strange thing is that it only does operations if there is a difference from the color in Krita compared to the color in Pigment.O. You are getting the stutter from like 5lines of code I imagine and that should just take like one or two milliseconds at most, it should not be noticeable.

I placed the checking process on another thread (alongside everything else) so it would not bother any Krita usability but it kinda relays that you have a multi-threaded pc though and python (Krita brings everything you need there). I am not sure if that is the case. I fear I am unable to make it lighter through python anymore, Sorry.

Weak Alternatives in case of Usage:

  • If you want to keep using it the only suggestion I can give is to go to the code and change the check interval time, I explain it on the manual. but sadly it will only studder less frequently.
  • Also if you set that interval to zero you will disable it and you can instead use a silent check that is only activated when you hover your mouse over the docker but there will be like a color update lag until you wiggle your stylus over it.

Random Suggestions that could work:

  • Have you tried increasing the amount of ram usage for Krita or something like that?
  • Also you could try and nullify the call of the “Threads” function in the “init” so it works like the old one but I really doubt it will work. I fear it will only make it even worse. but I guess it could be checked just in case it works.
  • you could also try commenting out from line 2706 to line 3707 (along those lines) and everything that calls those functions. As that will nullify all the extra features and would leave you only with the standard color calculation. but it could crash somewhere, pigmento is a weird web that I don’t even know how it is connected at times. I never tried to do that to the code but it should work I imagine.
1 Like

Thank you! Changing the check timer to zero on line 17 fixed the issue! I guess when the program was automatically checking to see what the latest color was was when the stuttering happened. I guess this might be unnoticeable to some people but it was very noticeable to me.

I placed the checking process on another thread (alongside everything else) so it would not bother any Krita usability but it kinda relays that you have a multi-threaded pc though and python (Krita brings everything you need there). I am not sure if that is the case. I fear I am unable to make it lighter through python anymore, Sorry.

The weird thing is that I have a pretty decent CPU (Ryzen 1600 with 6 cores and 12 threads.)

  • Also if you set that interval to zero you will disable it and you can instead use a silent check that is only activated when you hover your mouse over the docker but there will be like a color update lag until you wiggle your stylus over it.

After I disable it the color on the sliders only update when I hover my mouse over the docker. This is not a very big deal to me. I think I can live with it

Thank you so much for the help!!! :smiley:

2 Likes

Phew…took me some time to install it. Right from the bat I’ll give you what I would like to see in the color selector -
have the ability to make the swatch to the left bigger. I was actually going to watch the python programming tutorials just to make myself a swatch that represents the current color so I can fiddle it when drawing from reference. So yeah…I want an option for a bigger swatch.

I’m not sure if it is in the Qt ability in krita, but a borderless or a smaller border in the panel will be better.One thing I hate in Krita’s panels on windows is the window border that is too thick.

The sliders on HSV should be H-degrees, S-float(0.0 - 1.0), V-float(0.0 - 1.0)

1 Like

I would suggest taking a look at PyQt5 to make your own UI.

Pigment.O is color scale agnostic. you just need to go to the constants python file and adjust it to real scale if you want it. Truth is Krita favors very heavily those type of value sets so much so that i changed them. But that does not mean you cant work with correct values on the sliders. The Hex Codes it outputs are always up to what you would expect in a real scale of (360, 100, 100) but you can use anything really inside Krita since they are independent… you just need to reboot Krita after any change. Just don’t expect more colors because you set up a wider range, having it as (360, 255, 255) will display all the possible colors you can do with the RGB conversion instead of cropping them out with a (360, 100, 100) range.

1 Like

May I ask how to open the docker? I have installed the plugin and enabled it but I can’t find the Pigment.O docker in the docker menu…

I am on krita 4.2.9 (linux)

2 Likes

Well to open it you just need to activate it like any other docker really.
Settings > Dockers > Pigment.O

I am just guessing but I imagine you did a incorrect install of it perhaps for it to not to show up after the Python activation? if that is the case, I would try using another Python addon to do the install for you, it is called “Import Python Plugin”. just delete all the files you have placed on your user folder and use that script to install them correctly into the pykrita folder.

Tools > Scripts > Import Python Plugin > Select Pigmento Zip > Ok > Reboot

Each new thing will need a reboot from Krita for it to acknowledge what is currently active, in that regard Krita is very much like Gimp and not like Blender. this happens because Krita builds all the menus on startup and then retains them in memory to the very end (or at least that is the way I see it).

2 Likes

I have actually tried both method (and again) but it still doesn’t work.
First, I opened the plugin folder, put the extracted plugin folders and files in, close Krita, restart, and it doesn’t work.

Then, I tried to directly import the plugin using the Python addon you’ve mentioned and selected the zip directly downloaded from github and it doesn’t work as well.

I don’t know if it does matter but the plugin was shown in gray color in “Python Plugin Manager” like it is in the screenshot.

(I have already restarted Krita in each attempt)

1 Like

that grey means something is wrong with the code itself… if you hover your mouse over the grey line a popup will come up and say what is wrong with it.

For that to happen I imagine you tampered with the code somehow or did a incorrect install like some missing module. I will check the Github to see if all is there, give me a minute.

P.S.- Okay I check my version it is working and I just updated everything on github. it should work. if not you doing something wrong really, I would need to check you computer files to say what is happening.

1 Like

Well I managed to solve the problem after some googling.

I hovered my mouse over the grey line, a popup came up and say what is wrong and it seems to be a missing dependency on my computer, which is “python3-pyqt5.qtsvg”.

The plugin finally shows up after a quick apt install.

And it finally worked!!! Thanks a lot!!!

2 Likes

Thanks for the suggestion. And there I was thinking this time I won’t have to code my own stuff again.

Anyway thanks for your hard work. I will use it definitely.

1 Like

Hi all,
First of all thanks and congrats for the idea. I know color selectors are more complicated that we can imagine. Lots of SAI users and PS users are very used to this way of color picking. For me is not the best, but every artist has unique way of doing things.

I am testing the plugin and i have this behavior. i push on and off to activate and deactivate the plugin and result is the same. PigmentO color selected is not used whewn painting. I think everything else works. I can play with the sliders HSV or HSL i can use swatches and create gradients with choosen colors. But hey! what am i doing wrong? to not be able to paint with the color selected?

Keep updating please, is a good job :clap::clap::wink:

2 Likes

I was checking it out and I think I found the issue. The screenshot really helped me troubleshoot the issue. I was rather perplexed by it even after seeing it by myself. I fixed the bug and updated the Github already and it should be working now as expected.

Now after you turn it “ON” you just need to then trigger one of it’s events for it to update itself and come up to speed, and you can do one of the following:

  • hover the mouse out and in the docker.
  • place the mouse outside the docker and wait a second.
2 Likes

This is what i call a fast fix ;). Now everything is working fine. later i will test a bit more. also i have noticed a bit of lag if i use the pigmentO combined with Ctrl+ click to select colors which i am more used to.

“place the mouse outside the docker and wait a second.” i think it can be a stop barrier for some users.

What do you think?

2 Likes

That is not lag that is a feature… :stuck_out_tongue:
if you look at the diamond selector is the touching the black and white checker board limits by doing increments of 10%, with the only exception on the Hue Sliders.

Well unless Krita opens up more to Python, there is no better way that I know of at the moment.

2 Likes

Update: Fixed a minor bug with the mixer.

After booting when adding a color anywhere on the mixer would make a display update.
The view display of the other sliders should turn black as a default color but not on the CMYK section where it would be using white instead. This was a lapse of my part because CMYK black is 1 and not 0 unlike the rest, sorry.

2 Likes

Update: Added “memory” of the last session settings.

TIP, TTS and MIX settings will be stored and loaded up when starting a new session. If you don’t want it anymore you need to delete it after using it.

I know this feels like a small update but it took ALOT of cleanning up. It spanned over 75% of the code as most of it was almost rewritten/reorganized.
If something weird happens to pop up, just warn me.

5 Likes