Created by: portnov
Addressed problem description
For now, it is not clear (yet), what should be The Right structure of Sverchok's Add Node menu. The ongoing discussion is in #4831.
Solution description
-
index.yaml
in the root of sverchok directory stays in place. It is still the default menu, but it is no longer the menu which is actually loaded at sverchok startup! - At Sverchok startup we load the
index.yaml
menu under user's datafiles directory - something like~/.config/blender/3.4/datafiles/sverchok/index.yaml
. - If at startup Sverchok does not see that file under datafiles, it will copy the default
index.yaml
there, before loading it. - Non-default menu presets that we provide with Sverchok are under
menus/
directory. - For standard menu presets, which are named
full_*.yaml
, there will be a CI test which checks that they have all the same nodes asindex.yaml
has. - There can be menu presets, which contain only some subset of nodes. The convention is to name them
partial_*.yaml
. At the moment, there are no such presets in Sverchok distribution, but they may appear in future. - The user can create his own menu presets, and place them under datafiles directory,
menus/
subdirectory - something like~/.config/blender/3.4/datafiles/sverchok/menus/MY_MENU.yaml
. - In Sverchok settings, there is now an option, allowing the user to select which preset he wishes to use. When the user clicks "Set", we copy the selected preset file to
index.yaml
under user's datafiles directory. So at next startup, we will use that preset. - If the user wishes, he may directly edit
index.yaml
under his datafiles directory, without having to touch the one which is in sverchok directory.
Preflight checklist
Put an x letter in each brackets when you're done this item:
-
Code changes complete. -
Code documentation complete. -
Documentation for users complete (or not required, if user never sees these changes). -
Manual testing done. -
Unit-tests implemented. -
Ready for merge.