Follow-up on !343 (merged) .
It is now possible to adjust parameters geometric constructions with sliders in Blender's GUI.
This MR consists of the minimum necessary code to make this work. @tyburn and I intend to make minor changes still, e.g. moving the sliders to a nicer spot in Blender's GUI.
There is some basic documentation for the slider versions and an example in docs/source/blender/sliders.rst
or here.
@tyburn I changed the API of the sliders after all, instead of a dictionary users should pass a sequence of string labels and they can pass the arguments and keyword arguments of the callback directly. I think this is "more obvious" compared to a dictionary and certainly more correct.
When I say "more correct", I mean that ParamSpec
ensures that the add_slider
receives arguments of the correct types. This requires either Python 3.10 or the typing_extensions
library. I think this is useful, but I can remove this if desired.
If you and @techter think this is okay, then you can remove the draft label and merge this.