KanvasBuddy - a Minimalist Toolbar

Huh. It works fine on my end (and i always reinstall the plugin from the zip to test it before publishing an update).

Just to make absolutely sure: you are editing the file in the pykrita directory, yes?
(In Krita, go to Settings > Manage Resources… > Open Resource Folder > pykrita > kanvasbuddy)

If that’s not the issue, feel free to send me a message here on KA with maybe pictures or a video link of what you’re doing :slight_smile:

Ahhhh so that’s where I gone wrong. I didn’t open the pykrita directory through Krita itself (I only realized now XD). It works now. Thanks so much!

1 Like

Shortcuts to KBbuttons would be nice.

Great idea and great script ! It should be part of the krita like teen brush script which I love as well :slight_smile: There is a way to add shortcut to turn of/on KB toolbar ?

Hi Kapyia,
Kanvasbuddy 0.4 won’t run on my Debian 10 system with krita 4.2.8 and neither would Knavasbuddy 0.3.
Here’s what I get from krita’s python plugin manager:

Module not loaded:
Traceback (most recent call last):
File “home/adminahab/.local/share/krita/pykrita/kanvasbuddy/__init __.py”, line 1, in
from .kanvasbuddy import *
File “home/adminahab/.local/share/krita/pykrita/kanvasbuddy/kanvasbuddy.py”, line 23, in
from . import uikanvasbuddy
File “home/adminahab/.local/share/krita/pykrita/kanvasbuddy/uikanvasbuddy.py”, line 24, in
from .import (
File “home/adminahab/.local/share/krita/pykrita/kanvasbuddy/kbsliderbar.py”, line 16, in
from .kbsliderspinbox import KBSliderSpinBox
SyntaxError: invalid syntax (kbsliderspinbox.py, line 93)
Could not import kanvasbuddy

I can’t understand why it throws a syntax error if it works for other people.

I have both the 2.7 and 3.7 versions of various Python packages installed on my Linux OS and also have Qt 4 and Qt 5 packages installed (according to the Synaptic package manager). Could this be a problem? Having said that, the other plugins seem to work ok.

@Heyider Perhaps! I’ll keep that noted as a potential upgrade for the future.

@GregP Thank you! I won’t personally try to push KB to be included in Krita for two main reasons. First, I don’t think adds to the core experience of Krita the same way as, for example, a Palette Docker might. And because I’m not a fan of bloat, I would rather have people choose to install it than it laying around in the background of a lot of installs :slight_smile:. Second, a lot of this script is just trial and error as I try to learn PyQt. I don’t wanna push my script into a full professional software when I barely know what I’m doing, haha! That being said, KB is open source and shares the same license as Krita. If the devs want to they are free add the plugin to the full software at any time!

As for the shortcut, it’s less straightforward to install. In the GitHub source there is a file called kanvasbuddy.action that you can download separately. If you create a folder called actions in the resource folder (In Krita, go to Settings > Manage Resources… > Open Resource Folder) and add the *.action file to it, it should enable you to set up a shortcut to open KB. It’ll only let you open KB though, for now.

@AhabGreybeard
It definitely is a problem, since you can’t get KB to work! :open_mouth:
I’m not entirely sure why you are getting this error while others aren’t though. I have a couple of thoughts on it, but I’m not able to reproduce your problem so it makes it difficult for me to verify if I’m actually fixing the issue :confused:

1 Like

Just a suggestion but it would be great if you enable only one docker, let’s say you want only layers, so they would stay open all the time instead of closing every time you draw.

In general having a functinon of history - meaning: last window staying open - could prove to be useful. If you want to make a quick adjustment to your tool for a sec and then go back you always need to open the specific part (layers, tool options, …).

Otherwise it looks nice :-).

I have the same error, I am using Krita’s appimage, can it be that? :thinking:

It sounds likely. I think Kapyia works on Windows so it’s difficult to investigate Linux problems. I’ll try to run it on my Windows installation sometime to compare. It may be one of those obscure library version number problems :frowning:

This script looks and works amazing! Is it possible to make it run automatically on starting Krita? This could be nice for working on tablet.

@Kapyia updated the plugin to version 0.4.1.

I’m happy to announce the release of KanvasBuddy 0.4.1!

Very minor maintenance patch, but I squeezed in a feature to allow a user to “pin” the active panel.

Changelog is found in the initial post. Happy painting!

(Thanks to @tiar for helping me update the OP, again :wink: )

1 Like

@AhabGreybeard @SchrodingerCat I have tried running the plugin on a number of distros and different versions of Krita without having the same issues as you are having. I’m afraid there isn’t a lot I can do here. I read somewhere that some versions of Python isn’t fond of “trailing commas” and so I tried to removing those from my scripts. It’s not impossible that this resolves your issues, but it’s also not very likely either in my experience :confused:

@nickgeneratorfailed Based on your feedback I’ve added a “pinned panel” mode that prevents the plugin from changing back to the main panel automatically. :smiley:

@Pesi It’s not a bad idea, but I’m sad to say that I’m currently lacking the motivation to implement such a feature :confused:

1 Like

@AhabGreybeard @SchrodingerCat On my side, everything is working pretty well with Krita 4.2.9 (appimage) on a Debian 10

For what I understand, Krita (appimage) include it’s own Python version

Example

import sys
print(sys.version)

On Krita 4.2.9 appimage script execution: Python version is 3.8.1
On a console (python3 from my system): Python version is 3.7.1

So, if you use the appimage, normally you’ll have the same Python version + library then everyone

@AhabGreybeard according to your remark:

SyntaxError: invalid syntax (kbsliderspinbox.py, line 93)

Looking the script, it seems that Python is not able to understand the Literal String Interpolation, this has been implemented into Python 3.6

Check the Krita 4.2.8 appimage:
Python version is 3.5.2, so version was not able to work with Literal String Interpolation

If you use Krita 4.2.9 appimage, it should be ok now i think

Grum999

1 Like

@Kapyia @Grum999 Yes! It’s working now (Debian 10, krita 4.2.9), thank you for fixing it and thank you for telling me :slight_smile:

2 Likes

@Kapyia @Grum999 Yes, now it works as I recall they updated the python libraries in the Krita appimage (4.2.9) :slight_smile:

2 Likes

@Grum999 Thanks for providing some insight. I would not have figured that one out on my own. I knew this was a newer feature of Python 3 but I didn’t think it was too new. :sweat_smile:

Glad this resolved itself in the end!

@AhabGreybeard @SchrodingerCat Enjoy! :smiley:

1 Like

Thx to share, nice plugin, very useful :slight_smile:

1 Like

Hey everyone! Thought I would mention a little change I made to the code that I really like and hope other might like too!

The following additions adds an undo, redo, and save button to KanvasBuddy (file paths and names that i’m using are for windows):

  1. Add the following to the [CANVAS] section of config.ini:
fileSave=1
editUndo=1
editRedo=1

(If you don’t want any of the three actions, set them to 0).

  1. In the file “data.json”, add the following entries to the json list under the “canvasOptions” object:
        "fileSave": 
        {
            "id": "file_save",
            "icon": "light_document-save-as"
        },
        "editUndo": {
            "id": "edit_undo",
            "icon": "light_arrow-left"
        },
        "editRedo": {
            "id": "edit_redo",
            "icon": "light_arrow-right"
        }

Make sure that your brackets are alright, that the listed objects are separated by commas, and that the code won’t end up breaking!

  1. Restart Krita and start up kanvasbuddy.

I have my settings so that with these new options, file save, undo, and redo look like these. All of them do what they say on the tin!

Hope that helps! Thanks again to @Kapyia for this awesome plugin!

10 Likes

I have never used this before. I think is interesting. What i love about this, is to see how Krita community interacts. This is the real power of freeopensource community. Try to do this in another company. I love Krita :heart_eyes:
Btw why this is different ? Can we customize it?

2 Likes