Buli Notes

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

Yes, I’m on 0.3.0

I just tried it on a different file and I now get a script error message prior to creating a new note, after which it does open the interface for writing one.
This happens to me on both .kra files.

:open_mouth:

Which message?

I have to install Krita 5 on my Windows VM I think, maybe it’s a Windows related problem :thinking:

I will be hard to test/fix it this week, but I’ll try during the week-end

Grum999

AttributeError
Python 3.8.1: C:\Program Files\Krita (x64)\bin\krita.exe
Mon Oct 4 23:01:49 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\pktk\widgets\wcolorbutton.py in paintEvent(self=<bulinotes.pktk.widgets.wcolorbutton.WColorButton object>, event=<PyQt5.QtGui.QPaintEvent object>)
  105         painter = QPainter(self)
  106         painter.setPen(self.__pen)
  107         if not self.__color.isNone():
  108             painter.fillRect(rect, self.__cbBrush)
  109             painter.setBrush(self.__brush)
self = <bulinotes.pktk.widgets.wcolorbutton.WColorButton object>
self.__color undefined
AttributeError: 'GlobalColor' object has no attribute 'isNone'
    __cause__ = None
    __class__ = <class 'AttributeError'>
    __context__ = None
    __delattr__ = <method-wrapper '__delattr__' of AttributeError object>
    __dict__ = {}
    __dir__ = <built-in method __dir__ of AttributeError object>
    __doc__ = 'Attribute not found.'
    __eq__ = <method-wrapper '__eq__' of AttributeError object>
    __format__ = <built-in method __format__ of AttributeError object>
    __ge__ = <method-wrapper '__ge__' of AttributeError object>
    __getattribute__ = <method-wrapper '__getattribute__' of AttributeError object>
    __gt__ = <method-wrapper '__gt__' of AttributeError object>
    __hash__ = <method-wrapper '__hash__' of AttributeError object>
    __init__ = <method-wrapper '__init__' of AttributeError object>
    __init_subclass__ = <built-in method __init_subclass__ of type object>
    __le__ = <method-wrapper '__le__' of AttributeError object>
    __lt__ = <method-wrapper '__lt__' of AttributeError object>
    __ne__ = <method-wrapper '__ne__' of AttributeError object>
    __new__ = <built-in method __new__ of type object>
    __reduce__ = <built-in method __reduce__ of AttributeError object>
    __reduce_ex__ = <built-in method __reduce_ex__ of AttributeError object>
    __repr__ = <method-wrapper '__repr__' of AttributeError object>
    __setattr__ = <method-wrapper '__setattr__' of AttributeError object>
    __setstate__ = <built-in method __setstate__ of AttributeError object>
    __sizeof__ = <built-in method __sizeof__ of AttributeError object>
    __str__ = <method-wrapper '__str__' of AttributeError object>
    __subclasshook__ = <built-in method __subclasshook__ of type object>
    __suppress_context__ = False
    __traceback__ = <traceback object>
    args = ("'GlobalColor' object has no attribute 'isNone'",)
    with_traceback = <built-in method with_traceback of AttributeError object>

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\pktk\widgets\wcolorbutton.py", line 107, in paintEvent
    if not self.__color.isNone():
AttributeError: 'GlobalColor' object has no attribute 'isNone'

Ok thanks!

Grum999

I’ve quickly tested v0.3.0 on Krita 5 -beta 1 on windows, I’m currently not able to reproduce error messages :confused:

What you can do to be sure:

  1. Deactivate plugin in Krita’s plugin settings
  2. Exit Krita
  3. Delete directory C:\Users\arjen\AppData\Roaming\krita\pykrita\bulinotes and file C:\Users\arjen\AppData\Roaming\krita\pykrita\bulinotes.desktop
  4. Delete file C:\Users\arjen\AppData\Local\krita-plugin-bulinotesrc.json
  5. Restart Krita: plugin shouldn’t be available anymore (complete uninstall)

Then, follow procedure to install v0.3.0 again.
If it work, I have no idea of why you had the errors :slight_smile:

If it doesn’t work, it means I have to try to reproduce the case of:

  • The ‘b) Basic-5 Size’ error
  • The ‘GlobalColor’ object has no attribute ‘isNone’
    And I currently have no more ideas about why it doesn’t work :sweat_smile:

Grum999