Buli Notes

Possibility to document brushes… oh man what a relief!
One idea: possibility to save brush with all current parameters. Is this even possible?

Currently brushes are saved with current:

  • Blending mode
  • Size
  • Opacity
  • Flow

What do you mean by “all current parameters”?

Grum999

1 Like

Thanks, yes I’ve seen that. I’m totally new in Krita so maybe I ask stupid questions, but I will try to explain what I mean. For every brush engine there are different parameters which can be tweaked and I use this functionality quite a lot. The only way for me to save the state of the brush is to create new brush preset, otherwise I forget which tweaks I actually did. It is not complicated, but quickly brush preset library become overhelmed with many brushes which I used. If I want to distinguish them, I need some icon and I need to maintain consistent tagging… So I thought it would be perfect if these brush preset “states” could be saved on file basis with quick descriptions in Buli notes. Again, don’t know if this is possible at all.

PS: So far I found only KritaBrushInfo, which is better than nothing, but again operates only on saved brush presets… If there is a way to get live brush preset info with script, please let me know, it would be much usable for me.

1 Like

Ok, I understand.

I hesitated to store complete brush definition in Krita file, but didn’t implemented it:

  • Storage should be easy
  • Restoration would be very difficult I think as API doesn’t let you to manipulate resources (only read resources)

And I’m currently completely lost with resources manager and not able to understand how to use it :sweat_smile:
So trying to tweak it might be long, hard, with a risk to broke everything :slight_smile:

Also what to do with a restored brush?

  • Remove it if document is closed?
  • Keep it?
  • What if when brush already exists, with or without same properties?
    It start to be complex.

For what I understood of resource management, I think you have to store your brushes in bundles, and activate/deactivate bundle according to your needs.
But don’t ask me how to create a bundle, I already have difficulties to made distinction between active and inactives bundles.
Resources on Krita instance used for testing is in a terrible mess, I don’t touch anything on instance I use for drawing.

The best thing to do maybe is to create a new topic to expose your case and ask what is the best thing to do in your case to manage easily all your brushes.
There’s many people here that are expert with brushes and resources and might be better than me to give you tips :wink:

Grum999

1 Like

You certainly shouldn’t try to save/restore entire brush presets as annotations…
Krita 5.0 does have a concept of document storage for resources, palettes use it already. But as you already noticed, a number of things need to be taken into account before extending it to brushes

The entire versioning and deduplication of resources is something that no matter how you do it, has consequences that are not alway obvious at first but might confuse if not even frustrate users.

To be honest, I’m not even sure what concept we settled with for now.

1 Like

Thank you for detailed response! I feel honored when I get response from pro :smiley:
Yes, these are the right questions. Also I was thinking about that…
IMHO the best solution would be to have possibility to save/load Brush Preset XML (something like for filters) in every moment (realtime brush preset state). That way you wouldn’t be forced to create new brush preset for every tweak. If I could vote for one Krita feature, that would be definetelly “Save/Load Brush Preset XML” (or json or something else).

PS: Switch to Alternate Version of Brush Plugin (also has a nice video) is trying to solve similar problem, but again, Brush Presets get flooded with brushes quickly. So the only solution is like @Grum999 said, pack them in bundles and activate/deactivate bundles.

Dear Mr. @Grum999 , sorry for polluting your topic with my newbie questions, especially because your plugin is so extremely good :smiley:

Don’t worry, questions are interesting.
And any idea to improve things can be suggested. It doesn’t means it will implemented, but if idea is good enough and possible to implement, why not :slight_smile: (after it probably needs time and then there can be a delay before being implemented)

Grum999

1 Like

Thank you! I just posted my proposition in feature requests. BR


I just tried it in 5.0 and the bulinotes lost the icon

I am using bulinotes on Win10 with 5.0 beta and the icons are not lost. Also, the latest version of the plugin has the ability to select layers. Does the same thing happen in the latest version?

Oh! I just found out that I am using the oldest version.

It’s interesting. Can I jump from a layer to a note? I currently only see that the layers can be manipulated in the notes

I think it’s probably not possible to transition the operation screen from a layer to a note.
I often jump to the position of the active layer from a note that collects the layers. But I don’t think manipulating the layer docker will affect the note. (It will only change the icon of the layer in the note.

1 Like

Hi

Unfortunately, no.

There’s currently no simple way to detect the current active layer has been changed (I mean, I can do things like polling or tweaking, but I don’t really want to do things like this).

From a BuliNote with linked layers, you can:

  • Select layer from BuliNote (ie: click on layer in note, and then layer become active layer)
    – This allows when you have many (hundred sometimes for me) layers to just have a small selection of layers you want to work on and access to them quickly

  • When you select a layer in Krita’s layers docker, if layer is linked on a note, the layer in note is selected when mouse goes over note
    – That is currently the best I can do (or maybe, add a button in BuliNote docker to click on and open notes that are linked to current active layer, that’s might not be difficult to implement… :thinking:)

  • Linked layer provides similar icons than Krita’s layer docker
    – Visibility / Pinned to timeline / locked layer / Inherit alpha channel / Alpha lock icons works like in Blender: click on first one and then move mouse -with button still pressed => more ‘drag’ then- on layer below/above the one clicked to switch status

Note:

  • It seems “timeline” icon doesn’t really work properly :thinking:
  • There’s a bug in Krita with annotation management, I have to create a bug about this one, but in some case you can loose you note content
    – If your document is unmodified (ie: has been saved)
    – Modify an existing BuliNote ==> document is not passed in modified state then it’s not possible to save it until it has been modified; if you close it, you’ll loose modifications made on notes
    — a workaround is to add/remove a note or do a modification on document
    => I’ll try to create an official bug in bugs.kde.org tomorrow for annotations problem (it’s only one line of code to change in source file so it shouldn’t be complicated to fix I hope…)

Grum999

1 Like

Created bug:
https://bugs.kde.org/show_bug.cgi?id=441704

:slight_smile:

Grum999

2 Likes

This is genius ! I look forward the final release of Krita 5 to install this.

As discussed I’ll post the bug I encountered here.
From what I gathered from the scripting error it says it has something to do with a brush, to be clear I wasn’t using that brush at the time so to me it’s strange that the error would mention it.
Reproduction of the issue was easy, I only needed to attempt to edit the note I had written (screenshots below).

OS: windows 10
Krita version: 5.0 beta 1

Script error text:

KeyError
Python 3.8.1: C:\Program Files\Krita (x64)\bin\krita.exe
Mon Oct 4 21:52:41 2021

A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.

C:\Users\arjen\AppData\Roaming\krita\pykrita\bulinotes\bn\bnuidocker.py in __editNote(self=<bulinotes.bn.bnuidocker.BNUiDocker object>, index=False)
105 selectedItem=self.tvNotes.selectedItems()
106 if not selectedItem[0].locked():
107 BNNoteEditor.edit(selectedItem[0])
108 else:
109 if selectedItem[0].windowPostIt():
global BNNoteEditor = <class ‘bulinotes.bn.bnnotes.BNNoteEditor’>
BNNoteEditor.edit =
selectedItem = [<BNNote({2ab2878b-44da-4237-9641-f130c2b066cb}, testing note, False, False, False)>]

C:\Users\arjen\AppData\Roaming\krita\pykrita\bulinotes\bn\bnnotes.py in edit(note=<BNNote({2ab2878b-44da-4237-9641-f130c2b066cb}, testing note, False, False, False)>)
1019 def edit(note):
1020 “”“Open a dialog box to edit note”""
1021 dlgBox = BNNoteEditor(note)
1022
1023 returned = dlgBox.exec()
dlgBox undefined
global BNNoteEditor = <class ‘bulinotes.bn.bnnotes.BNNoteEditor’>
note = <BNNote({2ab2878b-44da-4237-9641-f130c2b066cb}, testing note, False, False, False)>

C:\Users\arjen\AppData\Roaming\krita\pykrita\bulinotes\bn\bnnotes.py in init(self=<bulinotes.bn.bnnotes.BNNoteEditor object>, note=<BNNote({2ab2878b-44da-4237-9641-f130c2b066cb}, testing note, False, False, False)>, name=‘Buli Notes’, parent=None)
1067 self.__saveViewConfig()
1068 self.__buildUi()
1069 self.__initViewConfig()
1070
1071 def __buildUi(self):
self = <bulinotes.bn.bnnotes.BNNoteEditor object>
self.__initViewConfig undefined

C:\Users\arjen\AppData\Roaming\krita\pykrita\bulinotes\bn\bnnotes.py in __initViewConfig(self=<bulinotes.bn.bnnotes.BNNoteEditor object>)
1220 def __initViewConfig(self):
1221 “”“Initialise view for Scratchpad”""
1222 self.__actionSelectBrush.presetChooser().setCurrentPreset(self.__allBrushesPreset[self.__note.scratchpadBrushName()])
1223 self.__activeView.setCurrentBrushPreset(self.__allBrushesPreset[self.__note.scratchpadBrushName()])
1224 self.__activeView.setForeGroundColor(ManagedColor.fromQColor(self.__note.scratchpadBrushColor(), self.__activeView.canvas()))
self = <bulinotes.bn.bnnotes.BNNoteEditor object>
self.__actionSelectBrush undefined
self.__allBrushesPreset undefined
self.__note undefined
KeyError: ‘b) Basic-5 Size’
cause = None
class = <class ‘KeyError’>
context = None
delattr = <method-wrapper ‘delattr’ of KeyError object>
dict = {}
dir =
doc = ‘Mapping key not found.’
eq = <method-wrapper ‘eq’ of KeyError object>
format =
ge = <method-wrapper ‘ge’ of KeyError object>
getattribute = <method-wrapper ‘getattribute’ of KeyError object>
gt = <method-wrapper ‘gt’ of KeyError object>
hash = <method-wrapper ‘hash’ of KeyError object>
init = <method-wrapper ‘init’ of KeyError object>
init_subclass =
le = <method-wrapper ‘le’ of KeyError object>
lt = <method-wrapper ‘lt’ of KeyError object>
ne = <method-wrapper ‘ne’ of KeyError object>
new =
reduce =
reduce_ex =
repr = <method-wrapper ‘repr’ of KeyError object>
setattr = <method-wrapper ‘setattr’ of KeyError object>
setstate =
sizeof =
str = <method-wrapper ‘str’ of KeyError object>
subclasshook =
suppress_context = False
traceback =
args = (‘b) Basic-5 Size’,)
with_traceback =

The above is a description of an error in a Python program. Here is
the original traceback:

Traceback (most recent call last):
File “C:\Users\arjen\AppData\Roaming\krita\pykrita\bulinotes\bn\bnuidocker.py”, line 107, in __editNote
BNNoteEditor.edit(selectedItem[0])
File “C:\Users\arjen\AppData\Roaming\krita\pykrita\bulinotes\bn\bnnotes.py”, line 1021, in edit
dlgBox = BNNoteEditor(note)
File “C:\Users\arjen\AppData\Roaming\krita\pykrita\bulinotes\bn\bnnotes.py”, line 1069, in init
self.__initViewConfig()
File “C:\Users\arjen\AppData\Roaming\krita\pykrita\bulinotes\bn\bnnotes.py”, line 1222, in __initViewConfig
self.__actionSelectBrush.presetChooser().setCurrentPreset(self.__allBrushesPreset[self.__note.scratchpadBrushName()])
KeyError: ‘b) Basic-5 Size’

I think you’re working on v0.2.0?
Can you check version?
(i) button in docker

If you’re not in v0.3.0, can you update plugin and tell me if problem still occurs?
I think I already got this problem a long time ago and already fix it, but not sure :slight_smile:

And also, can you confirm you have the b) Basic-5 Size available in your brushes?

Grum999

I was on v0.1.0a :grinning_face_with_smiling_eyes:
That is however the version available in the first post.
I updated and checked if the brush is available, which it is.

Unfortunately the issue persists.
Is there a way to uninstall plugins?
Maybe uninstalling and then installing v0.3.0 will make a difference?

You’re not in v0.3.0?
If plugin tells you’re in v0.3.0 there’s no need to unsinstall/reinstall anything.

I have to check, test, and try to understand why you have this error :slight_smile:

problem occurs on a specific file (the one on which you’ve created your first note) or any document on which you create a note, you have the problem?

Grum999